@air-jam/server 0.9.2 → 0.9.3
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/bin/air-jam-server.mjs +43 -20
- package/dist/.tsbuildinfo +1 -0
- package/dist/chunk-AYTGY3H3.js +67 -0
- package/dist/chunk-AYTGY3H3.js.map +1 -0
- package/dist/{chunk-5ZVGSYXC.js → chunk-LWVOQ5PH.js} +50 -44
- package/dist/chunk-LWVOQ5PH.js.map +1 -0
- package/dist/chunk-PSWSCMDN.js +48 -0
- package/dist/chunk-PSWSCMDN.js.map +1 -0
- package/dist/cli.js +29 -112
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +465 -0
- package/dist/index.js +1086 -1879
- package/dist/index.js.map +1 -1
- package/dist/process-lifecycle-M4XOAN4Q.js +8 -0
- package/package.json +38 -23
- package/dist/chunk-5ZVGSYXC.js.map +0 -1
- package/dist/chunk-RM7AMBDY.js +0 -831
- package/dist/chunk-RM7AMBDY.js.map +0 -1
- package/dist/game-dev-D3TEAHOD.js +0 -422
- package/dist/game-dev-D3TEAHOD.js.map +0 -1
- package/dist/local-dev-state-QT7H5GUA.js +0 -270
- package/dist/local-dev-state-QT7H5GUA.js.map +0 -1
- package/dist/secure-dev-HMOGLYVC.js +0 -39
- package/dist/topology-PM3PI753.js +0 -140
- package/dist/topology-PM3PI753.js.map +0 -1
- package/src/project-cli/vite-config.d.mts +0 -17
- package/src/project-cli/vite-config.mjs +0 -121
- package/src/project-cli/vite-https.d.mts +0 -14
- package/src/project-cli/vite-https.mjs +0 -39
- /package/dist/{secure-dev-HMOGLYVC.js.map → process-lifecycle-M4XOAN4Q.js.map} +0 -0
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
|
|
3
|
-
export const DEFAULT_AIR_JAM_DEV_BACKEND_URL = "http://127.0.0.1:4000";
|
|
4
|
-
|
|
5
|
-
export const getAirJamHttpsServerOptions = (env = process.env) => {
|
|
6
|
-
const certFile = env.AIR_JAM_DEV_CERT_FILE;
|
|
7
|
-
const keyFile = env.AIR_JAM_DEV_KEY_FILE;
|
|
8
|
-
if (!certFile || !keyFile) {
|
|
9
|
-
return undefined;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
if (!fs.existsSync(certFile) || !fs.existsSync(keyFile)) {
|
|
13
|
-
return undefined;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return {
|
|
17
|
-
cert: fs.readFileSync(certFile),
|
|
18
|
-
key: fs.readFileSync(keyFile),
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const getAirJamDevBackendUrl = (env = process.env) =>
|
|
23
|
-
env.AIR_JAM_DEV_PROXY_BACKEND_URL?.trim() || DEFAULT_AIR_JAM_DEV_BACKEND_URL;
|
|
24
|
-
|
|
25
|
-
export const getAirJamDevProxyOptions = (env = process.env) => {
|
|
26
|
-
const target = getAirJamDevBackendUrl(env);
|
|
27
|
-
|
|
28
|
-
return {
|
|
29
|
-
"/socket.io": {
|
|
30
|
-
target,
|
|
31
|
-
ws: true,
|
|
32
|
-
changeOrigin: true,
|
|
33
|
-
},
|
|
34
|
-
"/__airjam": {
|
|
35
|
-
target,
|
|
36
|
-
changeOrigin: true,
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
};
|
|
File without changes
|