@xyo-network/manifest-model 4.3.0 → 5.0.0
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/neutral/Manifest.d.ts +4 -2
- package/dist/neutral/Manifest.d.ts.map +1 -1
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +11 -16
- package/src/Manifest.ts +2 -2
- package/dist/PackageManifest.schema.json +0 -221
- package/types.d.ts +0 -3
- package/xy.config.ts +0 -10
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { Address } from '@xylabs/hex';
|
|
2
|
-
export type ModuleAlias =
|
|
1
|
+
import type { Address, Brand } from '@xylabs/hex';
|
|
2
|
+
export type ModuleAlias = Brand<string, {
|
|
3
|
+
__moduleAlias: true;
|
|
4
|
+
}>;
|
|
3
5
|
export interface Manifest {
|
|
4
6
|
description?: string;
|
|
5
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Manifest.d.ts","sourceRoot":"","sources":["../../src/Manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"Manifest.d.ts","sourceRoot":"","sources":["../../src/Manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAGjD,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,EAAE;IAAE,aAAa,EAAE,IAAI,CAAA;CAAE,CAAC,CAAA;AAEhE,MAAM,WAAW,QAAQ;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,eAAO,MAAM,UAAU,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,QAEpD,CAAA;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,YAAa,SAAQ,cAAc;IAClD,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,CAAC,cAAc,GAAG,WAAW,CAAC,EAAE,CAAA;QAC1C,MAAM,CAAC,EAAE,CAAC,cAAc,GAAG,WAAW,CAAC,EAAE,CAAA;KAC1C,CAAA;CACF;AAED,MAAM,WAAW,cAAe,SAAQ,QAAQ;IAC9C,MAAM,EAAE,cAAc,CAAA;IACtB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE;QACP,OAAO,EAAE,OAAO,CAAA;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC,CAAA;KAC1C,CAAA;CACF;AAED,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,CAAA;IAC7C,KAAK,EAAE,YAAY,EAAE,CAAA;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Manifest.ts","../../src/Payload.ts"],"sourcesContent":["import type { Address } from '@xylabs/hex'\nimport { isObject } from '@xylabs/object'\n\nexport type ModuleAlias =
|
|
1
|
+
{"version":3,"sources":["../../src/Manifest.ts","../../src/Payload.ts"],"sourcesContent":["import type { Address, Brand } from '@xylabs/hex'\nimport { isObject } from '@xylabs/object'\n\nexport type ModuleAlias = Brand<string, { __moduleAlias: true }>\n\nexport interface Manifest {\n description?: string\n}\n\nexport const isManifest = (value: unknown): value is Manifest => {\n return isObject(value)\n}\n\nexport interface ConfigManifest {\n accountPath?: string\n features?: string[]\n labels?: Record<string, string | undefined>\n language?: string\n name: string\n os?: string\n schema: string\n}\n\nexport interface NodeManifest extends ModuleManifest {\n modules?: {\n private?: (ModuleManifest | ModuleAlias)[]\n public?: (ModuleManifest | ModuleAlias)[]\n }\n}\n\nexport interface ModuleManifest extends Manifest {\n config: ConfigManifest\n lazyStart?: boolean\n status?: {\n address: Address\n children?: Record<Address, string | null>\n }\n}\n\nexport interface PackageManifest extends Manifest {\n modules?: Record<ModuleAlias, ModuleManifest>\n nodes: NodeManifest[]\n}\n","export const DappPackageManifestPayloadSchema = 'network.xyo.manifest.package.dapp' as const\nexport type DappPackageManifestPayloadSchema = typeof DappPackageManifestPayloadSchema\n\nexport const PackageManifestPayloadSchema = 'network.xyo.manifest.package' as const\nexport type PackageManifestPayloadSchema = typeof PackageManifestPayloadSchema\n\nexport const ModuleManifestPayloadSchema = 'network.xyo.module.manifest' as const\nexport type ModuleManifestPayloadSchema = typeof ModuleManifestPayloadSchema\n\nexport const NodeManifestPayloadSchema = 'network.xyo.node.manifest' as const\nexport type NodeManifestPayloadSchema = typeof NodeManifestPayloadSchema\n\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type {\n ModuleManifest, NodeManifest, PackageManifest,\n} from './Manifest.ts'\n\nexport interface NodeManifestPayload extends NodeManifest {\n schema: NodeManifestPayloadSchema\n}\n\nexport type ModuleManifestPayload = Payload<ModuleManifest, ModuleManifestPayloadSchema | NodeManifestPayloadSchema>\n\nexport type PackageManifestPayload = Payload<PackageManifest, PackageManifestPayloadSchema>\n\nexport const isPackageManifestPayload = isPayloadOfSchemaType<PackageManifestPayload>(PackageManifestPayloadSchema)\n"],"mappings":";AACA,SAAS,gBAAgB;AAQlB,IAAM,aAAa,CAAC,UAAsC;AAC/D,SAAO,SAAS,KAAK;AACvB;;;ACEA,SAAS,6BAA6B;AAb/B,IAAM,mCAAmC;AAGzC,IAAM,+BAA+B;AAGrC,IAAM,8BAA8B;AAGpC,IAAM,4BAA4B;AAkBlC,IAAM,2BAA2B,sBAA8C,4BAA4B;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/manifest-model",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -24,29 +24,24 @@
|
|
|
24
24
|
"types": "./dist/neutral/index.d.ts",
|
|
25
25
|
"default": "./dist/neutral/index.mjs"
|
|
26
26
|
},
|
|
27
|
-
"./schema/package": {
|
|
28
|
-
"default": "./dist/PackageManifest.schema.json"
|
|
29
|
-
},
|
|
30
27
|
"./package.json": "./package.json"
|
|
31
28
|
},
|
|
32
29
|
"module": "dist/neutral/index.mjs",
|
|
33
30
|
"types": "dist/neutral/index.d.ts",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"src"
|
|
34
|
+
],
|
|
39
35
|
"dependencies": {
|
|
40
|
-
"@xylabs/hex": "^
|
|
41
|
-
"@xylabs/object": "^
|
|
42
|
-
"@xyo-network/payload-model": "^
|
|
36
|
+
"@xylabs/hex": "^5.0.0",
|
|
37
|
+
"@xylabs/object": "^5.0.0",
|
|
38
|
+
"@xyo-network/payload-model": "^5.0.0"
|
|
43
39
|
},
|
|
44
40
|
"devDependencies": {
|
|
45
41
|
"@types/node": "^24.1.0",
|
|
46
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.
|
|
47
|
-
"@xylabs/tsconfig": "^7.0.
|
|
48
|
-
"typescript": "^5.8.3"
|
|
49
|
-
"typescript-json-schema": "^0.65.1"
|
|
42
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.2",
|
|
43
|
+
"@xylabs/tsconfig": "^7.0.2",
|
|
44
|
+
"typescript": "^5.8.3"
|
|
50
45
|
},
|
|
51
46
|
"publishConfig": {
|
|
52
47
|
"access": "public"
|
package/src/Manifest.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Address } from '@xylabs/hex'
|
|
1
|
+
import type { Address, Brand } from '@xylabs/hex'
|
|
2
2
|
import { isObject } from '@xylabs/object'
|
|
3
3
|
|
|
4
|
-
export type ModuleAlias =
|
|
4
|
+
export type ModuleAlias = Brand<string, { __moduleAlias: true }>
|
|
5
5
|
|
|
6
6
|
export interface Manifest {
|
|
7
7
|
description?: string
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"definitions": {
|
|
4
|
-
"Address": {
|
|
5
|
-
"allOf": [
|
|
6
|
-
{
|
|
7
|
-
"items": {
|
|
8
|
-
"type": "string"
|
|
9
|
-
},
|
|
10
|
-
"type": "array"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"properties": {
|
|
14
|
-
"__hex": {
|
|
15
|
-
"$ref": "#/definitions/typeof__hex"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"required": [
|
|
19
|
-
"__hex"
|
|
20
|
-
],
|
|
21
|
-
"type": "object"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"properties": {
|
|
25
|
-
"__address": {
|
|
26
|
-
"$ref": "#/definitions/typeof__address"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"required": [
|
|
30
|
-
"__address"
|
|
31
|
-
],
|
|
32
|
-
"type": "object"
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
"ConfigManifest": {
|
|
37
|
-
"properties": {
|
|
38
|
-
"accountPath": {
|
|
39
|
-
"type": "string"
|
|
40
|
-
},
|
|
41
|
-
"features": {
|
|
42
|
-
"items": {
|
|
43
|
-
"type": "string"
|
|
44
|
-
},
|
|
45
|
-
"type": "array"
|
|
46
|
-
},
|
|
47
|
-
"labels": {
|
|
48
|
-
"$ref": "#/definitions/Record<string,string>"
|
|
49
|
-
},
|
|
50
|
-
"language": {
|
|
51
|
-
"type": "string"
|
|
52
|
-
},
|
|
53
|
-
"name": {
|
|
54
|
-
"type": "string"
|
|
55
|
-
},
|
|
56
|
-
"os": {
|
|
57
|
-
"type": "string"
|
|
58
|
-
},
|
|
59
|
-
"schema": {
|
|
60
|
-
"type": "string"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"required": [
|
|
64
|
-
"name",
|
|
65
|
-
"schema"
|
|
66
|
-
],
|
|
67
|
-
"type": "object"
|
|
68
|
-
},
|
|
69
|
-
"ModuleManifest": {
|
|
70
|
-
"properties": {
|
|
71
|
-
"config": {
|
|
72
|
-
"$ref": "#/definitions/ConfigManifest"
|
|
73
|
-
},
|
|
74
|
-
"description": {
|
|
75
|
-
"type": "string"
|
|
76
|
-
},
|
|
77
|
-
"lazyStart": {
|
|
78
|
-
"type": "boolean"
|
|
79
|
-
},
|
|
80
|
-
"status": {
|
|
81
|
-
"properties": {
|
|
82
|
-
"address": {
|
|
83
|
-
"$ref": "#/definitions/Address"
|
|
84
|
-
},
|
|
85
|
-
"children": {
|
|
86
|
-
"$ref": "#/definitions/Record<Address,string>"
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"required": [
|
|
90
|
-
"address"
|
|
91
|
-
],
|
|
92
|
-
"type": "object"
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
"required": [
|
|
96
|
-
"config"
|
|
97
|
-
],
|
|
98
|
-
"type": "object"
|
|
99
|
-
},
|
|
100
|
-
"NodeManifest": {
|
|
101
|
-
"properties": {
|
|
102
|
-
"config": {
|
|
103
|
-
"$ref": "#/definitions/ConfigManifest"
|
|
104
|
-
},
|
|
105
|
-
"description": {
|
|
106
|
-
"type": "string"
|
|
107
|
-
},
|
|
108
|
-
"lazyStart": {
|
|
109
|
-
"type": "boolean"
|
|
110
|
-
},
|
|
111
|
-
"modules": {
|
|
112
|
-
"properties": {
|
|
113
|
-
"private": {
|
|
114
|
-
"items": {
|
|
115
|
-
"anyOf": [
|
|
116
|
-
{
|
|
117
|
-
"$ref": "#/definitions/ModuleManifest"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"type": "string"
|
|
121
|
-
}
|
|
122
|
-
]
|
|
123
|
-
},
|
|
124
|
-
"type": "array"
|
|
125
|
-
},
|
|
126
|
-
"public": {
|
|
127
|
-
"items": {
|
|
128
|
-
"anyOf": [
|
|
129
|
-
{
|
|
130
|
-
"$ref": "#/definitions/ModuleManifest"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"type": "string"
|
|
134
|
-
}
|
|
135
|
-
]
|
|
136
|
-
},
|
|
137
|
-
"type": "array"
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"type": "object"
|
|
141
|
-
},
|
|
142
|
-
"status": {
|
|
143
|
-
"properties": {
|
|
144
|
-
"address": {
|
|
145
|
-
"$ref": "#/definitions/Address"
|
|
146
|
-
},
|
|
147
|
-
"children": {
|
|
148
|
-
"$ref": "#/definitions/Record<Address,string>"
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
"required": [
|
|
152
|
-
"address"
|
|
153
|
-
],
|
|
154
|
-
"type": "object"
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
"required": [
|
|
158
|
-
"config"
|
|
159
|
-
],
|
|
160
|
-
"type": "object"
|
|
161
|
-
},
|
|
162
|
-
"Record<Address,string>": {
|
|
163
|
-
"type": "object"
|
|
164
|
-
},
|
|
165
|
-
"Record<string,ModuleManifest>": {
|
|
166
|
-
"type": "object"
|
|
167
|
-
},
|
|
168
|
-
"Record<string,string>": {
|
|
169
|
-
"type": "object"
|
|
170
|
-
},
|
|
171
|
-
"typeof__address": {
|
|
172
|
-
"properties": {
|
|
173
|
-
"__@toStringTag@21": {
|
|
174
|
-
"type": "string"
|
|
175
|
-
},
|
|
176
|
-
"description": {
|
|
177
|
-
"type": "string"
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
"required": [
|
|
181
|
-
"__@toStringTag@21",
|
|
182
|
-
"description"
|
|
183
|
-
],
|
|
184
|
-
"type": "object"
|
|
185
|
-
},
|
|
186
|
-
"typeof__hex": {
|
|
187
|
-
"properties": {
|
|
188
|
-
"__@toStringTag@21": {
|
|
189
|
-
"type": "string"
|
|
190
|
-
},
|
|
191
|
-
"description": {
|
|
192
|
-
"type": "string"
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
"required": [
|
|
196
|
-
"__@toStringTag@21",
|
|
197
|
-
"description"
|
|
198
|
-
],
|
|
199
|
-
"type": "object"
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
"properties": {
|
|
203
|
-
"description": {
|
|
204
|
-
"type": "string"
|
|
205
|
-
},
|
|
206
|
-
"modules": {
|
|
207
|
-
"$ref": "#/definitions/Record<string,ModuleManifest>"
|
|
208
|
-
},
|
|
209
|
-
"nodes": {
|
|
210
|
-
"items": {
|
|
211
|
-
"$ref": "#/definitions/NodeManifest"
|
|
212
|
-
},
|
|
213
|
-
"type": "array"
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
"required": [
|
|
217
|
-
"nodes"
|
|
218
|
-
],
|
|
219
|
-
"type": "object"
|
|
220
|
-
}
|
|
221
|
-
|
package/types.d.ts
DELETED