@xylabs/crypto
Advanced tools
Comparing version 2.11.20 to 2.11.21
@@ -1,2 +0,25 @@ | ||
export * from "./browserIndex"; | ||
// src/browser/Crypto.ts | ||
import Crypto from "crypto-js"; | ||
// src/browser/cryptoPolyfill.ts | ||
var isBrowser = () => { | ||
return typeof window !== "undefined" && typeof window?.document !== "undefined"; | ||
}; | ||
var isWebworker = () => { | ||
return typeof self === "object" && self.constructor?.name === "DedicatedWorkerGlobalScope"; | ||
}; | ||
var cryptoPolyfill = () => { | ||
const global = isBrowser() ? window : isWebworker() ? self : void 0; | ||
if (global) { | ||
if (global.Crypto === void 0) { | ||
global.Crypto = Crypto; | ||
} else { | ||
global.Crypto = { ...Crypto, ...global.Crypto }; | ||
} | ||
} | ||
}; | ||
export { | ||
Crypto, | ||
cryptoPolyfill | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -16,9 +16,11 @@ "use strict"; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
var src_exports = {}; | ||
module.exports = __toCommonJS(src_exports); | ||
__reExport(src_exports, require("./browserIndex"), module.exports); | ||
var node_exports = {}; | ||
module.exports = __toCommonJS(node_exports); | ||
__reExport(node_exports, require("./Crypto"), module.exports); | ||
__reExport(node_exports, require("./cryptoPolyfill"), module.exports); | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
...require("./browserIndex") | ||
...require("./Crypto"), | ||
...require("./cryptoPolyfill") | ||
}); | ||
//# sourceMappingURL=index.js.map |
@@ -15,3 +15,3 @@ { | ||
"docs": "dist/docs.json", | ||
"types": "dist/node/nodeIndex.d.ts", | ||
"types": "dist/node/node/index.d.ts", | ||
"exports": { | ||
@@ -21,17 +21,17 @@ ".": { | ||
"require": { | ||
"types": "./dist/browser/browserIndex.d.ts", | ||
"default": "./dist/browser/browserIndex.cjs" | ||
"types": "./dist/browser/browser/index.d.ts", | ||
"default": "./dist/browser/index.cjs" | ||
}, | ||
"import": { | ||
"types": "./dist/browser/browserIndex.d.ts", | ||
"default": "./dist/browser/browserIndex.js" | ||
"types": "./dist/browser/browser/index.d.ts", | ||
"default": "./dist/browser/index.js" | ||
} | ||
}, | ||
"require": { | ||
"types": "./dist/node/nodeIndex.d.ts", | ||
"default": "./dist/node/nodeIndex.js" | ||
"types": "./dist/node/node/index.d.ts", | ||
"default": "./dist/node/index.js" | ||
}, | ||
"import": { | ||
"types": "./dist/node/nodeIndex.d.mts", | ||
"default": "./dist/node/nodeIndex.mjs" | ||
"types": "./dist/node/node/index.d.mts", | ||
"default": "./dist/node/index.mjs" | ||
} | ||
@@ -44,4 +44,4 @@ }, | ||
}, | ||
"main": "dist/node/nodeIndex.js", | ||
"module": "dist/node/nodeIndex.mjs", | ||
"main": "dist/node/index.js", | ||
"module": "dist/node/index.mjs", | ||
"homepage": "https://xylabs.com", | ||
@@ -61,5 +61,5 @@ "keywords": [ | ||
"@types/node": "^20.7.0", | ||
"@xylabs/ts-scripts-yarn3": "^3.0.68", | ||
"@xylabs/tsconfig": "^3.0.68", | ||
"@xylabs/tsconfig-dom": "^3.0.68", | ||
"@xylabs/ts-scripts-yarn3": "^3.0.70", | ||
"@xylabs/tsconfig": "^3.0.70", | ||
"@xylabs/tsconfig-dom": "^3.0.70", | ||
"typescript": "^5.2.2" | ||
@@ -75,8 +75,13 @@ }, | ||
"sideEffects": false, | ||
"version": "2.11.20", | ||
"version": "2.11.21", | ||
"xy": { | ||
"compile": { | ||
"depth": 1 | ||
"browser": { | ||
"src/browser": true | ||
}, | ||
"node": { | ||
"src/node": true | ||
} | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38798
83
371
1