launchprep 0.5.4 → 0.5.5
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/interactive.mjs +8 -1
- package/src/questions.mjs +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "launchprep",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "Read-only CLI that scans your AI-built app and reports what will break before real users hit it — auth, tenant isolation, data, payments, GDPR. 117 checks run free on your machine.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/interactive.mjs
CHANGED
|
@@ -20,6 +20,13 @@ const C = { d: '\x1b[2m', b: '\x1b[1m', o: '\x1b[0m', c: '\x1b[36m', g: '\x1b[32
|
|
|
20
20
|
// the shape of the question: which key it sets, whether it is a yes/no or a
|
|
21
21
|
// choice, and (for a choice) the options. Parsing the example rather than
|
|
22
22
|
// duplicating it keeps one source of truth: questions.mjs.
|
|
23
|
+
// One answer that means several. "worldwide" is the common case for a launch -
|
|
24
|
+
// and answering "other" instead used to match only the [ru, kz, other] rules,
|
|
25
|
+
// so an app serving everyone was never asked the GDPR, UK GDPR or Canadian
|
|
26
|
+
// questions. Expanding it here keeps questions.mjs the single source of the
|
|
27
|
+
// wording while the gate still sees real jurisdiction values.
|
|
28
|
+
const EXPANDS = { worldwide: ['eu', 'uk', 'us', 'ca', 'ru', 'kz', 'other'] };
|
|
29
|
+
|
|
23
30
|
export function shapeOf(answerExample) {
|
|
24
31
|
const dash = answerExample.indexOf('—');
|
|
25
32
|
const json = (dash >= 0 ? answerExample.slice(0, dash) : answerExample).trim();
|
|
@@ -39,7 +46,7 @@ export function shapeOf(answerExample) {
|
|
|
39
46
|
// (has_rag), or a plain string (business_model).
|
|
40
47
|
const apply = (stated, value) => {
|
|
41
48
|
if (nested) stated[nested[1]] = { ...(stated[nested[1]] || {}), [nested[2]]: value };
|
|
42
|
-
else if (isArray) stated[topKey] = [value];
|
|
49
|
+
else if (isArray) stated[topKey] = EXPANDS[value] || [value];
|
|
43
50
|
else if (isBool) stated[topKey] = (value === 'yes' || value === true);
|
|
44
51
|
else stated[topKey] = value;
|
|
45
52
|
return stated;
|
package/src/questions.mjs
CHANGED
|
@@ -18,7 +18,12 @@ export const QUESTION = {
|
|
|
18
18
|
// --- who and where -------------------------------------------------------
|
|
19
19
|
jurisdictions: {
|
|
20
20
|
ask: 'Where do your users live?',
|
|
21
|
-
|
|
21
|
+
// "worldwide" is first because it is the honest answer for most launches,
|
|
22
|
+
// and because "other" is NOT a synonym for it: "other" matches only the
|
|
23
|
+
// [ru, kz, other] rules, so a global app answering "other" silently skipped
|
|
24
|
+
// GDPR, UK GDPR and the Canadian checks. worldwide expands to every
|
|
25
|
+
// jurisdiction (see EXPANDS in interactive.mjs) so nothing is missed.
|
|
26
|
+
answer: '"jurisdictions": ["eu"] — any of: worldwide, eu, uk, us, ca, ru, kz, other',
|
|
22
27
|
why: 'decides which privacy laws reach you at all',
|
|
23
28
|
},
|
|
24
29
|
business_model: {
|