@xyo-network/sdk-js 2.111.3 → 3.0.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.
@@ -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/eslint.config.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // eslint.config.mjs
2
2
 
3
- import { config as xylabsConfig, rulesConfig } from '@xylabs/eslint-config-flat'
3
+ import { config as xylabsConfig, rulesConfig, importConfig } from '@xylabs/eslint-config-flat'
4
4
 
5
5
  export default [
6
6
  {
@@ -33,4 +33,11 @@ export default [
33
33
  ],
34
34
  },
35
35
  },
36
+ {
37
+ ...importConfig,
38
+ rules: {
39
+ ...importConfig.rules,
40
+ 'import-x/no-cycle': ['warn', { maxDepth: 5 }]
41
+ }
42
+ }
36
43
  ]
package/package.json CHANGED
@@ -12,37 +12,31 @@
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.1",
16
+ "@xyo-network/manifest": "^3.0.1",
17
+ "@xyo-network/modules": "^3.0.1",
18
+ "@xyo-network/protocol": "^3.0.1",
19
+ "@xyo-network/sdk-utils": "^3.0.1",
20
+ "@xyo-network/shared": "^3.0.1"
21
21
  },
22
22
  "description": "Primary SDK for using XYO Protocol 2.0",
23
23
  "devDependencies": {
24
24
  "@babel/core": "^7.25.2",
25
- "@stylistic/eslint-plugin": "^2.6.1",
25
+ "@stylistic/eslint-plugin": "^2.6.2",
26
26
  "@types/jest": "^29.5.12",
27
27
  "@types/supertest": "^6.0.2",
28
- "@typescript-eslint/eslint-plugin": "^8.0.1",
29
- "@typescript-eslint/parser": "^8.0.1",
30
- "@xylabs/eslint-config": "^3.15.14",
31
- "@xylabs/eslint-config-flat": "^3.15.14",
32
- "@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",
28
+ "@typescript-eslint/eslint-plugin": "^8.1.0",
29
+ "@typescript-eslint/parser": "^8.1.0",
30
+ "@xylabs/eslint-config-flat": "^4.0.0-rc.15",
31
+ "@xylabs/forget": "^4.0.0",
32
+ "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.15",
33
+ "@xylabs/tsconfig": "^4.0.0-rc.15",
34
+ "@xylabs/tsconfig-dom-jest": "^4.0.0-rc.15",
35
+ "@xylabs/tsconfig-jest": "^4.0.0-rc.15",
37
36
  "babel-jest": "^29.7.0",
38
37
  "dotenv": "^16.4.5",
39
- "eslint": "^9.8.0",
38
+ "eslint": "^9.9.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,7 @@
50
44
  "jest-runner": "^29.7.0",
51
45
  "jest-runner-groups": "^2.2.0",
52
46
  "jest-sorted": "^1.0.15",
53
- "lodash": "^4.17.21",
54
- "prettier": "^3.3.3",
47
+ "jsdom": "^24.1.1",
55
48
  "reflect-metadata": "^0.2.2",
56
49
  "supertest": "^7.0.0",
57
50
  "ts-jest": "^29.2.4",
@@ -59,7 +52,8 @@
59
52
  "tslib": "^2.6.3",
60
53
  "typedoc": "^0.26.5",
61
54
  "typedoc-material-theme": "^1.1.0",
62
- "typescript": "^5.5.4"
55
+ "typescript": "^5.5.4",
56
+ "vitest": "^2.0.5"
63
57
  },
64
58
  "resolutions": {
65
59
  "axios": "^1",
@@ -71,32 +65,25 @@
71
65
  "exports": {
72
66
  ".": {
73
67
  "browser": {
74
- "require": {
75
- "types": "./dist/browser/index.d.cts",
76
- "default": "./dist/browser/index.cjs"
77
- },
78
68
  "import": {
79
- "types": "./dist/browser/index.d.mts",
69
+ "types": "./dist/browser/index.d.ts",
80
70
  "default": "./dist/browser/index.mjs"
81
71
  }
82
72
  },
83
73
  "node": {
84
- "require": {
85
- "types": "./dist/node/index.d.cts",
86
- "default": "./dist/node/index.cjs"
87
- },
88
74
  "import": {
89
- "types": "./dist/node/index.d.mts",
75
+ "types": "./dist/node/index.d.ts",
90
76
  "default": "./dist/node/index.mjs"
91
77
  }
92
- }
78
+ },
79
+ "types": "./dist/neutral/index.d.ts",
80
+ "default": "./dist/neutral/index.mjs"
93
81
  },
94
82
  "./package.json": "./package.json",
95
83
  "./README.md": "./README.md"
96
84
  },
97
- "main": "./dist/node/index.cjs",
98
- "module": "./dist/node/index.mjs",
99
- "types": "./dist/node/index.d.cts",
85
+ "module": "./dist/neutral/index.mjs",
86
+ "types": "./dist/neutral/index.d.ts",
100
87
  "homepage": "https://xyo.network",
101
88
  "license": "LGPL-3.0-only",
102
89
  "name": "@xyo-network/sdk-js",
@@ -114,8 +101,8 @@
114
101
  "deploy": "xy deploy",
115
102
  "lint-pkg": "npmPkgJsonLint .",
116
103
  "perf": "yarn jest -c jest.config.perf.cjs",
117
- "test-esm": "node $(yarn jest --no-cache --forceExit)",
118
- "test": "jest --no-cache --forceExit",
104
+ "test-esm": "FORCE_COLOR=1 && node $(yarn jest --no-cache --forceExit)",
105
+ "test": "vitest --watch false",
119
106
  "test:no-slow": "jest . --passWithNoTests --forceExit -- --group=-slow",
120
107
  "test:module": "jest . --passWithNoTests --forceExit -- --group=module",
121
108
  "test:sentinel": "jest . --passWithNoTests --forceExit -- --group=sentinel",
@@ -131,7 +118,7 @@
131
118
  "build-typedoc-site": "typedoc"
132
119
  },
133
120
  "sideEffects": false,
134
- "version": "2.111.3",
121
+ "version": "3.0.1",
135
122
  "packageManager": "yarn@4.4.0",
136
123
  "volta": {
137
124
  "node": "22.3.0",
@@ -0,0 +1,12 @@
1
+ import dotenv from 'dotenv'
2
+ // eslint-disable-next-line import-x/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"}