@xyo-network/node-model 2.84.2 → 2.84.4
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/dist/node/index.cjs +89 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.js +11 -48
- package/dist/node/index.js.map +1 -1
- package/package.json +14 -14
- package/dist/node/index.mjs +0 -52
- package/dist/node/index.mjs.map +0 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
NodeAttachQuerySchema: () => NodeAttachQuerySchema,
|
|
24
|
+
NodeAttachedQuerySchema: () => NodeAttachedQuerySchema,
|
|
25
|
+
NodeConfigSchema: () => NodeConfigSchema,
|
|
26
|
+
NodeDetachQuerySchema: () => NodeDetachQuerySchema,
|
|
27
|
+
NodeRegisteredQuerySchema: () => NodeRegisteredQuerySchema,
|
|
28
|
+
asNodeInstance: () => asNodeInstance,
|
|
29
|
+
asNodeModule: () => asNodeModule,
|
|
30
|
+
isNodeInstance: () => isNodeInstance,
|
|
31
|
+
isNodeModule: () => isNodeModule,
|
|
32
|
+
withNodeInstance: () => withNodeInstance,
|
|
33
|
+
withNodeModule: () => withNodeModule
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(src_exports);
|
|
36
|
+
|
|
37
|
+
// src/Config.ts
|
|
38
|
+
var NodeConfigSchema = "network.xyo.node.config";
|
|
39
|
+
|
|
40
|
+
// src/Queries/Attach.ts
|
|
41
|
+
var NodeAttachQuerySchema = "network.xyo.query.node.attach";
|
|
42
|
+
|
|
43
|
+
// src/Queries/Attached.ts
|
|
44
|
+
var NodeAttachedQuerySchema = "network.xyo.query.node.attached";
|
|
45
|
+
|
|
46
|
+
// src/Queries/Detach.ts
|
|
47
|
+
var NodeDetachQuerySchema = "network.xyo.query.node.detach";
|
|
48
|
+
|
|
49
|
+
// src/Queries/Registered.ts
|
|
50
|
+
var NodeRegisteredQuerySchema = "network.xyo.query.node.registered";
|
|
51
|
+
|
|
52
|
+
// src/typeChecks.ts
|
|
53
|
+
var import_module_model = require("@xyo-network/module-model");
|
|
54
|
+
var import_object = require("@xyo-network/object");
|
|
55
|
+
var instanceFactory = new import_module_model.IsInstanceFactory();
|
|
56
|
+
var isNodeInstance = instanceFactory.create({
|
|
57
|
+
attach: "function",
|
|
58
|
+
attached: "function",
|
|
59
|
+
detach: "function",
|
|
60
|
+
registered: "function"
|
|
61
|
+
}, [
|
|
62
|
+
import_module_model.isModuleInstance
|
|
63
|
+
]);
|
|
64
|
+
var moduleFactory = new import_module_model.IsModuleFactory();
|
|
65
|
+
var isNodeModule = moduleFactory.create([
|
|
66
|
+
NodeAttachedQuerySchema,
|
|
67
|
+
NodeAttachQuerySchema,
|
|
68
|
+
NodeDetachQuerySchema,
|
|
69
|
+
NodeRegisteredQuerySchema
|
|
70
|
+
]);
|
|
71
|
+
var asNodeModule = import_object.AsObjectFactory.create(isNodeModule);
|
|
72
|
+
var asNodeInstance = import_object.AsObjectFactory.create(isNodeInstance);
|
|
73
|
+
var withNodeModule = import_module_model.WithFactory.create(isNodeModule);
|
|
74
|
+
var withNodeInstance = import_module_model.WithFactory.create(isNodeInstance);
|
|
75
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
76
|
+
0 && (module.exports = {
|
|
77
|
+
NodeAttachQuerySchema,
|
|
78
|
+
NodeAttachedQuerySchema,
|
|
79
|
+
NodeConfigSchema,
|
|
80
|
+
NodeDetachQuerySchema,
|
|
81
|
+
NodeRegisteredQuerySchema,
|
|
82
|
+
asNodeInstance,
|
|
83
|
+
asNodeModule,
|
|
84
|
+
isNodeInstance,
|
|
85
|
+
isNodeModule,
|
|
86
|
+
withNodeInstance,
|
|
87
|
+
withNodeModule
|
|
88
|
+
});
|
|
89
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Config.ts","../../src/Queries/Attach.ts","../../src/Queries/Attached.ts","../../src/Queries/Detach.ts","../../src/Queries/Registered.ts","../../src/typeChecks.ts"],"sourcesContent":["export * from './Config'\nexport * from './EventsModels'\nexport * from './Node'\nexport * from './Params'\nexport * from './Queries'\nexport * from './typeChecks'\n","import { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport type NodeConfigSchema = 'network.xyo.node.config'\nexport const NodeConfigSchema: NodeConfigSchema = 'network.xyo.node.config'\n\nexport type NodeConfig<TConfig extends Payload | void = void> = ModuleConfig<\n TConfig,\n {\n archivist?: string\n },\n TConfig extends Payload ? TConfig['schema'] : NodeConfigSchema\n>\n","import { 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 nameOrAddress: string\n schema: NodeAttachQuerySchema\n}>\n","import { 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 { 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 nameOrAddress: string\n schema: NodeDetachQuerySchema\n}>\n","import { 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 { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\nimport { AsObjectFactory } from '@xyo-network/object'\n\nimport { NodeInstance, NodeModule } from './Node'\nimport { NodeAttachedQuerySchema, NodeAttachQuerySchema, NodeDetachQuerySchema, NodeRegisteredQuerySchema } from './Queries'\n\nconst instanceFactory = new IsInstanceFactory<NodeInstance>()\n\nexport const isNodeInstance = instanceFactory.create(\n {\n attach: 'function',\n attached: 'function',\n detach: 'function',\n registered: 'function',\n },\n [isModuleInstance],\n)\n\nconst moduleFactory = new IsModuleFactory<NodeModule>()\n\nexport const isNodeModule = moduleFactory.create([NodeAttachedQuerySchema, NodeAttachQuerySchema, NodeDetachQuerySchema, NodeRegisteredQuerySchema])\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;ACIO,IAAMA,mBAAqC;;;ACD3C,IAAMC,wBAA+C;;;ACArD,IAAMC,0BAAmD;;;ACAzD,IAAMC,wBAA+C;;;ACArD,IAAMC,4BAAuD;;;ACHpE,0BAAkF;AAClF,oBAAgC;AAKhC,IAAMC,kBAAkB,IAAIC,sCAAAA;AAErB,IAAMC,iBAAiBF,gBAAgBG,OAC5C;EACEC,QAAQ;EACRC,UAAU;EACVC,QAAQ;EACRC,YAAY;AACd,GACA;EAACC;CAAiB;AAGpB,IAAMC,gBAAgB,IAAIC,oCAAAA;AAEnB,IAAMC,eAAeF,cAAcN,OAAO;EAACS;EAAyBC;EAAuBC;EAAuBC;CAA0B;AAE5I,IAAMC,eAAeC,8BAAgBd,OAAOQ,YAAAA;AAC5C,IAAMO,iBAAiBD,8BAAgBd,OAAOD,cAAAA;AAC9C,IAAMiB,iBAAiBC,gCAAYjB,OAAOQ,YAAAA;AAC1C,IAAMU,mBAAmBD,gCAAYjB,OAAOD,cAAAA;","names":["NodeConfigSchema","NodeAttachQuerySchema","NodeAttachedQuerySchema","NodeDetachQuerySchema","NodeRegisteredQuerySchema","instanceFactory","IsInstanceFactory","isNodeInstance","create","attach","attached","detach","registered","isModuleInstance","moduleFactory","IsModuleFactory","isNodeModule","NodeAttachedQuerySchema","NodeAttachQuerySchema","NodeDetachQuerySchema","NodeRegisteredQuerySchema","asNodeModule","AsObjectFactory","asNodeInstance","withNodeModule","WithFactory","withNodeInstance"]}
|
package/dist/node/index.js
CHANGED
|
@@ -1,39 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/index.ts
|
|
21
|
-
var src_exports = {};
|
|
22
|
-
__export(src_exports, {
|
|
23
|
-
NodeAttachQuerySchema: () => NodeAttachQuerySchema,
|
|
24
|
-
NodeAttachedQuerySchema: () => NodeAttachedQuerySchema,
|
|
25
|
-
NodeConfigSchema: () => NodeConfigSchema,
|
|
26
|
-
NodeDetachQuerySchema: () => NodeDetachQuerySchema,
|
|
27
|
-
NodeRegisteredQuerySchema: () => NodeRegisteredQuerySchema,
|
|
28
|
-
asNodeInstance: () => asNodeInstance,
|
|
29
|
-
asNodeModule: () => asNodeModule,
|
|
30
|
-
isNodeInstance: () => isNodeInstance,
|
|
31
|
-
isNodeModule: () => isNodeModule,
|
|
32
|
-
withNodeInstance: () => withNodeInstance,
|
|
33
|
-
withNodeModule: () => withNodeModule
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(src_exports);
|
|
36
|
-
|
|
37
1
|
// src/Config.ts
|
|
38
2
|
var NodeConfigSchema = "network.xyo.node.config";
|
|
39
3
|
|
|
@@ -50,30 +14,29 @@ var NodeDetachQuerySchema = "network.xyo.query.node.detach";
|
|
|
50
14
|
var NodeRegisteredQuerySchema = "network.xyo.query.node.registered";
|
|
51
15
|
|
|
52
16
|
// src/typeChecks.ts
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var instanceFactory = new
|
|
17
|
+
import { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from "@xyo-network/module-model";
|
|
18
|
+
import { AsObjectFactory } from "@xyo-network/object";
|
|
19
|
+
var instanceFactory = new IsInstanceFactory();
|
|
56
20
|
var isNodeInstance = instanceFactory.create({
|
|
57
21
|
attach: "function",
|
|
58
22
|
attached: "function",
|
|
59
23
|
detach: "function",
|
|
60
24
|
registered: "function"
|
|
61
25
|
}, [
|
|
62
|
-
|
|
26
|
+
isModuleInstance
|
|
63
27
|
]);
|
|
64
|
-
var moduleFactory = new
|
|
28
|
+
var moduleFactory = new IsModuleFactory();
|
|
65
29
|
var isNodeModule = moduleFactory.create([
|
|
66
30
|
NodeAttachedQuerySchema,
|
|
67
31
|
NodeAttachQuerySchema,
|
|
68
32
|
NodeDetachQuerySchema,
|
|
69
33
|
NodeRegisteredQuerySchema
|
|
70
34
|
]);
|
|
71
|
-
var asNodeModule =
|
|
72
|
-
var asNodeInstance =
|
|
73
|
-
var withNodeModule =
|
|
74
|
-
var withNodeInstance =
|
|
75
|
-
|
|
76
|
-
0 && (module.exports = {
|
|
35
|
+
var asNodeModule = AsObjectFactory.create(isNodeModule);
|
|
36
|
+
var asNodeInstance = AsObjectFactory.create(isNodeInstance);
|
|
37
|
+
var withNodeModule = WithFactory.create(isNodeModule);
|
|
38
|
+
var withNodeInstance = WithFactory.create(isNodeInstance);
|
|
39
|
+
export {
|
|
77
40
|
NodeAttachQuerySchema,
|
|
78
41
|
NodeAttachedQuerySchema,
|
|
79
42
|
NodeConfigSchema,
|
|
@@ -85,5 +48,5 @@ var withNodeInstance = import_module_model.WithFactory.create(isNodeInstance);
|
|
|
85
48
|
isNodeModule,
|
|
86
49
|
withNodeInstance,
|
|
87
50
|
withNodeModule
|
|
88
|
-
}
|
|
51
|
+
};
|
|
89
52
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/
|
|
1
|
+
{"version":3,"sources":["../../src/Config.ts","../../src/Queries/Attach.ts","../../src/Queries/Attached.ts","../../src/Queries/Detach.ts","../../src/Queries/Registered.ts","../../src/typeChecks.ts"],"sourcesContent":["import { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport type NodeConfigSchema = 'network.xyo.node.config'\nexport const NodeConfigSchema: NodeConfigSchema = 'network.xyo.node.config'\n\nexport type NodeConfig<TConfig extends Payload | void = void> = ModuleConfig<\n TConfig,\n {\n archivist?: string\n },\n TConfig extends Payload ? TConfig['schema'] : NodeConfigSchema\n>\n","import { 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 nameOrAddress: string\n schema: NodeAttachQuerySchema\n}>\n","import { 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 { 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 nameOrAddress: string\n schema: NodeDetachQuerySchema\n}>\n","import { 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 { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\nimport { AsObjectFactory } from '@xyo-network/object'\n\nimport { NodeInstance, NodeModule } from './Node'\nimport { NodeAttachedQuerySchema, NodeAttachQuerySchema, NodeDetachQuerySchema, NodeRegisteredQuerySchema } from './Queries'\n\nconst instanceFactory = new IsInstanceFactory<NodeInstance>()\n\nexport const isNodeInstance = instanceFactory.create(\n {\n attach: 'function',\n attached: 'function',\n detach: 'function',\n registered: 'function',\n },\n [isModuleInstance],\n)\n\nconst moduleFactory = new IsModuleFactory<NodeModule>()\n\nexport const isNodeModule = moduleFactory.create([NodeAttachedQuerySchema, NodeAttachQuerySchema, NodeDetachQuerySchema, NodeRegisteredQuerySchema])\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"],"mappings":";AAIO,IAAMA,mBAAqC;;;ACD3C,IAAMC,wBAA+C;;;ACArD,IAAMC,0BAAmD;;;ACAzD,IAAMC,wBAA+C;;;ACArD,IAAMC,4BAAuD;;;ACHpE,SAASC,mBAAmBC,iBAAiBC,kBAAkBC,mBAAmB;AAClF,SAASC,uBAAuB;AAKhC,IAAMC,kBAAkB,IAAIC,kBAAAA;AAErB,IAAMC,iBAAiBF,gBAAgBG,OAC5C;EACEC,QAAQ;EACRC,UAAU;EACVC,QAAQ;EACRC,YAAY;AACd,GACA;EAACC;CAAiB;AAGpB,IAAMC,gBAAgB,IAAIC,gBAAAA;AAEnB,IAAMC,eAAeF,cAAcN,OAAO;EAACS;EAAyBC;EAAuBC;EAAuBC;CAA0B;AAE5I,IAAMC,eAAeC,gBAAgBd,OAAOQ,YAAAA;AAC5C,IAAMO,iBAAiBD,gBAAgBd,OAAOD,cAAAA;AAC9C,IAAMiB,iBAAiBC,YAAYjB,OAAOQ,YAAAA;AAC1C,IAAMU,mBAAmBD,YAAYjB,OAAOD,cAAAA;","names":["NodeConfigSchema","NodeAttachQuerySchema","NodeAttachedQuerySchema","NodeDetachQuerySchema","NodeRegisteredQuerySchema","IsInstanceFactory","IsModuleFactory","isModuleInstance","WithFactory","AsObjectFactory","instanceFactory","IsInstanceFactory","isNodeInstance","create","attach","attached","detach","registered","isModuleInstance","moduleFactory","IsModuleFactory","isNodeModule","NodeAttachedQuerySchema","NodeAttachQuerySchema","NodeDetachQuerySchema","NodeRegisteredQuerySchema","asNodeModule","AsObjectFactory","asNodeInstance","withNodeModule","WithFactory","withNodeInstance"]}
|
package/package.json
CHANGED
|
@@ -11,19 +11,18 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@xylabs/promise": "^2.13.20",
|
|
14
|
-
"@xyo-network/manifest-model": "~2.84.
|
|
15
|
-
"@xyo-network/module-events": "~2.84.
|
|
16
|
-
"@xyo-network/module-model": "~2.84.
|
|
17
|
-
"@xyo-network/object": "~2.84.
|
|
18
|
-
"@xyo-network/payload-model": "~2.84.
|
|
14
|
+
"@xyo-network/manifest-model": "~2.84.4",
|
|
15
|
+
"@xyo-network/module-events": "~2.84.4",
|
|
16
|
+
"@xyo-network/module-model": "~2.84.4",
|
|
17
|
+
"@xyo-network/object": "~2.84.4",
|
|
18
|
+
"@xyo-network/payload-model": "~2.84.4"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@xylabs/ts-scripts-yarn3": "^3.2.
|
|
22
|
-
"@xylabs/tsconfig": "^3.2.
|
|
21
|
+
"@xylabs/ts-scripts-yarn3": "^3.2.19",
|
|
22
|
+
"@xylabs/tsconfig": "^3.2.19",
|
|
23
23
|
"typescript": "^5.3.3"
|
|
24
24
|
},
|
|
25
25
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
26
|
-
"docs": "dist/docs.json",
|
|
27
26
|
"types": "dist/node/index.d.ts",
|
|
28
27
|
"exports": {
|
|
29
28
|
".": {
|
|
@@ -39,19 +38,19 @@
|
|
|
39
38
|
},
|
|
40
39
|
"node": {
|
|
41
40
|
"require": {
|
|
42
|
-
"types": "./dist/node/index.d.
|
|
43
|
-
"default": "./dist/node/index.
|
|
41
|
+
"types": "./dist/node/index.d.cts",
|
|
42
|
+
"default": "./dist/node/index.cjs"
|
|
44
43
|
},
|
|
45
44
|
"import": {
|
|
46
45
|
"types": "./dist/node/index.d.mts",
|
|
47
|
-
"default": "./dist/node/index.
|
|
46
|
+
"default": "./dist/node/index.js"
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
},
|
|
51
50
|
"./package.json": "./package.json"
|
|
52
51
|
},
|
|
53
|
-
"main": "dist/node/index.
|
|
54
|
-
"module": "dist/node/index.
|
|
52
|
+
"main": "dist/node/index.cjs",
|
|
53
|
+
"module": "dist/node/index.js",
|
|
55
54
|
"homepage": "https://xyo.network",
|
|
56
55
|
"license": "LGPL-3.0-only",
|
|
57
56
|
"publishConfig": {
|
|
@@ -62,5 +61,6 @@
|
|
|
62
61
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
63
62
|
},
|
|
64
63
|
"sideEffects": false,
|
|
65
|
-
"version": "2.84.
|
|
64
|
+
"version": "2.84.4",
|
|
65
|
+
"type": "module"
|
|
66
66
|
}
|
package/dist/node/index.mjs
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
// src/Config.ts
|
|
2
|
-
var NodeConfigSchema = "network.xyo.node.config";
|
|
3
|
-
|
|
4
|
-
// src/Queries/Attach.ts
|
|
5
|
-
var NodeAttachQuerySchema = "network.xyo.query.node.attach";
|
|
6
|
-
|
|
7
|
-
// src/Queries/Attached.ts
|
|
8
|
-
var NodeAttachedQuerySchema = "network.xyo.query.node.attached";
|
|
9
|
-
|
|
10
|
-
// src/Queries/Detach.ts
|
|
11
|
-
var NodeDetachQuerySchema = "network.xyo.query.node.detach";
|
|
12
|
-
|
|
13
|
-
// src/Queries/Registered.ts
|
|
14
|
-
var NodeRegisteredQuerySchema = "network.xyo.query.node.registered";
|
|
15
|
-
|
|
16
|
-
// src/typeChecks.ts
|
|
17
|
-
import { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from "@xyo-network/module-model";
|
|
18
|
-
import { AsObjectFactory } from "@xyo-network/object";
|
|
19
|
-
var instanceFactory = new IsInstanceFactory();
|
|
20
|
-
var isNodeInstance = instanceFactory.create({
|
|
21
|
-
attach: "function",
|
|
22
|
-
attached: "function",
|
|
23
|
-
detach: "function",
|
|
24
|
-
registered: "function"
|
|
25
|
-
}, [
|
|
26
|
-
isModuleInstance
|
|
27
|
-
]);
|
|
28
|
-
var moduleFactory = new IsModuleFactory();
|
|
29
|
-
var isNodeModule = moduleFactory.create([
|
|
30
|
-
NodeAttachedQuerySchema,
|
|
31
|
-
NodeAttachQuerySchema,
|
|
32
|
-
NodeDetachQuerySchema,
|
|
33
|
-
NodeRegisteredQuerySchema
|
|
34
|
-
]);
|
|
35
|
-
var asNodeModule = AsObjectFactory.create(isNodeModule);
|
|
36
|
-
var asNodeInstance = AsObjectFactory.create(isNodeInstance);
|
|
37
|
-
var withNodeModule = WithFactory.create(isNodeModule);
|
|
38
|
-
var withNodeInstance = WithFactory.create(isNodeInstance);
|
|
39
|
-
export {
|
|
40
|
-
NodeAttachQuerySchema,
|
|
41
|
-
NodeAttachedQuerySchema,
|
|
42
|
-
NodeConfigSchema,
|
|
43
|
-
NodeDetachQuerySchema,
|
|
44
|
-
NodeRegisteredQuerySchema,
|
|
45
|
-
asNodeInstance,
|
|
46
|
-
asNodeModule,
|
|
47
|
-
isNodeInstance,
|
|
48
|
-
isNodeModule,
|
|
49
|
-
withNodeInstance,
|
|
50
|
-
withNodeModule
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/node/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Config.ts","../../src/Queries/Attach.ts","../../src/Queries/Attached.ts","../../src/Queries/Detach.ts","../../src/Queries/Registered.ts","../../src/typeChecks.ts"],"sourcesContent":["import { ModuleConfig } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport type NodeConfigSchema = 'network.xyo.node.config'\nexport const NodeConfigSchema: NodeConfigSchema = 'network.xyo.node.config'\n\nexport type NodeConfig<TConfig extends Payload | void = void> = ModuleConfig<\n TConfig,\n {\n archivist?: string\n },\n TConfig extends Payload ? TConfig['schema'] : NodeConfigSchema\n>\n","import { 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 nameOrAddress: string\n schema: NodeAttachQuerySchema\n}>\n","import { 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 { 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 nameOrAddress: string\n schema: NodeDetachQuerySchema\n}>\n","import { 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 { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\nimport { AsObjectFactory } from '@xyo-network/object'\n\nimport { NodeInstance, NodeModule } from './Node'\nimport { NodeAttachedQuerySchema, NodeAttachQuerySchema, NodeDetachQuerySchema, NodeRegisteredQuerySchema } from './Queries'\n\nconst instanceFactory = new IsInstanceFactory<NodeInstance>()\n\nexport const isNodeInstance = instanceFactory.create(\n {\n attach: 'function',\n attached: 'function',\n detach: 'function',\n registered: 'function',\n },\n [isModuleInstance],\n)\n\nconst moduleFactory = new IsModuleFactory<NodeModule>()\n\nexport const isNodeModule = moduleFactory.create([NodeAttachedQuerySchema, NodeAttachQuerySchema, NodeDetachQuerySchema, NodeRegisteredQuerySchema])\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"],"mappings":";AAIO,IAAMA,mBAAqC;;;ACD3C,IAAMC,wBAA+C;;;ACArD,IAAMC,0BAAmD;;;ACAzD,IAAMC,wBAA+C;;;ACArD,IAAMC,4BAAuD;;;ACHpE,SAASC,mBAAmBC,iBAAiBC,kBAAkBC,mBAAmB;AAClF,SAASC,uBAAuB;AAKhC,IAAMC,kBAAkB,IAAIC,kBAAAA;AAErB,IAAMC,iBAAiBF,gBAAgBG,OAC5C;EACEC,QAAQ;EACRC,UAAU;EACVC,QAAQ;EACRC,YAAY;AACd,GACA;EAACC;CAAiB;AAGpB,IAAMC,gBAAgB,IAAIC,gBAAAA;AAEnB,IAAMC,eAAeF,cAAcN,OAAO;EAACS;EAAyBC;EAAuBC;EAAuBC;CAA0B;AAE5I,IAAMC,eAAeC,gBAAgBd,OAAOQ,YAAAA;AAC5C,IAAMO,iBAAiBD,gBAAgBd,OAAOD,cAAAA;AAC9C,IAAMiB,iBAAiBC,YAAYjB,OAAOQ,YAAAA;AAC1C,IAAMU,mBAAmBD,YAAYjB,OAAOD,cAAAA;","names":["NodeConfigSchema","NodeAttachQuerySchema","NodeAttachedQuerySchema","NodeDetachQuerySchema","NodeRegisteredQuerySchema","IsInstanceFactory","IsModuleFactory","isModuleInstance","WithFactory","AsObjectFactory","instanceFactory","IsInstanceFactory","isNodeInstance","create","attach","attached","detach","registered","isModuleInstance","moduleFactory","IsModuleFactory","isNodeModule","NodeAttachedQuerySchema","NodeAttachQuerySchema","NodeDetachQuerySchema","NodeRegisteredQuerySchema","asNodeModule","AsObjectFactory","asNodeInstance","withNodeModule","WithFactory","withNodeInstance"]}
|