@tokenoftrust/cli 2.0.14 → 2.0.15

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/validate.mjs +1 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenoftrust/cli",
3
- "version": "2.0.14",
3
+ "version": "2.0.15",
4
4
  "description": "Token of Trust developer CLI — clone a tenant store, run it locally with save→reload, and submit it for preview. Installs the `tot` command.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Token of Trust",
package/src/validate.mjs CHANGED
@@ -212,7 +212,6 @@ export const KNOWN_EMBEDS = [
212
212
  },
213
213
  ];
214
214
  const KNOWN_EMBED_SLUGS = new Set(KNOWN_EMBEDS.map((p) => p.slug));
215
- const EMBED_ALWAYS_ALLOWED = new Set(["static.cloudflareinsights.com", "cloudflareinsights.com"]);
216
215
  const EMBED_SRC_RE = /<(?:script|iframe)\b[^>]*\bsrc\s*=\s*["']([^"']+)["']/gi;
217
216
 
218
217
  /** Classify one HTML doc: which known providers + unknown external src origins. */
@@ -229,8 +228,7 @@ function scanHtmlForEmbeds(html) {
229
228
  } catch {
230
229
  continue;
231
230
  }
232
- const host = new URL(origin).hostname;
233
- if (EMBED_ALWAYS_ALLOWED.has(host) || catalogOrigins.has(origin)) continue;
231
+ if (catalogOrigins.has(origin)) continue;
234
232
  unknown.add(origin);
235
233
  }
236
234
  return { knownSlugs, unknownOrigins: [...unknown] };