@tokenoftrust/cli 1.3.1-rc.2 → 1.3.2

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 +3 -2
  2. package/src/sample.mjs +16 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenoftrust/cli",
3
- "version": "1.3.1-rc.2",
3
+ "version": "1.3.2",
4
4
  "description": "Token of Trust developer CLI — check out 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",
@@ -36,6 +36,7 @@
36
36
  "registry": "https://registry.npmjs.org"
37
37
  },
38
38
  "scripts": {
39
- "test": "node --test"
39
+ "test": "node --test",
40
+ "prepublishOnly": "node ../../scripts/build/check-cli-clean.mjs ."
40
41
  }
41
42
  }
package/src/sample.mjs CHANGED
@@ -9,16 +9,19 @@
9
9
  * regulated tenant's identity so the runner's tenant registry resolves it with
10
10
  * its `compliance` block on.
11
11
  *
12
- * WHY GIANTVAPES (not a novel synthetic domain): compliance + catalog are
13
- * resolved by the RUNNER's tenant registry (apps/storefront/src/config/tenants.ts),
14
- * keyed by domain. `giantvapes.com` is a registered 21+/PACT vape store WITH a
15
- * `compliance` block and a 50-product catalog fixture baked into the runner, so
16
- * the sample lights up age-gate + nicotine warning + a populated catalog with
17
- * zero server. A truly novel domain (e.g. "sample.example") is unclaimed the
18
- * runner falls back to HOME_TENANT (siteType "marketing", NO compliance, empty
19
- * catalog), which would defeat the whole "the free taste still does compliance"
20
- * goalso we deliberately borrow giantvapes' identity for the sample. It's the
21
- * smallest of the vapor tenants (448K), so it keeps the npm tarball light.
12
+ * WHY sample-store.example (a FICTIONAL store, not a real merchant): compliance
13
+ * is resolved by the RUNNER's SANITIZED tenant registry
14
+ * (apps/storefront/src/config/tenants.ts rewritten at build time by
15
+ * scripts/build/build-runner.mjs), keyed by domain. The runner registers ONE
16
+ * generic sample tenant, `sample-store.example`, that carries a `compliance`
17
+ * block (minAge 21, nicotineWarning), so the sample lights up the age-gate +
18
+ * nicotine warning off a NON-merchant identity with zero server. The bundled
19
+ * template below (`template/sample-store/`) is neutral, fictional "Sample Vapor
20
+ * Co." content no real merchant's brand, copy, or assets ship here.
21
+ *
22
+ * (Earlier this borrowed a real vape merchant's identity + content to get a
23
+ * populated catalog; that leaked private merchant IP into public npm and was
24
+ * replaced — see the H1/H2 runner-sanitization work — with this generic sample.)
22
25
  *
23
26
  * Dependency-free (node:fs + node:path only).
24
27
  */
@@ -30,10 +33,10 @@ import { dirname, join, resolve } from "node:path";
30
33
 
31
34
  const here = dirname(fileURLToPath(import.meta.url)); // packages/cli/src
32
35
 
33
- /** The tenant identity the sample borrows so compliance + catalog resolve (see module doc). */
34
- export const SAMPLE_TENANT = "giantvapes";
36
+ /** The generic sample tenant the runner registers with a compliance block (see module doc). */
37
+ export const SAMPLE_TENANT = "sample-store.example";
35
38
  /** Dotted scope → the runner's path-prefix route + registry lookup (must contain a dot per context.mjs). */
36
- export const SAMPLE_SCOPE = "giantvapes.com";
39
+ export const SAMPLE_SCOPE = "sample-store.example";
37
40
  /** Default directory name scaffolded when the user doesn't name one. */
38
41
  export const SAMPLE_DIR_NAME = "sample-store";
39
42