@xylabs/crypto 7.0.7 → 8.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.
Files changed (36) hide show
  1. package/README.md +1 -95
  2. package/dist/browser/index-browser.d.ts +1 -1
  3. package/dist/browser/index-browser.mjs +2 -13
  4. package/dist/browser/index-browser.mjs.map +4 -4
  5. package/dist/browser/index-node.d.ts +1 -1
  6. package/dist/browser/index-node.d.ts.map +1 -1
  7. package/dist/node/index-browser.d.ts +1 -1
  8. package/dist/node/index-node.d.ts +1 -1
  9. package/dist/node/index-node.d.ts.map +1 -1
  10. package/dist/node/index-node.mjs +2 -11
  11. package/dist/node/index-node.mjs.map +4 -4
  12. package/package.json +10 -12
  13. package/dist/browser/browser/Crypto.d.ts +0 -2
  14. package/dist/browser/browser/Crypto.d.ts.map +0 -1
  15. package/dist/browser/browser/cryptoPolyfill.d.ts +0 -3
  16. package/dist/browser/browser/cryptoPolyfill.d.ts.map +0 -1
  17. package/dist/browser/browser/index.d.ts +0 -3
  18. package/dist/browser/browser/index.d.ts.map +0 -1
  19. package/dist/browser/node/Crypto.d.ts +0 -2
  20. package/dist/browser/node/Crypto.d.ts.map +0 -1
  21. package/dist/browser/node/cryptoPolyfill.d.ts +0 -3
  22. package/dist/browser/node/cryptoPolyfill.d.ts.map +0 -1
  23. package/dist/browser/node/index.d.ts +0 -3
  24. package/dist/browser/node/index.d.ts.map +0 -1
  25. package/dist/node/browser/Crypto.d.ts +0 -2
  26. package/dist/node/browser/Crypto.d.ts.map +0 -1
  27. package/dist/node/browser/cryptoPolyfill.d.ts +0 -3
  28. package/dist/node/browser/cryptoPolyfill.d.ts.map +0 -1
  29. package/dist/node/browser/index.d.ts +0 -3
  30. package/dist/node/browser/index.d.ts.map +0 -1
  31. package/dist/node/node/Crypto.d.ts +0 -2
  32. package/dist/node/node/Crypto.d.ts.map +0 -1
  33. package/dist/node/node/cryptoPolyfill.d.ts +0 -3
  34. package/dist/node/node/cryptoPolyfill.d.ts.map +0 -1
  35. package/dist/node/node/index.d.ts +0 -3
  36. package/dist/node/node/index.d.ts.map +0 -1
package/README.md CHANGED
@@ -1,97 +1,3 @@
1
- [![logo][]](https://xylabs.com)
2
-
3
1
  # @xylabs/crypto
4
2
 
5
- [![npm][npm-badge]][npm-link]
6
- [![license][license-badge]][license-link]
7
-
8
- > Base functionality used throughout XY Labs TypeScript/JavaScript libraries
9
-
10
- ## Install
11
-
12
- Using npm:
13
-
14
- ```sh
15
- npm install {{name}}
16
- ```
17
-
18
- Using yarn:
19
-
20
- ```sh
21
- yarn add {{name}}
22
- ```
23
-
24
- Using pnpm:
25
-
26
- ```sh
27
- pnpm add {{name}}
28
- ```
29
-
30
- Using bun:
31
-
32
- ```sh
33
- bun add {{name}}
34
- ```
35
-
36
-
37
- ## License
38
-
39
- See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
40
-
41
- ## Reference
42
-
43
- ### packages
44
-
45
- ### crypto
46
-
47
- ### .temp-typedoc
48
-
49
- ### index-browser
50
-
51
- ### functions
52
-
53
- ### <a id="cryptoPolyfill"></a>cryptoPolyfill
54
-
55
- [**@xylabs/crypto**](#../../README)
56
-
57
- ***
58
-
59
- ```ts
60
- function cryptoPolyfill(): void;
61
- ```
62
-
63
- Polyfills `globalThis.Crypto` with the crypto-js implementation for browser environments.
64
-
65
- ## Returns
66
-
67
- `void`
68
-
69
- ### index-node
70
-
71
- ### functions
72
-
73
- ### <a id="cryptoPolyfill"></a>cryptoPolyfill
74
-
75
- [**@xylabs/crypto**](#../../README)
76
-
77
- ***
78
-
79
- ```ts
80
- function cryptoPolyfill(): void;
81
- ```
82
-
83
- No-op polyfill for Node.js, where the crypto module is already available globally.
84
-
85
- ## Returns
86
-
87
- `void`
88
-
89
- ## Credits
90
-
91
- [Made with 🔥 and ❄️ by XY Labs](https://xylabs.com)
92
-
93
- [npm-badge]: https://img.shields.io/npm/v/@xylabs/crypto.svg
94
- [npm-link]: https://www.npmjs.com/package/@xylabs/crypto
95
- [license-badge]: https://img.shields.io/npm/l/@xylabs/crypto.svg
96
- [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
97
- [logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
3
+ DEPRECATED — use `@ariestools/crypto` instead.
@@ -1,2 +1,2 @@
1
- export * from './browser/index.ts';
1
+ export * from '@ariestools/crypto';
2
2
  //# sourceMappingURL=index-browser.d.ts.map
@@ -1,14 +1,3 @@
1
- // src/browser/Crypto.ts
2
- import { default as default2 } from "crypto-js";
3
-
4
- // src/browser/cryptoPolyfill.ts
5
- var cryptoPolyfill = () => {
6
- if (globalThis.Crypto === void 0) {
7
- Reflect.set(globalThis, "Crypto", default2);
8
- }
9
- };
10
- export {
11
- default2 as Crypto,
12
- cryptoPolyfill
13
- };
1
+ // src/index-browser.ts
2
+ export * from "@ariestools/crypto";
14
3
  //# sourceMappingURL=index-browser.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/browser/Crypto.ts", "../../src/browser/cryptoPolyfill.ts"],
4
- "sourcesContent": ["export { default as Crypto } from 'crypto-js'\n", "import { Crypto } from './Crypto.ts'\n\n/** Polyfills `globalThis.Crypto` with the crypto-js implementation for browser environments. */\nexport const cryptoPolyfill = () => {\n if (globalThis.Crypto === undefined) {\n Reflect.set(globalThis, 'Crypto', Crypto)\n }\n}\n"],
5
- "mappings": ";AAAA,SAAoB,WAAXA,gBAAyB;;;ACG3B,IAAM,iBAAiB,MAAM;AAClC,MAAI,WAAW,WAAW,QAAW;AACnC,YAAQ,IAAI,YAAY,UAAUC,QAAM;AAAA,EAC1C;AACF;",
6
- "names": ["default", "default"]
3
+ "sources": ["../../src/index-browser.ts"],
4
+ "sourcesContent": ["export * from '@ariestools/crypto'\n"],
5
+ "mappings": ";AAAA,cAAc;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- export * from './node/index.ts';
1
+ export * from '@ariestools/crypto';
2
2
  //# sourceMappingURL=index-node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './browser/index.ts';
1
+ export * from '@ariestools/crypto';
2
2
  //# sourceMappingURL=index-browser.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './node/index.ts';
1
+ export * from '@ariestools/crypto';
2
2
  //# sourceMappingURL=index-node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,12 +1,3 @@
1
- // src/node/Crypto.ts
2
- import { default as default2 } from "node:crypto";
3
-
4
- // src/node/cryptoPolyfill.ts
5
- var cryptoPolyfill = () => {
6
- return;
7
- };
8
- export {
9
- default2 as Crypto,
10
- cryptoPolyfill
11
- };
1
+ // src/index-node.ts
2
+ export * from "@ariestools/crypto";
12
3
  //# sourceMappingURL=index-node.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/node/Crypto.ts", "../../src/node/cryptoPolyfill.ts"],
4
- "sourcesContent": ["/// <reference types=\"node\" />\n\nexport { default as Crypto } from 'node:crypto'\n", "/** No-op polyfill for Node.js, where the crypto module is already available globally. */\nexport const cryptoPolyfill = () => {\n return\n}\n"],
5
- "mappings": ";AAEA,SAAoB,WAAXA,gBAAyB;;;ACD3B,IAAM,iBAAiB,MAAM;AAClC;AACF;",
6
- "names": ["default"]
3
+ "sources": ["../../src/index-node.ts"],
4
+ "sourcesContent": ["export * from '@ariestools/crypto'\n"],
5
+ "mappings": ";AAAA,cAAc;",
6
+ "names": []
7
7
  }
package/package.json CHANGED
@@ -1,13 +1,11 @@
1
1
  {
2
2
  "name": "@xylabs/crypto",
3
- "version": "7.0.7",
4
- "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
3
+ "version": "8.0.0",
4
+ "description": "DEPRECATED use @ariestools/crypto. Backward-compatibility re-export shim.",
5
5
  "keywords": [
6
- "crypto",
7
6
  "xylabs",
8
- "utility",
9
- "typescript",
10
- "esm"
7
+ "deprecated",
8
+ "shim"
11
9
  ],
12
10
  "homepage": "https://xylabs.com",
13
11
  "bugs": {
@@ -44,9 +42,10 @@
44
42
  "!**/*.test.*",
45
43
  "README.md"
46
44
  ],
45
+ "dependencies": {
46
+ "@ariestools/crypto": "~8.0.0"
47
+ },
47
48
  "devDependencies": {
48
- "@types/crypto-js": "~4.2.2",
49
- "@types/node": "~26.1.0",
50
49
  "@xylabs/toolchain": "~8.6.2",
51
50
  "@xylabs/tsconfig": "~8.6.2",
52
51
  "@xylabs/tsconfig-dom": "~8.6.2",
@@ -54,9 +53,7 @@
54
53
  "crypto-js": "~4.2.0",
55
54
  "eslint": "~10.6.0",
56
55
  "eslint-import-resolver-typescript": "~4.4.5",
57
- "typescript": "~6.0.3",
58
- "vite": "~8.1.3",
59
- "vitest": "~4.1.9"
56
+ "typescript": "~6.0.3"
60
57
  },
61
58
  "peerDependencies": {
62
59
  "crypto-js": "^4.2.0"
@@ -66,5 +63,6 @@
66
63
  },
67
64
  "publishConfig": {
68
65
  "access": "public"
69
- }
66
+ },
67
+ "deprecated": "Use @ariestools/crypto instead. @xylabs/crypto is a compatibility shim only and will not receive further updates."
70
68
  }
@@ -1,2 +0,0 @@
1
- export { default as Crypto } from 'crypto-js';
2
- //# sourceMappingURL=Crypto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Crypto.d.ts","sourceRoot":"","sources":["../../../src/browser/Crypto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,WAAW,CAAA"}
@@ -1,3 +0,0 @@
1
- /** Polyfills `globalThis.Crypto` with the crypto-js implementation for browser environments. */
2
- export declare const cryptoPolyfill: () => void;
3
- //# sourceMappingURL=cryptoPolyfill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cryptoPolyfill.d.ts","sourceRoot":"","sources":["../../../src/browser/cryptoPolyfill.ts"],"names":[],"mappings":"AAEA,gGAAgG;AAChG,eAAO,MAAM,cAAc,YAI1B,CAAA"}
@@ -1,3 +0,0 @@
1
- export * from './Crypto.ts';
2
- export * from './cryptoPolyfill.ts';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/browser/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default as Crypto } from 'node:crypto';
2
- //# sourceMappingURL=Crypto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Crypto.d.ts","sourceRoot":"","sources":["../../../src/node/Crypto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAA"}
@@ -1,3 +0,0 @@
1
- /** No-op polyfill for Node.js, where the crypto module is already available globally. */
2
- export declare const cryptoPolyfill: () => void;
3
- //# sourceMappingURL=cryptoPolyfill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cryptoPolyfill.d.ts","sourceRoot":"","sources":["../../../src/node/cryptoPolyfill.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,eAAO,MAAM,cAAc,YAE1B,CAAA"}
@@ -1,3 +0,0 @@
1
- export * from './Crypto.ts';
2
- export * from './cryptoPolyfill.ts';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default as Crypto } from 'crypto-js';
2
- //# sourceMappingURL=Crypto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Crypto.d.ts","sourceRoot":"","sources":["../../../src/browser/Crypto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,WAAW,CAAA"}
@@ -1,3 +0,0 @@
1
- /** Polyfills `globalThis.Crypto` with the crypto-js implementation for browser environments. */
2
- export declare const cryptoPolyfill: () => void;
3
- //# sourceMappingURL=cryptoPolyfill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cryptoPolyfill.d.ts","sourceRoot":"","sources":["../../../src/browser/cryptoPolyfill.ts"],"names":[],"mappings":"AAEA,gGAAgG;AAChG,eAAO,MAAM,cAAc,YAI1B,CAAA"}
@@ -1,3 +0,0 @@
1
- export * from './Crypto.ts';
2
- export * from './cryptoPolyfill.ts';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/browser/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default as Crypto } from 'node:crypto';
2
- //# sourceMappingURL=Crypto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Crypto.d.ts","sourceRoot":"","sources":["../../../src/node/Crypto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAA"}
@@ -1,3 +0,0 @@
1
- /** No-op polyfill for Node.js, where the crypto module is already available globally. */
2
- export declare const cryptoPolyfill: () => void;
3
- //# sourceMappingURL=cryptoPolyfill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cryptoPolyfill.d.ts","sourceRoot":"","sources":["../../../src/node/cryptoPolyfill.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,eAAO,MAAM,cAAc,YAE1B,CAAA"}
@@ -1,3 +0,0 @@
1
- export * from './Crypto.ts';
2
- export * from './cryptoPolyfill.ts';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA"}