@xyo-network/value-payload-plugin 2.106.0 → 2.107.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.
@@ -5,11 +5,11 @@ export type Value<T extends JsonValue = JsonValue> = Payload<{
5
5
  schema: ValueSchema;
6
6
  value: T;
7
7
  }>;
8
- export declare const isValuePayload: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
8
+ export declare const isValuePayload: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
9
9
  schema: ValueSchema;
10
10
  value: JsonValue;
11
11
  };
12
- export declare const isValuePayloadWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
12
+ export declare const isValuePayloadWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
13
13
  schema: ValueSchema;
14
14
  value: JsonValue;
15
15
  }>;
@@ -5,11 +5,11 @@ export type Value<T extends JsonValue = JsonValue> = Payload<{
5
5
  schema: ValueSchema;
6
6
  value: T;
7
7
  }>;
8
- export declare const isValuePayload: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
8
+ export declare const isValuePayload: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
9
9
  schema: ValueSchema;
10
10
  value: JsonValue;
11
11
  };
12
- export declare const isValuePayloadWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
12
+ export declare const isValuePayloadWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
13
13
  schema: ValueSchema;
14
14
  value: JsonValue;
15
15
  }>;
@@ -5,11 +5,11 @@ export type Value<T extends JsonValue = JsonValue> = Payload<{
5
5
  schema: ValueSchema;
6
6
  value: T;
7
7
  }>;
8
- export declare const isValuePayload: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
8
+ export declare const isValuePayload: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
9
9
  schema: ValueSchema;
10
10
  value: JsonValue;
11
11
  };
12
- export declare const isValuePayloadWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
12
+ export declare const isValuePayloadWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
13
13
  schema: ValueSchema;
14
14
  value: JsonValue;
15
15
  }>;
@@ -1,57 +1,2 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var src_exports = {};
23
- __export(src_exports, {
24
- ValuePayloadPlugin: () => ValuePayloadPlugin,
25
- ValueSchema: () => ValueSchema,
26
- default: () => ValuePayloadPlugin,
27
- isValuePayload: () => isValuePayload,
28
- isValuePayloadWithMeta: () => isValuePayloadWithMeta,
29
- valuePayloadTemplate: () => valuePayloadTemplate
30
- });
31
- module.exports = __toCommonJS(src_exports);
32
-
33
- // src/Payload.ts
34
- var import_payload_model = require("@xyo-network/payload-model");
35
-
36
- // src/Schema.ts
37
- var ValueSchema = "network.xyo.value";
38
-
39
- // src/Payload.ts
40
- var isValuePayload = (0, import_payload_model.isPayloadOfSchemaType)(ValueSchema);
41
- var isValuePayloadWithMeta = (0, import_payload_model.isPayloadOfSchemaTypeWithMeta)(ValueSchema);
42
-
43
- // src/Plugin.ts
44
- var import_payload_plugin = require("@xyo-network/payload-plugin");
45
-
46
- // src/Template.ts
47
- var valuePayloadTemplate = /* @__PURE__ */ __name(() => ({
48
- schema: ValueSchema,
49
- value: null
50
- }), "valuePayloadTemplate");
51
-
52
- // src/Plugin.ts
53
- var ValuePayloadPlugin = /* @__PURE__ */ __name(() => (0, import_payload_plugin.createPayloadPlugin)({
54
- schema: ValueSchema,
55
- template: valuePayloadTemplate
56
- }), "ValuePayloadPlugin");
1
+ "use strict";var m=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var r=(e,a)=>m(e,"name",{value:a,configurable:!0});var d=(e,a)=>{for(var t in a)m(e,t,{get:a[t],enumerable:!0})},n=(e,a,t,c)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of y(a))!s.call(e,l)&&l!==t&&m(e,l,{get:()=>a[l],enumerable:!(c=f(a,l))||c.enumerable});return e};var h=e=>n(m({},"__esModule",{value:!0}),e);var S={};d(S,{ValuePayloadPlugin:()=>i,ValueSchema:()=>o,default:()=>i,isValuePayload:()=>x,isValuePayloadWithMeta:()=>V,valuePayloadTemplate:()=>u});module.exports=h(S);var p=require("@xyo-network/payload-model");var o="network.xyo.value";var x=(0,p.isPayloadOfSchemaType)(o),V=(0,p.isPayloadOfSchemaTypeWithMeta)(o);var P=require("@xyo-network/payload-plugin");var u=r(()=>({schema:o,value:null}),"valuePayloadTemplate");var i=r(()=>(0,P.createPayloadPlugin)({schema:o,template:u}),"ValuePayloadPlugin");
57
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["export * from './Payload'\nexport { ValuePayloadPlugin as default, ValuePayloadPlugin } from './Plugin'\nexport * from './Schema'\nexport * from './Template'\n","import { JsonValue } from '@xylabs/object'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\nexport type Value<T extends JsonValue = JsonValue> = Payload<{\n schema: ValueSchema\n value: T\n}>\n\nexport const isValuePayload = isPayloadOfSchemaType<Value>(ValueSchema)\nexport const isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta<Value>(ValueSchema)\n","export type ValueSchema = 'network.xyo.value'\nexport const ValueSchema: ValueSchema = 'network.xyo.value'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { Value } from './Payload'\nimport { ValueSchema } from './Schema'\nimport { valuePayloadTemplate } from './Template'\n\nexport const ValuePayloadPlugin = () =>\n createPayloadPlugin<Value>({\n schema: ValueSchema,\n template: valuePayloadTemplate,\n })\n","import { Value } from './Payload'\nimport { ValueSchema } from './Schema'\n\nexport const valuePayloadTemplate = (): Value => ({\n schema: ValueSchema,\n value: null,\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;ACCA,2BAA8E;;;ACAvE,IAAMA,cAA2B;;;ADSjC,IAAMC,qBAAiBC,4CAA6BC,WAAAA;AACpD,IAAMC,6BAAyBC,oDAAqCF,WAAAA;;;AEX3E,4BAAoC;;;ACG7B,IAAMG,uBAAuB,8BAAc;EAChDC,QAAQC;EACRC,OAAO;AACT,IAHoC;;;ADG7B,IAAMC,qBAAqB,iCAChCC,2CAA2B;EACzBC,QAAQC;EACRC,UAAUC;AACZ,CAAA,GAJgC;","names":["ValueSchema","isValuePayload","isPayloadOfSchemaType","ValueSchema","isValuePayloadWithMeta","isPayloadOfSchemaTypeWithMeta","valuePayloadTemplate","schema","ValueSchema","value","ValuePayloadPlugin","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["export * from './Payload'\n// eslint-disable-next-line import/no-default-export\nexport { ValuePayloadPlugin as default, ValuePayloadPlugin } from './Plugin'\nexport * from './Schema'\nexport * from './Template'\n","import { JsonValue } from '@xylabs/object'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\nexport type Value<T extends JsonValue = JsonValue> = Payload<{\n schema: ValueSchema\n value: T\n}>\n\nexport const isValuePayload = isPayloadOfSchemaType<Value>(ValueSchema)\nexport const isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta<Value>(ValueSchema)\n","export type ValueSchema = 'network.xyo.value'\nexport const ValueSchema: ValueSchema = 'network.xyo.value'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { Value } from './Payload'\nimport { ValueSchema } from './Schema'\nimport { valuePayloadTemplate } from './Template'\n\nexport const ValuePayloadPlugin = () =>\n createPayloadPlugin<Value>({\n schema: ValueSchema,\n template: valuePayloadTemplate,\n })\n","import { Value } from './Payload'\nimport { ValueSchema } from './Schema'\n\nexport const valuePayloadTemplate = (): Value => ({\n schema: ValueSchema,\n value: null,\n})\n"],"mappings":"4dAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,EAAA,gBAAAC,EAAA,YAAAD,EAAA,mBAAAE,EAAA,2BAAAC,EAAA,yBAAAC,IAAA,eAAAC,EAAAP,GCCA,IAAAQ,EAA8E,sCCAvE,IAAMC,EAA2B,oBDSjC,IAAMC,KAAiBC,yBAA6BC,CAAAA,EAC9CC,KAAyBC,iCAAqCF,CAAAA,EEX3E,IAAAG,EAAoC,uCCG7B,IAAMC,EAAuBC,EAAA,KAAc,CAChDC,OAAQC,EACRC,MAAO,IACT,GAHoC,wBDG7B,IAAMC,EAAqBC,EAAA,OAChCC,uBAA2B,CACzBC,OAAQC,EACRC,SAAUC,CACZ,CAAA,EAJgC","names":["src_exports","__export","ValuePayloadPlugin","ValueSchema","isValuePayload","isValuePayloadWithMeta","valuePayloadTemplate","__toCommonJS","import_payload_model","ValueSchema","isValuePayload","isPayloadOfSchemaType","ValueSchema","isValuePayloadWithMeta","isPayloadOfSchemaTypeWithMeta","import_payload_plugin","valuePayloadTemplate","__name","schema","ValueSchema","value","ValuePayloadPlugin","__name","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
@@ -1,36 +1,2 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/Payload.ts
5
- import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta } from "@xyo-network/payload-model";
6
-
7
- // src/Schema.ts
8
- var ValueSchema = "network.xyo.value";
9
-
10
- // src/Payload.ts
11
- var isValuePayload = isPayloadOfSchemaType(ValueSchema);
12
- var isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta(ValueSchema);
13
-
14
- // src/Plugin.ts
15
- import { createPayloadPlugin } from "@xyo-network/payload-plugin";
16
-
17
- // src/Template.ts
18
- var valuePayloadTemplate = /* @__PURE__ */ __name(() => ({
19
- schema: ValueSchema,
20
- value: null
21
- }), "valuePayloadTemplate");
22
-
23
- // src/Plugin.ts
24
- var ValuePayloadPlugin = /* @__PURE__ */ __name(() => createPayloadPlugin({
25
- schema: ValueSchema,
26
- template: valuePayloadTemplate
27
- }), "ValuePayloadPlugin");
28
- export {
29
- ValuePayloadPlugin,
30
- ValueSchema,
31
- ValuePayloadPlugin as default,
32
- isValuePayload,
33
- isValuePayloadWithMeta,
34
- valuePayloadTemplate
35
- };
1
+ var r=Object.defineProperty;var e=(t,m)=>r(t,"name",{value:m,configurable:!0});import{isPayloadOfSchemaType as p,isPayloadOfSchemaTypeWithMeta as u}from"@xyo-network/payload-model";var a="network.xyo.value";var s=p(a),d=u(a);import{createPayloadPlugin as i}from"@xyo-network/payload-plugin";var o=e(()=>({schema:a,value:null}),"valuePayloadTemplate");var l=e(()=>i({schema:a,template:o}),"ValuePayloadPlugin");export{l as ValuePayloadPlugin,a as ValueSchema,l as default,s as isValuePayload,d as isValuePayloadWithMeta,o as valuePayloadTemplate};
36
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["import { JsonValue } from '@xylabs/object'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\nexport type Value<T extends JsonValue = JsonValue> = Payload<{\n schema: ValueSchema\n value: T\n}>\n\nexport const isValuePayload = isPayloadOfSchemaType<Value>(ValueSchema)\nexport const isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta<Value>(ValueSchema)\n","export type ValueSchema = 'network.xyo.value'\nexport const ValueSchema: ValueSchema = 'network.xyo.value'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { Value } from './Payload'\nimport { ValueSchema } from './Schema'\nimport { valuePayloadTemplate } from './Template'\n\nexport const ValuePayloadPlugin = () =>\n createPayloadPlugin<Value>({\n schema: ValueSchema,\n template: valuePayloadTemplate,\n })\n","import { Value } from './Payload'\nimport { ValueSchema } from './Schema'\n\nexport const valuePayloadTemplate = (): Value => ({\n schema: ValueSchema,\n value: null,\n})\n"],"mappings":";;;;AACA,SAASA,uBAAuBC,qCAA8C;;;ACAvE,IAAMC,cAA2B;;;ADSjC,IAAMC,iBAAiBC,sBAA6BC,WAAAA;AACpD,IAAMC,yBAAyBC,8BAAqCF,WAAAA;;;AEX3E,SAASG,2BAA2B;;;ACG7B,IAAMC,uBAAuB,8BAAc;EAChDC,QAAQC;EACRC,OAAO;AACT,IAHoC;;;ADG7B,IAAMC,qBAAqB,6BAChCC,oBAA2B;EACzBC,QAAQC;EACRC,UAAUC;AACZ,CAAA,GAJgC;","names":["isPayloadOfSchemaType","isPayloadOfSchemaTypeWithMeta","ValueSchema","isValuePayload","isPayloadOfSchemaType","ValueSchema","isValuePayloadWithMeta","isPayloadOfSchemaTypeWithMeta","createPayloadPlugin","valuePayloadTemplate","schema","ValueSchema","value","ValuePayloadPlugin","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}
1
+ {"version":3,"sources":["../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["import { JsonValue } from '@xylabs/object'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\nexport type Value<T extends JsonValue = JsonValue> = Payload<{\n schema: ValueSchema\n value: T\n}>\n\nexport const isValuePayload = isPayloadOfSchemaType<Value>(ValueSchema)\nexport const isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta<Value>(ValueSchema)\n","export type ValueSchema = 'network.xyo.value'\nexport const ValueSchema: ValueSchema = 'network.xyo.value'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { Value } from './Payload'\nimport { ValueSchema } from './Schema'\nimport { valuePayloadTemplate } from './Template'\n\nexport const ValuePayloadPlugin = () =>\n createPayloadPlugin<Value>({\n schema: ValueSchema,\n template: valuePayloadTemplate,\n })\n","import { Value } from './Payload'\nimport { ValueSchema } from './Schema'\n\nexport const valuePayloadTemplate = (): Value => ({\n schema: ValueSchema,\n value: null,\n})\n"],"mappings":"+EACA,OAASA,yBAAAA,EAAuBC,iCAAAA,MAA8C,6BCAvE,IAAMC,EAA2B,oBDSjC,IAAMC,EAAiBC,EAA6BC,CAAAA,EAC9CC,EAAyBC,EAAqCF,CAAAA,EEX3E,OAASG,uBAAAA,MAA2B,8BCG7B,IAAMC,EAAuBC,EAAA,KAAc,CAChDC,OAAQC,EACRC,MAAO,IACT,GAHoC,wBDG7B,IAAMC,EAAqBC,EAAA,IAChCC,EAA2B,CACzBC,OAAQC,EACRC,SAAUC,CACZ,CAAA,EAJgC","names":["isPayloadOfSchemaType","isPayloadOfSchemaTypeWithMeta","ValueSchema","isValuePayload","isPayloadOfSchemaType","ValueSchema","isValuePayloadWithMeta","isPayloadOfSchemaTypeWithMeta","createPayloadPlugin","valuePayloadTemplate","__name","schema","ValueSchema","value","ValuePayloadPlugin","__name","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}
@@ -5,11 +5,11 @@ export type Value<T extends JsonValue = JsonValue> = Payload<{
5
5
  schema: ValueSchema;
6
6
  value: T;
7
7
  }>;
8
- export declare const isValuePayload: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
8
+ export declare const isValuePayload: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
9
9
  schema: ValueSchema;
10
10
  value: JsonValue;
11
11
  };
12
- export declare const isValuePayloadWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
12
+ export declare const isValuePayloadWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
13
13
  schema: ValueSchema;
14
14
  value: JsonValue;
15
15
  }>;
@@ -5,11 +5,11 @@ export type Value<T extends JsonValue = JsonValue> = Payload<{
5
5
  schema: ValueSchema;
6
6
  value: T;
7
7
  }>;
8
- export declare const isValuePayload: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
8
+ export declare const isValuePayload: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
9
9
  schema: ValueSchema;
10
10
  value: JsonValue;
11
11
  };
12
- export declare const isValuePayloadWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
12
+ export declare const isValuePayloadWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
13
13
  schema: ValueSchema;
14
14
  value: JsonValue;
15
15
  }>;
@@ -5,11 +5,11 @@ export type Value<T extends JsonValue = JsonValue> = Payload<{
5
5
  schema: ValueSchema;
6
6
  value: T;
7
7
  }>;
8
- export declare const isValuePayload: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
8
+ export declare const isValuePayload: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
9
9
  schema: ValueSchema;
10
10
  value: JsonValue;
11
11
  };
12
- export declare const isValuePayloadWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
12
+ export declare const isValuePayloadWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
13
13
  schema: ValueSchema;
14
14
  value: JsonValue;
15
15
  }>;
@@ -1,57 +1,2 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var src_exports = {};
23
- __export(src_exports, {
24
- ValuePayloadPlugin: () => ValuePayloadPlugin,
25
- ValueSchema: () => ValueSchema,
26
- default: () => ValuePayloadPlugin,
27
- isValuePayload: () => isValuePayload,
28
- isValuePayloadWithMeta: () => isValuePayloadWithMeta,
29
- valuePayloadTemplate: () => valuePayloadTemplate
30
- });
31
- module.exports = __toCommonJS(src_exports);
32
-
33
- // src/Payload.ts
34
- var import_payload_model = require("@xyo-network/payload-model");
35
-
36
- // src/Schema.ts
37
- var ValueSchema = "network.xyo.value";
38
-
39
- // src/Payload.ts
40
- var isValuePayload = (0, import_payload_model.isPayloadOfSchemaType)(ValueSchema);
41
- var isValuePayloadWithMeta = (0, import_payload_model.isPayloadOfSchemaTypeWithMeta)(ValueSchema);
42
-
43
- // src/Plugin.ts
44
- var import_payload_plugin = require("@xyo-network/payload-plugin");
45
-
46
- // src/Template.ts
47
- var valuePayloadTemplate = /* @__PURE__ */ __name(() => ({
48
- schema: ValueSchema,
49
- value: null
50
- }), "valuePayloadTemplate");
51
-
52
- // src/Plugin.ts
53
- var ValuePayloadPlugin = /* @__PURE__ */ __name(() => (0, import_payload_plugin.createPayloadPlugin)({
54
- schema: ValueSchema,
55
- template: valuePayloadTemplate
56
- }), "ValuePayloadPlugin");
1
+ "use strict";var m=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var r=(e,a)=>m(e,"name",{value:a,configurable:!0});var d=(e,a)=>{for(var t in a)m(e,t,{get:a[t],enumerable:!0})},n=(e,a,t,c)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of y(a))!s.call(e,l)&&l!==t&&m(e,l,{get:()=>a[l],enumerable:!(c=f(a,l))||c.enumerable});return e};var h=e=>n(m({},"__esModule",{value:!0}),e);var S={};d(S,{ValuePayloadPlugin:()=>i,ValueSchema:()=>o,default:()=>i,isValuePayload:()=>x,isValuePayloadWithMeta:()=>V,valuePayloadTemplate:()=>u});module.exports=h(S);var p=require("@xyo-network/payload-model");var o="network.xyo.value";var x=(0,p.isPayloadOfSchemaType)(o),V=(0,p.isPayloadOfSchemaTypeWithMeta)(o);var P=require("@xyo-network/payload-plugin");var u=r(()=>({schema:o,value:null}),"valuePayloadTemplate");var i=r(()=>(0,P.createPayloadPlugin)({schema:o,template:u}),"ValuePayloadPlugin");
57
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["export * from './Payload'\nexport { ValuePayloadPlugin as default, ValuePayloadPlugin } from './Plugin'\nexport * from './Schema'\nexport * from './Template'\n","import { JsonValue } from '@xylabs/object'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\nexport type Value<T extends JsonValue = JsonValue> = Payload<{\n schema: ValueSchema\n value: T\n}>\n\nexport const isValuePayload = isPayloadOfSchemaType<Value>(ValueSchema)\nexport const isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta<Value>(ValueSchema)\n","export type ValueSchema = 'network.xyo.value'\nexport const ValueSchema: ValueSchema = 'network.xyo.value'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { Value } from './Payload'\nimport { ValueSchema } from './Schema'\nimport { valuePayloadTemplate } from './Template'\n\nexport const ValuePayloadPlugin = () =>\n createPayloadPlugin<Value>({\n schema: ValueSchema,\n template: valuePayloadTemplate,\n })\n","import { Value } from './Payload'\nimport { ValueSchema } from './Schema'\n\nexport const valuePayloadTemplate = (): Value => ({\n schema: ValueSchema,\n value: null,\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;ACCA,2BAA8E;;;ACAvE,IAAMA,cAA2B;;;ADSjC,IAAMC,qBAAiBC,4CAA6BC,WAAAA;AACpD,IAAMC,6BAAyBC,oDAAqCF,WAAAA;;;AEX3E,4BAAoC;;;ACG7B,IAAMG,uBAAuB,8BAAc;EAChDC,QAAQC;EACRC,OAAO;AACT,IAHoC;;;ADG7B,IAAMC,qBAAqB,iCAChCC,2CAA2B;EACzBC,QAAQC;EACRC,UAAUC;AACZ,CAAA,GAJgC;","names":["ValueSchema","isValuePayload","isPayloadOfSchemaType","ValueSchema","isValuePayloadWithMeta","isPayloadOfSchemaTypeWithMeta","valuePayloadTemplate","schema","ValueSchema","value","ValuePayloadPlugin","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["export * from './Payload'\n// eslint-disable-next-line import/no-default-export\nexport { ValuePayloadPlugin as default, ValuePayloadPlugin } from './Plugin'\nexport * from './Schema'\nexport * from './Template'\n","import { JsonValue } from '@xylabs/object'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\nexport type Value<T extends JsonValue = JsonValue> = Payload<{\n schema: ValueSchema\n value: T\n}>\n\nexport const isValuePayload = isPayloadOfSchemaType<Value>(ValueSchema)\nexport const isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta<Value>(ValueSchema)\n","export type ValueSchema = 'network.xyo.value'\nexport const ValueSchema: ValueSchema = 'network.xyo.value'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { Value } from './Payload'\nimport { ValueSchema } from './Schema'\nimport { valuePayloadTemplate } from './Template'\n\nexport const ValuePayloadPlugin = () =>\n createPayloadPlugin<Value>({\n schema: ValueSchema,\n template: valuePayloadTemplate,\n })\n","import { Value } from './Payload'\nimport { ValueSchema } from './Schema'\n\nexport const valuePayloadTemplate = (): Value => ({\n schema: ValueSchema,\n value: null,\n})\n"],"mappings":"4dAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,EAAA,gBAAAC,EAAA,YAAAD,EAAA,mBAAAE,EAAA,2BAAAC,EAAA,yBAAAC,IAAA,eAAAC,EAAAP,GCCA,IAAAQ,EAA8E,sCCAvE,IAAMC,EAA2B,oBDSjC,IAAMC,KAAiBC,yBAA6BC,CAAAA,EAC9CC,KAAyBC,iCAAqCF,CAAAA,EEX3E,IAAAG,EAAoC,uCCG7B,IAAMC,EAAuBC,EAAA,KAAc,CAChDC,OAAQC,EACRC,MAAO,IACT,GAHoC,wBDG7B,IAAMC,EAAqBC,EAAA,OAChCC,uBAA2B,CACzBC,OAAQC,EACRC,SAAUC,CACZ,CAAA,EAJgC","names":["src_exports","__export","ValuePayloadPlugin","ValueSchema","isValuePayload","isValuePayloadWithMeta","valuePayloadTemplate","__toCommonJS","import_payload_model","ValueSchema","isValuePayload","isPayloadOfSchemaType","ValueSchema","isValuePayloadWithMeta","isPayloadOfSchemaTypeWithMeta","import_payload_plugin","valuePayloadTemplate","__name","schema","ValueSchema","value","ValuePayloadPlugin","__name","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
@@ -1,36 +1,2 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/Payload.ts
5
- import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta } from "@xyo-network/payload-model";
6
-
7
- // src/Schema.ts
8
- var ValueSchema = "network.xyo.value";
9
-
10
- // src/Payload.ts
11
- var isValuePayload = isPayloadOfSchemaType(ValueSchema);
12
- var isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta(ValueSchema);
13
-
14
- // src/Plugin.ts
15
- import { createPayloadPlugin } from "@xyo-network/payload-plugin";
16
-
17
- // src/Template.ts
18
- var valuePayloadTemplate = /* @__PURE__ */ __name(() => ({
19
- schema: ValueSchema,
20
- value: null
21
- }), "valuePayloadTemplate");
22
-
23
- // src/Plugin.ts
24
- var ValuePayloadPlugin = /* @__PURE__ */ __name(() => createPayloadPlugin({
25
- schema: ValueSchema,
26
- template: valuePayloadTemplate
27
- }), "ValuePayloadPlugin");
28
- export {
29
- ValuePayloadPlugin,
30
- ValueSchema,
31
- ValuePayloadPlugin as default,
32
- isValuePayload,
33
- isValuePayloadWithMeta,
34
- valuePayloadTemplate
35
- };
1
+ var r=Object.defineProperty;var e=(t,m)=>r(t,"name",{value:m,configurable:!0});import{isPayloadOfSchemaType as p,isPayloadOfSchemaTypeWithMeta as u}from"@xyo-network/payload-model";var a="network.xyo.value";var s=p(a),d=u(a);import{createPayloadPlugin as i}from"@xyo-network/payload-plugin";var o=e(()=>({schema:a,value:null}),"valuePayloadTemplate");var l=e(()=>i({schema:a,template:o}),"ValuePayloadPlugin");export{l as ValuePayloadPlugin,a as ValueSchema,l as default,s as isValuePayload,d as isValuePayloadWithMeta,o as valuePayloadTemplate};
36
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["import { JsonValue } from '@xylabs/object'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\nexport type Value<T extends JsonValue = JsonValue> = Payload<{\n schema: ValueSchema\n value: T\n}>\n\nexport const isValuePayload = isPayloadOfSchemaType<Value>(ValueSchema)\nexport const isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta<Value>(ValueSchema)\n","export type ValueSchema = 'network.xyo.value'\nexport const ValueSchema: ValueSchema = 'network.xyo.value'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { Value } from './Payload'\nimport { ValueSchema } from './Schema'\nimport { valuePayloadTemplate } from './Template'\n\nexport const ValuePayloadPlugin = () =>\n createPayloadPlugin<Value>({\n schema: ValueSchema,\n template: valuePayloadTemplate,\n })\n","import { Value } from './Payload'\nimport { ValueSchema } from './Schema'\n\nexport const valuePayloadTemplate = (): Value => ({\n schema: ValueSchema,\n value: null,\n})\n"],"mappings":";;;;AACA,SAASA,uBAAuBC,qCAA8C;;;ACAvE,IAAMC,cAA2B;;;ADSjC,IAAMC,iBAAiBC,sBAA6BC,WAAAA;AACpD,IAAMC,yBAAyBC,8BAAqCF,WAAAA;;;AEX3E,SAASG,2BAA2B;;;ACG7B,IAAMC,uBAAuB,8BAAc;EAChDC,QAAQC;EACRC,OAAO;AACT,IAHoC;;;ADG7B,IAAMC,qBAAqB,6BAChCC,oBAA2B;EACzBC,QAAQC;EACRC,UAAUC;AACZ,CAAA,GAJgC;","names":["isPayloadOfSchemaType","isPayloadOfSchemaTypeWithMeta","ValueSchema","isValuePayload","isPayloadOfSchemaType","ValueSchema","isValuePayloadWithMeta","isPayloadOfSchemaTypeWithMeta","createPayloadPlugin","valuePayloadTemplate","schema","ValueSchema","value","ValuePayloadPlugin","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}
1
+ {"version":3,"sources":["../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["import { JsonValue } from '@xylabs/object'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\nexport type Value<T extends JsonValue = JsonValue> = Payload<{\n schema: ValueSchema\n value: T\n}>\n\nexport const isValuePayload = isPayloadOfSchemaType<Value>(ValueSchema)\nexport const isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta<Value>(ValueSchema)\n","export type ValueSchema = 'network.xyo.value'\nexport const ValueSchema: ValueSchema = 'network.xyo.value'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { Value } from './Payload'\nimport { ValueSchema } from './Schema'\nimport { valuePayloadTemplate } from './Template'\n\nexport const ValuePayloadPlugin = () =>\n createPayloadPlugin<Value>({\n schema: ValueSchema,\n template: valuePayloadTemplate,\n })\n","import { Value } from './Payload'\nimport { ValueSchema } from './Schema'\n\nexport const valuePayloadTemplate = (): Value => ({\n schema: ValueSchema,\n value: null,\n})\n"],"mappings":"+EACA,OAASA,yBAAAA,EAAuBC,iCAAAA,MAA8C,6BCAvE,IAAMC,EAA2B,oBDSjC,IAAMC,EAAiBC,EAA6BC,CAAAA,EAC9CC,EAAyBC,EAAqCF,CAAAA,EEX3E,OAASG,uBAAAA,MAA2B,8BCG7B,IAAMC,EAAuBC,EAAA,KAAc,CAChDC,OAAQC,EACRC,MAAO,IACT,GAHoC,wBDG7B,IAAMC,EAAqBC,EAAA,IAChCC,EAA2B,CACzBC,OAAQC,EACRC,SAAUC,CACZ,CAAA,EAJgC","names":["isPayloadOfSchemaType","isPayloadOfSchemaTypeWithMeta","ValueSchema","isValuePayload","isPayloadOfSchemaType","ValueSchema","isValuePayloadWithMeta","isPayloadOfSchemaTypeWithMeta","createPayloadPlugin","valuePayloadTemplate","__name","schema","ValueSchema","value","ValuePayloadPlugin","__name","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}
@@ -5,11 +5,11 @@ export type Value<T extends JsonValue = JsonValue> = Payload<{
5
5
  schema: ValueSchema;
6
6
  value: T;
7
7
  }>;
8
- export declare const isValuePayload: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
8
+ export declare const isValuePayload: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
9
9
  schema: ValueSchema;
10
10
  value: JsonValue;
11
11
  };
12
- export declare const isValuePayloadWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
12
+ export declare const isValuePayloadWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
13
13
  schema: ValueSchema;
14
14
  value: JsonValue;
15
15
  }>;
@@ -5,11 +5,11 @@ export type Value<T extends JsonValue = JsonValue> = Payload<{
5
5
  schema: ValueSchema;
6
6
  value: T;
7
7
  }>;
8
- export declare const isValuePayload: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
8
+ export declare const isValuePayload: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
9
9
  schema: ValueSchema;
10
10
  value: JsonValue;
11
11
  };
12
- export declare const isValuePayloadWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
12
+ export declare const isValuePayloadWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
13
13
  schema: ValueSchema;
14
14
  value: JsonValue;
15
15
  }>;
@@ -5,11 +5,11 @@ export type Value<T extends JsonValue = JsonValue> = Payload<{
5
5
  schema: ValueSchema;
6
6
  value: T;
7
7
  }>;
8
- export declare const isValuePayload: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
8
+ export declare const isValuePayload: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
9
9
  schema: ValueSchema;
10
10
  value: JsonValue;
11
11
  };
12
- export declare const isValuePayloadWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
12
+ export declare const isValuePayloadWithMeta: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
13
13
  schema: ValueSchema;
14
14
  value: JsonValue;
15
15
  }>;
@@ -1,65 +1,2 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var src_exports = {};
23
- __export(src_exports, {
24
- ValuePayloadPlugin: () => ValuePayloadPlugin,
25
- ValueSchema: () => ValueSchema,
26
- default: () => ValuePayloadPlugin,
27
- isValuePayload: () => isValuePayload,
28
- isValuePayloadWithMeta: () => isValuePayloadWithMeta,
29
- valuePayloadTemplate: () => valuePayloadTemplate
30
- });
31
- module.exports = __toCommonJS(src_exports);
32
-
33
- // src/Payload.ts
34
- var import_payload_model = require("@xyo-network/payload-model");
35
-
36
- // src/Schema.ts
37
- var ValueSchema = "network.xyo.value";
38
-
39
- // src/Payload.ts
40
- var isValuePayload = (0, import_payload_model.isPayloadOfSchemaType)(ValueSchema);
41
- var isValuePayloadWithMeta = (0, import_payload_model.isPayloadOfSchemaTypeWithMeta)(ValueSchema);
42
-
43
- // src/Plugin.ts
44
- var import_payload_plugin = require("@xyo-network/payload-plugin");
45
-
46
- // src/Template.ts
47
- var valuePayloadTemplate = /* @__PURE__ */ __name(() => ({
48
- schema: ValueSchema,
49
- value: null
50
- }), "valuePayloadTemplate");
51
-
52
- // src/Plugin.ts
53
- var ValuePayloadPlugin = /* @__PURE__ */ __name(() => (0, import_payload_plugin.createPayloadPlugin)({
54
- schema: ValueSchema,
55
- template: valuePayloadTemplate
56
- }), "ValuePayloadPlugin");
57
- // Annotate the CommonJS export names for ESM import in node:
58
- 0 && (module.exports = {
59
- ValuePayloadPlugin,
60
- ValueSchema,
61
- isValuePayload,
62
- isValuePayloadWithMeta,
63
- valuePayloadTemplate
64
- });
1
+ "use strict";var m=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var r=(e,a)=>m(e,"name",{value:a,configurable:!0});var d=(e,a)=>{for(var t in a)m(e,t,{get:a[t],enumerable:!0})},n=(e,a,t,c)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of y(a))!s.call(e,l)&&l!==t&&m(e,l,{get:()=>a[l],enumerable:!(c=f(a,l))||c.enumerable});return e};var h=e=>n(m({},"__esModule",{value:!0}),e);var S={};d(S,{ValuePayloadPlugin:()=>i,ValueSchema:()=>o,default:()=>i,isValuePayload:()=>x,isValuePayloadWithMeta:()=>V,valuePayloadTemplate:()=>u});module.exports=h(S);var p=require("@xyo-network/payload-model");var o="network.xyo.value";var x=(0,p.isPayloadOfSchemaType)(o),V=(0,p.isPayloadOfSchemaTypeWithMeta)(o);var P=require("@xyo-network/payload-plugin");var u=r(()=>({schema:o,value:null}),"valuePayloadTemplate");var i=r(()=>(0,P.createPayloadPlugin)({schema:o,template:u}),"ValuePayloadPlugin");0&&(module.exports={ValuePayloadPlugin,ValueSchema,isValuePayload,isValuePayloadWithMeta,valuePayloadTemplate});
65
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["export * from './Payload'\nexport { ValuePayloadPlugin as default, ValuePayloadPlugin } from './Plugin'\nexport * from './Schema'\nexport * from './Template'\n","import { JsonValue } from '@xylabs/object'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\nexport type Value<T extends JsonValue = JsonValue> = Payload<{\n schema: ValueSchema\n value: T\n}>\n\nexport const isValuePayload = isPayloadOfSchemaType<Value>(ValueSchema)\nexport const isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta<Value>(ValueSchema)\n","export type ValueSchema = 'network.xyo.value'\nexport const ValueSchema: ValueSchema = 'network.xyo.value'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { Value } from './Payload'\nimport { ValueSchema } from './Schema'\nimport { valuePayloadTemplate } from './Template'\n\nexport const ValuePayloadPlugin = () =>\n createPayloadPlugin<Value>({\n schema: ValueSchema,\n template: valuePayloadTemplate,\n })\n","import { Value } from './Payload'\nimport { ValueSchema } from './Schema'\n\nexport const valuePayloadTemplate = (): Value => ({\n schema: ValueSchema,\n value: null,\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;ACCA,2BAA8E;;;ACAvE,IAAMA,cAA2B;;;ADSjC,IAAMC,qBAAiBC,4CAA6BC,WAAAA;AACpD,IAAMC,6BAAyBC,oDAAqCF,WAAAA;;;AEX3E,4BAAoC;;;ACG7B,IAAMG,uBAAuB,8BAAc;EAChDC,QAAQC;EACRC,OAAO;AACT,IAHoC;;;ADG7B,IAAMC,qBAAqB,iCAChCC,2CAA2B;EACzBC,QAAQC;EACRC,UAAUC;AACZ,CAAA,GAJgC;","names":["ValueSchema","isValuePayload","isPayloadOfSchemaType","ValueSchema","isValuePayloadWithMeta","isPayloadOfSchemaTypeWithMeta","valuePayloadTemplate","schema","ValueSchema","value","ValuePayloadPlugin","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["export * from './Payload'\n// eslint-disable-next-line import/no-default-export\nexport { ValuePayloadPlugin as default, ValuePayloadPlugin } from './Plugin'\nexport * from './Schema'\nexport * from './Template'\n","import { JsonValue } from '@xylabs/object'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\nexport type Value<T extends JsonValue = JsonValue> = Payload<{\n schema: ValueSchema\n value: T\n}>\n\nexport const isValuePayload = isPayloadOfSchemaType<Value>(ValueSchema)\nexport const isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta<Value>(ValueSchema)\n","export type ValueSchema = 'network.xyo.value'\nexport const ValueSchema: ValueSchema = 'network.xyo.value'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { Value } from './Payload'\nimport { ValueSchema } from './Schema'\nimport { valuePayloadTemplate } from './Template'\n\nexport const ValuePayloadPlugin = () =>\n createPayloadPlugin<Value>({\n schema: ValueSchema,\n template: valuePayloadTemplate,\n })\n","import { Value } from './Payload'\nimport { ValueSchema } from './Schema'\n\nexport const valuePayloadTemplate = (): Value => ({\n schema: ValueSchema,\n value: null,\n})\n"],"mappings":"4dAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,EAAA,gBAAAC,EAAA,YAAAD,EAAA,mBAAAE,EAAA,2BAAAC,EAAA,yBAAAC,IAAA,eAAAC,EAAAP,GCCA,IAAAQ,EAA8E,sCCAvE,IAAMC,EAA2B,oBDSjC,IAAMC,KAAiBC,yBAA6BC,CAAAA,EAC9CC,KAAyBC,iCAAqCF,CAAAA,EEX3E,IAAAG,EAAoC,uCCG7B,IAAMC,EAAuBC,EAAA,KAAc,CAChDC,OAAQC,EACRC,MAAO,IACT,GAHoC,wBDG7B,IAAMC,EAAqBC,EAAA,OAChCC,uBAA2B,CACzBC,OAAQC,EACRC,SAAUC,CACZ,CAAA,EAJgC","names":["src_exports","__export","ValuePayloadPlugin","ValueSchema","isValuePayload","isValuePayloadWithMeta","valuePayloadTemplate","__toCommonJS","import_payload_model","ValueSchema","isValuePayload","isPayloadOfSchemaType","ValueSchema","isValuePayloadWithMeta","isPayloadOfSchemaTypeWithMeta","import_payload_plugin","valuePayloadTemplate","__name","schema","ValueSchema","value","ValuePayloadPlugin","__name","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5E,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
@@ -1,36 +1,2 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/Payload.ts
5
- import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta } from "@xyo-network/payload-model";
6
-
7
- // src/Schema.ts
8
- var ValueSchema = "network.xyo.value";
9
-
10
- // src/Payload.ts
11
- var isValuePayload = isPayloadOfSchemaType(ValueSchema);
12
- var isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta(ValueSchema);
13
-
14
- // src/Plugin.ts
15
- import { createPayloadPlugin } from "@xyo-network/payload-plugin";
16
-
17
- // src/Template.ts
18
- var valuePayloadTemplate = /* @__PURE__ */ __name(() => ({
19
- schema: ValueSchema,
20
- value: null
21
- }), "valuePayloadTemplate");
22
-
23
- // src/Plugin.ts
24
- var ValuePayloadPlugin = /* @__PURE__ */ __name(() => createPayloadPlugin({
25
- schema: ValueSchema,
26
- template: valuePayloadTemplate
27
- }), "ValuePayloadPlugin");
28
- export {
29
- ValuePayloadPlugin,
30
- ValueSchema,
31
- ValuePayloadPlugin as default,
32
- isValuePayload,
33
- isValuePayloadWithMeta,
34
- valuePayloadTemplate
35
- };
1
+ var r=Object.defineProperty;var e=(t,m)=>r(t,"name",{value:m,configurable:!0});import{isPayloadOfSchemaType as p,isPayloadOfSchemaTypeWithMeta as u}from"@xyo-network/payload-model";var a="network.xyo.value";var s=p(a),d=u(a);import{createPayloadPlugin as i}from"@xyo-network/payload-plugin";var o=e(()=>({schema:a,value:null}),"valuePayloadTemplate");var l=e(()=>i({schema:a,template:o}),"ValuePayloadPlugin");export{l as ValuePayloadPlugin,a as ValueSchema,l as default,s as isValuePayload,d as isValuePayloadWithMeta,o as valuePayloadTemplate};
36
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["import { JsonValue } from '@xylabs/object'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\nexport type Value<T extends JsonValue = JsonValue> = Payload<{\n schema: ValueSchema\n value: T\n}>\n\nexport const isValuePayload = isPayloadOfSchemaType<Value>(ValueSchema)\nexport const isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta<Value>(ValueSchema)\n","export type ValueSchema = 'network.xyo.value'\nexport const ValueSchema: ValueSchema = 'network.xyo.value'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { Value } from './Payload'\nimport { ValueSchema } from './Schema'\nimport { valuePayloadTemplate } from './Template'\n\nexport const ValuePayloadPlugin = () =>\n createPayloadPlugin<Value>({\n schema: ValueSchema,\n template: valuePayloadTemplate,\n })\n","import { Value } from './Payload'\nimport { ValueSchema } from './Schema'\n\nexport const valuePayloadTemplate = (): Value => ({\n schema: ValueSchema,\n value: null,\n})\n"],"mappings":";;;;AACA,SAASA,uBAAuBC,qCAA8C;;;ACAvE,IAAMC,cAA2B;;;ADSjC,IAAMC,iBAAiBC,sBAA6BC,WAAAA;AACpD,IAAMC,yBAAyBC,8BAAqCF,WAAAA;;;AEX3E,SAASG,2BAA2B;;;ACG7B,IAAMC,uBAAuB,8BAAc;EAChDC,QAAQC;EACRC,OAAO;AACT,IAHoC;;;ADG7B,IAAMC,qBAAqB,6BAChCC,oBAA2B;EACzBC,QAAQC;EACRC,UAAUC;AACZ,CAAA,GAJgC;","names":["isPayloadOfSchemaType","isPayloadOfSchemaTypeWithMeta","ValueSchema","isValuePayload","isPayloadOfSchemaType","ValueSchema","isValuePayloadWithMeta","isPayloadOfSchemaTypeWithMeta","createPayloadPlugin","valuePayloadTemplate","schema","ValueSchema","value","ValuePayloadPlugin","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}
1
+ {"version":3,"sources":["../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["import { JsonValue } from '@xylabs/object'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\nexport type Value<T extends JsonValue = JsonValue> = Payload<{\n schema: ValueSchema\n value: T\n}>\n\nexport const isValuePayload = isPayloadOfSchemaType<Value>(ValueSchema)\nexport const isValuePayloadWithMeta = isPayloadOfSchemaTypeWithMeta<Value>(ValueSchema)\n","export type ValueSchema = 'network.xyo.value'\nexport const ValueSchema: ValueSchema = 'network.xyo.value'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { Value } from './Payload'\nimport { ValueSchema } from './Schema'\nimport { valuePayloadTemplate } from './Template'\n\nexport const ValuePayloadPlugin = () =>\n createPayloadPlugin<Value>({\n schema: ValueSchema,\n template: valuePayloadTemplate,\n })\n","import { Value } from './Payload'\nimport { ValueSchema } from './Schema'\n\nexport const valuePayloadTemplate = (): Value => ({\n schema: ValueSchema,\n value: null,\n})\n"],"mappings":"+EACA,OAASA,yBAAAA,EAAuBC,iCAAAA,MAA8C,6BCAvE,IAAMC,EAA2B,oBDSjC,IAAMC,EAAiBC,EAA6BC,CAAAA,EAC9CC,EAAyBC,EAAqCF,CAAAA,EEX3E,OAASG,uBAAAA,MAA2B,8BCG7B,IAAMC,EAAuBC,EAAA,KAAc,CAChDC,OAAQC,EACRC,MAAO,IACT,GAHoC,wBDG7B,IAAMC,EAAqBC,EAAA,IAChCC,EAA2B,CACzBC,OAAQC,EACRC,SAAUC,CACZ,CAAA,EAJgC","names":["isPayloadOfSchemaType","isPayloadOfSchemaTypeWithMeta","ValueSchema","isValuePayload","isPayloadOfSchemaType","ValueSchema","isValuePayloadWithMeta","isPayloadOfSchemaTypeWithMeta","createPayloadPlugin","valuePayloadTemplate","__name","schema","ValueSchema","value","ValuePayloadPlugin","__name","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}
package/package.json CHANGED
@@ -11,13 +11,13 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@xylabs/object": "^3.5.1",
14
- "@xyo-network/payload-model": "~2.106.0",
15
- "@xyo-network/payload-plugin": "~2.106.0"
14
+ "@xyo-network/payload-model": "~2.107.0",
15
+ "@xyo-network/payload-plugin": "~2.107.0"
16
16
  },
17
17
  "devDependencies": {
18
- "@xylabs/ts-scripts-yarn3": "^3.11.2",
19
- "@xylabs/tsconfig": "^3.11.2",
20
- "typescript": "^5.4.5"
18
+ "@xylabs/ts-scripts-yarn3": "^3.11.8",
19
+ "@xylabs/tsconfig": "^3.11.8",
20
+ "typescript": "^5.5.2"
21
21
  },
22
22
  "description": "Typescript/Javascript Plugins for XYO Platform",
23
23
  "exports": {
@@ -58,6 +58,6 @@
58
58
  "url": "https://github.com/XYOracleNetwork/plugins.git"
59
59
  },
60
60
  "sideEffects": false,
61
- "version": "2.106.0",
61
+ "version": "2.107.0",
62
62
  "type": "module"
63
63
  }
package/src/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './Payload'
2
+ // eslint-disable-next-line import/no-default-export
2
3
  export { ValuePayloadPlugin as default, ValuePayloadPlugin } from './Plugin'
3
4
  export * from './Schema'
4
5
  export * from './Template'