@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.
- package/package.json +3 -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.
|
|
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
|
|
13
|
-
* resolved by the RUNNER's tenant registry
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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
|
|
34
|
-
export const SAMPLE_TENANT = "
|
|
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 = "
|
|
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
|
|