@xyo-network/value-payload-plugin 2.87.0-rc.7 → 2.87.1

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,62 @@
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
+ valuePayloadTemplate: () => valuePayloadTemplate
29
+ });
30
+ module.exports = __toCommonJS(src_exports);
31
+
32
+ // src/Payload.ts
33
+ var import_payload_model = require("@xyo-network/payload-model");
34
+
35
+ // src/Schema.ts
36
+ var ValueSchema = "network.xyo.value";
37
+
38
+ // src/Payload.ts
39
+ var isValuePayload = (0, import_payload_model.isPayloadOfSchemaType)(ValueSchema);
40
+
41
+ // src/Plugin.ts
42
+ var import_payload_plugin = require("@xyo-network/payload-plugin");
43
+
44
+ // src/Template.ts
45
+ var valuePayloadTemplate = /* @__PURE__ */ __name(() => ({
46
+ schema: ValueSchema,
47
+ value: null
48
+ }), "valuePayloadTemplate");
49
+
50
+ // src/Plugin.ts
51
+ var ValuePayloadPlugin = /* @__PURE__ */ __name(() => (0, import_payload_plugin.createPayloadPlugin)({
52
+ schema: ValueSchema,
53
+ template: valuePayloadTemplate
54
+ }), "ValuePayloadPlugin");
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ ValuePayloadPlugin,
58
+ ValueSchema,
59
+ isValuePayload,
60
+ valuePayloadTemplate
61
+ });
62
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +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 { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\n// TODO: Move to core or xylabs\nexport type JsonValue = string | number | boolean | null | JsonObject | JsonArray\nexport type JsonObject = { [key: string]: JsonValue }\nexport type JsonArray = JsonValue[]\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 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;;;;;;;;;;;ACAA,2BAA+C;;;ACCxC,IAAMA,cAA2B;;;ADajC,IAAMC,qBAAiBC,4CAA6BC,WAAAA;;;AEd3D,4BAAoC;;;ACG7B,IAAMC,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","valuePayloadTemplate","schema","ValueSchema","value","ValuePayloadPlugin","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}
@@ -1,45 +1,17 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
2
  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
- valuePayloadTemplate: () => valuePayloadTemplate
29
- });
30
- module.exports = __toCommonJS(src_exports);
31
3
 
32
4
  // src/Payload.ts
33
- var import_payload_model = require("@xyo-network/payload-model");
5
+ import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
34
6
 
35
7
  // src/Schema.ts
36
8
  var ValueSchema = "network.xyo.value";
37
9
 
38
10
  // src/Payload.ts
39
- var isValuePayload = (0, import_payload_model.isPayloadOfSchemaType)(ValueSchema);
11
+ var isValuePayload = isPayloadOfSchemaType(ValueSchema);
40
12
 
41
13
  // src/Plugin.ts
42
- var import_payload_plugin = require("@xyo-network/payload-plugin");
14
+ import { createPayloadPlugin } from "@xyo-network/payload-plugin";
43
15
 
44
16
  // src/Template.ts
45
17
  var valuePayloadTemplate = /* @__PURE__ */ __name(() => ({
@@ -48,15 +20,15 @@ var valuePayloadTemplate = /* @__PURE__ */ __name(() => ({
48
20
  }), "valuePayloadTemplate");
49
21
 
50
22
  // src/Plugin.ts
51
- var ValuePayloadPlugin = /* @__PURE__ */ __name(() => (0, import_payload_plugin.createPayloadPlugin)({
23
+ var ValuePayloadPlugin = /* @__PURE__ */ __name(() => createPayloadPlugin({
52
24
  schema: ValueSchema,
53
25
  template: valuePayloadTemplate
54
26
  }), "ValuePayloadPlugin");
55
- // Annotate the CommonJS export names for ESM import in node:
56
- 0 && (module.exports = {
27
+ export {
57
28
  ValuePayloadPlugin,
58
29
  ValueSchema,
30
+ ValuePayloadPlugin as default,
59
31
  isValuePayload,
60
32
  valuePayloadTemplate
61
- });
33
+ };
62
34
  //# sourceMappingURL=index.js.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 { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\n// TODO: Move to core or xylabs\nexport type JsonValue = string | number | boolean | null | JsonObject | JsonArray\nexport type JsonObject = { [key: string]: JsonValue }\nexport type JsonArray = JsonValue[]\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 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;;;;;;;;;;;ACAA,2BAA+C;;;ACCxC,IAAMA,cAA2B;;;ADajC,IAAMC,qBAAiBC,4CAA6BC,WAAAA;;;AEd3D,4BAAoC;;;ACG7B,IAAMC,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","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 { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\n// TODO: Move to core or xylabs\nexport type JsonValue = string | number | boolean | null | JsonObject | JsonArray\nexport type JsonObject = { [key: string]: JsonValue }\nexport type JsonArray = JsonValue[]\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 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,SAASA,6BAAsC;;;ACCxC,IAAMC,cAA2B;;;ADajC,IAAMC,iBAAiBC,sBAA6BC,WAAAA;;;AEd3D,SAASC,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","ValueSchema","isValuePayload","isPayloadOfSchemaType","ValueSchema","createPayloadPlugin","valuePayloadTemplate","schema","ValueSchema","value","ValuePayloadPlugin","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}
package/package.json CHANGED
@@ -10,16 +10,15 @@
10
10
  "url": "https://github.com/XYOracleNetwork/plugins/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xyo-network/payload-model": "~2.87.0-rc.7",
14
- "@xyo-network/payload-plugin": "~2.87.0-rc.7"
13
+ "@xyo-network/payload-model": "~2.87.1",
14
+ "@xyo-network/payload-plugin": "~2.87.1"
15
15
  },
16
16
  "devDependencies": {
17
- "@xylabs/ts-scripts-yarn3": "^3.2.33",
18
- "@xylabs/tsconfig": "^3.2.33",
17
+ "@xylabs/ts-scripts-yarn3": "^3.2.41",
18
+ "@xylabs/tsconfig": "^3.2.41",
19
19
  "typescript": "^5.3.3"
20
20
  },
21
21
  "description": "Typescript/Javascript Plugins for XYO Platform",
22
- "docs": "dist/docs.json",
23
22
  "exports": {
24
23
  ".": {
25
24
  "browser": {
@@ -34,19 +33,20 @@
34
33
  },
35
34
  "node": {
36
35
  "require": {
37
- "types": "./dist/node/index.d.ts",
38
- "default": "./dist/node/index.js"
36
+ "types": "./dist/node/index.d.cts",
37
+ "default": "./dist/node/index.cjs"
39
38
  },
40
39
  "import": {
41
40
  "types": "./dist/node/index.d.mts",
42
- "default": "./dist/node/index.mjs"
41
+ "default": "./dist/node/index.js"
43
42
  }
44
43
  }
45
44
  },
46
45
  "./package.json": "./package.json"
47
46
  },
48
- "main": "dist/node/index.js",
49
- "module": "dist/node/index.mjs",
47
+ "main": "dist/node/index.cjs",
48
+ "module": "dist/node/index.js",
49
+ "types": "dist/node/index.d.ts",
50
50
  "homepage": "https://xyo.network",
51
51
  "license": "LGPL-3.0-only",
52
52
  "publishConfig": {
@@ -57,7 +57,6 @@
57
57
  "url": "https://github.com/XYOracleNetwork/plugins.git"
58
58
  },
59
59
  "sideEffects": false,
60
- "types": "dist/node/index.d.ts",
61
- "version": "2.87.0-rc.7",
62
- "stableVersion": "2.86.1"
60
+ "version": "2.87.1",
61
+ "type": "module"
63
62
  }
@@ -1,34 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/Payload.ts
5
- import { isPayloadOfSchemaType } 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
-
13
- // src/Plugin.ts
14
- import { createPayloadPlugin } from "@xyo-network/payload-plugin";
15
-
16
- // src/Template.ts
17
- var valuePayloadTemplate = /* @__PURE__ */ __name(() => ({
18
- schema: ValueSchema,
19
- value: null
20
- }), "valuePayloadTemplate");
21
-
22
- // src/Plugin.ts
23
- var ValuePayloadPlugin = /* @__PURE__ */ __name(() => createPayloadPlugin({
24
- schema: ValueSchema,
25
- template: valuePayloadTemplate
26
- }), "ValuePayloadPlugin");
27
- export {
28
- ValuePayloadPlugin,
29
- ValueSchema,
30
- ValuePayloadPlugin as default,
31
- isValuePayload,
32
- valuePayloadTemplate
33
- };
34
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nimport { ValueSchema } from './Schema'\n\n// TODO: Move to core or xylabs\nexport type JsonValue = string | number | boolean | null | JsonObject | JsonArray\nexport type JsonObject = { [key: string]: JsonValue }\nexport type JsonArray = JsonValue[]\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 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,SAASA,6BAAsC;;;ACCxC,IAAMC,cAA2B;;;ADajC,IAAMC,iBAAiBC,sBAA6BC,WAAAA;;;AEd3D,SAASC,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","ValueSchema","isValuePayload","isPayloadOfSchemaType","ValueSchema","createPayloadPlugin","valuePayloadTemplate","schema","ValueSchema","value","ValuePayloadPlugin","createPayloadPlugin","schema","ValueSchema","template","valuePayloadTemplate"]}