@xylabs/sdk-js 4.13.19 → 4.13.21
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 +6344 -3
- package/package.json +33 -26
- package/BUILD_STATUS.md +0 -12
- package/eslint.config.mjs +0 -54
- package/knip.config.ts +0 -42
- package/scripts/README.template.md +0 -60
- package/scripts/readme-gen.mjs +0 -36
- package/typedoc.json +0 -5
- package/vitest.config.ts +0 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/sdk-js",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.21",
|
|
4
4
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xylabs",
|
|
@@ -28,12 +28,18 @@
|
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
30
|
"types": "./dist/neutral/index.d.ts",
|
|
31
|
+
"source": "./src/index.ts",
|
|
31
32
|
"default": "./dist/neutral/index.mjs"
|
|
32
33
|
},
|
|
33
34
|
"./package.json": "./package.json"
|
|
34
35
|
},
|
|
35
36
|
"module": "./dist/neutral/index.mjs",
|
|
37
|
+
"source": "./src/index.ts",
|
|
36
38
|
"types": "./dist/neutral/index.d.ts",
|
|
39
|
+
"files": [
|
|
40
|
+
"dist",
|
|
41
|
+
"src"
|
|
42
|
+
],
|
|
37
43
|
"workspaces": [
|
|
38
44
|
"packages/**/*"
|
|
39
45
|
],
|
|
@@ -47,37 +53,37 @@
|
|
|
47
53
|
"uuid": "^11"
|
|
48
54
|
},
|
|
49
55
|
"dependencies": {
|
|
50
|
-
"@xylabs/api": "^4.13.
|
|
51
|
-
"@xylabs/array": "^4.13.
|
|
52
|
-
"@xylabs/assert": "^4.13.
|
|
53
|
-
"@xylabs/axios": "^4.13.
|
|
54
|
-
"@xylabs/decimal-precision": "^4.13.
|
|
55
|
-
"@xylabs/delay": "^4.13.
|
|
56
|
-
"@xylabs/error": "^4.13.
|
|
57
|
-
"@xylabs/eth-address": "^4.13.
|
|
58
|
-
"@xylabs/exists": "^4.13.
|
|
59
|
-
"@xylabs/forget": "^4.13.
|
|
60
|
-
"@xylabs/function-name": "^4.13.
|
|
61
|
-
"@xylabs/hex": "^4.13.
|
|
62
|
-
"@xylabs/log": "^4.13.
|
|
63
|
-
"@xylabs/logger": "^4.13.
|
|
64
|
-
"@xylabs/object": "^4.13.
|
|
65
|
-
"@xylabs/profile": "^4.13.
|
|
66
|
-
"@xylabs/promise": "^4.13.
|
|
67
|
-
"@xylabs/retry": "^4.13.
|
|
68
|
-
"@xylabs/set": "^4.13.
|
|
69
|
-
"@xylabs/static-implements": "^4.13.
|
|
70
|
-
"@xylabs/timer": "^4.13.
|
|
56
|
+
"@xylabs/api": "^4.13.21",
|
|
57
|
+
"@xylabs/array": "^4.13.21",
|
|
58
|
+
"@xylabs/assert": "^4.13.21",
|
|
59
|
+
"@xylabs/axios": "^4.13.21",
|
|
60
|
+
"@xylabs/decimal-precision": "^4.13.21",
|
|
61
|
+
"@xylabs/delay": "^4.13.21",
|
|
62
|
+
"@xylabs/error": "^4.13.21",
|
|
63
|
+
"@xylabs/eth-address": "^4.13.21",
|
|
64
|
+
"@xylabs/exists": "^4.13.21",
|
|
65
|
+
"@xylabs/forget": "^4.13.21",
|
|
66
|
+
"@xylabs/function-name": "^4.13.21",
|
|
67
|
+
"@xylabs/hex": "^4.13.21",
|
|
68
|
+
"@xylabs/log": "^4.13.21",
|
|
69
|
+
"@xylabs/logger": "^4.13.21",
|
|
70
|
+
"@xylabs/object": "^4.13.21",
|
|
71
|
+
"@xylabs/profile": "^4.13.21",
|
|
72
|
+
"@xylabs/promise": "^4.13.21",
|
|
73
|
+
"@xylabs/retry": "^4.13.21",
|
|
74
|
+
"@xylabs/set": "^4.13.21",
|
|
75
|
+
"@xylabs/static-implements": "^4.13.21",
|
|
76
|
+
"@xylabs/timer": "^4.13.21"
|
|
71
77
|
},
|
|
72
78
|
"devDependencies": {
|
|
73
79
|
"@types/node": "^24.0.14",
|
|
74
80
|
"@typescript-eslint/eslint-plugin": "^8.37.0",
|
|
75
81
|
"@typescript-eslint/parser": "^8.37.0",
|
|
76
82
|
"@typescript-eslint/types": "^8.37.0",
|
|
77
|
-
"@xylabs/eslint-config-flat": "^7.0.0
|
|
78
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.0
|
|
79
|
-
"@xylabs/tsconfig": "^7.0.0
|
|
80
|
-
"@xylabs/tsconfig-dom": "^7.0.0
|
|
83
|
+
"@xylabs/eslint-config-flat": "^7.0.0",
|
|
84
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0",
|
|
85
|
+
"@xylabs/tsconfig": "^7.0.0",
|
|
86
|
+
"@xylabs/tsconfig-dom": "^7.0.0",
|
|
81
87
|
"dotenv": "^17.2.0",
|
|
82
88
|
"eslint": "^9.31.0",
|
|
83
89
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
@@ -85,6 +91,7 @@
|
|
|
85
91
|
"knip": "^5.61.3",
|
|
86
92
|
"lodash.merge": "^4.6.2",
|
|
87
93
|
"typedoc": "^0.28.7",
|
|
94
|
+
"typedoc-plugin-markdown": "^4.7.0",
|
|
88
95
|
"typescript": "^5.8.3",
|
|
89
96
|
"vitest": "^3.2.4"
|
|
90
97
|
},
|
package/BUILD_STATUS.md
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
[![logo][logo]](https://xylabs.com)
|
|
2
|
-
|
|
3
|
-
[](https://github.com/xylabs/sdk-react/actions)
|
|
4
|
-
[](https://github.com/xylabs/sdk-js/actions)
|
|
5
|
-
[](https://github.com/xylabs/config/actions)
|
|
6
|
-
[](https://github.com/xylabs/sdk-meta-server-nodejs/actions)
|
|
7
|
-
|
|
8
|
-
## Credits
|
|
9
|
-
|
|
10
|
-
[Made with 🔥 and ❄️ by XY Labs](https://xylabs.com)
|
|
11
|
-
|
|
12
|
-
[logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
|
package/eslint.config.mjs
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
typescriptConfig,
|
|
3
|
-
unicornConfig,
|
|
4
|
-
workspacesConfig,
|
|
5
|
-
rulesConfig,
|
|
6
|
-
sonarConfig,
|
|
7
|
-
importConfig,
|
|
8
|
-
} from '@xylabs/eslint-config-flat'
|
|
9
|
-
|
|
10
|
-
export default [
|
|
11
|
-
{ ignores: ['.yarn', 'dist', 'build', 'docs', 'eslint.config.mjs', '**/dist', '**/build', '**/docs', 'packages/threads', 'packages/threads-test'] },
|
|
12
|
-
unicornConfig,
|
|
13
|
-
workspacesConfig,
|
|
14
|
-
rulesConfig,
|
|
15
|
-
typescriptConfig,
|
|
16
|
-
sonarConfig,
|
|
17
|
-
{
|
|
18
|
-
rules: {
|
|
19
|
-
'sonarjs/public-static-readonly': ['off'],
|
|
20
|
-
'sonarjs/prefer-single-boolean-return': ['off'],
|
|
21
|
-
'sonarjs/no-hardcoded-passwords': ['off'],
|
|
22
|
-
'import-x/no-unresolved': ['off'],
|
|
23
|
-
'no-restricted-imports': [
|
|
24
|
-
'warn',
|
|
25
|
-
{
|
|
26
|
-
paths: [
|
|
27
|
-
...rulesConfig.rules['no-restricted-imports'][1].paths,
|
|
28
|
-
'@xyo-network/*',
|
|
29
|
-
'lodash',
|
|
30
|
-
'lodash-es',
|
|
31
|
-
'@xylabs/lodash',
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
'@typescript-eslint/strict-boolean-expressions': ['warn', {
|
|
36
|
-
allowAny: true,
|
|
37
|
-
allowNullableBoolean: true,
|
|
38
|
-
allowNullableEnum: false,
|
|
39
|
-
allowNullableNumber: false,
|
|
40
|
-
allowNullableObject: true,
|
|
41
|
-
allowNullableString: false,
|
|
42
|
-
allowNumber: false,
|
|
43
|
-
allowString: false,
|
|
44
|
-
}],
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
...importConfig,
|
|
49
|
-
rules: {
|
|
50
|
-
...importConfig.rules,
|
|
51
|
-
'import-x/no-cycle': ['warn', { maxDepth: 5 }]
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
]
|
package/knip.config.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { KnipConfig } from 'knip'
|
|
2
|
-
|
|
3
|
-
const config: KnipConfig = {
|
|
4
|
-
ignoreDependencies: ['@xylabs/ts-scripts-yarn3'],
|
|
5
|
-
workspaces: {
|
|
6
|
-
'.': {
|
|
7
|
-
entry: ['src/index.ts'],
|
|
8
|
-
ignoreDependencies: [
|
|
9
|
-
'eslint-import-resolver-typescript',
|
|
10
|
-
],
|
|
11
|
-
},
|
|
12
|
-
'packages/buffer': {
|
|
13
|
-
ignoreDependencies: ['buffer'],
|
|
14
|
-
entry: ['src/node/index.ts', 'src/browser/index.ts'],
|
|
15
|
-
},
|
|
16
|
-
'packages/*': { entry: ['src/index.ts'] },
|
|
17
|
-
'packages/platform': { entry: ['src/node/index.ts', 'src/browser/index.ts'] },
|
|
18
|
-
'packages/crypto': { entry: ['src/node/index.ts', 'src/browser/index.ts'] },
|
|
19
|
-
'packages/forget': { entry: ['src/index.ts', 'src/index-node.ts'] },
|
|
20
|
-
'packages/url': { entry: ['src/node/index.ts', 'src/browser/index.ts', 'src/neutral/index.ts'] },
|
|
21
|
-
'packages/threads': {
|
|
22
|
-
ignoreDependencies: ['is-observable-2-1-0'],
|
|
23
|
-
entry: [
|
|
24
|
-
'src/index-node.ts',
|
|
25
|
-
'src/index-browser.ts',
|
|
26
|
-
'src/master/implementation.browser.ts',
|
|
27
|
-
'src/master/implementation.node.ts',
|
|
28
|
-
'index.mjs',
|
|
29
|
-
'src/master/register.ts',
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
'packages/static-implements': { ignoreDependencies: ['tslib'] },
|
|
33
|
-
},
|
|
34
|
-
typescript: {
|
|
35
|
-
config: [
|
|
36
|
-
'tsconfig.json',
|
|
37
|
-
'packages/**/*/tsconfig.json',
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export default config
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# {{name}}
|
|
2
|
-
|
|
3
|
-
[![logo][]](https://xylabs.com)
|
|
4
|
-
|
|
5
|
-
[![main-build][]][main-build-link]
|
|
6
|
-
[![npm-badge][]][npm-link]
|
|
7
|
-
[![npm-downloads-badge][]][npm-link]
|
|
8
|
-
[![jsdelivr-badge][]][jsdelivr-link]
|
|
9
|
-
[![npm-license-badge][]](LICENSE)
|
|
10
|
-
[![codacy-badge][]][codacy-link]
|
|
11
|
-
[![codeclimate-badge][]][codeclimate-link]
|
|
12
|
-
[![snyk-badge][]][snyk-link]
|
|
13
|
-
[![socket-badge][]][socket-link]
|
|
14
|
-
|
|
15
|
-
Version: {{version}}
|
|
16
|
-
|
|
17
|
-
{{description}}
|
|
18
|
-
|
|
19
|
-
## Documentation
|
|
20
|
-
|
|
21
|
-
Coming Soon!
|
|
22
|
-
|
|
23
|
-
Part of [sdk-js](https://www.npmjs.com/package/@xyo-network/sdk-js)
|
|
24
|
-
|
|
25
|
-
## Maintainers
|
|
26
|
-
|
|
27
|
-
- [Arie Trouw](https://github.com/arietrouw) ([arietrouw.com](https://arietrouw.com))
|
|
28
|
-
- [Matt Jones](https://github.com/jonesmac)
|
|
29
|
-
- [Joel Carter](https://github.com/JoelBCarter)
|
|
30
|
-
- [Jordan Trouw](https://github.com/jordantrouw)
|
|
31
|
-
|
|
32
|
-
## License
|
|
33
|
-
|
|
34
|
-
> See the [LICENSE](LICENSE) file for license details
|
|
35
|
-
|
|
36
|
-
## Credits
|
|
37
|
-
|
|
38
|
-
[Made with 🔥 and ❄️ by XYLabs](https://xylabs.com)
|
|
39
|
-
|
|
40
|
-
[logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
|
|
41
|
-
|
|
42
|
-
[main-build]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml/badge.svg
|
|
43
|
-
[main-build-link]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml
|
|
44
|
-
[npm-badge]: https://img.shields.io/npm/v/{{name}}.svg
|
|
45
|
-
[npm-link]: https://www.npmjs.com/package/{{name}}
|
|
46
|
-
[codacy-badge]: https://app.codacy.com/project/badge/Grade/c8e15e14f37741c18cfb47ac7245c698
|
|
47
|
-
[codacy-link]: https://www.codacy.com/gh/xylabs/sdk-js/dashboard?utm_source=github.com&utm_medium=referral&utm_content=xylabs/sdk-js&utm_campaign=Badge_Grade
|
|
48
|
-
[codeclimate-badge]: https://api.codeclimate.com/v1/badges/c5eb068f806f0b047ea7/maintainability
|
|
49
|
-
[codeclimate-link]: https://codeclimate.com/github/xylabs/sdk-js/maintainability
|
|
50
|
-
[snyk-badge]: https://snyk.io/test/github/xylabs/sdk-js/badge.svg?targetFile=package.json
|
|
51
|
-
[snyk-link]: https://snyk.io/test/github/xylabs/sdk-js?targetFile=package.json
|
|
52
|
-
|
|
53
|
-
[npm-downloads-badge]: https://img.shields.io/npm/dw/{{name}}
|
|
54
|
-
[npm-license-badge]: https://img.shields.io/npm/l/{{name}}
|
|
55
|
-
|
|
56
|
-
[jsdelivr-badge]: https://data.jsdelivr.com/v1/package/npm/{{name}}/badge
|
|
57
|
-
[jsdelivr-link]: https://www.jsdelivr.com/package/npm/{{name}}
|
|
58
|
-
|
|
59
|
-
[socket-badge]: https://socket.dev/api/badge/npm/package/{{name}}
|
|
60
|
-
[socket-link]: https://socket.dev/npm/package/{{name}}
|
package/scripts/readme-gen.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// generate-readmes.mjs
|
|
4
|
-
import { readFile, writeFile } from 'node:fs/promises'
|
|
5
|
-
import path from 'node:path'
|
|
6
|
-
import { fileURLToPath } from 'node:url'
|
|
7
|
-
import { yarnWorkspaces } from '@xylabs/ts-scripts-yarn3'
|
|
8
|
-
// import { generateDocsForPackage } from './generate-docs-for-package.mjs'
|
|
9
|
-
|
|
10
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
11
|
-
const templatePath = path.join(__dirname, 'README.template.md')
|
|
12
|
-
|
|
13
|
-
function fillTemplate(template, data) {
|
|
14
|
-
const additionalData = { ...data, safeName: data.name.replaceAll('/', '__').replaceAll('@', '') }
|
|
15
|
-
return template.replaceAll(/{{(.*?)}}/g, (_, key) => additionalData[key.trim()] ?? '')
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
async function main() {
|
|
19
|
-
const template = await readFile(templatePath, 'utf8')
|
|
20
|
-
const pkgs = yarnWorkspaces()
|
|
21
|
-
|
|
22
|
-
for (const { location } of pkgs) {
|
|
23
|
-
const pkgJsonPath = path.join(location, 'package.json')
|
|
24
|
-
try {
|
|
25
|
-
const pkg = JSON.parse(await readFile(pkgJsonPath, 'utf8'))
|
|
26
|
-
const readmeContent = fillTemplate(template, pkg)
|
|
27
|
-
await writeFile(path.join(location, 'README.md'), readmeContent)
|
|
28
|
-
// generateDocsForPackage(pkg.name, location)
|
|
29
|
-
console.log(`✅ Created README.md for ${pkg.name}`)
|
|
30
|
-
} catch (err) {
|
|
31
|
-
console.warn(`⚠️ Skipped ${location}:`, err.message)
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
main().catch(console.error)
|
package/typedoc.json
DELETED
package/vitest.config.ts
DELETED