@camstack/addon-cloudflare 1.1.19 → 1.1.21

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.
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  enumerable: true
22
22
  }) : target, mod));
23
23
  //#endregion
24
- const require_dist = require("../dist-CcLXZ_31.js");
24
+ const require_dist = require("../dist-CKwL81JS.js");
25
25
  let node_path = require("node:path");
26
26
  node_path = __toESM(node_path);
27
27
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { a as BaseAddon, c as array, d as literal, f as number, l as boolean, m as string, n as defineCustomActions, o as EventCategory, p as object, r as networkAccessCapability, s as _enum, t as customAction } from "../dist-jW8o528S.mjs";
1
+ import { a as BaseAddon, c as array, d as literal, f as number, l as boolean, m as string, n as defineCustomActions, o as EventCategory, p as object, r as networkAccessCapability, s as _enum, t as customAction } from "../dist-B_c-nZHY.mjs";
2
2
  import * as path from "node:path";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { spawn } from "node:child_process";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_dist = require("../dist-CcLXZ_31.js");
2
+ const require_dist = require("../dist-CKwL81JS.js");
3
3
  //#region src/turn/cloudflare-turn.ts
4
4
  /**
5
5
  * Cloudflare returns ICE servers in several flavours depending on which
@@ -109,7 +109,7 @@ var CloudflareTurnService = class {
109
109
  }
110
110
  if (!res.ok) {
111
111
  const text = await res.text().catch(() => "");
112
- const hint = res.status === 404 && text.includes("cannot find specified key") ? "The \"TURN Key ID\" does not match any of your TURN apps. Open dash.cloudflare.com → Calls → TURN App and copy the Token ID shown on that page (not the Cloudflare Account ID)." : res.status === 401 || res.status === 403 ? "Authentication failed — the API Token is invalid or doesn't belong to this TURN app. Regenerate the API Token from the TURN app's page." : void 0;
112
+ const hint = res.status === 404 && text.includes("cannot find specified key") ? "The \"TURN Key ID\" does not match any of your TURN apps. Open dash.cloudflare.com → Realtime → TURN and copy the Token ID shown on that page (not the Cloudflare Account ID)." : res.status === 401 || res.status === 403 ? "Authentication failed — the API Token is invalid or doesn't belong to this TURN app. Regenerate the API Token from the TURN app's page." : void 0;
113
113
  return {
114
114
  ok: false,
115
115
  status: res.status,
@@ -191,7 +191,7 @@ var CloudflareTurnService = class {
191
191
  url: `${TURN_API_BASE}/${keyMasked}/credentials/generate-ice-servers`,
192
192
  keyMasked,
193
193
  tokenLength: this.config.apiToken.length,
194
- hint: looksLikeKeyMismatch ? "The \"TURN Key ID\" field does NOT accept the Cloudflare Account ID. Open dash.cloudflare.com → Calls → TURN App and copy the Token ID shown there (a separate hex id from your account)." : void 0
194
+ hint: looksLikeKeyMismatch ? "The \"TURN Key ID\" field does NOT accept the Cloudflare Account ID. Open dash.cloudflare.com → Realtime → TURN and copy the Token ID shown there (a separate hex id from your account)." : void 0
195
195
  } });
196
196
  return this.cached?.servers ?? [];
197
197
  }
@@ -294,7 +294,7 @@ var CloudflareTurnAddon = class extends require_dist.BaseAddon {
294
294
  key: "turnHelp",
295
295
  label: "How to get the TURN Key ID + API Token",
296
296
  format: "html",
297
- content: "<ul><li>Open <a href=\"https://dash.cloudflare.com/?to=/:account/calls\" target=\"_blank\" rel=\"noopener noreferrer\">Cloudflare Dashboard → Calls</a> (the product's URL path is still <code>/calls</code> after the Realtime rebrand).</li><li>Pick the <strong>TURN</strong> section and click <strong>Create TURN App</strong> (or pick an existing one).</li><li>Cloudflare generates a pair: <strong>Token ID</strong> (hex string, also shown as \"Key ID\" in some docs) and an <strong>API Token</strong>. Both are app-scoped — they are <em>NOT</em> the same as your Cloudflare Account ID.</li><li>Paste them in the fields below.</li><li>The integration calls <code>rtc.live.cloudflare.com/v1/turn/keys/&lt;TokenId&gt;/credentials/generate-ice-servers</code> to mint short-lived ICE credentials per WebRTC session.</li></ul>",
297
+ content: "<ul><li>Open <a href=\"https://dash.cloudflare.com/?to=/:account/realtime/turn/overview\" target=\"_blank\" rel=\"noopener noreferrer\">Cloudflare Dashboard → Realtime TURN</a>.</li><li>Pick the <strong>TURN</strong> section and click <strong>Create TURN App</strong> (or pick an existing one).</li><li>Cloudflare generates a pair: <strong>Token ID</strong> (hex string, also shown as \"Key ID\" in some docs) and an <strong>API Token</strong>. Both are app-scoped — they are <em>NOT</em> the same as your Cloudflare Account ID.</li><li>Paste them in the fields below.</li><li>The integration calls <code>rtc.live.cloudflare.com/v1/turn/keys/&lt;TokenId&gt;/credentials/generate-ice-servers</code> to mint short-lived ICE credentials per WebRTC session.</li></ul>",
298
298
  variant: "info"
299
299
  },
300
300
  this.field({
@@ -328,7 +328,7 @@ var CloudflareTurnAddon = class extends require_dist.BaseAddon {
328
328
  key: "usageHelp",
329
329
  label: "Usage & free quota",
330
330
  format: "html",
331
- content: "<p>Cloudflare's TURN credentials endpoint we use (<code>Calls:Read</code> scope) does not return usage / remaining-free-credit. Check current consumption + free quota in the dashboard:</p><ul><li><a href=\"https://dash.cloudflare.com/?to=/:account/calls\" target=\"_blank\" rel=\"noopener noreferrer\">Cloudflare Dashboard → Calls</a> — overview of TURN apps with usage graphs and current-month consumption (the URL still says <code>/calls</code> after the \"Realtime\" rebrand).</li></ul><p class=\"text-foreground-subtle text-xs\">Wiring a live counter requires a separate API token with <code>Account → Analytics → Read</code> scope and Cloudflare's GraphQL Analytics endpoint. Filed as a follow-up; use the dashboard link above in the meantime.</p>",
331
+ content: "<p>Cloudflare's TURN credentials endpoint we use (<code>Calls:Read</code> scope) does not return usage / remaining-free-credit. Check current consumption + free quota in the dashboard:</p><ul><li><a href=\"https://dash.cloudflare.com/?to=/:account/realtime/turn/overview\" target=\"_blank\" rel=\"noopener noreferrer\">Cloudflare Dashboard → Realtime → TURN</a> — overview of TURN apps with usage graphs and current-month consumption.</li></ul><p class=\"text-foreground-subtle text-xs\">Wiring a live counter requires a separate API token with <code>Account → Analytics → Read</code> scope and Cloudflare's GraphQL Analytics endpoint. Filed as a follow-up; use the dashboard link above in the meantime.</p>",
332
332
  variant: "info"
333
333
  }
334
334
  ]
@@ -1,4 +1,4 @@
1
- import { a as BaseAddon, d as literal, f as number, i as turnProviderCapability, l as boolean, m as string, n as defineCustomActions, p as object, t as customAction, u as discriminatedUnion } from "../dist-jW8o528S.mjs";
1
+ import { a as BaseAddon, d as literal, f as number, i as turnProviderCapability, l as boolean, m as string, n as defineCustomActions, p as object, t as customAction, u as discriminatedUnion } from "../dist-B_c-nZHY.mjs";
2
2
  //#region src/turn/cloudflare-turn.ts
3
3
  /**
4
4
  * Cloudflare returns ICE servers in several flavours depending on which
@@ -108,7 +108,7 @@ var CloudflareTurnService = class {
108
108
  }
109
109
  if (!res.ok) {
110
110
  const text = await res.text().catch(() => "");
111
- const hint = res.status === 404 && text.includes("cannot find specified key") ? "The \"TURN Key ID\" does not match any of your TURN apps. Open dash.cloudflare.com → Calls → TURN App and copy the Token ID shown on that page (not the Cloudflare Account ID)." : res.status === 401 || res.status === 403 ? "Authentication failed — the API Token is invalid or doesn't belong to this TURN app. Regenerate the API Token from the TURN app's page." : void 0;
111
+ const hint = res.status === 404 && text.includes("cannot find specified key") ? "The \"TURN Key ID\" does not match any of your TURN apps. Open dash.cloudflare.com → Realtime → TURN and copy the Token ID shown on that page (not the Cloudflare Account ID)." : res.status === 401 || res.status === 403 ? "Authentication failed — the API Token is invalid or doesn't belong to this TURN app. Regenerate the API Token from the TURN app's page." : void 0;
112
112
  return {
113
113
  ok: false,
114
114
  status: res.status,
@@ -190,7 +190,7 @@ var CloudflareTurnService = class {
190
190
  url: `${TURN_API_BASE}/${keyMasked}/credentials/generate-ice-servers`,
191
191
  keyMasked,
192
192
  tokenLength: this.config.apiToken.length,
193
- hint: looksLikeKeyMismatch ? "The \"TURN Key ID\" field does NOT accept the Cloudflare Account ID. Open dash.cloudflare.com → Calls → TURN App and copy the Token ID shown there (a separate hex id from your account)." : void 0
193
+ hint: looksLikeKeyMismatch ? "The \"TURN Key ID\" field does NOT accept the Cloudflare Account ID. Open dash.cloudflare.com → Realtime → TURN and copy the Token ID shown there (a separate hex id from your account)." : void 0
194
194
  } });
195
195
  return this.cached?.servers ?? [];
196
196
  }
@@ -293,7 +293,7 @@ var CloudflareTurnAddon = class extends BaseAddon {
293
293
  key: "turnHelp",
294
294
  label: "How to get the TURN Key ID + API Token",
295
295
  format: "html",
296
- content: "<ul><li>Open <a href=\"https://dash.cloudflare.com/?to=/:account/calls\" target=\"_blank\" rel=\"noopener noreferrer\">Cloudflare Dashboard → Calls</a> (the product's URL path is still <code>/calls</code> after the Realtime rebrand).</li><li>Pick the <strong>TURN</strong> section and click <strong>Create TURN App</strong> (or pick an existing one).</li><li>Cloudflare generates a pair: <strong>Token ID</strong> (hex string, also shown as \"Key ID\" in some docs) and an <strong>API Token</strong>. Both are app-scoped — they are <em>NOT</em> the same as your Cloudflare Account ID.</li><li>Paste them in the fields below.</li><li>The integration calls <code>rtc.live.cloudflare.com/v1/turn/keys/&lt;TokenId&gt;/credentials/generate-ice-servers</code> to mint short-lived ICE credentials per WebRTC session.</li></ul>",
296
+ content: "<ul><li>Open <a href=\"https://dash.cloudflare.com/?to=/:account/realtime/turn/overview\" target=\"_blank\" rel=\"noopener noreferrer\">Cloudflare Dashboard → Realtime TURN</a>.</li><li>Pick the <strong>TURN</strong> section and click <strong>Create TURN App</strong> (or pick an existing one).</li><li>Cloudflare generates a pair: <strong>Token ID</strong> (hex string, also shown as \"Key ID\" in some docs) and an <strong>API Token</strong>. Both are app-scoped — they are <em>NOT</em> the same as your Cloudflare Account ID.</li><li>Paste them in the fields below.</li><li>The integration calls <code>rtc.live.cloudflare.com/v1/turn/keys/&lt;TokenId&gt;/credentials/generate-ice-servers</code> to mint short-lived ICE credentials per WebRTC session.</li></ul>",
297
297
  variant: "info"
298
298
  },
299
299
  this.field({
@@ -327,7 +327,7 @@ var CloudflareTurnAddon = class extends BaseAddon {
327
327
  key: "usageHelp",
328
328
  label: "Usage & free quota",
329
329
  format: "html",
330
- content: "<p>Cloudflare's TURN credentials endpoint we use (<code>Calls:Read</code> scope) does not return usage / remaining-free-credit. Check current consumption + free quota in the dashboard:</p><ul><li><a href=\"https://dash.cloudflare.com/?to=/:account/calls\" target=\"_blank\" rel=\"noopener noreferrer\">Cloudflare Dashboard → Calls</a> — overview of TURN apps with usage graphs and current-month consumption (the URL still says <code>/calls</code> after the \"Realtime\" rebrand).</li></ul><p class=\"text-foreground-subtle text-xs\">Wiring a live counter requires a separate API token with <code>Account → Analytics → Read</code> scope and Cloudflare's GraphQL Analytics endpoint. Filed as a follow-up; use the dashboard link above in the meantime.</p>",
330
+ content: "<p>Cloudflare's TURN credentials endpoint we use (<code>Calls:Read</code> scope) does not return usage / remaining-free-credit. Check current consumption + free quota in the dashboard:</p><ul><li><a href=\"https://dash.cloudflare.com/?to=/:account/realtime/turn/overview\" target=\"_blank\" rel=\"noopener noreferrer\">Cloudflare Dashboard → Realtime → TURN</a> — overview of TURN apps with usage graphs and current-month consumption.</li></ul><p class=\"text-foreground-subtle text-xs\">Wiring a live counter requires a separate API token with <code>Account → Analytics → Read</code> scope and Cloudflare's GraphQL Analytics endpoint. Filed as a follow-up; use the dashboard link above in the meantime.</p>",
331
331
  variant: "info"
332
332
  }
333
333
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-cloudflare",
3
- "version": "1.1.19",
3
+ "version": "1.1.21",
4
4
  "description": "Cloudflare bundle — Tunnel (network-access) + TURN relay (turn-provider). Multi-entry npm package shipping 2 addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",