gamedev 0.2.3 → 0.2.4

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.
@@ -25,14 +25,14 @@
25
25
  <meta name="apple-mobile-web-app-capable" content="yes" />
26
26
  <meta name="mobile-web-app-capable" content="yes" />
27
27
  <link rel="preload" href="/SpaceMono-regular.woff2" as="font" type="font/woff2" crossorigin />
28
- <link rel="stylesheet" type="text/css" href="/index.css?v=1774744786197" />
28
+ <link rel="stylesheet" type="text/css" href="/index.css?v=1774801170959" />
29
29
  <script>
30
30
  window.PARTICLES_PATH = '/particles-4YQR4CFO.js'
31
31
  </script>
32
32
  </head>
33
33
  <body>
34
34
  <div id="root"></div>
35
- <script src="/env.js?v=1774744786197"></script>
35
+ <script src="/env.js?v=1774801170959"></script>
36
36
  <script src="/admin-3ATEWWG5.js" type="module"></script>
37
37
  </body>
38
38
  </html>
@@ -44,14 +44,14 @@
44
44
  <meta name="theme-color" content="#ffffff"> -->
45
45
 
46
46
  <link rel="preload" href="/SpaceMono-regular.woff2" as="font" type="font/woff2" crossorigin />
47
- <link rel="stylesheet" type="text/css" href="/index.css?v=1774744786196" />
47
+ <link rel="stylesheet" type="text/css" href="/index.css?v=1774801170822" />
48
48
  <script>
49
49
  window.PARTICLES_PATH = '/particles-4YQR4CFO.js'
50
50
  </script>
51
51
  </head>
52
52
  <body>
53
53
  <div id="root"></div>
54
- <script src="/env.js?v=1774744786196"></script>
54
+ <script src="/env.js?v=1774801170822"></script>
55
55
  <script src="/index-4H3CVLQ5.js" type="module"></script>
56
56
  </body>
57
57
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gamedev",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "type": "module",
5
5
  "main": "index.node.js",
6
6
  "types": "index.d.ts",
@@ -10,7 +10,7 @@ import {
10
10
  handleRuntimeCredentialCommand,
11
11
  } from './adminCredentials.js'
12
12
  import { ADMIN_SHUTDOWN_COMMAND, handleAdminShutdownCommand } from './adminShutdown.js'
13
- import { hasSupportedAdminCode } from './runtimeBootstrap.js'
13
+ import { allowsOpenAdminAccess, hasSupportedAdminCode } from './runtimeBootstrap.js'
14
14
  import { describeWebSocketConnection, resolveWebSocketConnection } from './websocketConnection.js'
15
15
  import { getMaxUploadSizeBytes, getMaxUploadSizeMb } from './worldLimits.js'
16
16
 
@@ -390,6 +390,9 @@ export async function admin(
390
390
  }
391
391
 
392
392
  async function getCapabilitiesFromAuthToken(token) {
393
+ if (allowsOpenAdminAccess(process.env)) {
394
+ return { builder: true, deploy: true }
395
+ }
393
396
  if (!token || !db) return { builder: false, deploy: false }
394
397
  const worldId = world?.network?.worldId || process.env.WORLD_ID
395
398
  const claims = await readJWT(token, { worldId })
@@ -828,9 +831,10 @@ export async function admin(
828
831
  ws.close()
829
832
  return
830
833
  }
834
+ const openAdminAccess = allowsOpenAdminAccess(process.env)
831
835
  const codeCapabilities = getCapabilitiesFromAdminCode(data?.code)
832
- let builderOk = codeCapabilities.builder
833
- let deployOk = codeCapabilities.deploy
836
+ let builderOk = openAdminAccess || codeCapabilities.builder
837
+ let deployOk = openAdminAccess || codeCapabilities.deploy
834
838
  if (!builderOk || !deployOk) {
835
839
  const payloadToken = typeof data?.authToken === 'string' ? data.authToken.trim() : ''
836
840
  const headerToken = getRuntimeAuthTokenFromRequest(req) || ''