@xyo-network/plugins 2.79.6 → 2.80.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.
- package/README.md +84 -3
- package/babel.config.json +6 -0
- package/dist/node/index.cjs +27 -0
- package/dist/node/{index.mjs.map → index.cjs.map} +1 -1
- package/dist/node/index.js +2 -25
- package/dist/node/index.js.map +1 -1
- package/jest.config.ts +29 -0
- package/package.json +56 -11
- package/scripts/clear-scrollback-buffer.sh +3 -0
- package/typedoc.site.json +10 -0
- package/dist/node/index.mjs +0 -4
- package/typedoc.json +0 -5
package/README.md
CHANGED
|
@@ -1,13 +1,94 @@
|
|
|
1
1
|
[![logo][]](https://xyo.network)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# sdk-xyo-client-js
|
|
4
|
+
|
|
5
|
+
[![main-build][]][main-build-link]
|
|
6
|
+
[![npm-badge][]][npm-link]
|
|
7
|
+
[![codacy-badge][]][codacy-link]
|
|
8
|
+
[![codeclimate-badge][]][codeclimate-link]
|
|
9
|
+
[![snyk-badge][]][snyk-link]
|
|
10
|
+
[![license-badge][]][license-link]
|
|
11
|
+
|
|
12
|
+
> The XYO Foundation provides this source code in our efforts to
|
|
13
|
+
> advance the understanding of the XYO Protocol and its possible uses.
|
|
14
|
+
> We continue to maintain this software in the interest of developer education.
|
|
15
|
+
|
|
16
|
+
## Table of Contents
|
|
17
|
+
- [Title](#sdk-xyo-client-js)
|
|
18
|
+
- [Table of Contents](#table-of-contents)
|
|
19
|
+
- [Description](#description)
|
|
20
|
+
- [Install](#install)
|
|
21
|
+
- [Maintainers](#maintainers)
|
|
22
|
+
- [License](#license)
|
|
23
|
+
- [Credits](#credits)
|
|
24
|
+
|
|
25
|
+
## Description
|
|
26
|
+
|
|
27
|
+
> Primary SDK for using the XYO Protocol 2.0 from TypeScript/JavaScript.
|
|
28
|
+
> Designed to work in both browser based and Node JS based solutions.
|
|
29
|
+
|
|
30
|
+
## Use the sdk in another project
|
|
31
|
+
|
|
32
|
+
Using npm:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npm i --save @xyo-network/sdk-xyo-client-js
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Using yarn:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
yarn add @xyo-network/sdk-xyo-client-js
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Building the sdk locally
|
|
45
|
+
|
|
46
|
+
First clone the repo to your local computer. Once you have done that, from
|
|
47
|
+
inside the folder where it was cloned, these are some commands you can do.
|
|
48
|
+
|
|
49
|
+
See list of XY scripts.
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
yarn xy help
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Compile the mono repo
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
yarn xy compile
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Maintainers
|
|
62
|
+
|
|
63
|
+
- [Arie Trouw](https://github.com/arietrouw) [(arietrouw.com)](https://arietrouw.com)
|
|
64
|
+
- [Matt Jones](https://github.com/jonesmac)
|
|
65
|
+
- [Joel Carter](https://github.com/JoelBCarter)
|
|
4
66
|
|
|
5
67
|
## License
|
|
6
68
|
|
|
7
|
-
> See the [LICENSE](LICENSE)
|
|
69
|
+
> See the [LICENSE](https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/LICENSE)
|
|
70
|
+
> file for license details
|
|
8
71
|
|
|
9
72
|
## Credits
|
|
10
73
|
|
|
11
74
|
[Made with 🔥 and ❄️ by XYO](https://xyo.network)
|
|
12
75
|
|
|
13
|
-
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
76
|
+
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
77
|
+
|
|
78
|
+
[main-build]: https://github.com/XYOracleNetwork/sdk-xyo-client-js/actions/workflows/build.yml/badge.svg
|
|
79
|
+
[main-build-link]: https://github.com/XYOracleNetwork/sdk-xyo-client-js/actions/workflows/build.yml
|
|
80
|
+
|
|
81
|
+
[npm-badge]: https://img.shields.io/npm/v/@xyo-network/sdk-xyo-client-js.svg
|
|
82
|
+
[npm-link]: https://www.npmjs.com/package/@xyo-network/sdk-xyo-client-js
|
|
83
|
+
|
|
84
|
+
[codacy-badge]: https://app.codacy.com/project/badge/Grade/ba1f344ae34e4bfe999331cf4e27b9f5
|
|
85
|
+
[codacy-link]: https://www.codacy.com/gh/XYOracleNetwork/sdk-xyo-client-js/dashboard?utm_source=github.com&utm_medium=referral&utm_content=XYOracleNetwork/sdk-xyo-client-js&utm_campaign=Badge_Grade
|
|
86
|
+
|
|
87
|
+
[codeclimate-badge]: https://api.codeclimate.com/v1/badges/0e76349c9541f3866948/maintainability
|
|
88
|
+
[codeclimate-link]: https://codeclimate.com/github/XYOracleNetwork/sdk-xyo-client-js/maintainability
|
|
89
|
+
|
|
90
|
+
[snyk-badge]: https://snyk.io/test/github/XYOracleNetwork/sdk-xyo-client-js/badge.svg?targetFile=package.json
|
|
91
|
+
[snyk-link]: https://snyk.io/test/github/XYOracleNetwork/sdk-xyo-client-js?targetFile=package.json
|
|
92
|
+
|
|
93
|
+
[license-badge]: https://img.shields.io/github/license/XYOracleNetwork/sdk-xyo-client-js
|
|
94
|
+
[license-link]: https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/main/LICENSE
|
|
@@ -0,0 +1,27 @@
|
|
|
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/payload-plugins"), module.exports);
|
|
21
|
+
__reExport(src_exports, require("@xyo-network/payloadset-plugins"), module.exports);
|
|
22
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
23
|
+
0 && (module.exports = {
|
|
24
|
+
...require("@xyo-network/payload-plugins"),
|
|
25
|
+
...require("@xyo-network/payloadset-plugins")
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@xyo-network/payload-plugins'\nexport * from '@xyo-network/payloadset-plugins'\n"],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@xyo-network/payload-plugins'\nexport * from '@xyo-network/payloadset-plugins'\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,yCAAd;AACA,wBAAc,4CADd;","names":[]}
|
package/dist/node/index.js
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
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
1
|
// src/index.ts
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
__reExport(src_exports, require("@xyo-network/payload-plugins"), module.exports);
|
|
21
|
-
__reExport(src_exports, require("@xyo-network/payloadset-plugins"), module.exports);
|
|
22
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
23
|
-
0 && (module.exports = {
|
|
24
|
-
...require("@xyo-network/payload-plugins"),
|
|
25
|
-
...require("@xyo-network/payloadset-plugins")
|
|
26
|
-
});
|
|
2
|
+
export * from "@xyo-network/payload-plugins";
|
|
3
|
+
export * from "@xyo-network/payloadset-plugins";
|
|
27
4
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@xyo-network/payload-plugins'\nexport * from '@xyo-network/payloadset-plugins'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@xyo-network/payload-plugins'\nexport * from '@xyo-network/payloadset-plugins'\n"],"mappings":";AAAA,cAAc;AACd,cAAc;","names":[]}
|
package/jest.config.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const generateJestConfig = ({ esModules }: { esModules: string[] }) => {
|
|
2
|
+
const esModulesList = Array.isArray(esModules) ? esModules.join('|') : esModules
|
|
3
|
+
return {
|
|
4
|
+
coveragePathIgnorePatterns: ['<rootDir>/(.*)/dist'],
|
|
5
|
+
moduleNameMapper: {
|
|
6
|
+
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
7
|
+
},
|
|
8
|
+
preset: 'ts-jest/presets/default-esm',
|
|
9
|
+
setupFiles: ['dotenv/config'],
|
|
10
|
+
setupFilesAfterEnv: ['jest-sorted', 'jest-extended/all'],
|
|
11
|
+
testRegex: '(/__tests__/.*|(\\.|/)((!perf\\.)test|spec))\\.tsx?$',
|
|
12
|
+
testTimeout: 200000,
|
|
13
|
+
transform: {
|
|
14
|
+
[`(${esModulesList}).+\\.js$`]: 'babel-jest',
|
|
15
|
+
'^.+\\.tsx?$': [
|
|
16
|
+
'ts-jest',
|
|
17
|
+
{
|
|
18
|
+
tsconfig: 'tsconfig.test.json',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
transformIgnorePatterns: [`./node_modules/(?!${esModulesList})`],
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const config = generateJestConfig({ esModules: ['is-ip', 'ip-regex', 'lodash-es', 'uuid', 'lodash-es'] })
|
|
27
|
+
|
|
28
|
+
// eslint-disable-next-line import/no-default-export
|
|
29
|
+
export default config
|
package/package.json
CHANGED
|
@@ -9,17 +9,46 @@
|
|
|
9
9
|
"email": "support@xyo.network",
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
|
+
"workspaces": [
|
|
13
|
+
"packages/**/*"
|
|
14
|
+
],
|
|
12
15
|
"dependencies": {
|
|
13
|
-
"@xyo-network/payload-plugins": "~2.
|
|
14
|
-
"@xyo-network/payloadset-plugins": "~2.
|
|
16
|
+
"@xyo-network/payload-plugins": "~2.80.0",
|
|
17
|
+
"@xyo-network/payloadset-plugins": "~2.80.0"
|
|
15
18
|
},
|
|
16
19
|
"devDependencies": {
|
|
20
|
+
"@babel/core": "^7.23.3",
|
|
21
|
+
"@babel/preset-env": "^7.23.3",
|
|
22
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
23
|
+
"@types/jest": "^29.5.8",
|
|
24
|
+
"@types/supertest": "^2.0.16",
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
|
26
|
+
"@typescript-eslint/parser": "^6.11.0",
|
|
27
|
+
"@xylabs/eslint-config": "^3.1.21",
|
|
17
28
|
"@xylabs/ts-scripts-yarn3": "^3.1.21",
|
|
18
29
|
"@xylabs/tsconfig": "^3.1.21",
|
|
30
|
+
"@xylabs/tsconfig-dom-jest": "^3.1.21",
|
|
31
|
+
"babel-jest": "^29.7.0",
|
|
32
|
+
"dotenv": "^16.3.1",
|
|
33
|
+
"eslint": "^8.53.0",
|
|
34
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
35
|
+
"eslint-plugin-deprecation": "^2.0.0",
|
|
36
|
+
"eslint-plugin-import": "^2.29.0",
|
|
37
|
+
"jest": "^29.7.0",
|
|
38
|
+
"jest-docblock": "^29.7.0",
|
|
39
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
40
|
+
"jest-extended": "^4.0.2",
|
|
41
|
+
"jest-runner": "^29.7.0",
|
|
42
|
+
"jest-runner-groups": "^2.2.0",
|
|
43
|
+
"jest-sorted": "^1.0.14",
|
|
44
|
+
"nodemon": "^3.0.1",
|
|
45
|
+
"reflect-metadata": "^0.1.13",
|
|
46
|
+
"supertest": "^6.3.3",
|
|
47
|
+
"ts-jest": "^29.1.1",
|
|
48
|
+
"ts-node": "^10.9.1",
|
|
19
49
|
"typescript": "^5.2.2"
|
|
20
50
|
},
|
|
21
51
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
22
|
-
"docs": "dist/docs.json",
|
|
23
52
|
"exports": {
|
|
24
53
|
".": {
|
|
25
54
|
"browser": {
|
|
@@ -34,19 +63,20 @@
|
|
|
34
63
|
},
|
|
35
64
|
"node": {
|
|
36
65
|
"require": {
|
|
37
|
-
"types": "./dist/node/index.d.
|
|
38
|
-
"default": "./dist/node/index.
|
|
66
|
+
"types": "./dist/node/index.d.cts",
|
|
67
|
+
"default": "./dist/node/index.cjs"
|
|
39
68
|
},
|
|
40
69
|
"import": {
|
|
41
70
|
"types": "./dist/node/index.d.mts",
|
|
42
|
-
"default": "./dist/node/index.
|
|
71
|
+
"default": "./dist/node/index.js"
|
|
43
72
|
}
|
|
44
73
|
}
|
|
45
74
|
},
|
|
46
75
|
"./package.json": "./package.json"
|
|
47
76
|
},
|
|
48
|
-
"main": "dist/node/index.
|
|
49
|
-
"module": "dist/node/index.
|
|
77
|
+
"main": "dist/node/index.cjs",
|
|
78
|
+
"module": "dist/node/index.js",
|
|
79
|
+
"types": "dist/node/index.d.ts",
|
|
50
80
|
"homepage": "https://xyo.network",
|
|
51
81
|
"license": "LGPL-3.0-only",
|
|
52
82
|
"publishConfig": {
|
|
@@ -54,9 +84,24 @@
|
|
|
54
84
|
},
|
|
55
85
|
"repository": {
|
|
56
86
|
"type": "git",
|
|
57
|
-
"url": "https://github.com/XYOracleNetwork/
|
|
87
|
+
"url": "https://github.com/XYOracleNetwork/plugins.git"
|
|
88
|
+
},
|
|
89
|
+
"scripts": {
|
|
90
|
+
"coverage": "yarn jest --coverage --forceExit",
|
|
91
|
+
"compile": "./scripts/clear-scrollback-buffer.sh && yarn xy compile",
|
|
92
|
+
"build": "xy build && xy statics",
|
|
93
|
+
"deploy": "xy deploy",
|
|
94
|
+
"lint-pkg": "npmPkgJsonLint .",
|
|
95
|
+
"test-esm": "node $(yarn jest --no-cache --forceExit)",
|
|
96
|
+
"test": "jest --no-cache --forceExit",
|
|
97
|
+
"build-typedoc-site": "xy gen-docs @xyo-network/plugins"
|
|
58
98
|
},
|
|
59
99
|
"sideEffects": false,
|
|
60
|
-
"
|
|
61
|
-
"
|
|
100
|
+
"version": "2.80.0",
|
|
101
|
+
"packageManager": "yarn@3.6.3",
|
|
102
|
+
"volta": {
|
|
103
|
+
"node": "18.17.1",
|
|
104
|
+
"yarn": "1.22.19"
|
|
105
|
+
},
|
|
106
|
+
"type": "module"
|
|
62
107
|
}
|
package/dist/node/index.mjs
DELETED