@xyo-network/value-payload-plugin 5.2.27 → 5.3.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.
@@ -1,3 +1,5 @@
1
- export declare const ValueSchema: "network.xyo.value";
1
+ export declare const ValueSchema: "network.xyo.value" & {
2
+ readonly __schema: true;
3
+ };
2
4
  export type ValueSchema = typeof ValueSchema;
3
5
  //# sourceMappingURL=Schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,EAAG,mBAA4B,CAAA;AACvD,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;CAAsC,CAAA;AAC9D,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAA"}
@@ -2,7 +2,8 @@
2
2
  import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
3
3
 
4
4
  // src/Schema.ts
5
- var ValueSchema = "network.xyo.value";
5
+ import { asSchema } from "@xyo-network/payload-model";
6
+ var ValueSchema = asSchema("network.xyo.value", true);
6
7
 
7
8
  // src/Payload.ts
8
9
  var isValuePayload = isPayloadOfSchemaType(ValueSchema);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["import type { JsonValue } from '@xylabs/sdk-js'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema.ts'\n\nexport type Value<T extends JsonValue = JsonValue> = Payload<{\n schema: ValueSchema\n value: T\n}>\n\nexport const isValuePayload = isPayloadOfSchemaType<Value>(ValueSchema)\n","export const ValueSchema = 'network.xyo.value' as const\nexport type ValueSchema = typeof ValueSchema\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport type { Value } from './Payload.ts'\nimport { ValueSchema } from './Schema.ts'\nimport { valuePayloadTemplate } from './Template.ts'\n\nexport const ValuePayloadPlugin = () =>\n createPayloadPlugin<Value>({\n schema: ValueSchema,\n template: valuePayloadTemplate,\n })\n","import type { Value } from './Payload.ts'\nimport { ValueSchema } from './Schema.ts'\n\nexport const valuePayloadTemplate = (): Value => ({\n schema: ValueSchema,\n value: null,\n})\n"],"mappings":";AAEA,SAAS,6BAA6B;;;ACF/B,IAAM,cAAc;;;ADWpB,IAAM,iBAAiB,sBAA6B,WAAW;;;AEXtE,SAAS,2BAA2B;;;ACG7B,IAAM,uBAAuB,OAAc;AAAA,EAChD,QAAQ;AAAA,EACR,OAAO;AACT;;;ADAO,IAAM,qBAAqB,MAChC,oBAA2B;AAAA,EACzB,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 { JsonValue } from '@xylabs/sdk-js'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema.ts'\n\nexport type Value<T extends JsonValue = JsonValue> = Payload<{\n schema: ValueSchema\n value: T\n}>\n\nexport const isValuePayload = isPayloadOfSchemaType<Value>(ValueSchema)\n","import { asSchema } from '@xyo-network/payload-model'\n\nexport const ValueSchema = asSchema('network.xyo.value', true)\nexport type ValueSchema = typeof ValueSchema\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport type { Value } from './Payload.ts'\nimport { ValueSchema } from './Schema.ts'\nimport { valuePayloadTemplate } from './Template.ts'\n\nexport const ValuePayloadPlugin = () =>\n createPayloadPlugin<Value>({\n schema: ValueSchema,\n template: valuePayloadTemplate,\n })\n","import type { Value } from './Payload.ts'\nimport { ValueSchema } from './Schema.ts'\n\nexport const valuePayloadTemplate = (): Value => ({\n schema: ValueSchema,\n value: null,\n})\n"],"mappings":";AAEA,SAAS,6BAA6B;;;ACFtC,SAAS,gBAAgB;AAElB,IAAM,cAAc,SAAS,qBAAqB,IAAI;;;ADStD,IAAM,iBAAiB,sBAA6B,WAAW;;;AEXtE,SAAS,2BAA2B;;;ACG7B,IAAM,uBAAuB,OAAc;AAAA,EAChD,QAAQ;AAAA,EACR,OAAO;AACT;;;ADAO,IAAM,qBAAqB,MAChC,oBAA2B;AAAA,EACzB,QAAQ;AAAA,EACR,UAAU;AACZ,CAAC;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/value-payload-plugin",
3
- "version": "5.2.27",
3
+ "version": "5.3.0",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -37,8 +37,8 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@xylabs/sdk-js": "~5.0.64",
40
- "@xyo-network/payload-model": "~5.2.27",
41
- "@xyo-network/payload-plugin": "~5.2.27"
40
+ "@xyo-network/payload-model": "~5.3.0",
41
+ "@xyo-network/payload-plugin": "~5.3.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@xylabs/ts-scripts-yarn3": "~7.3.2",
package/src/Schema.ts CHANGED
@@ -1,2 +1,4 @@
1
- export const ValueSchema = 'network.xyo.value' as const
1
+ import { asSchema } from '@xyo-network/payload-model'
2
+
3
+ export const ValueSchema = asSchema('network.xyo.value', true)
2
4
  export type ValueSchema = typeof ValueSchema