@air-jam/server 0.9.2 → 1.0.0-beta.1

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.
Files changed (47) hide show
  1. package/bin/air-jam-server.mjs +43 -20
  2. package/dist/.tsbuildinfo +1 -0
  3. package/dist/chunk-2BHF5ZCS.js +38 -0
  4. package/dist/chunk-2BHF5ZCS.js.map +1 -0
  5. package/dist/{chunk-5ZVGSYXC.js → chunk-5YSBR6YK.js} +1 -46
  6. package/dist/chunk-5YSBR6YK.js.map +1 -0
  7. package/dist/chunk-64G5AWIQ.js +1271 -0
  8. package/dist/chunk-64G5AWIQ.js.map +1 -0
  9. package/dist/chunk-GMZVQDC6.js +54 -0
  10. package/dist/chunk-GMZVQDC6.js.map +1 -0
  11. package/dist/chunk-ILYZVHYT.js +39 -0
  12. package/dist/chunk-ILYZVHYT.js.map +1 -0
  13. package/dist/chunk-INZKL5US.js +484 -0
  14. package/dist/chunk-INZKL5US.js.map +1 -0
  15. package/dist/chunk-JYI2GKLJ.js +334 -0
  16. package/dist/chunk-JYI2GKLJ.js.map +1 -0
  17. package/dist/cli.js +31 -112
  18. package/dist/cli.js.map +1 -1
  19. package/dist/index.d.ts +31 -0
  20. package/dist/index.js +15 -5972
  21. package/dist/index.js.map +1 -1
  22. package/dist/process-lifecycle-A55YCNJN.js +8 -0
  23. package/dist/room-server-4U4TBSS5.js +13 -0
  24. package/dist/room-server-4U4TBSS5.js.map +1 -0
  25. package/dist/room-server-BO0iOvhH.d.ts +144 -0
  26. package/dist/room-server.d.ts +7 -0
  27. package/dist/room-server.js +13 -0
  28. package/dist/room-server.js.map +1 -0
  29. package/dist/room.d.ts +360 -0
  30. package/dist/room.js +17 -0
  31. package/dist/room.js.map +1 -0
  32. package/package.json +42 -29
  33. package/dist/chunk-5ZVGSYXC.js.map +0 -1
  34. package/dist/chunk-RM7AMBDY.js +0 -831
  35. package/dist/chunk-RM7AMBDY.js.map +0 -1
  36. package/dist/game-dev-D3TEAHOD.js +0 -422
  37. package/dist/game-dev-D3TEAHOD.js.map +0 -1
  38. package/dist/local-dev-state-QT7H5GUA.js +0 -270
  39. package/dist/local-dev-state-QT7H5GUA.js.map +0 -1
  40. package/dist/secure-dev-HMOGLYVC.js +0 -39
  41. package/dist/topology-PM3PI753.js +0 -140
  42. package/dist/topology-PM3PI753.js.map +0 -1
  43. package/src/project-cli/vite-config.d.mts +0 -17
  44. package/src/project-cli/vite-config.mjs +0 -121
  45. package/src/project-cli/vite-https.d.mts +0 -14
  46. package/src/project-cli/vite-https.mjs +0 -39
  47. /package/dist/{secure-dev-HMOGLYVC.js.map → process-lifecycle-A55YCNJN.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
- };