@xyo-network/id-payload-plugin 7.0.2 → 7.0.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.
|
@@ -36,7 +36,7 @@ export declare const asId: {
|
|
|
36
36
|
};
|
|
37
37
|
salt: string;
|
|
38
38
|
}) | undefined;
|
|
39
|
-
<T>(value: T, assert: import("@xylabs/sdk
|
|
39
|
+
<T>(value: T, assert: import("@xylabs/sdk").ZodFactoryConfig): T & {
|
|
40
40
|
schema: "network.xyo.id" & {
|
|
41
41
|
readonly __schema: true;
|
|
42
42
|
};
|
|
@@ -50,7 +50,7 @@ export declare const toId: {
|
|
|
50
50
|
};
|
|
51
51
|
salt: string;
|
|
52
52
|
}) | undefined;
|
|
53
|
-
<T>(value: T, assert: import("@xylabs/sdk
|
|
53
|
+
<T>(value: T, assert: import("@xylabs/sdk").ZodFactoryConfig): T & {
|
|
54
54
|
schema: "network.xyo.id" & {
|
|
55
55
|
readonly __schema: true;
|
|
56
56
|
};
|
|
@@ -67,7 +67,7 @@ export declare const asOptionalId: {
|
|
|
67
67
|
};
|
|
68
68
|
salt: string;
|
|
69
69
|
}) | undefined;
|
|
70
|
-
<T>(value: T, assert: import("@xylabs/sdk
|
|
70
|
+
<T>(value: T, assert: import("@xylabs/sdk").ZodFactoryConfig): T & {
|
|
71
71
|
schema: "network.xyo.id" & {
|
|
72
72
|
readonly __schema: true;
|
|
73
73
|
};
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Payload.ts", "../../src/Schema.ts", "../../src/Plugin.ts", "../../src/Template.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk
|
|
4
|
+
"sourcesContent": ["import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk'\nimport type { WithSources } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaTypeWithSources, PayloadZodOfSchema } from '@xyo-network/payload-model'\nimport * as z from 'zod/mini'\n\nimport { IdSchema } from './Schema.ts'\n\n/**\n * The fields of an ID Payload\n */\nexport interface IdFields {\n salt: string\n}\n\nexport const IdPayloadZod = z.extend(PayloadZodOfSchema(IdSchema), { salt: z.string() })\n\n/**\n * The ID Payload\n */\nexport type Id = z.infer<typeof IdPayloadZod>\n\n/**\n * @deprecated Use `Id` instead\n */\nexport type IdPayload = Id\n\n/**\n * Identity helpers for ID Payload\n */\nexport const isId = zodIsFactory(IdPayloadZod)\nexport const asId = zodAsFactory(IdPayloadZod, 'asId')\nexport const toId = zodToFactory(IdPayloadZod, 'toId')\n\n/**\n * @deprecated Use `asId` instead (returns undefined on failure when called without an assert config)\n */\nexport const asOptionalId = asId\n\n/**\n * Identity helper for ID Payload with sources\n */\nexport const isIdWithSources = isPayloadOfSchemaTypeWithSources<WithSources<Id>>(IdSchema)\n", "import { asSchema } from '@xyo-network/payload-model'\n\nexport const IdSchema = asSchema('network.xyo.id', true)\nexport type IdSchema = typeof IdSchema\n", "import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport type { Id } from './Payload.ts'\nimport { IdSchema } from './Schema.ts'\nimport { idPayloadTemplate } from './Template.ts'\n\nexport const IdPayloadPlugin = () =>\n createPayloadPlugin<Id>({\n schema: IdSchema,\n template: idPayloadTemplate,\n })\n", "import type { Id } from './Payload.ts'\nimport { IdSchema } from './Schema.ts'\n\nexport const idPayloadTemplate = (): Id => ({\n salt: '',\n schema: IdSchema,\n})\n"],
|
|
5
5
|
"mappings": ";AAAA;AAAA,EACE;AAAA,EAAc;AAAA,EAAc;AAAA,OACvB;AAEP,SAAS,kCAAkC,0BAA0B;AACrE,YAAY,OAAO;;;ACLnB,SAAS,gBAAgB;AAElB,IAAM,WAAW,SAAS,kBAAkB,IAAI;;;ADchD,IAAM,eAAiB,SAAO,mBAAmB,QAAQ,GAAG,EAAE,MAAQ,SAAO,EAAE,CAAC;AAehF,IAAM,OAAO,aAAa,YAAY;AACtC,IAAM,OAAO,aAAa,cAAc,MAAM;AAC9C,IAAM,OAAO,aAAa,cAAc,MAAM;AAK9C,IAAM,eAAe;AAKrB,IAAM,kBAAkB,iCAAkD,QAAQ;;;AE3CzF,SAAS,2BAA2B;;;ACG7B,IAAM,oBAAoB,OAAW;AAAA,EAC1C,MAAM;AAAA,EACN,QAAQ;AACV;;;ADAO,IAAM,kBAAkB,MAC7B,oBAAwB;AAAA,EACtB,QAAQ;AAAA,EACR,UAAU;AACZ,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/id-payload-plugin",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.4",
|
|
4
4
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -34,21 +34,23 @@
|
|
|
34
34
|
"README.md"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@xyo-network/payload-
|
|
38
|
-
"@xyo-network/payload-
|
|
37
|
+
"@xyo-network/payload-plugin": "~7.0.4",
|
|
38
|
+
"@xyo-network/payload-model": "~7.0.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@opentelemetry/api": "^1.9.1",
|
|
42
42
|
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
|
43
43
|
"@scure/base": "~2.2.0",
|
|
44
|
-
"@xylabs/sdk
|
|
45
|
-
"@xylabs/threads": "
|
|
46
|
-
"@xylabs/toolchain": "~8.3
|
|
47
|
-
"@xylabs/tsconfig": "~8.3
|
|
48
|
-
"@xylabs/vitest-extended": "^
|
|
44
|
+
"@xylabs/sdk": "^7.0.1",
|
|
45
|
+
"@xylabs/threads": "~7.0.1",
|
|
46
|
+
"@xylabs/toolchain": "~8.5.3",
|
|
47
|
+
"@xylabs/tsconfig": "~8.5.3",
|
|
48
|
+
"@xylabs/vitest-extended": "^7.0.1",
|
|
49
49
|
"async-mutex": "^0.5.0",
|
|
50
|
+
"browserslist": "4.28.4",
|
|
50
51
|
"debug": "^4.4.3",
|
|
51
|
-
"eslint": "^10.
|
|
52
|
+
"eslint": "^10.6.0",
|
|
53
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
52
54
|
"hash-wasm": "~4.12.0",
|
|
53
55
|
"observable-fns": "^0.6.1",
|
|
54
56
|
"typescript": "~6.0.3",
|
|
@@ -60,8 +62,8 @@
|
|
|
60
62
|
"@opentelemetry/api": "^1.9",
|
|
61
63
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
62
64
|
"@scure/base": "~2.2",
|
|
63
|
-
"@xylabs/sdk
|
|
64
|
-
"@xylabs/threads": "^
|
|
65
|
+
"@xylabs/sdk": "^7.0",
|
|
66
|
+
"@xylabs/threads": "^7.0",
|
|
65
67
|
"async-mutex": "^0.5",
|
|
66
68
|
"debug": "^4.4",
|
|
67
69
|
"hash-wasm": "~4.12",
|