Package not found. Please check the package name and try again.

@irtio/cli 0.2.0 → 0.4.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.
@@ -255,6 +255,7 @@ function decodeAlarms(bytes) {
255
255
 
256
256
  // ../supervisor/src/auth.ts
257
257
  import { createHmac, timingSafeEqual } from "crypto";
258
+ import { isLocalhostOrigin, originAllowed } from "@irtio/protocol";
258
259
  var TokenBucket = class {
259
260
  constructor(capacity, refillPerSec) {
260
261
  this.capacity = capacity;
@@ -298,11 +299,6 @@ var BucketMap = class {
298
299
  }
299
300
  }
300
301
  };
301
- function originAllowed(origins, allowNoOrigin, origin) {
302
- if (origin === void 0 || origin === "") return allowNoOrigin;
303
- if (origins.includes("*")) return true;
304
- return origins.includes(origin);
305
- }
306
302
  var JWT_CLOCK_SKEW_MS = 6e4;
307
303
  var JWT_SUB_RE = /^[\x21-\x7e]{1,128}$/;
308
304
  function verifyJwt(issuers, token, projectId, now = Date.now()) {
package/dist/index.js CHANGED
@@ -58,7 +58,7 @@ switch (command) {
58
58
  break;
59
59
  }
60
60
  case "dev": {
61
- const { dev } = await import("./dev-LOSTB4CD.js");
61
+ const { dev } = await import("./dev-7UZZGE4U.js");
62
62
  await dev(args);
63
63
  break;
64
64
  }
@@ -79,7 +79,7 @@ switch (command) {
79
79
  }
80
80
  case "deploy": {
81
81
  if (args.includes("--static")) {
82
- const { staticDeploy } = await import("./static-deploy-2LB6H54Y.js");
82
+ const { staticDeploy } = await import("./static-deploy-LZXTDYNY.js");
83
83
  await staticDeploy(args);
84
84
  break;
85
85
  }
@@ -150,6 +150,9 @@ async function runStaticDeploy(options) {
150
150
  });
151
151
  if (activated.url !== void 0) {
152
152
  log(pc.green(`live: ${activated.url}`));
153
+ if (activated.origin !== void 0) {
154
+ log(pc.dim(`allowed origin: ${activated.origin} (localhost is always allowed)`));
155
+ }
153
156
  } else {
154
157
  log(
155
158
  pc.green(
@@ -163,7 +166,8 @@ async function runStaticDeploy(options) {
163
166
  version: activated.version,
164
167
  files: files.length,
165
168
  bytes: total,
166
- ...activated.url !== void 0 ? { url: activated.url } : {}
169
+ ...activated.url !== void 0 ? { url: activated.url } : {},
170
+ ...activated.origin !== void 0 ? { origin: activated.origin } : {}
167
171
  };
168
172
  }
169
173
  async function staticDeploy(args, deps = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@irtio/cli",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "irtio CLI: local dev server, room scaffolding, bot simulation, deploy, logs and rooms",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -29,12 +29,12 @@
29
29
  "esbuild": "^0.27.3",
30
30
  "picocolors": "^1.1.1",
31
31
  "ws": "^8.18.0",
32
- "@irtio/bots": "0.2.0",
33
- "@irtio/client": "0.2.0",
34
- "@irtio/runtime": "0.2.0",
35
- "@irtio/schema": "0.2.0",
36
- "@irtio/protocol": "0.2.0",
37
- "@irtio/server": "0.2.0"
32
+ "@irtio/bots": "0.4.0",
33
+ "@irtio/client": "0.4.0",
34
+ "@irtio/protocol": "0.4.0",
35
+ "@irtio/runtime": "0.4.0",
36
+ "@irtio/schema": "0.4.0",
37
+ "@irtio/server": "0.4.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@dimforge/rapier3d-compat": "0.20.0",