{"_id":"sock-daemon","_rev":"10-be5368898bd217cf422ea6b944d244d5","name":"sock-daemon","dist-tags":{"latest":"1.4.2"},"versions":{"1.0.0":{"name":"sock-daemon","version":"1.0.0","license":"BlueOak-1.0.0","dependencies":{"mkdirp":"^3.0.1","signal-exit":"^4.1.0","socket-post-message":"^1.0.3"},"devDependencies":{"@types/node":"^20.8.7","prettier":"^2.8.8","rimraf":"^5.0.5","tap":"^18.5.2","tshy":"^1.6.0","typedoc":"^0.25.2"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"selfLink":false,"exports":{"./package.json":"./package.json"}},"exports":{"./package.json":"./package.json"},"type":"module","scripts":{"prepare":"tshy","presnap":"npm run prepare","pretest":"npm run prepare","snap":"tap","test":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write . --loglevel warn --cache","typedoc":"typedoc"},"tap":{"coverage-map":"./map.js","before":"./test/before.ts"},"_id":"sock-daemon@1.0.0","gitHead":"8d3e14c14ad9781d4ae8de514ff69d7f4ef85da0","description":"A utility for creating a daemon process that listens on a socket, and a client that talks to it.","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-+77j6yYSeAqZ7niE+2w+PVpeO3oWSbfLYqC9CH0TNIZbsyysuHk/OfbHLH14u8syug/aQkl67V3vqR+bELBFLg==","shasum":"b5e01bc1101aaf2cfd5327307d0d988b6882a5ce","tarball":"https://registry.npmjs.org/sock-daemon/-/sock-daemon-1.0.0.tgz","fileCount":45,"unpackedSize":138320,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4Jlu/iXhfveJB/UbGsQVd/hg7s1dwjtIhxmsgbmYAwAIhAKSyKQ5rNrrdCJow5QtH2GaXTA1qCIW3zF/4rRhLoqmI"}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sock-daemon_1.0.0_1698321130863_0.09783096760884824"},"_hasShrinkwrap":false},"1.0.1":{"name":"sock-daemon","version":"1.0.1","license":"BlueOak-1.0.0","dependencies":{"mkdirp":"^3.0.1","signal-exit":"^4.1.0","socket-post-message":"^1.0.3"},"devDependencies":{"@types/node":"^20.8.7","prettier":"^2.8.8","rimraf":"^5.0.5","tap":"^18.5.2","tshy":"^1.6.0","typedoc":"^0.25.2"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"selfLink":false,"exports":{".":"./src/index.ts","./package.json":"./package.json","./client":"./src/client.ts","./server":"./src/server.ts"}},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json","./client":{"import":{"types":"./dist/esm/client.d.ts","default":"./dist/esm/client.js"},"require":{"types":"./dist/commonjs/client.d.ts","default":"./dist/commonjs/client.js"}},"./server":{"import":{"types":"./dist/esm/server.d.ts","default":"./dist/esm/server.js"},"require":{"types":"./dist/commonjs/server.d.ts","default":"./dist/commonjs/server.js"}}},"type":"module","scripts":{"prepare":"tshy","presnap":"npm run prepare","pretest":"npm run prepare","snap":"tap","test":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write . --loglevel warn --cache","typedoc":"typedoc"},"tap":{"coverage-map":"./map.js","before":"./test/before.ts"},"main":"./dist/commonjs/index.js","types":"./dist/commonjs/index.d.ts","_id":"sock-daemon@1.0.1","gitHead":"4878ef0269b46d2a4e35ee6233ae3ac93dc7d461","description":"A utility for creating a daemon process that listens on a socket, and a client that talks to it.","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-1GGhPpwuNbEecrCHU8cJ1ZoTa/psN5JHrdB7QtS1sB4yOd70YGX//segO6BEOeivWp4gAxKSBfbUFUGbbsYPxQ==","shasum":"f97d13dbef87ab2e3d141c1572f967fb4b3f42b8","tarball":"https://registry.npmjs.org/sock-daemon/-/sock-daemon-1.0.1.tgz","fileCount":45,"unpackedSize":139268,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkKF4IkqO8N49+mHmwuVlHC2jJilT7c+8u3+CMyL/K4gIhAPWO7NGDORe87zHtJWa8mv4/7pLGnnVQZBxInSKsIB+x"}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sock-daemon_1.0.1_1698373928936_0.4398365405970892"},"_hasShrinkwrap":false},"1.0.2":{"name":"sock-daemon","version":"1.0.2","license":"BlueOak-1.0.0","dependencies":{"mkdirp":"^3.0.1","signal-exit":"^4.1.0","socket-post-message":"^1.0.3"},"devDependencies":{"@types/node":"^20.8.7","prettier":"^2.8.8","rimraf":"^5.0.5","tap":"^18.5.2","tshy":"^1.6.0","typedoc":"^0.25.2"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"selfLink":false,"exports":{".":"./src/index.ts","./package.json":"./package.json","./client":"./src/client.ts","./server":"./src/server.ts"}},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json","./client":{"import":{"types":"./dist/esm/client.d.ts","default":"./dist/esm/client.js"},"require":{"types":"./dist/commonjs/client.d.ts","default":"./dist/commonjs/client.js"}},"./server":{"import":{"types":"./dist/esm/server.d.ts","default":"./dist/esm/server.js"},"require":{"types":"./dist/commonjs/server.d.ts","default":"./dist/commonjs/server.js"}}},"type":"module","scripts":{"prepare":"tshy","presnap":"npm run prepare","pretest":"npm run prepare","snap":"tap","test":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write . --loglevel warn --cache","typedoc":"typedoc"},"tap":{"coverage-map":"./map.js","before":"./test/before.ts"},"main":"./dist/commonjs/index.js","types":"./dist/commonjs/index.d.ts","_id":"sock-daemon@1.0.2","gitHead":"bca3949c9a4d8f24634f5195124657a59621443a","description":"A utility for creating a daemon process that listens on a socket, and a client that talks to it.","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-0aGs5W0+S2KeXzVjD+gHZBj77LWwmIyfLXJu+ztNRnkKsO+tCkQUsZFZaVEMFq/RG8ewgXauyolPV+uJQMzarQ==","shasum":"f6af60556aa7dddc721127e92e66d6a7f534aaab","tarball":"https://registry.npmjs.org/sock-daemon/-/sock-daemon-1.0.2.tgz","fileCount":45,"unpackedSize":139390,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHWsQ3P/+RR8DFbUqbc+904grfH5QFwmT+7mxS3i+LnkAiEAiBuW/vOjZEnt29fHN/7rj3QxZyqU3bJ7sd8rjYRpnaU="}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sock-daemon_1.0.2_1698375423793_0.5907520087525808"},"_hasShrinkwrap":false},"1.1.0":{"name":"sock-daemon","version":"1.1.0","license":"BlueOak-1.0.0","dependencies":{"mkdirp":"^3.0.1","signal-exit":"^4.1.0","socket-post-message":"^1.0.3"},"devDependencies":{"@types/node":"^20.8.7","prettier":"^2.8.8","rimraf":"^5.0.5","tap":"^18.5.2","tshy":"^1.6.0","typedoc":"^0.25.2"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"selfLink":false,"exports":{".":"./src/index.ts","./package.json":"./package.json","./client":"./src/client.ts","./server":"./src/server.ts"}},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json","./client":{"import":{"types":"./dist/esm/client.d.ts","default":"./dist/esm/client.js"},"require":{"types":"./dist/commonjs/client.d.ts","default":"./dist/commonjs/client.js"}},"./server":{"import":{"types":"./dist/esm/server.d.ts","default":"./dist/esm/server.js"},"require":{"types":"./dist/commonjs/server.d.ts","default":"./dist/commonjs/server.js"}}},"type":"module","scripts":{"prepare":"tshy","presnap":"npm run prepare","pretest":"npm run prepare","snap":"tap","test":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write . --loglevel warn --cache","typedoc":"typedoc"},"tap":{"coverage-map":"./map.js","before":"./test/before.ts"},"main":"./dist/commonjs/index.js","types":"./dist/commonjs/index.d.ts","_id":"sock-daemon@1.1.0","gitHead":"dc93990584441aef2bce9760801911f3322b81af","description":"A utility for creating a daemon process that listens on a socket, and a client that talks to it.","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-tqNH9Q9SM26ZCFwDxC3eeUk1ohTrOpmIAEIDQ4GwwAO1Xk7tCDokqof43nWwgssDvOn8JEdf5n2Rdkrv4XmHtw==","shasum":"d9df48bee5dfb9632943f7d6cf4e1811ac42395c","tarball":"https://registry.npmjs.org/sock-daemon/-/sock-daemon-1.1.0.tgz","fileCount":45,"unpackedSize":161144,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEb29cYCzvxCc61x7VUQ+niL/Bec1bBSrQHPSYCBmPpwAiBzEM2JJJ4TtTHisMUa4lzFCBpG6tmm1qY6Dh2digS+CQ=="}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sock-daemon_1.1.0_1698434950726_0.3746883436166786"},"_hasShrinkwrap":false},"1.1.1":{"name":"sock-daemon","version":"1.1.1","license":"BlueOak-1.0.0","dependencies":{"mkdirp":"^3.0.1","signal-exit":"^4.1.0","socket-post-message":"^1.0.3"},"devDependencies":{"@types/node":"^20.8.7","prettier":"^2.8.8","rimraf":"^5.0.5","tap":"^18.5.2","tshy":"^1.6.0","typedoc":"^0.25.2"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"selfLink":false,"exports":{".":"./src/index.ts","./package.json":"./package.json","./client":"./src/client.ts","./server":"./src/server.ts"}},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json","./client":{"import":{"types":"./dist/esm/client.d.ts","default":"./dist/esm/client.js"},"require":{"types":"./dist/commonjs/client.d.ts","default":"./dist/commonjs/client.js"}},"./server":{"import":{"types":"./dist/esm/server.d.ts","default":"./dist/esm/server.js"},"require":{"types":"./dist/commonjs/server.d.ts","default":"./dist/commonjs/server.js"}}},"type":"module","scripts":{"prepare":"tshy","presnap":"npm run prepare","pretest":"npm run prepare","snap":"tap","test":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write . --loglevel warn --cache","typedoc":"typedoc"},"tap":{"coverage-map":"./map.js","before":"./test/before.ts"},"main":"./dist/commonjs/index.js","types":"./dist/commonjs/index.d.ts","_id":"sock-daemon@1.1.1","gitHead":"96f1c3c3d9cf06a8510954f6619e92c2c49d9dc2","description":"A utility for creating a daemon process that listens on a socket, and a client that talks to it.","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-O5EPG5DIqyuKRZrUPldNDFuWsW4wQ3t8gbWCXc64DkqV7UtpF2Qj+b8FAQnnEHsl97a5DEhB7hK6K3678yt0eg==","shasum":"8cecfe20e38c9ab746b57c0d66e3e6e118c59e81","tarball":"https://registry.npmjs.org/sock-daemon/-/sock-daemon-1.1.1.tgz","fileCount":45,"unpackedSize":163182,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQZ1TmqK1sPYcpkqMqJzIfpFCQ0s4hDG7KwEEBubtPDAIgaSsjvYBxDg8roIeXNRdG4PDavS+R4+SWjYPehf0AfXM="}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sock-daemon_1.1.1_1698535190358_0.6558314468691742"},"_hasShrinkwrap":false},"1.2.0":{"name":"sock-daemon","version":"1.2.0","license":"BlueOak-1.0.0","dependencies":{"mkdirp":"^3.0.1","signal-exit":"^4.1.0","socket-post-message":"^1.0.3"},"devDependencies":{"@types/node":"^20.8.7","prettier":"^2.8.8","rimraf":"^5.0.5","tap":"^18.5.2","tshy":"^1.6.0","typedoc":"^0.25.2"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"selfLink":false,"exports":{".":"./src/index.ts","./package.json":"./package.json","./client":"./src/client.ts","./server":"./src/server.ts"}},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json","./client":{"import":{"types":"./dist/esm/client.d.ts","default":"./dist/esm/client.js"},"require":{"types":"./dist/commonjs/client.d.ts","default":"./dist/commonjs/client.js"}},"./server":{"import":{"types":"./dist/esm/server.d.ts","default":"./dist/esm/server.js"},"require":{"types":"./dist/commonjs/server.d.ts","default":"./dist/commonjs/server.js"}}},"type":"module","scripts":{"prepare":"tshy","presnap":"npm run prepare","pretest":"npm run prepare","snap":"tap","test":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write . --loglevel warn --cache","typedoc":"typedoc"},"tap":{"coverage-map":"./map.js","before":"./test/before.ts"},"main":"./dist/commonjs/index.js","types":"./dist/commonjs/index.d.ts","_id":"sock-daemon@1.2.0","gitHead":"292a4fef07476d011d5f4c799285ec53c2294d2d","description":"A utility for creating a daemon process that listens on a socket, and a client that talks to it.","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-4MowafEHFyKpNOf9kJJ9wBLPm5I8qEtMOErSJO4ismypvOTEUMGjF8KXEVTg8MzR07he/kPx19nMz9SS5oNR6Q==","shasum":"9bd98e2d03ff5d343513e80278a1a942955288fb","tarball":"https://registry.npmjs.org/sock-daemon/-/sock-daemon-1.2.0.tgz","fileCount":45,"unpackedSize":164838,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWRgTqXsKN9AsKtTWReCIsFeIHVXt2hFpGZZDRBeb8HgIhAOidSoym4YEvXZBbXhT+RnMp/h9lifPUzSEvCI3X7Huy"}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sock-daemon_1.2.0_1698687219627_0.08375771749184913"},"_hasShrinkwrap":false},"1.3.0":{"name":"sock-daemon","version":"1.3.0","license":"BlueOak-1.0.0","dependencies":{"mkdirp":"^3.0.1","signal-exit":"^4.1.0","socket-post-message":"^1.0.3"},"devDependencies":{"@types/node":"^20.8.7","prettier":"^2.8.8","rimraf":"^5.0.5","tap":"^18.5.2","tshy":"^1.6.0","typedoc":"^0.25.2"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"selfLink":false,"exports":{".":"./src/index.ts","./package.json":"./package.json","./client":"./src/client.ts","./server":"./src/server.ts"}},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json","./client":{"import":{"types":"./dist/esm/client.d.ts","default":"./dist/esm/client.js"},"require":{"types":"./dist/commonjs/client.d.ts","default":"./dist/commonjs/client.js"}},"./server":{"import":{"types":"./dist/esm/server.d.ts","default":"./dist/esm/server.js"},"require":{"types":"./dist/commonjs/server.d.ts","default":"./dist/commonjs/server.js"}}},"type":"module","scripts":{"prepare":"tshy","presnap":"npm run prepare","pretest":"npm run prepare","snap":"tap","test":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write . --loglevel warn --cache","typedoc":"typedoc"},"tap":{"coverage-map":"./map.js","before":"./test/before.ts"},"main":"./dist/commonjs/index.js","types":"./dist/commonjs/index.d.ts","_id":"sock-daemon@1.3.0","gitHead":"1cbc3d6d13dd9862755dbc4b89624805366c6e24","description":"A utility for creating a daemon process that listens on a socket, and a client that talks to it.","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-ekCMJXlB6V2/rIzd8sjwe3uh+sFbiLD/q3DFRCZC8kkE6De8qHrL1uNns2hliCptANDCJhGHv3cowtI6D6JUjA==","shasum":"e9cdd272be79fe1be06a6ea86c9b5bbb92804186","tarball":"https://registry.npmjs.org/sock-daemon/-/sock-daemon-1.3.0.tgz","fileCount":45,"unpackedSize":168441,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAQzU6qG8/sPpw3u48gIZljJ66fdOv2usWtlKhAZ08spAiEAwmMD4FkZ6grSUyRzn3D/BIciBwDIHhJK1XUcUS1bU5E="}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sock-daemon_1.3.0_1698689369595_0.8861408920600093"},"_hasShrinkwrap":false},"1.3.1":{"name":"sock-daemon","version":"1.3.1","license":"BlueOak-1.0.0","dependencies":{"mkdirp":"^3.0.1","signal-exit":"^4.1.0","socket-post-message":"^1.0.3"},"devDependencies":{"@types/node":"^20.8.7","prettier":"^2.8.8","rimraf":"^5.0.5","tap":"^18.5.3","tshy":"^1.6.0","typedoc":"^0.25.2"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"selfLink":false,"exports":{".":"./src/index.ts","./package.json":"./package.json","./client":"./src/client.ts","./server":"./src/server.ts"}},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json","./client":{"import":{"types":"./dist/esm/client.d.ts","default":"./dist/esm/client.js"},"require":{"types":"./dist/commonjs/client.d.ts","default":"./dist/commonjs/client.js"}},"./server":{"import":{"types":"./dist/esm/server.d.ts","default":"./dist/esm/server.js"},"require":{"types":"./dist/commonjs/server.d.ts","default":"./dist/commonjs/server.js"}}},"type":"module","scripts":{"prepare":"tshy","presnap":"npm run prepare","pretest":"npm run prepare","snap":"tap","test":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write . --loglevel warn --cache","typedoc":"typedoc"},"tap":{"coverage-map":"./map.js","before":"./test/before.ts"},"main":"./dist/commonjs/index.js","types":"./dist/commonjs/index.d.ts","_id":"sock-daemon@1.3.1","gitHead":"0b0ea1d7a2dadda766192d6719d5a7917201a7dc","description":"A utility for creating a daemon process that listens on a socket, and a client that talks to it.","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-AO/sKR/3B5d0dJ3Ir2ZbFyGINi0RIO1yvdfPS1bp4JdAy2yRLg1JSk90MeLIoAKi/TGp3cUpqDoLBi1JZS9+SA==","shasum":"0d8c180cf06e5d94683cfe69ccb4578b4f0826ee","tarball":"https://registry.npmjs.org/sock-daemon/-/sock-daemon-1.3.1.tgz","fileCount":45,"unpackedSize":184770,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOodNJ1rigRJQyXLivtLPTiziFTLkMPbc4xmGyx7X2DAIhAN4m4a2HnQ95tNuQ+wVkHbw8XAFCze+UEed538JQLNEE"}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sock-daemon_1.3.1_1699415910129_0.052821953093383334"},"_hasShrinkwrap":false},"1.4.0":{"name":"sock-daemon","version":"1.4.0","license":"BlueOak-1.0.0","dependencies":{"mkdirp":"^3.0.1","signal-exit":"^4.1.0","socket-post-message":"^1.0.3"},"devDependencies":{"@types/node":"^20.8.7","prettier":"^2.8.8","rimraf":"^5.0.5","tap":"^18.6.1","tshy":"^1.6.0","typedoc":"^0.25.2"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"selfLink":false,"exports":{".":"./src/index.ts","./package.json":"./package.json","./client":"./src/client.ts","./server":"./src/server.ts"}},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json","./client":{"import":{"types":"./dist/esm/client.d.ts","default":"./dist/esm/client.js"},"require":{"types":"./dist/commonjs/client.d.ts","default":"./dist/commonjs/client.js"}},"./server":{"import":{"types":"./dist/esm/server.d.ts","default":"./dist/esm/server.js"},"require":{"types":"./dist/commonjs/server.d.ts","default":"./dist/commonjs/server.js"}}},"type":"module","scripts":{"prepare":"tshy","presnap":"npm run prepare","pretest":"npm run prepare","snap":"tap","test":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write . --loglevel warn --cache","typedoc":"typedoc"},"tap":{"coverage-map":"./map.js","before":"./test/before.ts"},"main":"./dist/commonjs/index.js","types":"./dist/commonjs/index.d.ts","_id":"sock-daemon@1.4.0","gitHead":"d2de5d999e4934e51f5f6ad18ba7ef40433b8427","description":"A utility for creating a daemon process that listens on a socket, and a client that talks to it.","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-42hn6w/6oHJ6/4gHLbjy0LqEuMoNg751bZl3ocKajsS0wZ69u6fjJmLSW/4clWNW6JD1waWACTk+ucXohNM6ZQ==","shasum":"39eddf1367f7d4a2e343eb59ec1c3620e08ef3d9","tarball":"https://registry.npmjs.org/sock-daemon/-/sock-daemon-1.4.0.tgz","fileCount":53,"unpackedSize":206045,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHnF2q8h8nr5IwtK40L3oZQVLaekl2baCYZJWeHjxt5xAiA4l+kP+bDh3eYmj4wN501UuxqUoqoAuNI4f8qXrSO+WQ=="}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sock-daemon_1.4.0_1701144206104_0.02826760585196042"},"_hasShrinkwrap":false},"1.4.1":{"name":"sock-daemon","version":"1.4.1","license":"BlueOak-1.0.0","dependencies":{"mkdirp":"^3.0.1","rimraf":"^5.0.5","signal-exit":"^4.1.0","socket-post-message":"^1.0.3"},"devDependencies":{"@types/node":"^20.8.7","prettier":"^2.8.8","tap":"^18.6.1","tshy":"^1.6.0","typedoc":"^0.25.2"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"selfLink":false,"exports":{".":"./src/index.ts","./package.json":"./package.json","./client":"./src/client.ts","./server":"./src/server.ts"}},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json","./client":{"import":{"types":"./dist/esm/client.d.ts","default":"./dist/esm/client.js"},"require":{"types":"./dist/commonjs/client.d.ts","default":"./dist/commonjs/client.js"}},"./server":{"import":{"types":"./dist/esm/server.d.ts","default":"./dist/esm/server.js"},"require":{"types":"./dist/commonjs/server.d.ts","default":"./dist/commonjs/server.js"}}},"type":"module","scripts":{"prepare":"tshy","presnap":"npm run prepare","pretest":"npm run prepare","snap":"tap","test":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write . --loglevel warn --cache","typedoc":"typedoc"},"tap":{"coverage-map":"./map.js","before":"./test/before.ts"},"main":"./dist/commonjs/index.js","types":"./dist/commonjs/index.d.ts","_id":"sock-daemon@1.4.1","gitHead":"d0b907d0fde085377a7b2c47eb96201a91ef97c4","description":"A utility for creating a daemon process that listens on a socket, and a client that talks to it.","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-KaiK8hLNEMKydOsdveudcruwzps/j83v4C1JQ58Bs8skIiMe1pAYSqHcNoxmU1McIaPTRIrhskB7g+TuzLzfjg==","shasum":"0cc21555d4b71b639f4267115351d3cd609e1f4a","tarball":"https://registry.npmjs.org/sock-daemon/-/sock-daemon-1.4.1.tgz","fileCount":53,"unpackedSize":206045,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCo2XJ2Rr/6fgP7su41MYj+659+w8bwSxgCghmg1Pn3UgIgCQ2F02/qKJvf/NyVCgVlfO55wDqslJ9VzZEhGU+BElU="}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sock-daemon_1.4.1_1701185720296_0.3478150889763445"},"_hasShrinkwrap":false},"1.4.2":{"name":"sock-daemon","version":"1.4.2","license":"BlueOak-1.0.0","dependencies":{"rimraf":"^5.0.5","signal-exit":"^4.1.0","socket-post-message":"^1.0.3"},"devDependencies":{"@types/node":"^20.8.7","prettier":"^2.8.8","tap":"^18.6.1","tshy":"^1.6.0","typedoc":"^0.25.2"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"selfLink":false,"exports":{".":"./src/index.ts","./package.json":"./package.json","./client":"./src/client.ts","./server":"./src/server.ts"}},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json","./client":{"import":{"types":"./dist/esm/client.d.ts","default":"./dist/esm/client.js"},"require":{"types":"./dist/commonjs/client.d.ts","default":"./dist/commonjs/client.js"}},"./server":{"import":{"types":"./dist/esm/server.d.ts","default":"./dist/esm/server.js"},"require":{"types":"./dist/commonjs/server.d.ts","default":"./dist/commonjs/server.js"}}},"type":"module","scripts":{"prepare":"tshy","presnap":"npm run prepare","pretest":"npm run prepare","snap":"tap","test":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write . --loglevel warn --cache","typedoc":"typedoc"},"tap":{"coverage-map":"./map.js","before":"./test/before.ts"},"main":"./dist/commonjs/index.js","types":"./dist/commonjs/index.d.ts","engines":{"node":"16 >=16.17.0 || 18 >= 18.6.0 || >=20"},"_id":"sock-daemon@1.4.2","gitHead":"4950e76ff31f58881291b8ef972aca95fc89b0e9","description":"A utility for creating a daemon process that listens on a socket, and a client that talks to it.","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-IzbegWshWWR+UzQ7487mbdYNmfJ1jXUXQBUHooqtpylO+aW0vMVbFN2d2ug3CSPZ0wbG7ZTTGwpUuthIDFIOGg==","shasum":"b9d5d1f8b156b20a7c1ceba095da8b8745fac405","tarball":"https://registry.npmjs.org/sock-daemon/-/sock-daemon-1.4.2.tgz","fileCount":53,"unpackedSize":206180,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC6U7yYHpYjKxCdyNQkHX5fgFUiXUrqciExQWR7ixyYhAiAo3rjbsQkxooQbNHr41H4QqdpxHzxT396pIjf3uHhDpg=="}]},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sock-daemon_1.4.2_1707175406611_0.6363352720854034"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-26T11:52:10.775Z","1.0.0":"2023-10-26T11:52:11.163Z","modified":"2024-02-05T23:23:26.990Z","1.0.1":"2023-10-27T02:32:09.261Z","1.0.2":"2023-10-27T02:57:04.030Z","1.1.0":"2023-10-27T19:29:11.017Z","1.1.1":"2023-10-28T23:19:50.578Z","1.2.0":"2023-10-30T17:33:39.782Z","1.3.0":"2023-10-30T18:09:29.779Z","1.3.1":"2023-11-08T03:58:30.279Z","1.4.0":"2023-11-28T04:03:26.275Z","1.4.1":"2023-11-28T15:35:20.478Z","1.4.2":"2024-02-05T23:23:26.792Z"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"description":"A utility for creating a daemon process that listens on a socket, and a client that talks to it.","license":"BlueOak-1.0.0","readme":"# sock-daemon\n\nA utility for creating a daemon process that listens on a socket,\nand a client that talks to it.\n\nHandles automatically starting the daemon service (but only one\nof them), logging to a file, and serializing messages over a\ndomain socket on unix systems or named pipe on Windows.\n\n<img src=\"https://raw.githubusercontent.com/isaacs/sock-daemon/main/sock-daemon.svg\" alt=\"two cartoon socks with devil tails and horns\" height=\"320\" width=\"320\">\n\n## USAGE\n\nInstall with npm\n\n```\nnpm install sock-daemon\n```\n\nThere are two parts of this, the daemon script that listens on a\nsocket, and the client that connects to it.\n\nThe daemon is smart enough to only instantiate a single copy of\nitself. The client knows how to connect to it, and knows how to\nspin up an instance of the daemon if it's not already running.\n\nTo do this, the server daemon and the client need to both know\nthe name that they'll use for the socket, and the client needs to\nknow the location of the daemon script.\n\nThe type stuff is clearly only required when you are using\nTypeScript, but it is a nice check to ensure that the server and\nclient are speaking the same language.\n\nFor example, you can create a service like this, defining a\nclient and server implementation:\n\n```ts\n// index.mjs\nimport {\n  SockDaemonServer as Server,\n  SockDaemonClient as Client,\n} from 'sock-daemon'\nimport type { MessageBase } from 'sock-daemon'\n\nexport const serviceName = 'my-service'\n\n// This must be an object that extends MessageBase\nexport interface Request extends MessageBase {\n  // put your application specific types here for requests\n  foo: string\n}\n\nexport interface Response extends MessageBase {\n  // put your application specific types here for responses\n  bar: string\n}\n\n// create my application specific server to handle requests\nexport class MyServiceServer extends Server<Request, Response> {\n  // check here to ensure that the request is valid\n  // anything that fails this will be logged and\n  isRequest(msg: any): msg is Request {\n    return super.isMessage(msg) && typeof msg.foo === 'string'\n  }\n\n  // must override this static property to set the service name\n  // the socket, pidFile, and log will be found in\n  // .{service-name}/daemon/... in the current working dir\n  static get serviceName() {\n    return serviceName\n  }\n\n  // get a request, return a response.\n  // must return either Response or Promise<Response>\n  async handle(msg: Request) {\n    // stderr will be written to ./.my-service/daemon/log when\n    // spawned automatically by the client.\n    console.error('got request', msg)\n    // must return a response with the same ID we got in the\n    // request, to handle replayed or out of order messages\n    return {\n      id: msg.id,\n      bar: 'bar: ' + msg.foo,\n    }\n  }\n}\n\nexport class MyServiceClient extends Client<Request, Response> {\n  // this must match what's defined in the daemon server\n  static get serviceName() {\n    return serviceName\n  }\n\n  // the path to the node script that starts the daemon\n  // either a URL or a file path.\n  static get daemonScript() {\n    return new URL('./daemon.mjs', import.meta.url)\n  }\n\n  // optional, validate that a response is valid\n  // if this returns false, the request promise will reject\n  isResponse(msg: any): msg is Response {\n    return super.isMessage(msg) && typeof msg.bar === 'string'\n  }\n\n  // define whatever methods you like here, but they all need to\n  // eventually call super.request() to send the actual request.\n  // the argument to super.request() MUST NOT include an id, that\n  // is managed by the SockDaemonClient base class.\n  async fooIntoBar(foo: string) {\n    const { bar } = await super.request({ foo })\n    return bar\n  }\n}\n```\n\nCreate the `daemon.mjs` script like this:\n\n```ts\nimport { MyServiceServer } from './index.mjs'\n\n// instantiate the server daemon. Options are optional,\n// shown here with their default values.\nconst server = new MyServiceServer({\n  // how long in ms should the daemon stick around if it hasn't\n  // seen any requests? Defaults to 1 hour\n  idleTimeout: 1000 * 60 * 60,\n\n  // how long should a connection be allowed to persist, if it\n  // has not made any requests? Defaults to 1 second\n  connectionTimeout: 1000,\n})\n\nserver.listen()\n```\n\nAnd then using the client in a program somewhere:\n\n```ts\nimport { MyServiceClient as Client } from 'my-service'\n\nconst client = new Client()\n// starts the daemon, if it's not already running\nconst result = await client.fooIntoBar('input string')\n// returns: \"bar: input string\"\n```\n\n## API\n\nSee the above example for most of it, or look at the\n[typedocs](https://isaacs.github.io/sock-daemon)\n\n## Caveats\n\n- Note that your Daemon and Client classes need to override the\n  static `serviceName` getter to a matching value, and the Client\n  needs to override the static `daemonScript` to a reference to\n  the node program that will run the service.\n- The `daemonScript` will be passed to node with the\n  `process.execArgv` provided to the main client program, but no\n  other arguments.\n- This will work best if your messages can be as small as\n  possible, to save on serialization costs. If you have to do\n  some large amount of work, it's often faster to write the\n  result to a file, and have the `Response` report the filename.\n- To my knowledge, this module is not responsible for anyone's\n  [missing socks](https://en.uncyclopedia.co/wiki/Sock_demon),\n  but please post an issue if you find this is not the case.\n","readmeFilename":"README.md"}