@xyo-network/id-payload-plugin 3.5.2 → 3.6.0-rc.10

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,4 @@
1
- import type { Payload, WithMeta, WithSources } from '@xyo-network/payload-model';
1
+ import type { Payload, WithSources } from '@xyo-network/payload-model';
2
2
  import { IdSchema } from './Schema.ts';
3
3
  /**
4
4
  * The fields of an ID Payload
@@ -17,19 +17,15 @@ export type IdPayload = Id;
17
17
  /**
18
18
  * Identity helper for ID Payload
19
19
  */
20
- export declare const isId: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & IdFields & {
20
+ export declare const isId: (x?: unknown | null) => x is import("@xylabs/object").DeepRestrictToStringKeys<{
21
21
  schema: "network.xyo.id";
22
- };
23
- /**
24
- * Identity helper for ID Payload with meta
25
- */
26
- export declare const isIdWithMeta: (x?: unknown | null) => x is WithMeta<WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & IdFields & {
27
- schema: "network.xyo.id";
28
- }>>;
22
+ salt: string;
23
+ }>;
29
24
  /**
30
25
  * Identity helper for ID Payload with sources
31
26
  */
32
- export declare const isIdWithSources: (x?: unknown | null) => x is WithSources<WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & IdFields & {
27
+ export declare const isIdWithSources: (x?: unknown | null) => x is WithSources<WithSources<import("@xylabs/object").DeepRestrictToStringKeys<{
33
28
  schema: "network.xyo.id";
34
- }>>;
29
+ salt: string;
30
+ }>>>;
35
31
  //# sourceMappingURL=Payload.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACZ,MAAM,4BAA4B,CAAA;AAOnC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;AAE5C;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,EAAE,CAAA;AAE1B;;GAEG;AACH,eAAO,MAAM,IAAI;;CAAsC,CAAA;AAEvD;;GAEG;AACH,eAAO,MAAM,YAAY;;GAAwD,CAAA;AAEjF;;GAEG;AACH,eAAO,MAAM,eAAe;;GAA8D,CAAA"}
1
+ {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,WAAW,EACZ,MAAM,4BAA4B,CAAA;AAMnC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;AAE5C;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,EAAE,CAAA;AAE1B;;GAEG;AACH,eAAO,MAAM,IAAI;;UAhBT,MAAM;EAgByC,CAAA;AAEvD;;GAEG;AACH,eAAO,MAAM,eAAe;;UArBpB,MAAM;IAqB4E,CAAA"}
@@ -1,4 +1,5 @@
1
- export declare const IdPayloadPlugin: () => import("@xyo-network/payload-plugin").PayloadPlugin<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("./Payload.ts").IdFields & {
1
+ export declare const IdPayloadPlugin: () => import("@xyo-network/payload-plugin").PayloadPlugin<import("@xylabs/object").DeepRestrictToStringKeys<{
2
2
  schema: "network.xyo.id";
3
- }>;
3
+ salt: string;
4
+ }>>;
4
5
  //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;EAIxB,CAAA"}
1
+ {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;;GAIxB,CAAA"}
@@ -1,7 +1,6 @@
1
1
  // src/Payload.ts
2
2
  import {
3
3
  isPayloadOfSchemaType,
4
- isPayloadOfSchemaTypeWithMeta,
5
4
  isPayloadOfSchemaTypeWithSources
6
5
  } from "@xyo-network/payload-model";
7
6
 
@@ -10,7 +9,6 @@ var IdSchema = "network.xyo.id";
10
9
 
11
10
  // src/Payload.ts
12
11
  var isId = isPayloadOfSchemaType(IdSchema);
13
- var isIdWithMeta = isPayloadOfSchemaTypeWithMeta(IdSchema);
14
12
  var isIdWithSources = isPayloadOfSchemaTypeWithSources(IdSchema);
15
13
 
16
14
  // src/Plugin.ts
@@ -33,7 +31,6 @@ export {
33
31
  IdPayloadPlugin as default,
34
32
  idPayloadTemplate,
35
33
  isId,
36
- isIdWithMeta,
37
34
  isIdWithSources
38
35
  };
39
36
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["import type {\n Payload,\n WithMeta,\n WithSources,\n} from '@xyo-network/payload-model'\nimport {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithMeta,\n isPayloadOfSchemaTypeWithSources,\n} from '@xyo-network/payload-model'\n\nimport { IdSchema } from './Schema.ts'\n\n/**\n * The fields of an ID Payload\n */\nexport type IdFields = {\n salt: string\n}\n\n/**\n * The ID Payload\n */\nexport type Id = Payload<IdFields, IdSchema>\n\n/**\n * @deprecated Use `Id` instead\n */\nexport type IdPayload = Id\n\n/**\n * Identity helper for ID Payload\n */\nexport const isId = isPayloadOfSchemaType<Id>(IdSchema)\n\n/**\n * Identity helper for ID Payload with meta\n */\nexport const isIdWithMeta = isPayloadOfSchemaTypeWithMeta<WithMeta<Id>>(IdSchema)\n\n/**\n * Identity helper for ID Payload with sources\n */\nexport const isIdWithSources = isPayloadOfSchemaTypeWithSources<WithSources<Id>>(IdSchema)\n","export type IdSchema = 'network.xyo.id'\nexport const IdSchema: IdSchema = 'network.xyo.id'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport type { IdPayload } from './Payload.ts'\nimport { IdSchema } from './Schema.ts'\nimport { idPayloadTemplate } from './Template.ts'\n\nexport const IdPayloadPlugin = () =>\n createPayloadPlugin<IdPayload>({\n schema: IdSchema,\n template: idPayloadTemplate,\n })\n","import type { IdPayload } from './Payload.ts'\nimport { IdSchema } from './Schema.ts'\n\nexport const idPayloadTemplate = (): IdPayload => ({\n salt: '',\n schema: IdSchema,\n})\n"],"mappings":";AAKA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACRA,IAAM,WAAqB;;;ADgC3B,IAAM,OAAO,sBAA0B,QAAQ;AAK/C,IAAM,eAAe,8BAA4C,QAAQ;AAKzE,IAAM,kBAAkB,iCAAkD,QAAQ;;;AE3CzF,SAAS,2BAA2B;;;ACG7B,IAAM,oBAAoB,OAAkB;AAAA,EACjD,MAAM;AAAA,EACN,QAAQ;AACV;;;ADAO,IAAM,kBAAkB,MAC7B,oBAA+B;AAAA,EAC7B,QAAQ;AAAA,EACR,UAAU;AACZ,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["import type {\n Payload,\n WithSources,\n} from '@xyo-network/payload-model'\nimport {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithSources,\n} from '@xyo-network/payload-model'\n\nimport { IdSchema } from './Schema.ts'\n\n/**\n * The fields of an ID Payload\n */\nexport type IdFields = {\n salt: string\n}\n\n/**\n * The ID Payload\n */\nexport type Id = Payload<IdFields, IdSchema>\n\n/**\n * @deprecated Use `Id` instead\n */\nexport type IdPayload = Id\n\n/**\n * Identity helper for ID Payload\n */\nexport const isId = isPayloadOfSchemaType<Id>(IdSchema)\n\n/**\n * Identity helper for ID Payload with sources\n */\nexport const isIdWithSources = isPayloadOfSchemaTypeWithSources<WithSources<Id>>(IdSchema)\n","export type IdSchema = 'network.xyo.id'\nexport const IdSchema: IdSchema = 'network.xyo.id'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport type { IdPayload } from './Payload.ts'\nimport { IdSchema } from './Schema.ts'\nimport { idPayloadTemplate } from './Template.ts'\n\nexport const IdPayloadPlugin = () =>\n createPayloadPlugin<IdPayload>({\n schema: IdSchema,\n template: idPayloadTemplate,\n })\n","import type { IdPayload } from './Payload.ts'\nimport { IdSchema } from './Schema.ts'\n\nexport const idPayloadTemplate = (): IdPayload => ({\n salt: '',\n schema: IdSchema,\n})\n"],"mappings":";AAIA;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACNA,IAAM,WAAqB;;;AD8B3B,IAAM,OAAO,sBAA0B,QAAQ;AAK/C,IAAM,kBAAkB,iCAAkD,QAAQ;;;AEpCzF,SAAS,2BAA2B;;;ACG7B,IAAM,oBAAoB,OAAkB;AAAA,EACjD,MAAM;AAAA,EACN,QAAQ;AACV;;;ADAO,IAAM,kBAAkB,MAC7B,oBAA+B;AAAA,EAC7B,QAAQ;AAAA,EACR,UAAU;AACZ,CAAC;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/id-payload-plugin",
3
- "version": "3.5.2",
3
+ "version": "3.6.0-rc.10",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -29,17 +29,18 @@
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xyo-network/payload-model": "^3.5.2",
33
- "@xyo-network/payload-plugin": "^3.5.2"
32
+ "@xyo-network/payload-model": "^3.6.0-rc.10",
33
+ "@xyo-network/payload-plugin": "^3.6.0-rc.10"
34
34
  },
35
35
  "devDependencies": {
36
- "@xylabs/ts-scripts-yarn3": "^4.2.4",
37
- "@xylabs/tsconfig": "^4.2.4",
38
- "@xylabs/vitest-extended": "^4.4.9",
36
+ "@xylabs/ts-scripts-yarn3": "^4.2.6",
37
+ "@xylabs/tsconfig": "^4.2.6",
38
+ "@xylabs/vitest-extended": "^4.4.21",
39
39
  "typescript": "^5.7.2",
40
- "vitest": "^2.1.5"
40
+ "vitest": "^2.1.8"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public"
44
- }
44
+ },
45
+ "stableVersion": "3.5.2"
45
46
  }
package/src/Payload.ts CHANGED
@@ -1,11 +1,9 @@
1
1
  import type {
2
2
  Payload,
3
- WithMeta,
4
3
  WithSources,
5
4
  } from '@xyo-network/payload-model'
6
5
  import {
7
6
  isPayloadOfSchemaType,
8
- isPayloadOfSchemaTypeWithMeta,
9
7
  isPayloadOfSchemaTypeWithSources,
10
8
  } from '@xyo-network/payload-model'
11
9
 
@@ -33,11 +31,6 @@ export type IdPayload = Id
33
31
  */
34
32
  export const isId = isPayloadOfSchemaType<Id>(IdSchema)
35
33
 
36
- /**
37
- * Identity helper for ID Payload with meta
38
- */
39
- export const isIdWithMeta = isPayloadOfSchemaTypeWithMeta<WithMeta<Id>>(IdSchema)
40
-
41
34
  /**
42
35
  * Identity helper for ID Payload with sources
43
36
  */