@xyo-network/sdk-js 2.111.3 → 3.0.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.
@@ -4,4 +4,3 @@ export * from '@xyo-network/modules';
4
4
  export * from '@xyo-network/protocol';
5
5
  export * from '@xyo-network/sdk-utils';
6
6
  export * from '@xyo-network/shared';
7
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@ export * from '@xyo-network/modules';
4
4
  export * from '@xyo-network/protocol';
5
5
  export * from '@xyo-network/sdk-utils';
6
6
  export * from '@xyo-network/shared';
7
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@ export * from '@xyo-network/modules';
4
4
  export * from '@xyo-network/protocol';
5
5
  export * from '@xyo-network/sdk-utils';
6
6
  export * from '@xyo-network/shared';
7
- //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -12,12 +12,12 @@
12
12
  "packages/**/*"
13
13
  ],
14
14
  "dependencies": {
15
- "@xyo-network/core-payload-plugins": "^2.111.3",
16
- "@xyo-network/manifest": "^2.111.3",
17
- "@xyo-network/modules": "^2.111.3",
18
- "@xyo-network/protocol": "^2.111.3",
19
- "@xyo-network/sdk-utils": "^2.111.3",
20
- "@xyo-network/shared": "^2.111.3"
15
+ "@xyo-network/core-payload-plugins": "^3.0.0",
16
+ "@xyo-network/manifest": "^3.0.0",
17
+ "@xyo-network/modules": "^3.0.0",
18
+ "@xyo-network/protocol": "^3.0.0",
19
+ "@xyo-network/sdk-utils": "^3.0.0",
20
+ "@xyo-network/shared": "^3.0.0"
21
21
  },
22
22
  "description": "Primary SDK for using XYO Protocol 2.0",
23
23
  "devDependencies": {
@@ -27,22 +27,16 @@
27
27
  "@types/supertest": "^6.0.2",
28
28
  "@typescript-eslint/eslint-plugin": "^8.0.1",
29
29
  "@typescript-eslint/parser": "^8.0.1",
30
- "@xylabs/eslint-config": "^3.15.14",
31
- "@xylabs/eslint-config-flat": "^3.15.14",
30
+ "@xylabs/eslint-config-flat": "next",
32
31
  "@xylabs/forget": "^3.6.12",
33
- "@xylabs/ts-scripts-yarn3": "^3.15.14",
34
- "@xylabs/tsconfig": "^3.15.14",
35
- "@xylabs/tsconfig-dom-jest": "^3.15.14",
36
- "@xylabs/tsconfig-jest": "^3.15.14",
32
+ "@xylabs/ts-scripts-yarn3": "next",
33
+ "@xylabs/tsconfig": "next",
34
+ "@xylabs/tsconfig-dom-jest": "next",
35
+ "@xylabs/tsconfig-jest": "next",
37
36
  "babel-jest": "^29.7.0",
38
37
  "dotenv": "^16.4.5",
39
38
  "eslint": "^9.8.0",
40
39
  "eslint-import-resolver-typescript": "^3.6.1",
41
- "eslint-plugin-import": "^2.29.1",
42
- "eslint-plugin-prettier": "^5.2.1",
43
- "eslint-plugin-simple-import-sort": "^12.1.1",
44
- "eslint-plugin-sonarjs": "^1.0.4",
45
- "eslint-plugin-workspaces": "^0.10.1",
46
40
  "jest": "^29.7.0",
47
41
  "jest-docblock": "^29.7.0",
48
42
  "jest-environment-jsdom": "^29.7.0",
@@ -50,8 +44,9 @@
50
44
  "jest-runner": "^29.7.0",
51
45
  "jest-runner-groups": "^2.2.0",
52
46
  "jest-sorted": "^1.0.15",
47
+ "jsdom": "^24.1.1",
53
48
  "lodash": "^4.17.21",
54
- "prettier": "^3.3.3",
49
+ "lodash-es": "^4.17.21",
55
50
  "reflect-metadata": "^0.2.2",
56
51
  "supertest": "^7.0.0",
57
52
  "ts-jest": "^29.2.4",
@@ -59,7 +54,8 @@
59
54
  "tslib": "^2.6.3",
60
55
  "typedoc": "^0.26.5",
61
56
  "typedoc-material-theme": "^1.1.0",
62
- "typescript": "^5.5.4"
57
+ "typescript": "^5.5.4",
58
+ "vitest": "^2.0.5"
63
59
  },
64
60
  "resolutions": {
65
61
  "axios": "^1",
@@ -71,32 +67,25 @@
71
67
  "exports": {
72
68
  ".": {
73
69
  "browser": {
74
- "require": {
75
- "types": "./dist/browser/index.d.cts",
76
- "default": "./dist/browser/index.cjs"
77
- },
78
70
  "import": {
79
- "types": "./dist/browser/index.d.mts",
71
+ "types": "./dist/browser/index.d.ts",
80
72
  "default": "./dist/browser/index.mjs"
81
73
  }
82
74
  },
83
75
  "node": {
84
- "require": {
85
- "types": "./dist/node/index.d.cts",
86
- "default": "./dist/node/index.cjs"
87
- },
88
76
  "import": {
89
- "types": "./dist/node/index.d.mts",
77
+ "types": "./dist/node/index.d.ts",
90
78
  "default": "./dist/node/index.mjs"
91
79
  }
92
- }
80
+ },
81
+ "types": "./dist/neutral/index.d.ts",
82
+ "default": "./dist/neutral/index.mjs"
93
83
  },
94
84
  "./package.json": "./package.json",
95
85
  "./README.md": "./README.md"
96
86
  },
97
- "main": "./dist/node/index.cjs",
98
- "module": "./dist/node/index.mjs",
99
- "types": "./dist/node/index.d.cts",
87
+ "module": "./dist/neutral/index.mjs",
88
+ "types": "./dist/neutral/index.d.ts",
100
89
  "homepage": "https://xyo.network",
101
90
  "license": "LGPL-3.0-only",
102
91
  "name": "@xyo-network/sdk-js",
@@ -114,8 +103,8 @@
114
103
  "deploy": "xy deploy",
115
104
  "lint-pkg": "npmPkgJsonLint .",
116
105
  "perf": "yarn jest -c jest.config.perf.cjs",
117
- "test-esm": "node $(yarn jest --no-cache --forceExit)",
118
- "test": "jest --no-cache --forceExit",
106
+ "test-esm": "FORCE_COLOR=1 && node $(yarn jest --no-cache --forceExit)",
107
+ "test": "vitest --watch false",
119
108
  "test:no-slow": "jest . --passWithNoTests --forceExit -- --group=-slow",
120
109
  "test:module": "jest . --passWithNoTests --forceExit -- --group=module",
121
110
  "test:sentinel": "jest . --passWithNoTests --forceExit -- --group=sentinel",
@@ -131,7 +120,7 @@
131
120
  "build-typedoc-site": "typedoc"
132
121
  },
133
122
  "sideEffects": false,
134
- "version": "2.111.3",
123
+ "version": "3.0.0",
135
124
  "packageManager": "yarn@4.4.0",
136
125
  "volta": {
137
126
  "node": "22.3.0",
@@ -0,0 +1,12 @@
1
+ import dotenv from 'dotenv'
2
+ // eslint-disable-next-line import/no-internal-modules
3
+ import { defineConfig } from 'vitest/config'
4
+
5
+ dotenv.config()
6
+
7
+ export default defineConfig({
8
+ test: {
9
+ globals: true,
10
+ setupFiles: ['./vitest.startup.ts'],
11
+ },
12
+ })
@@ -0,0 +1,8 @@
1
+ import * as matchers from 'jest-extended'
2
+ import { expect, vi } from 'vitest'
3
+
4
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
+ (globalThis as any).jest = vi // replace jest with vi
6
+
7
+ // Extend Vitest's expect with jest-extended matchers
8
+ expect.extend(matchers)
package/xy.config.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
+ const config: XyTsupConfig = {
3
+ compile: {
4
+ browser: { src: true },
5
+ neutral: {
6
+ src: true,
7
+ },
8
+ node: { src: true },
9
+ },
10
+ }
11
+
12
+ export default config
@@ -1,26 +0,0 @@
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 __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
-
17
- // src/index.ts
18
- var src_exports = {};
19
- module.exports = __toCommonJS(src_exports);
20
- __reExport(src_exports, require("@xyo-network/core-payload-plugins"), module.exports);
21
- __reExport(src_exports, require("@xyo-network/manifest"), module.exports);
22
- __reExport(src_exports, require("@xyo-network/modules"), module.exports);
23
- __reExport(src_exports, require("@xyo-network/protocol"), module.exports);
24
- __reExport(src_exports, require("@xyo-network/sdk-utils"), module.exports);
25
- __reExport(src_exports, require("@xyo-network/shared"), module.exports);
26
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/* eslint-disable no-restricted-imports */\nexport * from '@xyo-network/core-payload-plugins'\nexport * from '@xyo-network/manifest'\nexport * from '@xyo-network/modules'\nexport * from '@xyo-network/protocol'\nexport * from '@xyo-network/sdk-utils'\nexport * from '@xyo-network/shared'\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AACA,wBAAc,8CADd;AAEA,wBAAc,kCAFd;AAGA,wBAAc,iCAHd;AAIA,wBAAc,kCAJd;AAKA,wBAAc,mCALd;AAMA,wBAAc,gCANd;","names":[]}
@@ -1,7 +0,0 @@
1
- export * from '@xyo-network/core-payload-plugins';
2
- export * from '@xyo-network/manifest';
3
- export * from '@xyo-network/modules';
4
- export * from '@xyo-network/protocol';
5
- export * from '@xyo-network/sdk-utils';
6
- export * from '@xyo-network/shared';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mCAAmC,CAAA;AACjD,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA"}
@@ -1,7 +0,0 @@
1
- export * from '@xyo-network/core-payload-plugins';
2
- export * from '@xyo-network/manifest';
3
- export * from '@xyo-network/modules';
4
- export * from '@xyo-network/protocol';
5
- export * from '@xyo-network/sdk-utils';
6
- export * from '@xyo-network/shared';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mCAAmC,CAAA;AACjD,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mCAAmC,CAAA;AACjD,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA"}
@@ -1,26 +0,0 @@
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 __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
-
17
- // src/index.ts
18
- var src_exports = {};
19
- module.exports = __toCommonJS(src_exports);
20
- __reExport(src_exports, require("@xyo-network/core-payload-plugins"), module.exports);
21
- __reExport(src_exports, require("@xyo-network/manifest"), module.exports);
22
- __reExport(src_exports, require("@xyo-network/modules"), module.exports);
23
- __reExport(src_exports, require("@xyo-network/protocol"), module.exports);
24
- __reExport(src_exports, require("@xyo-network/sdk-utils"), module.exports);
25
- __reExport(src_exports, require("@xyo-network/shared"), module.exports);
26
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/* eslint-disable no-restricted-imports */\nexport * from '@xyo-network/core-payload-plugins'\nexport * from '@xyo-network/manifest'\nexport * from '@xyo-network/modules'\nexport * from '@xyo-network/protocol'\nexport * from '@xyo-network/sdk-utils'\nexport * from '@xyo-network/shared'\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AACA,wBAAc,8CADd;AAEA,wBAAc,kCAFd;AAGA,wBAAc,iCAHd;AAIA,wBAAc,kCAJd;AAKA,wBAAc,mCALd;AAMA,wBAAc,gCANd;","names":[]}
@@ -1,7 +0,0 @@
1
- export * from '@xyo-network/core-payload-plugins';
2
- export * from '@xyo-network/manifest';
3
- export * from '@xyo-network/modules';
4
- export * from '@xyo-network/protocol';
5
- export * from '@xyo-network/sdk-utils';
6
- export * from '@xyo-network/shared';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mCAAmC,CAAA;AACjD,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA"}
@@ -1,7 +0,0 @@
1
- export * from '@xyo-network/core-payload-plugins';
2
- export * from '@xyo-network/manifest';
3
- export * from '@xyo-network/modules';
4
- export * from '@xyo-network/protocol';
5
- export * from '@xyo-network/sdk-utils';
6
- export * from '@xyo-network/shared';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mCAAmC,CAAA;AACjD,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mCAAmC,CAAA;AACjD,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA"}
@@ -1,35 +0,0 @@
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 __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
-
17
- // src/index.ts
18
- var src_exports = {};
19
- module.exports = __toCommonJS(src_exports);
20
- __reExport(src_exports, require("@xyo-network/core-payload-plugins"), module.exports);
21
- __reExport(src_exports, require("@xyo-network/manifest"), module.exports);
22
- __reExport(src_exports, require("@xyo-network/modules"), module.exports);
23
- __reExport(src_exports, require("@xyo-network/protocol"), module.exports);
24
- __reExport(src_exports, require("@xyo-network/sdk-utils"), module.exports);
25
- __reExport(src_exports, require("@xyo-network/shared"), module.exports);
26
- // Annotate the CommonJS export names for ESM import in node:
27
- 0 && (module.exports = {
28
- ...require("@xyo-network/core-payload-plugins"),
29
- ...require("@xyo-network/manifest"),
30
- ...require("@xyo-network/modules"),
31
- ...require("@xyo-network/protocol"),
32
- ...require("@xyo-network/sdk-utils"),
33
- ...require("@xyo-network/shared")
34
- });
35
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/* eslint-disable no-restricted-imports */\nexport * from '@xyo-network/core-payload-plugins'\nexport * from '@xyo-network/manifest'\nexport * from '@xyo-network/modules'\nexport * from '@xyo-network/protocol'\nexport * from '@xyo-network/sdk-utils'\nexport * from '@xyo-network/shared'\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AACA,wBAAc,8CADd;AAEA,wBAAc,kCAFd;AAGA,wBAAc,iCAHd;AAIA,wBAAc,kCAJd;AAKA,wBAAc,mCALd;AAMA,wBAAc,gCANd;","names":[]}
@@ -1,7 +0,0 @@
1
- export * from '@xyo-network/core-payload-plugins';
2
- export * from '@xyo-network/manifest';
3
- export * from '@xyo-network/modules';
4
- export * from '@xyo-network/protocol';
5
- export * from '@xyo-network/sdk-utils';
6
- export * from '@xyo-network/shared';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mCAAmC,CAAA;AACjD,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA"}
@@ -1,7 +0,0 @@
1
- export * from '@xyo-network/core-payload-plugins';
2
- export * from '@xyo-network/manifest';
3
- export * from '@xyo-network/modules';
4
- export * from '@xyo-network/protocol';
5
- export * from '@xyo-network/sdk-utils';
6
- export * from '@xyo-network/shared';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mCAAmC,CAAA;AACjD,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mCAAmC,CAAA;AACjD,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA"}