{"_id":"@bitfinex/bfx-facs-base","_rev":"2-4e3233cd38c7bcd05e763d81dd496bcd","name":"@bitfinex/bfx-facs-base","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@bitfinex/bfx-facs-base","version":"1.0.0","keywords":["bitfinex"],"author":{"name":"prdn","email":"paolo@bitfinex.com"},"license":"Apache-2.0","_id":"@bitfinex/bfx-facs-base@1.0.0","maintainers":[{"name":"vigan-abd","email":"vigan.abd@gmail.com"},{"name":"bitfinexorg","email":"paolo@bitfinex.com"},{"name":"prdn","email":"paolo.ardoino@gmail.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/bitfinexcom/bfx-facs-base","bugs":{"url":"https://github.com/bitfinexcom/bfx-facs-base/issues"},"dist":{"shasum":"45836b69b56882688a0a7d92691fe0a86e54e7e9","tarball":"https://registry.npmjs.org/@bitfinex/bfx-facs-base/-/bfx-facs-base-1.0.0.tgz","fileCount":5,"integrity":"sha512-ZsgvUAP+OoDxRij6waSYjLUtY33R0R1y1Z4LJ66nR0qieMtuCSBxo8ntUMNj/gaR+XAbnVtbxtooj0ai3BraOQ==","signatures":[{"sig":"MEUCIQCG1D9BzOTPSxa9jYUXmBeR8P4bKclEbDd7v2vboc4Q/wIgb8euao/HsVi/2As77xpw4NgN1Fik+HAElpbdkCor4G4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15442},"main":"base.js","engines":{"node":">=16.0"},"gitHead":"c42f4dfeab9c759a9c7ec7177ab7af6b53279e94","private":false,"scripts":{"lint":"standard","lint:fix":"standard --fix"},"_npmUser":{"name":"vigan-abd","email":"vigan.abd@gmail.com"},"repository":{"url":"git+https://github.com/bitfinexcom/bfx-facs-base.git","type":"git"},"_npmVersion":"10.7.0","description":"Bitfinex base facility","directories":{},"_nodeVersion":"18.20.4","dependencies":{"async":"^3.2.1","lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"standard":"^17.1.2"},"_npmOperationalInternal":{"tmp":"tmp/bfx-facs-base_1.0.0_1765212827610_0.8634286068251869","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@bitfinex/bfx-facs-base","version":"1.1.0","private":false,"description":"Bitfinex base facility","scripts":{"lint":"standard","lint:fix":"standard --fix","test":"npm run lint && npm run test:unit","test:unit":"brittle tests/{,**/}*.test.js"},"author":{"name":"prdn","email":"paolo@bitfinex.com"},"keywords":["bitfinex"],"dependencies":{"async":"^3.2.1","lodash":"^4.18.1"},"devDependencies":{"brittle":"^3.19.1","standard":"^17.1.2","test-tmp":"^1.4.0"},"engines":{"node":">=16.0"},"main":"base.js","license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/bitfinexcom/bfx-facs-base.git"},"homepage":"https://github.com/bitfinexcom/bfx-facs-base","maintainers":[{"name":"vigan-abd","email":"vigan.abd@gmail.com"},{"name":"bitfinexorg","email":"paolo@bitfinex.com"},{"name":"prdn","email":"paolo.ardoino@gmail.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_id":"@bitfinex/bfx-facs-base@1.1.0","gitHead":"6f9aa34a68d40f1b416128a81c7384149f969877","bugs":{"url":"https://github.com/bitfinexcom/bfx-facs-base/issues"},"_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-hhmYHXKHZ3yCelW+6ACYMPXbgI6Mp8X1dGhL4/hHwl3r4DEg5EsYg7lC+TwY3P/XZkjSPSAMr1bCEGxJvwRtdw==","shasum":"e4649e38d0b70d4c51b12ba5bb9598d80b76bd83","tarball":"https://registry.npmjs.org/@bitfinex/bfx-facs-base/-/bfx-facs-base-1.1.0.tgz","fileCount":6,"unpackedSize":19990,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICljD29buMjo7bcKoyA9ZIrb2mNwCCiywsHlICEmgGIOAiEA2LmIvj/ptt2Yx/t/JNprxUsN6neDsyOmMVhlXWbnXFU="}]},"_npmUser":{"name":"vigan-abd","email":"vigan.abd@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bfx-facs-base_1.1.0_1776456058440_0.3628097857964243"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-08T16:53:47.509Z","modified":"2026-04-17T20:00:58.785Z","1.0.0":"2025-12-08T16:53:47.746Z","1.1.0":"2026-04-17T20:00:58.585Z"},"bugs":{"url":"https://github.com/bitfinexcom/bfx-facs-base/issues"},"author":{"name":"prdn","email":"paolo@bitfinex.com"},"license":"Apache-2.0","homepage":"https://github.com/bitfinexcom/bfx-facs-base","keywords":["bitfinex"],"repository":{"type":"git","url":"git+https://github.com/bitfinexcom/bfx-facs-base.git"},"description":"Bitfinex base facility","maintainers":[{"name":"vigan-abd","email":"vigan.abd@gmail.com"},{"name":"bitfinexorg","email":"paolo@bitfinex.com"},{"name":"prdn","email":"paolo.ardoino@gmail.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"readme":"# bfx-facs-base\n\n## bootstrap hooks\n\nSome facilities need special setup before other facilites are started. By default,\nthe bfx-facs-grc, which announces the service to the Grape network is started\nlater than the other facs.\n\nTo run special setup or cleanup tasks before other facs start, use the `start`\noption:\n\n```js\nconst opts = {\n  start: (inst, cb) => {\n    console.log(inst.db) // do async stuff here\n    cb(null)\n  }\n}\nthis.setInitFacs([\n  ['fac', 'bfx-facs-db-mongo', 'm0', 'm0', opts]\n])\n```\n\nExample:\n\nOn service start, this will print:\n\n```\nbfx-facs-first start hook\nbfx-facs-second start hook\nstart0 executed\n```\n\n```js\nclass WrkUtilNetApi extends WrkApi {\n  init () {\n    super.init()\n\n    this.setInitFacs([\n      ['fac', 'bfx-facs-first', 'm0', 'm0', {\n        start: (inst, cb) => {\n          console.log('bfx-facs-first start hook')\n          cb(null)\n        }\n      }, 0], // prio: 0 (default)\n      ['fac', 'bfx-facs-second', 'm0', 'm0', {\n        start: (inst, cb) => {\n          console.log('bfx-facs-second start hook')\n          cb(null)\n        }\n      }, 1], // prio 1\n    ])\n  }\n\n  _start0 (cb) {\n    console.log('start0 executed')\n    cb(null)\n  }\n}\n```\n","readmeFilename":"README.md"}