@xyo-network/node-model 5.3.4 → 5.3.6

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.
@@ -1,5 +1,7 @@
1
- import type { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model';
1
+ import type { AnyConfigSchema, ModuleInstanceParams, ModuleParams } from '@xyo-network/module-model';
2
2
  import type { NodeConfig } from './Config.ts';
3
3
  export interface NodeParams<TConfig extends AnyConfigSchema<NodeConfig> = AnyConfigSchema<NodeConfig>> extends ModuleParams<TConfig> {
4
4
  }
5
+ export interface NodeInstanceParams<TConfig extends AnyConfigSchema<NodeConfig> = AnyConfigSchema<NodeConfig>> extends ModuleInstanceParams<TConfig> {
6
+ }
5
7
  //# sourceMappingURL=Params.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,MAAM,WAAW,UAAU,CACzB,OAAO,SAAS,eAAe,CAAC,UAAU,CAAC,GAAG,eAAe,CAAC,UAAU,CAAC,CACzE,SAAQ,YAAY,CAAC,OAAO,CAAC;CAAG"}
1
+ {"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAAE,oBAAoB,EAAE,YAAY,EACpD,MAAM,2BAA2B,CAAA;AAElC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,MAAM,WAAW,UAAU,CACzB,OAAO,SAAS,eAAe,CAAC,UAAU,CAAC,GAAG,eAAe,CAAC,UAAU,CAAC,CACzE,SAAQ,YAAY,CAAC,OAAO,CAAC;CAAG;AAElC,MAAM,WAAW,kBAAkB,CACjC,OAAO,SAAS,eAAe,CAAC,UAAU,CAAC,GAAG,eAAe,CAAC,UAAU,CAAC,CACzE,SAAQ,oBAAoB,CAAC,OAAO,CAAC;CAAG"}
@@ -9,8 +9,8 @@ import { isAttachableModuleInstance } from "@xyo-network/module-model";
9
9
  import { AsObjectFactory } from "@xylabs/sdk-js";
10
10
  import {
11
11
  IsInstanceFactory,
12
- IsModuleFactory,
13
12
  isModuleInstance,
13
+ IsQueryableModuleFactory,
14
14
  WithFactory
15
15
  } from "@xyo-network/module-model";
16
16
 
@@ -46,7 +46,7 @@ var isNodeInstance = instanceFactory.create(
46
46
  },
47
47
  [isModuleInstance]
48
48
  );
49
- var isNodeModule = new IsModuleFactory().create([NodeAttachedQuerySchema]);
49
+ var isNodeModule = new IsQueryableModuleFactory().create([NodeAttachedQuerySchema]);
50
50
  var asNodeModule = AsObjectFactory.create(isNodeModule);
51
51
  var asNodeInstance = AsObjectFactory.create(isNodeInstance);
52
52
  var withNodeModule = WithFactory.create(isNodeModule);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/attachable/asAttachableInstance.ts","../../src/attachable/isAttachableInstance.ts","../../src/typeChecks.ts","../../src/Queries/Attach.ts","../../src/Queries/Attached.ts","../../src/Queries/Certify.ts","../../src/Queries/Detach.ts","../../src/Queries/Registered.ts","../../src/attachable/AttachableInstance.ts","../../src/ChildCertification.ts","../../src/Config.ts"],"sourcesContent":["import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isAttachableNodeInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableNodeInstance = AsObjectFactory.create(isAttachableNodeInstance)\n","import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\nimport { isAttachableModuleInstance } from '@xyo-network/module-model'\n\nimport { isNodeInstance } from '../typeChecks.ts'\nimport type { AttachableNodeInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableNodeInstanceFunctions: ObjectTypeShape = {}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableNodeInstance>()\n\nexport const isAttachableNodeInstance: TypeCheck<AttachableNodeInstance> = factory.create(requiredAttachableNodeInstanceFunctions, [\n isNodeInstance,\n isAttachableModuleInstance,\n])\n","import type { TypeCheck } from '@xylabs/sdk-js'\nimport { AsObjectFactory } from '@xylabs/sdk-js'\nimport {\n IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory,\n} from '@xyo-network/module-model'\n\nimport type { NodeInstance } from './instance.ts'\nimport type { NodeModule } from './Node.ts'\nimport { NodeAttachedQuerySchema } from './Queries/index.ts'\n\nconst instanceFactory = new IsInstanceFactory<NodeInstance>()\n\nexport const isNodeInstance: TypeCheck<NodeInstance> = instanceFactory.create(\n {\n attach: 'function',\n attached: 'function',\n certify: 'function',\n detach: 'function',\n registered: 'function',\n },\n [isModuleInstance],\n)\n\nexport const isNodeModule: TypeCheck<NodeModule> = new IsModuleFactory<NodeModule>().create([NodeAttachedQuerySchema])\n\nexport const asNodeModule = AsObjectFactory.create(isNodeModule)\nexport const asNodeInstance = AsObjectFactory.create(isNodeInstance)\nexport const withNodeModule = WithFactory.create(isNodeModule)\nexport const withNodeInstance = WithFactory.create(isNodeInstance)\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeAttachQuerySchema = asSchema('network.xyo.query.node.attach', true)\nexport type NodeAttachQuerySchema = typeof NodeAttachQuerySchema\n\nexport type NodeAttachQuery = Query<{\n external?: boolean\n id: ModuleIdentifier\n schema: NodeAttachQuerySchema\n}>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeAttachedQuerySchema = asSchema('network.xyo.query.node.attached', true)\nexport type NodeAttachedQuerySchema = typeof NodeAttachedQuerySchema\n\nexport type NodeAttachedQuery = Query<{\n schema: NodeAttachedQuerySchema\n}>\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeCertifyQuerySchema = asSchema('network.xyo.query.node.certify', true)\nexport type NodeCertifyQuerySchema = typeof NodeCertifyQuerySchema\n\nexport type NodeCertifyQuery = Query<{\n id: ModuleIdentifier\n schema: NodeCertifyQuerySchema\n}>\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeDetachQuerySchema = asSchema('network.xyo.query.node.detach', true)\nexport type NodeDetachQuerySchema = typeof NodeDetachQuerySchema\n\nexport type NodeDetachQuery = Query<{\n id: ModuleIdentifier\n schema: NodeDetachQuerySchema\n}>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeRegisteredQuerySchema = asSchema('network.xyo.query.node.registered', true)\nexport type NodeRegisteredQuerySchema = typeof NodeRegisteredQuerySchema\n\nexport type NodeRegisteredQuery = Query<{\n schema: NodeRegisteredQuerySchema\n}>\n","import type { TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\nimport type { AttachableModuleInstance } from '@xyo-network/module-model'\n\nimport type { NodeInstance } from '../instance.ts'\nimport type { NodeModule, NodeModuleEventData } from '../Node.ts'\nimport type { NodeParams } from '../Params.ts'\n\nexport interface AttachableNodeInstance<TParams extends NodeParams = NodeParams, TEventData extends NodeModuleEventData = NodeModuleEventData>\n extends NodeModule<TParams, TEventData>,\n AttachableModuleInstance<TParams, TEventData>,\n NodeInstance<TParams, TEventData> {}\n\nexport type AttachableNodeInstanceTypeCheck<T extends AttachableNodeInstance = AttachableNodeInstance> = TypeCheck<T>\n\nexport class IsAttachableNodeInstanceFactory<T extends AttachableNodeInstance = AttachableNodeInstance> extends IsObjectFactory<T> {}\n","import type { Address } from '@xylabs/sdk-js'\nimport { asSchema, type Payload } from '@xyo-network/payload-model'\n\nexport const ChildCertificationSchema = asSchema('network.xyo.child.certification', true)\nexport type ChildCertificationSchema = typeof ChildCertificationSchema\n\nexport interface ChildCertificationFields {\n address: Address\n expiration: number\n}\n\nexport type ChildCertification = Payload<ChildCertificationFields, ChildCertificationSchema>\n","import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js'\nimport type { ModuleConfig } from '@xyo-network/module-model'\nimport type {\n Payload,\n Schema,\n} from '@xyo-network/payload-model'\nimport { asSchema } from '@xyo-network/payload-model'\n\nexport const NodeConfigSchema = asSchema('network.xyo.node.config', true)\nexport type NodeConfigSchema = typeof NodeConfigSchema\n\nexport type NodeConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends Schema | void = void> = ModuleConfig<\n WithAdditional<\n {\n archivist?: string\n },\n TConfig\n >,\n TSchema extends void\n ? TConfig extends Payload\n ? TConfig['schema']\n : NodeConfigSchema\n : TSchema\n>\n"],"mappings":";AAAA,SAAS,mBAAAA,wBAAuB;;;ACChC,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;;;ACD3C,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EAAmB;AAAA,EAAiB;AAAA,EAAkB;AAAA,OACjD;;;ACHP,SAAS,gBAA4B;AAE9B,IAAM,wBAAwB,SAAS,iCAAiC,IAAI;;;ACHnF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,0BAA0BA,UAAS,mCAAmC,IAAI;;;ACDvF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,yBAAyBA,UAAS,kCAAkC,IAAI;;;ACFrF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,wBAAwBA,UAAS,iCAAiC,IAAI;;;ACHnF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,4BAA4BA,UAAS,qCAAqC,IAAI;;;ALQ3F,IAAM,kBAAkB,IAAI,kBAAgC;AAErD,IAAM,iBAA0C,gBAAgB;AAAA,EACrE;AAAA,IACE,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,YAAY;AAAA,EACd;AAAA,EACA,CAAC,gBAAgB;AACnB;AAEO,IAAM,eAAsC,IAAI,gBAA4B,EAAE,OAAO,CAAC,uBAAuB,CAAC;AAE9G,IAAM,eAAe,gBAAgB,OAAO,YAAY;AACxD,IAAM,iBAAiB,gBAAgB,OAAO,cAAc;AAC5D,IAAM,iBAAiB,YAAY,OAAO,YAAY;AACtD,IAAM,mBAAmB,YAAY,OAAO,cAAc;;;ADrB1D,IAAM,0CAA2D,CAAC;AAGzE,IAAM,UAAU,IAAI,gBAAwC;AAErD,IAAM,2BAA8D,QAAQ,OAAO,yCAAyC;AAAA,EACjI;AAAA,EACA;AACF,CAAC;;;ADXM,IAAM,2BAA2BC,iBAAgB,OAAO,wBAAwB;;;AQHvF,SAAS,mBAAAC,wBAAuB;AAczB,IAAM,kCAAN,cAAyGA,iBAAmB;AAAC;;;ACdpI,SAAS,YAAAC,iBAA8B;AAEhC,IAAM,2BAA2BA,UAAS,mCAAmC,IAAI;;;ACGxF,SAAS,YAAAC,iBAAgB;AAElB,IAAM,mBAAmBA,UAAS,2BAA2B,IAAI;","names":["AsObjectFactory","asSchema","asSchema","asSchema","asSchema","AsObjectFactory","IsObjectFactory","asSchema","asSchema"]}
1
+ {"version":3,"sources":["../../src/attachable/asAttachableInstance.ts","../../src/attachable/isAttachableInstance.ts","../../src/typeChecks.ts","../../src/Queries/Attach.ts","../../src/Queries/Attached.ts","../../src/Queries/Certify.ts","../../src/Queries/Detach.ts","../../src/Queries/Registered.ts","../../src/attachable/AttachableInstance.ts","../../src/ChildCertification.ts","../../src/Config.ts"],"sourcesContent":["import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isAttachableNodeInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableNodeInstance = AsObjectFactory.create(isAttachableNodeInstance)\n","import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\nimport { isAttachableModuleInstance } from '@xyo-network/module-model'\n\nimport { isNodeInstance } from '../typeChecks.ts'\nimport type { AttachableNodeInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableNodeInstanceFunctions: ObjectTypeShape = {}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableNodeInstance>()\n\nexport const isAttachableNodeInstance: TypeCheck<AttachableNodeInstance> = factory.create(requiredAttachableNodeInstanceFunctions, [\n isNodeInstance,\n isAttachableModuleInstance,\n])\n","import type { TypeCheck } from '@xylabs/sdk-js'\nimport { AsObjectFactory } from '@xylabs/sdk-js'\nimport {\n // eslint-disable-next-line sonarjs/deprecation\n IsInstanceFactory, isModuleInstance, IsQueryableModuleFactory, WithFactory,\n} from '@xyo-network/module-model'\n\nimport type { NodeInstance } from './instance.ts'\nimport type { NodeModule } from './Node.ts'\nimport { NodeAttachedQuerySchema } from './Queries/index.ts'\n\nconst instanceFactory = new IsInstanceFactory<NodeInstance>()\n\nexport const isNodeInstance: TypeCheck<NodeInstance> = instanceFactory.create(\n {\n attach: 'function',\n attached: 'function',\n certify: 'function',\n detach: 'function',\n registered: 'function',\n },\n [isModuleInstance],\n)\n\nexport const isNodeModule: TypeCheck<NodeModule> = new IsQueryableModuleFactory<NodeModule>().create([NodeAttachedQuerySchema])\n\nexport const asNodeModule = AsObjectFactory.create(isNodeModule)\nexport const asNodeInstance = AsObjectFactory.create(isNodeInstance)\n\n/** @deprecated use narrowing instead [ if(is) ] */\n// eslint-disable-next-line sonarjs/deprecation, @typescript-eslint/no-deprecated\nexport const withNodeModule = WithFactory.create(isNodeModule)\n/** @deprecated use narrowing instead [ if(is) ] */\n// eslint-disable-next-line sonarjs/deprecation, @typescript-eslint/no-deprecated\nexport const withNodeInstance = WithFactory.create(isNodeInstance)\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeAttachQuerySchema = asSchema('network.xyo.query.node.attach', true)\nexport type NodeAttachQuerySchema = typeof NodeAttachQuerySchema\n\nexport type NodeAttachQuery = Query<{\n external?: boolean\n id: ModuleIdentifier\n schema: NodeAttachQuerySchema\n}>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeAttachedQuerySchema = asSchema('network.xyo.query.node.attached', true)\nexport type NodeAttachedQuerySchema = typeof NodeAttachedQuerySchema\n\nexport type NodeAttachedQuery = Query<{\n schema: NodeAttachedQuerySchema\n}>\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeCertifyQuerySchema = asSchema('network.xyo.query.node.certify', true)\nexport type NodeCertifyQuerySchema = typeof NodeCertifyQuerySchema\n\nexport type NodeCertifyQuery = Query<{\n id: ModuleIdentifier\n schema: NodeCertifyQuerySchema\n}>\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeDetachQuerySchema = asSchema('network.xyo.query.node.detach', true)\nexport type NodeDetachQuerySchema = typeof NodeDetachQuerySchema\n\nexport type NodeDetachQuery = Query<{\n id: ModuleIdentifier\n schema: NodeDetachQuerySchema\n}>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeRegisteredQuerySchema = asSchema('network.xyo.query.node.registered', true)\nexport type NodeRegisteredQuerySchema = typeof NodeRegisteredQuerySchema\n\nexport type NodeRegisteredQuery = Query<{\n schema: NodeRegisteredQuerySchema\n}>\n","import type { TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\nimport type { AttachableModuleInstance } from '@xyo-network/module-model'\n\nimport type { NodeInstance } from '../instance.ts'\nimport type { NodeModule, NodeModuleEventData } from '../Node.ts'\nimport type { NodeParams } from '../Params.ts'\n\nexport interface AttachableNodeInstance<TParams extends NodeParams = NodeParams, TEventData extends NodeModuleEventData = NodeModuleEventData>\n extends NodeModule<TParams, TEventData>,\n AttachableModuleInstance<TParams, TEventData>,\n NodeInstance<TParams, TEventData> {}\n\nexport type AttachableNodeInstanceTypeCheck<T extends AttachableNodeInstance = AttachableNodeInstance> = TypeCheck<T>\n\nexport class IsAttachableNodeInstanceFactory<T extends AttachableNodeInstance = AttachableNodeInstance> extends IsObjectFactory<T> {}\n","import type { Address } from '@xylabs/sdk-js'\nimport { asSchema, type Payload } from '@xyo-network/payload-model'\n\nexport const ChildCertificationSchema = asSchema('network.xyo.child.certification', true)\nexport type ChildCertificationSchema = typeof ChildCertificationSchema\n\nexport interface ChildCertificationFields {\n address: Address\n expiration: number\n}\n\nexport type ChildCertification = Payload<ChildCertificationFields, ChildCertificationSchema>\n","import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js'\nimport type { ModuleConfig } from '@xyo-network/module-model'\nimport type {\n Payload,\n Schema,\n} from '@xyo-network/payload-model'\nimport { asSchema } from '@xyo-network/payload-model'\n\nexport const NodeConfigSchema = asSchema('network.xyo.node.config', true)\nexport type NodeConfigSchema = typeof NodeConfigSchema\n\nexport type NodeConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends Schema | void = void> = ModuleConfig<\n WithAdditional<\n {\n archivist?: string\n },\n TConfig\n >,\n TSchema extends void\n ? TConfig extends Payload\n ? TConfig['schema']\n : NodeConfigSchema\n : TSchema\n>\n"],"mappings":";AAAA,SAAS,mBAAAA,wBAAuB;;;ACChC,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;;;ACD3C,SAAS,uBAAuB;AAChC;AAAA,EAEE;AAAA,EAAmB;AAAA,EAAkB;AAAA,EAA0B;AAAA,OAC1D;;;ACJP,SAAS,gBAA4B;AAE9B,IAAM,wBAAwB,SAAS,iCAAiC,IAAI;;;ACHnF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,0BAA0BA,UAAS,mCAAmC,IAAI;;;ACDvF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,yBAAyBA,UAAS,kCAAkC,IAAI;;;ACFrF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,wBAAwBA,UAAS,iCAAiC,IAAI;;;ACHnF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,4BAA4BA,UAAS,qCAAqC,IAAI;;;ALS3F,IAAM,kBAAkB,IAAI,kBAAgC;AAErD,IAAM,iBAA0C,gBAAgB;AAAA,EACrE;AAAA,IACE,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,YAAY;AAAA,EACd;AAAA,EACA,CAAC,gBAAgB;AACnB;AAEO,IAAM,eAAsC,IAAI,yBAAqC,EAAE,OAAO,CAAC,uBAAuB,CAAC;AAEvH,IAAM,eAAe,gBAAgB,OAAO,YAAY;AACxD,IAAM,iBAAiB,gBAAgB,OAAO,cAAc;AAI5D,IAAM,iBAAiB,YAAY,OAAO,YAAY;AAGtD,IAAM,mBAAmB,YAAY,OAAO,cAAc;;;AD3B1D,IAAM,0CAA2D,CAAC;AAGzE,IAAM,UAAU,IAAI,gBAAwC;AAErD,IAAM,2BAA8D,QAAQ,OAAO,yCAAyC;AAAA,EACjI;AAAA,EACA;AACF,CAAC;;;ADXM,IAAM,2BAA2BC,iBAAgB,OAAO,wBAAwB;;;AQHvF,SAAS,mBAAAC,wBAAuB;AAczB,IAAM,kCAAN,cAAyGA,iBAAmB;AAAC;;;ACdpI,SAAS,YAAAC,iBAA8B;AAEhC,IAAM,2BAA2BA,UAAS,mCAAmC,IAAI;;;ACGxF,SAAS,YAAAC,iBAAgB;AAElB,IAAM,mBAAmBA,UAAS,2BAA2B,IAAI;","names":["AsObjectFactory","asSchema","asSchema","asSchema","asSchema","AsObjectFactory","IsObjectFactory","asSchema","asSchema"]}
@@ -5,6 +5,8 @@ export declare const isNodeInstance: TypeCheck<NodeInstance>;
5
5
  export declare const isNodeModule: TypeCheck<NodeModule>;
6
6
  export declare const asNodeModule: import("@xylabs/sdk-js").AsTypeFunction<NodeModule<import("./Params.ts").NodeParams<import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>>, import("./Node.ts").NodeModuleEventData>>;
7
7
  export declare const asNodeInstance: import("@xylabs/sdk-js").AsTypeFunction<NodeInstance<import("./Params.ts").NodeParams<import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>>, import("./Node.ts").NodeModuleEventData>>;
8
+ /** @deprecated use narrowing instead [ if(is) ] */
8
9
  export declare const withNodeModule: <R>(mod: any, closure: (mod: NodeModule<import("./Params.ts").NodeParams<import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>>, import("./Node.ts").NodeModuleEventData>) => R) => R | undefined;
10
+ /** @deprecated use narrowing instead [ if(is) ] */
9
11
  export declare const withNodeInstance: <R>(mod: any, closure: (mod: NodeInstance<import("./Params.ts").NodeParams<import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>>, import("./Node.ts").NodeModuleEventData>) => R) => R | undefined;
10
12
  //# sourceMappingURL=typeChecks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeChecks.d.ts","sourceRoot":"","sources":["../../src/typeChecks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAM/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAK3C,eAAO,MAAM,cAAc,EAAE,SAAS,CAAC,YAAY,CASlD,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,SAAS,CAAC,UAAU,CAAuE,CAAA;AAEtH,eAAO,MAAM,YAAY,uNAAuC,CAAA;AAChE,eAAO,MAAM,cAAc,yNAAyC,CAAA;AACpE,eAAO,MAAM,cAAc,mOAAmC,CAAA;AAC9D,eAAO,MAAM,gBAAgB,qOAAqC,CAAA"}
1
+ {"version":3,"file":"typeChecks.d.ts","sourceRoot":"","sources":["../../src/typeChecks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAO/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAK3C,eAAO,MAAM,cAAc,EAAE,SAAS,CAAC,YAAY,CASlD,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,SAAS,CAAC,UAAU,CAAgF,CAAA;AAE/H,eAAO,MAAM,YAAY,uNAAuC,CAAA;AAChE,eAAO,MAAM,cAAc,yNAAyC,CAAA;AAEpE,mDAAmD;AAEnD,eAAO,MAAM,cAAc,mOAAmC,CAAA;AAC9D,mDAAmD;AAEnD,eAAO,MAAM,gBAAgB,qOAAqC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/node-model",
3
- "version": "5.3.4",
3
+ "version": "5.3.6",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -36,9 +36,9 @@
36
36
  "!**/*.test.*"
37
37
  ],
38
38
  "dependencies": {
39
- "@xyo-network/account-model": "~5.3.4",
40
- "@xyo-network/module-model": "~5.3.4",
41
- "@xyo-network/payload-model": "~5.3.4"
39
+ "@xyo-network/account-model": "~5.3.6",
40
+ "@xyo-network/module-model": "~5.3.6",
41
+ "@xyo-network/payload-model": "~5.3.6"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@xylabs/sdk-js": "^5.0.79",
package/src/Params.ts CHANGED
@@ -1,7 +1,13 @@
1
- import type { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model'
1
+ import type {
2
+ AnyConfigSchema, ModuleInstanceParams, ModuleParams,
3
+ } from '@xyo-network/module-model'
2
4
 
3
5
  import type { NodeConfig } from './Config.ts'
4
6
 
5
7
  export interface NodeParams<
6
8
  TConfig extends AnyConfigSchema<NodeConfig> = AnyConfigSchema<NodeConfig>,
7
9
  > extends ModuleParams<TConfig> {}
10
+
11
+ export interface NodeInstanceParams<
12
+ TConfig extends AnyConfigSchema<NodeConfig> = AnyConfigSchema<NodeConfig>,
13
+ > extends ModuleInstanceParams<TConfig> {}
package/src/typeChecks.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import type { TypeCheck } from '@xylabs/sdk-js'
2
2
  import { AsObjectFactory } from '@xylabs/sdk-js'
3
3
  import {
4
- IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory,
4
+ // eslint-disable-next-line sonarjs/deprecation
5
+ IsInstanceFactory, isModuleInstance, IsQueryableModuleFactory, WithFactory,
5
6
  } from '@xyo-network/module-model'
6
7
 
7
8
  import type { NodeInstance } from './instance.ts'
@@ -21,9 +22,14 @@ export const isNodeInstance: TypeCheck<NodeInstance> = instanceFactory.create(
21
22
  [isModuleInstance],
22
23
  )
23
24
 
24
- export const isNodeModule: TypeCheck<NodeModule> = new IsModuleFactory<NodeModule>().create([NodeAttachedQuerySchema])
25
+ export const isNodeModule: TypeCheck<NodeModule> = new IsQueryableModuleFactory<NodeModule>().create([NodeAttachedQuerySchema])
25
26
 
26
27
  export const asNodeModule = AsObjectFactory.create(isNodeModule)
27
28
  export const asNodeInstance = AsObjectFactory.create(isNodeInstance)
29
+
30
+ /** @deprecated use narrowing instead [ if(is) ] */
31
+ // eslint-disable-next-line sonarjs/deprecation, @typescript-eslint/no-deprecated
28
32
  export const withNodeModule = WithFactory.create(isNodeModule)
33
+ /** @deprecated use narrowing instead [ if(is) ] */
34
+ // eslint-disable-next-line sonarjs/deprecation, @typescript-eslint/no-deprecated
29
35
  export const withNodeInstance = WithFactory.create(isNodeInstance)