@adaas/a-frame 0.0.22 → 0.1.1
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/.conf/tsconfig.browser.json +13 -0
- package/.conf/tsconfig.node.json +14 -0
- package/.env.example +12 -0
- package/dist/browser/A-FrameBrowserStorageBlobs.context-OEQr85oq.d.mts +40 -0
- package/dist/browser/A-FrameBundle.types-DaaUvViw.d.mts +33 -0
- package/dist/browser/A-FrameChannel.types-DWOEUs28.d.mts +142 -0
- package/dist/browser/A-FrameDefinition.entity-DWGN_Ujr.d.mts +329 -0
- package/dist/browser/A-FrameDynamicStructure.entity-DaBgSRCR.d.mts +188 -0
- package/dist/browser/A-FrameLogger.component.env-browser-BIPAP4oQ.d.mts +112 -0
- package/dist/browser/A-FrameNamespace.entity-rCm1AavP.d.mts +125 -0
- package/dist/browser/bundle.d.mts +8 -0
- package/dist/browser/bundle.mjs +2 -0
- package/dist/browser/bundle.mjs.map +1 -0
- package/dist/browser/channel.d.mts +165 -0
- package/dist/browser/channel.mjs +3 -0
- package/dist/browser/channel.mjs.map +1 -0
- package/dist/browser/chunk-5TTVFB3G.mjs +2 -0
- package/dist/browser/chunk-5TTVFB3G.mjs.map +1 -0
- package/dist/browser/chunk-AYN7KUQT.mjs +3 -0
- package/dist/browser/chunk-AYN7KUQT.mjs.map +1 -0
- package/dist/browser/chunk-DMGQW3AO.mjs +2 -0
- package/dist/browser/chunk-DMGQW3AO.mjs.map +1 -0
- package/dist/browser/chunk-G66IL2DR.mjs +2 -0
- package/dist/browser/chunk-G66IL2DR.mjs.map +1 -0
- package/dist/browser/chunk-GOADBDTE.mjs +2 -0
- package/dist/browser/chunk-GOADBDTE.mjs.map +1 -0
- package/dist/browser/chunk-H6OZP4ZV.mjs +2 -0
- package/dist/browser/chunk-H6OZP4ZV.mjs.map +1 -0
- package/dist/browser/chunk-INS7RO3B.mjs +2 -0
- package/dist/browser/chunk-INS7RO3B.mjs.map +1 -0
- package/dist/browser/chunk-K4MZY4ME.mjs +2 -0
- package/dist/browser/chunk-K4MZY4ME.mjs.map +1 -0
- package/dist/browser/chunk-OFKV5GNB.mjs +3 -0
- package/dist/browser/chunk-OFKV5GNB.mjs.map +1 -0
- package/dist/browser/chunk-QATIN7CO.mjs +3 -0
- package/dist/browser/chunk-QATIN7CO.mjs.map +1 -0
- package/dist/browser/chunk-QBBQ37P3.mjs +2 -0
- package/dist/browser/chunk-QBBQ37P3.mjs.map +1 -0
- package/dist/browser/chunk-VDVJWU5T.mjs +2 -0
- package/dist/browser/chunk-VDVJWU5T.mjs.map +1 -0
- package/dist/browser/chunk-X3C4I6YJ.mjs +2 -0
- package/dist/browser/chunk-X3C4I6YJ.mjs.map +1 -0
- package/dist/browser/chunk-YQJFTBGV.mjs +3 -0
- package/dist/browser/chunk-YQJFTBGV.mjs.map +1 -0
- package/dist/browser/chunk-ZVCTU2DN.mjs +3 -0
- package/dist/browser/chunk-ZVCTU2DN.mjs.map +1 -0
- package/dist/browser/core.d.mts +97 -0
- package/dist/browser/core.mjs +2 -0
- package/dist/browser/core.mjs.map +1 -0
- package/dist/browser/crypto.d.mts +35 -0
- package/dist/browser/crypto.mjs +2 -0
- package/dist/browser/crypto.mjs.map +1 -0
- package/dist/browser/definition.d.mts +13 -0
- package/dist/browser/definition.mjs +2 -0
- package/dist/browser/definition.mjs.map +1 -0
- package/dist/browser/dynamic-feature.d.mts +10 -0
- package/dist/browser/dynamic-feature.mjs +2 -0
- package/dist/browser/dynamic-feature.mjs.map +1 -0
- package/dist/browser/dynamic-structure.d.mts +12 -0
- package/dist/browser/dynamic-structure.mjs +2 -0
- package/dist/browser/dynamic-structure.mjs.map +1 -0
- package/dist/browser/env.d.mts +2 -0
- package/dist/browser/env.mjs +2 -0
- package/dist/browser/env.mjs.map +1 -0
- package/dist/browser/frame-index.d.mts +95 -0
- package/dist/browser/frame-index.mjs +2 -0
- package/dist/browser/frame-index.mjs.map +1 -0
- package/dist/browser/index.browser-CZlhzfSP.d.mts +22 -0
- package/dist/browser/index.d.mts +1 -144
- package/dist/browser/index.mjs +1 -1
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/logger.d.mts +41 -0
- package/dist/browser/logger.mjs +2 -0
- package/dist/browser/logger.mjs.map +1 -0
- package/dist/browser/namespace.d.mts +13 -0
- package/dist/browser/namespace.mjs +2 -0
- package/dist/browser/namespace.mjs.map +1 -0
- package/dist/browser/storage.d.mts +194 -0
- package/dist/browser/storage.mjs +2 -0
- package/dist/browser/storage.mjs.map +1 -0
- package/dist/browser/vector.d.mts +15 -0
- package/dist/browser/vector.mjs +2 -0
- package/dist/browser/vector.mjs.map +1 -0
- package/dist/index.cjs +0 -0
- package/dist/node/A-FrameChannel.component-BfBcs734.d.ts +62 -0
- package/dist/node/A-FrameChannel.component-NNKcFViw.d.mts +62 -0
- package/dist/node/A-FrameChannel.types-DQF-IiRq.d.mts +146 -0
- package/dist/node/A-FrameChannel.types-DQF-IiRq.d.ts +146 -0
- package/dist/node/A-FrameDefinition.entity-CAUOdEvU.d.ts +329 -0
- package/dist/node/A-FrameDefinition.entity-DWGN_Ujr.d.mts +329 -0
- package/dist/node/A-FrameDynamicStructure.entity-DaBgSRCR.d.mts +188 -0
- package/dist/node/A-FrameDynamicStructure.entity-DaBgSRCR.d.ts +188 -0
- package/dist/node/A-FrameNamespace.entity-D3fZBGDx.d.ts +125 -0
- package/dist/node/A-FrameNamespace.entity-rCm1AavP.d.mts +125 -0
- package/dist/node/A-FrameStorage.component-BYjHfHJJ.d.mts +107 -0
- package/dist/node/A-FrameStorage.component-CT01fs-t.d.ts +107 -0
- package/dist/node/bundle.cjs +101 -0
- package/dist/node/bundle.cjs.map +1 -0
- package/dist/node/bundle.d.mts +69 -0
- package/dist/node/bundle.d.ts +69 -0
- package/dist/node/bundle.mjs +76 -0
- package/dist/node/bundle.mjs.map +1 -0
- package/dist/node/channel.cjs +60 -0
- package/dist/node/channel.cjs.map +1 -0
- package/dist/node/channel.d.mts +61 -0
- package/dist/node/channel.d.ts +61 -0
- package/dist/node/channel.mjs +11 -0
- package/dist/node/channel.mjs.map +1 -0
- package/dist/node/chunk-3LOMGNWA.cjs +8 -0
- package/dist/node/chunk-3LOMGNWA.cjs.map +1 -0
- package/dist/node/chunk-3ONWH75E.mjs +257 -0
- package/dist/node/chunk-3ONWH75E.mjs.map +1 -0
- package/dist/node/chunk-3TD2PEDZ.mjs +53 -0
- package/dist/node/chunk-3TD2PEDZ.mjs.map +1 -0
- package/dist/node/chunk-442DXGOD.mjs +16 -0
- package/dist/node/chunk-442DXGOD.mjs.map +1 -0
- package/dist/node/chunk-5BKCX2RO.mjs +33 -0
- package/dist/node/chunk-5BKCX2RO.mjs.map +1 -0
- package/dist/node/chunk-6EFXNUL4.mjs +6 -0
- package/dist/node/chunk-6EFXNUL4.mjs.map +1 -0
- package/dist/node/chunk-6KAGWGTE.mjs +529 -0
- package/dist/node/chunk-6KAGWGTE.mjs.map +1 -0
- package/dist/node/chunk-7A6XGT5J.cjs +541 -0
- package/dist/node/chunk-7A6XGT5J.cjs.map +1 -0
- package/dist/node/chunk-AOQRXZPC.mjs +207 -0
- package/dist/node/chunk-AOQRXZPC.mjs.map +1 -0
- package/dist/node/chunk-APRYHBEF.mjs +171 -0
- package/dist/node/chunk-APRYHBEF.mjs.map +1 -0
- package/dist/node/chunk-B7BXP7K4.mjs +253 -0
- package/dist/node/chunk-B7BXP7K4.mjs.map +1 -0
- package/dist/node/chunk-B7ZDJXD3.cjs +35 -0
- package/dist/node/chunk-B7ZDJXD3.cjs.map +1 -0
- package/dist/node/chunk-CP6JHUU6.cjs +541 -0
- package/dist/node/chunk-CP6JHUU6.cjs.map +1 -0
- package/dist/node/chunk-DDCEMKBP.mjs +655 -0
- package/dist/node/chunk-DDCEMKBP.mjs.map +1 -0
- package/dist/node/chunk-DMY44VUG.mjs +655 -0
- package/dist/node/chunk-DMY44VUG.mjs.map +1 -0
- package/dist/node/chunk-F46TSY2K.cjs +541 -0
- package/dist/node/chunk-F46TSY2K.cjs.map +1 -0
- package/dist/node/chunk-F4UCOZW5.mjs +33 -0
- package/dist/node/chunk-F4UCOZW5.mjs.map +1 -0
- package/dist/node/chunk-GBTFMT3K.cjs +256 -0
- package/dist/node/chunk-GBTFMT3K.cjs.map +1 -0
- package/dist/node/chunk-GNVXVK2B.cjs +8 -0
- package/dist/node/chunk-GNVXVK2B.cjs.map +1 -0
- package/dist/node/chunk-GRR6NNWY.cjs +688 -0
- package/dist/node/chunk-GRR6NNWY.cjs.map +1 -0
- package/dist/node/chunk-IIVYTS5M.mjs +239 -0
- package/dist/node/chunk-IIVYTS5M.mjs.map +1 -0
- package/dist/node/chunk-JQBYDEMW.mjs +33 -0
- package/dist/node/chunk-JQBYDEMW.mjs.map +1 -0
- package/dist/node/chunk-K4MZY4ME.mjs +3 -0
- package/dist/node/chunk-K4MZY4ME.mjs.map +1 -0
- package/dist/node/chunk-KK64VLZN.cjs +4 -0
- package/dist/node/chunk-KK64VLZN.cjs.map +1 -0
- package/dist/node/chunk-KLG6HKFU.cjs +175 -0
- package/dist/node/chunk-KLG6HKFU.cjs.map +1 -0
- package/dist/node/chunk-LJIZ47HO.cjs +688 -0
- package/dist/node/chunk-LJIZ47HO.cjs.map +1 -0
- package/dist/node/chunk-NIXKAQVP.cjs +35 -0
- package/dist/node/chunk-NIXKAQVP.cjs.map +1 -0
- package/dist/node/chunk-OI76LHVT.mjs +21 -0
- package/dist/node/chunk-OI76LHVT.mjs.map +1 -0
- package/dist/node/chunk-OJGCQNAH.mjs +529 -0
- package/dist/node/chunk-OJGCQNAH.mjs.map +1 -0
- package/dist/node/chunk-OYC6L5NX.mjs +6 -0
- package/dist/node/chunk-OYC6L5NX.mjs.map +1 -0
- package/dist/node/chunk-QFHZIG7Y.cjs +25 -0
- package/dist/node/chunk-QFHZIG7Y.cjs.map +1 -0
- package/dist/node/chunk-QFUZVN4Y.cjs +259 -0
- package/dist/node/chunk-QFUZVN4Y.cjs.map +1 -0
- package/dist/node/chunk-R2H234YO.cjs +8 -0
- package/dist/node/chunk-R2H234YO.cjs.map +1 -0
- package/dist/node/chunk-RRLTGGM7.cjs +209 -0
- package/dist/node/chunk-RRLTGGM7.cjs.map +1 -0
- package/dist/node/chunk-SDKIJDMH.mjs +655 -0
- package/dist/node/chunk-SDKIJDMH.mjs.map +1 -0
- package/dist/node/chunk-TO4BPKCY.mjs +6 -0
- package/dist/node/chunk-TO4BPKCY.mjs.map +1 -0
- package/dist/node/chunk-UKKCN7CQ.cjs +688 -0
- package/dist/node/chunk-UKKCN7CQ.cjs.map +1 -0
- package/dist/node/chunk-UPA7VN4R.mjs +153 -0
- package/dist/node/chunk-UPA7VN4R.mjs.map +1 -0
- package/dist/node/chunk-UTJ7CVVB.cjs +248 -0
- package/dist/node/chunk-UTJ7CVVB.cjs.map +1 -0
- package/dist/node/chunk-XFUF7SDO.cjs +35 -0
- package/dist/node/chunk-XFUF7SDO.cjs.map +1 -0
- package/dist/node/chunk-YVX4W6SI.cjs +155 -0
- package/dist/node/chunk-YVX4W6SI.cjs.map +1 -0
- package/dist/node/chunk-YWWGJ6EJ.cjs +55 -0
- package/dist/node/chunk-YWWGJ6EJ.cjs.map +1 -0
- package/dist/node/chunk-Z4HUCRK2.mjs +529 -0
- package/dist/node/chunk-Z4HUCRK2.mjs.map +1 -0
- package/dist/node/chunk-ZM2RLVVH.cjs +18 -0
- package/dist/node/chunk-ZM2RLVVH.cjs.map +1 -0
- package/dist/node/core.cjs +259 -0
- package/dist/node/core.cjs.map +1 -0
- package/dist/node/core.d.mts +76 -0
- package/dist/node/core.d.ts +76 -0
- package/dist/node/core.mjs +248 -0
- package/dist/node/core.mjs.map +1 -0
- package/dist/node/crypto.cjs +13 -0
- package/dist/node/crypto.cjs.map +1 -0
- package/dist/node/crypto.d.mts +44 -0
- package/dist/node/crypto.d.ts +44 -0
- package/dist/node/crypto.mjs +4 -0
- package/dist/node/crypto.mjs.map +1 -0
- package/dist/node/definition.cjs +19 -0
- package/dist/node/definition.cjs.map +1 -0
- package/dist/node/definition.d.mts +13 -0
- package/dist/node/definition.d.ts +13 -0
- package/dist/node/definition.mjs +6 -0
- package/dist/node/definition.mjs.map +1 -0
- package/dist/node/dynamic-feature.cjs +14 -0
- package/dist/node/dynamic-feature.cjs.map +1 -0
- package/dist/node/dynamic-feature.d.mts +10 -0
- package/dist/node/dynamic-feature.d.ts +10 -0
- package/dist/node/dynamic-feature.mjs +12 -0
- package/dist/node/dynamic-feature.mjs.map +1 -0
- package/dist/node/dynamic-structure.cjs +143 -0
- package/dist/node/dynamic-structure.cjs.map +1 -0
- package/dist/node/dynamic-structure.d.mts +12 -0
- package/dist/node/dynamic-structure.d.ts +12 -0
- package/dist/node/dynamic-structure.mjs +138 -0
- package/dist/node/dynamic-structure.mjs.map +1 -0
- package/dist/node/env.cjs +14 -0
- package/dist/node/env.cjs.map +1 -0
- package/dist/node/env.d.mts +22 -0
- package/dist/node/env.d.ts +22 -0
- package/dist/node/env.mjs +5 -0
- package/dist/node/env.mjs.map +1 -0
- package/dist/node/frame-index.cjs +16 -0
- package/dist/node/frame-index.cjs.map +1 -0
- package/dist/node/frame-index.d.mts +95 -0
- package/dist/node/frame-index.d.ts +95 -0
- package/dist/node/frame-index.mjs +7 -0
- package/dist/node/frame-index.mjs.map +1 -0
- package/dist/node/index.cjs +0 -288
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.mts +1 -144
- package/dist/node/index.d.ts +1 -144
- package/dist/node/index.mjs +0 -284
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/logger.cjs +41 -0
- package/dist/node/logger.cjs.map +1 -0
- package/dist/node/logger.d.mts +150 -0
- package/dist/node/logger.d.ts +150 -0
- package/dist/node/logger.mjs +4 -0
- package/dist/node/logger.mjs.map +1 -0
- package/dist/node/namespace.cjs +24 -0
- package/dist/node/namespace.cjs.map +1 -0
- package/dist/node/namespace.d.mts +13 -0
- package/dist/node/namespace.d.ts +13 -0
- package/dist/node/namespace.mjs +7 -0
- package/dist/node/namespace.mjs.map +1 -0
- package/dist/node/storage.cjs +42 -0
- package/dist/node/storage.cjs.map +1 -0
- package/dist/node/storage.d.mts +110 -0
- package/dist/node/storage.d.ts +110 -0
- package/dist/node/storage.mjs +13 -0
- package/dist/node/storage.mjs.map +1 -0
- package/dist/node/vector.cjs +13 -0
- package/dist/node/vector.cjs.map +1 -0
- package/dist/node/vector.d.mts +15 -0
- package/dist/node/vector.d.ts +15 -0
- package/dist/node/vector.mjs +4 -0
- package/dist/node/vector.mjs.map +1 -0
- package/jest.config.browser.ts +41 -0
- package/jest.config.ts +18 -8
- package/package.json +125 -13
- package/{index.ts → src/concept.ts} +5 -2
- package/src/helpers/Hash.helper.ts +14 -0
- package/src/index.ts +0 -24
- package/src/lib/A-Frame/A-Frame.component.env-browser.ts +126 -0
- package/src/lib/A-Frame/A-Frame.component.env-node.ts +105 -0
- package/src/lib/A-Frame/A-Frame.component.ts +62 -0
- package/src/lib/A-Frame/A-Frame.context.ts +40 -0
- package/src/lib/{components/Index.component.ts/Index.error.ts → A-Frame/A-Frame.error.ts} +1 -1
- package/src/lib/{components/Index.component.ts/Index.guard.ts → A-Frame/A-Frame.guard.ts} +9 -6
- package/src/lib/A-Frame/A-Frame.meta.ts +27 -0
- package/src/lib/{components/Index.component.ts/Index.types.ts → A-Frame/A-Frame.types.ts} +52 -17
- package/src/lib/A-Frame/decorators/A-FrameDefine.decorator.ts +104 -0
- package/src/lib/A-Frame/decorators/A-FrameNamespace.decorator.ts +33 -0
- package/src/lib/A-Frame/index.browser.ts +10 -0
- package/src/lib/A-Frame/index.ts +10 -0
- package/src/lib/A-FrameBundle/A-FrameBundle.builder.env-node.ts +95 -0
- package/src/lib/A-FrameBundle/A-FrameBundle.constants.ts +5 -0
- package/src/lib/A-FrameBundle/A-FrameBundle.types.ts +31 -0
- package/src/lib/A-FrameBundle/index.browser.ts +6 -0
- package/src/lib/A-FrameBundle/index.ts +7 -0
- package/src/lib/A-FrameCLI/A-FrameCLI.container.ts +333 -0
- package/src/lib/A-FrameChannel/A-FrameChannel.component.env-browser.ts +63 -0
- package/src/lib/A-FrameChannel/A-FrameChannel.component.env-node.ts +586 -0
- package/src/lib/A-FrameChannel/A-FrameChannel.component.ts +273 -0
- package/src/lib/A-FrameChannel/A-FrameChannel.constants.ts +39 -0
- package/src/lib/A-FrameChannel/A-FrameChannel.error.ts +10 -0
- package/src/lib/A-FrameChannel/A-FrameChannel.types.ts +143 -0
- package/src/lib/A-FrameChannel/A-FrameChannelEvent.context.ts +28 -0
- package/src/lib/A-FrameChannel/A-FrameChannelRequest.context.ts +36 -0
- package/src/lib/A-FrameChannel/A-FrameChannelSocket.entity.ts +189 -0
- package/src/lib/A-FrameChannel/A-FrameChannelStream.entity.ts +144 -0
- package/src/lib/A-FrameChannel/index.browser.ts +3 -0
- package/src/lib/A-FrameChannel/index.ts +10 -0
- package/src/lib/A-FrameCrypto/A-FrameCrypto.component.env-browser.ts +123 -0
- package/src/lib/A-FrameCrypto/A-FrameCrypto.component.env-node.ts +204 -0
- package/src/lib/A-FrameCrypto/index.browser.ts +1 -0
- package/src/lib/A-FrameCrypto/index.ts +1 -0
- package/src/lib/A-FrameDefinition/A-FrameDefinition.constants.ts +8 -0
- package/src/lib/A-FrameDefinition/A-FrameDefinition.entity.ts +290 -0
- package/src/lib/A-FrameDefinition/A-FrameDefinition.types.ts +109 -0
- package/src/lib/A-FrameDefinition/index.ts +3 -0
- package/src/lib/A-FrameDynamicFeature/A-FrameDynamicFeature.entity.ts +13 -0
- package/src/lib/A-FrameDynamicFeature/A-FrameDynamicFeature.types.ts +10 -0
- package/src/lib/A-FrameDynamicFeature/index.ts +2 -0
- package/src/lib/A-FrameDynamicPatch/A-FrameDynamicPatch.entity.ts +38 -0
- package/src/lib/A-FrameDynamicPatch/A-FrameDynamicPatch.types.ts +20 -0
- package/src/lib/A-FrameDynamicSession/A-FrameDynamicSession.constants.ts +9 -0
- package/src/lib/A-FrameDynamicSession/A-FrameDynamicSession.entity.ts +91 -0
- package/src/lib/A-FrameDynamicSession/A-FrameDynamicSession.types.ts +18 -0
- package/src/lib/A-FrameDynamicStructure/A-FrameDynamicStructure.constants.ts +13 -0
- package/src/lib/A-FrameDynamicStructure/A-FrameDynamicStructure.entity.ts +187 -0
- package/src/lib/A-FrameDynamicStructure/A-FrameDynamicStructure.error.ts +13 -0
- package/src/lib/A-FrameDynamicStructure/A-FrameDynamicStructure.types.ts +128 -0
- package/src/lib/A-FrameDynamicStructure/A-FrameDynamicStructureOperation.context.ts +32 -0
- package/src/lib/A-FrameDynamicStructure/index.ts +5 -0
- package/src/lib/A-FrameEnv/A-FrameEnv.fragment.env-browser.ts +31 -0
- package/src/lib/A-FrameEnv/A-FrameEnv.fragment.env-node.ts +39 -0
- package/src/lib/A-FrameEnv/A-FrameEnv.types.ts +7 -0
- package/src/lib/A-FrameEnv/index.browser.ts +1 -0
- package/src/lib/A-FrameEnv/index.ts +1 -0
- package/src/lib/A-FrameIndex/A-FrameIndex.context.ts +321 -0
- package/src/lib/A-FrameIndex/A-FrameIndex.types.ts +63 -0
- package/src/lib/A-FrameIndex/index.browser.ts +3 -0
- package/src/lib/A-FrameIndex/index.ts +3 -0
- package/src/lib/A-FrameLogger/A-FrameLogger.component.env-browser.ts +99 -0
- package/src/lib/A-FrameLogger/A-FrameLogger.component.env-node.ts +129 -0
- package/src/lib/A-FrameLogger/A-FrameLogger.component.ts +123 -0
- package/src/lib/A-FrameLogger/A-FrameLogger.constants.ts +66 -0
- package/src/lib/A-FrameLogger/A-FrameLogger.types.ts +67 -0
- package/src/lib/A-FrameLogger/index.browser.ts +4 -0
- package/src/lib/A-FrameLogger/index.ts +4 -0
- package/src/lib/A-FrameNamespace/A-FrameNamespace.constants.ts +12 -0
- package/src/lib/A-FrameNamespace/A-FrameNamespace.entity.ts +211 -0
- package/src/lib/A-FrameNamespace/A-FrameNamespace.types.ts +72 -0
- package/src/lib/A-FrameNamespace/index.ts +3 -0
- package/src/lib/A-FrameStorage/A-FrameStorage.codec.ts +338 -0
- package/src/lib/A-FrameStorage/A-FrameStorage.component.ts +191 -0
- package/src/lib/A-FrameStorage/A-FrameStorage.constants.ts +11 -0
- package/src/lib/A-FrameStorage/A-FrameStorage.error.ts +13 -0
- package/src/lib/A-FrameStorage/A-FrameStorage.types.ts +98 -0
- package/src/lib/A-FrameStorage/A-FrameStorageOperation.context.ts +59 -0
- package/src/lib/A-FrameStorage/browser/A-FrameBrowserStorage.component.ts +312 -0
- package/src/lib/A-FrameStorage/browser/A-FrameBrowserStorageBlobs.context.ts +77 -0
- package/src/lib/A-FrameStorage/index.browser.ts +11 -0
- package/src/lib/A-FrameStorage/index.ts +10 -0
- package/src/lib/A-FrameStorage/node/A-FrameNodeStorage.component.ts +464 -0
- package/src/lib/A-FrameStorage/server/A-FrameServerStorage.component.ts +177 -0
- package/src/lib/{entities/A_FrameVector/A_FrameVector.entity.ts → A-FrameVector/A-FrameVector.entity.ts} +10 -0
- package/src/lib/A-FrameVector/index.ts +3 -0
- package/tests/A-Frame.browser.test.ts +94 -0
- package/tests/A-Frame.test.ts +74 -67
- package/tests/jest.browser-environment.js +30 -0
- package/tests/jest.polyfills.browser.ts +13 -0
- package/tests/jest.setup.browser.ts +33 -0
- package/tsconfig.browser.json +54 -0
- package/tsconfig.json +16 -0
- package/tsup.config.ts +32 -2
- package/src/lib/components/Builder.component.ts/Builder.component.ts +0 -0
- package/src/lib/components/Index.component.ts/Index.component.ts +0 -79
- package/src/lib/components/Index.component.ts/Index.constants.ts +0 -0
- package/src/lib/components/Index.component.ts/Index.meta.ts +0 -28
- package/src/lib/components/Index.component.ts/IndexConfigurations.meta.ts +0 -78
- package/src/lib/components/Index.component.ts/decorators/IndexComponent.decorator.ts +0 -97
- package/src/lib/components/Index.component.ts/decorators/IndexDescribe.decorator.ts +0 -59
- package/src/lib/components/Index.component.ts/decorators/IndexNamespace.decorator.ts +0 -57
- package/src/lib/components/Search/A_FrameSearch.component.ts +0 -66
- package/src/lib/containers/CLI.container.ts +0 -27
- package/src/lib/entities/Namespace/Namespace.entity.ts +0 -8
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkQFUZVN4Y_cjs = require('./chunk-QFUZVN4Y.cjs');
|
|
4
|
+
var chunkR2H234YO_cjs = require('./chunk-R2H234YO.cjs');
|
|
5
|
+
require('./chunk-QFHZIG7Y.cjs');
|
|
6
|
+
var fs = require('fs/promises');
|
|
7
|
+
var path = require('path');
|
|
8
|
+
var aConcept = require('@adaas/a-concept');
|
|
9
|
+
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
29
|
+
var path__namespace = /*#__PURE__*/_interopNamespace(path);
|
|
30
|
+
|
|
31
|
+
// src/lib/A-FrameBundle/A-FrameBundle.constants.ts
|
|
32
|
+
var A_FRAME_BUNDLE_VERSION = 1;
|
|
33
|
+
var A_FRAME_BUNDLE_DEFAULT_FILENAME = "a-frame-bundle.json";
|
|
34
|
+
|
|
35
|
+
// src/lib/A-FrameBundle/A-FrameBundle.builder.env-node.ts
|
|
36
|
+
var A_FrameBundleBuilder = class extends aConcept.A_Component {
|
|
37
|
+
/** Read all `.aframe` files from a storage directory and serialise them. */
|
|
38
|
+
async build(opts) {
|
|
39
|
+
const ext = chunkQFUZVN4Y_cjs.A_FrameStorageCodec.fileExtension;
|
|
40
|
+
const namespacesFile = `__namespaces${ext}`;
|
|
41
|
+
let entries;
|
|
42
|
+
try {
|
|
43
|
+
entries = await fs__namespace.readdir(opts.storageDir);
|
|
44
|
+
} catch (err) {
|
|
45
|
+
if (err?.code === "ENOENT") {
|
|
46
|
+
throw new Error(`A-Frame storage directory not found: ${opts.storageDir}`);
|
|
47
|
+
}
|
|
48
|
+
throw err;
|
|
49
|
+
}
|
|
50
|
+
const aframeFiles = entries.filter((f) => f.endsWith(ext));
|
|
51
|
+
let namespaces = null;
|
|
52
|
+
const definitions = {};
|
|
53
|
+
for (const file of aframeFiles) {
|
|
54
|
+
const buf = await fs__namespace.readFile(path__namespace.join(opts.storageDir, file));
|
|
55
|
+
const b64 = buf.toString("base64");
|
|
56
|
+
if (file === namespacesFile) {
|
|
57
|
+
namespaces = b64;
|
|
58
|
+
} else {
|
|
59
|
+
const id = file.slice(0, -ext.length);
|
|
60
|
+
definitions[id] = b64;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
bundleVersion: A_FRAME_BUNDLE_VERSION,
|
|
65
|
+
aFrameVersion: chunkR2H234YO_cjs.version || "0.0.0",
|
|
66
|
+
serverVersion: opts.serverVersion,
|
|
67
|
+
builtAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
68
|
+
namespaces,
|
|
69
|
+
definitions
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/** Write the bundle to disk as a JSON file. */
|
|
73
|
+
async writeJSON(bundle, outFile) {
|
|
74
|
+
await fs__namespace.mkdir(path__namespace.dirname(path__namespace.resolve(outFile)), { recursive: true });
|
|
75
|
+
await fs__namespace.writeFile(outFile, JSON.stringify(bundle, null, 2));
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Emit a TypeScript module that exports the bundle as a typed constant.
|
|
79
|
+
* Useful for bundlers that prefer TS imports over JSON imports.
|
|
80
|
+
*/
|
|
81
|
+
async writeTS(bundle, outFile) {
|
|
82
|
+
const banner = "// AUTO-GENERATED by @adaas/a-frame \u2014 do not edit.\n";
|
|
83
|
+
const body = `import type { A_FrameBundle } from '@adaas/a-frame';
|
|
84
|
+
|
|
85
|
+
export const A_FRAME_BUNDLE: A_FrameBundle = ${JSON.stringify(bundle, null, 2)} as A_FrameBundle;
|
|
86
|
+
`;
|
|
87
|
+
await fs__namespace.mkdir(path__namespace.dirname(path__namespace.resolve(outFile)), { recursive: true });
|
|
88
|
+
await fs__namespace.writeFile(outFile, banner + body);
|
|
89
|
+
}
|
|
90
|
+
/** Convenience: detect output format by extension and write. */
|
|
91
|
+
async writeAuto(bundle, outFile) {
|
|
92
|
+
if (/\.tsx?$/.test(outFile)) return this.writeTS(bundle, outFile);
|
|
93
|
+
return this.writeJSON(bundle, outFile);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
exports.A_FRAME_BUNDLE_DEFAULT_FILENAME = A_FRAME_BUNDLE_DEFAULT_FILENAME;
|
|
98
|
+
exports.A_FRAME_BUNDLE_VERSION = A_FRAME_BUNDLE_VERSION;
|
|
99
|
+
exports.A_FrameBundleBuilder = A_FrameBundleBuilder;
|
|
100
|
+
//# sourceMappingURL=bundle.cjs.map
|
|
101
|
+
//# sourceMappingURL=bundle.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/A-FrameBundle/A-FrameBundle.constants.ts","../../src/lib/A-FrameBundle/A-FrameBundle.builder.env-node.ts"],"names":["A_Component","A_FrameStorageCodec","fs","path","version"],"mappings":"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","file":"bundle.cjs","sourcesContent":["/** Current bundle format revision. Bumped on incompatible structural changes. */\nexport const A_FRAME_BUNDLE_VERSION = 1;\n\n/** Default file name when none is provided to the CLI. */\nexport const A_FRAME_BUNDLE_DEFAULT_FILENAME = 'a-frame-bundle.json';\n","import * as fs from 'node:fs/promises';\nimport * as path from 'node:path';\nimport { A_Component } from '@adaas/a-concept';\nimport { A_FrameBundle } from './A-FrameBundle.types';\nimport { A_FRAME_BUNDLE_VERSION } from './A-FrameBundle.constants';\nimport { A_FrameStorageCodec } from '../A-FrameStorage/A-FrameStorage.codec';\nimport * as pkg from '../../../package.json';\n\n\nexport interface A_FrameBundleBuilderOptions {\n /** Source directory containing the encrypted `*.aframe` files (Node storage). */\n storageDir: string;\n /** Server version to embed in the bundle metadata. */\n serverVersion: string;\n}\n\n\n/**\n * A_FrameBundleBuilder — Node-only build-time helper.\n *\n * Reads the encrypted `*.aframe` files produced by Node storage and packages\n * them into a single JSON (or generated TypeScript module) artifact that ships\n * with the browser bundle. The browser bootstrap then seeds these blobs into\n * `A_FrameBrowserStorageBlobs` so that read-only `definition.load()` /\n * `namespace.load()` calls work without a filesystem.\n */\nexport class A_FrameBundleBuilder extends A_Component {\n\n /** Read all `.aframe` files from a storage directory and serialise them. */\n async build(opts: A_FrameBundleBuilderOptions): Promise<A_FrameBundle> {\n const ext = A_FrameStorageCodec.fileExtension; // \".aframe\"\n const namespacesFile = `__namespaces${ext}`;\n\n let entries: string[];\n try {\n entries = await fs.readdir(opts.storageDir);\n } catch (err: any) {\n if (err?.code === 'ENOENT') {\n throw new Error(`A-Frame storage directory not found: ${opts.storageDir}`);\n }\n throw err;\n }\n\n const aframeFiles = entries.filter(f => f.endsWith(ext));\n\n let namespaces: string | null = null;\n const definitions: Record<string, string> = {};\n\n for (const file of aframeFiles) {\n const buf = await fs.readFile(path.join(opts.storageDir, file));\n const b64 = buf.toString('base64');\n\n if (file === namespacesFile) {\n namespaces = b64;\n } else {\n const id = file.slice(0, -ext.length);\n definitions[id] = b64;\n }\n }\n\n return {\n bundleVersion: A_FRAME_BUNDLE_VERSION,\n aFrameVersion: (pkg as any).version || '0.0.0',\n serverVersion: opts.serverVersion,\n builtAt: new Date().toISOString(),\n namespaces,\n definitions,\n };\n }\n\n /** Write the bundle to disk as a JSON file. */\n async writeJSON(bundle: A_FrameBundle, outFile: string): Promise<void> {\n await fs.mkdir(path.dirname(path.resolve(outFile)), { recursive: true });\n await fs.writeFile(outFile, JSON.stringify(bundle, null, 2));\n }\n\n /**\n * Emit a TypeScript module that exports the bundle as a typed constant.\n * Useful for bundlers that prefer TS imports over JSON imports.\n */\n async writeTS(bundle: A_FrameBundle, outFile: string): Promise<void> {\n const banner = '// AUTO-GENERATED by @adaas/a-frame — do not edit.\\n';\n const body =\n `import type { A_FrameBundle } from '@adaas/a-frame';\\n\\n` +\n `export const A_FRAME_BUNDLE: A_FrameBundle = ${JSON.stringify(bundle, null, 2)} as A_FrameBundle;\\n`;\n await fs.mkdir(path.dirname(path.resolve(outFile)), { recursive: true });\n await fs.writeFile(outFile, banner + body);\n }\n\n /** Convenience: detect output format by extension and write. */\n async writeAuto(bundle: A_FrameBundle, outFile: string): Promise<void> {\n if (/\\.tsx?$/.test(outFile)) return this.writeTS(bundle, outFile);\n return this.writeJSON(bundle, outFile);\n }\n}\n"]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { A_Component } from '@adaas/a-concept';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Serialized A-Frame bundle artifact.
|
|
5
|
+
*
|
|
6
|
+
* Built by `A_FrameBundleBuilder` from a Node storage directory at build time
|
|
7
|
+
* (see CLI `--bundle <out>`). Loaded by `A_FrameBrowserStorageBlobs.seedFromBundle()`
|
|
8
|
+
* at app startup in the browser.
|
|
9
|
+
*
|
|
10
|
+
* Storage blobs are kept in their AES-256-GCM encrypted form — the consuming
|
|
11
|
+
* browser app must obtain the encryption key out-of-band (typically by
|
|
12
|
+
* authenticating against the A-Frame server with the user's token).
|
|
13
|
+
*/
|
|
14
|
+
interface A_FrameBundle {
|
|
15
|
+
/** Bundle format version. Currently 1. */
|
|
16
|
+
bundleVersion: number;
|
|
17
|
+
/** A-Frame client library version that produced the bundle. */
|
|
18
|
+
aFrameVersion: string;
|
|
19
|
+
/** A-Frame server version this bundle was embedded against. */
|
|
20
|
+
serverVersion: string;
|
|
21
|
+
/** Build timestamp (ISO 8601). */
|
|
22
|
+
builtAt: string;
|
|
23
|
+
/**
|
|
24
|
+
* Base64-encoded contents of the `__namespaces.aframe` index file.
|
|
25
|
+
* `null` when no namespaces have been persisted yet.
|
|
26
|
+
*/
|
|
27
|
+
namespaces: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Map of namespace id (file basename without extension) → base64-encoded
|
|
30
|
+
* contents of the corresponding `<namespace>.aframe` file.
|
|
31
|
+
*/
|
|
32
|
+
definitions: Record<string, string>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface A_FrameBundleBuilderOptions {
|
|
36
|
+
/** Source directory containing the encrypted `*.aframe` files (Node storage). */
|
|
37
|
+
storageDir: string;
|
|
38
|
+
/** Server version to embed in the bundle metadata. */
|
|
39
|
+
serverVersion: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A_FrameBundleBuilder — Node-only build-time helper.
|
|
43
|
+
*
|
|
44
|
+
* Reads the encrypted `*.aframe` files produced by Node storage and packages
|
|
45
|
+
* them into a single JSON (or generated TypeScript module) artifact that ships
|
|
46
|
+
* with the browser bundle. The browser bootstrap then seeds these blobs into
|
|
47
|
+
* `A_FrameBrowserStorageBlobs` so that read-only `definition.load()` /
|
|
48
|
+
* `namespace.load()` calls work without a filesystem.
|
|
49
|
+
*/
|
|
50
|
+
declare class A_FrameBundleBuilder extends A_Component {
|
|
51
|
+
/** Read all `.aframe` files from a storage directory and serialise them. */
|
|
52
|
+
build(opts: A_FrameBundleBuilderOptions): Promise<A_FrameBundle>;
|
|
53
|
+
/** Write the bundle to disk as a JSON file. */
|
|
54
|
+
writeJSON(bundle: A_FrameBundle, outFile: string): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Emit a TypeScript module that exports the bundle as a typed constant.
|
|
57
|
+
* Useful for bundlers that prefer TS imports over JSON imports.
|
|
58
|
+
*/
|
|
59
|
+
writeTS(bundle: A_FrameBundle, outFile: string): Promise<void>;
|
|
60
|
+
/** Convenience: detect output format by extension and write. */
|
|
61
|
+
writeAuto(bundle: A_FrameBundle, outFile: string): Promise<void>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Current bundle format revision. Bumped on incompatible structural changes. */
|
|
65
|
+
declare const A_FRAME_BUNDLE_VERSION = 1;
|
|
66
|
+
/** Default file name when none is provided to the CLI. */
|
|
67
|
+
declare const A_FRAME_BUNDLE_DEFAULT_FILENAME = "a-frame-bundle.json";
|
|
68
|
+
|
|
69
|
+
export { A_FRAME_BUNDLE_DEFAULT_FILENAME, A_FRAME_BUNDLE_VERSION, type A_FrameBundle, A_FrameBundleBuilder, type A_FrameBundleBuilderOptions };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { A_Component } from '@adaas/a-concept';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Serialized A-Frame bundle artifact.
|
|
5
|
+
*
|
|
6
|
+
* Built by `A_FrameBundleBuilder` from a Node storage directory at build time
|
|
7
|
+
* (see CLI `--bundle <out>`). Loaded by `A_FrameBrowserStorageBlobs.seedFromBundle()`
|
|
8
|
+
* at app startup in the browser.
|
|
9
|
+
*
|
|
10
|
+
* Storage blobs are kept in their AES-256-GCM encrypted form — the consuming
|
|
11
|
+
* browser app must obtain the encryption key out-of-band (typically by
|
|
12
|
+
* authenticating against the A-Frame server with the user's token).
|
|
13
|
+
*/
|
|
14
|
+
interface A_FrameBundle {
|
|
15
|
+
/** Bundle format version. Currently 1. */
|
|
16
|
+
bundleVersion: number;
|
|
17
|
+
/** A-Frame client library version that produced the bundle. */
|
|
18
|
+
aFrameVersion: string;
|
|
19
|
+
/** A-Frame server version this bundle was embedded against. */
|
|
20
|
+
serverVersion: string;
|
|
21
|
+
/** Build timestamp (ISO 8601). */
|
|
22
|
+
builtAt: string;
|
|
23
|
+
/**
|
|
24
|
+
* Base64-encoded contents of the `__namespaces.aframe` index file.
|
|
25
|
+
* `null` when no namespaces have been persisted yet.
|
|
26
|
+
*/
|
|
27
|
+
namespaces: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Map of namespace id (file basename without extension) → base64-encoded
|
|
30
|
+
* contents of the corresponding `<namespace>.aframe` file.
|
|
31
|
+
*/
|
|
32
|
+
definitions: Record<string, string>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface A_FrameBundleBuilderOptions {
|
|
36
|
+
/** Source directory containing the encrypted `*.aframe` files (Node storage). */
|
|
37
|
+
storageDir: string;
|
|
38
|
+
/** Server version to embed in the bundle metadata. */
|
|
39
|
+
serverVersion: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A_FrameBundleBuilder — Node-only build-time helper.
|
|
43
|
+
*
|
|
44
|
+
* Reads the encrypted `*.aframe` files produced by Node storage and packages
|
|
45
|
+
* them into a single JSON (or generated TypeScript module) artifact that ships
|
|
46
|
+
* with the browser bundle. The browser bootstrap then seeds these blobs into
|
|
47
|
+
* `A_FrameBrowserStorageBlobs` so that read-only `definition.load()` /
|
|
48
|
+
* `namespace.load()` calls work without a filesystem.
|
|
49
|
+
*/
|
|
50
|
+
declare class A_FrameBundleBuilder extends A_Component {
|
|
51
|
+
/** Read all `.aframe` files from a storage directory and serialise them. */
|
|
52
|
+
build(opts: A_FrameBundleBuilderOptions): Promise<A_FrameBundle>;
|
|
53
|
+
/** Write the bundle to disk as a JSON file. */
|
|
54
|
+
writeJSON(bundle: A_FrameBundle, outFile: string): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Emit a TypeScript module that exports the bundle as a typed constant.
|
|
57
|
+
* Useful for bundlers that prefer TS imports over JSON imports.
|
|
58
|
+
*/
|
|
59
|
+
writeTS(bundle: A_FrameBundle, outFile: string): Promise<void>;
|
|
60
|
+
/** Convenience: detect output format by extension and write. */
|
|
61
|
+
writeAuto(bundle: A_FrameBundle, outFile: string): Promise<void>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Current bundle format revision. Bumped on incompatible structural changes. */
|
|
65
|
+
declare const A_FRAME_BUNDLE_VERSION = 1;
|
|
66
|
+
/** Default file name when none is provided to the CLI. */
|
|
67
|
+
declare const A_FRAME_BUNDLE_DEFAULT_FILENAME = "a-frame-bundle.json";
|
|
68
|
+
|
|
69
|
+
export { A_FRAME_BUNDLE_DEFAULT_FILENAME, A_FRAME_BUNDLE_VERSION, type A_FrameBundle, A_FrameBundleBuilder, type A_FrameBundleBuilderOptions };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { A_FrameStorageCodec } from './chunk-3ONWH75E.mjs';
|
|
2
|
+
import { version } from './chunk-OYC6L5NX.mjs';
|
|
3
|
+
import './chunk-OI76LHVT.mjs';
|
|
4
|
+
import * as fs from 'fs/promises';
|
|
5
|
+
import * as path from 'path';
|
|
6
|
+
import { A_Component } from '@adaas/a-concept';
|
|
7
|
+
|
|
8
|
+
// src/lib/A-FrameBundle/A-FrameBundle.constants.ts
|
|
9
|
+
var A_FRAME_BUNDLE_VERSION = 1;
|
|
10
|
+
var A_FRAME_BUNDLE_DEFAULT_FILENAME = "a-frame-bundle.json";
|
|
11
|
+
|
|
12
|
+
// src/lib/A-FrameBundle/A-FrameBundle.builder.env-node.ts
|
|
13
|
+
var A_FrameBundleBuilder = class extends A_Component {
|
|
14
|
+
/** Read all `.aframe` files from a storage directory and serialise them. */
|
|
15
|
+
async build(opts) {
|
|
16
|
+
const ext = A_FrameStorageCodec.fileExtension;
|
|
17
|
+
const namespacesFile = `__namespaces${ext}`;
|
|
18
|
+
let entries;
|
|
19
|
+
try {
|
|
20
|
+
entries = await fs.readdir(opts.storageDir);
|
|
21
|
+
} catch (err) {
|
|
22
|
+
if (err?.code === "ENOENT") {
|
|
23
|
+
throw new Error(`A-Frame storage directory not found: ${opts.storageDir}`);
|
|
24
|
+
}
|
|
25
|
+
throw err;
|
|
26
|
+
}
|
|
27
|
+
const aframeFiles = entries.filter((f) => f.endsWith(ext));
|
|
28
|
+
let namespaces = null;
|
|
29
|
+
const definitions = {};
|
|
30
|
+
for (const file of aframeFiles) {
|
|
31
|
+
const buf = await fs.readFile(path.join(opts.storageDir, file));
|
|
32
|
+
const b64 = buf.toString("base64");
|
|
33
|
+
if (file === namespacesFile) {
|
|
34
|
+
namespaces = b64;
|
|
35
|
+
} else {
|
|
36
|
+
const id = file.slice(0, -ext.length);
|
|
37
|
+
definitions[id] = b64;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
bundleVersion: A_FRAME_BUNDLE_VERSION,
|
|
42
|
+
aFrameVersion: version || "0.0.0",
|
|
43
|
+
serverVersion: opts.serverVersion,
|
|
44
|
+
builtAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
45
|
+
namespaces,
|
|
46
|
+
definitions
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** Write the bundle to disk as a JSON file. */
|
|
50
|
+
async writeJSON(bundle, outFile) {
|
|
51
|
+
await fs.mkdir(path.dirname(path.resolve(outFile)), { recursive: true });
|
|
52
|
+
await fs.writeFile(outFile, JSON.stringify(bundle, null, 2));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Emit a TypeScript module that exports the bundle as a typed constant.
|
|
56
|
+
* Useful for bundlers that prefer TS imports over JSON imports.
|
|
57
|
+
*/
|
|
58
|
+
async writeTS(bundle, outFile) {
|
|
59
|
+
const banner = "// AUTO-GENERATED by @adaas/a-frame \u2014 do not edit.\n";
|
|
60
|
+
const body = `import type { A_FrameBundle } from '@adaas/a-frame';
|
|
61
|
+
|
|
62
|
+
export const A_FRAME_BUNDLE: A_FrameBundle = ${JSON.stringify(bundle, null, 2)} as A_FrameBundle;
|
|
63
|
+
`;
|
|
64
|
+
await fs.mkdir(path.dirname(path.resolve(outFile)), { recursive: true });
|
|
65
|
+
await fs.writeFile(outFile, banner + body);
|
|
66
|
+
}
|
|
67
|
+
/** Convenience: detect output format by extension and write. */
|
|
68
|
+
async writeAuto(bundle, outFile) {
|
|
69
|
+
if (/\.tsx?$/.test(outFile)) return this.writeTS(bundle, outFile);
|
|
70
|
+
return this.writeJSON(bundle, outFile);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export { A_FRAME_BUNDLE_DEFAULT_FILENAME, A_FRAME_BUNDLE_VERSION, A_FrameBundleBuilder };
|
|
75
|
+
//# sourceMappingURL=bundle.mjs.map
|
|
76
|
+
//# sourceMappingURL=bundle.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/A-FrameBundle/A-FrameBundle.constants.ts","../../src/lib/A-FrameBundle/A-FrameBundle.builder.env-node.ts"],"names":[],"mappings":"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","file":"bundle.mjs","sourcesContent":["/** Current bundle format revision. Bumped on incompatible structural changes. */\nexport const A_FRAME_BUNDLE_VERSION = 1;\n\n/** Default file name when none is provided to the CLI. */\nexport const A_FRAME_BUNDLE_DEFAULT_FILENAME = 'a-frame-bundle.json';\n","import * as fs from 'node:fs/promises';\nimport * as path from 'node:path';\nimport { A_Component } from '@adaas/a-concept';\nimport { A_FrameBundle } from './A-FrameBundle.types';\nimport { A_FRAME_BUNDLE_VERSION } from './A-FrameBundle.constants';\nimport { A_FrameStorageCodec } from '../A-FrameStorage/A-FrameStorage.codec';\nimport * as pkg from '../../../package.json';\n\n\nexport interface A_FrameBundleBuilderOptions {\n /** Source directory containing the encrypted `*.aframe` files (Node storage). */\n storageDir: string;\n /** Server version to embed in the bundle metadata. */\n serverVersion: string;\n}\n\n\n/**\n * A_FrameBundleBuilder — Node-only build-time helper.\n *\n * Reads the encrypted `*.aframe` files produced by Node storage and packages\n * them into a single JSON (or generated TypeScript module) artifact that ships\n * with the browser bundle. The browser bootstrap then seeds these blobs into\n * `A_FrameBrowserStorageBlobs` so that read-only `definition.load()` /\n * `namespace.load()` calls work without a filesystem.\n */\nexport class A_FrameBundleBuilder extends A_Component {\n\n /** Read all `.aframe` files from a storage directory and serialise them. */\n async build(opts: A_FrameBundleBuilderOptions): Promise<A_FrameBundle> {\n const ext = A_FrameStorageCodec.fileExtension; // \".aframe\"\n const namespacesFile = `__namespaces${ext}`;\n\n let entries: string[];\n try {\n entries = await fs.readdir(opts.storageDir);\n } catch (err: any) {\n if (err?.code === 'ENOENT') {\n throw new Error(`A-Frame storage directory not found: ${opts.storageDir}`);\n }\n throw err;\n }\n\n const aframeFiles = entries.filter(f => f.endsWith(ext));\n\n let namespaces: string | null = null;\n const definitions: Record<string, string> = {};\n\n for (const file of aframeFiles) {\n const buf = await fs.readFile(path.join(opts.storageDir, file));\n const b64 = buf.toString('base64');\n\n if (file === namespacesFile) {\n namespaces = b64;\n } else {\n const id = file.slice(0, -ext.length);\n definitions[id] = b64;\n }\n }\n\n return {\n bundleVersion: A_FRAME_BUNDLE_VERSION,\n aFrameVersion: (pkg as any).version || '0.0.0',\n serverVersion: opts.serverVersion,\n builtAt: new Date().toISOString(),\n namespaces,\n definitions,\n };\n }\n\n /** Write the bundle to disk as a JSON file. */\n async writeJSON(bundle: A_FrameBundle, outFile: string): Promise<void> {\n await fs.mkdir(path.dirname(path.resolve(outFile)), { recursive: true });\n await fs.writeFile(outFile, JSON.stringify(bundle, null, 2));\n }\n\n /**\n * Emit a TypeScript module that exports the bundle as a typed constant.\n * Useful for bundlers that prefer TS imports over JSON imports.\n */\n async writeTS(bundle: A_FrameBundle, outFile: string): Promise<void> {\n const banner = '// AUTO-GENERATED by @adaas/a-frame — do not edit.\\n';\n const body =\n `import type { A_FrameBundle } from '@adaas/a-frame';\\n\\n` +\n `export const A_FRAME_BUNDLE: A_FrameBundle = ${JSON.stringify(bundle, null, 2)} as A_FrameBundle;\\n`;\n await fs.mkdir(path.dirname(path.resolve(outFile)), { recursive: true });\n await fs.writeFile(outFile, banner + body);\n }\n\n /** Convenience: detect output format by extension and write. */\n async writeAuto(bundle: A_FrameBundle, outFile: string): Promise<void> {\n if (/\\.tsx?$/.test(outFile)) return this.writeTS(bundle, outFile);\n return this.writeJSON(bundle, outFile);\n }\n}\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkGRR6NNWY_cjs = require('./chunk-GRR6NNWY.cjs');
|
|
4
|
+
require('./chunk-XFUF7SDO.cjs');
|
|
5
|
+
require('./chunk-KK64VLZN.cjs');
|
|
6
|
+
require('./chunk-KLG6HKFU.cjs');
|
|
7
|
+
require('./chunk-R2H234YO.cjs');
|
|
8
|
+
require('./chunk-GBTFMT3K.cjs');
|
|
9
|
+
require('./chunk-ZM2RLVVH.cjs');
|
|
10
|
+
require('./chunk-YWWGJ6EJ.cjs');
|
|
11
|
+
require('./chunk-QFHZIG7Y.cjs');
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
Object.defineProperty(exports, "A_FrameChannel", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkGRR6NNWY_cjs.A_FrameChannel; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "A_FrameChannelError", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunkGRR6NNWY_cjs.A_FrameChannelError; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "A_FrameChannelEvent", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunkGRR6NNWY_cjs.A_FrameChannelEvent; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "A_FrameChannelRequest", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunkGRR6NNWY_cjs.A_FrameChannelRequest; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "A_FrameChannelSocketFeatures", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunkGRR6NNWY_cjs.A_FrameChannelSocketFeatures; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "A_FrameChannelSocketStatuses", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return chunkGRR6NNWY_cjs.A_FrameChannelSocketStatuses; }
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "A_FrameChannelStream", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () { return chunkGRR6NNWY_cjs.A_FrameChannelStream; }
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "A_FrameChannelStreamFeatures", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return chunkGRR6NNWY_cjs.A_FrameChannelStreamFeatures; }
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(exports, "A_FrameChannelStreamStatuses", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () { return chunkGRR6NNWY_cjs.A_FrameChannelStreamStatuses; }
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, "A_FrameFeatures", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () { return chunkGRR6NNWY_cjs.A_FrameFeatures; }
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "A_FrameNodeChannel", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () { return chunkGRR6NNWY_cjs.A_FrameNodeChannel; }
|
|
58
|
+
});
|
|
59
|
+
//# sourceMappingURL=channel.cjs.map
|
|
60
|
+
//# sourceMappingURL=channel.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"channel.cjs"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { A as A_FrameChannel } from './A-FrameChannel.component-NNKcFViw.mjs';
|
|
2
|
+
import { d as A_FrameChannelStream_Init, e as A_FrameChannelStream_Serialized, f as A_FrameChannelStreamStatusNames, A as A_FrameChannelRequest } from './A-FrameChannel.types-DQF-IiRq.mjs';
|
|
3
|
+
export { g as A_FrameChannelSocketFeatureNames, h as A_FrameChannelSocketFeatures, i as A_FrameChannelSocketStatusNames, j as A_FrameChannelSocketStatuses, k as A_FrameChannelSocket_Init, l as A_FrameChannelSocket_Serialized, m as A_FrameChannelStreamFeatureNames, n as A_FrameChannelStreamFeatures, o as A_FrameChannelStreamStatuses, p as A_FrameFeatures, c as A_Frame_CredentialResponse, b as A_Frame_EmbedResponse, a as A_Frame_GenerateResponse, I as IA_Frame_Channel } from './A-FrameChannel.types-DQF-IiRq.mjs';
|
|
4
|
+
import { A_Error, A_Entity, A_Scope, A_Fragment } from '@adaas/a-concept';
|
|
5
|
+
import { A_FrameEnv } from './env.mjs';
|
|
6
|
+
import './A-FrameDefinition.entity-DWGN_Ujr.mjs';
|
|
7
|
+
import './A-FrameNamespace.entity-rCm1AavP.mjs';
|
|
8
|
+
import './vector.mjs';
|
|
9
|
+
import './A-FrameDynamicStructure.entity-DaBgSRCR.mjs';
|
|
10
|
+
|
|
11
|
+
declare class A_FrameChannelError extends A_Error {
|
|
12
|
+
static readonly InvalidRequest = "InvalidRequest";
|
|
13
|
+
static readonly Timeout = "Timeout";
|
|
14
|
+
static readonly RequestFailed = "RequestFailed";
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class A_FrameChannelStream<T extends Record<string, any> = Record<string, any>> extends A_Entity<A_FrameChannelStream_Init<T>, A_FrameChannelStream_Serialized<T>> {
|
|
18
|
+
static onEvent(name?: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => any;
|
|
19
|
+
protected _method: string;
|
|
20
|
+
protected _path: string;
|
|
21
|
+
protected _body?: T;
|
|
22
|
+
protected _scope: A_Scope;
|
|
23
|
+
protected _error?: A_Error;
|
|
24
|
+
protected _status: A_FrameChannelStreamStatusNames;
|
|
25
|
+
protected _initDate: string;
|
|
26
|
+
/**
|
|
27
|
+
* The scope of the session, Will be destroyed after the session is closed.
|
|
28
|
+
*/
|
|
29
|
+
get scope(): A_Scope;
|
|
30
|
+
get method(): string;
|
|
31
|
+
get path(): string;
|
|
32
|
+
get body(): T | undefined;
|
|
33
|
+
get status(): A_FrameChannelStreamStatusNames;
|
|
34
|
+
get error(): A_Error | undefined;
|
|
35
|
+
get initDate(): Date;
|
|
36
|
+
complete(): void;
|
|
37
|
+
fail(error: A_Error): void;
|
|
38
|
+
destroy(): Promise<void> | void;
|
|
39
|
+
open(): Promise<void>;
|
|
40
|
+
send(): Promise<void>;
|
|
41
|
+
propagate<T extends Record<string, any>>(name: string, data?: T): Promise<void>;
|
|
42
|
+
fromNew(newEntity: A_FrameChannelStream_Init<T>): void;
|
|
43
|
+
fromJSON(serialized: A_FrameChannelStream_Serialized<T>): void;
|
|
44
|
+
toJSON(): A_FrameChannelStream_Serialized<T>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare class A_FrameChannelEvent<T extends Record<string, any> = any> extends A_Fragment {
|
|
48
|
+
protected _data?: T;
|
|
49
|
+
protected _eventName: string;
|
|
50
|
+
constructor(name: string, data?: T);
|
|
51
|
+
get name(): string;
|
|
52
|
+
get data(): T | undefined;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare class A_FrameNodeChannel extends A_FrameChannel {
|
|
56
|
+
request(context: A_FrameChannelRequest, env: A_FrameEnv): Promise<void>;
|
|
57
|
+
stream(stream: A_FrameChannelStream, env: A_FrameEnv): Promise<void>;
|
|
58
|
+
send(stream: A_FrameChannelStream, event: A_FrameChannelEvent, env: A_FrameEnv): Promise<void>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { A_FrameChannel, A_FrameChannelError, A_FrameChannelEvent, A_FrameChannelRequest, A_FrameChannelStream, A_FrameChannelStreamStatusNames, A_FrameChannelStream_Init, A_FrameChannelStream_Serialized, A_FrameNodeChannel };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { A as A_FrameChannel } from './A-FrameChannel.component-BfBcs734.js';
|
|
2
|
+
import { d as A_FrameChannelStream_Init, e as A_FrameChannelStream_Serialized, f as A_FrameChannelStreamStatusNames, A as A_FrameChannelRequest } from './A-FrameChannel.types-DQF-IiRq.js';
|
|
3
|
+
export { g as A_FrameChannelSocketFeatureNames, h as A_FrameChannelSocketFeatures, i as A_FrameChannelSocketStatusNames, j as A_FrameChannelSocketStatuses, k as A_FrameChannelSocket_Init, l as A_FrameChannelSocket_Serialized, m as A_FrameChannelStreamFeatureNames, n as A_FrameChannelStreamFeatures, o as A_FrameChannelStreamStatuses, p as A_FrameFeatures, c as A_Frame_CredentialResponse, b as A_Frame_EmbedResponse, a as A_Frame_GenerateResponse, I as IA_Frame_Channel } from './A-FrameChannel.types-DQF-IiRq.js';
|
|
4
|
+
import { A_Error, A_Entity, A_Scope, A_Fragment } from '@adaas/a-concept';
|
|
5
|
+
import { A_FrameEnv } from './env.js';
|
|
6
|
+
import './A-FrameDefinition.entity-CAUOdEvU.js';
|
|
7
|
+
import './A-FrameNamespace.entity-D3fZBGDx.js';
|
|
8
|
+
import './vector.js';
|
|
9
|
+
import './A-FrameDynamicStructure.entity-DaBgSRCR.js';
|
|
10
|
+
|
|
11
|
+
declare class A_FrameChannelError extends A_Error {
|
|
12
|
+
static readonly InvalidRequest = "InvalidRequest";
|
|
13
|
+
static readonly Timeout = "Timeout";
|
|
14
|
+
static readonly RequestFailed = "RequestFailed";
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class A_FrameChannelStream<T extends Record<string, any> = Record<string, any>> extends A_Entity<A_FrameChannelStream_Init<T>, A_FrameChannelStream_Serialized<T>> {
|
|
18
|
+
static onEvent(name?: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => any;
|
|
19
|
+
protected _method: string;
|
|
20
|
+
protected _path: string;
|
|
21
|
+
protected _body?: T;
|
|
22
|
+
protected _scope: A_Scope;
|
|
23
|
+
protected _error?: A_Error;
|
|
24
|
+
protected _status: A_FrameChannelStreamStatusNames;
|
|
25
|
+
protected _initDate: string;
|
|
26
|
+
/**
|
|
27
|
+
* The scope of the session, Will be destroyed after the session is closed.
|
|
28
|
+
*/
|
|
29
|
+
get scope(): A_Scope;
|
|
30
|
+
get method(): string;
|
|
31
|
+
get path(): string;
|
|
32
|
+
get body(): T | undefined;
|
|
33
|
+
get status(): A_FrameChannelStreamStatusNames;
|
|
34
|
+
get error(): A_Error | undefined;
|
|
35
|
+
get initDate(): Date;
|
|
36
|
+
complete(): void;
|
|
37
|
+
fail(error: A_Error): void;
|
|
38
|
+
destroy(): Promise<void> | void;
|
|
39
|
+
open(): Promise<void>;
|
|
40
|
+
send(): Promise<void>;
|
|
41
|
+
propagate<T extends Record<string, any>>(name: string, data?: T): Promise<void>;
|
|
42
|
+
fromNew(newEntity: A_FrameChannelStream_Init<T>): void;
|
|
43
|
+
fromJSON(serialized: A_FrameChannelStream_Serialized<T>): void;
|
|
44
|
+
toJSON(): A_FrameChannelStream_Serialized<T>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare class A_FrameChannelEvent<T extends Record<string, any> = any> extends A_Fragment {
|
|
48
|
+
protected _data?: T;
|
|
49
|
+
protected _eventName: string;
|
|
50
|
+
constructor(name: string, data?: T);
|
|
51
|
+
get name(): string;
|
|
52
|
+
get data(): T | undefined;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare class A_FrameNodeChannel extends A_FrameChannel {
|
|
56
|
+
request(context: A_FrameChannelRequest, env: A_FrameEnv): Promise<void>;
|
|
57
|
+
stream(stream: A_FrameChannelStream, env: A_FrameEnv): Promise<void>;
|
|
58
|
+
send(stream: A_FrameChannelStream, event: A_FrameChannelEvent, env: A_FrameEnv): Promise<void>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { A_FrameChannel, A_FrameChannelError, A_FrameChannelEvent, A_FrameChannelRequest, A_FrameChannelStream, A_FrameChannelStreamStatusNames, A_FrameChannelStream_Init, A_FrameChannelStream_Serialized, A_FrameNodeChannel };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { A_FrameChannel, A_FrameChannelError, A_FrameChannelEvent, A_FrameChannelRequest, A_FrameChannelSocketFeatures, A_FrameChannelSocketStatuses, A_FrameChannelStream, A_FrameChannelStreamFeatures, A_FrameChannelStreamStatuses, A_FrameFeatures, A_FrameNodeChannel } from './chunk-SDKIJDMH.mjs';
|
|
2
|
+
import './chunk-5BKCX2RO.mjs';
|
|
3
|
+
import './chunk-K4MZY4ME.mjs';
|
|
4
|
+
import './chunk-APRYHBEF.mjs';
|
|
5
|
+
import './chunk-OYC6L5NX.mjs';
|
|
6
|
+
import './chunk-B7BXP7K4.mjs';
|
|
7
|
+
import './chunk-442DXGOD.mjs';
|
|
8
|
+
import './chunk-3TD2PEDZ.mjs';
|
|
9
|
+
import './chunk-OI76LHVT.mjs';
|
|
10
|
+
//# sourceMappingURL=channel.mjs.map
|
|
11
|
+
//# sourceMappingURL=channel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"channel.mjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../package.json"],"names":[],"mappings":";;;AAEE,IAAA,OAAA,GAAW","file":"chunk-3LOMGNWA.cjs","sourcesContent":["{\n \"name\": \"@adaas/a-frame\",\n \"version\": \"0.0.22\",\n \"description\": \"A-frame is index build engine for A-Concept ecosystem. It provides a way to build index structures for A-Concept basics\",\n \"license\": \"Apache-2.0\",\n \"author\": {\n \"name\": \"ADAAS YAZILIM LİMİTED ŞİRKETİ\",\n \"email\": \"contact-us@adaas.org\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/ADAAS-org/adaas-a-frame/issues\"\n },\n \"homepage\": \"https://github.com/ADAAS-org/adaas-a-frame#readme\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/ADAAS-org/adaas-a-frame.git\"\n },\n \"bin\": {\n \"a-frame\": \"./dist/index.cjs\"\n },\n \"exports\": {\n \".\": {\n \"browser\": {\n \"types\": \"./dist/browser/index.d.mts\",\n \"import\": \"./dist/browser/index.mjs\"\n },\n \"types\": \"./dist/node/index.d.ts\",\n \"import\": \"./dist/node/index.mjs\",\n \"require\": \"./dist/node/index.cjs\"\n },\n \"./core\": {\n \"browser\": {\n \"types\": \"./dist/browser/core.d.mts\",\n \"import\": \"./dist/browser/core.mjs\"\n },\n \"types\": \"./dist/node/core.d.ts\",\n \"import\": \"./dist/node/core.mjs\",\n \"require\": \"./dist/node/core.cjs\"\n },\n \"./bundle\": {\n \"browser\": {\n \"types\": \"./dist/browser/bundle.d.mts\",\n \"import\": \"./dist/browser/bundle.mjs\"\n },\n \"types\": \"./dist/node/bundle.d.ts\",\n \"import\": \"./dist/node/bundle.mjs\",\n \"require\": \"./dist/node/bundle.cjs\"\n },\n \"./channel\": {\n \"browser\": {\n \"types\": \"./dist/browser/channel.d.mts\",\n \"import\": \"./dist/browser/channel.mjs\"\n },\n \"types\": \"./dist/node/channel.d.ts\",\n \"import\": \"./dist/node/channel.mjs\",\n \"require\": \"./dist/node/channel.cjs\"\n },\n \"./crypto\": {\n \"browser\": {\n \"types\": \"./dist/browser/crypto.d.mts\",\n \"import\": \"./dist/browser/crypto.mjs\"\n },\n \"types\": \"./dist/node/crypto.d.ts\",\n \"import\": \"./dist/node/crypto.mjs\",\n \"require\": \"./dist/node/crypto.cjs\"\n },\n \"./definition\": {\n \"browser\": {\n \"types\": \"./dist/browser/definition.d.mts\",\n \"import\": \"./dist/browser/definition.mjs\"\n },\n \"types\": \"./dist/node/definition.d.ts\",\n \"import\": \"./dist/node/definition.mjs\",\n \"require\": \"./dist/node/definition.cjs\"\n },\n \"./dynamic-feature\": {\n \"browser\": {\n \"types\": \"./dist/browser/dynamic-feature.d.mts\",\n \"import\": \"./dist/browser/dynamic-feature.mjs\"\n },\n \"types\": \"./dist/node/dynamic-feature.d.ts\",\n \"import\": \"./dist/node/dynamic-feature.mjs\",\n \"require\": \"./dist/node/dynamic-feature.cjs\"\n },\n \"./dynamic-structure\": {\n \"browser\": {\n \"types\": \"./dist/browser/dynamic-structure.d.mts\",\n \"import\": \"./dist/browser/dynamic-structure.mjs\"\n },\n \"types\": \"./dist/node/dynamic-structure.d.ts\",\n \"import\": \"./dist/node/dynamic-structure.mjs\",\n \"require\": \"./dist/node/dynamic-structure.cjs\"\n },\n \"./env\": {\n \"browser\": {\n \"types\": \"./dist/browser/env.d.mts\",\n \"import\": \"./dist/browser/env.mjs\"\n },\n \"types\": \"./dist/node/env.d.ts\",\n \"import\": \"./dist/node/env.mjs\",\n \"require\": \"./dist/node/env.cjs\"\n },\n \"./index\": {\n \"browser\": {\n \"types\": \"./dist/browser/frame-index.d.mts\",\n \"import\": \"./dist/browser/frame-index.mjs\"\n },\n \"types\": \"./dist/node/frame-index.d.ts\",\n \"import\": \"./dist/node/frame-index.mjs\",\n \"require\": \"./dist/node/frame-index.cjs\"\n },\n \"./logger\": {\n \"browser\": {\n \"types\": \"./dist/browser/logger.d.mts\",\n \"import\": \"./dist/browser/logger.mjs\"\n },\n \"types\": \"./dist/node/logger.d.ts\",\n \"import\": \"./dist/node/logger.mjs\",\n \"require\": \"./dist/node/logger.cjs\"\n },\n \"./namespace\": {\n \"browser\": {\n \"types\": \"./dist/browser/namespace.d.mts\",\n \"import\": \"./dist/browser/namespace.mjs\"\n },\n \"types\": \"./dist/node/namespace.d.ts\",\n \"import\": \"./dist/node/namespace.mjs\",\n \"require\": \"./dist/node/namespace.cjs\"\n },\n \"./storage\": {\n \"browser\": {\n \"types\": \"./dist/browser/storage.d.mts\",\n \"import\": \"./dist/browser/storage.mjs\"\n },\n \"types\": \"./dist/node/storage.d.ts\",\n \"import\": \"./dist/node/storage.mjs\",\n \"require\": \"./dist/node/storage.cjs\"\n },\n \"./vector\": {\n \"browser\": {\n \"types\": \"./dist/browser/vector.d.mts\",\n \"import\": \"./dist/browser/vector.mjs\"\n },\n \"types\": \"./dist/node/vector.d.ts\",\n \"import\": \"./dist/node/vector.mjs\",\n \"require\": \"./dist/node/vector.cjs\"\n }\n },\n \"keywords\": [\n \"adaas\",\n \"a-frame\",\n \"ai index\",\n \"embeddings\",\n \"a-concept\",\n \"rag\"\n ],\n \"sideEffects\": false,\n \"nodemonConfig\": {\n \"ignore\": [\n \"**/*.test.ts\",\n \"**/*.spec.ts\",\n \".git\",\n \"node_modules\"\n ],\n \"watch\": [\n \"src\",\n \"examples\"\n ],\n \"exec\": \"node -r tsconfig-paths/register -r ts-node/register \",\n \"ext\": \"ts, js\"\n },\n \"scripts\": {\n \"test\": \"jest --detectOpenHandles\",\n \"test:browser\": \"jest --config jest.config.browser.ts --detectOpenHandles\",\n \"start\": \"nodemon ./tests/example-usage.ts\",\n \"start:test\": \"node -r tsconfig-paths/register -r ts-node/register ./index.ts\",\n \"release\": \"npm run test && npm run build && git add . && git commit -m \\\"new version created :: $(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\\\",]//g')\\\" && npm version patch && npm publish --access public\",\n \"version\": \"echo git add .\",\n \"postversion\": \"git push --no-verify && git push --tags --no-verify && echo \\\"\\n======Version Pushed Successfully=====\\n\\\" \",\n \"echo-version\": \"echo $npm_package_version\",\n \"build\": \"tsup --config tsup.config.ts\"\n },\n \"dependencies\": {\n \"@adaas/a-concept\": \"^0.3.14\"\n },\n \"devDependencies\": {\n \"@types/chai\": \"^4.3.14\",\n \"@types/jest\": \"^29.5.12\",\n \"@types/mocha\": \"^10.0.6\",\n \"@types/node\": \"^24.9.1\",\n \"chai\": \"^5.1.0\",\n \"dotenv\": \"^16.6.1\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"mocha\": \"^10.4.0\",\n \"nodemon\": \"^3.1.4\",\n \"ts-jest\": \"^29.1.2\",\n \"ts-node\": \"^10.9.2\",\n \"tsconfig-paths\": \"^4.2.0\",\n \"tscpaths\": \"^0.0.9\",\n \"tsup\": \"^8.5.0\"\n },\n \"directories\": {\n \"doc\": \"docs\",\n \"test\": \"tests\"\n }\n}\n"]}
|