@tokenoftrust/cli 6.8.0 → 6.8.1
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 +1 -1
- package/src/declared-config.mjs +6 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenoftrust/cli",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.1",
|
|
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/declared-config.mjs
CHANGED
|
@@ -399,11 +399,12 @@ export const COMPLIANCE_OBLIGATIONS = Object.freeze([
|
|
|
399
399
|
/**
|
|
400
400
|
* Does the declared block require age/identity verification? Mirrors
|
|
401
401
|
* `ageVerificationRequired` in compliance-obligations.ts: required unless
|
|
402
|
-
* `ageVerificationRequired: false`, and always for a store that sells nicotine
|
|
402
|
+
* `ageVerificationRequired: false`, and always for a store that sells nicotine
|
|
403
|
+
* (`nicotineWarning`) or declares a `ruleProfile`.
|
|
403
404
|
* @param {Record<string, any> | null | undefined} compliance
|
|
404
405
|
*/
|
|
405
406
|
export function declaresAgeVerificationRequired(compliance) {
|
|
406
|
-
return compliance?.ageVerificationRequired !== false || !!compliance?.nicotineWarning;
|
|
407
|
+
return compliance?.ageVerificationRequired !== false || !!compliance?.nicotineWarning || !!compliance?.ruleProfile;
|
|
407
408
|
}
|
|
408
409
|
|
|
409
410
|
/**
|
|
@@ -584,10 +585,11 @@ export function complianceFindings(config, file = ".tot/config.json") {
|
|
|
584
585
|
"`capabilities.exciseTax` cannot be disabled for a store with `compliance.nicotineWarning` or `compliance.exciseTax` — the hosted preview refuses this revision.",
|
|
585
586
|
"Remove `capabilities.exciseTax.enabled: false` from .tot/config.json."));
|
|
586
587
|
}
|
|
587
|
-
if (compliance?.ageVerificationRequired === false && compliance?.nicotineWarning) {
|
|
588
|
+
if (compliance?.ageVerificationRequired === false && (compliance?.nicotineWarning || compliance?.ruleProfile)) {
|
|
588
589
|
out.push(mk(WARN, "compliance-age-verification-policy", `${file} compliance`,
|
|
589
590
|
"`compliance.ageVerificationRequired: false` has no effect on a store that sells nicotine " +
|
|
590
|
-
"(`compliance.nicotineWarning`): platform policy keeps age/ID
|
|
591
|
+
"(`compliance.nicotineWarning` or `compliance.ruleProfile`): platform policy keeps age/ID " +
|
|
592
|
+
"verification required at checkout.",
|
|
591
593
|
"Remove `compliance.ageVerificationRequired` from .tot/config.json, or turn only the arrival popup off " +
|
|
592
594
|
"with `features.ageGate: false`."));
|
|
593
595
|
}
|