@xylabs/platform 6.0.2 → 6.0.4
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.
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { subtle as subtleType } from 'node:crypto';
|
|
2
1
|
/** Returns whether the current environment is a browser window (not a web worker). */
|
|
3
2
|
export declare const isBrowser: () => boolean;
|
|
4
3
|
/** Returns whether the current environment is a dedicated web worker. */
|
|
@@ -6,5 +5,5 @@ export declare const isWebworker: () => boolean;
|
|
|
6
5
|
/** Returns whether the current environment is Node.js. Always returns false in the browser entry point. */
|
|
7
6
|
export declare const isNode: () => boolean;
|
|
8
7
|
/** The Web Crypto API's SubtleCrypto interface, sourced from the browser's globalThis.crypto. */
|
|
9
|
-
export declare const subtle:
|
|
8
|
+
export declare const subtle: import("node:crypto").webcrypto.SubtleCrypto;
|
|
10
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/browser/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/browser/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,eAAO,MAAM,SAAS,eAErB,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,2GAA2G;AAC3G,eAAO,MAAM,MAAM,eAElB,CAAA;AAED,iGAAiG;AACjG,eAAO,MAAM,MAAM,8CAA2B,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/browser/index.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["/** Returns whether the current environment is a browser window (not a web worker). */\nexport const isBrowser = () => {\n return !isWebworker() && globalThis.constructor?.name === 'Window'\n}\n\n/** Returns whether the current environment is a dedicated web worker. */\nexport const isWebworker = () => {\n return typeof globalThis === 'object' && globalThis.constructor?.name === 'DedicatedWorkerGlobalScope'\n}\n\n/** Returns whether the current environment is Node.js. Always returns false in the browser entry point. */\nexport const isNode = () => {\n return false\n}\n\n/** The Web Crypto API's SubtleCrypto interface, sourced from the browser's globalThis.crypto. */\nexport const subtle = globalThis.crypto.subtle\n"],
|
|
5
|
+
"mappings": ";AACO,IAAM,YAAY,MAAM;AAC7B,SAAO,CAAC,YAAY,KAAK,WAAW,aAAa,SAAS;AAC5D;AAGO,IAAM,cAAc,MAAM;AAC/B,SAAO,OAAO,eAAe,YAAY,WAAW,aAAa,SAAS;AAC5E;AAGO,IAAM,SAAS,MAAM;AAC1B,SAAO;AACT;AAGO,IAAM,SAAS,WAAW,OAAO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { subtle as subtleType } from 'node:crypto';
|
|
2
1
|
/** Returns whether the current environment is a browser window (not a web worker). */
|
|
3
2
|
export declare const isBrowser: () => boolean;
|
|
4
3
|
/** Returns whether the current environment is a dedicated web worker. */
|
|
@@ -6,5 +5,5 @@ export declare const isWebworker: () => boolean;
|
|
|
6
5
|
/** Returns whether the current environment is Node.js. Always returns false in the browser entry point. */
|
|
7
6
|
export declare const isNode: () => boolean;
|
|
8
7
|
/** The Web Crypto API's SubtleCrypto interface, sourced from the browser's globalThis.crypto. */
|
|
9
|
-
export declare const subtle:
|
|
8
|
+
export declare const subtle: import("node:crypto").webcrypto.SubtleCrypto;
|
|
10
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/browser/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/browser/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,eAAO,MAAM,SAAS,eAErB,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,2GAA2G;AAC3G,eAAO,MAAM,MAAM,eAElB,CAAA;AAED,iGAAiG;AACjG,eAAO,MAAM,MAAM,8CAA2B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/platform",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.4",
|
|
4
4
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"platform",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
],
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/node": "^25.9.1",
|
|
51
|
-
"@xylabs/toolchain": "^8.1.
|
|
52
|
-
"@xylabs/tsconfig": "^8.1.
|
|
51
|
+
"@xylabs/toolchain": "^8.1.5",
|
|
52
|
+
"@xylabs/tsconfig": "^8.1.5",
|
|
53
53
|
"eslint": "^10.4.0",
|
|
54
54
|
"typescript": "^6.0.3",
|
|
55
|
-
"vite": "^8.0.
|
|
55
|
+
"vite": "^8.0.14",
|
|
56
56
|
"vitest": "^4.1.7"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|