@devvit/shared-types 0.10.19-next-2024-04-23-27f06a745.0 → 0.10.20-next-2024-04-24-8b36e13f0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/PlatformUtil.d.ts +1 -2
- package/PlatformUtil.d.ts.map +1 -1
- package/PlatformUtil.js +1 -7
- package/package.json +6 -6
package/PlatformUtil.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* Returns true for any kind of worker (web worker, Node.js, v8go, etc). False
|
3
|
-
* for
|
3
|
+
* for NodeRuntime.
|
4
4
|
*/
|
5
5
|
export declare function isWorker(): boolean;
|
6
6
|
/**
|
@@ -8,7 +8,6 @@ export declare function isWorker(): boolean;
|
|
8
8
|
* worker.
|
9
9
|
*/
|
10
10
|
export declare function isPlatformGo(): boolean;
|
11
|
-
export declare function isPlatformWeb(): boolean;
|
12
11
|
export declare function isPlatformNode(): boolean;
|
13
12
|
/** Returns true if no GUI nor rich debug console. */
|
14
13
|
export declare function isHeadless(): boolean;
|
package/PlatformUtil.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PlatformUtil.d.ts","sourceRoot":"","sources":["../src/PlatformUtil.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAOlC;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAKtC;AAED,wBAAgB,
|
1
|
+
{"version":3,"file":"PlatformUtil.d.ts","sourceRoot":"","sources":["../src/PlatformUtil.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAOlC;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAKtC;AAED,wBAAgB,cAAc,IAAI,OAAO,CAGxC;AAED,qDAAqD;AACrD,wBAAgB,UAAU,IAAI,OAAO,CAGpC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAExC"}
|
package/PlatformUtil.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* Returns true for any kind of worker (web worker, Node.js, v8go, etc). False
|
3
|
-
* for
|
3
|
+
* for NodeRuntime.
|
4
4
|
*/
|
5
5
|
export function isWorker() {
|
6
6
|
return ((typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) ||
|
@@ -15,12 +15,6 @@ export function isWorker() {
|
|
15
15
|
export function isPlatformGo() {
|
16
16
|
return globalThis.devvit?.compute?.platform === 'go';
|
17
17
|
}
|
18
|
-
export function isPlatformWeb() {
|
19
|
-
// to-do: populate globalThis.devvit?.compute.platform for the web.
|
20
|
-
// The BrowserRuntime executes in a Window. The NodeRuntime has no window
|
21
|
-
// global and the platform isn't Go.
|
22
|
-
return !isPlatformGo() && !isPlatformNode();
|
23
|
-
}
|
24
18
|
export function isPlatformNode() {
|
25
19
|
// to-do: populate globalThis.devvit?.compute.platform for Node.js.
|
26
20
|
return typeof process !== 'undefined' && process.release?.name === 'node';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@devvit/shared-types",
|
3
|
-
"version": "0.10.
|
3
|
+
"version": "0.10.20-next-2024-04-24-8b36e13f0.0",
|
4
4
|
"license": "BSD-3-Clause",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -23,12 +23,12 @@
|
|
23
23
|
},
|
24
24
|
"types": "./index.d.ts",
|
25
25
|
"dependencies": {
|
26
|
-
"@devvit/protos": "0.10.
|
26
|
+
"@devvit/protos": "0.10.20-next-2024-04-24-8b36e13f0.0"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
|
-
"@devvit/eslint-config": "0.10.
|
30
|
-
"@devvit/repo-tools": "0.10.
|
31
|
-
"@devvit/tsconfig": "0.10.
|
29
|
+
"@devvit/eslint-config": "0.10.19",
|
30
|
+
"@devvit/repo-tools": "0.10.19",
|
31
|
+
"@devvit/tsconfig": "0.10.20-next-2024-04-24-8b36e13f0.0",
|
32
32
|
"eslint": "8.9.0",
|
33
33
|
"typescript": "5.3.2",
|
34
34
|
"vitest": "0.31.0"
|
@@ -37,5 +37,5 @@
|
|
37
37
|
"directory": "dist"
|
38
38
|
},
|
39
39
|
"source": "./src/index.ts",
|
40
|
-
"gitHead": "
|
40
|
+
"gitHead": "b36ce41b5daf76541b4acd48dae6122799efe503"
|
41
41
|
}
|