@adaas/a-frame 0.0.2
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/.nvmrc +1 -0
- package/LICENSE +13 -0
- package/README.md +2 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +145 -0
- package/dist/index.d.ts +145 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/index.ts +22 -0
- package/jest.config.ts +22 -0
- package/package.json +86 -0
- package/src/index.ts +24 -0
- package/src/lib/components/Builder.component.ts/Builder.component.ts +0 -0
- package/src/lib/components/Index.component.ts/Index.component.ts +79 -0
- package/src/lib/components/Index.component.ts/Index.constants.ts +0 -0
- package/src/lib/components/Index.component.ts/Index.error.ts +14 -0
- package/src/lib/components/Index.component.ts/Index.guard.ts +34 -0
- package/src/lib/components/Index.component.ts/Index.meta.ts +28 -0
- package/src/lib/components/Index.component.ts/Index.types.ts +132 -0
- package/src/lib/components/Index.component.ts/IndexConfigurations.meta.ts +78 -0
- package/src/lib/components/Index.component.ts/decorators/IndexComponent.decorator.ts +97 -0
- package/src/lib/components/Index.component.ts/decorators/IndexDescribe.decorator.ts +59 -0
- package/src/lib/components/Index.component.ts/decorators/IndexNamespace.decorator.ts +57 -0
- package/src/lib/containers/CLI.container.ts +27 -0
- package/src/lib/entities/Namespace/Namespace.entity.ts +8 -0
- package/tests/A-Frame.test.ts +91 -0
- package/tests/jest.setup.ts +30 -0
- package/tsconfig.json +60 -0
- package/tslint.json +98 -0
- package/tsup.config.ts +32 -0
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v22.20.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright (c) 2026 ADAAS YAZILIM LİMİTED ŞİRKETİ and affiliates.
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
package/README.md
ADDED
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var aConcept=require('@adaas/a-concept');var E=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var o=(s,e)=>E(s,"name",{value:e,configurable:true});var F=(s,e,t,i)=>{for(var m=i>1?void 0:i?b(e,t):e,r=s.length-1,n;r>=0;r--)(n=s[r])&&(m=(i?n(e,t,m):n(m))||m);return i&&m&&E(e,t,m),m};var C=class C extends aConcept.A_Container{async initialize(){if(aConcept.A_Context.environment!=="server")throw new aConcept.A_Error("A-Frame CLI can only be used in Node.js environment.")}async readCommandParams(){console.log("Reading command parameters from CLI...");let e=process.argv.slice(2);console.log("Command Line Arguments:",e);}};o(C,"A_Frame_CLIContainer"),F([aConcept.A_Concept.Load()],C.prototype,"initialize",1),F([aConcept.A_Concept.Start()],C.prototype,"readCommandParams",1);var y=C;var P=(r=>(r.COMPONENT="component",r.ENTITY="entity",r.CONTAINER="container",r.FRAGMENT="fragment",r.METHOD="method",r))(P||{});var g=class g extends aConcept.A_Error{};o(g,"A_Frame_IndexError"),g.InvalidTarget="A-Frame Index Invalid Target Error",g.InvalidConfiguration="A-Frame Index Invalid Configuration Error",g.IndexDefinitionError="A-Frame Index Definition Error",g.IndexMetadataError="A-Frame Index Metadata Error",g.IndexRegistryError="A-Frame Index Registry Error",g.IndexComponentNotFoundError="A-Frame Index Component Not Found Error";var a=g;var l=class l{static isAllowedTarget(e){return aConcept.A_TypeGuards.isEntityConstructor(e)||aConcept.A_TypeGuards.isComponentConstructor(e)||aConcept.A_TypeGuards.isContainerConstructor(e)||aConcept.A_TypeGuards.isFragmentConstructor(e)||aConcept.A_TypeGuards.isComponentInstance(e)||aConcept.A_TypeGuards.isContainerInstance(e)||aConcept.A_TypeGuards.isEntityInstance(e)||aConcept.A_TypeGuards.isFragmentInstance(e)}static getTargetName(e){return aConcept.A_CommonHelper.getComponentName(e)}static getTargetConstructor(e){return typeof e=="function"?e:e.constructor}};o(l,"A_Frame_IndexTypeGuard");var p=l;function I(s,e={}){return function(t,i,m){if(i&&m&&s==="method"){let n=t.constructor,c=String(i);try{let _=aConcept.A_Context.meta(exports.A_Frame),A=_.getMetaFor(n);if(e.namespace&&A.namespace&&e.namespace!==A.namespace)throw new a(a.InvalidConfiguration,`Method namespace '${e.namespace}' does not match target class namespace '${A.namespace}'.`);let R={name:e.name||c,description:e.description,namespace:e.namespace||A.namespace,methodName:c};return A.addMethod(R),_.seMetaFor(n,A),m}catch(_){throw new a(a.IndexDefinitionError,`Unable to apply @A_Frame_Index.Method decorator on '${n.name}.${c}': ${_ instanceof Error?_.message:"Unknown error"}`)}}if(!p.isAllowedTarget(t))throw new a(a.InvalidTarget,`@A_Frame_Index.${s} decorator can only be applied to allowed targets.`);let r=aConcept.A_CommonHelper.getComponentName(t);try{let n=aConcept.A_Context.meta(exports.A_Frame),c=p.getTargetConstructor(t),_=n.getMetaFor(c);return _.name=e.name||r,_.description=e.description,_.namespace=e.namespace,_.type=s,n.seMetaFor(c,_),t}catch(n){throw new a(a.IndexDefinitionError,`Unable to apply @A_Frame_Index.${s} decorator on '${r}': ${n instanceof Error?n.message:"Unknown error"}`)}}}o(I,"A_Frame_IndexDecorator");function O(s){return function(e,t,i){let m=aConcept.A_CommonHelper.getComponentName(e);if(!p.isAllowedTarget(e))throw new a(a.InvalidTarget,`Unable Apply Describe Index Decorator for '${m}': Target type is not allowed.`);try{let r=aConcept.A_Context.meta(exports.A_Frame),n=p.getTargetConstructor(e),c=r.getMetaFor(n);return t||i||(c.namespace=s,r.seMetaFor(n,c)),e}catch(r){throw new a(r)}}}o(O,"A_Frame_IndexNamespaceDecorator");function S(s){return function(e,t,i){let m=aConcept.A_CommonHelper.getComponentName(e);if(!p.isAllowedTarget(e))throw new a(a.InvalidTarget,`Unable Apply Describe Index Decorator for '${m}': Target type is not allowed.`);try{let r=aConcept.A_Context.meta(exports.A_Frame),n=p.getTargetConstructor(e),c=r.getMetaFor(n);if(t||i){let _=t?t.toString():"",A=c.methods.get(_);A&&(A.description=s,c.methods.set(_,A));}else c.description=s,r.seMetaFor(n,c);return e}catch(r){throw new a(r)}}}o(S,"A_Frame_IndexDescribeDecorator");var T=class T extends aConcept.A_Entity{};o(T,"A_Namespace");var f=T;var u=class u extends aConcept.A_Meta{get name(){return this.get("name")}set name(e){e&&this.set("name",e);}get type(){return this.get("type")}set type(e){e&&this.set("type",e);}get namespace(){return this.get("namespaces")}set namespace(e){if(e){let t=e instanceof f?e.aseid.toString():e;this.set("namespaces",t);}}get description(){return this.get("descriptions")}set description(e){e&&this.set("descriptions",e);}get methods(){return this.get("methods")||this.set("methods",new Map),this.get("methods")}clear(){this.set("name",void 0),this.set("type",void 0),this.set("namespaces",void 0),this.set("descriptions",void 0),this.set("methods",new Map);}addMethod(e){let t=this.methods;t.has(e.name)||(t.set(e.name,e),this.set("methods",t));}};o(u,"A_Frame_IndexConfigurationsMeta");var D=u;var h=class h extends aConcept.A_ComponentMeta{getMetaFor(e){let t=this.get("A_FRAME_INDEX_CONFIGURATIONS_META")||new Map;return t.has(e)||(t.set(e,new D),this.set("A_FRAME_INDEX_CONFIGURATIONS_META",t)),t.get(e)}seMetaFor(e,t){let i=this.get("A_FRAME_INDEX_CONFIGURATIONS_META")||new Map;i.set(e,t),this.set("A_FRAME_INDEX_CONFIGURATIONS_META",i);}};o(h,"A_Frame_IndexMeta");var M=h;exports.A_Frame=class d extends aConcept.A_Component{static Namespace(e){return O(e)}static Describe(e){return S(e)}static Component(e={}){return I("component",e)}static Container(e={}){return I("container",e)}static Entity(e={}){return I("entity",e)}static Fragment(e={}){return I("fragment",e)}static Method(e={}){return I("method",e)}};o(exports.A_Frame,"A_Frame_Index"),exports.A_Frame=F([aConcept.A_Meta.Define(M)],exports.A_Frame);exports.A_Frame_CLIContainer=y;exports.A_Frame_IndexError=a;exports.A_Frame_IndexMeta=M;exports.A_Frame_IndexTargetType=P;//# sourceMappingURL=index.cjs.map
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/containers/CLI.container.ts","../src/lib/components/Index.component.ts/Index.types.ts","../src/lib/components/Index.component.ts/Index.error.ts","../src/lib/components/Index.component.ts/Index.guard.ts","../src/lib/components/Index.component.ts/decorators/IndexComponent.decorator.ts","../src/lib/components/Index.component.ts/decorators/IndexNamespace.decorator.ts","../src/lib/components/Index.component.ts/decorators/IndexDescribe.decorator.ts","../src/lib/entities/Namespace/Namespace.entity.ts","../src/lib/components/Index.component.ts/IndexConfigurations.meta.ts","../src/lib/components/Index.component.ts/Index.meta.ts","../src/lib/components/Index.component.ts/Index.component.ts"],"names":["_A_Frame_CLIContainer","A_Container","A_Context","A_Error","args","__name","__decorateClass","A_Concept","A_Frame_CLIContainer","A_Frame_IndexTargetType","_A_Frame_IndexError","A_Frame_IndexError","_A_Frame_IndexTypeGuard","target","A_TypeGuards","A_CommonHelper","A_Frame_IndexTypeGuard","A_Frame_IndexDecorator","componentType","config","propertyKey","descriptor","targetClass","methodName","indexMeta","A_Frame_Index","targetMeta","methodInfo","error","componentName","A_Frame_IndexNamespaceDecorator","name","A_Frame_IndexDescribeDecorator","description","targetMethodName","methodMeta","_A_Namespace","A_Entity","A_Namespace","_A_Frame_IndexConfigurationsMeta","A_Meta","value","methods","A_Frame_IndexConfigurationsMeta","_A_Frame_IndexMeta","A_ComponentMeta","targetSpace","meta","A_Frame_IndexMeta","A_Component","options"],"mappings":"mTAGO,IAAMA,CAAAA,C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ADNkC,eAAAA,CAAO,MAAA,CAAOQ,CAAiB,CAAA,CAAA,CACnBvB,eAAAA,CAAAA","file":"index.cjs","sourcesContent":["import { A_Concept, A_Container, A_Context, A_Error } from \"@adaas/a-concept\";\n\n\nexport class A_Frame_CLIContainer extends A_Container {\n\n\n\n @A_Concept.Load()\n async initialize() {\n if (A_Context.environment !== 'server') {\n throw new A_Error('A-Frame CLI can only be used in Node.js environment.');\n }\n }\n\n\n @A_Concept.Start()\n async readCommandParams() {\n console.log('Reading command parameters from CLI...');\n\n const args = process.argv.slice(2);\n\n console.log('Command Line Arguments:', args);\n\n // Here you can parse the args and set them to the container's state or properties as needed\n }\n\n}","import { A_Component, A_Container, A_Entity, A_Fragment, A_TYPES__Component_Constructor, A_TYPES__Container_Constructor, A_TYPES__Entity_Constructor, A_TYPES__Fragment_Constructor, A_TYPES__Required } from \"@adaas/a-concept\"\nimport { A_Namespace } from \"src/lib/entities/Namespace/Namespace.entity\"\n\n\nexport type A_Frame_IndexOptions = {\n name?: string,\n namespace?: string | A_Namespace\n description?: string\n}\n\n\n\nexport type A_Frame_IndexMetaTarget = A_TYPES__Container_Constructor\n | A_TYPES__Entity_Constructor\n | A_TYPES__Component_Constructor\n | A_TYPES__Fragment_Constructor\n\n\n// ===========================================================================\n// --------------------------- Decorator Types -------------------------------\n// ===========================================================================\n// ---------------------------------------------------------------------------\n// -------------------- A-Frame Index Decorator Types-------------------------\n// ---------------------------------------------------------------------------\n/**\n * Indicates a type of Feature Define decorator\n */\nexport type A_Frame_IndexDecoratorDescriptor =\n TypedPropertyDescriptor<(...args: any[]) => any>\n | TypedPropertyDescriptor<(...args: any[]) => any>\n | TypedPropertyDescriptor<(...args: any[]) => Promise<any>>\n | TypedPropertyDescriptor<(...args: any[]) => Promise<any>>\n\n\n/**\n * Describes a target where Feature Define decorator can be applied\n * \n * [!] The feature can be defined on Container, Entity, Component or Command\n */\nexport type A_Frame_IndexDecoratorTarget = A_Frame_IndexMetaTarget\n | A_Component\n | A_Container\n | A_Entity\n | A_Fragment\n/**\n * Targets types that can be indexed\n */\nexport enum A_Frame_IndexTargetType {\n COMPONENT = 'component',\n ENTITY = 'entity',\n CONTAINER = 'container',\n FRAGMENT = 'fragment',\n METHOD = 'method'\n}\n\n/**\n * A type of Meta information stored by Index decorator\n * This information is used by A-Context to build a proper index structure\n */\nexport type A_Frame_IndexDecoratorMeta = {\n /**\n * Component name\n */\n name: string,\n /**\n * Component description\n */\n description?: string,\n /**\n * Type of the component\n */\n type: A_Frame_IndexTargetType,\n /**\n * Namespace for the component\n */\n namespace?: string | A_Namespace,\n /**\n * Constructor reference\n */\n constructor: A_Frame_IndexDecoratorTarget\n}\n\n\n// ---------------------------------------------------------------------------\n// -------------------- A-Frame Index Decorator Types-------------------------\n// ---------------------------------------------------------------------------\n/**\n * Indicates a type of Feature Define decorator\n */\nexport type A_Frame_IndexNamespaceDecoratorDescriptor =\n TypedPropertyDescriptor<(...args: any[]) => any>\n | TypedPropertyDescriptor<(...args: any[]) => any>\n | TypedPropertyDescriptor<(...args: any[]) => Promise<any>>\n | TypedPropertyDescriptor<(...args: any[]) => Promise<any>>\n\n\n/**\n * Describes a target where Feature Define decorator can be applied\n * \n * [!] The feature can be defined on Container, Entity, Component or Command\n */\nexport type A_Frame_IndexNamespaceDecoratorTarget = A_Container\n | A_Entity\n | A_Component\n | A_Fragment\n | A_TYPES__Fragment_Constructor\n | A_TYPES__Component_Constructor\n | A_TYPES__Container_Constructor\n | A_TYPES__Entity_Constructor\n\n\n\n\n// ---------------------------------------------------------------------------\n// ------------- A-Frame Index Configurations Meta Types----------------------\n// ---------------------------------------------------------------------------\n\n\nexport type A_Frame_IndexConfigurationsMetaType = {\n namespaces: string,\n descriptions: string,\n type: string,\n name: string,\n methods: Map<string, A_Frame_IndexConfigurationsMetaMethodMeta>\n}\n\n\nexport type A_Frame_IndexConfigurationsMetaMethodMeta = {\n name: string,\n description?: string,\n methodName: string\n}","import { A_Error } from \"@adaas/a-concept\";\n\n\nexport class A_Frame_IndexError extends A_Error {\n\n static readonly InvalidTarget = 'A-Frame Index Invalid Target Error';\n\n static readonly InvalidConfiguration = 'A-Frame Index Invalid Configuration Error';\n\n static readonly IndexDefinitionError = 'A-Frame Index Definition Error';\n static readonly IndexMetadataError = 'A-Frame Index Metadata Error';\n static readonly IndexRegistryError = 'A-Frame Index Registry Error';\n static readonly IndexComponentNotFoundError = 'A-Frame Index Component Not Found Error';\n}","import { A_CommonHelper, A_TypeGuards } from \"@adaas/a-concept\";\nimport { A_Frame_IndexDecoratorTarget, A_Frame_IndexMetaTarget } from \"./Index.types\";\n\n\n\nexport class A_Frame_IndexTypeGuard {\n /**\n * Determines if the target is an allowed type for indexing\n * \n * @param target \n * @returns \n */\n static isAllowedTarget(target: any): target is A_Frame_IndexDecoratorTarget {\n return A_TypeGuards.isEntityConstructor(target)\n || A_TypeGuards.isComponentConstructor(target)\n || A_TypeGuards.isContainerConstructor(target)\n || A_TypeGuards.isFragmentConstructor(target)\n || A_TypeGuards.isComponentInstance(target)\n || A_TypeGuards.isContainerInstance(target)\n || A_TypeGuards.isEntityInstance(target)\n || A_TypeGuards.isFragmentInstance(target);\n }\n\n\n\n static getTargetName(target: A_Frame_IndexDecoratorTarget): string {\n return A_CommonHelper.getComponentName(target);\n }\n\n\n static getTargetConstructor(target: A_Frame_IndexDecoratorTarget): A_Frame_IndexMetaTarget {\n return typeof target === 'function' ? target : target.constructor as A_Frame_IndexMetaTarget;\n }\n}","import { A_CommonHelper, A_Context, A_Meta } from \"@adaas/a-concept\";\nimport { A_Frame_IndexError } from \"../Index.error\";\nimport { A_Frame_IndexDecoratorTarget, A_Frame_IndexOptions, A_Frame_IndexTargetType, A_Frame_IndexDecoratorDescriptor, A_Frame_IndexMetaTarget } from \"../Index.types\";\nimport { A_Frame_Index } from \"../Index.component\";\nimport { A_Frame_IndexMeta } from \"../Index.meta\";\nimport { A_Frame_IndexTypeGuard } from \"../Index.guard\";\n\nexport function A_Frame_IndexDecorator(\n componentType: A_Frame_IndexTargetType,\n config: Partial<A_Frame_IndexOptions> = {}\n) {\n return function (\n target: A_Frame_IndexDecoratorTarget,\n propertyKey?: string | symbol,\n descriptor?: A_Frame_IndexDecoratorDescriptor\n ): any {\n\n // Handle method decorator case\n if (propertyKey && descriptor && componentType === A_Frame_IndexTargetType.METHOD) {\n // For methods, target is the class prototype\n const targetClass = target.constructor as A_Frame_IndexMetaTarget;\n const methodName = String(propertyKey);\n\n try {\n const indexMeta: A_Frame_IndexMeta = A_Context.meta(A_Frame_Index) as any;\n const targetMeta = indexMeta.getMetaFor(targetClass);\n\n\n if (!!config.namespace && !!targetMeta.namespace && config.namespace !== targetMeta.namespace) {\n throw new A_Frame_IndexError(\n A_Frame_IndexError.InvalidConfiguration,\n `Method namespace '${config.namespace}' does not match target class namespace '${targetMeta.namespace}'.`\n );\n }\n\n // Store method information\n const methodInfo = {\n name: config.name || methodName,\n description: config.description,\n namespace: config.namespace || targetMeta.namespace,\n methodName: methodName\n };\n\n // Add to methods array\n targetMeta.addMethod(methodInfo);\n\n indexMeta.seMetaFor(targetClass, targetMeta);\n\n return descriptor;\n\n } catch (error) {\n\n throw new A_Frame_IndexError(\n A_Frame_IndexError.IndexDefinitionError,\n `Unable to apply @A_Frame_Index.Method decorator on '${targetClass.name}.${methodName}': ${error instanceof Error ? error.message : 'Unknown error'}`\n );\n\n }\n }\n\n // Handle class decorator case\n if (!A_Frame_IndexTypeGuard.isAllowedTarget(target)) {\n throw new A_Frame_IndexError(\n A_Frame_IndexError.InvalidTarget,\n `@A_Frame_Index.${componentType} decorator can only be applied to allowed targets.`\n );\n }\n\n // for error messages\n const componentName = A_CommonHelper.getComponentName(target);\n\n try {\n // Get the index meta for the global A_Frame_Index component\n const indexMeta: A_Frame_IndexMeta = A_Context.meta(A_Frame_Index) as any;\n\n const targetClass = A_Frame_IndexTypeGuard.getTargetConstructor(target);\n\n // Check for pending namespace and description from other decorators\n const targetMeta = indexMeta.getMetaFor(targetClass);\n\n targetMeta.name = config.name || componentName;\n targetMeta.description = config.description;\n targetMeta.namespace = config.namespace;\n targetMeta.type = componentType;\n\n indexMeta.seMetaFor(targetClass, targetMeta);\n\n return target;\n\n } catch (error) {\n throw new A_Frame_IndexError(\n A_Frame_IndexError.IndexDefinitionError,\n `Unable to apply @A_Frame_Index.${componentType} decorator on '${componentName}': ${error instanceof Error ? error.message : 'Unknown error'}`\n );\n }\n };\n}","import { A_CommonHelper, A_Context } from \"@adaas/a-concept\";\nimport { A_Frame_IndexDecoratorDescriptor, A_Frame_IndexDecoratorTarget, A_Frame_IndexNamespaceDecoratorTarget } from \"../Index.types\";\nimport { A_Frame_Index } from \"../Index.component\";\nimport { A_Frame_IndexTypeGuard } from \"../Index.guard\";\nimport { A_Frame_IndexMeta } from \"../Index.meta\";\nimport { A_Frame_IndexError } from \"../Index.error\";\n\nexport function A_Frame_IndexNamespaceDecorator(name?: string) {\n return function (\n target: A_Frame_IndexDecoratorTarget,\n propertyKey?: string | symbol,\n descriptor?: A_Frame_IndexDecoratorDescriptor\n\n ): A_Frame_IndexDecoratorTarget {\n const componentName = A_CommonHelper.getComponentName(target);\n\n if (!A_Frame_IndexTypeGuard.isAllowedTarget(target)) {\n throw new A_Frame_IndexError(\n A_Frame_IndexError.InvalidTarget,\n `Unable Apply Describe Index Decorator for '${componentName}': Target type is not allowed.`\n );\n }\n\n // for error messages\n\n try {\n // Get the index meta for the global A_Frame_Index component\n // TODO: Type casting hack to avoid circular dependency issues\n const indexMeta: A_Frame_IndexMeta = A_Context.meta(A_Frame_Index) as any;\n\n const targetClass = A_Frame_IndexTypeGuard.getTargetConstructor(target);\n\n // Check for pending namespace and description from other decorators\n const targetMeta = indexMeta.getMetaFor(targetClass)\n if (!!propertyKey || !!descriptor) {\n\n // const targetMethodName = propertyKey ? propertyKey.toString() : '';\n\n // const methodMeta = targetMeta.methods.get(targetMethodName);\n // if (!!methodMeta) {\n // methodMeta.namespace = name;\n // targetMeta.methods.set(targetMethodName, methodMeta);\n // }\n\n } else {\n targetMeta.namespace = name;\n\n indexMeta.seMetaFor(targetClass, targetMeta);\n }\n\n return target;\n\n } catch (error) {\n throw new A_Frame_IndexError(error);\n }\n };\n}","import { A_CommonHelper, A_Context } from \"@adaas/a-concept\";\nimport { A_Frame_IndexDecoratorDescriptor, A_Frame_IndexDecoratorTarget, A_Frame_IndexNamespaceDecoratorTarget } from \"../Index.types\";\nimport { A_Frame_Index } from \"../Index.component\";\nimport { A_Frame_IndexMeta } from \"../Index.meta\";\nimport { A_Frame_IndexTypeGuard } from \"../Index.guard\";\nimport { A_Frame_IndexError } from \"../Index.error\";\n\nexport function A_Frame_IndexDescribeDecorator(description: string) {\n return function (\n target: A_Frame_IndexDecoratorTarget,\n propertyKey?: string | symbol,\n descriptor?: A_Frame_IndexDecoratorDescriptor\n\n ): A_Frame_IndexDecoratorTarget {\n const componentName = A_CommonHelper.getComponentName(target);\n\n if (!A_Frame_IndexTypeGuard.isAllowedTarget(target)) {\n throw new A_Frame_IndexError(\n A_Frame_IndexError.InvalidTarget,\n `Unable Apply Describe Index Decorator for '${componentName}': Target type is not allowed.`\n );\n }\n\n // for error messages\n\n // for error messages\n\n try {\n // Get the index meta for the global A_Frame_Index component\n // TODO: Type casting hack to avoid circular dependency issues\n const indexMeta: A_Frame_IndexMeta = A_Context.meta(A_Frame_Index) as any;\n\n const targetClass = A_Frame_IndexTypeGuard.getTargetConstructor(target);\n\n // Check for pending namespace and description from other decorators\n const targetMeta = indexMeta.getMetaFor(targetClass)\n if (!!propertyKey || !!descriptor) {\n\n const targetMethodName = propertyKey ? propertyKey.toString() : '';\n\n const methodMeta = targetMeta.methods.get(targetMethodName);\n if (!!methodMeta) {\n methodMeta.description = description;\n targetMeta.methods.set(targetMethodName, methodMeta);\n }\n\n } else {\n targetMeta.description = description;\n\n indexMeta.seMetaFor(targetClass, targetMeta);\n }\n\n return target;\n\n } catch (error) {\n throw new A_Frame_IndexError(error);\n }\n };\n}","import { A_Entity } from \"@adaas/a-concept\";\n\n\nexport class A_Namespace extends A_Entity {\n\n\n \n}","import { A_Meta } from \"@adaas/a-concept\";\nimport { A_Namespace } from \"../../entities/Namespace/Namespace.entity\";\nimport { A_Frame_IndexConfigurationsMetaMethodMeta, A_Frame_IndexConfigurationsMetaType } from \"./Index.types\";\n\n\n\nexport class A_Frame_IndexConfigurationsMeta extends A_Meta<Partial<A_Frame_IndexConfigurationsMetaType>> {\n\n get name(): string | undefined {\n return this.get('name');\n }\n\n set name(value: string | undefined) {\n if (value)\n this.set('name', value);\n }\n\n\n get type(): string | undefined {\n return this.get('type');\n }\n\n set type(value: string | undefined) {\n if (value)\n this.set('type', value);\n }\n\n\n get namespace(): string | undefined {\n return this.get('namespaces');\n }\n\n set namespace(value: string | undefined | A_Namespace) {\n if (value) {\n const target = value instanceof A_Namespace ? value.aseid.toString() : value;\n this.set('namespaces', target);\n }\n }\n\n\n get description(): string | undefined {\n return this.get('descriptions');\n }\n\n set description(value: string | undefined) {\n if (value)\n this.set('descriptions', value);\n }\n\n\n\n get methods(): Map<string, A_Frame_IndexConfigurationsMetaMethodMeta> {\n if (!this.get('methods')) {\n this.set('methods', new Map());\n }\n\n return this.get('methods')!;\n }\n\n\n clear(): void {\n this.set('name', undefined);\n this.set('type', undefined);\n this.set('namespaces', undefined);\n this.set('descriptions', undefined);\n this.set('methods', new Map());\n }\n\n\n addMethod(methodMeta: A_Frame_IndexConfigurationsMetaMethodMeta): void {\n const methods = this.methods;\n\n if (!methods.has(methodMeta.name)) {\n methods.set(methodMeta.name, methodMeta);\n this.set('methods', methods);\n }\n }\n}","import { A_ComponentMeta, A_Context, A_Meta } from \"@adaas/a-concept\";\nimport { A_Frame_IndexDecoratorMeta, A_Frame_IndexTargetType, A_Frame_IndexMetaTarget } from \"./Index.types\";\nimport { A_Frame_Index } from \"./Index.component\";\nimport { A_Frame_IndexConfigurationsMeta } from \"./IndexConfigurations.meta\";\n\nexport class A_Frame_IndexMeta extends A_ComponentMeta {\n\n getMetaFor(target: A_Frame_IndexMetaTarget): A_Frame_IndexConfigurationsMeta {\n\n const targetSpace = this.get('A_FRAME_INDEX_CONFIGURATIONS_META' as any) || new Map<A_Frame_IndexMetaTarget, A_Frame_IndexConfigurationsMeta>();\n\n if (!targetSpace.has(target)) {\n targetSpace.set(target, new A_Frame_IndexConfigurationsMeta());\n this.set('A_FRAME_INDEX_CONFIGURATIONS_META' as any, targetSpace);\n }\n\n return targetSpace.get(target)!;\n }\n\n\n seMetaFor(target: A_Frame_IndexMetaTarget, meta: A_Frame_IndexConfigurationsMeta): void {\n const targetSpace = this.get('A_FRAME_INDEX_CONFIGURATIONS_META' as any) || new Map<A_Frame_IndexMetaTarget, A_Frame_IndexConfigurationsMeta>();\n\n targetSpace.set(target, meta);\n\n this.set('A_FRAME_INDEX_CONFIGURATIONS_META' as any, targetSpace);\n }\n}\n","import { A_Component, A_Meta } from \"@adaas/a-concept\";\nimport { A_Frame_IndexOptions, A_Frame_IndexTargetType } from \"./Index.types\";\nimport { A_Frame_IndexDecorator } from \"./decorators/IndexComponent.decorator\";\nimport { A_Frame_IndexNamespaceDecorator } from \"./decorators/IndexNamespace.decorator\";\nimport { A_Frame_IndexDescribeDecorator } from \"./decorators/IndexDescribe.decorator\";\nimport { A_Frame_IndexMeta } from \"./Index.meta\";\n\n\n\n@A_Meta.Define(A_Frame_IndexMeta)\nexport class A_Frame_Index extends A_Component {\n\n\n /**\n * Allows to mark namespace and add it to index structure,\n */\n static Namespace(name: string): ClassDecorator & MethodDecorator {\n return A_Frame_IndexNamespaceDecorator(name) as ClassDecorator & MethodDecorator;\n }\n\n /**\n * Allows to add description to a class and add it to index structure\n */\n static Describe(description: string): ClassDecorator & MethodDecorator {\n return A_Frame_IndexDescribeDecorator(description) as ClassDecorator & MethodDecorator;\n }\n\n\n\n /**\n * Allows to mark component and add it to index structure,\n */\n static Component(): ClassDecorator\n static Component(options: Partial<A_Frame_IndexOptions>): ClassDecorator\n static Component(options: Partial<A_Frame_IndexOptions> = {}): ClassDecorator {\n return A_Frame_IndexDecorator(A_Frame_IndexTargetType.COMPONENT, options) as ClassDecorator;\n }\n\n /**\n * Allows to mark container and add it to index structure,\n */\n static Container(): ClassDecorator\n static Container(options: Partial<A_Frame_IndexOptions>): ClassDecorator\n static Container(options: Partial<A_Frame_IndexOptions> = {}): ClassDecorator {\n return A_Frame_IndexDecorator(A_Frame_IndexTargetType.CONTAINER, options) as ClassDecorator;\n }\n\n /**\n * Allows to mark entity and add it to index structure, \n * so it can be reused in other components or structures\n */\n static Entity(): ClassDecorator\n static Entity(options: Partial<A_Frame_IndexOptions>): ClassDecorator\n static Entity(options: Partial<A_Frame_IndexOptions> = {}): ClassDecorator {\n return A_Frame_IndexDecorator(A_Frame_IndexTargetType.ENTITY, options) as ClassDecorator;\n }\n\n\n /**\n * Allows to mark fragment and add it to index structure, \n * so it can be reused in other components or structures\n */\n static Fragment(): ClassDecorator\n static Fragment(options: Partial<A_Frame_IndexOptions>): ClassDecorator\n static Fragment(options: Partial<A_Frame_IndexOptions> = {}): ClassDecorator {\n return A_Frame_IndexDecorator(A_Frame_IndexTargetType.FRAGMENT, options) as ClassDecorator;\n }\n\n /**\n * Allows to define a reusable AI method from components, \n * that can be reused in other components. to build new Features\n */\n static Method(): MethodDecorator\n static Method(options: Partial<A_Frame_IndexOptions>): MethodDecorator\n static Method(options: Partial<A_Frame_IndexOptions> = {}): MethodDecorator {\n return A_Frame_IndexDecorator(A_Frame_IndexTargetType.METHOD, options) as MethodDecorator;\n }\n\n}"]}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { A_Container, A_Entity, A_TYPES__Container_Constructor, A_TYPES__Entity_Constructor, A_TYPES__Component_Constructor, A_TYPES__Fragment_Constructor, A_Component, A_Fragment, A_Meta, A_ComponentMeta, A_Error } from '@adaas/a-concept';
|
|
2
|
+
|
|
3
|
+
declare class A_Frame_CLIContainer extends A_Container {
|
|
4
|
+
initialize(): Promise<void>;
|
|
5
|
+
readCommandParams(): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare class A_Namespace extends A_Entity {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type A_Frame_IndexOptions = {
|
|
12
|
+
name?: string;
|
|
13
|
+
namespace?: string | A_Namespace;
|
|
14
|
+
description?: string;
|
|
15
|
+
};
|
|
16
|
+
type A_Frame_IndexMetaTarget = A_TYPES__Container_Constructor | A_TYPES__Entity_Constructor | A_TYPES__Component_Constructor | A_TYPES__Fragment_Constructor;
|
|
17
|
+
/**
|
|
18
|
+
* Describes a target where Feature Define decorator can be applied
|
|
19
|
+
*
|
|
20
|
+
* [!] The feature can be defined on Container, Entity, Component or Command
|
|
21
|
+
*/
|
|
22
|
+
type A_Frame_IndexDecoratorTarget = A_Frame_IndexMetaTarget | A_Component | A_Container | A_Entity | A_Fragment;
|
|
23
|
+
/**
|
|
24
|
+
* Targets types that can be indexed
|
|
25
|
+
*/
|
|
26
|
+
declare enum A_Frame_IndexTargetType {
|
|
27
|
+
COMPONENT = "component",
|
|
28
|
+
ENTITY = "entity",
|
|
29
|
+
CONTAINER = "container",
|
|
30
|
+
FRAGMENT = "fragment",
|
|
31
|
+
METHOD = "method"
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A type of Meta information stored by Index decorator
|
|
35
|
+
* This information is used by A-Context to build a proper index structure
|
|
36
|
+
*/
|
|
37
|
+
type A_Frame_IndexDecoratorMeta = {
|
|
38
|
+
/**
|
|
39
|
+
* Component name
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
* Component description
|
|
44
|
+
*/
|
|
45
|
+
description?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Type of the component
|
|
48
|
+
*/
|
|
49
|
+
type: A_Frame_IndexTargetType;
|
|
50
|
+
/**
|
|
51
|
+
* Namespace for the component
|
|
52
|
+
*/
|
|
53
|
+
namespace?: string | A_Namespace;
|
|
54
|
+
/**
|
|
55
|
+
* Constructor reference
|
|
56
|
+
*/
|
|
57
|
+
constructor: A_Frame_IndexDecoratorTarget;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Describes a target where Feature Define decorator can be applied
|
|
61
|
+
*
|
|
62
|
+
* [!] The feature can be defined on Container, Entity, Component or Command
|
|
63
|
+
*/
|
|
64
|
+
type A_Frame_IndexNamespaceDecoratorTarget = A_Container | A_Entity | A_Component | A_Fragment | A_TYPES__Fragment_Constructor | A_TYPES__Component_Constructor | A_TYPES__Container_Constructor | A_TYPES__Entity_Constructor;
|
|
65
|
+
type A_Frame_IndexConfigurationsMetaType = {
|
|
66
|
+
namespaces: string;
|
|
67
|
+
descriptions: string;
|
|
68
|
+
type: string;
|
|
69
|
+
name: string;
|
|
70
|
+
methods: Map<string, A_Frame_IndexConfigurationsMetaMethodMeta>;
|
|
71
|
+
};
|
|
72
|
+
type A_Frame_IndexConfigurationsMetaMethodMeta = {
|
|
73
|
+
name: string;
|
|
74
|
+
description?: string;
|
|
75
|
+
methodName: string;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
declare class A_Frame_Index extends A_Component {
|
|
79
|
+
/**
|
|
80
|
+
* Allows to mark namespace and add it to index structure,
|
|
81
|
+
*/
|
|
82
|
+
static Namespace(name: string): ClassDecorator & MethodDecorator;
|
|
83
|
+
/**
|
|
84
|
+
* Allows to add description to a class and add it to index structure
|
|
85
|
+
*/
|
|
86
|
+
static Describe(description: string): ClassDecorator & MethodDecorator;
|
|
87
|
+
/**
|
|
88
|
+
* Allows to mark component and add it to index structure,
|
|
89
|
+
*/
|
|
90
|
+
static Component(): ClassDecorator;
|
|
91
|
+
static Component(options: Partial<A_Frame_IndexOptions>): ClassDecorator;
|
|
92
|
+
/**
|
|
93
|
+
* Allows to mark container and add it to index structure,
|
|
94
|
+
*/
|
|
95
|
+
static Container(): ClassDecorator;
|
|
96
|
+
static Container(options: Partial<A_Frame_IndexOptions>): ClassDecorator;
|
|
97
|
+
/**
|
|
98
|
+
* Allows to mark entity and add it to index structure,
|
|
99
|
+
* so it can be reused in other components or structures
|
|
100
|
+
*/
|
|
101
|
+
static Entity(): ClassDecorator;
|
|
102
|
+
static Entity(options: Partial<A_Frame_IndexOptions>): ClassDecorator;
|
|
103
|
+
/**
|
|
104
|
+
* Allows to mark fragment and add it to index structure,
|
|
105
|
+
* so it can be reused in other components or structures
|
|
106
|
+
*/
|
|
107
|
+
static Fragment(): ClassDecorator;
|
|
108
|
+
static Fragment(options: Partial<A_Frame_IndexOptions>): ClassDecorator;
|
|
109
|
+
/**
|
|
110
|
+
* Allows to define a reusable AI method from components,
|
|
111
|
+
* that can be reused in other components. to build new Features
|
|
112
|
+
*/
|
|
113
|
+
static Method(): MethodDecorator;
|
|
114
|
+
static Method(options: Partial<A_Frame_IndexOptions>): MethodDecorator;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
declare class A_Frame_IndexConfigurationsMeta extends A_Meta<Partial<A_Frame_IndexConfigurationsMetaType>> {
|
|
118
|
+
get name(): string | undefined;
|
|
119
|
+
set name(value: string | undefined);
|
|
120
|
+
get type(): string | undefined;
|
|
121
|
+
set type(value: string | undefined);
|
|
122
|
+
get namespace(): string | undefined;
|
|
123
|
+
set namespace(value: string | undefined | A_Namespace);
|
|
124
|
+
get description(): string | undefined;
|
|
125
|
+
set description(value: string | undefined);
|
|
126
|
+
get methods(): Map<string, A_Frame_IndexConfigurationsMetaMethodMeta>;
|
|
127
|
+
clear(): void;
|
|
128
|
+
addMethod(methodMeta: A_Frame_IndexConfigurationsMetaMethodMeta): void;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare class A_Frame_IndexMeta extends A_ComponentMeta {
|
|
132
|
+
getMetaFor(target: A_Frame_IndexMetaTarget): A_Frame_IndexConfigurationsMeta;
|
|
133
|
+
seMetaFor(target: A_Frame_IndexMetaTarget, meta: A_Frame_IndexConfigurationsMeta): void;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
declare class A_Frame_IndexError extends A_Error {
|
|
137
|
+
static readonly InvalidTarget = "A-Frame Index Invalid Target Error";
|
|
138
|
+
static readonly InvalidConfiguration = "A-Frame Index Invalid Configuration Error";
|
|
139
|
+
static readonly IndexDefinitionError = "A-Frame Index Definition Error";
|
|
140
|
+
static readonly IndexMetadataError = "A-Frame Index Metadata Error";
|
|
141
|
+
static readonly IndexRegistryError = "A-Frame Index Registry Error";
|
|
142
|
+
static readonly IndexComponentNotFoundError = "A-Frame Index Component Not Found Error";
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export { A_Frame_Index as A_Frame, A_Frame_CLIContainer, type A_Frame_IndexDecoratorMeta, type A_Frame_IndexDecoratorTarget, A_Frame_IndexError, A_Frame_IndexMeta, type A_Frame_IndexNamespaceDecoratorTarget, type A_Frame_IndexOptions, A_Frame_IndexTargetType };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { A_Container, A_Entity, A_TYPES__Container_Constructor, A_TYPES__Entity_Constructor, A_TYPES__Component_Constructor, A_TYPES__Fragment_Constructor, A_Component, A_Fragment, A_Meta, A_ComponentMeta, A_Error } from '@adaas/a-concept';
|
|
2
|
+
|
|
3
|
+
declare class A_Frame_CLIContainer extends A_Container {
|
|
4
|
+
initialize(): Promise<void>;
|
|
5
|
+
readCommandParams(): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare class A_Namespace extends A_Entity {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type A_Frame_IndexOptions = {
|
|
12
|
+
name?: string;
|
|
13
|
+
namespace?: string | A_Namespace;
|
|
14
|
+
description?: string;
|
|
15
|
+
};
|
|
16
|
+
type A_Frame_IndexMetaTarget = A_TYPES__Container_Constructor | A_TYPES__Entity_Constructor | A_TYPES__Component_Constructor | A_TYPES__Fragment_Constructor;
|
|
17
|
+
/**
|
|
18
|
+
* Describes a target where Feature Define decorator can be applied
|
|
19
|
+
*
|
|
20
|
+
* [!] The feature can be defined on Container, Entity, Component or Command
|
|
21
|
+
*/
|
|
22
|
+
type A_Frame_IndexDecoratorTarget = A_Frame_IndexMetaTarget | A_Component | A_Container | A_Entity | A_Fragment;
|
|
23
|
+
/**
|
|
24
|
+
* Targets types that can be indexed
|
|
25
|
+
*/
|
|
26
|
+
declare enum A_Frame_IndexTargetType {
|
|
27
|
+
COMPONENT = "component",
|
|
28
|
+
ENTITY = "entity",
|
|
29
|
+
CONTAINER = "container",
|
|
30
|
+
FRAGMENT = "fragment",
|
|
31
|
+
METHOD = "method"
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A type of Meta information stored by Index decorator
|
|
35
|
+
* This information is used by A-Context to build a proper index structure
|
|
36
|
+
*/
|
|
37
|
+
type A_Frame_IndexDecoratorMeta = {
|
|
38
|
+
/**
|
|
39
|
+
* Component name
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
* Component description
|
|
44
|
+
*/
|
|
45
|
+
description?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Type of the component
|
|
48
|
+
*/
|
|
49
|
+
type: A_Frame_IndexTargetType;
|
|
50
|
+
/**
|
|
51
|
+
* Namespace for the component
|
|
52
|
+
*/
|
|
53
|
+
namespace?: string | A_Namespace;
|
|
54
|
+
/**
|
|
55
|
+
* Constructor reference
|
|
56
|
+
*/
|
|
57
|
+
constructor: A_Frame_IndexDecoratorTarget;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Describes a target where Feature Define decorator can be applied
|
|
61
|
+
*
|
|
62
|
+
* [!] The feature can be defined on Container, Entity, Component or Command
|
|
63
|
+
*/
|
|
64
|
+
type A_Frame_IndexNamespaceDecoratorTarget = A_Container | A_Entity | A_Component | A_Fragment | A_TYPES__Fragment_Constructor | A_TYPES__Component_Constructor | A_TYPES__Container_Constructor | A_TYPES__Entity_Constructor;
|
|
65
|
+
type A_Frame_IndexConfigurationsMetaType = {
|
|
66
|
+
namespaces: string;
|
|
67
|
+
descriptions: string;
|
|
68
|
+
type: string;
|
|
69
|
+
name: string;
|
|
70
|
+
methods: Map<string, A_Frame_IndexConfigurationsMetaMethodMeta>;
|
|
71
|
+
};
|
|
72
|
+
type A_Frame_IndexConfigurationsMetaMethodMeta = {
|
|
73
|
+
name: string;
|
|
74
|
+
description?: string;
|
|
75
|
+
methodName: string;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
declare class A_Frame_Index extends A_Component {
|
|
79
|
+
/**
|
|
80
|
+
* Allows to mark namespace and add it to index structure,
|
|
81
|
+
*/
|
|
82
|
+
static Namespace(name: string): ClassDecorator & MethodDecorator;
|
|
83
|
+
/**
|
|
84
|
+
* Allows to add description to a class and add it to index structure
|
|
85
|
+
*/
|
|
86
|
+
static Describe(description: string): ClassDecorator & MethodDecorator;
|
|
87
|
+
/**
|
|
88
|
+
* Allows to mark component and add it to index structure,
|
|
89
|
+
*/
|
|
90
|
+
static Component(): ClassDecorator;
|
|
91
|
+
static Component(options: Partial<A_Frame_IndexOptions>): ClassDecorator;
|
|
92
|
+
/**
|
|
93
|
+
* Allows to mark container and add it to index structure,
|
|
94
|
+
*/
|
|
95
|
+
static Container(): ClassDecorator;
|
|
96
|
+
static Container(options: Partial<A_Frame_IndexOptions>): ClassDecorator;
|
|
97
|
+
/**
|
|
98
|
+
* Allows to mark entity and add it to index structure,
|
|
99
|
+
* so it can be reused in other components or structures
|
|
100
|
+
*/
|
|
101
|
+
static Entity(): ClassDecorator;
|
|
102
|
+
static Entity(options: Partial<A_Frame_IndexOptions>): ClassDecorator;
|
|
103
|
+
/**
|
|
104
|
+
* Allows to mark fragment and add it to index structure,
|
|
105
|
+
* so it can be reused in other components or structures
|
|
106
|
+
*/
|
|
107
|
+
static Fragment(): ClassDecorator;
|
|
108
|
+
static Fragment(options: Partial<A_Frame_IndexOptions>): ClassDecorator;
|
|
109
|
+
/**
|
|
110
|
+
* Allows to define a reusable AI method from components,
|
|
111
|
+
* that can be reused in other components. to build new Features
|
|
112
|
+
*/
|
|
113
|
+
static Method(): MethodDecorator;
|
|
114
|
+
static Method(options: Partial<A_Frame_IndexOptions>): MethodDecorator;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
declare class A_Frame_IndexConfigurationsMeta extends A_Meta<Partial<A_Frame_IndexConfigurationsMetaType>> {
|
|
118
|
+
get name(): string | undefined;
|
|
119
|
+
set name(value: string | undefined);
|
|
120
|
+
get type(): string | undefined;
|
|
121
|
+
set type(value: string | undefined);
|
|
122
|
+
get namespace(): string | undefined;
|
|
123
|
+
set namespace(value: string | undefined | A_Namespace);
|
|
124
|
+
get description(): string | undefined;
|
|
125
|
+
set description(value: string | undefined);
|
|
126
|
+
get methods(): Map<string, A_Frame_IndexConfigurationsMetaMethodMeta>;
|
|
127
|
+
clear(): void;
|
|
128
|
+
addMethod(methodMeta: A_Frame_IndexConfigurationsMetaMethodMeta): void;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare class A_Frame_IndexMeta extends A_ComponentMeta {
|
|
132
|
+
getMetaFor(target: A_Frame_IndexMetaTarget): A_Frame_IndexConfigurationsMeta;
|
|
133
|
+
seMetaFor(target: A_Frame_IndexMetaTarget, meta: A_Frame_IndexConfigurationsMeta): void;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
declare class A_Frame_IndexError extends A_Error {
|
|
137
|
+
static readonly InvalidTarget = "A-Frame Index Invalid Target Error";
|
|
138
|
+
static readonly InvalidConfiguration = "A-Frame Index Invalid Configuration Error";
|
|
139
|
+
static readonly IndexDefinitionError = "A-Frame Index Definition Error";
|
|
140
|
+
static readonly IndexMetadataError = "A-Frame Index Metadata Error";
|
|
141
|
+
static readonly IndexRegistryError = "A-Frame Index Registry Error";
|
|
142
|
+
static readonly IndexComponentNotFoundError = "A-Frame Index Component Not Found Error";
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export { A_Frame_Index as A_Frame, A_Frame_CLIContainer, type A_Frame_IndexDecoratorMeta, type A_Frame_IndexDecoratorTarget, A_Frame_IndexError, A_Frame_IndexMeta, type A_Frame_IndexNamespaceDecoratorTarget, type A_Frame_IndexOptions, A_Frame_IndexTargetType };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {A_Concept,A_Meta,A_Container,A_Context,A_Error,A_ComponentMeta,A_Entity,A_Component,A_TypeGuards,A_CommonHelper}from'@adaas/a-concept';var E=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var o=(s,e)=>E(s,"name",{value:e,configurable:true});var F=(s,e,t,i)=>{for(var m=i>1?void 0:i?b(e,t):e,r=s.length-1,n;r>=0;r--)(n=s[r])&&(m=(i?n(e,t,m):n(m))||m);return i&&m&&E(e,t,m),m};var C=class C extends A_Container{async initialize(){if(A_Context.environment!=="server")throw new A_Error("A-Frame CLI can only be used in Node.js environment.")}async readCommandParams(){console.log("Reading command parameters from CLI...");let e=process.argv.slice(2);console.log("Command Line Arguments:",e);}};o(C,"A_Frame_CLIContainer"),F([A_Concept.Load()],C.prototype,"initialize",1),F([A_Concept.Start()],C.prototype,"readCommandParams",1);var y=C;var P=(r=>(r.COMPONENT="component",r.ENTITY="entity",r.CONTAINER="container",r.FRAGMENT="fragment",r.METHOD="method",r))(P||{});var g=class g extends A_Error{};o(g,"A_Frame_IndexError"),g.InvalidTarget="A-Frame Index Invalid Target Error",g.InvalidConfiguration="A-Frame Index Invalid Configuration Error",g.IndexDefinitionError="A-Frame Index Definition Error",g.IndexMetadataError="A-Frame Index Metadata Error",g.IndexRegistryError="A-Frame Index Registry Error",g.IndexComponentNotFoundError="A-Frame Index Component Not Found Error";var a=g;var l=class l{static isAllowedTarget(e){return A_TypeGuards.isEntityConstructor(e)||A_TypeGuards.isComponentConstructor(e)||A_TypeGuards.isContainerConstructor(e)||A_TypeGuards.isFragmentConstructor(e)||A_TypeGuards.isComponentInstance(e)||A_TypeGuards.isContainerInstance(e)||A_TypeGuards.isEntityInstance(e)||A_TypeGuards.isFragmentInstance(e)}static getTargetName(e){return A_CommonHelper.getComponentName(e)}static getTargetConstructor(e){return typeof e=="function"?e:e.constructor}};o(l,"A_Frame_IndexTypeGuard");var p=l;function I(s,e={}){return function(t,i,m){if(i&&m&&s==="method"){let n=t.constructor,c=String(i);try{let _=A_Context.meta(d),A=_.getMetaFor(n);if(e.namespace&&A.namespace&&e.namespace!==A.namespace)throw new a(a.InvalidConfiguration,`Method namespace '${e.namespace}' does not match target class namespace '${A.namespace}'.`);let R={name:e.name||c,description:e.description,namespace:e.namespace||A.namespace,methodName:c};return A.addMethod(R),_.seMetaFor(n,A),m}catch(_){throw new a(a.IndexDefinitionError,`Unable to apply @A_Frame_Index.Method decorator on '${n.name}.${c}': ${_ instanceof Error?_.message:"Unknown error"}`)}}if(!p.isAllowedTarget(t))throw new a(a.InvalidTarget,`@A_Frame_Index.${s} decorator can only be applied to allowed targets.`);let r=A_CommonHelper.getComponentName(t);try{let n=A_Context.meta(d),c=p.getTargetConstructor(t),_=n.getMetaFor(c);return _.name=e.name||r,_.description=e.description,_.namespace=e.namespace,_.type=s,n.seMetaFor(c,_),t}catch(n){throw new a(a.IndexDefinitionError,`Unable to apply @A_Frame_Index.${s} decorator on '${r}': ${n instanceof Error?n.message:"Unknown error"}`)}}}o(I,"A_Frame_IndexDecorator");function O(s){return function(e,t,i){let m=A_CommonHelper.getComponentName(e);if(!p.isAllowedTarget(e))throw new a(a.InvalidTarget,`Unable Apply Describe Index Decorator for '${m}': Target type is not allowed.`);try{let r=A_Context.meta(d),n=p.getTargetConstructor(e),c=r.getMetaFor(n);return t||i||(c.namespace=s,r.seMetaFor(n,c)),e}catch(r){throw new a(r)}}}o(O,"A_Frame_IndexNamespaceDecorator");function S(s){return function(e,t,i){let m=A_CommonHelper.getComponentName(e);if(!p.isAllowedTarget(e))throw new a(a.InvalidTarget,`Unable Apply Describe Index Decorator for '${m}': Target type is not allowed.`);try{let r=A_Context.meta(d),n=p.getTargetConstructor(e),c=r.getMetaFor(n);if(t||i){let _=t?t.toString():"",A=c.methods.get(_);A&&(A.description=s,c.methods.set(_,A));}else c.description=s,r.seMetaFor(n,c);return e}catch(r){throw new a(r)}}}o(S,"A_Frame_IndexDescribeDecorator");var T=class T extends A_Entity{};o(T,"A_Namespace");var f=T;var u=class u extends A_Meta{get name(){return this.get("name")}set name(e){e&&this.set("name",e);}get type(){return this.get("type")}set type(e){e&&this.set("type",e);}get namespace(){return this.get("namespaces")}set namespace(e){if(e){let t=e instanceof f?e.aseid.toString():e;this.set("namespaces",t);}}get description(){return this.get("descriptions")}set description(e){e&&this.set("descriptions",e);}get methods(){return this.get("methods")||this.set("methods",new Map),this.get("methods")}clear(){this.set("name",void 0),this.set("type",void 0),this.set("namespaces",void 0),this.set("descriptions",void 0),this.set("methods",new Map);}addMethod(e){let t=this.methods;t.has(e.name)||(t.set(e.name,e),this.set("methods",t));}};o(u,"A_Frame_IndexConfigurationsMeta");var D=u;var h=class h extends A_ComponentMeta{getMetaFor(e){let t=this.get("A_FRAME_INDEX_CONFIGURATIONS_META")||new Map;return t.has(e)||(t.set(e,new D),this.set("A_FRAME_INDEX_CONFIGURATIONS_META",t)),t.get(e)}seMetaFor(e,t){let i=this.get("A_FRAME_INDEX_CONFIGURATIONS_META")||new Map;i.set(e,t),this.set("A_FRAME_INDEX_CONFIGURATIONS_META",i);}};o(h,"A_Frame_IndexMeta");var M=h;var d=class extends A_Component{static Namespace(e){return O(e)}static Describe(e){return S(e)}static Component(e={}){return I("component",e)}static Container(e={}){return I("container",e)}static Entity(e={}){return I("entity",e)}static Fragment(e={}){return I("fragment",e)}static Method(e={}){return I("method",e)}};o(d,"A_Frame_Index"),d=F([A_Meta.Define(M)],d);export{d as A_Frame,y as A_Frame_CLIContainer,a as A_Frame_IndexError,M as A_Frame_IndexMeta,P as A_Frame_IndexTargetType};//# sourceMappingURL=index.mjs.map
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/containers/CLI.container.ts","../src/lib/components/Index.component.ts/Index.types.ts","../src/lib/components/Index.component.ts/Index.error.ts","../src/lib/components/Index.component.ts/Index.guard.ts","../src/lib/components/Index.component.ts/decorators/IndexComponent.decorator.ts","../src/lib/components/Index.component.ts/decorators/IndexNamespace.decorator.ts","../src/lib/components/Index.component.ts/decorators/IndexDescribe.decorator.ts","../src/lib/entities/Namespace/Namespace.entity.ts","../src/lib/components/Index.component.ts/IndexConfigurations.meta.ts","../src/lib/components/Index.component.ts/Index.meta.ts","../src/lib/components/Index.component.ts/Index.component.ts"],"names":["_A_Frame_CLIContainer","A_Container","A_Context","A_Error","args","__name","__decorateClass","A_Concept","A_Frame_CLIContainer","A_Frame_IndexTargetType","_A_Frame_IndexError","A_Frame_IndexError","_A_Frame_IndexTypeGuard","target","A_TypeGuards","A_CommonHelper","A_Frame_IndexTypeGuard","A_Frame_IndexDecorator","componentType","config","propertyKey","descriptor","targetClass","methodName","indexMeta","A_Frame_Index","targetMeta","methodInfo","error","componentName","A_Frame_IndexNamespaceDecorator","name","A_Frame_IndexDescribeDecorator","description","targetMethodName","methodMeta","_A_Namespace","A_Entity","A_Namespace","_A_Frame_IndexConfigurationsMeta","A_Meta","value","methods","A_Frame_IndexConfigurationsMeta","_A_Frame_IndexMeta","A_ComponentMeta","targetSpace","meta","A_Frame_IndexMeta","A_Component","options"],"mappings":"4YAGO,IAAMA,CAAAA,CAAN,MAAMA,CAAAA,SAA6BC,WAAY,CAKlD,MAAM,UAAA,EAAa,CACf,GAAIC,SAAAA,CAAU,WAAA,GAAgB,QAAA,CAC1B,MAAM,IAAIC,OAAAA,CAAQ,sDAAsD,CAEhF,CAIA,MAAM,iBAAA,EAAoB,CACtB,OAAA,CAAQ,GAAA,CAAI,wCAAwC,CAAA,CAEpD,IAAMC,CAAAA,CAAO,OAAA,CAAQ,IAAA,CAAK,KAAA,CAAM,CAAC,CAAA,CAEjC,OAAA,CAAQ,IAAI,yBAAA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AANJ,ECKA,IAAMnB,CAAAA,CAAN,cAA4BwB,WAAY,CAM3C,OAAO,SAAA,CAAUlB,CAAAA,CAAgD,CAC7D,OAAOD,CAAAA,CAAgCC,CAAI,CAC/C,CAKA,OAAO,QAAA,CAASE,CAAAA,CAAuD,CACnE,OAAOD,CAAAA,CAA+BC,CAAW,CACrD,CASA,OAAO,SAAA,CAAUiB,CAAAA,CAAyC,EAAC,CAAmB,CAC1E,OAAOjC,CAAAA,CAAAA,WAAAA,CAA0DiC,CAAO,CAC5E,CAOA,OAAO,SAAA,CAAUA,CAAAA,CAAyC,EAAC,CAAmB,CAC1E,OAAOjC,CAAAA,CAAAA,WAAAA,CAA0DiC,CAAO,CAC5E,CAQA,OAAO,MAAA,CAAOA,CAAAA,CAAyC,EAAC,CAAmB,CACvE,OAAOjC,CAAAA,CAAAA,QAAAA,CAAuDiC,CAAO,CACzE,CASA,OAAO,QAAA,CAASA,CAAAA,CAAyC,EAAC,CAAmB,CACzE,OAAOjC,CAAAA,CAAAA,UAAAA,CAAyDiC,CAAO,CAC3E,CAQA,OAAO,MAAA,CAAOA,CAAAA,CAAyC,EAAC,CAAoB,CACxE,OAAOjC,CAAAA,CAAAA,QAAAA,CAAuDiC,CAAO,CACzE,CAEJ,EApE+C7C,CAAAA,CAAAoB,CAAAA,CAAA,eAAA,CAAA,CAAlCA,CAAAA,CAANnB,CAAAA,CAAA,CADNkC,MAAAA,CAAO,MAAA,CAAOQ,CAAiB,CAAA,CAAA,CACnBvB,CAAAA,CAAAA","file":"index.mjs","sourcesContent":["import { A_Concept, A_Container, A_Context, A_Error } from \"@adaas/a-concept\";\n\n\nexport class A_Frame_CLIContainer extends A_Container {\n\n\n\n @A_Concept.Load()\n async initialize() {\n if (A_Context.environment !== 'server') {\n throw new A_Error('A-Frame CLI can only be used in Node.js environment.');\n }\n }\n\n\n @A_Concept.Start()\n async readCommandParams() {\n console.log('Reading command parameters from CLI...');\n\n const args = process.argv.slice(2);\n\n console.log('Command Line Arguments:', args);\n\n // Here you can parse the args and set them to the container's state or properties as needed\n }\n\n}","import { A_Component, A_Container, A_Entity, A_Fragment, A_TYPES__Component_Constructor, A_TYPES__Container_Constructor, A_TYPES__Entity_Constructor, A_TYPES__Fragment_Constructor, A_TYPES__Required } from \"@adaas/a-concept\"\nimport { A_Namespace } from \"src/lib/entities/Namespace/Namespace.entity\"\n\n\nexport type A_Frame_IndexOptions = {\n name?: string,\n namespace?: string | A_Namespace\n description?: string\n}\n\n\n\nexport type A_Frame_IndexMetaTarget = A_TYPES__Container_Constructor\n | A_TYPES__Entity_Constructor\n | A_TYPES__Component_Constructor\n | A_TYPES__Fragment_Constructor\n\n\n// ===========================================================================\n// --------------------------- Decorator Types -------------------------------\n// ===========================================================================\n// ---------------------------------------------------------------------------\n// -------------------- A-Frame Index Decorator Types-------------------------\n// ---------------------------------------------------------------------------\n/**\n * Indicates a type of Feature Define decorator\n */\nexport type A_Frame_IndexDecoratorDescriptor =\n TypedPropertyDescriptor<(...args: any[]) => any>\n | TypedPropertyDescriptor<(...args: any[]) => any>\n | TypedPropertyDescriptor<(...args: any[]) => Promise<any>>\n | TypedPropertyDescriptor<(...args: any[]) => Promise<any>>\n\n\n/**\n * Describes a target where Feature Define decorator can be applied\n * \n * [!] The feature can be defined on Container, Entity, Component or Command\n */\nexport type A_Frame_IndexDecoratorTarget = A_Frame_IndexMetaTarget\n | A_Component\n | A_Container\n | A_Entity\n | A_Fragment\n/**\n * Targets types that can be indexed\n */\nexport enum A_Frame_IndexTargetType {\n COMPONENT = 'component',\n ENTITY = 'entity',\n CONTAINER = 'container',\n FRAGMENT = 'fragment',\n METHOD = 'method'\n}\n\n/**\n * A type of Meta information stored by Index decorator\n * This information is used by A-Context to build a proper index structure\n */\nexport type A_Frame_IndexDecoratorMeta = {\n /**\n * Component name\n */\n name: string,\n /**\n * Component description\n */\n description?: string,\n /**\n * Type of the component\n */\n type: A_Frame_IndexTargetType,\n /**\n * Namespace for the component\n */\n namespace?: string | A_Namespace,\n /**\n * Constructor reference\n */\n constructor: A_Frame_IndexDecoratorTarget\n}\n\n\n// ---------------------------------------------------------------------------\n// -------------------- A-Frame Index Decorator Types-------------------------\n// ---------------------------------------------------------------------------\n/**\n * Indicates a type of Feature Define decorator\n */\nexport type A_Frame_IndexNamespaceDecoratorDescriptor =\n TypedPropertyDescriptor<(...args: any[]) => any>\n | TypedPropertyDescriptor<(...args: any[]) => any>\n | TypedPropertyDescriptor<(...args: any[]) => Promise<any>>\n | TypedPropertyDescriptor<(...args: any[]) => Promise<any>>\n\n\n/**\n * Describes a target where Feature Define decorator can be applied\n * \n * [!] The feature can be defined on Container, Entity, Component or Command\n */\nexport type A_Frame_IndexNamespaceDecoratorTarget = A_Container\n | A_Entity\n | A_Component\n | A_Fragment\n | A_TYPES__Fragment_Constructor\n | A_TYPES__Component_Constructor\n | A_TYPES__Container_Constructor\n | A_TYPES__Entity_Constructor\n\n\n\n\n// ---------------------------------------------------------------------------\n// ------------- A-Frame Index Configurations Meta Types----------------------\n// ---------------------------------------------------------------------------\n\n\nexport type A_Frame_IndexConfigurationsMetaType = {\n namespaces: string,\n descriptions: string,\n type: string,\n name: string,\n methods: Map<string, A_Frame_IndexConfigurationsMetaMethodMeta>\n}\n\n\nexport type A_Frame_IndexConfigurationsMetaMethodMeta = {\n name: string,\n description?: string,\n methodName: string\n}","import { A_Error } from \"@adaas/a-concept\";\n\n\nexport class A_Frame_IndexError extends A_Error {\n\n static readonly InvalidTarget = 'A-Frame Index Invalid Target Error';\n\n static readonly InvalidConfiguration = 'A-Frame Index Invalid Configuration Error';\n\n static readonly IndexDefinitionError = 'A-Frame Index Definition Error';\n static readonly IndexMetadataError = 'A-Frame Index Metadata Error';\n static readonly IndexRegistryError = 'A-Frame Index Registry Error';\n static readonly IndexComponentNotFoundError = 'A-Frame Index Component Not Found Error';\n}","import { A_CommonHelper, A_TypeGuards } from \"@adaas/a-concept\";\nimport { A_Frame_IndexDecoratorTarget, A_Frame_IndexMetaTarget } from \"./Index.types\";\n\n\n\nexport class A_Frame_IndexTypeGuard {\n /**\n * Determines if the target is an allowed type for indexing\n * \n * @param target \n * @returns \n */\n static isAllowedTarget(target: any): target is A_Frame_IndexDecoratorTarget {\n return A_TypeGuards.isEntityConstructor(target)\n || A_TypeGuards.isComponentConstructor(target)\n || A_TypeGuards.isContainerConstructor(target)\n || A_TypeGuards.isFragmentConstructor(target)\n || A_TypeGuards.isComponentInstance(target)\n || A_TypeGuards.isContainerInstance(target)\n || A_TypeGuards.isEntityInstance(target)\n || A_TypeGuards.isFragmentInstance(target);\n }\n\n\n\n static getTargetName(target: A_Frame_IndexDecoratorTarget): string {\n return A_CommonHelper.getComponentName(target);\n }\n\n\n static getTargetConstructor(target: A_Frame_IndexDecoratorTarget): A_Frame_IndexMetaTarget {\n return typeof target === 'function' ? target : target.constructor as A_Frame_IndexMetaTarget;\n }\n}","import { A_CommonHelper, A_Context, A_Meta } from \"@adaas/a-concept\";\nimport { A_Frame_IndexError } from \"../Index.error\";\nimport { A_Frame_IndexDecoratorTarget, A_Frame_IndexOptions, A_Frame_IndexTargetType, A_Frame_IndexDecoratorDescriptor, A_Frame_IndexMetaTarget } from \"../Index.types\";\nimport { A_Frame_Index } from \"../Index.component\";\nimport { A_Frame_IndexMeta } from \"../Index.meta\";\nimport { A_Frame_IndexTypeGuard } from \"../Index.guard\";\n\nexport function A_Frame_IndexDecorator(\n componentType: A_Frame_IndexTargetType,\n config: Partial<A_Frame_IndexOptions> = {}\n) {\n return function (\n target: A_Frame_IndexDecoratorTarget,\n propertyKey?: string | symbol,\n descriptor?: A_Frame_IndexDecoratorDescriptor\n ): any {\n\n // Handle method decorator case\n if (propertyKey && descriptor && componentType === A_Frame_IndexTargetType.METHOD) {\n // For methods, target is the class prototype\n const targetClass = target.constructor as A_Frame_IndexMetaTarget;\n const methodName = String(propertyKey);\n\n try {\n const indexMeta: A_Frame_IndexMeta = A_Context.meta(A_Frame_Index) as any;\n const targetMeta = indexMeta.getMetaFor(targetClass);\n\n\n if (!!config.namespace && !!targetMeta.namespace && config.namespace !== targetMeta.namespace) {\n throw new A_Frame_IndexError(\n A_Frame_IndexError.InvalidConfiguration,\n `Method namespace '${config.namespace}' does not match target class namespace '${targetMeta.namespace}'.`\n );\n }\n\n // Store method information\n const methodInfo = {\n name: config.name || methodName,\n description: config.description,\n namespace: config.namespace || targetMeta.namespace,\n methodName: methodName\n };\n\n // Add to methods array\n targetMeta.addMethod(methodInfo);\n\n indexMeta.seMetaFor(targetClass, targetMeta);\n\n return descriptor;\n\n } catch (error) {\n\n throw new A_Frame_IndexError(\n A_Frame_IndexError.IndexDefinitionError,\n `Unable to apply @A_Frame_Index.Method decorator on '${targetClass.name}.${methodName}': ${error instanceof Error ? error.message : 'Unknown error'}`\n );\n\n }\n }\n\n // Handle class decorator case\n if (!A_Frame_IndexTypeGuard.isAllowedTarget(target)) {\n throw new A_Frame_IndexError(\n A_Frame_IndexError.InvalidTarget,\n `@A_Frame_Index.${componentType} decorator can only be applied to allowed targets.`\n );\n }\n\n // for error messages\n const componentName = A_CommonHelper.getComponentName(target);\n\n try {\n // Get the index meta for the global A_Frame_Index component\n const indexMeta: A_Frame_IndexMeta = A_Context.meta(A_Frame_Index) as any;\n\n const targetClass = A_Frame_IndexTypeGuard.getTargetConstructor(target);\n\n // Check for pending namespace and description from other decorators\n const targetMeta = indexMeta.getMetaFor(targetClass);\n\n targetMeta.name = config.name || componentName;\n targetMeta.description = config.description;\n targetMeta.namespace = config.namespace;\n targetMeta.type = componentType;\n\n indexMeta.seMetaFor(targetClass, targetMeta);\n\n return target;\n\n } catch (error) {\n throw new A_Frame_IndexError(\n A_Frame_IndexError.IndexDefinitionError,\n `Unable to apply @A_Frame_Index.${componentType} decorator on '${componentName}': ${error instanceof Error ? error.message : 'Unknown error'}`\n );\n }\n };\n}","import { A_CommonHelper, A_Context } from \"@adaas/a-concept\";\nimport { A_Frame_IndexDecoratorDescriptor, A_Frame_IndexDecoratorTarget, A_Frame_IndexNamespaceDecoratorTarget } from \"../Index.types\";\nimport { A_Frame_Index } from \"../Index.component\";\nimport { A_Frame_IndexTypeGuard } from \"../Index.guard\";\nimport { A_Frame_IndexMeta } from \"../Index.meta\";\nimport { A_Frame_IndexError } from \"../Index.error\";\n\nexport function A_Frame_IndexNamespaceDecorator(name?: string) {\n return function (\n target: A_Frame_IndexDecoratorTarget,\n propertyKey?: string | symbol,\n descriptor?: A_Frame_IndexDecoratorDescriptor\n\n ): A_Frame_IndexDecoratorTarget {\n const componentName = A_CommonHelper.getComponentName(target);\n\n if (!A_Frame_IndexTypeGuard.isAllowedTarget(target)) {\n throw new A_Frame_IndexError(\n A_Frame_IndexError.InvalidTarget,\n `Unable Apply Describe Index Decorator for '${componentName}': Target type is not allowed.`\n );\n }\n\n // for error messages\n\n try {\n // Get the index meta for the global A_Frame_Index component\n // TODO: Type casting hack to avoid circular dependency issues\n const indexMeta: A_Frame_IndexMeta = A_Context.meta(A_Frame_Index) as any;\n\n const targetClass = A_Frame_IndexTypeGuard.getTargetConstructor(target);\n\n // Check for pending namespace and description from other decorators\n const targetMeta = indexMeta.getMetaFor(targetClass)\n if (!!propertyKey || !!descriptor) {\n\n // const targetMethodName = propertyKey ? propertyKey.toString() : '';\n\n // const methodMeta = targetMeta.methods.get(targetMethodName);\n // if (!!methodMeta) {\n // methodMeta.namespace = name;\n // targetMeta.methods.set(targetMethodName, methodMeta);\n // }\n\n } else {\n targetMeta.namespace = name;\n\n indexMeta.seMetaFor(targetClass, targetMeta);\n }\n\n return target;\n\n } catch (error) {\n throw new A_Frame_IndexError(error);\n }\n };\n}","import { A_CommonHelper, A_Context } from \"@adaas/a-concept\";\nimport { A_Frame_IndexDecoratorDescriptor, A_Frame_IndexDecoratorTarget, A_Frame_IndexNamespaceDecoratorTarget } from \"../Index.types\";\nimport { A_Frame_Index } from \"../Index.component\";\nimport { A_Frame_IndexMeta } from \"../Index.meta\";\nimport { A_Frame_IndexTypeGuard } from \"../Index.guard\";\nimport { A_Frame_IndexError } from \"../Index.error\";\n\nexport function A_Frame_IndexDescribeDecorator(description: string) {\n return function (\n target: A_Frame_IndexDecoratorTarget,\n propertyKey?: string | symbol,\n descriptor?: A_Frame_IndexDecoratorDescriptor\n\n ): A_Frame_IndexDecoratorTarget {\n const componentName = A_CommonHelper.getComponentName(target);\n\n if (!A_Frame_IndexTypeGuard.isAllowedTarget(target)) {\n throw new A_Frame_IndexError(\n A_Frame_IndexError.InvalidTarget,\n `Unable Apply Describe Index Decorator for '${componentName}': Target type is not allowed.`\n );\n }\n\n // for error messages\n\n // for error messages\n\n try {\n // Get the index meta for the global A_Frame_Index component\n // TODO: Type casting hack to avoid circular dependency issues\n const indexMeta: A_Frame_IndexMeta = A_Context.meta(A_Frame_Index) as any;\n\n const targetClass = A_Frame_IndexTypeGuard.getTargetConstructor(target);\n\n // Check for pending namespace and description from other decorators\n const targetMeta = indexMeta.getMetaFor(targetClass)\n if (!!propertyKey || !!descriptor) {\n\n const targetMethodName = propertyKey ? propertyKey.toString() : '';\n\n const methodMeta = targetMeta.methods.get(targetMethodName);\n if (!!methodMeta) {\n methodMeta.description = description;\n targetMeta.methods.set(targetMethodName, methodMeta);\n }\n\n } else {\n targetMeta.description = description;\n\n indexMeta.seMetaFor(targetClass, targetMeta);\n }\n\n return target;\n\n } catch (error) {\n throw new A_Frame_IndexError(error);\n }\n };\n}","import { A_Entity } from \"@adaas/a-concept\";\n\n\nexport class A_Namespace extends A_Entity {\n\n\n \n}","import { A_Meta } from \"@adaas/a-concept\";\nimport { A_Namespace } from \"../../entities/Namespace/Namespace.entity\";\nimport { A_Frame_IndexConfigurationsMetaMethodMeta, A_Frame_IndexConfigurationsMetaType } from \"./Index.types\";\n\n\n\nexport class A_Frame_IndexConfigurationsMeta extends A_Meta<Partial<A_Frame_IndexConfigurationsMetaType>> {\n\n get name(): string | undefined {\n return this.get('name');\n }\n\n set name(value: string | undefined) {\n if (value)\n this.set('name', value);\n }\n\n\n get type(): string | undefined {\n return this.get('type');\n }\n\n set type(value: string | undefined) {\n if (value)\n this.set('type', value);\n }\n\n\n get namespace(): string | undefined {\n return this.get('namespaces');\n }\n\n set namespace(value: string | undefined | A_Namespace) {\n if (value) {\n const target = value instanceof A_Namespace ? value.aseid.toString() : value;\n this.set('namespaces', target);\n }\n }\n\n\n get description(): string | undefined {\n return this.get('descriptions');\n }\n\n set description(value: string | undefined) {\n if (value)\n this.set('descriptions', value);\n }\n\n\n\n get methods(): Map<string, A_Frame_IndexConfigurationsMetaMethodMeta> {\n if (!this.get('methods')) {\n this.set('methods', new Map());\n }\n\n return this.get('methods')!;\n }\n\n\n clear(): void {\n this.set('name', undefined);\n this.set('type', undefined);\n this.set('namespaces', undefined);\n this.set('descriptions', undefined);\n this.set('methods', new Map());\n }\n\n\n addMethod(methodMeta: A_Frame_IndexConfigurationsMetaMethodMeta): void {\n const methods = this.methods;\n\n if (!methods.has(methodMeta.name)) {\n methods.set(methodMeta.name, methodMeta);\n this.set('methods', methods);\n }\n }\n}","import { A_ComponentMeta, A_Context, A_Meta } from \"@adaas/a-concept\";\nimport { A_Frame_IndexDecoratorMeta, A_Frame_IndexTargetType, A_Frame_IndexMetaTarget } from \"./Index.types\";\nimport { A_Frame_Index } from \"./Index.component\";\nimport { A_Frame_IndexConfigurationsMeta } from \"./IndexConfigurations.meta\";\n\nexport class A_Frame_IndexMeta extends A_ComponentMeta {\n\n getMetaFor(target: A_Frame_IndexMetaTarget): A_Frame_IndexConfigurationsMeta {\n\n const targetSpace = this.get('A_FRAME_INDEX_CONFIGURATIONS_META' as any) || new Map<A_Frame_IndexMetaTarget, A_Frame_IndexConfigurationsMeta>();\n\n if (!targetSpace.has(target)) {\n targetSpace.set(target, new A_Frame_IndexConfigurationsMeta());\n this.set('A_FRAME_INDEX_CONFIGURATIONS_META' as any, targetSpace);\n }\n\n return targetSpace.get(target)!;\n }\n\n\n seMetaFor(target: A_Frame_IndexMetaTarget, meta: A_Frame_IndexConfigurationsMeta): void {\n const targetSpace = this.get('A_FRAME_INDEX_CONFIGURATIONS_META' as any) || new Map<A_Frame_IndexMetaTarget, A_Frame_IndexConfigurationsMeta>();\n\n targetSpace.set(target, meta);\n\n this.set('A_FRAME_INDEX_CONFIGURATIONS_META' as any, targetSpace);\n }\n}\n","import { A_Component, A_Meta } from \"@adaas/a-concept\";\nimport { A_Frame_IndexOptions, A_Frame_IndexTargetType } from \"./Index.types\";\nimport { A_Frame_IndexDecorator } from \"./decorators/IndexComponent.decorator\";\nimport { A_Frame_IndexNamespaceDecorator } from \"./decorators/IndexNamespace.decorator\";\nimport { A_Frame_IndexDescribeDecorator } from \"./decorators/IndexDescribe.decorator\";\nimport { A_Frame_IndexMeta } from \"./Index.meta\";\n\n\n\n@A_Meta.Define(A_Frame_IndexMeta)\nexport class A_Frame_Index extends A_Component {\n\n\n /**\n * Allows to mark namespace and add it to index structure,\n */\n static Namespace(name: string): ClassDecorator & MethodDecorator {\n return A_Frame_IndexNamespaceDecorator(name) as ClassDecorator & MethodDecorator;\n }\n\n /**\n * Allows to add description to a class and add it to index structure\n */\n static Describe(description: string): ClassDecorator & MethodDecorator {\n return A_Frame_IndexDescribeDecorator(description) as ClassDecorator & MethodDecorator;\n }\n\n\n\n /**\n * Allows to mark component and add it to index structure,\n */\n static Component(): ClassDecorator\n static Component(options: Partial<A_Frame_IndexOptions>): ClassDecorator\n static Component(options: Partial<A_Frame_IndexOptions> = {}): ClassDecorator {\n return A_Frame_IndexDecorator(A_Frame_IndexTargetType.COMPONENT, options) as ClassDecorator;\n }\n\n /**\n * Allows to mark container and add it to index structure,\n */\n static Container(): ClassDecorator\n static Container(options: Partial<A_Frame_IndexOptions>): ClassDecorator\n static Container(options: Partial<A_Frame_IndexOptions> = {}): ClassDecorator {\n return A_Frame_IndexDecorator(A_Frame_IndexTargetType.CONTAINER, options) as ClassDecorator;\n }\n\n /**\n * Allows to mark entity and add it to index structure, \n * so it can be reused in other components or structures\n */\n static Entity(): ClassDecorator\n static Entity(options: Partial<A_Frame_IndexOptions>): ClassDecorator\n static Entity(options: Partial<A_Frame_IndexOptions> = {}): ClassDecorator {\n return A_Frame_IndexDecorator(A_Frame_IndexTargetType.ENTITY, options) as ClassDecorator;\n }\n\n\n /**\n * Allows to mark fragment and add it to index structure, \n * so it can be reused in other components or structures\n */\n static Fragment(): ClassDecorator\n static Fragment(options: Partial<A_Frame_IndexOptions>): ClassDecorator\n static Fragment(options: Partial<A_Frame_IndexOptions> = {}): ClassDecorator {\n return A_Frame_IndexDecorator(A_Frame_IndexTargetType.FRAGMENT, options) as ClassDecorator;\n }\n\n /**\n * Allows to define a reusable AI method from components, \n * that can be reused in other components. to build new Features\n */\n static Method(): MethodDecorator\n static Method(options: Partial<A_Frame_IndexOptions>): MethodDecorator\n static Method(options: Partial<A_Frame_IndexOptions> = {}): MethodDecorator {\n return A_Frame_IndexDecorator(A_Frame_IndexTargetType.METHOD, options) as MethodDecorator;\n }\n\n}"]}
|
package/index.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { A_Concept } from '@adaas/a-concept';
|
|
2
|
+
import { A_Frame_CLIContainer } from 'src';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
(async () => {
|
|
7
|
+
const concept = new A_Concept({
|
|
8
|
+
name: 'A-Frame CLI',
|
|
9
|
+
containers: [
|
|
10
|
+
new A_Frame_CLIContainer()
|
|
11
|
+
]
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
try {
|
|
15
|
+
await concept.load();
|
|
16
|
+
|
|
17
|
+
await concept.start();
|
|
18
|
+
|
|
19
|
+
} catch (error) {
|
|
20
|
+
console.error('Error starting A-Frame CLI concept:', error);
|
|
21
|
+
}
|
|
22
|
+
})();
|
package/jest.config.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Config } from '@jest/types';
|
|
2
|
+
|
|
3
|
+
// Sync object
|
|
4
|
+
const config: Config.InitialOptions = {
|
|
5
|
+
verbose: true,
|
|
6
|
+
setupFilesAfterEnv: ['<rootDir>/tests/jest.setup.ts'],
|
|
7
|
+
roots: ['<rootDir>/tests'],
|
|
8
|
+
transform: {
|
|
9
|
+
'^.+\\.tsx?$': 'ts-jest'
|
|
10
|
+
},
|
|
11
|
+
moduleNameMapper: {
|
|
12
|
+
"@adaas/a-concept/constants/(.*)": ["<rootDir>/src/constants/$1"],
|
|
13
|
+
"@adaas/a-concept/global/(.*)": ["<rootDir>/src/global/$1"],
|
|
14
|
+
"@adaas/a-concept/types/(.*)": ["<rootDir>/src/types/$1"],
|
|
15
|
+
"@adaas/a-concept/helpers/(.*)": ["<rootDir>/src/helpers/$1"],
|
|
16
|
+
"@adaas/a-concept/decorators/(.*)": ["<rootDir>/src/decorators/$1"],
|
|
17
|
+
"@adaas/a-concept/base/(.*)": ["<rootDir>/src/base/$1"],
|
|
18
|
+
"@adaas/a-concept/utils/(.*)": ["<rootDir>/src/utils/$1"]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
};
|
|
22
|
+
export default config;
|
package/package.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adaas/a-frame",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "A-frame is index build engine for A-Concept ecosystem. It provides a way to build index structures for A-Concept basics",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"bin": {
|
|
10
|
+
"a-frame": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/ADAAS-org/adaas-a-frame#readme",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/ADAAS-org/adaas-a-frame.git"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"adaas",
|
|
19
|
+
"a-frame",
|
|
20
|
+
"ai index",
|
|
21
|
+
"embeddings",
|
|
22
|
+
"a-concept",
|
|
23
|
+
"rag"
|
|
24
|
+
],
|
|
25
|
+
"author": {
|
|
26
|
+
"name": "ADAAS YAZILIM LİMİTED ŞİRKETİ",
|
|
27
|
+
"email": "contact-us@adaas.org"
|
|
28
|
+
},
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/ADAAS-org/adaas-a-frame/issues"
|
|
31
|
+
},
|
|
32
|
+
"sideEffects": false,
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"import": "./dist/index.mjs",
|
|
36
|
+
"require": "./dist/index.cjs"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"nodemonConfig": {
|
|
40
|
+
"ignore": [
|
|
41
|
+
"**/*.test.ts",
|
|
42
|
+
"**/*.spec.ts",
|
|
43
|
+
".git",
|
|
44
|
+
"node_modules"
|
|
45
|
+
],
|
|
46
|
+
"watch": [
|
|
47
|
+
"src",
|
|
48
|
+
"examples"
|
|
49
|
+
],
|
|
50
|
+
"exec": "node -r tsconfig-paths/register -r ts-node/register ",
|
|
51
|
+
"ext": "ts, js"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"test": "jest --detectOpenHandles",
|
|
55
|
+
"start": "nodemon ./tests/example-usage.ts",
|
|
56
|
+
"start:test": "node -r tsconfig-paths/register -r ts-node/register ./index.ts",
|
|
57
|
+
"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",
|
|
58
|
+
"version": "echo git add .",
|
|
59
|
+
"postversion": "git push --no-verify && git push --tags --no-verify && echo \"\n======Version Pushed Successfully=====\n\" ",
|
|
60
|
+
"echo-version": "echo $npm_package_version",
|
|
61
|
+
"build": "tsup --config tsup.config.ts"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@adaas/a-concept": "^0.1.61"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@types/chai": "^4.3.14",
|
|
68
|
+
"@types/jest": "^29.5.12",
|
|
69
|
+
"@types/mocha": "^10.0.6",
|
|
70
|
+
"@types/node": "^24.9.1",
|
|
71
|
+
"chai": "^5.1.0",
|
|
72
|
+
"dotenv": "^16.4.5",
|
|
73
|
+
"jest": "^29.7.0",
|
|
74
|
+
"mocha": "^10.4.0",
|
|
75
|
+
"nodemon": "^3.1.4",
|
|
76
|
+
"ts-jest": "^29.1.2",
|
|
77
|
+
"ts-node": "^10.9.2",
|
|
78
|
+
"tsconfig-paths": "^4.2.0",
|
|
79
|
+
"tscpaths": "^0.0.9",
|
|
80
|
+
"tsup": "^8.5.0"
|
|
81
|
+
},
|
|
82
|
+
"directories": {
|
|
83
|
+
"doc": "docs",
|
|
84
|
+
"test": "tests"
|
|
85
|
+
}
|
|
86
|
+
}
|