phecda-server 7.0.0-alpha.16 → 7.0.0-alpha.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/assets/schema.json +1 -7
- package/bin/cli.mjs +16 -11
- package/dist/chunk-25LNE62T.mjs +325 -0
- package/dist/chunk-25LNE62T.mjs.map +1 -0
- package/dist/chunk-2AANNMKJ.js +339 -0
- package/dist/chunk-2AANNMKJ.js.map +1 -0
- package/dist/chunk-2AF4PNIP.mjs +548 -0
- package/dist/chunk-2AF4PNIP.mjs.map +1 -0
- package/dist/chunk-2ATTABKA.mjs +330 -0
- package/dist/chunk-2ATTABKA.mjs.map +1 -0
- package/dist/chunk-2TZOJIU5.mjs +548 -0
- package/dist/chunk-2TZOJIU5.mjs.map +1 -0
- package/dist/chunk-2WO3UGXN.js +551 -0
- package/dist/chunk-2WO3UGXN.js.map +1 -0
- package/dist/chunk-3GHLAAIB.js +330 -0
- package/dist/chunk-3GHLAAIB.js.map +1 -0
- package/dist/chunk-3OHQDPV2.js +548 -0
- package/dist/chunk-3OHQDPV2.js.map +1 -0
- package/dist/chunk-3P3Z5UC6.mjs +150 -0
- package/dist/chunk-3P3Z5UC6.mjs.map +1 -0
- package/dist/chunk-3XK2RTI2.mjs +563 -0
- package/dist/chunk-3XK2RTI2.mjs.map +1 -0
- package/dist/chunk-4G7TPEE2.mjs +330 -0
- package/dist/chunk-4G7TPEE2.mjs.map +1 -0
- package/dist/chunk-4GH4IFBL.mjs +339 -0
- package/dist/chunk-4GH4IFBL.mjs.map +1 -0
- package/dist/chunk-56Y5GBKV.mjs +336 -0
- package/dist/chunk-56Y5GBKV.mjs.map +1 -0
- package/dist/{chunk-MUI6MTUO.mjs → chunk-5DOJ5DLK.mjs} +2 -1
- package/dist/chunk-5DOJ5DLK.mjs.map +1 -0
- package/dist/chunk-5SMDKUTT.js +551 -0
- package/dist/chunk-5SMDKUTT.js.map +1 -0
- package/dist/chunk-672QEOST.js +549 -0
- package/dist/chunk-672QEOST.js.map +1 -0
- package/dist/{chunk-YCES6ABN.mjs → chunk-6JAHCTOT.mjs} +2 -1
- package/dist/chunk-6JAHCTOT.mjs.map +1 -0
- package/dist/chunk-6TVDK7LS.mjs +334 -0
- package/dist/chunk-6TVDK7LS.mjs.map +1 -0
- package/dist/chunk-6UFCTN4R.mjs +153 -0
- package/dist/chunk-6UFCTN4R.mjs.map +1 -0
- package/dist/chunk-6WL4Q3PG.js +546 -0
- package/dist/chunk-6WL4Q3PG.js.map +1 -0
- package/dist/chunk-77T6PXFR.js +330 -0
- package/dist/chunk-77T6PXFR.js.map +1 -0
- package/dist/chunk-7BE5DAYB.mjs +548 -0
- package/dist/chunk-7BE5DAYB.mjs.map +1 -0
- package/dist/{chunk-KCPBITYZ.js → chunk-7RF74WML.js} +25 -24
- package/dist/chunk-7RF74WML.js.map +1 -0
- package/dist/chunk-7SKWIPNP.js +230 -0
- package/dist/chunk-7SKWIPNP.js.map +1 -0
- package/dist/chunk-7VCG4CO6.js +551 -0
- package/dist/chunk-7VCG4CO6.js.map +1 -0
- package/dist/chunk-7X5SWO7F.js +230 -0
- package/dist/chunk-7X5SWO7F.js.map +1 -0
- package/dist/chunk-A2ZAEKXE.js +230 -0
- package/dist/chunk-A2ZAEKXE.js.map +1 -0
- package/dist/chunk-A7IQ3C2W.mjs +551 -0
- package/dist/chunk-A7IQ3C2W.mjs.map +1 -0
- package/dist/chunk-A7Z6WC2U.mjs +549 -0
- package/dist/chunk-A7Z6WC2U.mjs.map +1 -0
- package/dist/{chunk-VX4BZEL7.mjs → chunk-AH2GHJYG.mjs} +12 -8
- package/dist/chunk-AH2GHJYG.mjs.map +1 -0
- package/dist/chunk-AKRBZ4QH.js +327 -0
- package/dist/chunk-AKRBZ4QH.js.map +1 -0
- package/dist/chunk-AUF4H6MB.mjs +330 -0
- package/dist/chunk-AUF4H6MB.mjs.map +1 -0
- package/dist/chunk-B4LHVDDL.js +329 -0
- package/dist/chunk-B4LHVDDL.js.map +1 -0
- package/dist/chunk-BVI6MJ57.js +150 -0
- package/dist/chunk-BVI6MJ57.js.map +1 -0
- package/dist/chunk-BZMKWF3E.mjs +546 -0
- package/dist/chunk-BZMKWF3E.mjs.map +1 -0
- package/dist/chunk-BZMKZ733.mjs +154 -0
- package/dist/chunk-BZMKZ733.mjs.map +1 -0
- package/dist/chunk-C2MTV2HS.js +148 -0
- package/dist/chunk-C2MTV2HS.js.map +1 -0
- package/dist/chunk-CGHKI3FB.js +548 -0
- package/dist/chunk-CGHKI3FB.js.map +1 -0
- package/dist/chunk-CLQEY47X.js +154 -0
- package/dist/chunk-CLQEY47X.js.map +1 -0
- package/dist/chunk-DIDCPEI7.js +546 -0
- package/dist/chunk-DIDCPEI7.js.map +1 -0
- package/dist/chunk-DJCMOLNU.mjs +547 -0
- package/dist/chunk-DJCMOLNU.mjs.map +1 -0
- package/dist/chunk-DJKIF6CO.mjs +230 -0
- package/dist/chunk-DJKIF6CO.mjs.map +1 -0
- package/dist/chunk-DZXOLJ2U.mjs +546 -0
- package/dist/chunk-DZXOLJ2U.mjs.map +1 -0
- package/dist/chunk-EEZLSH37.js +230 -0
- package/dist/chunk-EEZLSH37.js.map +1 -0
- package/dist/chunk-EYNIZVQM.js +334 -0
- package/dist/chunk-EYNIZVQM.js.map +1 -0
- package/dist/chunk-FA4XQ5HS.mjs +547 -0
- package/dist/chunk-FA4XQ5HS.mjs.map +1 -0
- package/dist/chunk-FBN6O256.js +153 -0
- package/dist/chunk-FBN6O256.js.map +1 -0
- package/dist/chunk-FJYLWOEI.js +325 -0
- package/dist/chunk-FJYLWOEI.js.map +1 -0
- package/dist/chunk-FV5CWX5Y.js +563 -0
- package/dist/chunk-FV5CWX5Y.js.map +1 -0
- package/dist/chunk-FZIJNZOP.js +546 -0
- package/dist/chunk-FZIJNZOP.js.map +1 -0
- package/dist/chunk-G377USSH.js +230 -0
- package/dist/chunk-G377USSH.js.map +1 -0
- package/dist/chunk-G3K6FCN4.js +549 -0
- package/dist/chunk-G3K6FCN4.js.map +1 -0
- package/dist/chunk-GA3YDUKH.js +150 -0
- package/dist/chunk-GA3YDUKH.js.map +1 -0
- package/dist/chunk-GMYV3IKV.mjs +548 -0
- package/dist/chunk-GMYV3IKV.mjs.map +1 -0
- package/dist/{chunk-IJFIY6QN.js → chunk-H7OCHDZT.js} +55 -63
- package/dist/chunk-H7OCHDZT.js.map +1 -0
- package/dist/chunk-HBITJSAJ.js +334 -0
- package/dist/chunk-HBITJSAJ.js.map +1 -0
- package/dist/chunk-HGCBKGAE.js +563 -0
- package/dist/chunk-HGCBKGAE.js.map +1 -0
- package/dist/chunk-HGQUWR5Y.js +548 -0
- package/dist/chunk-HGQUWR5Y.js.map +1 -0
- package/dist/chunk-HNHYJHTR.mjs +150 -0
- package/dist/chunk-HNHYJHTR.mjs.map +1 -0
- package/dist/chunk-HOMMTTY3.js +549 -0
- package/dist/chunk-HOMMTTY3.js.map +1 -0
- package/dist/chunk-HPCKU764.js +230 -0
- package/dist/chunk-HPCKU764.js.map +1 -0
- package/dist/chunk-HWZUI3S7.mjs +154 -0
- package/dist/chunk-HWZUI3S7.mjs.map +1 -0
- package/dist/chunk-HXAYHDBD.mjs +324 -0
- package/dist/chunk-HXAYHDBD.mjs.map +1 -0
- package/dist/chunk-I7Q27MJV.mjs +230 -0
- package/dist/chunk-I7Q27MJV.mjs.map +1 -0
- package/dist/{chunk-6OQ2SB5W.js → chunk-IIAJBTJE.js} +19 -22
- package/dist/chunk-IIAJBTJE.js.map +1 -0
- package/dist/chunk-IPEKAVER.js +336 -0
- package/dist/chunk-IPEKAVER.js.map +1 -0
- package/dist/chunk-IUBKOGEX.js +337 -0
- package/dist/chunk-IUBKOGEX.js.map +1 -0
- package/dist/chunk-JF5Q4N2N.mjs +330 -0
- package/dist/chunk-JF5Q4N2N.mjs.map +1 -0
- package/dist/chunk-JL3U632E.mjs +329 -0
- package/dist/chunk-JL3U632E.mjs.map +1 -0
- package/dist/chunk-JZW6S7UZ.mjs +334 -0
- package/dist/chunk-JZW6S7UZ.mjs.map +1 -0
- package/dist/chunk-K7BBDAQV.js +330 -0
- package/dist/chunk-K7BBDAQV.js.map +1 -0
- package/dist/chunk-KATTCXH7.mjs +153 -0
- package/dist/chunk-KATTCXH7.mjs.map +1 -0
- package/dist/chunk-KHHTD6W2.js +325 -0
- package/dist/chunk-KHHTD6W2.js.map +1 -0
- package/dist/chunk-KJTJTAM5.js +547 -0
- package/dist/chunk-KJTJTAM5.js.map +1 -0
- package/dist/chunk-KUGU3UGO.js +334 -0
- package/dist/chunk-KUGU3UGO.js.map +1 -0
- package/dist/chunk-LBH4RXQQ.mjs +534 -0
- package/dist/chunk-LBH4RXQQ.mjs.map +1 -0
- package/dist/chunk-LMCXPBEL.js +230 -0
- package/dist/chunk-LMCXPBEL.js.map +1 -0
- package/dist/chunk-LPCFXBIN.mjs +554 -0
- package/dist/chunk-LPCFXBIN.mjs.map +1 -0
- package/dist/chunk-LWKMKMGP.mjs +551 -0
- package/dist/chunk-LWKMKMGP.mjs.map +1 -0
- package/dist/chunk-M2NBQIY4.js +230 -0
- package/dist/chunk-M2NBQIY4.js.map +1 -0
- package/dist/chunk-MCVUJNTJ.mjs +546 -0
- package/dist/chunk-MCVUJNTJ.mjs.map +1 -0
- package/dist/{chunk-NQ55PA2X.mjs → chunk-MDPW6WGF.mjs} +1 -0
- package/dist/chunk-MDPW6WGF.mjs.map +1 -0
- package/dist/chunk-O23LYYQO.mjs +549 -0
- package/dist/chunk-O23LYYQO.mjs.map +1 -0
- package/dist/chunk-OGNSLEM7.js +562 -0
- package/dist/chunk-OGNSLEM7.js.map +1 -0
- package/dist/chunk-OSCTXAED.js +154 -0
- package/dist/chunk-OSCTXAED.js.map +1 -0
- package/dist/chunk-P5DXLNAV.mjs +334 -0
- package/dist/chunk-P5DXLNAV.mjs.map +1 -0
- package/dist/chunk-PDKES3CS.js +334 -0
- package/dist/chunk-PDKES3CS.js.map +1 -0
- package/dist/chunk-PLD4EI4W.mjs +334 -0
- package/dist/chunk-PLD4EI4W.mjs.map +1 -0
- package/dist/chunk-PQXBA7RP.mjs +325 -0
- package/dist/chunk-PQXBA7RP.mjs.map +1 -0
- package/dist/chunk-PUXTWHMP.mjs +337 -0
- package/dist/chunk-PUXTWHMP.mjs.map +1 -0
- package/dist/chunk-PWYWGN3L.mjs +562 -0
- package/dist/chunk-PWYWGN3L.mjs.map +1 -0
- package/dist/chunk-PXWSDTIP.mjs +551 -0
- package/dist/chunk-PXWSDTIP.mjs.map +1 -0
- package/dist/chunk-Q64YUA6Q.js +153 -0
- package/dist/chunk-Q64YUA6Q.js.map +1 -0
- package/dist/chunk-Q7FATBG4.mjs +327 -0
- package/dist/chunk-Q7FATBG4.mjs.map +1 -0
- package/dist/chunk-QLR7YJ7K.js +548 -0
- package/dist/chunk-QLR7YJ7K.js.map +1 -0
- package/dist/chunk-QNTSTOHM.mjs +230 -0
- package/dist/chunk-QNTSTOHM.mjs.map +1 -0
- package/dist/chunk-QP2HPQND.js +548 -0
- package/dist/chunk-QP2HPQND.js.map +1 -0
- package/dist/{chunk-4LLLQOMF.js → chunk-RLFCI3RG.js} +1 -0
- package/dist/chunk-RLFCI3RG.js.map +1 -0
- package/dist/chunk-RW5HHB6Z.mjs +230 -0
- package/dist/chunk-RW5HHB6Z.mjs.map +1 -0
- package/dist/chunk-RXBJH74V.js +334 -0
- package/dist/chunk-RXBJH74V.js.map +1 -0
- package/dist/chunk-S2B3Y2WJ.mjs +230 -0
- package/dist/chunk-S2B3Y2WJ.mjs.map +1 -0
- package/dist/chunk-SCA7SXI6.mjs +334 -0
- package/dist/chunk-SCA7SXI6.mjs.map +1 -0
- package/dist/chunk-SE2XQSPO.js +549 -0
- package/dist/chunk-SE2XQSPO.js.map +1 -0
- package/dist/chunk-SP4ASHBX.mjs +334 -0
- package/dist/chunk-SP4ASHBX.mjs.map +1 -0
- package/dist/chunk-TFK3ICC2.mjs +548 -0
- package/dist/chunk-TFK3ICC2.mjs.map +1 -0
- package/dist/chunk-TQR7KDFP.mjs +150 -0
- package/dist/chunk-TQR7KDFP.mjs.map +1 -0
- package/dist/chunk-TRJVULA2.js +330 -0
- package/dist/chunk-TRJVULA2.js.map +1 -0
- package/dist/chunk-TU4XB7CZ.mjs +230 -0
- package/dist/chunk-TU4XB7CZ.mjs.map +1 -0
- package/dist/chunk-U7EKEUCU.mjs +549 -0
- package/dist/chunk-U7EKEUCU.mjs.map +1 -0
- package/dist/chunk-UBQ4FXWS.js +554 -0
- package/dist/chunk-UBQ4FXWS.js.map +1 -0
- package/dist/chunk-UFQBSH4U.mjs +230 -0
- package/dist/chunk-UFQBSH4U.mjs.map +1 -0
- package/dist/chunk-UUHB6RHI.mjs +230 -0
- package/dist/chunk-UUHB6RHI.mjs.map +1 -0
- package/dist/chunk-UUKYR5HO.js +336 -0
- package/dist/chunk-UUKYR5HO.js.map +1 -0
- package/dist/chunk-UZTDXFFC.js +547 -0
- package/dist/chunk-UZTDXFFC.js.map +1 -0
- package/dist/chunk-V6AD4Y74.js +550 -0
- package/dist/chunk-V6AD4Y74.js.map +1 -0
- package/dist/chunk-VBBZA6PA.mjs +148 -0
- package/dist/chunk-VBBZA6PA.mjs.map +1 -0
- package/dist/chunk-VM4RFF4O.js +339 -0
- package/dist/chunk-VM4RFF4O.js.map +1 -0
- package/dist/chunk-W4AIKOBG.mjs +330 -0
- package/dist/chunk-W4AIKOBG.mjs.map +1 -0
- package/dist/chunk-WCLQYWET.mjs +328 -0
- package/dist/chunk-WCLQYWET.mjs.map +1 -0
- package/dist/chunk-WRN4ZVJQ.js +334 -0
- package/dist/chunk-WRN4ZVJQ.js.map +1 -0
- package/dist/chunk-X2H2PYE4.js +328 -0
- package/dist/chunk-X2H2PYE4.js.map +1 -0
- package/dist/chunk-X4YZRAFM.mjs +563 -0
- package/dist/chunk-X4YZRAFM.mjs.map +1 -0
- package/dist/chunk-X6M4LKQR.mjs +550 -0
- package/dist/chunk-X6M4LKQR.mjs.map +1 -0
- package/dist/chunk-X6WMGSPO.js +150 -0
- package/dist/chunk-X6WMGSPO.js.map +1 -0
- package/dist/chunk-XAI6JXXC.mjs +339 -0
- package/dist/chunk-XAI6JXXC.mjs.map +1 -0
- package/dist/chunk-XSABKCJD.js +546 -0
- package/dist/chunk-XSABKCJD.js.map +1 -0
- package/dist/chunk-XW3UEXLV.mjs +336 -0
- package/dist/chunk-XW3UEXLV.mjs.map +1 -0
- package/dist/chunk-YQYBLTSZ.js +330 -0
- package/dist/chunk-YQYBLTSZ.js.map +1 -0
- package/dist/chunk-YSRKB2RQ.js +334 -0
- package/dist/chunk-YSRKB2RQ.js.map +1 -0
- package/dist/chunk-YT4J7LJM.mjs +549 -0
- package/dist/chunk-YT4J7LJM.mjs.map +1 -0
- package/dist/chunk-YXXWVL32.mjs +330 -0
- package/dist/chunk-YXXWVL32.mjs.map +1 -0
- package/dist/chunk-Z4JSVZR3.js +324 -0
- package/dist/chunk-Z4JSVZR3.js.map +1 -0
- package/dist/{core-DiFYc0bC.d.mts → core--qu3pWkq.d.ts} +1 -1
- package/dist/core-BPUiAJHn.d.ts +49 -0
- package/dist/core-Bi3rTHpi.d.ts +49 -0
- package/dist/core-Bjw_HRhA.d.mts +49 -0
- package/dist/core-Brb7fvGi.d.ts +49 -0
- package/dist/core-C7FYVQ3G.d.ts +49 -0
- package/dist/core-C8nKzrYj.d.ts +49 -0
- package/dist/core-CTa38Qb8.d.mts +49 -0
- package/dist/core-C_vzHvIM.d.mts +49 -0
- package/dist/core-CjJyvCUL.d.mts +49 -0
- package/dist/core-CxB9E1Mb.d.mts +49 -0
- package/dist/core-D5cwjnXb.d.ts +49 -0
- package/dist/core-D9ivz8Je.d.mts +49 -0
- package/dist/{core-KvmgTDU0.d.ts → core-DEjpz7U-.d.ts} +1 -1
- package/dist/core-DFoppC8I.d.mts +49 -0
- package/dist/core-DU0-ELVr.d.ts +49 -0
- package/dist/core-Dk6Y21IK.d.mts +49 -0
- package/dist/core-ppueS5ax.d.mts +49 -0
- package/dist/core-scwP4qK3.d.ts +49 -0
- package/dist/core-vtBLhyjz.d.mts +49 -0
- package/dist/helper.d.mts +1 -1
- package/dist/helper.d.ts +1 -1
- package/dist/helper.js +4 -3
- package/dist/helper.js.map +1 -0
- package/dist/helper.mjs +3 -2
- package/dist/helper.mjs.map +1 -0
- package/dist/http/elysia/index.d.mts +3 -3
- package/dist/http/elysia/index.d.ts +3 -3
- package/dist/http/elysia/index.js +41 -40
- package/dist/http/elysia/index.js.map +1 -0
- package/dist/http/elysia/index.mjs +4 -3
- package/dist/http/elysia/index.mjs.map +1 -0
- package/dist/http/express/index.d.mts +3 -3
- package/dist/http/express/index.d.ts +3 -3
- package/dist/http/express/index.js +38 -37
- package/dist/http/express/index.js.map +1 -0
- package/dist/http/express/index.mjs +3 -2
- package/dist/http/express/index.mjs.map +1 -0
- package/dist/http/fastify/index.d.mts +3 -3
- package/dist/http/fastify/index.d.ts +3 -3
- package/dist/http/fastify/index.js +39 -38
- package/dist/http/fastify/index.js.map +1 -0
- package/dist/http/fastify/index.mjs +4 -3
- package/dist/http/fastify/index.mjs.map +1 -0
- package/dist/http/h3/index.d.mts +3 -3
- package/dist/http/h3/index.d.ts +3 -3
- package/dist/http/h3/index.js +39 -38
- package/dist/http/h3/index.js.map +1 -0
- package/dist/http/h3/index.mjs +3 -2
- package/dist/http/h3/index.mjs.map +1 -0
- package/dist/http/hono/index.d.mts +3 -3
- package/dist/http/hono/index.d.ts +3 -3
- package/dist/http/hono/index.js +35 -34
- package/dist/http/hono/index.js.map +1 -0
- package/dist/http/hono/index.mjs +3 -2
- package/dist/http/hono/index.mjs.map +1 -0
- package/dist/http/hyper-express/index.d.mts +3 -3
- package/dist/http/hyper-express/index.d.ts +3 -3
- package/dist/http/hyper-express/index.js +36 -35
- package/dist/http/hyper-express/index.js.map +1 -0
- package/dist/http/hyper-express/index.mjs +3 -2
- package/dist/http/hyper-express/index.mjs.map +1 -0
- package/dist/http/koa/index.d.mts +3 -3
- package/dist/http/koa/index.d.ts +3 -3
- package/dist/http/koa/index.js +38 -37
- package/dist/http/koa/index.js.map +1 -0
- package/dist/http/koa/index.mjs +3 -2
- package/dist/http/koa/index.mjs.map +1 -0
- package/dist/index.d.mts +8 -9
- package/dist/index.d.ts +8 -9
- package/dist/index.js +41 -40
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +5 -4
- package/dist/index.mjs.map +1 -0
- package/dist/meta-vC_LItVL.d.mts +90 -0
- package/dist/meta-vC_LItVL.d.ts +90 -0
- package/dist/rpc/bullmq/index.d.mts +3 -3
- package/dist/rpc/bullmq/index.d.ts +3 -3
- package/dist/rpc/bullmq/index.js +12 -11
- package/dist/rpc/bullmq/index.js.map +1 -0
- package/dist/rpc/bullmq/index.mjs +3 -2
- package/dist/rpc/bullmq/index.mjs.map +1 -0
- package/dist/rpc/electron/index.d.mts +3 -3
- package/dist/rpc/electron/index.d.ts +3 -3
- package/dist/rpc/electron/index.js +9 -8
- package/dist/rpc/electron/index.js.map +1 -0
- package/dist/rpc/electron/index.mjs +3 -2
- package/dist/rpc/electron/index.mjs.map +1 -0
- package/dist/rpc/kafka/index.d.mts +3 -3
- package/dist/rpc/kafka/index.d.ts +3 -3
- package/dist/rpc/kafka/index.js +11 -10
- package/dist/rpc/kafka/index.js.map +1 -0
- package/dist/rpc/kafka/index.mjs +3 -2
- package/dist/rpc/kafka/index.mjs.map +1 -0
- package/dist/rpc/nats/index.d.mts +3 -3
- package/dist/rpc/nats/index.d.ts +3 -3
- package/dist/rpc/nats/index.js +12 -11
- package/dist/rpc/nats/index.js.map +1 -0
- package/dist/rpc/nats/index.mjs +3 -2
- package/dist/rpc/nats/index.mjs.map +1 -0
- package/dist/rpc/rabbitmq/index.d.mts +3 -3
- package/dist/rpc/rabbitmq/index.d.ts +3 -3
- package/dist/rpc/rabbitmq/index.js +13 -12
- package/dist/rpc/rabbitmq/index.js.map +1 -0
- package/dist/rpc/rabbitmq/index.mjs +3 -2
- package/dist/rpc/rabbitmq/index.mjs.map +1 -0
- package/dist/rpc/redis/index.d.mts +3 -3
- package/dist/rpc/redis/index.d.ts +3 -3
- package/dist/rpc/redis/index.js +11 -10
- package/dist/rpc/redis/index.js.map +1 -0
- package/dist/rpc/redis/index.mjs +3 -2
- package/dist/rpc/redis/index.mjs.map +1 -0
- package/dist/rpc/web-ext/index.d.mts +2 -0
- package/dist/rpc/web-ext/index.d.ts +2 -0
- package/dist/rpc/web-ext/index.js +1 -0
- package/dist/rpc/web-ext/index.js.map +1 -0
- package/dist/rpc/web-ext/index.mjs +1 -0
- package/dist/rpc/web-ext/index.mjs.map +1 -0
- package/dist/rpc/ws/index.d.mts +3 -3
- package/dist/rpc/ws/index.d.ts +3 -3
- package/dist/rpc/ws/index.js +8 -7
- package/dist/rpc/ws/index.js.map +1 -0
- package/dist/rpc/ws/index.mjs +3 -2
- package/dist/rpc/ws/index.mjs.map +1 -0
- package/dist/test.d.mts +3 -3
- package/dist/test.d.ts +3 -3
- package/dist/test.js +7 -6
- package/dist/test.js.map +1 -0
- package/dist/test.mjs +3 -2
- package/dist/test.mjs.map +1 -0
- package/dist/{types-8r301ZfZ.d.mts → types--FU0xyv7.d.mts} +1 -1
- package/dist/types-7nUdSf8z.d.mts +19 -0
- package/dist/{types-CVSbC6nz.d.mts → types-BE2z6gOo.d.ts} +1 -1
- package/dist/types-BJiHDyTL.d.mts +19 -0
- package/dist/types-BRCJyQsh.d.mts +90 -0
- package/dist/types-BRCJyQsh.d.ts +90 -0
- package/dist/types-BV7YmpJE.d.ts +14 -0
- package/dist/{types-Bz3JN2S1.d.ts → types-BVswigDc.d.ts} +1 -1
- package/dist/types-B_RVNTOF.d.mts +91 -0
- package/dist/types-B_RVNTOF.d.ts +91 -0
- package/dist/types-BtM-DxqM.d.mts +48 -0
- package/dist/types-C-nIlDCV.d.mts +48 -0
- package/dist/types-C-wRAcbr.d.ts +48 -0
- package/dist/types-C2KvkrD6.d.mts +48 -0
- package/dist/{meta-DlHaMicF.d.ts → types-C6hpZpnS.d.mts} +43 -43
- package/dist/{meta-DlHaMicF.d.mts → types-C6hpZpnS.d.ts} +43 -43
- package/dist/types-CFX2Ln0s.d.mts +48 -0
- package/dist/types-CR_EmIw8.d.mts +48 -0
- package/dist/types-CbRiXnzh.d.ts +19 -0
- package/dist/types-Ci9JeYtv.d.ts +48 -0
- package/dist/types-CiL0rHL3.d.ts +19 -0
- package/dist/types-CuBnfbgb.d.mts +14 -0
- package/dist/types-CvPG7k2Z.d.mts +14 -0
- package/dist/types-D9vxgkS4.d.mts +48 -0
- package/dist/types-DHYok84r.d.mts +14 -0
- package/dist/types-DI40e_s_.d.mts +19 -0
- package/dist/{types-DJuqpiI8.d.ts → types-DTOe0r2g.d.ts} +1 -1
- package/dist/types-DWVRUI6s.d.mts +91 -0
- package/dist/types-DWVRUI6s.d.ts +91 -0
- package/dist/types-DX98FM-A.d.ts +19 -0
- package/dist/types-DdJI1b5J.d.mts +19 -0
- package/dist/types-DfNl_AGj.d.ts +48 -0
- package/dist/types-DfNtpP-N.d.mts +111 -0
- package/dist/types-DfNtpP-N.d.ts +111 -0
- package/dist/types-DfVkUOZW.d.ts +48 -0
- package/dist/types-DfsKsjLM.d.mts +111 -0
- package/dist/types-DfsKsjLM.d.ts +111 -0
- package/dist/types-Didk5ZxZ.d.ts +48 -0
- package/dist/types-DsvVhEYR.d.ts +48 -0
- package/dist/types-Dt4WHNIG.d.mts +48 -0
- package/dist/types-DtG1fW8q.d.mts +48 -0
- package/dist/types-DwkH_ckj.d.mts +107 -0
- package/dist/types-DwkH_ckj.d.ts +107 -0
- package/dist/types-GLyEDoZh.d.ts +48 -0
- package/dist/types-HFldWW-W.d.mts +48 -0
- package/dist/types-LfX4z-X2.d.mts +48 -0
- package/dist/types-Ru_9udNp.d.ts +48 -0
- package/dist/types-gz344phy.d.mts +14 -0
- package/dist/types-hTbg1FQR.d.ts +19 -0
- package/dist/types-laEKHNwU.d.ts +14 -0
- package/dist/types-mcWWx2nR.d.mts +108 -0
- package/dist/types-mcWWx2nR.d.ts +108 -0
- package/dist/types-nA5JQl76.d.ts +14 -0
- package/dist/types-ojuQvq5-.d.ts +19 -0
- package/dist/types-pCI7fyyv.d.mts +108 -0
- package/dist/types-pCI7fyyv.d.ts +108 -0
- package/dist/types-vyUwFCHY.d.mts +19 -0
- package/dist/types-xovMFthM.d.ts +14 -0
- package/package.json +7 -2
- package/register/index.mjs +2 -2
- package/register/loader.mjs +33 -27
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Events, Construct } from 'phecda-core';
|
|
2
|
+
|
|
3
|
+
interface ServiceMetaData {
|
|
4
|
+
func: string;
|
|
5
|
+
name: string;
|
|
6
|
+
tag: string;
|
|
7
|
+
define?: any;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
interface ControllerMetaData extends ServiceMetaData {
|
|
11
|
+
controller: string;
|
|
12
|
+
http?: {
|
|
13
|
+
type: BaseRequestType;
|
|
14
|
+
prefix: string;
|
|
15
|
+
route: string;
|
|
16
|
+
headers?: Record<string, string>;
|
|
17
|
+
};
|
|
18
|
+
rpc?: {
|
|
19
|
+
queue?: string;
|
|
20
|
+
isEvent?: boolean;
|
|
21
|
+
};
|
|
22
|
+
ctxs?: string[];
|
|
23
|
+
params: {
|
|
24
|
+
type: string;
|
|
25
|
+
index: number;
|
|
26
|
+
key: string;
|
|
27
|
+
pipe?: string;
|
|
28
|
+
define: Record<string, any>;
|
|
29
|
+
}[];
|
|
30
|
+
guards: string[];
|
|
31
|
+
pipe?: string;
|
|
32
|
+
filter?: string;
|
|
33
|
+
addons: string[];
|
|
34
|
+
}
|
|
35
|
+
type MetaData = ControllerMetaData | ServiceMetaData;
|
|
36
|
+
declare class Meta {
|
|
37
|
+
data: MetaData;
|
|
38
|
+
paramsType: any[];
|
|
39
|
+
constructor(data: MetaData, paramsType: any[]);
|
|
40
|
+
}
|
|
41
|
+
interface ControllerMeta extends Meta {
|
|
42
|
+
data: ControllerMetaData;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare const ERROR_SYMBOL = "__PS_ERROR__";
|
|
46
|
+
declare const IS_DEV: boolean;
|
|
47
|
+
declare const IS_ONLY_GENERATE: boolean;
|
|
48
|
+
declare const IS_STRICT: boolean;
|
|
49
|
+
declare const IS_PURE: boolean;
|
|
50
|
+
declare const LOG_LEVEL: number;
|
|
51
|
+
declare enum PS_EXIT_CODE {
|
|
52
|
+
RELAUNCH = 4171,
|
|
53
|
+
EXIT = 4172
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface Emitter {
|
|
57
|
+
on<N extends keyof Events>(eventName: N, cb: (args: Events[N]) => void): void;
|
|
58
|
+
once<N extends keyof Events>(eventName: N, cb: (args: Events[N]) => void): void;
|
|
59
|
+
off<N extends keyof Events>(eventName: N, cb: (args: Events[N]) => void): void;
|
|
60
|
+
removeAllListeners<N extends keyof Events>(eventName: N): void;
|
|
61
|
+
emit<N extends keyof Events>(eventName: N, param: Events[N]): void;
|
|
62
|
+
}
|
|
63
|
+
type AnyFunction = (...args: any) => any;
|
|
64
|
+
type ParseInstance<Instance extends Record<string, AnyFunction>> = {
|
|
65
|
+
[Key in keyof Instance]: ToClientFn<Instance[Key]>;
|
|
66
|
+
};
|
|
67
|
+
type PickFuncKeys<Type> = {
|
|
68
|
+
[Key in keyof Type]: Type[Key] extends (...args: any) => any ? (ReturnType<Type[Key]> extends CustomResponse<any> ? never : Key) : never;
|
|
69
|
+
}[keyof Type];
|
|
70
|
+
type ToClientMap<ControllerMap extends Record<string, Construct>> = {
|
|
71
|
+
[Key in keyof ControllerMap]: ToClientInstance<InstanceType<ControllerMap[Key]>>;
|
|
72
|
+
};
|
|
73
|
+
type ToClientInstance<Instance extends Record<string, any>> = ParseInstance<PickFunc<Instance>>;
|
|
74
|
+
type ToClientFn<Func extends AnyFunction> = (...p: Parameters<Func>) => Promise<BaseReturn<ReturnType<Func>>>;
|
|
75
|
+
type PickFunc<Instance> = Pick<Instance, PickFuncKeys<Instance>>;
|
|
76
|
+
type OmitFunction<Instance> = Omit<Instance, PickFuncKeys<Instance>>;
|
|
77
|
+
interface BaseCtx {
|
|
78
|
+
meta: ControllerMeta;
|
|
79
|
+
moduleMap: Record<string, any>;
|
|
80
|
+
type: string;
|
|
81
|
+
tag: string;
|
|
82
|
+
func: string;
|
|
83
|
+
category: string;
|
|
84
|
+
[key: string]: any;
|
|
85
|
+
}
|
|
86
|
+
interface DefaultOptions {
|
|
87
|
+
globalGuards?: string[];
|
|
88
|
+
globalFilter?: string;
|
|
89
|
+
globalPipe?: string;
|
|
90
|
+
globalAddons?: string[];
|
|
91
|
+
}
|
|
92
|
+
interface BaseError {
|
|
93
|
+
[ERROR_SYMBOL]: true;
|
|
94
|
+
status: number;
|
|
95
|
+
message: string;
|
|
96
|
+
description: string;
|
|
97
|
+
}
|
|
98
|
+
type BaseReturn<T> = Awaited<T> extends {
|
|
99
|
+
toJSON(): infer R;
|
|
100
|
+
} ? R : Awaited<T>;
|
|
101
|
+
type BaseRequestType = 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options';
|
|
102
|
+
declare const ResponseSymbol: unique symbol;
|
|
103
|
+
declare class CustomResponse<Value> {
|
|
104
|
+
[ResponseSymbol]: Value;
|
|
105
|
+
}
|
|
106
|
+
type ExtractResponse<Class extends CustomResponse<any>> = Class extends CustomResponse<infer Value> ? Value : never;
|
|
107
|
+
|
|
108
|
+
export { type BaseCtx as B, type ControllerMeta as C, type DefaultOptions as D, type Emitter as E, IS_DEV as I, LOG_LEVEL as L, type MetaData as M, type OmitFunction as O, type PickFunc as P, type ServiceMetaData as S, type ToClientMap as T, type ControllerMetaData as a, type BaseError as b, type ToClientInstance as c, type ToClientFn as d, type BaseReturn as e, type BaseRequestType as f, CustomResponse as g, type ExtractResponse as h, Meta as i, ERROR_SYMBOL as j, IS_ONLY_GENERATE as k, IS_STRICT as l, IS_PURE as m, PS_EXIT_CODE as n };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Events, Construct } from 'phecda-core';
|
|
2
|
+
|
|
3
|
+
interface ServiceMetaData {
|
|
4
|
+
func: string;
|
|
5
|
+
name: string;
|
|
6
|
+
tag: string;
|
|
7
|
+
define?: any;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
interface ControllerMetaData extends ServiceMetaData {
|
|
11
|
+
controller: string;
|
|
12
|
+
http?: {
|
|
13
|
+
type: BaseRequestType;
|
|
14
|
+
prefix: string;
|
|
15
|
+
route: string;
|
|
16
|
+
headers?: Record<string, string>;
|
|
17
|
+
};
|
|
18
|
+
rpc?: {
|
|
19
|
+
queue?: string;
|
|
20
|
+
isEvent?: boolean;
|
|
21
|
+
};
|
|
22
|
+
ctxs?: string[];
|
|
23
|
+
params: {
|
|
24
|
+
type: string;
|
|
25
|
+
index: number;
|
|
26
|
+
key: string;
|
|
27
|
+
pipe?: string;
|
|
28
|
+
define: Record<string, any>;
|
|
29
|
+
}[];
|
|
30
|
+
guards: string[];
|
|
31
|
+
pipe?: string;
|
|
32
|
+
filter?: string;
|
|
33
|
+
addons: string[];
|
|
34
|
+
}
|
|
35
|
+
type MetaData = ControllerMetaData | ServiceMetaData;
|
|
36
|
+
declare class Meta {
|
|
37
|
+
data: MetaData;
|
|
38
|
+
paramsType: any[];
|
|
39
|
+
constructor(data: MetaData, paramsType: any[]);
|
|
40
|
+
}
|
|
41
|
+
interface ControllerMeta extends Meta {
|
|
42
|
+
data: ControllerMetaData;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare const ERROR_SYMBOL = "__PS_ERROR__";
|
|
46
|
+
declare const IS_DEV: boolean;
|
|
47
|
+
declare const IS_ONLY_GENERATE: boolean;
|
|
48
|
+
declare const IS_STRICT: boolean;
|
|
49
|
+
declare const IS_PURE: boolean;
|
|
50
|
+
declare const LOG_LEVEL: number;
|
|
51
|
+
declare enum PS_EXIT_CODE {
|
|
52
|
+
RELAUNCH = 4171,
|
|
53
|
+
EXIT = 4172
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface Emitter {
|
|
57
|
+
on<N extends keyof Events>(eventName: N, cb: (args: Events[N]) => void): void;
|
|
58
|
+
once<N extends keyof Events>(eventName: N, cb: (args: Events[N]) => void): void;
|
|
59
|
+
off<N extends keyof Events>(eventName: N, cb: (args: Events[N]) => void): void;
|
|
60
|
+
removeAllListeners<N extends keyof Events>(eventName: N): void;
|
|
61
|
+
emit<N extends keyof Events>(eventName: N, param: Events[N]): void;
|
|
62
|
+
}
|
|
63
|
+
type AnyFunction = (...args: any) => any;
|
|
64
|
+
type ParseInstance<Instance extends Record<string, AnyFunction>> = {
|
|
65
|
+
[Key in keyof Instance]: ToClientFn<Instance[Key]>;
|
|
66
|
+
};
|
|
67
|
+
type PickFuncKeys<Type> = {
|
|
68
|
+
[Key in keyof Type]: Type[Key] extends (...args: any) => any ? (ReturnType<Type[Key]> extends CustomResponse<any> ? never : Key) : never;
|
|
69
|
+
}[keyof Type];
|
|
70
|
+
type ToClientMap<ControllerMap extends Record<string, Construct>> = {
|
|
71
|
+
[Key in keyof ControllerMap]: ToClientInstance<InstanceType<ControllerMap[Key]>>;
|
|
72
|
+
};
|
|
73
|
+
type ToClientInstance<Instance extends Record<string, any>> = ParseInstance<PickFunc<Instance>>;
|
|
74
|
+
type ToClientFn<Func extends AnyFunction> = (...p: Parameters<Func>) => Promise<BaseReturn<ReturnType<Func>>>;
|
|
75
|
+
type PickFunc<Instance> = Pick<Instance, PickFuncKeys<Instance>>;
|
|
76
|
+
type OmitFunction<Instance> = Omit<Instance, PickFuncKeys<Instance>>;
|
|
77
|
+
interface BaseCtx {
|
|
78
|
+
meta: ControllerMeta;
|
|
79
|
+
moduleMap: Record<string, any>;
|
|
80
|
+
type: string;
|
|
81
|
+
tag: string;
|
|
82
|
+
func: string;
|
|
83
|
+
category: string;
|
|
84
|
+
[key: string]: any;
|
|
85
|
+
}
|
|
86
|
+
interface DefaultOptions {
|
|
87
|
+
globalGuards?: string[];
|
|
88
|
+
globalFilter?: string;
|
|
89
|
+
globalPipe?: string;
|
|
90
|
+
globalAddons?: string[];
|
|
91
|
+
}
|
|
92
|
+
interface BaseError {
|
|
93
|
+
[ERROR_SYMBOL]: true;
|
|
94
|
+
status: number;
|
|
95
|
+
message: string;
|
|
96
|
+
description: string;
|
|
97
|
+
}
|
|
98
|
+
type BaseReturn<T> = Awaited<T> extends {
|
|
99
|
+
toJSON(): infer R;
|
|
100
|
+
} ? R : Awaited<T>;
|
|
101
|
+
type BaseRequestType = 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options';
|
|
102
|
+
declare const ResponseSymbol: unique symbol;
|
|
103
|
+
declare class CustomResponse<Value> {
|
|
104
|
+
[ResponseSymbol]: Value;
|
|
105
|
+
}
|
|
106
|
+
type ExtractResponse<Class extends CustomResponse<any>> = Class extends CustomResponse<infer Value> ? Value : never;
|
|
107
|
+
|
|
108
|
+
export { type BaseCtx as B, type ControllerMeta as C, type DefaultOptions as D, type Emitter as E, IS_DEV as I, LOG_LEVEL as L, type MetaData as M, type OmitFunction as O, type PickFunc as P, type ServiceMetaData as S, type ToClientMap as T, type ControllerMetaData as a, type BaseError as b, type ToClientInstance as c, type ToClientFn as d, type BaseReturn as e, type BaseRequestType as f, CustomResponse as g, type ExtractResponse as h, Meta as i, ERROR_SYMBOL as j, IS_ONLY_GENERATE as k, IS_STRICT as l, IS_PURE as m, PS_EXIT_CODE as n };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { D as DefaultOptions, B as BaseCtx } from './types-C6hpZpnS.js';
|
|
2
|
+
|
|
3
|
+
interface RpcServerOptions extends DefaultOptions {
|
|
4
|
+
defaultQueue?: string;
|
|
5
|
+
}
|
|
6
|
+
interface RpcCtx extends BaseCtx {
|
|
7
|
+
args: any[];
|
|
8
|
+
id: string;
|
|
9
|
+
queue: string;
|
|
10
|
+
isEvent?: boolean;
|
|
11
|
+
category: 'rpc';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type { RpcCtx as R, RpcServerOptions as a };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { D as DefaultOptions, B as BaseCtx } from './types-pCI7fyyv.js';
|
|
2
|
+
|
|
3
|
+
interface RpcServerOptions extends DefaultOptions {
|
|
4
|
+
defaultQueue?: string;
|
|
5
|
+
}
|
|
6
|
+
interface RpcClientOptions {
|
|
7
|
+
key?: string;
|
|
8
|
+
timeout?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
}
|
|
11
|
+
interface RpcCtx extends BaseCtx {
|
|
12
|
+
args: any[];
|
|
13
|
+
id: string;
|
|
14
|
+
queue: string;
|
|
15
|
+
isEvent?: boolean;
|
|
16
|
+
category: 'rpc';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type { RpcCtx as R, RpcServerOptions as a, RpcClientOptions as b };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Events, Construct } from 'phecda-core';
|
|
2
|
+
|
|
3
|
+
interface ServiceMetaData {
|
|
4
|
+
func: string;
|
|
5
|
+
name: string;
|
|
6
|
+
tag: string;
|
|
7
|
+
define?: any;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
interface ControllerMetaData extends ServiceMetaData {
|
|
11
|
+
controller: string;
|
|
12
|
+
http?: {
|
|
13
|
+
type: BaseRequestType;
|
|
14
|
+
prefix: string;
|
|
15
|
+
route: string;
|
|
16
|
+
headers?: Record<string, string>;
|
|
17
|
+
};
|
|
18
|
+
rpc?: {
|
|
19
|
+
queue?: string;
|
|
20
|
+
isEvent?: boolean;
|
|
21
|
+
};
|
|
22
|
+
ctxs?: string[];
|
|
23
|
+
params: {
|
|
24
|
+
type: string;
|
|
25
|
+
index: number;
|
|
26
|
+
key: string;
|
|
27
|
+
pipe?: string;
|
|
28
|
+
define: Record<string, any>;
|
|
29
|
+
}[];
|
|
30
|
+
guards: string[];
|
|
31
|
+
pipe?: string;
|
|
32
|
+
filter?: string;
|
|
33
|
+
addons: string[];
|
|
34
|
+
}
|
|
35
|
+
type MetaData = ControllerMetaData | ServiceMetaData;
|
|
36
|
+
declare class Meta {
|
|
37
|
+
data: MetaData;
|
|
38
|
+
paramsType: any[];
|
|
39
|
+
constructor(data: MetaData, paramsType: any[]);
|
|
40
|
+
}
|
|
41
|
+
interface ControllerMeta extends Meta {
|
|
42
|
+
data: ControllerMetaData;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare const ERROR_SYMBOL = "__PS_ERROR__";
|
|
46
|
+
declare const IS_DEV: boolean;
|
|
47
|
+
declare const IS_ONLY_GENERATE: boolean;
|
|
48
|
+
declare const IS_STRICT: boolean;
|
|
49
|
+
declare const IS_PURE: boolean;
|
|
50
|
+
declare const LOG_LEVEL: number;
|
|
51
|
+
declare enum PS_EXIT_CODE {
|
|
52
|
+
RELAUNCH = 2,
|
|
53
|
+
CODE = 4
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface Emitter {
|
|
57
|
+
on<N extends keyof Events>(eventName: N, cb: (args: Events[N]) => void): void;
|
|
58
|
+
once<N extends keyof Events>(eventName: N, cb: (args: Events[N]) => void): void;
|
|
59
|
+
off<N extends keyof Events>(eventName: N, cb: (args: Events[N]) => void): void;
|
|
60
|
+
removeAllListeners<N extends keyof Events>(eventName: N): void;
|
|
61
|
+
emit<N extends keyof Events>(eventName: N, param: Events[N]): void;
|
|
62
|
+
}
|
|
63
|
+
type AnyFunction = (...args: any) => any;
|
|
64
|
+
type ParseInstance<Instance extends Record<string, AnyFunction>> = {
|
|
65
|
+
[Key in keyof Instance]: ToClientFn<Instance[Key]>;
|
|
66
|
+
};
|
|
67
|
+
type PickFuncKeys<Type> = {
|
|
68
|
+
[Key in keyof Type]: Type[Key] extends (...args: any) => any ? (ReturnType<Type[Key]> extends CustomResponse<any> ? never : Key) : never;
|
|
69
|
+
}[keyof Type];
|
|
70
|
+
type ToClientMap<ControllerMap extends Record<string, Construct>> = {
|
|
71
|
+
[Key in keyof ControllerMap]: ToClientInstance<InstanceType<ControllerMap[Key]>>;
|
|
72
|
+
};
|
|
73
|
+
type ToClientInstance<Instance extends Record<string, any>> = ParseInstance<PickFunc<Instance>>;
|
|
74
|
+
type ToClientFn<Func extends AnyFunction> = (...p: Parameters<Func>) => Promise<BaseReturn<ReturnType<Func>>>;
|
|
75
|
+
type PickFunc<Instance> = Pick<Instance, PickFuncKeys<Instance>>;
|
|
76
|
+
type OmitFunction<Instance> = Omit<Instance, PickFuncKeys<Instance>>;
|
|
77
|
+
interface BaseCtx {
|
|
78
|
+
meta: ControllerMeta;
|
|
79
|
+
moduleMap: Record<string, any>;
|
|
80
|
+
type: string;
|
|
81
|
+
tag: string;
|
|
82
|
+
func: string;
|
|
83
|
+
category: string;
|
|
84
|
+
[key: string]: any;
|
|
85
|
+
}
|
|
86
|
+
interface DefaultOptions {
|
|
87
|
+
globalGuards?: string[];
|
|
88
|
+
globalFilter?: string;
|
|
89
|
+
globalPipe?: string;
|
|
90
|
+
globalAddons?: string[];
|
|
91
|
+
}
|
|
92
|
+
interface BaseError {
|
|
93
|
+
[ERROR_SYMBOL]: true;
|
|
94
|
+
status: number;
|
|
95
|
+
message: string;
|
|
96
|
+
description: string;
|
|
97
|
+
}
|
|
98
|
+
type BaseReturn<T> = Awaited<T> extends {
|
|
99
|
+
toJSON(): infer R;
|
|
100
|
+
} ? R : Awaited<T>;
|
|
101
|
+
type BaseRequestType = 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options';
|
|
102
|
+
declare const ResponseSymbol: unique symbol;
|
|
103
|
+
declare class CustomResponse<Value> {
|
|
104
|
+
[ResponseSymbol]: Value;
|
|
105
|
+
}
|
|
106
|
+
type ExtractResponse<Class extends CustomResponse<any>> = Class extends CustomResponse<infer Value> ? Value : never;
|
|
107
|
+
|
|
108
|
+
export { type BaseCtx as B, type ControllerMeta as C, type DefaultOptions as D, type Emitter as E, IS_DEV as I, LOG_LEVEL as L, type MetaData as M, type OmitFunction as O, type PickFunc as P, type ServiceMetaData as S, type ToClientMap as T, type ControllerMetaData as a, type BaseError as b, type ToClientInstance as c, type ToClientFn as d, type BaseReturn as e, type BaseRequestType as f, CustomResponse as g, type ExtractResponse as h, Meta as i, ERROR_SYMBOL as j, IS_ONLY_GENERATE as k, IS_STRICT as l, IS_PURE as m, PS_EXIT_CODE as n };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Events, Construct } from 'phecda-core';
|
|
2
|
+
|
|
3
|
+
interface ServiceMetaData {
|
|
4
|
+
func: string;
|
|
5
|
+
name: string;
|
|
6
|
+
tag: string;
|
|
7
|
+
define?: any;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
interface ControllerMetaData extends ServiceMetaData {
|
|
11
|
+
controller: string;
|
|
12
|
+
http?: {
|
|
13
|
+
type: BaseRequestType;
|
|
14
|
+
prefix: string;
|
|
15
|
+
route: string;
|
|
16
|
+
headers?: Record<string, string>;
|
|
17
|
+
};
|
|
18
|
+
rpc?: {
|
|
19
|
+
queue?: string;
|
|
20
|
+
isEvent?: boolean;
|
|
21
|
+
};
|
|
22
|
+
ctxs?: string[];
|
|
23
|
+
params: {
|
|
24
|
+
type: string;
|
|
25
|
+
index: number;
|
|
26
|
+
key: string;
|
|
27
|
+
pipe?: string;
|
|
28
|
+
define: Record<string, any>;
|
|
29
|
+
}[];
|
|
30
|
+
guards: string[];
|
|
31
|
+
pipe?: string;
|
|
32
|
+
filter?: string;
|
|
33
|
+
addons: string[];
|
|
34
|
+
}
|
|
35
|
+
type MetaData = ControllerMetaData | ServiceMetaData;
|
|
36
|
+
declare class Meta {
|
|
37
|
+
data: MetaData;
|
|
38
|
+
paramsType: any[];
|
|
39
|
+
constructor(data: MetaData, paramsType: any[]);
|
|
40
|
+
}
|
|
41
|
+
interface ControllerMeta extends Meta {
|
|
42
|
+
data: ControllerMetaData;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare const ERROR_SYMBOL = "__PS_ERROR__";
|
|
46
|
+
declare const IS_DEV: boolean;
|
|
47
|
+
declare const IS_ONLY_GENERATE: boolean;
|
|
48
|
+
declare const IS_STRICT: boolean;
|
|
49
|
+
declare const IS_PURE: boolean;
|
|
50
|
+
declare const LOG_LEVEL: number;
|
|
51
|
+
declare enum PS_EXIT_CODE {
|
|
52
|
+
RELAUNCH = 2,
|
|
53
|
+
CODE = 4
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface Emitter {
|
|
57
|
+
on<N extends keyof Events>(eventName: N, cb: (args: Events[N]) => void): void;
|
|
58
|
+
once<N extends keyof Events>(eventName: N, cb: (args: Events[N]) => void): void;
|
|
59
|
+
off<N extends keyof Events>(eventName: N, cb: (args: Events[N]) => void): void;
|
|
60
|
+
removeAllListeners<N extends keyof Events>(eventName: N): void;
|
|
61
|
+
emit<N extends keyof Events>(eventName: N, param: Events[N]): void;
|
|
62
|
+
}
|
|
63
|
+
type AnyFunction = (...args: any) => any;
|
|
64
|
+
type ParseInstance<Instance extends Record<string, AnyFunction>> = {
|
|
65
|
+
[Key in keyof Instance]: ToClientFn<Instance[Key]>;
|
|
66
|
+
};
|
|
67
|
+
type PickFuncKeys<Type> = {
|
|
68
|
+
[Key in keyof Type]: Type[Key] extends (...args: any) => any ? (ReturnType<Type[Key]> extends CustomResponse<any> ? never : Key) : never;
|
|
69
|
+
}[keyof Type];
|
|
70
|
+
type ToClientMap<ControllerMap extends Record<string, Construct>> = {
|
|
71
|
+
[Key in keyof ControllerMap]: ToClientInstance<InstanceType<ControllerMap[Key]>>;
|
|
72
|
+
};
|
|
73
|
+
type ToClientInstance<Instance extends Record<string, any>> = ParseInstance<PickFunc<Instance>>;
|
|
74
|
+
type ToClientFn<Func extends AnyFunction> = (...p: Parameters<Func>) => Promise<BaseReturn<ReturnType<Func>>>;
|
|
75
|
+
type PickFunc<Instance> = Pick<Instance, PickFuncKeys<Instance>>;
|
|
76
|
+
type OmitFunction<Instance> = Omit<Instance, PickFuncKeys<Instance>>;
|
|
77
|
+
interface BaseCtx {
|
|
78
|
+
meta: ControllerMeta;
|
|
79
|
+
moduleMap: Record<string, any>;
|
|
80
|
+
type: string;
|
|
81
|
+
tag: string;
|
|
82
|
+
func: string;
|
|
83
|
+
category: string;
|
|
84
|
+
[key: string]: any;
|
|
85
|
+
}
|
|
86
|
+
interface DefaultOptions {
|
|
87
|
+
globalGuards?: string[];
|
|
88
|
+
globalFilter?: string;
|
|
89
|
+
globalPipe?: string;
|
|
90
|
+
globalAddons?: string[];
|
|
91
|
+
}
|
|
92
|
+
interface BaseError {
|
|
93
|
+
[ERROR_SYMBOL]: true;
|
|
94
|
+
status: number;
|
|
95
|
+
message: string;
|
|
96
|
+
description: string;
|
|
97
|
+
}
|
|
98
|
+
type BaseReturn<T> = Awaited<T> extends {
|
|
99
|
+
toJSON(): infer R;
|
|
100
|
+
} ? R : Awaited<T>;
|
|
101
|
+
type BaseRequestType = 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options';
|
|
102
|
+
declare const ResponseSymbol: unique symbol;
|
|
103
|
+
declare class CustomResponse<Value> {
|
|
104
|
+
[ResponseSymbol]: Value;
|
|
105
|
+
}
|
|
106
|
+
type ExtractResponse<Class extends CustomResponse<any>> = Class extends CustomResponse<infer Value> ? Value : never;
|
|
107
|
+
|
|
108
|
+
export { type BaseCtx as B, type ControllerMeta as C, type DefaultOptions as D, type Emitter as E, IS_DEV as I, LOG_LEVEL as L, type MetaData as M, type OmitFunction as O, type PickFunc as P, type ServiceMetaData as S, type ToClientMap as T, type ControllerMetaData as a, type BaseError as b, type ToClientInstance as c, type ToClientFn as d, type BaseReturn as e, type BaseRequestType as f, CustomResponse as g, type ExtractResponse as h, Meta as i, ERROR_SYMBOL as j, IS_ONLY_GENERATE as k, IS_STRICT as l, IS_PURE as m, PS_EXIT_CODE as n };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { D as DefaultOptions, B as BaseCtx } from './types-DfNtpP-N.mjs';
|
|
2
|
+
|
|
3
|
+
interface RpcServerOptions extends DefaultOptions {
|
|
4
|
+
defaultQueue?: string;
|
|
5
|
+
}
|
|
6
|
+
interface RpcClientOptions {
|
|
7
|
+
key?: string;
|
|
8
|
+
timeout?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
}
|
|
11
|
+
interface RpcCtx extends BaseCtx {
|
|
12
|
+
args: any[];
|
|
13
|
+
id: string;
|
|
14
|
+
queue: string;
|
|
15
|
+
isEvent?: boolean;
|
|
16
|
+
category: 'rpc';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type { RpcCtx as R, RpcServerOptions as a, RpcClientOptions as b };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { D as DefaultOptions, B as BaseCtx } from './types-B_RVNTOF.js';
|
|
2
|
+
|
|
3
|
+
interface RpcServerOptions extends DefaultOptions {
|
|
4
|
+
defaultQueue?: string;
|
|
5
|
+
}
|
|
6
|
+
interface RpcCtx extends BaseCtx {
|
|
7
|
+
args: any[];
|
|
8
|
+
id: string;
|
|
9
|
+
queue: string;
|
|
10
|
+
isEvent?: boolean;
|
|
11
|
+
category: 'rpc';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type { RpcCtx as R, RpcServerOptions as a };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phecda-server",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.18",
|
|
4
4
|
"description": "server framework that provide IOC/type-reuse/http&rpc-adaptor",
|
|
5
5
|
"author": "fgsreally",
|
|
6
6
|
"license": "MIT",
|
|
@@ -82,6 +82,10 @@
|
|
|
82
82
|
"require": "./dist/rpc/ws/index.js",
|
|
83
83
|
"import": "./dist/rpc/ws/index.mjs"
|
|
84
84
|
},
|
|
85
|
+
"./web-ext": {
|
|
86
|
+
"require": "./dist/rpc/web-ext/index.js",
|
|
87
|
+
"import": "./dist/rpc/web-ext/index.mjs"
|
|
88
|
+
},
|
|
85
89
|
"./register": "./register/index.mjs",
|
|
86
90
|
"./*": "./*"
|
|
87
91
|
},
|
|
@@ -156,12 +160,13 @@
|
|
|
156
160
|
"picocolors": "^1.0.0",
|
|
157
161
|
"reflect-metadata": "^0.1.13",
|
|
158
162
|
"ts-mixer": "^6.0.4",
|
|
159
|
-
"phecda-core": "4.1.0-alpha.
|
|
163
|
+
"phecda-core": "4.1.0-alpha.2"
|
|
160
164
|
},
|
|
161
165
|
"devDependencies": {
|
|
162
166
|
"@koa/router": "^12.0.1",
|
|
163
167
|
"@nucleoidjs/kafkajs-mock": "^0.0.1",
|
|
164
168
|
"@types/amqplib": "^0.10.1",
|
|
169
|
+
"@types/chrome": "^0.0.309",
|
|
165
170
|
"@types/debug": "^4.1.12",
|
|
166
171
|
"@types/express": "^4.17.17",
|
|
167
172
|
"@types/fs-extra": "^11.0.4",
|
package/register/index.mjs
CHANGED
|
@@ -16,8 +16,8 @@ const fileModelMap = new Map()
|
|
|
16
16
|
|
|
17
17
|
port1.on('message', async (data) => {
|
|
18
18
|
const { type, files } = JSON.parse(data)
|
|
19
|
-
if (!isRunning || type === 'relaunch')
|
|
20
|
-
return RELAUNCH()
|
|
19
|
+
if ((!isRunning && type !== 'init') || type === 'relaunch')
|
|
20
|
+
return RELAUNCH()
|
|
21
21
|
|
|
22
22
|
if (type === 'change' || type === 'init') {
|
|
23
23
|
if (!files.length)
|
package/register/loader.mjs
CHANGED
|
@@ -27,7 +27,7 @@ const configPath = resolvePath(
|
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
// unimport
|
|
30
|
-
let unimportRet
|
|
30
|
+
let unimportRet, customLoad, customResolve
|
|
31
31
|
const dtsPath = process.env.PS_DTS_PATH || 'ps.d.ts'
|
|
32
32
|
|
|
33
33
|
// graph
|
|
@@ -72,21 +72,21 @@ export async function initialize(data) {
|
|
|
72
72
|
debug('read config...')
|
|
73
73
|
|
|
74
74
|
config = require(configPath)
|
|
75
|
-
|
|
76
|
-
// sources: [
|
|
77
|
-
// {
|
|
78
|
-
// files: configPath,
|
|
79
|
-
// extensions: ['ts', 'mts', 'cts', 'js', 'mjs', 'cjs', 'json', ''],
|
|
80
|
-
// },
|
|
81
|
-
// ],
|
|
82
|
-
// merge: false,
|
|
83
|
-
// })
|
|
84
|
-
// config = unconfigRet.config
|
|
85
|
-
if (!config.virtualFile)
|
|
86
|
-
config.virtualFile = {}
|
|
75
|
+
|
|
87
76
|
if (!config.paths)
|
|
88
77
|
config.paths = {}
|
|
89
78
|
|
|
79
|
+
const loaderPath = process.env.PS_LOADER_PATH
|
|
80
|
+
|
|
81
|
+
if (loaderPath) {
|
|
82
|
+
const loader = await import(loaderPath.startsWith('.') ? resolvePath(workdir, loaderPath) : loaderPath)
|
|
83
|
+
|
|
84
|
+
if (typeof loader.load === 'function')
|
|
85
|
+
customLoad = loader.load
|
|
86
|
+
|
|
87
|
+
if (typeof loader.resolve === 'function')
|
|
88
|
+
customResolve = loader.resolve
|
|
89
|
+
}
|
|
90
90
|
if (IS_DEV) {
|
|
91
91
|
chokidar.watch(configPath, { persistent: true }).on('change', () => {
|
|
92
92
|
port.postMessage(
|
|
@@ -99,6 +99,7 @@ export async function initialize(data) {
|
|
|
99
99
|
|
|
100
100
|
if (!config.unimport)
|
|
101
101
|
return
|
|
102
|
+
|
|
102
103
|
unimportRet = await genUnImportRet(config.unimport)
|
|
103
104
|
if (unimportRet) {
|
|
104
105
|
debug('auto import...')
|
|
@@ -145,12 +146,14 @@ function getFileMid(file) {
|
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
export const resolve = async (specifier, context, nextResolve) => {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
149
|
+
if (customResolve) {
|
|
150
|
+
const url = await customResolve(specifier, context)
|
|
151
|
+
if (url) {
|
|
152
|
+
return {
|
|
153
|
+
format: 'ts',
|
|
154
|
+
url,
|
|
155
|
+
shortCircuit: true,
|
|
156
|
+
}
|
|
154
157
|
}
|
|
155
158
|
}
|
|
156
159
|
|
|
@@ -216,14 +219,6 @@ export const resolve = async (specifier, context, nextResolve) => {
|
|
|
216
219
|
// @todo the first params may be url or path, need to distinguish
|
|
217
220
|
|
|
218
221
|
export const load = async (url, context, nextLoad) => {
|
|
219
|
-
if (config.virtualFile[url]) {
|
|
220
|
-
return {
|
|
221
|
-
format: 'module',
|
|
222
|
-
source: config.virtualFile[url],
|
|
223
|
-
shortCircuit: true,
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
222
|
let mode
|
|
228
223
|
if (context.importAttributes.ps) {
|
|
229
224
|
mode = context.importAttributes.ps
|
|
@@ -274,6 +269,17 @@ export const load = async (url, context, nextLoad) => {
|
|
|
274
269
|
)
|
|
275
270
|
}
|
|
276
271
|
}
|
|
272
|
+
// after hmr
|
|
273
|
+
if (customLoad) {
|
|
274
|
+
const source = await customLoad(url, context)
|
|
275
|
+
if (source) {
|
|
276
|
+
return {
|
|
277
|
+
format: 'module',
|
|
278
|
+
source,
|
|
279
|
+
shortCircuit: true,
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
277
283
|
// resolveModuleName failed
|
|
278
284
|
// I don't know why it failed
|
|
279
285
|
if (!context.format && url.endsWith('.ts'))
|