@xyo-network/node-model 3.6.9 → 3.6.11

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,7 +1,7 @@
1
1
  import type { ModuleIdentifier } from '@xyo-network/module-model';
2
2
  import type { Query } from '@xyo-network/payload-model';
3
- export type NodeAttachQuerySchema = 'network.xyo.query.node.attach';
4
- export declare const NodeAttachQuerySchema: NodeAttachQuerySchema;
3
+ export declare const NodeAttachQuerySchema: "network.xyo.query.node.attach";
4
+ export type NodeAttachQuerySchema = typeof NodeAttachQuerySchema;
5
5
  export type NodeAttachQuery = Query<{
6
6
  external?: boolean;
7
7
  id: ModuleIdentifier;
@@ -1 +1 @@
1
- {"version":3,"file":"Attach.d.ts","sourceRoot":"","sources":["../../../src/Queries/Attach.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEvD,MAAM,MAAM,qBAAqB,GAAG,+BAA+B,CAAA;AACnE,eAAO,MAAM,qBAAqB,EAAE,qBAAuD,CAAA;AAE3F,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,EAAE,EAAE,gBAAgB,CAAA;IACpB,MAAM,EAAE,qBAAqB,CAAA;CAC9B,CAAC,CAAA"}
1
+ {"version":3,"file":"Attach.d.ts","sourceRoot":"","sources":["../../../src/Queries/Attach.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEvD,eAAO,MAAM,qBAAqB,EAAG,+BAAwC,CAAA;AAC7E,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA;AAEhE,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,EAAE,EAAE,gBAAgB,CAAA;IACpB,MAAM,EAAE,qBAAqB,CAAA;CAC9B,CAAC,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { Query } from '@xyo-network/payload-model';
2
- export type NodeAttachedQuerySchema = 'network.xyo.query.node.attached';
3
- export declare const NodeAttachedQuerySchema: NodeAttachedQuerySchema;
2
+ export declare const NodeAttachedQuerySchema: "network.xyo.query.node.attached";
3
+ export type NodeAttachedQuerySchema = typeof NodeAttachedQuerySchema;
4
4
  export type NodeAttachedQuery = Query<{
5
5
  schema: NodeAttachedQuerySchema;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"Attached.d.ts","sourceRoot":"","sources":["../../../src/Queries/Attached.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEvD,MAAM,MAAM,uBAAuB,GAAG,iCAAiC,CAAA;AACvE,eAAO,MAAM,uBAAuB,EAAE,uBAA2D,CAAA;AAEjG,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC;IACpC,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAC,CAAA"}
1
+ {"version":3,"file":"Attached.d.ts","sourceRoot":"","sources":["../../../src/Queries/Attached.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEvD,eAAO,MAAM,uBAAuB,EAAG,iCAA0C,CAAA;AACjF,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAA;AAEpE,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC;IACpC,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAC,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import type { ModuleIdentifier } from '@xyo-network/module-model';
2
2
  import type { Query } from '@xyo-network/payload-model';
3
- export type NodeCertifyQuerySchema = 'network.xyo.query.node.certify';
4
- export declare const NodeCertifyQuerySchema: NodeCertifyQuerySchema;
3
+ export declare const NodeCertifyQuerySchema: "network.xyo.query.node.certify";
4
+ export type NodeCertifyQuerySchema = typeof NodeCertifyQuerySchema;
5
5
  export type NodeCertifyQuery = Query<{
6
6
  id: ModuleIdentifier;
7
7
  schema: NodeCertifyQuerySchema;
@@ -1 +1 @@
1
- {"version":3,"file":"Certify.d.ts","sourceRoot":"","sources":["../../../src/Queries/Certify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEvD,MAAM,MAAM,sBAAsB,GAAG,gCAAgC,CAAA;AACrE,eAAO,MAAM,sBAAsB,EAAE,sBAAyD,CAAA;AAE9F,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC;IACnC,EAAE,EAAE,gBAAgB,CAAA;IACpB,MAAM,EAAE,sBAAsB,CAAA;CAC/B,CAAC,CAAA"}
1
+ {"version":3,"file":"Certify.d.ts","sourceRoot":"","sources":["../../../src/Queries/Certify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEvD,eAAO,MAAM,sBAAsB,EAAG,gCAAyC,CAAA;AAC/E,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAA;AAElE,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC;IACnC,EAAE,EAAE,gBAAgB,CAAA;IACpB,MAAM,EAAE,sBAAsB,CAAA;CAC/B,CAAC,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import type { ModuleIdentifier } from '@xyo-network/module-model';
2
2
  import type { Query } from '@xyo-network/payload-model';
3
- export type NodeDetachQuerySchema = 'network.xyo.query.node.detach';
4
- export declare const NodeDetachQuerySchema: NodeDetachQuerySchema;
3
+ export declare const NodeDetachQuerySchema: "network.xyo.query.node.detach";
4
+ export type NodeDetachQuerySchema = typeof NodeDetachQuerySchema;
5
5
  export type NodeDetachQuery = Query<{
6
6
  id: ModuleIdentifier;
7
7
  schema: NodeDetachQuerySchema;
@@ -1 +1 @@
1
- {"version":3,"file":"Detach.d.ts","sourceRoot":"","sources":["../../../src/Queries/Detach.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEvD,MAAM,MAAM,qBAAqB,GAAG,+BAA+B,CAAA;AACnE,eAAO,MAAM,qBAAqB,EAAE,qBAAuD,CAAA;AAE3F,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC;IAClC,EAAE,EAAE,gBAAgB,CAAA;IACpB,MAAM,EAAE,qBAAqB,CAAA;CAC9B,CAAC,CAAA"}
1
+ {"version":3,"file":"Detach.d.ts","sourceRoot":"","sources":["../../../src/Queries/Detach.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEvD,eAAO,MAAM,qBAAqB,EAAG,+BAAwC,CAAA;AAC7E,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA;AAEhE,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC;IAClC,EAAE,EAAE,gBAAgB,CAAA;IACpB,MAAM,EAAE,qBAAqB,CAAA;CAC9B,CAAC,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { Query } from '@xyo-network/payload-model';
2
- export type NodeRegisteredQuerySchema = 'network.xyo.query.node.registered';
3
- export declare const NodeRegisteredQuerySchema: NodeRegisteredQuerySchema;
2
+ export declare const NodeRegisteredQuerySchema: "network.xyo.query.node.registered";
3
+ export type NodeRegisteredQuerySchema = typeof NodeRegisteredQuerySchema;
4
4
  export type NodeRegisteredQuery = Query<{
5
5
  schema: NodeRegisteredQuerySchema;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"Registered.d.ts","sourceRoot":"","sources":["../../../src/Queries/Registered.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEvD,MAAM,MAAM,yBAAyB,GAAG,mCAAmC,CAAA;AAC3E,eAAO,MAAM,yBAAyB,EAAE,yBAA+D,CAAA;AAEvG,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC;IACtC,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC,CAAA"}
1
+ {"version":3,"file":"Registered.d.ts","sourceRoot":"","sources":["../../../src/Queries/Registered.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEvD,eAAO,MAAM,yBAAyB,EAAG,mCAA4C,CAAA;AACrF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC;IACtC,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC,CAAA"}
@@ -1,6 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/attachable/asAttachableInstance.ts
5
2
  import { AsObjectFactory as AsObjectFactory2 } from "@xylabs/object";
6
3
 
@@ -10,7 +7,12 @@ import { isAttachableModuleInstance } from "@xyo-network/module-model";
10
7
 
11
8
  // src/typeChecks.ts
12
9
  import { AsObjectFactory } from "@xylabs/object";
13
- import { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from "@xyo-network/module-model";
10
+ import {
11
+ IsInstanceFactory,
12
+ IsModuleFactory,
13
+ isModuleInstance,
14
+ WithFactory
15
+ } from "@xyo-network/module-model";
14
16
 
15
17
  // src/Queries/Attach.ts
16
18
  var NodeAttachQuerySchema = "network.xyo.query.node.attach";
@@ -29,19 +31,18 @@ var NodeRegisteredQuerySchema = "network.xyo.query.node.registered";
29
31
 
30
32
  // src/typeChecks.ts
31
33
  var instanceFactory = new IsInstanceFactory();
32
- var isNodeInstance = instanceFactory.create({
33
- attach: "function",
34
- attached: "function",
35
- certify: "function",
36
- detach: "function",
37
- registered: "function"
38
- }, [
39
- isModuleInstance
40
- ]);
34
+ var isNodeInstance = instanceFactory.create(
35
+ {
36
+ attach: "function",
37
+ attached: "function",
38
+ certify: "function",
39
+ detach: "function",
40
+ registered: "function"
41
+ },
42
+ [isModuleInstance]
43
+ );
41
44
  var moduleFactory = new IsModuleFactory();
42
- var isNodeModule = moduleFactory.create([
43
- NodeAttachedQuerySchema
44
- ]);
45
+ var isNodeModule = moduleFactory.create([NodeAttachedQuerySchema]);
45
46
  var asNodeModule = AsObjectFactory.create(isNodeModule);
46
47
  var asNodeInstance = AsObjectFactory.create(isNodeInstance);
47
48
  var withNodeModule = WithFactory.create(isNodeModule);
@@ -61,9 +62,6 @@ var asAttachableNodeInstance = AsObjectFactory2.create(isAttachableNodeInstance)
61
62
  // src/attachable/AttachableInstance.ts
62
63
  import { IsObjectFactory as IsObjectFactory2 } from "@xylabs/object";
63
64
  var IsAttachableNodeInstanceFactory = class extends IsObjectFactory2 {
64
- static {
65
- __name(this, "IsAttachableNodeInstanceFactory");
66
- }
67
65
  };
68
66
 
69
67
  // src/ChildCertification.ts
@@ -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/object'\n\nimport { isAttachableNodeInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableNodeInstance = AsObjectFactory.create(isAttachableNodeInstance)\n","import type { TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\nimport type { ObjectTypeShape } from '@xylabs/typeof'\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 { AsObjectFactory } from '@xylabs/object'\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 = instanceFactory.create(\n {\n attach: 'function',\n attached: 'function',\n certify: 'function',\n detach: 'function',\n registered: 'function',\n },\n [isModuleInstance],\n)\n\nconst moduleFactory = new IsModuleFactory<NodeModule>()\n\nexport const isNodeModule = moduleFactory.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 type { Query } from '@xyo-network/payload-model'\n\nexport type NodeAttachQuerySchema = 'network.xyo.query.node.attach'\nexport const NodeAttachQuerySchema: NodeAttachQuerySchema = 'network.xyo.query.node.attach'\n\nexport type NodeAttachQuery = Query<{\n external?: boolean\n id: ModuleIdentifier\n schema: NodeAttachQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nexport type NodeAttachedQuerySchema = 'network.xyo.query.node.attached'\nexport const NodeAttachedQuerySchema: NodeAttachedQuerySchema = 'network.xyo.query.node.attached'\n\nexport type NodeAttachedQuery = Query<{\n schema: NodeAttachedQuerySchema\n}>\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport type { Query } from '@xyo-network/payload-model'\n\nexport type NodeCertifyQuerySchema = 'network.xyo.query.node.certify'\nexport const NodeCertifyQuerySchema: NodeCertifyQuerySchema = 'network.xyo.query.node.certify'\n\nexport type NodeCertifyQuery = Query<{\n id: ModuleIdentifier\n schema: NodeCertifyQuerySchema\n}>\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport type { Query } from '@xyo-network/payload-model'\n\nexport type NodeDetachQuerySchema = 'network.xyo.query.node.detach'\nexport const NodeDetachQuerySchema: NodeDetachQuerySchema = 'network.xyo.query.node.detach'\n\nexport type NodeDetachQuery = Query<{\n id: ModuleIdentifier\n schema: NodeDetachQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nexport type NodeRegisteredQuerySchema = 'network.xyo.query.node.registered'\nexport const NodeRegisteredQuerySchema: NodeRegisteredQuerySchema = 'network.xyo.query.node.registered'\n\nexport type NodeRegisteredQuery = Query<{\n schema: NodeRegisteredQuerySchema\n}>\n","import type { TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\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/hex'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const ChildCertificationSchema = 'network.xyo.child.certification' as const\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/object'\nimport type { ModuleConfig } from '@xyo-network/module-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const NodeConfigSchema = 'network.xyo.node.config' as const\nexport type NodeConfigSchema = typeof NodeConfigSchema\n\nexport type NodeConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends string | 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,SAASA,mBAAAA,wBAAuB;;;ACChC,SAASC,uBAAuB;AAEhC,SAASC,kCAAkC;;;ACH3C,SAASC,uBAAuB;AAChC,SACEC,mBAAmBC,iBAAiBC,kBAAkBC,mBACjD;;;ACCA,IAAMC,wBAA+C;;;ACDrD,IAAMC,0BAAmD;;;ACCzD,IAAMC,yBAAiD;;;ACAvD,IAAMC,wBAA+C;;;ACDrD,IAAMC,4BAAuD;;;ALMpE,IAAMC,kBAAkB,IAAIC,kBAAAA;AAErB,IAAMC,iBAAiBF,gBAAgBG,OAC5C;EACEC,QAAQ;EACRC,UAAU;EACVC,SAAS;EACTC,QAAQ;EACRC,YAAY;AACd,GACA;EAACC;CAAiB;AAGpB,IAAMC,gBAAgB,IAAIC,gBAAAA;AAEnB,IAAMC,eAAeF,cAAcP,OAAO;EAACU;CAAwB;AAEnE,IAAMC,eAAeC,gBAAgBZ,OAAOS,YAAAA;AAC5C,IAAMI,iBAAiBD,gBAAgBZ,OAAOD,cAAAA;AAC9C,IAAMe,iBAAiBC,YAAYf,OAAOS,YAAAA;AAC1C,IAAMO,mBAAmBD,YAAYf,OAAOD,cAAAA;;;ADrB5C,IAAMkB,0CAA2D,CAAC;AAGzE,IAAMC,UAAU,IAAIC,gBAAAA;AAEb,IAAMC,2BAA8DF,QAAQG,OAAOJ,yCAAyC;EACjIK;EACAC;CACD;;;ADZM,IAAMC,2BAA2BC,iBAAgBC,OAAOC,wBAAAA;;;AQH/D,SAASC,mBAAAA,wBAAuB;AAczB,IAAMC,kCAAN,cAAyGC,iBAAAA;EAdhH,OAcgHA;;;AAAoB;;;ACZ7H,IAAMC,2BAA2B;;;ACCjC,IAAMC,mBAAmB;","names":["AsObjectFactory","IsObjectFactory","isAttachableModuleInstance","AsObjectFactory","IsInstanceFactory","IsModuleFactory","isModuleInstance","WithFactory","NodeAttachQuerySchema","NodeAttachedQuerySchema","NodeCertifyQuerySchema","NodeDetachQuerySchema","NodeRegisteredQuerySchema","instanceFactory","IsInstanceFactory","isNodeInstance","create","attach","attached","certify","detach","registered","isModuleInstance","moduleFactory","IsModuleFactory","isNodeModule","NodeAttachedQuerySchema","asNodeModule","AsObjectFactory","asNodeInstance","withNodeModule","WithFactory","withNodeInstance","requiredAttachableNodeInstanceFunctions","factory","IsObjectFactory","isAttachableNodeInstance","create","isNodeInstance","isAttachableModuleInstance","asAttachableNodeInstance","AsObjectFactory","create","isAttachableNodeInstance","IsObjectFactory","IsAttachableNodeInstanceFactory","IsObjectFactory","ChildCertificationSchema","NodeConfigSchema"]}
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/object'\n\nimport { isAttachableNodeInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableNodeInstance = AsObjectFactory.create(isAttachableNodeInstance)\n","import type { TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\nimport type { ObjectTypeShape } from '@xylabs/typeof'\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 { AsObjectFactory } from '@xylabs/object'\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 = instanceFactory.create(\n {\n attach: 'function',\n attached: 'function',\n certify: 'function',\n detach: 'function',\n registered: 'function',\n },\n [isModuleInstance],\n)\n\nconst moduleFactory = new IsModuleFactory<NodeModule>()\n\nexport const isNodeModule = moduleFactory.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 type { Query } from '@xyo-network/payload-model'\n\nexport const NodeAttachQuerySchema = 'network.xyo.query.node.attach' as const\nexport type NodeAttachQuerySchema = typeof NodeAttachQuerySchema\n\nexport type NodeAttachQuery = Query<{\n external?: boolean\n id: ModuleIdentifier\n schema: NodeAttachQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nexport const NodeAttachedQuerySchema = 'network.xyo.query.node.attached' as const\nexport type NodeAttachedQuerySchema = typeof NodeAttachedQuerySchema\n\nexport type NodeAttachedQuery = Query<{\n schema: NodeAttachedQuerySchema\n}>\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport type { Query } from '@xyo-network/payload-model'\n\nexport const NodeCertifyQuerySchema = 'network.xyo.query.node.certify' as const\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 type { Query } from '@xyo-network/payload-model'\n\nexport const NodeDetachQuerySchema = 'network.xyo.query.node.detach' as const\nexport type NodeDetachQuerySchema = typeof NodeDetachQuerySchema\n\nexport type NodeDetachQuery = Query<{\n id: ModuleIdentifier\n schema: NodeDetachQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nexport const NodeRegisteredQuerySchema = 'network.xyo.query.node.registered' as const\nexport type NodeRegisteredQuerySchema = typeof NodeRegisteredQuerySchema\n\nexport type NodeRegisteredQuery = Query<{\n schema: NodeRegisteredQuerySchema\n}>\n","import type { TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\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/hex'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const ChildCertificationSchema = 'network.xyo.child.certification' as const\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/object'\nimport type { ModuleConfig } from '@xyo-network/module-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const NodeConfigSchema = 'network.xyo.node.config' as const\nexport type NodeConfigSchema = typeof NodeConfigSchema\n\nexport type NodeConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends string | 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;AAEhC,SAAS,kCAAkC;;;ACH3C,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EAAmB;AAAA,EAAiB;AAAA,EAAkB;AAAA,OACjD;;;ACAA,IAAM,wBAAwB;;;ACD9B,IAAM,0BAA0B;;;ACChC,IAAM,yBAAyB;;;ACA/B,IAAM,wBAAwB;;;ACD9B,IAAM,4BAA4B;;;ALOzC,IAAM,kBAAkB,IAAI,kBAAgC;AAErD,IAAM,iBAAiB,gBAAgB;AAAA,EAC5C;AAAA,IACE,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,YAAY;AAAA,EACd;AAAA,EACA,CAAC,gBAAgB;AACnB;AAEA,IAAM,gBAAgB,IAAI,gBAA4B;AAE/C,IAAM,eAAe,cAAc,OAAO,CAAC,uBAAuB,CAAC;AAEnE,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;;;ADZM,IAAM,2BAA2BC,iBAAgB,OAAO,wBAAwB;;;AQHvF,SAAS,mBAAAC,wBAAuB;AAczB,IAAM,kCAAN,cAAyGA,iBAAmB;AAAC;;;ACZ7H,IAAM,2BAA2B;;;ACCjC,IAAM,mBAAmB;","names":["AsObjectFactory","AsObjectFactory","IsObjectFactory"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/node-model",
3
- "version": "3.6.9",
3
+ "version": "3.6.11",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -29,18 +29,18 @@
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/hex": "^4.4.34",
33
- "@xylabs/object": "^4.4.34",
34
- "@xylabs/typeof": "^4.4.34",
35
- "@xyo-network/account-model": "^3.6.9",
36
- "@xyo-network/module-events": "^3.6.9",
37
- "@xyo-network/module-model": "^3.6.9",
38
- "@xyo-network/payload-model": "^3.6.9"
32
+ "@xylabs/hex": "^4.5.1",
33
+ "@xylabs/object": "^4.5.1",
34
+ "@xylabs/typeof": "^4.5.1",
35
+ "@xyo-network/account-model": "^3.6.11",
36
+ "@xyo-network/module-events": "^3.6.11",
37
+ "@xyo-network/module-model": "^3.6.11",
38
+ "@xyo-network/payload-model": "^3.6.11"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@xylabs/ts-scripts-yarn3": "^4.2.6",
42
42
  "@xylabs/tsconfig": "^4.2.6",
43
- "typescript": "^5.7.2"
43
+ "typescript": "^5.7.3"
44
44
  },
45
45
  "publishConfig": {
46
46
  "access": "public"
@@ -1,8 +1,8 @@
1
1
  import type { ModuleIdentifier } from '@xyo-network/module-model'
2
2
  import type { Query } from '@xyo-network/payload-model'
3
3
 
4
- export type NodeAttachQuerySchema = 'network.xyo.query.node.attach'
5
- export const NodeAttachQuerySchema: NodeAttachQuerySchema = 'network.xyo.query.node.attach'
4
+ export const NodeAttachQuerySchema = 'network.xyo.query.node.attach' as const
5
+ export type NodeAttachQuerySchema = typeof NodeAttachQuerySchema
6
6
 
7
7
  export type NodeAttachQuery = Query<{
8
8
  external?: boolean
@@ -1,7 +1,7 @@
1
1
  import type { Query } from '@xyo-network/payload-model'
2
2
 
3
- export type NodeAttachedQuerySchema = 'network.xyo.query.node.attached'
4
- export const NodeAttachedQuerySchema: NodeAttachedQuerySchema = 'network.xyo.query.node.attached'
3
+ export const NodeAttachedQuerySchema = 'network.xyo.query.node.attached' as const
4
+ export type NodeAttachedQuerySchema = typeof NodeAttachedQuerySchema
5
5
 
6
6
  export type NodeAttachedQuery = Query<{
7
7
  schema: NodeAttachedQuerySchema
@@ -1,8 +1,8 @@
1
1
  import type { ModuleIdentifier } from '@xyo-network/module-model'
2
2
  import type { Query } from '@xyo-network/payload-model'
3
3
 
4
- export type NodeCertifyQuerySchema = 'network.xyo.query.node.certify'
5
- export const NodeCertifyQuerySchema: NodeCertifyQuerySchema = 'network.xyo.query.node.certify'
4
+ export const NodeCertifyQuerySchema = 'network.xyo.query.node.certify' as const
5
+ export type NodeCertifyQuerySchema = typeof NodeCertifyQuerySchema
6
6
 
7
7
  export type NodeCertifyQuery = Query<{
8
8
  id: ModuleIdentifier
@@ -1,8 +1,8 @@
1
1
  import type { ModuleIdentifier } from '@xyo-network/module-model'
2
2
  import type { Query } from '@xyo-network/payload-model'
3
3
 
4
- export type NodeDetachQuerySchema = 'network.xyo.query.node.detach'
5
- export const NodeDetachQuerySchema: NodeDetachQuerySchema = 'network.xyo.query.node.detach'
4
+ export const NodeDetachQuerySchema = 'network.xyo.query.node.detach' as const
5
+ export type NodeDetachQuerySchema = typeof NodeDetachQuerySchema
6
6
 
7
7
  export type NodeDetachQuery = Query<{
8
8
  id: ModuleIdentifier
@@ -1,7 +1,7 @@
1
1
  import type { Query } from '@xyo-network/payload-model'
2
2
 
3
- export type NodeRegisteredQuerySchema = 'network.xyo.query.node.registered'
4
- export const NodeRegisteredQuerySchema: NodeRegisteredQuerySchema = 'network.xyo.query.node.registered'
3
+ export const NodeRegisteredQuerySchema = 'network.xyo.query.node.registered' as const
4
+ export type NodeRegisteredQuerySchema = typeof NodeRegisteredQuerySchema
5
5
 
6
6
  export type NodeRegisteredQuery = Query<{
7
7
  schema: NodeRegisteredQuerySchema