@xyo-network/schema-payload-plugin 3.9.17 → 3.9.19

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.
@@ -0,0 +1,29 @@
1
+ import type { Payload } from '@xyo-network/payload-model';
2
+ import { SchemaSchema } from './Schema.ts';
3
+ export type SchemaPayload = Payload<{
4
+ /**
5
+ * The schema definition
6
+ */
7
+ definition: {
8
+ [key: string]: unknown;
9
+ };
10
+ /**
11
+ * The schema this schema extends (if any)
12
+ */
13
+ extends?: string;
14
+ /** @deprecated use definition.$id instead */
15
+ name?: string;
16
+ }, SchemaSchema> & {
17
+ definition: {
18
+ $id?: string;
19
+ };
20
+ };
21
+ /**
22
+ * Identity function for determining if an object is an Schema
23
+ */
24
+ export declare const isSchemaPayload: (x?: unknown | null) => x is SchemaPayload;
25
+ /**
26
+ * Identity function for determining if an object is an Schema with sources
27
+ */
28
+ export declare const isSchemaPayloadWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<SchemaPayload>;
29
+ //# sourceMappingURL=Payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGzD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC;IAClC;;OAEG;IACH,UAAU,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KACvB,CAAA;IACD;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,EAAE,YAAY,CAAC,GAAG;IACjB,UAAU,EAAE;QACV,GAAG,CAAC,EAAE,MAAM,CAAA;KACb,CAAA;CACF,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,4CAAqD,CAAA;AAEjF;;GAEG;AACH,eAAO,MAAM,0BAA0B,8FAAgE,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { SchemaPayload } from './Payload.ts';
2
+ export declare const SchemaPayloadPlugin: () => import("@xyo-network/payload-plugin").PayloadPlugin<SchemaPayload>;
3
+ //# sourceMappingURL=Plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAIjD,eAAO,MAAM,mBAAmB,0EAI5B,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const SchemaSchema: "network.xyo.schema";
2
+ export type SchemaSchema = typeof SchemaSchema;
3
+ //# sourceMappingURL=Schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAG,oBAA6B,CAAA;AACzD,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { SchemaPayload } from './Payload.ts';
2
+ export declare const schemaPayloadTemplate: () => SchemaPayload;
3
+ //# sourceMappingURL=Template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Template.d.ts","sourceRoot":"","sources":["../../src/Template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAEjD,eAAO,MAAM,qBAAqB,QAAO,aAMvC,CAAA"}
@@ -1,26 +1,5 @@
1
- import * as _xyo_network_payload_model from '@xyo-network/payload-model';
2
- import { Payload } from '@xyo-network/payload-model';
3
- import * as _xyo_network_payload_plugin from '@xyo-network/payload-plugin';
4
-
5
- declare const SchemaSchema: "network.xyo.schema";
6
- type SchemaSchema = typeof SchemaSchema;
7
-
8
- type SchemaPayload = Payload<{
9
- definition: {
10
- [key: string]: unknown;
11
- };
12
- extends?: string;
13
- name?: string;
14
- }, SchemaSchema> & {
15
- definition: {
16
- $id?: string;
17
- };
18
- };
19
- declare const isSchemaPayload: (x?: unknown | null) => x is SchemaPayload;
20
- declare const isSchemaPayloadWithSources: (x?: unknown | null) => x is _xyo_network_payload_model.WithSources<SchemaPayload>;
21
-
22
- declare const SchemaPayloadPlugin: () => _xyo_network_payload_plugin.PayloadPlugin<SchemaPayload>;
23
-
24
- declare const schemaPayloadTemplate: () => SchemaPayload;
25
-
26
- export { type SchemaPayload, SchemaPayloadPlugin, SchemaSchema, SchemaPayloadPlugin as default, isSchemaPayload, isSchemaPayloadWithSources, schemaPayloadTemplate };
1
+ export * from './Payload.ts';
2
+ export { SchemaPayloadPlugin as default, SchemaPayloadPlugin } from './Plugin.ts';
3
+ export * from './Schema.ts';
4
+ export * from './Template.ts';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,mBAAmB,IAAI,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACjF,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA"}
@@ -1,8 +1,5 @@
1
1
  // src/Payload.ts
2
- import {
3
- isPayloadOfSchemaType,
4
- isPayloadOfSchemaTypeWithSources
5
- } from "@xyo-network/payload-model";
2
+ import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from "@xyo-network/payload-model";
6
3
 
7
4
  // src/Schema.ts
8
5
  var SchemaSchema = "network.xyo.schema";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["import {\n isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources, type Payload,\n} from '@xyo-network/payload-model'\n\nimport { SchemaSchema } from './Schema.ts'\n\nexport type SchemaPayload = Payload<{\n /**\n * The schema definition\n */\n definition: {\n [key: string]: unknown\n }\n /**\n * The schema this schema extends (if any)\n */\n extends?: string\n\n /** @deprecated use definition.$id instead */\n name?: string\n}, SchemaSchema> & {\n definition: {\n $id?: string\n }\n}\n\n/**\n * Identity function for determining if an object is an Schema\n */\nexport const isSchemaPayload = isPayloadOfSchemaType<SchemaPayload>(SchemaSchema)\n\n/**\n * Identity function for determining if an object is an Schema with sources\n */\nexport const isSchemaPayloadWithSources = isPayloadOfSchemaTypeWithSources<SchemaPayload>(SchemaSchema)\n","export const SchemaSchema = 'network.xyo.schema' as const\nexport type SchemaSchema = typeof SchemaSchema\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport type { SchemaPayload } from './Payload.ts'\nimport { SchemaSchema } from './Schema.ts'\nimport { schemaPayloadTemplate } from './Template.ts'\n\nexport const SchemaPayloadPlugin = () =>\n createPayloadPlugin<SchemaPayload>({\n schema: SchemaSchema,\n template: schemaPayloadTemplate,\n })\n","import type { SchemaPayload } from './Payload.ts'\nimport { SchemaSchema } from './Schema.ts'\nexport const schemaPayloadTemplate = (): SchemaPayload => ({\n definition: {\n $id: '',\n $schema: 'http://json-schema.org/draft-07/schema#',\n },\n schema: SchemaSchema,\n})\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EAAuB;AAAA,OAClB;;;ACFA,IAAM,eAAe;;;AD6BrB,IAAM,kBAAkB,sBAAqC,YAAY;AAKzE,IAAM,6BAA6B,iCAAgD,YAAY;;;AElCtG,SAAS,2BAA2B;;;ACE7B,IAAM,wBAAwB,OAAsB;AAAA,EACzD,YAAY;AAAA,IACV,KAAK;AAAA,IACL,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AACV;;;ADFO,IAAM,sBAAsB,MACjC,oBAAmC;AAAA,EACjC,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 { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from '@xyo-network/payload-model'\n\nimport { SchemaSchema } from './Schema.ts'\n\nexport type SchemaPayload = Payload<{\n /**\n * The schema definition\n */\n definition: {\n [key: string]: unknown\n }\n /**\n * The schema this schema extends (if any)\n */\n extends?: string\n\n /** @deprecated use definition.$id instead */\n name?: string\n}, SchemaSchema> & {\n definition: {\n $id?: string\n }\n}\n\n/**\n * Identity function for determining if an object is an Schema\n */\nexport const isSchemaPayload = isPayloadOfSchemaType<SchemaPayload>(SchemaSchema)\n\n/**\n * Identity function for determining if an object is an Schema with sources\n */\nexport const isSchemaPayloadWithSources = isPayloadOfSchemaTypeWithSources<SchemaPayload>(SchemaSchema)\n","export const SchemaSchema = 'network.xyo.schema' as const\nexport type SchemaSchema = typeof SchemaSchema\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport type { SchemaPayload } from './Payload.ts'\nimport { SchemaSchema } from './Schema.ts'\nimport { schemaPayloadTemplate } from './Template.ts'\n\nexport const SchemaPayloadPlugin = () =>\n createPayloadPlugin<SchemaPayload>({\n schema: SchemaSchema,\n template: schemaPayloadTemplate,\n })\n","import type { SchemaPayload } from './Payload.ts'\nimport { SchemaSchema } from './Schema.ts'\nexport const schemaPayloadTemplate = (): SchemaPayload => ({\n definition: {\n $id: '',\n $schema: 'http://json-schema.org/draft-07/schema#',\n },\n schema: SchemaSchema,\n})\n"],"mappings":";AACA,SAAS,uBAAuB,wCAAwC;;;ACDjE,IAAM,eAAe;;;AD4BrB,IAAM,kBAAkB,sBAAqC,YAAY;AAKzE,IAAM,6BAA6B,iCAAgD,YAAY;;;AEjCtG,SAAS,2BAA2B;;;ACE7B,IAAM,wBAAwB,OAAsB;AAAA,EACzD,YAAY;AAAA,IACV,KAAK;AAAA,IACL,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AACV;;;ADFO,IAAM,sBAAsB,MACjC,oBAAmC;AAAA,EACjC,QAAQ;AAAA,EACR,UAAU;AACZ,CAAC;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/schema-payload-plugin",
3
- "version": "3.9.17",
3
+ "version": "3.9.19",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -29,15 +29,15 @@
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xyo-network/payload-model": "^3.9.17",
33
- "@xyo-network/payload-plugin": "^3.9.17"
32
+ "@xyo-network/payload-model": "^3.9.19",
33
+ "@xyo-network/payload-plugin": "^3.9.19"
34
34
  },
35
35
  "devDependencies": {
36
- "@xylabs/ts-scripts-yarn3": "^5.0.24",
37
- "@xylabs/tsconfig": "^5.0.24",
36
+ "@xylabs/ts-scripts-yarn3": "^5.0.39",
37
+ "@xylabs/tsconfig": "^5.0.39",
38
38
  "@xylabs/vitest-extended": "^4.5.1",
39
- "typescript": "^5.7.3",
40
- "vitest": "^3.0.6"
39
+ "typescript": "^5.8.2",
40
+ "vitest": "^3.0.7"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public"
package/src/Payload.ts CHANGED
@@ -1,6 +1,5 @@
1
- import {
2
- isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources, type Payload,
3
- } from '@xyo-network/payload-model'
1
+ import type { Payload } from '@xyo-network/payload-model'
2
+ import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from '@xyo-network/payload-model'
4
3
 
5
4
  import { SchemaSchema } from './Schema.ts'
6
5