@xylabs/platform 3.6.6 → 3.6.8
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/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts.map +1 -1
- package/dist/browser/index.d.mts.map +1 -1
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/{index.js → index.mjs} +1 -1
- package/dist/browser/index.mjs.map +1 -0
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.mts.map +1 -1
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/{index.js → index.mjs} +1 -1
- package/dist/node/index.mjs.map +1 -0
- package/package.json +11 -11
- package/src/browser/index.ts +5 -3
- package/src/node/index.ts +5 -3
- package/dist/browser/index.js.map +0 -1
- package/dist/node/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/browser/index.ts"],"sourcesContent":["import type { subtle as subtleType } from 'node:crypto'\n\nexport const isBrowser = () => {\n return !isWebworker() && self.constructor?.name === 'Window'\n}\n\nexport const isWebworker = () => {\n return typeof self === 'object' && self.constructor?.name === 'DedicatedWorkerGlobalScope'\n}\n\nexport const getGlobal = <T extends object>() =>\n isWebworker()
|
|
1
|
+
{"version":3,"sources":["../../src/browser/index.ts"],"sourcesContent":["import type { subtle as subtleType } from 'node:crypto'\n\nexport const isBrowser = () => {\n return !isWebworker() && self.constructor?.name === 'Window'\n}\n\nexport const isWebworker = () => {\n return typeof self === 'object' && self.constructor?.name === 'DedicatedWorkerGlobalScope'\n}\n\nexport const getGlobal = <T extends object>() =>\n isWebworker()\n ? (self as unknown as T)\n : isBrowser()\n ? (window as unknown as T)\n : globalThis\n\nexport const subtle = getGlobal<Window>().crypto.subtle as typeof subtleType\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,IAAM,YAAY,MAAM;AAC7B,SAAO,CAAC,YAAY,KAAK,KAAK,aAAa,SAAS;AACtD;AAEO,IAAM,cAAc,MAAM;AAC/B,SAAO,OAAO,SAAS,YAAY,KAAK,aAAa,SAAS;AAChE;AAEO,IAAM,YAAY,MACvB,YAAY,IACP,OACD,UAAU,IACP,SACD;AAED,IAAM,SAAS,UAAkB,EAAE,OAAO;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,aAAa,CAAA;AAEvD,eAAO,MAAM,SAAS,eAErB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,aAAa,CAAA;AAEvD,eAAO,MAAM,SAAS,eAErB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,4BAKxB,CAAA;AAElB,eAAO,MAAM,MAAM,EAAwC,OAAO,UAAU,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,aAAa,CAAA;AAEvD,eAAO,MAAM,SAAS,eAErB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,aAAa,CAAA;AAEvD,eAAO,MAAM,SAAS,eAErB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,4BAKxB,CAAA;AAElB,eAAO,MAAM,MAAM,EAAwC,OAAO,UAAU,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,aAAa,CAAA;AAEvD,eAAO,MAAM,SAAS,eAErB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,aAAa,CAAA;AAEvD,eAAO,MAAM,SAAS,eAErB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,4BAKxB,CAAA;AAElB,eAAO,MAAM,MAAM,EAAwC,OAAO,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/browser/index.ts"],"sourcesContent":["import type { subtle as subtleType } from 'node:crypto'\n\nexport const isBrowser = () => {\n return !isWebworker() && self.constructor?.name === 'Window'\n}\n\nexport const isWebworker = () => {\n return typeof self === 'object' && self.constructor?.name === 'DedicatedWorkerGlobalScope'\n}\n\nexport const getGlobal = <T extends object>() =>\n isWebworker()\n ? (self as unknown as T)\n : isBrowser()\n ? (window as unknown as T)\n : globalThis\n\nexport const subtle = getGlobal<Window>().crypto.subtle as typeof subtleType\n"],"mappings":";AAEO,IAAM,YAAY,MAAM;AAC7B,SAAO,CAAC,YAAY,KAAK,KAAK,aAAa,SAAS;AACtD;AAEO,IAAM,cAAc,MAAM;AAC/B,SAAO,OAAO,SAAS,YAAY,KAAK,aAAa,SAAS;AAChE;AAEO,IAAM,YAAY,MACvB,YAAY,IACP,OACD,UAAU,IACP,SACD;AAED,IAAM,SAAS,UAAkB,EAAE,OAAO;","names":[]}
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/node/index.ts"],"sourcesContent":["export { subtle } from 'node:crypto'\n\nexport const isBrowser = () => {\n return false\n}\n\nexport const isWebworker = () => {\n return false\n}\n\nexport const getGlobal = <T extends object>() =>\n isBrowser()
|
|
1
|
+
{"version":3,"sources":["../../src/node/index.ts"],"sourcesContent":["export { subtle } from 'node:crypto'\n\nexport const isBrowser = () => {\n return false\n}\n\nexport const isWebworker = () => {\n return false\n}\n\nexport const getGlobal = <T extends object>() =>\n isBrowser()\n ? (window as unknown as T)\n : isWebworker()\n ? (self as unknown as T)\n : globalThis\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAuB;AAEhB,IAAM,YAAY,MAAM;AAC7B,SAAO;AACT;AAEO,IAAM,cAAc,MAAM;AAC/B,SAAO;AACT;AAEO,IAAM,YAAY,MACvB,UAAU,IACL,SACD,YAAY,IACT,OACD;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,eAAO,MAAM,SAAS,eAErB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,eAAO,MAAM,SAAS,eAErB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,4BAKxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,eAAO,MAAM,SAAS,eAErB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,eAAO,MAAM,SAAS,eAErB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,4BAKxB,CAAA"}
|
package/dist/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,eAAO,MAAM,SAAS,eAErB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,eAAO,MAAM,SAAS,eAErB,CAAA;AAED,eAAO,MAAM,WAAW,eAEvB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,4BAKxB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/node/index.ts"],"sourcesContent":["export { subtle } from 'node:crypto'\n\nexport const isBrowser = () => {\n return false\n}\n\nexport const isWebworker = () => {\n return false\n}\n\nexport const getGlobal = <T extends object>() =>\n isBrowser()\n ? (window as unknown as T)\n : isWebworker()\n ? (self as unknown as T)\n : globalThis\n"],"mappings":";AAAA,SAAS,cAAc;AAEhB,IAAM,YAAY,MAAM;AAC7B,SAAO;AACT;AAEO,IAAM,cAAc,MAAM;AAC/B,SAAO;AACT;AAEO,IAAM,YAAY,MACvB,UAAU,IACL,SACD,YAAY,IACT,OACD;","names":[]}
|
package/package.json
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"default": "./dist/browser/index.cjs"
|
|
20
20
|
},
|
|
21
21
|
"import": {
|
|
22
|
-
"types": "./dist/browser/index.d.
|
|
23
|
-
"default": "./dist/browser/index.
|
|
22
|
+
"types": "./dist/browser/index.d.ts",
|
|
23
|
+
"default": "./dist/browser/index.mjs"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"neutral": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"default": "./dist/browser/index.cjs"
|
|
30
30
|
},
|
|
31
31
|
"import": {
|
|
32
|
-
"types": "./dist/browser/index.d.
|
|
33
|
-
"default": "./dist/browser/index.
|
|
32
|
+
"types": "./dist/browser/index.d.ts",
|
|
33
|
+
"default": "./dist/browser/index.mjs"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"node": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"default": "./dist/node/index.cjs"
|
|
40
40
|
},
|
|
41
41
|
"import": {
|
|
42
|
-
"types": "./dist/node/index.d.
|
|
43
|
-
"default": "./dist/node/index.
|
|
42
|
+
"types": "./dist/node/index.d.ts",
|
|
43
|
+
"default": "./dist/node/index.mjs"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
},
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"main": "./dist/browser/index.cjs",
|
|
50
50
|
"types": "./dist/browser/index.d.ts",
|
|
51
|
-
"module": "./dist/browser/index.
|
|
51
|
+
"module": "./dist/browser/index.mjs",
|
|
52
52
|
"homepage": "https://xylabs.com",
|
|
53
53
|
"keywords": [
|
|
54
54
|
"platform",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"esm"
|
|
59
59
|
],
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@xylabs/ts-scripts-yarn3": "^3.
|
|
62
|
-
"@xylabs/tsconfig": "^3.
|
|
63
|
-
"@xylabs/tsconfig-dom": "^3.
|
|
61
|
+
"@xylabs/ts-scripts-yarn3": "^3.15.5",
|
|
62
|
+
"@xylabs/tsconfig": "^3.15.5",
|
|
63
|
+
"@xylabs/tsconfig-dom": "^3.15.5",
|
|
64
64
|
"typescript": "^5.5.4"
|
|
65
65
|
},
|
|
66
66
|
"engines": {
|
|
@@ -74,6 +74,6 @@
|
|
|
74
74
|
"url": "https://github.com/xylabs/sdk-js.git"
|
|
75
75
|
},
|
|
76
76
|
"sideEffects": false,
|
|
77
|
-
"version": "3.6.
|
|
77
|
+
"version": "3.6.8",
|
|
78
78
|
"type": "module"
|
|
79
79
|
}
|
package/src/browser/index.ts
CHANGED
|
@@ -9,8 +9,10 @@ export const isWebworker = () => {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export const getGlobal = <T extends object>() =>
|
|
12
|
-
isWebworker()
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
isWebworker()
|
|
13
|
+
? (self as unknown as T)
|
|
14
|
+
: isBrowser()
|
|
15
|
+
? (window as unknown as T)
|
|
16
|
+
: globalThis
|
|
15
17
|
|
|
16
18
|
export const subtle = getGlobal<Window>().crypto.subtle as typeof subtleType
|
package/src/node/index.ts
CHANGED
|
@@ -9,6 +9,8 @@ export const isWebworker = () => {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export const getGlobal = <T extends object>() =>
|
|
12
|
-
isBrowser()
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
isBrowser()
|
|
13
|
+
? (window as unknown as T)
|
|
14
|
+
: isWebworker()
|
|
15
|
+
? (self as unknown as T)
|
|
16
|
+
: globalThis
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/browser/index.ts"],"sourcesContent":["import type { subtle as subtleType } from 'node:crypto'\n\nexport const isBrowser = () => {\n return !isWebworker() && self.constructor?.name === 'Window'\n}\n\nexport const isWebworker = () => {\n return typeof self === 'object' && self.constructor?.name === 'DedicatedWorkerGlobalScope'\n}\n\nexport const getGlobal = <T extends object>() =>\n isWebworker() ? (self as unknown as T)\n : isBrowser() ? (window as unknown as T)\n : globalThis\n\nexport const subtle = getGlobal<Window>().crypto.subtle as typeof subtleType\n"],"mappings":";AAEO,IAAM,YAAY,MAAM;AAC7B,SAAO,CAAC,YAAY,KAAK,KAAK,aAAa,SAAS;AACtD;AAEO,IAAM,cAAc,MAAM;AAC/B,SAAO,OAAO,SAAS,YAAY,KAAK,aAAa,SAAS;AAChE;AAEO,IAAM,YAAY,MACvB,YAAY,IAAK,OACf,UAAU,IAAK,SACf;AAEG,IAAM,SAAS,UAAkB,EAAE,OAAO;","names":[]}
|
package/dist/node/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/node/index.ts"],"sourcesContent":["export { subtle } from 'node:crypto'\n\nexport const isBrowser = () => {\n return false\n}\n\nexport const isWebworker = () => {\n return false\n}\n\nexport const getGlobal = <T extends object>() =>\n isBrowser() ? (window as unknown as T)\n : isWebworker() ? (self as unknown as T)\n : globalThis\n"],"mappings":";AAAA,SAAS,cAAc;AAEhB,IAAM,YAAY,MAAM;AAC7B,SAAO;AACT;AAEO,IAAM,cAAc,MAAM;AAC/B,SAAO;AACT;AAEO,IAAM,YAAY,MACvB,UAAU,IAAK,SACb,YAAY,IAAK,OACjB;","names":[]}
|