@xyo-network/node-model 3.3.3 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TypeCheck } from '@xylabs/object';
|
|
2
|
+
import type { ObjectTypeShape } from '@xylabs/typeof';
|
|
2
3
|
import type { AttachableNodeInstance } from './AttachableInstance.ts';
|
|
3
4
|
export declare const requiredAttachableNodeInstanceFunctions: ObjectTypeShape;
|
|
4
5
|
export declare const isAttachableNodeInstance: TypeCheck<AttachableNodeInstance>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isAttachableInstance.d.ts","sourceRoot":"","sources":["../../../src/attachable/isAttachableInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"isAttachableInstance.d.ts","sourceRoot":"","sources":["../../../src/attachable/isAttachableInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAIrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAErE,eAAO,MAAM,uCAAuC,EAAE,eAAoB,CAAA;AAK1E,eAAO,MAAM,wBAAwB,EAAE,SAAS,CAAC,sBAAsB,CAGrE,CAAA"}
|
|
@@ -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 {
|
|
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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/node-model",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -29,16 +29,17 @@
|
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/hex": "^4.3.
|
|
33
|
-
"@xylabs/object": "^4.3.
|
|
34
|
-
"@
|
|
35
|
-
"@xyo-network/
|
|
36
|
-
"@xyo-network/module-
|
|
37
|
-
"@xyo-network/
|
|
32
|
+
"@xylabs/hex": "^4.3.13",
|
|
33
|
+
"@xylabs/object": "^4.3.13",
|
|
34
|
+
"@xylabs/typeof": "^4.3.13",
|
|
35
|
+
"@xyo-network/account-model": "^3.4.1",
|
|
36
|
+
"@xyo-network/module-events": "^3.4.1",
|
|
37
|
+
"@xyo-network/module-model": "^3.4.1",
|
|
38
|
+
"@xyo-network/payload-model": "^3.4.1"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"@xylabs/ts-scripts-yarn3": "^4.2.
|
|
41
|
-
"@xylabs/tsconfig": "^4.2.
|
|
41
|
+
"@xylabs/ts-scripts-yarn3": "^4.2.4",
|
|
42
|
+
"@xylabs/tsconfig": "^4.2.4",
|
|
42
43
|
"typescript": "^5.6.3"
|
|
43
44
|
},
|
|
44
45
|
"publishConfig": {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TypeCheck } from '@xylabs/object'
|
|
2
2
|
import { IsObjectFactory } from '@xylabs/object'
|
|
3
|
+
import type { ObjectTypeShape } from '@xylabs/typeof'
|
|
3
4
|
import { isAttachableModuleInstance } from '@xyo-network/module-model'
|
|
4
5
|
|
|
5
6
|
import { isNodeInstance } from '../typeChecks.ts'
|