@devvit/shared-types 0.12.1-next-2025-09-04-22-32-21-5fc4acc11.0 → 0.12.1-next-2025-09-08-18-38-43-78ed48666.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/shared-types",
|
|
3
|
-
"version": "0.12.1-next-2025-09-
|
|
3
|
+
"version": "0.12.1-next-2025-09-08-18-38-43-78ed48666.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
},
|
|
34
34
|
"types": "./dist/index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@devvit/protos": "0.12.1-next-2025-09-
|
|
36
|
+
"@devvit/protos": "0.12.1-next-2025-09-08-18-38-43-78ed48666.0",
|
|
37
37
|
"jsonschema": "1.4.1",
|
|
38
38
|
"uuid": "9.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@devvit/repo-tools": "0.12.1-next-2025-09-
|
|
42
|
-
"@devvit/tsconfig": "0.12.1-next-2025-09-
|
|
41
|
+
"@devvit/repo-tools": "0.12.1-next-2025-09-08-18-38-43-78ed48666.0",
|
|
42
|
+
"@devvit/tsconfig": "0.12.1-next-2025-09-08-18-38-43-78ed48666.0",
|
|
43
43
|
"@types/redis-mock": "0.17.1",
|
|
44
44
|
"@types/uuid": "9.0.0",
|
|
45
45
|
"chokidar-cli": "3.0.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"vitest": "1.6.1"
|
|
52
52
|
},
|
|
53
53
|
"source": "./src/index.ts",
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "1c9c60672fd6a2b30e77e758618e5b65a56eb0e8"
|
|
55
55
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the port the internal server should run on. Call this when starting the server to get the
|
|
3
|
+
* port to use.
|
|
4
|
+
* @example createServer(myHandler).listen(getServerPort());
|
|
5
|
+
* @returns The port to use for the server.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getServerPort(): number;
|
|
8
|
+
//# sourceMappingURL=get-server-port.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-server-port.d.ts","sourceRoot":"","sources":["../../src/server/get-server-port.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAMtC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import process from 'node:process';
|
|
2
|
+
/**
|
|
3
|
+
* Gets the port the internal server should run on. Call this when starting the server to get the
|
|
4
|
+
* port to use.
|
|
5
|
+
* @example createServer(myHandler).listen(getServerPort());
|
|
6
|
+
* @returns The port to use for the server.
|
|
7
|
+
*/
|
|
8
|
+
export function getServerPort() {
|
|
9
|
+
const envPort = Number(process.env.WEBBIT_PORT);
|
|
10
|
+
if (isNaN(envPort)) {
|
|
11
|
+
return 3000;
|
|
12
|
+
}
|
|
13
|
+
return envPort;
|
|
14
|
+
}
|