@xylabs/crypto 3.6.12 → 4.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.
Files changed (41) hide show
  1. package/dist/browser/index.d.ts +5 -3
  2. package/dist/node/index.d.ts +5 -3
  3. package/package.json +10 -23
  4. package/dist/browser/Crypto.d.cts +0 -2
  5. package/dist/browser/Crypto.d.cts.map +0 -1
  6. package/dist/browser/Crypto.d.mts +0 -2
  7. package/dist/browser/Crypto.d.mts.map +0 -1
  8. package/dist/browser/Crypto.d.ts +0 -2
  9. package/dist/browser/Crypto.d.ts.map +0 -1
  10. package/dist/browser/cryptoPolyfill.d.cts +0 -2
  11. package/dist/browser/cryptoPolyfill.d.cts.map +0 -1
  12. package/dist/browser/cryptoPolyfill.d.mts +0 -2
  13. package/dist/browser/cryptoPolyfill.d.mts.map +0 -1
  14. package/dist/browser/cryptoPolyfill.d.ts +0 -2
  15. package/dist/browser/cryptoPolyfill.d.ts.map +0 -1
  16. package/dist/browser/index.cjs +0 -49
  17. package/dist/browser/index.cjs.map +0 -1
  18. package/dist/browser/index.d.cts +0 -3
  19. package/dist/browser/index.d.cts.map +0 -1
  20. package/dist/browser/index.d.mts +0 -3
  21. package/dist/browser/index.d.mts.map +0 -1
  22. package/dist/browser/index.d.ts.map +0 -1
  23. package/dist/node/Crypto.d.cts +0 -2
  24. package/dist/node/Crypto.d.cts.map +0 -1
  25. package/dist/node/Crypto.d.mts +0 -2
  26. package/dist/node/Crypto.d.mts.map +0 -1
  27. package/dist/node/Crypto.d.ts +0 -2
  28. package/dist/node/Crypto.d.ts.map +0 -1
  29. package/dist/node/cryptoPolyfill.d.cts +0 -2
  30. package/dist/node/cryptoPolyfill.d.cts.map +0 -1
  31. package/dist/node/cryptoPolyfill.d.mts +0 -2
  32. package/dist/node/cryptoPolyfill.d.mts.map +0 -1
  33. package/dist/node/cryptoPolyfill.d.ts +0 -2
  34. package/dist/node/cryptoPolyfill.d.ts.map +0 -1
  35. package/dist/node/index.cjs +0 -50
  36. package/dist/node/index.cjs.map +0 -1
  37. package/dist/node/index.d.cts +0 -3
  38. package/dist/node/index.d.cts.map +0 -1
  39. package/dist/node/index.d.mts +0 -3
  40. package/dist/node/index.d.mts.map +0 -1
  41. package/dist/node/index.d.ts.map +0 -1
@@ -1,3 +1,5 @@
1
- export * from './Crypto.ts';
2
- export * from './cryptoPolyfill.ts';
3
- //# sourceMappingURL=index.d.ts.map
1
+ export { default as Crypto } from 'crypto-js';
2
+
3
+ declare const cryptoPolyfill: () => void;
4
+
5
+ export { cryptoPolyfill };
@@ -1,3 +1,5 @@
1
- export * from './Crypto.ts';
2
- export * from './cryptoPolyfill.ts';
3
- //# sourceMappingURL=index.d.ts.map
1
+ export { default as Crypto } from 'node:crypto';
2
+
3
+ declare const cryptoPolyfill: () => void;
4
+
5
+ export { cryptoPolyfill };
package/package.json CHANGED
@@ -14,27 +14,14 @@
14
14
  "exports": {
15
15
  ".": {
16
16
  "browser": {
17
- "require": {
18
- "types": "./dist/browser/index.d.cts",
19
- "default": "./dist/browser/index.cjs"
20
- },
21
- "import": {
22
- "types": "./dist/browser/index.d.ts",
23
- "default": "./dist/browser/index.mjs"
24
- }
17
+ "types": "./dist/browser/index.d.ts",
18
+ "default": "./dist/browser/index.mjs"
25
19
  },
26
- "require": {
27
- "types": "./dist/node/index.d.cts",
28
- "default": "./dist/node/index.cjs"
29
- },
30
- "import": {
31
- "types": "./dist/node/index.d.ts",
32
- "default": "./dist/node/index.mjs"
33
- }
20
+ "types": "./dist/node/index.d.ts",
21
+ "default": "./dist/node/index.mjs"
34
22
  },
35
23
  "./package.json": "./package.json"
36
24
  },
37
- "main": "./dist/node/index.cjs",
38
25
  "types": "./dist/node/index.d.ts",
39
26
  "module": "./dist/node/index.mjs",
40
27
  "homepage": "https://xylabs.com",
@@ -46,15 +33,15 @@
46
33
  "esm"
47
34
  ],
48
35
  "dependencies": {
49
- "@xylabs/platform": "^3.6.12",
36
+ "@xylabs/platform": "^4.0.1",
50
37
  "crypto-js": "^4.2.0"
51
38
  },
52
39
  "devDependencies": {
53
40
  "@types/crypto-js": "^4.2.2",
54
- "@types/node": "^22.1.0",
55
- "@xylabs/ts-scripts-yarn3": "^3.15.14",
56
- "@xylabs/tsconfig": "^3.15.14",
57
- "@xylabs/tsconfig-dom": "^3.15.14",
41
+ "@types/node": "^22.3.0",
42
+ "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.15",
43
+ "@xylabs/tsconfig": "^4.0.0-rc.15",
44
+ "@xylabs/tsconfig-dom": "^4.0.0-rc.15",
58
45
  "typescript": "^5.5.4"
59
46
  },
60
47
  "engines": {
@@ -68,6 +55,6 @@
68
55
  "url": "https://github.com/xylabs/sdk-js.git"
69
56
  },
70
57
  "sideEffects": false,
71
- "version": "3.6.12",
58
+ "version": "4.0.1",
72
59
  "type": "module"
73
60
  }
@@ -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,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,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,2 +0,0 @@
1
- export declare const cryptoPolyfill: () => void;
2
- //# sourceMappingURL=cryptoPolyfill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cryptoPolyfill.d.ts","sourceRoot":"","sources":["../../src/browser/cryptoPolyfill.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,YAK1B,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const cryptoPolyfill: () => void;
2
- //# sourceMappingURL=cryptoPolyfill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cryptoPolyfill.d.ts","sourceRoot":"","sources":["../../src/browser/cryptoPolyfill.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,YAK1B,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const cryptoPolyfill: () => void;
2
- //# sourceMappingURL=cryptoPolyfill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cryptoPolyfill.d.ts","sourceRoot":"","sources":["../../src/browser/cryptoPolyfill.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,YAK1B,CAAA"}
@@ -1,49 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/browser/index.ts
31
- var browser_exports = {};
32
- __export(browser_exports, {
33
- Crypto: () => import_crypto_js.default,
34
- cryptoPolyfill: () => cryptoPolyfill
35
- });
36
- module.exports = __toCommonJS(browser_exports);
37
-
38
- // src/browser/Crypto.ts
39
- var import_crypto_js = __toESM(require("crypto-js"), 1);
40
-
41
- // src/browser/cryptoPolyfill.ts
42
- var import_platform = require("@xylabs/platform");
43
- var cryptoPolyfill = () => {
44
- const global = (0, import_platform.getGlobal)();
45
- if (global) {
46
- global.Crypto = global.Crypto === void 0 ? import_crypto_js.default : { ...import_crypto_js.default, ...global.Crypto };
47
- }
48
- };
49
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/browser/index.ts","../../src/browser/Crypto.ts","../../src/browser/cryptoPolyfill.ts"],"sourcesContent":["export * from './Crypto.ts'\nexport * from './cryptoPolyfill.ts'\n","export { default as Crypto } from 'crypto-js'\n","import { getGlobal } from '@xylabs/platform'\n\nimport { Crypto } from './Crypto.ts'\n\ntype WithOptionalCrypto = { Crypto?: typeof Crypto }\n\nexport const cryptoPolyfill = () => {\n const global = getGlobal<WithOptionalCrypto>()\n if (global) {\n global.Crypto = global.Crypto === undefined ? Crypto : { ...Crypto, ...global.Crypto }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,uBAAkC;;;ACAlC,sBAA0B;AAMnB,IAAM,iBAAiB,MAAM;AAClC,QAAM,aAAS,2BAA8B;AAC7C,MAAI,QAAQ;AACV,WAAO,SAAS,OAAO,WAAW,SAAY,2BAAS,EAAE,GAAG,0BAAQ,GAAG,OAAO,OAAO;AAAA,EACvF;AACF;","names":[]}
@@ -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,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 +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":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,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":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,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":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const cryptoPolyfill: () => void;
2
- //# sourceMappingURL=cryptoPolyfill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cryptoPolyfill.d.ts","sourceRoot":"","sources":["../../src/node/cryptoPolyfill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,YAE1B,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const cryptoPolyfill: () => void;
2
- //# sourceMappingURL=cryptoPolyfill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cryptoPolyfill.d.ts","sourceRoot":"","sources":["../../src/node/cryptoPolyfill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,YAE1B,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const cryptoPolyfill: () => void;
2
- //# sourceMappingURL=cryptoPolyfill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cryptoPolyfill.d.ts","sourceRoot":"","sources":["../../src/node/cryptoPolyfill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,YAE1B,CAAA"}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/node/index.ts
31
- var node_exports = {};
32
- __export(node_exports, {
33
- Crypto: () => import_node_crypto.default,
34
- cryptoPolyfill: () => cryptoPolyfill
35
- });
36
- module.exports = __toCommonJS(node_exports);
37
-
38
- // src/node/Crypto.ts
39
- var import_node_crypto = __toESM(require("crypto"), 1);
40
-
41
- // src/node/cryptoPolyfill.ts
42
- var cryptoPolyfill = () => {
43
- return;
44
- };
45
- // Annotate the CommonJS export names for ESM import in node:
46
- 0 && (module.exports = {
47
- Crypto,
48
- cryptoPolyfill
49
- });
50
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/node/index.ts","../../src/node/Crypto.ts","../../src/node/cryptoPolyfill.ts"],"sourcesContent":["export * from './Crypto.ts'\nexport * from './cryptoPolyfill.ts'\n","export { default as Crypto } from 'node:crypto'\n","export const cryptoPolyfill = () => {\n return\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,yBAAkC;;;ACA3B,IAAM,iBAAiB,MAAM;AAClC;AACF;","names":[]}
@@ -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,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 +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"}