{"_id":"@6edesign/data-circuits","_rev":"11-2883a27aa243fb7f992b8431c4d6ec6e","name":"@6edesign/data-circuits","dist-tags":{"latest":"0.0.10"},"versions":{"0.0.0":{"name":"@6edesign/data-circuits","version":"0.0.0","_id":"@6edesign/data-circuits@0.0.0","maintainers":[{"name":"6edesign","email":"jon@6eDesign.net"}],"dist":{"shasum":"bae5e30d5ac346a72e675d0462a7c07a4b5e2d84","tarball":"https://registry.npmjs.org/@6edesign/data-circuits/-/data-circuits-0.0.0.tgz","fileCount":46,"integrity":"sha512-0HFRN4kR27SbijCVOldGrF47PbAkex+wRmRvEAP2hMzTdF4BzpDJGG+yb5oMOpC9/yg2wXWesFEhHa5381WncQ==","signatures":[{"sig":"MEYCIQCAiv56gkIAg2JT1Zdb341KFgpZBzGZ3s7ElkrNIWKBGgIhANpUdy9ONDmRM99oirT/qPoABOD2pYuv7Cy+L9AdKXpe","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":122769},"type":"module","_from":"file:6edesign-data-circuits-0.0.0.tgz","types":"types/index.d.ts","exports":{".":{"import":"./index.js"},"./circuit":{"import":"./lib/circuits.js"}},"scripts":{"lint":"echo 'Add lint script here'","test":"mocha **/*.spec.js --exit","build":"npx -p typescript tsc ./index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --outDir types"},"_npmUser":{"name":"6edesign","email":"jon@6eDesign.net"},"_resolved":"/tmp/920263e1772ebc22cb30b4b8568a0b2f/6edesign-data-circuits-0.0.0.tgz","_integrity":"sha512-0HFRN4kR27SbijCVOldGrF47PbAkex+wRmRvEAP2hMzTdF4BzpDJGG+yb5oMOpC9/yg2wXWesFEhHa5381WncQ==","_npmVersion":"10.8.2","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.22.4","axios":"^1.6.5","express":"^4.18.2","ioredis":"^5.4.1","redlock":"^5.0.0-beta.2","millisecond":"^0.1.2"},"eslintConfig":{"extends":["@6edesign/eslint-config/library.js"]},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","sinon":"^18.0.0","supertest":"^6.3.4","ioredis-mock":"^8.9.0","@6edesign/eslint-config":"0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/data-circuits_0.0.0_1755413587218_0.44674829528019044","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"name":"@6edesign/data-circuits","version":"0.0.1","_id":"@6edesign/data-circuits@0.0.1","maintainers":[{"name":"6edesign","email":"jon@6eDesign.net"}],"dist":{"shasum":"679b2d0bf0fd8799941a07369c724b5288848e3e","tarball":"https://registry.npmjs.org/@6edesign/data-circuits/-/data-circuits-0.0.1.tgz","fileCount":23,"integrity":"sha512-TEtyu7RC71jWYBWW2BfeqxJQiaMKp6roJPRaXPBDtsI1KSl/mmGEXAHlpxAMDS+jejTcy79o5mGD9IgVhtUrIw==","signatures":[{"sig":"MEUCIFHtvwkWo0NFkjccr8XD1l6aXNoilgOQ7bZNvzqcPPHZAiEA4p/bDxlVL8Mtpp+LFNhC0Y0fzrKHiaQJXDF3GyckQ6M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55558},"type":"module","_from":"file:6edesign-data-circuits-0.0.1.tgz","types":"types/index.d.ts","exports":{".":{"import":"./index.js"},"./circuit":{"import":"./lib/circuits.js"}},"scripts":{"lint":"echo 'Add lint script here'","test":"mocha **/*.spec.js --exit","build":"npx -p typescript tsc ./index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --outDir types"},"_npmUser":{"name":"6edesign","email":"jon@6eDesign.net"},"_resolved":"/tmp/7bb379d5e6164f2ba1adc8027e8579c6/6edesign-data-circuits-0.0.1.tgz","_integrity":"sha512-TEtyu7RC71jWYBWW2BfeqxJQiaMKp6roJPRaXPBDtsI1KSl/mmGEXAHlpxAMDS+jejTcy79o5mGD9IgVhtUrIw==","_npmVersion":"10.8.2","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.22.4","axios":"^1.6.5","express":"^4.18.2","ioredis":"^5.4.1","redlock":"^5.0.0-beta.2","millisecond":"^0.1.2"},"eslintConfig":{"extends":["@6edesign/eslint-config/library.js"]},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","sinon":"^18.0.0","supertest":"^6.3.4","ioredis-mock":"^8.9.0","@6edesign/eslint-config":"0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/data-circuits_0.0.1_1755448454303_0.41986237141053695","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@6edesign/data-circuits","version":"0.0.2","_id":"@6edesign/data-circuits@0.0.2","maintainers":[{"name":"6edesign","email":"jon@6eDesign.net"}],"dist":{"shasum":"4a41f2220a91c868dd92a599eb142711591f61b1","tarball":"https://registry.npmjs.org/@6edesign/data-circuits/-/data-circuits-0.0.2.tgz","fileCount":23,"integrity":"sha512-/LSl24+fL2d2u2kabnfcORmw+6AC/qFPf85duKo0QTg2pJTAPST6aDZq3cRXf/wQTdtM7nkY2Dncus9Yi1XazA==","signatures":[{"sig":"MEUCIGd2Ba2MXZHb/YmFg7cKnvZ+H4Cet3BYTkMo2T3wib2zAiEAzPxJ36fEP0Kw4USY96UQICs3DAT1ogA2RXzsq3BhuC0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55609},"type":"module","_from":"file:6edesign-data-circuits-0.0.2.tgz","types":"types/index.d.ts","exports":{".":{"import":"./index.js"},"./circuit":{"import":"./lib/circuits.js"}},"scripts":{"lint":"echo 'Add lint script here'","test":"mocha **/*.spec.js --exit","build":"npx -p typescript tsc ./index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --outDir types"},"_npmUser":{"name":"6edesign","email":"jon@6eDesign.net"},"_resolved":"/tmp/1e4d37adb39baff64b067273a2341682/6edesign-data-circuits-0.0.2.tgz","_integrity":"sha512-/LSl24+fL2d2u2kabnfcORmw+6AC/qFPf85duKo0QTg2pJTAPST6aDZq3cRXf/wQTdtM7nkY2Dncus9Yi1XazA==","_npmVersion":"10.8.2","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.22.4","axios":"^1.6.5","express":"^4.18.2","ioredis":"^5.4.1","redlock":"^5.0.0-beta.2","millisecond":"^0.1.2"},"eslintConfig":{"extends":["@6edesign/eslint-config/library.js"]},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","sinon":"^18.0.0","supertest":"^6.3.4","ioredis-mock":"^8.9.0","@6edesign/eslint-config":"0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/data-circuits_0.0.2_1755449273997_0.7301419109035516","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@6edesign/data-circuits","version":"0.0.3","_id":"@6edesign/data-circuits@0.0.3","maintainers":[{"name":"6edesign","email":"jon@6eDesign.net"}],"dist":{"shasum":"72418815fe633d89ddb936250c17e32fda07159e","tarball":"https://registry.npmjs.org/@6edesign/data-circuits/-/data-circuits-0.0.3.tgz","fileCount":23,"integrity":"sha512-fuZ5qF6vXul79/2GNn2uH3KvhZwx80IvEY4bMfdJwFpAqaZBDKtZmE+73GTb0Y7JkZKpjkJ6s/75+BUxTuUC9w==","signatures":[{"sig":"MEUCIQCTJ8EL9BeCHgw9dy5wQ/bPu82ra1OFQ/SHho7A8x25KgIgLqqRINSwmTa5S6GdaVxWDEsrmt6DA+bRKPzygPeCQhA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55660},"type":"module","_from":"file:6edesign-data-circuits-0.0.3.tgz","types":"types/index.d.ts","exports":{".":{"import":"./index.js"},"./circuit":{"import":"./lib/circuits.js"}},"scripts":{"lint":"echo 'Add lint script here'","test":"mocha **/*.spec.js --exit","build":"npx -p typescript tsc ./index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --outDir types"},"_npmUser":{"name":"6edesign","email":"jon@6eDesign.net"},"_resolved":"/tmp/98f3de06ff5cf1d166f2ff792191dee2/6edesign-data-circuits-0.0.3.tgz","_integrity":"sha512-fuZ5qF6vXul79/2GNn2uH3KvhZwx80IvEY4bMfdJwFpAqaZBDKtZmE+73GTb0Y7JkZKpjkJ6s/75+BUxTuUC9w==","_npmVersion":"10.8.2","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.22.4","axios":"^1.6.5","express":"^4.18.2","ioredis":"^5.4.1","redlock":"^5.0.0-beta.2","millisecond":"^0.1.2"},"eslintConfig":{"extends":["@6edesign/eslint-config/library.js"]},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","sinon":"^18.0.0","supertest":"^6.3.4","ioredis-mock":"^8.9.0","@6edesign/eslint-config":"0.2.3"},"_npmOperationalInternal":{"tmp":"tmp/data-circuits_0.0.3_1755459080367_0.0208362085968421","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@6edesign/data-circuits","version":"0.0.4","_id":"@6edesign/data-circuits@0.0.4","maintainers":[{"name":"6edesign","email":"jon@6eDesign.net"}],"dist":{"shasum":"893a2014640b09d08b217794cdf52cf842928e2d","tarball":"https://registry.npmjs.org/@6edesign/data-circuits/-/data-circuits-0.0.4.tgz","fileCount":23,"integrity":"sha512-LY63MUC2up94IsI5wcKghJo17XBj1C/ey26W27Ql4nzj6U6uvdDkuSFbZZgsXGuS6kcwMSwxHMUsCaSro8Ga2A==","signatures":[{"sig":"MEUCIQD9p5diNIKj2U5g7NyE9W2A1aYOivx07T2huFglEV6dVgIgFq/zExQPrQJwjWAzISwUfGXtHBXqF6CjJMMfQOUvTLM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55729},"type":"module","_from":"file:6edesign-data-circuits-0.0.4.tgz","types":"types/index.d.ts","exports":{".":{"import":"./index.js"},"./circuit":{"import":"./lib/circuits.js"}},"scripts":{"lint":"echo 'Add lint script here'","test":"mocha **/*.spec.js --exit","build":"npx -p typescript tsc ./index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --outDir types"},"_npmUser":{"name":"6edesign","email":"jon@6eDesign.net"},"_resolved":"/tmp/4bdf8c0adbb2a7294e148b3c8bad77c0/6edesign-data-circuits-0.0.4.tgz","_integrity":"sha512-LY63MUC2up94IsI5wcKghJo17XBj1C/ey26W27Ql4nzj6U6uvdDkuSFbZZgsXGuS6kcwMSwxHMUsCaSro8Ga2A==","_npmVersion":"10.8.2","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.22.4","axios":"^1.6.5","express":"^4.18.2","ioredis":"^5.4.1","redlock":"^5.0.0-beta.2","millisecond":"^0.1.2"},"eslintConfig":{"extends":["@6edesign/eslint-config/library.js"]},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","sinon":"^18.0.0","supertest":"^6.3.4","ioredis-mock":"^8.9.0","@6edesign/eslint-config":"^0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/data-circuits_0.0.4_1755549188160_0.46463015451735834","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@6edesign/data-circuits","version":"0.0.5","_id":"@6edesign/data-circuits@0.0.5","maintainers":[{"name":"6edesign","email":"jon@6eDesign.net"}],"dist":{"shasum":"a0d648370418e053a0a465ece6a5b866d3c81fa3","tarball":"https://registry.npmjs.org/@6edesign/data-circuits/-/data-circuits-0.0.5.tgz","fileCount":23,"integrity":"sha512-Q7mSlzW9AQ+zEfs9tjg8xc7ZWWB00TM8bWVeTUSJBl1YPfVL6JuO3uUMV72OuX6tzQ+z2zIo4EQQF/aci5FU4Q==","signatures":[{"sig":"MEUCIGjZPSlOuqkZ+fRHLvkUbANER7DS2kiEbAwatE1uUsqtAiEAq2TTV3N2RMxAtRwFZ++QLyX4DR5iSxGe6beVl08r7Uk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55790},"type":"module","_from":"file:6edesign-data-circuits-0.0.5.tgz","types":"types/index.d.ts","exports":{".":{"import":"./index.js"},"./circuit":{"import":"./lib/circuits.js"}},"scripts":{"lint":"echo 'Add lint script here'","test":"mocha **/*.spec.js --exit","build":"npx -p typescript tsc ./index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --outDir types"},"_npmUser":{"name":"6edesign","email":"jon@6eDesign.net"},"_resolved":"/tmp/c26e9aa348f1b3e6c8043d6e46e537ee/6edesign-data-circuits-0.0.5.tgz","_integrity":"sha512-Q7mSlzW9AQ+zEfs9tjg8xc7ZWWB00TM8bWVeTUSJBl1YPfVL6JuO3uUMV72OuX6tzQ+z2zIo4EQQF/aci5FU4Q==","_npmVersion":"10.9.3","directories":{},"_nodeVersion":"22.18.0","dependencies":{"zod":"^3.22.4","axios":"^1.6.5","express":"^4.18.2","ioredis":"^5.4.1","redlock":"^5.0.0-beta.2","millisecond":"^0.1.2"},"eslintConfig":{"extends":["@6edesign/eslint-config/library.js"]},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","sinon":"^18.0.0","supertest":"^6.3.4","ioredis-mock":"^8.9.0","@6edesign/eslint-config":"^0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/data-circuits_0.0.5_1756359278850_0.8920430355515445","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@6edesign/data-circuits","version":"0.0.6","_id":"@6edesign/data-circuits@0.0.6","maintainers":[{"name":"6edesign","email":"jon@6eDesign.net"}],"dist":{"shasum":"433ad794a385d00f36d40814425442d62bcbf2dd","tarball":"https://registry.npmjs.org/@6edesign/data-circuits/-/data-circuits-0.0.6.tgz","fileCount":22,"integrity":"sha512-SWcPoNlIp0Z+TQlSuSP0KbegCHXuOaZow0rHPX16I3LOtcc6NENfqhi33MWz91TtZiIusC+6kPtqt31nC0utHA==","signatures":[{"sig":"MEQCIDDdmoFOA+dewGVSrlzHpSaSWv6mZDFAht/TAeqb3FRHAiBB+te9QGKJ1n5CmZhnicQ7uSKkn+3PZY1h8iLeuZ3PwA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54910},"type":"module","_from":"file:6edesign-data-circuits-0.0.6.tgz","types":"types/index.d.ts","exports":{".":{"import":"./index.js"},"./circuit":{"import":"./lib/circuits.js"}},"scripts":{"lint":"echo 'Add lint script here'","test":"mocha **/*.spec.js --exit","build":"npx -p typescript tsc ./index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --outDir types"},"_npmUser":{"name":"6edesign","email":"jon@6eDesign.net"},"_resolved":"/tmp/8f897e446504c5f2aaad9409b4ceb055/6edesign-data-circuits-0.0.6.tgz","_integrity":"sha512-SWcPoNlIp0Z+TQlSuSP0KbegCHXuOaZow0rHPX16I3LOtcc6NENfqhi33MWz91TtZiIusC+6kPtqt31nC0utHA==","_npmVersion":"10.9.3","directories":{},"_nodeVersion":"22.18.0","dependencies":{"zod":"^3.22.4","axios":"^1.6.5","express":"^4.18.2","ioredis":"^5.4.1","redlock":"^5.0.0-beta.2","millisecond":"^0.1.2"},"eslintConfig":{"extends":["@6edesign/eslint-config/library.js"]},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","sinon":"^18.0.0","supertest":"^6.3.4","ioredis-mock":"^8.9.0","@6edesign/eslint-config":"^0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/data-circuits_0.0.6_1756404089556_0.6515275015040081","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"@6edesign/data-circuits","version":"0.0.7","_id":"@6edesign/data-circuits@0.0.7","maintainers":[{"name":"6edesign","email":"jon@6eDesign.net"}],"dist":{"shasum":"a202d34caf56f74a27e6131ad90eb8b1de059a7e","tarball":"https://registry.npmjs.org/@6edesign/data-circuits/-/data-circuits-0.0.7.tgz","fileCount":23,"integrity":"sha512-1/FH0kJDE+FkJLHS6chEeAOYsPwvZraO55uHJMnBWh14Gmn2Ac0LcqYAxnEnIhMvSlADewziy2YtvFJtXyy0+g==","signatures":[{"sig":"MEUCIGRKAn+vAU3fPRETUEb+67cjxRTyi+R5YuCObykNhYsuAiEAsDYnTWlXR/HDpfhOjs1eT2hRrLvN7Mk6svjltLPTJaU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55920},"type":"module","_from":"file:6edesign-data-circuits-0.0.7.tgz","types":"types/index.d.ts","exports":{".":{"import":"./index.js"},"./circuit":{"import":"./lib/circuits.js"}},"scripts":{"lint":"echo 'Add lint script here'","test":"mocha **/*.spec.js --exit","build":"npx -p typescript tsc ./index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --outDir types"},"_npmUser":{"name":"6edesign","email":"jon@6eDesign.net"},"_resolved":"/tmp/2fc7b23906ac9ebfa5d169adc706add1/6edesign-data-circuits-0.0.7.tgz","_integrity":"sha512-1/FH0kJDE+FkJLHS6chEeAOYsPwvZraO55uHJMnBWh14Gmn2Ac0LcqYAxnEnIhMvSlADewziy2YtvFJtXyy0+g==","_npmVersion":"10.9.3","directories":{},"_nodeVersion":"22.18.0","dependencies":{"zod":"^3.22.4","axios":"^1.6.5","express":"^4.18.2","ioredis":"^5.4.1","redlock":"^5.0.0-beta.2","millisecond":"^0.1.2"},"eslintConfig":{"extends":["@6edesign/eslint-config/library.js"]},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","sinon":"^18.0.0","supertest":"^6.3.4","ioredis-mock":"^8.9.0","@6edesign/eslint-config":"^0.2.4"},"_npmOperationalInternal":{"tmp":"tmp/data-circuits_0.0.7_1756431230598_0.7197477710046563","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"@6edesign/data-circuits","version":"0.0.8","_id":"@6edesign/data-circuits@0.0.8","maintainers":[{"name":"6edesign","email":"jon@6eDesign.net"}],"dist":{"shasum":"ba44cf9181f230454f222112ebf9ebd4844358bd","tarball":"https://registry.npmjs.org/@6edesign/data-circuits/-/data-circuits-0.0.8.tgz","fileCount":23,"integrity":"sha512-rZqTOr+fHF5/dzBqbDxUBX3zepHLF+Mr7kYnLVxYKpDiB5PUfml9Il+LhdnVFT2AuNbHPEbMkzrRxfWqlqmKgQ==","signatures":[{"sig":"MEYCIQD3Y8b+gdZ/XFawYouIdrQxiJYLDrBwk0/arZbt50q8hwIhAPkAUjNeh+h6i3UFqn7yv1jp+pPsNZTPOLuDsPDeNOHf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56014},"type":"module","_from":"file:6edesign-data-circuits-0.0.8.tgz","types":"types/index.d.ts","exports":{".":{"import":"./index.js"},"./circuit":{"import":"./lib/circuits.js"}},"scripts":{"lint":"echo 'Add lint script here'","test":"mocha **/*.spec.js --exit","build":"npx -p typescript tsc ./index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --outDir types"},"_npmUser":{"name":"6edesign","email":"jon@6eDesign.net"},"_resolved":"/tmp/9184a9fa43f1dc5d82287d1af606e73d/6edesign-data-circuits-0.0.8.tgz","_integrity":"sha512-rZqTOr+fHF5/dzBqbDxUBX3zepHLF+Mr7kYnLVxYKpDiB5PUfml9Il+LhdnVFT2AuNbHPEbMkzrRxfWqlqmKgQ==","_npmVersion":"10.9.3","directories":{},"_nodeVersion":"22.18.0","dependencies":{"zod":"^3.22.4","axios":"^1.6.5","express":"^4.18.2","ioredis":"^5.4.1","redlock":"^5.0.0-beta.2","millisecond":"^0.1.2"},"eslintConfig":{"extends":["@6edesign/eslint-config/library.js"]},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","sinon":"^18.0.0","supertest":"^6.3.4","ioredis-mock":"^8.9.0","@6edesign/eslint-config":"^0.2.5"},"_npmOperationalInternal":{"tmp":"tmp/data-circuits_0.0.8_1756684934030_0.09947567769873222","host":"s3://npm-registry-packages-npm-production"}},"0.0.9":{"name":"@6edesign/data-circuits","version":"0.0.9","_id":"@6edesign/data-circuits@0.0.9","maintainers":[{"name":"6edesign","email":"jon@6eDesign.net"}],"dist":{"shasum":"8f08de8b4d1892093b91e07b195f714758a0f6aa","tarball":"https://registry.npmjs.org/@6edesign/data-circuits/-/data-circuits-0.0.9.tgz","fileCount":23,"integrity":"sha512-s6qdhXCc29cJHh8HatC9CGYaM+sw+OWbxb4SoBFf9Vq4EqDl6rrBE863KEmCjt+AF8lS6pJsQDi/HWo46l5KRQ==","signatures":[{"sig":"MEQCIFx/d6AYGuQzYUjrpJ8YOmNBY2VgcedPxaeC5zGiYjhmAiB6rxZkaSymIGZdaHIsqt6uF3UZOa3/cPP6HCRSM8+AqQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56095},"main":"index.js","type":"module","_from":"file:6edesign-data-circuits-0.0.9.tgz","types":"types/index.d.ts","exports":{".":{"import":"./index.js"},"./circuit":{"import":"./lib/circuits.js"}},"scripts":{"lint":"echo 'Add lint script here'","test":"mocha **/*.spec.js --exit","build":"npx -p typescript tsc ./index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --outDir types"},"_npmUser":{"name":"6edesign","email":"jon@6eDesign.net"},"_resolved":"/tmp/a28846265500a4d8f2ccf225d2620f7d/6edesign-data-circuits-0.0.9.tgz","_integrity":"sha512-s6qdhXCc29cJHh8HatC9CGYaM+sw+OWbxb4SoBFf9Vq4EqDl6rrBE863KEmCjt+AF8lS6pJsQDi/HWo46l5KRQ==","_npmVersion":"10.9.3","directories":{},"_nodeVersion":"22.19.0","dependencies":{"zod":"^3.22.4","axios":"^1.6.5","express":"^4.18.2","ioredis":"^5.4.1","redlock":"^5.0.0-beta.2","millisecond":"^0.1.2"},"eslintConfig":{"extends":["@6edesign/eslint-config/library.js"]},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","sinon":"^18.0.0","supertest":"^6.3.4","ioredis-mock":"^8.9.0","@6edesign/eslint-config":"^0.2.5"},"_npmOperationalInternal":{"tmp":"tmp/data-circuits_0.0.9_1757482674623_0.9529793168320644","host":"s3://npm-registry-packages-npm-production"}},"0.0.10":{"name":"@6edesign/data-circuits","version":"0.0.10","type":"module","types":"types/index.d.ts","main":"index.js","exports":{".":{"import":"./index.js","types":"./types/index.d.ts"},"./circuit":{"import":"./lib/circuits.js","types":"./types/lib/circuits.d.ts"}},"publishConfig":{"access":"public"},"devDependencies":{"@6edesign/eslint-config":"^0.2.5","ioredis-mock":"^8.9.0","mocha":"^10.2.0","sinon":"^18.0.0","supertest":"^6.3.4"},"dependencies":{"axios":"^1.6.5","express":"^4.18.2","ioredis":"^5.4.1","millisecond":"^0.1.2","redlock":"^5.0.0-beta.2","zod":"^3.22.4"},"eslintConfig":{"extends":["@6edesign/eslint-config/library.js"]},"scripts":{"build":"npx -p typescript tsc ./index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --outDir types","test":"mocha **/*.spec.js --exit","lint":"echo 'Add lint script here'"},"_id":"@6edesign/data-circuits@0.0.10","description":"This package provides a robust set of utilities for managing data flows, including powerful circuit breakers, flexible data persistence layers, and distributed promise pooling. It's designed to enhance the reliability and efficiency of data handling in di","_integrity":"sha512-jnQZF75NoIcbCFypjXcSwgWoP7718bpwIOe8nzCcgSG4XhDSZLXp5DuZmpNULdIHzGTSPsQJbTTlk20gDYHdCQ==","_resolved":"/tmp/5076d62976f06fbb36f233136b5d93ca/6edesign-data-circuits-0.0.10.tgz","_from":"file:6edesign-data-circuits-0.0.10.tgz","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-jnQZF75NoIcbCFypjXcSwgWoP7718bpwIOe8nzCcgSG4XhDSZLXp5DuZmpNULdIHzGTSPsQJbTTlk20gDYHdCQ==","shasum":"5a60e327a973c916fb6aa4cc5a1ba30bba2337c3","tarball":"https://registry.npmjs.org/@6edesign/data-circuits/-/data-circuits-0.0.10.tgz","fileCount":24,"unpackedSize":66557,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDCd2igoE0sL5kTI8+6Jqi/sGXmk0ATaHixnV0YUiMb8gIgb/3N+9Z/U8d9MPb28aHxcC5l0WYLcl9+7KUNlK9oBLc="}]},"_npmUser":{"name":"6edesign","email":"jon@6eDesign.net"},"directories":{},"maintainers":[{"name":"6edesign","email":"jon@6eDesign.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/data-circuits_0.0.10_1757509211336_0.03958074014620294"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-17T06:53:07.088Z","modified":"2025-09-10T13:00:11.713Z","0.0.0":"2025-08-17T06:53:07.387Z","0.0.1":"2025-08-17T16:34:14.471Z","0.0.2":"2025-08-17T16:47:54.211Z","0.0.3":"2025-08-17T19:31:20.573Z","0.0.4":"2025-08-18T20:33:08.376Z","0.0.5":"2025-08-28T05:34:39.041Z","0.0.6":"2025-08-28T18:01:29.750Z","0.0.7":"2025-08-29T01:33:50.791Z","0.0.8":"2025-09-01T00:02:14.265Z","0.0.9":"2025-09-10T05:37:54.826Z","0.0.10":"2025-09-10T13:00:11.509Z"},"maintainers":[{"name":"6edesign","email":"jon@6eDesign.net"}],"readme":"# @6edesign/data-circuits\n\nThis package provides a robust set of utilities for managing data flows, including powerful circuit breakers, flexible data persistence layers, and distributed promise pooling. It's designed to enhance the reliability and efficiency of data handling in distributed systems.\n\n## Installation\n\n```bash\npnpm add @6edesign/data-circuits\n# or\nnpm install @6edesign/data-circuits\n# or\nyarn add @6edesign/data-circuits\n```\n\n## Usage\n\nThe `@6edesign/data-circuits` package offers different entry points optimized for various environments (Node.js and browser).\n\n### Node.js Usage\n\nFor Node.js environments, you can import the full functionality, including Redis-backed persistence and distributed promise pooling.\n\n```javascript\nimport {\n\tcreateCircuit,\n\tcreateAggregateCircuit,\n\tcreateRedisStore,\n\tgetDistributedPoolFactory\n} from '@6edesign/data-circuits';\n// ... rest of your Node.js code\n```\n\n### Browser Usage\n\nFor browser environments, use the dedicated `circuit` export which excludes Node.js-specific dependencies like Redis. The default store is in-memory.\n\n```javascript\nimport { createCircuit, createAggregateCircuit } from '@6edesign/data-circuits/circuit';\n// ... rest of your browser code\n```\n\n## Core Concepts\n\n### Circuits\n\nCircuits are the central abstraction for managing data. They encapsulate the logic for fetching, caching, refreshing, and subscribing to data.\n\n- **`createCircuit(options)`**: Creates a circuit for a single data entity.\n\n  - `options.name` (string, required): Unique name for the circuit.\n  - `options.getter` (() => Promise<T>, required): Function to fetch the data.\n  - `options.initialValue` (T, optional): Initial data value.\n  - `options.store` (PersistenceLayer<T>, optional): Custom storage. **Defaults to an in-memory store.**\n  - `options.bad` (number, optional): Time (ms) after which data is considered \"bad\" and re-fetched.\n  - `options.stale` (number, optional): Time (ms) after which data is \"stale\" but can be returned while refreshing.\n  - `options.staleOnError` (boolean, optional): Return stale data on getter errors.\n  - `options.staleOnRefresh` (boolean, optional): Return stale data immediately on refresh.\n  - `options.equalityChecker` ((a, b) => boolean, optional): Function to compare data for changes.\n  - `options.setter` ((val) => Promise<T>, optional): Transform value before setting.\n  - `options.poolCreator` (PoolCreator, optional): Custom promise pool creator.\n  - `options.poolTimeout` (number, optional): Timeout for pool operations.\n  - `options.live` (boolean, optional): Subscribe to cache stream for real-time updates (requires a store that supports streaming, like `createRedisStore`).\n\n  **Circuit Instance Methods:**\n\n  - `get()`: Retrieves the data, fetching if necessary.\n  - `set(value)`: Sets the circuit's data.\n  - `refresh()`: Forces a data refresh.\n  - `subscribe(callback)`: Subscribes to data changes. Returns an unsubscribe function.\n  - `on(eventName, callback)`: Subscribes to internal circuit events (`\"active\"`, `\"inactive\"`).\n\n- **`createAggregateCircuit(options)`**: Creates a circuit that derives its data from multiple other circuits.\n  - `options.name` (string, required): Unique name for the aggregate circuit.\n  - `options.sources` (Record<string, Circuit>, required): An object of source circuits.\n  - `options.deriver` ((sources) => Promise<T>, required): Function to combine data from sources.\n  - Inherits other options and methods from `createCircuit`.\n\n### Persistence Layers\n\nCircuits can use various storage mechanisms by implementing the `PersistenceLayer` interface.\n\n- **In-Memory Store (Default)**: By default, `createCircuit` uses an in-memory store. This is suitable for client-side applications or simple server-side caching where persistence across restarts is not required.\n\n  ```javascript\n  import { createCircuit } from '@6edesign/data-circuits'; // Or from '@6edesign/data-circuits/circuit' for browser\n\n  const userCircuit = createCircuit({\n  \tname: 'userProfile',\n  \tgetter: async () => {\n  \t\tconsole.log('Fetching user data...');\n  \t\treturn new Promise((resolve) => setTimeout(() => resolve({ id: 1, name: 'Alice' }), 500));\n  \t},\n  \tstale: 5000, // Data is stale after 5 seconds\n  \tbad: 10000 // Data is bad after 10 seconds\n  });\n\n  // Top-level await for demonstration purposes\n  console.log('First get:', await userCircuit.get()); // Fetches and uses in-memory cache\n  console.log('Second get (from cache):', await userCircuit.get()); // Returns from in-memory cache\n\n  await new Promise((resolve) => setTimeout(resolve, 6000)); // Wait for data to become stale\n  console.log('Third get (stale, refreshes in background):', await userCircuit.get());\n\n  await userCircuit.refresh(); // Force refresh\n  console.log('After forced refresh:', await userCircuit.get());\n\n  const unsubscribe = userCircuit.subscribe((data) => {\n  \tconsole.log('User data updated:', data);\n  });\n  await userCircuit.set({ id: 1, name: 'Bob' }); // Will trigger subscriber\n  unsubscribe();\n  ```\n\n- **Redis Store**: For Node.js environments, a Redis-backed store is available for persistent and distributed caching.\n\n  ```javascript\n  import { createCircuit, createRedisStore } from '@6edesign/data-circuits';\n  import Redis from 'ioredis';\n\n  const redisClient = new Redis(); // Connect to your Redis instance\n\n  const productCircuit = createCircuit({\n  \tname: 'productDetails',\n  \tgetter: async () => {\n  \t\tconsole.log('Fetching product data from external API...');\n  \t\treturn new Promise((resolve) =>\n  \t\t\tsetTimeout(() => resolve({ id: 101, name: 'Widget', price: 29.99 }), 700)\n  \t\t);\n  \t},\n  \tstore: createRedisStore({ redis: redisClient, namespace: 'app:cache' }),\n  \tstale: 10000, // 10 seconds\n  \tbad: 30000, // 30 seconds\n  \tlive: true // Enable real-time updates via Redis streams\n  });\n\n  // Top-level await for demonstration purposes\n  console.log('Product:', await productCircuit.get());\n  // In another process, if you set the same key in Redis, this circuit would update\n  ```\n\n- **Custom Store**: You can implement your own `PersistenceLayer` to integrate with other storage solutions (e.g., IndexedDB, local storage, other databases).\n\n  ```javascript\n  // Example: IndexedDB store using localforage (browser-only)\n  import localforage from 'localforage';\n\n  const createIndexedDBStore = () => {\n  \tconst store = localforage.createInstance({\n  \t\tname: 'data-circuits-indexeddb',\n  \t\tstoreName: 'circuits'\n  \t});\n\n  \treturn {\n  \t\tasync get(key) {\n  \t\t\tconst value = await store.getItem(key);\n  \t\t\treturn value ? JSON.parse(value) : undefined;\n  \t\t},\n  \t\tasync set(key, value) {\n  \t\t\tawait store.setItem(key, JSON.stringify(value));\n  \t\t},\n  \t\tasync delete(key) {\n  \t\t\tawait store.removeItem(key);\n  \t\t},\n  \t\t// For custom stores, 'on' and 'subscribe' methods might be no-ops or\n  \t\t// implement custom event/subscription logic if your store supports it.\n  \t\ton: () => () => {}, // No-op for this example\n  \t\tsubscribe: () => () => {} // No-op for this example\n  \t};\n  };\n\n  // Usage with a circuit\n  import { createCircuit } from '@6edesign/data-circuits/circuit'; // For browser usage\n\n  const browserDataCircuit = createCircuit({\n  \tname: 'browserSettings',\n  \tgetter: async () => {\n  \t\tconsole.log('Fetching browser settings...');\n  \t\treturn { theme: 'dark', notifications: true };\n  \t},\n  \tstore: createIndexedDBStore(),\n  \tstale: 60000\n  });\n\n  // Top-level await for demonstration purposes\n  console.log('Browser settings:', await browserDataCircuit.get());\n  ```\n\n### Concurrency and Distributed Promise Pooling\n\nIn distributed systems, multiple instances of your application might try to fetch the same data concurrently, leading to redundant work or race conditions. `data-circuits` provides a distributed promise pooling mechanism to coalesce these requests into a single invocation.\n\nThe `getDistributedPoolFactory` function returns a factory for creating distributed promise pools using Redis and Redlock. This pool can then be passed to a `createCircuit` instance via its `poolCreator` option, ensuring that the circuit's `getter` is executed only once across multiple application instances for a given data request.\n\n```javascript\nimport { createCircuit, getDistributedPoolFactory } from '@6edesign/data-circuits';\nimport Redis from 'ioredis';\n\nconst redisClient = new Redis(); // Connect to your Redis instance\nconst createDistributedPool = getDistributedPoolFactory(redisClient);\n\nasync function fetchExpensiveData(id) {\n\tconsole.log(`[${process.pid}] Fetching expensive data for ID: ${id}...`);\n\t// Simulate a network call or heavy computation\n\treturn new Promise((resolve) =>\n\t\tsetTimeout(() => resolve(`Data for ${id} from PID ${process.pid}`), 1000)\n\t);\n}\n\nconst expensiveDataCircuit = createCircuit({\n\tname: 'expensiveData',\n\tgetter: () => fetchExpensiveData('some-unique-key'), // The getter function\n\tpoolCreator: createDistributedPool, // Use the distributed pool factory\n\tpoolTimeout: 5000 // Timeout for acquiring lock and Redis operations\n});\n\n// Top-level await for demonstration purposes\nconsole.log(`[${process.pid}] Requesting expensive data...`);\n// If multiple processes call expensiveDataCircuit.get() concurrently,\n// only one will actually execute fetchExpensiveData, others will wait for the result via Redis.\nconst result = await expensiveDataCircuit.get();\nconsole.log(`[${process.pid}] Received: ${result}`);\n```\n\n**How it works:**\nWhen `expensiveDataCircuit.get()` is called:\n\n1.  The circuit's `poolCreator` (which is `createDistributedPool` in this case) is invoked.\n2.  It attempts to acquire a distributed lock using Redlock for the circuit's `getter` execution.\n3.  If the lock is acquired, it means this instance is the \"leader\" for this operation. It executes the `fetchExpensiveData` function (the circuit's getter).\n4.  Once `fetchExpensiveData` completes, the result is published to a Redis stream.\n5.  The lock is released.\n6.  If the lock cannot be acquired (another instance is already the leader), this instance subscribes to the Redis stream and waits for the result to be published by the leader.\n    This mechanism effectively coalesces multiple concurrent requests for the same data into a single execution, reducing load on external services and ensuring data consistency across distributed instances.\n","readmeFilename":"README.md","description":"This package provides a robust set of utilities for managing data flows, including powerful circuit breakers, flexible data persistence layers, and distributed promise pooling. It's designed to enhance the reliability and efficiency of data handling in di"}