@funnelsgrove/cli 0.1.365 → 0.1.367

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 (34) hide show
  1. package/README.md +16 -0
  2. package/dist/cli.js +52 -0
  3. package/dist/projectSetupCommands.d.ts +74 -0
  4. package/dist/projectSetupCommands.js +107 -0
  5. package/funnel-contract-compatibility.json +35 -35
  6. package/package.json +4 -4
  7. package/template_docs/.funnelsgrove-docs.json +10 -10
  8. package/template_docs/docs/funnelsgrove/START-HERE.md +1 -1
  9. package/template_docs/docs/funnelsgrove/contracts/content-answers.md +2 -2
  10. package/template_docs/docs/funnelsgrove/contracts/payments.md +5 -3
  11. package/template_docs/docs/funnelsgrove/migrations/step-contract-v3.md +1 -1
  12. package/template_docs/docs/funnelsgrove/recipes/add-step.md +1 -1
  13. package/template_docs/docs/funnelsgrove/recipes/edit-step.md +1 -1
  14. package/template_docs/docs/funnelsgrove/steps/paywall_offer.md +26 -3
  15. package/template_docs/docs/funnelsgrove/steps/progress_interstitial.md +13 -0
  16. package/template_docs/funnel-docs.config.json +1 -1
  17. package/template_scaffold/.funnelsgrove-docs.json +10 -10
  18. package/template_scaffold/.funnelsgrove-scaffold.json +15 -35
  19. package/template_scaffold/docs/funnelsgrove/START-HERE.md +1 -1
  20. package/template_scaffold/docs/funnelsgrove/contracts/content-answers.md +2 -2
  21. package/template_scaffold/docs/funnelsgrove/contracts/payments.md +5 -3
  22. package/template_scaffold/docs/funnelsgrove/migrations/step-contract-v3.md +1 -1
  23. package/template_scaffold/docs/funnelsgrove/recipes/add-step.md +1 -1
  24. package/template_scaffold/docs/funnelsgrove/recipes/edit-step.md +1 -1
  25. package/template_scaffold/docs/funnelsgrove/steps/paywall_offer.md +26 -3
  26. package/template_scaffold/docs/funnelsgrove/steps/progress_interstitial.md +13 -0
  27. package/template_scaffold/funnel-docs.config.json +1 -1
  28. package/template_scaffold/package-lock.json +15 -15
  29. package/template_scaffold/package.json +3 -3
  30. package/template_scaffold/src/steps/step-content.registry.ts +0 -4
  31. package/template_scaffold/src/steps/editor/email-capture.editor.ts +0 -58
  32. package/template_scaffold/src/steps/editor/step-01.editor.ts +0 -22
  33. package/template_scaffold/src/steps/editor/step-32-paywall.editor.ts +0 -508
  34. package/template_scaffold/src/steps/editor/subscription-started.editor.ts +0 -131
package/README.md CHANGED
@@ -332,3 +332,19 @@ Translate the new content, run `npx tsc --noEmit`, review `?locale=ru` and the l
332
332
  selector, then sync and publish through the normal workflow. Run `fgrove docs`
333
333
  for the full localization guide. The funnel must use a runtime release supporting
334
334
  URL locale selection; this command does not upgrade dependencies.
335
+
336
+ ### New project and Stripe offers
337
+
338
+ ```bash
339
+ fgrove projects create --name Canary --reuse-existing --json
340
+ fgrove offer-sets create --project canary --key intro --name "Intro offer" --plan weekly=11.99/week --plan monthly=24.99/month --plan yearly=79.99/year --discount 50 --default-plan monthly --featured monthly="Most popular" --env test --assign-funnel canary --dry-run
341
+ fgrove offer-sets assign --project canary --funnel canary --offer-set intro
342
+ ```
343
+
344
+ Review the dry run, then remove `--dry-run` to create. Stripe credentials stay on
345
+ the server. Prices renew at the specified regular amount; `--discount 50` charges
346
+ the first period 50% less (initial offer) and shows the full price struck through.
347
+ Repeat the same key with `--env live` to fill Live mappings. Use `--payment-profile`
348
+ when multiple Stripe profiles exist. Assignment replaces all current funnel sets;
349
+ `--default` chooses one of the repeated `--offer-set` values. Publish separately.
350
+ See `docs/product-specs/cli-funnel-editing.md` (CLI-BR-008–010, CLI-SC-027–035).
package/dist/cli.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import { executeProjectCreate, executeOfferSetAssign, executeOfferSetCreate } from './projectSetupCommands.js';
2
3
  import { createHash, randomUUID } from 'node:crypto';
3
4
  import { constants as fsConstants, realpathSync } from 'node:fs';
4
5
  import { cp, link, lstat, mkdir, mkdtemp, open, readFile, readdir, rmdir, rm, unlink, writeFile, } from 'node:fs/promises';
@@ -2075,6 +2076,24 @@ addExamples(projectsCommand
2075
2076
  const projects = await listProjects(token, workspaceId);
2076
2077
  printRows(projects, ['id', 'name', 'slug']);
2077
2078
  });
2079
+ addExamples(projectsCommand.command('create')
2080
+ .description('Create a project, or explicitly reuse a project with the same name')
2081
+ .requiredOption('--name <name>', 'Project name')
2082
+ .option('--description <text>', 'Project description')
2083
+ .option('--workspace <id-or-slug-or-name>', 'Workspace id, slug, or name')
2084
+ .option('--reuse-existing', 'Reuse an existing project with the same normalized name')
2085
+ .option('--json', 'Print the project object as JSON'), ['fgrove projects create --name Canary --reuse-existing --json'])
2086
+ .action(async (options) => {
2087
+ const token = await readAuthToken();
2088
+ const workspaceId = await resolveWorkspaceId(token, options.workspace);
2089
+ const project = await executeProjectCreate({ callApi, token, workspaceId, ...options });
2090
+ if (options.json) {
2091
+ console.log(JSON.stringify(project, null, 2));
2092
+ }
2093
+ else {
2094
+ printRows([project], ['id', 'name', 'slug']);
2095
+ }
2096
+ });
2078
2097
  const addExpenseScopeOptions = (command) => command
2079
2098
  .option('--workspace <id-or-slug-or-name>', 'Workspace id, slug, or name')
2080
2099
  .option('--project <id-or-slug-or-name>', 'Project id, slug, or name')
@@ -2295,6 +2314,39 @@ const offerSetsCommand = addExamples(program.command('offer-sets').alias('offers
2295
2314
  'fgrove offer-sets publish --project claimbee --dry-run',
2296
2315
  'fgrove offer-sets publish --project claimbee',
2297
2316
  ]);
2317
+ const collectSetupOption = (value, previous) => [...previous, value];
2318
+ const setupScopeOptions = (command) => command
2319
+ .option('--project <id-or-slug-or-name>', 'Project id, slug, or name')
2320
+ .option('--workspace <id-or-slug-or-name>', 'Workspace id, slug, or name')
2321
+ .option('--json', 'Print machine-readable JSON');
2322
+ addExamples(setupScopeOptions(offerSetsCommand.command('assign')
2323
+ .description('Replace a funnel’s offer sets and choose its default')
2324
+ .requiredOption('--funnel <id-or-slug>', 'Funnel to update')
2325
+ .requiredOption('--offer-set <key-or-id>', 'Offer set to assign (repeatable)', collectSetupOption, [])
2326
+ .option('--default <key-or-id>', 'Default offer set (default: first listed)')), ['fgrove offer-sets assign --project canary --funnel canary --offer-set intro'])
2327
+ .action(async (options) => {
2328
+ const scope = await resolveProjectCommandScope(options);
2329
+ const funnelId = await resolveFunnelId(scope.token, scope.workspaceId, options.funnel);
2330
+ console.log(JSON.stringify(await executeOfferSetAssign({ ...scope, funnelId, offerSets: options.offerSet, defaultOfferSet: options.default }), null, 2));
2331
+ });
2332
+ addExamples(setupScopeOptions(offerSetsCommand.command('create')
2333
+ .description('Create Stripe subscription prices, with an optional discounted first period (initial offer)')
2334
+ .requiredOption('--key <key>', 'Stable offer set key')
2335
+ .requiredOption('--name <display-name>', 'Offer set display name')
2336
+ .requiredOption('--plan <planKey=amount/interval>', 'Regular subscription price (repeatable)', collectSetupOption, [])
2337
+ .option('--discount <percent>', 'Initial offer: the first period costs this percent less, then the full price renews')
2338
+ .option('--default-plan <planKey>', 'Default plan (default: first listed)')
2339
+ .option('--featured <planKey=tag>', 'Plan badge (repeatable)', collectSetupOption, [])
2340
+ .option('--currency <iso>', 'ISO currency code', 'usd')
2341
+ .requiredOption('--env <test|live>', 'Stripe environment; required')
2342
+ .option('--payment-profile <id-or-name>', 'Stripe payment profile (default: only Stripe profile)')
2343
+ .option('--assign-funnel <id-or-slug>', 'Assign this offer set as the funnel default')
2344
+ .option('--dry-run', 'Print the plan without Stripe calls or writes')), ['fgrove offer-sets create --project canary --key intro --name "Intro offer" --plan weekly=11.99/week --plan monthly=24.99/month --plan yearly=79.99/year --discount 50 --default-plan monthly --featured monthly="Most popular" --env test --assign-funnel canary'])
2345
+ .action(async (options) => {
2346
+ const scope = await resolveProjectCommandScope(options);
2347
+ const assignFunnelId = options.assignFunnel ? await resolveFunnelId(scope.token, scope.workspaceId, options.assignFunnel) : undefined;
2348
+ console.log(JSON.stringify(await executeOfferSetCreate({ ...scope, ...options, assignFunnelId }), null, 2));
2349
+ });
2298
2350
  const addOfferSetScopeOptions = (command) => command
2299
2351
  .option('--workspace <id-or-slug-or-name>', 'Workspace id, slug, or name')
2300
2352
  .option('--project <id-or-slug-or-name>', 'Project id, slug, or name')
@@ -0,0 +1,74 @@
1
+ import type { OfferSetApiRow } from './offerSetCommands.js';
2
+ type CallApi = <T>(input: {
3
+ path: string;
4
+ type: 'query' | 'mutation';
5
+ data?: unknown;
6
+ token?: string | null;
7
+ }) => Promise<T>;
8
+ type Scope = {
9
+ callApi: CallApi;
10
+ token: string;
11
+ workspaceId: string;
12
+ projectId: string;
13
+ };
14
+ type Project = {
15
+ id: string;
16
+ name: string;
17
+ slug: string;
18
+ };
19
+ export declare const executeProjectCreate: (input: Omit<Scope, "projectId"> & {
20
+ name: string;
21
+ description?: string;
22
+ reuseExisting?: boolean;
23
+ }) => Promise<Project>;
24
+ export declare const executeOfferSetAssign: (input: Scope & {
25
+ funnelId: string;
26
+ offerSets: string[];
27
+ defaultOfferSet?: string;
28
+ }) => Promise<{
29
+ funnelId: string;
30
+ offerSetIds: string[];
31
+ defaultOfferSetId: string;
32
+ }>;
33
+ export type OfferSetCreateOptions = {
34
+ key: string;
35
+ name: string;
36
+ plan: string[];
37
+ env: string;
38
+ currency?: string;
39
+ discount?: string;
40
+ defaultPlan?: string;
41
+ featured?: string[];
42
+ paymentProfile?: string;
43
+ dryRun?: boolean;
44
+ assignFunnelId?: string;
45
+ };
46
+ export declare const executeOfferSetCreate: (input: Scope & OfferSetCreateOptions) => Promise<{
47
+ assignFunnelId?: string | undefined;
48
+ workspaceId: string;
49
+ projectId: string;
50
+ paymentProfileId: string;
51
+ key: string;
52
+ name: string;
53
+ plans: {
54
+ key: string;
55
+ amountMinor: number;
56
+ interval: "week" | "month" | "year";
57
+ intervalCount: number;
58
+ }[];
59
+ currency: string;
60
+ environment: string;
61
+ discountPercent: number | undefined;
62
+ defaultPlan: string;
63
+ featured: {
64
+ [k: string]: string;
65
+ };
66
+ } | {
67
+ assignment?: {
68
+ funnelId: string;
69
+ offerSetIds: string[];
70
+ defaultOfferSetId: string;
71
+ } | undefined;
72
+ offerSet: OfferSetApiRow;
73
+ }>;
74
+ export {};
@@ -0,0 +1,107 @@
1
+ export const executeProjectCreate = async (input) => {
2
+ const name = input.name.trim();
3
+ if (!name) {
4
+ throw new Error('--name must not be empty.');
5
+ }
6
+ const { projects } = await input.callApi({ path: 'projects.list', type: 'query', token: input.token, data: { workspaceId: input.workspaceId } });
7
+ const existing = projects.find((project) => project.name.trim().toLowerCase() === name.toLowerCase());
8
+ if (existing) {
9
+ if (input.reuseExisting) {
10
+ return existing;
11
+ }
12
+ throw new Error(`Project ${existing.id} (${existing.slug}) already exists. Use --reuse-existing to reuse it.`);
13
+ }
14
+ const { project } = await input.callApi({ path: 'projects.create', type: 'mutation', token: input.token, data: { workspaceId: input.workspaceId, name, ...(input.description !== undefined ? { description: input.description } : {}) } });
15
+ return project;
16
+ };
17
+ export const executeOfferSetAssign = async (input) => {
18
+ const { offerSets } = await input.callApi({ path: 'projects.listOfferSets', type: 'query', token: input.token, data: { workspaceId: input.workspaceId, projectId: input.projectId } });
19
+ const resolve = (selector) => {
20
+ const row = offerSets.find((set) => set.id === selector || set.key === selector);
21
+ if (!row || !row.is_active) {
22
+ throw new Error(`Active offer set "${selector}" was not found.`);
23
+ }
24
+ return row.id;
25
+ };
26
+ if (!input.offerSets.length) {
27
+ throw new Error('Provide at least one --offer-set.');
28
+ }
29
+ const offerSetIds = [...new Set(input.offerSets.map(resolve))];
30
+ const defaultOfferSetId = input.defaultOfferSet ? resolve(input.defaultOfferSet) : offerSetIds[0];
31
+ if (!offerSetIds.includes(defaultOfferSetId)) {
32
+ throw new Error('--default must be one of the listed offer sets.');
33
+ }
34
+ const assignment = { funnelId: input.funnelId, offerSetIds, defaultOfferSetId };
35
+ await input.callApi({ path: 'projects.replaceFunnelMonetization', type: 'mutation', token: input.token, data: { workspaceId: input.workspaceId, projectId: input.projectId, ...assignment } });
36
+ return assignment;
37
+ };
38
+ export const executeOfferSetCreate = async (input) => {
39
+ if (input.env !== 'test' && input.env !== 'live') {
40
+ throw new Error('--env must be test or live.');
41
+ }
42
+ if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(input.key)) {
43
+ throw new Error('--key must be a lowercase slug.');
44
+ }
45
+ const currency = (input.currency || 'usd').toLowerCase();
46
+ if (!/^[a-z]{3}$/.test(currency)) {
47
+ throw new Error('--currency must be an ISO currency code.');
48
+ }
49
+ const digits = new Intl.NumberFormat('en', { style: 'currency', currency }).resolvedOptions().maximumFractionDigits ?? 2;
50
+ const plans = input.plan.map((value) => {
51
+ const match = /^([a-z0-9]+(?:-[a-z0-9]+)*)=(\d+(?:\.\d+)?)\/(\d+)?(week|month|year)$/.exec(value);
52
+ if (!match) {
53
+ throw new Error(`Invalid --plan "${value}"; use monthly=24.99/month.`);
54
+ }
55
+ if ((match[2].split('.')[1]?.length || 0) > digits) {
56
+ throw new Error(`Too many decimal places for ${currency}.`);
57
+ }
58
+ const amountMinor = Math.round(Number(match[2]) * 10 ** digits);
59
+ const intervalCount = Number(match[3] || 1);
60
+ if (!Number.isSafeInteger(amountMinor) || amountMinor <= 0 || !Number.isSafeInteger(intervalCount) || intervalCount < 1) {
61
+ throw new Error('Plan amount and interval count must be positive.');
62
+ }
63
+ const interval = match[4];
64
+ if (intervalCount > { week: 156, month: 36, year: 3 }[interval]) {
65
+ throw new Error('Interval cannot exceed three years.');
66
+ }
67
+ return { key: match[1], amountMinor, interval, intervalCount };
68
+ });
69
+ if (!plans.length || plans.length > 20 || new Set(plans.map((plan) => plan.key)).size !== plans.length) {
70
+ throw new Error('Provide 1–20 plans with unique keys.');
71
+ }
72
+ const defaultPlan = input.defaultPlan || plans[0].key;
73
+ if (!plans.some((plan) => plan.key === defaultPlan)) {
74
+ throw new Error('--default-plan must name a listed plan.');
75
+ }
76
+ const featured = Object.fromEntries((input.featured || []).map((value) => {
77
+ const index = value.indexOf('=');
78
+ const key = value.slice(0, index);
79
+ const tag = value.slice(index + 1);
80
+ if (index < 1 || !tag.trim() || !plans.some((plan) => plan.key === key)) {
81
+ throw new Error('--featured must be a listed planKey=tag.');
82
+ }
83
+ return [key, tag];
84
+ }));
85
+ const discountPercent = input.discount === undefined ? undefined : Number(input.discount);
86
+ if (discountPercent !== undefined && (!Number.isInteger(discountPercent) || discountPercent < 1 || discountPercent > 99)) {
87
+ throw new Error('--discount must be a whole percent from 1 to 99.');
88
+ }
89
+ const { profiles } = await input.callApi({ path: 'projects.listPaymentProfiles', type: 'query', token: input.token, data: { workspaceId: input.workspaceId, projectId: input.projectId } });
90
+ const candidates = profiles.filter((profile) => input.paymentProfile ? profile.id === input.paymentProfile || profile.name === input.paymentProfile : profile.provider === 'stripe');
91
+ if (!candidates.length) {
92
+ throw new Error('Offer set creation is Stripe only. No usable Stripe payment profile. Run fgrove setup secrets stripe-test.');
93
+ }
94
+ if (candidates.length !== 1) {
95
+ throw new Error(`Choose --payment-profile: ${candidates.map((profile) => `${profile.name} (${profile.id})`).join(', ')}`);
96
+ }
97
+ if (candidates[0].provider !== 'stripe') {
98
+ throw new Error('Offer set creation is Stripe only.');
99
+ }
100
+ const data = { workspaceId: input.workspaceId, projectId: input.projectId, paymentProfileId: candidates[0].id, key: input.key, name: input.name, plans, currency, environment: input.env, discountPercent, defaultPlan, featured };
101
+ if (input.dryRun) {
102
+ return { ...data, ...(input.assignFunnelId ? { assignFunnelId: input.assignFunnelId } : {}) };
103
+ }
104
+ const result = await input.callApi({ path: 'projects.createStripeOfferSet', type: 'mutation', token: input.token, data });
105
+ const assignment = input.assignFunnelId ? await executeOfferSetAssign({ ...input, funnelId: input.assignFunnelId, offerSets: [result.offerSet.id] }) : undefined;
106
+ return { ...result, ...(assignment ? { assignment } : {}) };
107
+ };
@@ -4,10 +4,10 @@
4
4
  "minimumCliVersion": "0.1.20",
5
5
  "entries": [
6
6
  {
7
- "repositoryCliVersion": "0.1.365",
7
+ "repositoryCliVersion": "0.1.367",
8
8
  "manifest": {
9
9
  "schemaVersion": 1,
10
- "bundleVersion": "2.0.358",
10
+ "bundleVersion": "2.0.360",
11
11
  "stepContractVersion": 3,
12
12
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
13
13
  "managedFiles": [
@@ -21,7 +21,7 @@
21
21
  },
22
22
  {
23
23
  "path": "docs/funnelsgrove/START-HERE.md",
24
- "sha256": "5442274f8ca7ddded834147a693677e203a9c223e1db4260e56bf498ec06a362"
24
+ "sha256": "d80f71fcd0fb555ad25808c98e69b3a4b8dc6752d0381ad473e1764ebe0a062c"
25
25
  },
26
26
  {
27
27
  "path": "docs/funnelsgrove/contracts/analytics-events.md",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  {
31
31
  "path": "docs/funnelsgrove/contracts/content-answers.md",
32
- "sha256": "efd912eb405e4c64b33becb1cf9a397ba5fe9afc2d4e2aea115a0f5e0703ca87"
32
+ "sha256": "49ef258b7320628c42fc8381fab7e65fdf4067e8bd6da7afe72e6ab634e2a4b2"
33
33
  },
34
34
  {
35
35
  "path": "docs/funnelsgrove/contracts/flow-routing.md",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  {
39
39
  "path": "docs/funnelsgrove/contracts/payments.md",
40
- "sha256": "6e64acdf171351fddedc96e908f4135e2240751a726c05d938c6e8644ab42082"
40
+ "sha256": "ac346fe0aed3bc3ca48679772870ce98ec7446f23a963f86d707a7fcb051bb46"
41
41
  },
42
42
  {
43
43
  "path": "docs/funnelsgrove/contracts/step-metadata.md",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  {
47
47
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
48
- "sha256": "177644c417fe80371536b9fa0ee0b01ae84d6c66e083e05cc576093ec06c57fc"
48
+ "sha256": "bd323bff8a5b6312aa4e5734c83e50980d0d35d45f94ab6a3a3193e9a696b4cb"
49
49
  },
50
50
  {
51
51
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -69,11 +69,11 @@
69
69
  },
70
70
  {
71
71
  "path": "docs/funnelsgrove/recipes/add-step.md",
72
- "sha256": "fba92b8394b0d622b9886a677af38ddb78042a633c60ab5cb6b1ff600abe2cb9"
72
+ "sha256": "be390e3da8097d5b5a644f33468568939b5f415979920696bec1a6f3d53e002b"
73
73
  },
74
74
  {
75
75
  "path": "docs/funnelsgrove/recipes/edit-step.md",
76
- "sha256": "49eb688c0b3145c025dffe30a9be35e5f5e018da66cbeddf2a08af6a1cc250dc"
76
+ "sha256": "bb9509746bdf8c0e4710b81d32a31f2accf394736fe1e31e0a70d5da5306e21b"
77
77
  },
78
78
  {
79
79
  "path": "docs/funnelsgrove/steps/INDEX.md",
@@ -101,11 +101,11 @@
101
101
  },
102
102
  {
103
103
  "path": "docs/funnelsgrove/steps/paywall_offer.md",
104
- "sha256": "0cf35f69c7d7bfaf3a53ef41cbb833393231ac5dab779f8ace5c529ed3a5d2e8"
104
+ "sha256": "ea24a8474585185bae8793b337956b53ca5a4d34c3f768e464a2b8b84ec5a159"
105
105
  },
106
106
  {
107
107
  "path": "docs/funnelsgrove/steps/progress_interstitial.md",
108
- "sha256": "7ed2d0bf4ac45ee74e36bd87865c250206353ddbd6b34b93975bf87fb0ea09bb"
108
+ "sha256": "5e97cae3e3a4b048efa5d5c4aec9c6371de8db0c1427c012b1eb395ea62a678d"
109
109
  },
110
110
  {
111
111
  "path": "docs/funnelsgrove/steps/purchase_completed.md",
@@ -145,16 +145,16 @@
145
145
  },
146
146
  {
147
147
  "path": "funnel-docs.config.json",
148
- "sha256": "b13c96ce585929d457017df600c19e0b4d315c52ef18a67c194ba29fc7355172"
148
+ "sha256": "9638246c7490ae1dfe1ff07b20a9d820b995df59643119d18ccd11f69b6f6b2f"
149
149
  }
150
150
  ]
151
151
  }
152
152
  },
153
153
  {
154
- "repositoryCliVersion": "0.1.364",
154
+ "repositoryCliVersion": "0.1.366",
155
155
  "manifest": {
156
156
  "schemaVersion": 1,
157
- "bundleVersion": "2.0.357",
157
+ "bundleVersion": "2.0.359",
158
158
  "stepContractVersion": 3,
159
159
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
160
160
  "managedFiles": [
@@ -192,7 +192,7 @@
192
192
  },
193
193
  {
194
194
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
195
- "sha256": "2d2420f64f3a2db89f52cd1d5c8e6fe83812e7676514299129e975f463bb6738"
195
+ "sha256": "4a9ad9c35fd31e0c4fc3fe1912223604d726e74664f1735b022876bdee79da86"
196
196
  },
197
197
  {
198
198
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -292,16 +292,16 @@
292
292
  },
293
293
  {
294
294
  "path": "funnel-docs.config.json",
295
- "sha256": "e7cfae8c8095e634e44442110d2acf003c5e3437a6ba780686a14e2f31ebe53d"
295
+ "sha256": "df03c20bd0244edbaebc33f9754ebfd93de79b5dc5f4ffca9b22e3098672e6d4"
296
296
  }
297
297
  ]
298
298
  }
299
299
  },
300
300
  {
301
- "repositoryCliVersion": "0.1.363",
301
+ "repositoryCliVersion": "0.1.365",
302
302
  "manifest": {
303
303
  "schemaVersion": 1,
304
- "bundleVersion": "2.0.356",
304
+ "bundleVersion": "2.0.358",
305
305
  "stepContractVersion": 3,
306
306
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
307
307
  "managedFiles": [
@@ -339,7 +339,7 @@
339
339
  },
340
340
  {
341
341
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
342
- "sha256": "b571ab9465df1100e6a735ba6cc167a491864d1a9fe421a74ed50f4a4c5ec454"
342
+ "sha256": "177644c417fe80371536b9fa0ee0b01ae84d6c66e083e05cc576093ec06c57fc"
343
343
  },
344
344
  {
345
345
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -439,16 +439,16 @@
439
439
  },
440
440
  {
441
441
  "path": "funnel-docs.config.json",
442
- "sha256": "0c004825b04b4b6dda7125e3b98b314c4124b8f0ab64b8d1c4b0dd0f4e28eb21"
442
+ "sha256": "b13c96ce585929d457017df600c19e0b4d315c52ef18a67c194ba29fc7355172"
443
443
  }
444
444
  ]
445
445
  }
446
446
  },
447
447
  {
448
- "repositoryCliVersion": "0.1.362",
448
+ "repositoryCliVersion": "0.1.364",
449
449
  "manifest": {
450
450
  "schemaVersion": 1,
451
- "bundleVersion": "2.0.355",
451
+ "bundleVersion": "2.0.357",
452
452
  "stepContractVersion": 3,
453
453
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
454
454
  "managedFiles": [
@@ -486,7 +486,7 @@
486
486
  },
487
487
  {
488
488
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
489
- "sha256": "d085e5aabede9a981c940d95fcbbc81788f9c6769094e2d6f44d9e021e5fb445"
489
+ "sha256": "2d2420f64f3a2db89f52cd1d5c8e6fe83812e7676514299129e975f463bb6738"
490
490
  },
491
491
  {
492
492
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -586,16 +586,16 @@
586
586
  },
587
587
  {
588
588
  "path": "funnel-docs.config.json",
589
- "sha256": "75b55e12be2c73c387ef8e3ee3222b7f08e8e0ec4649b559e834ee6bebd5601a"
589
+ "sha256": "e7cfae8c8095e634e44442110d2acf003c5e3437a6ba780686a14e2f31ebe53d"
590
590
  }
591
591
  ]
592
592
  }
593
593
  },
594
594
  {
595
- "repositoryCliVersion": "0.1.361",
595
+ "repositoryCliVersion": "0.1.363",
596
596
  "manifest": {
597
597
  "schemaVersion": 1,
598
- "bundleVersion": "2.0.354",
598
+ "bundleVersion": "2.0.356",
599
599
  "stepContractVersion": 3,
600
600
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
601
601
  "managedFiles": [
@@ -633,7 +633,7 @@
633
633
  },
634
634
  {
635
635
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
636
- "sha256": "743837afa746bd63ffb9fbd2caa0ee6d64137f017802ab43fb746549cf57affa"
636
+ "sha256": "b571ab9465df1100e6a735ba6cc167a491864d1a9fe421a74ed50f4a4c5ec454"
637
637
  },
638
638
  {
639
639
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -733,16 +733,16 @@
733
733
  },
734
734
  {
735
735
  "path": "funnel-docs.config.json",
736
- "sha256": "9a17d1b37d62b21a7306cde0affe58f9563af24a34ff2b1024f29dc0c10617c9"
736
+ "sha256": "0c004825b04b4b6dda7125e3b98b314c4124b8f0ab64b8d1c4b0dd0f4e28eb21"
737
737
  }
738
738
  ]
739
739
  }
740
740
  },
741
741
  {
742
- "repositoryCliVersion": "0.1.360",
742
+ "repositoryCliVersion": "0.1.362",
743
743
  "manifest": {
744
744
  "schemaVersion": 1,
745
- "bundleVersion": "2.0.353",
745
+ "bundleVersion": "2.0.355",
746
746
  "stepContractVersion": 3,
747
747
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
748
748
  "managedFiles": [
@@ -780,7 +780,7 @@
780
780
  },
781
781
  {
782
782
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
783
- "sha256": "29ebaa7fce53e6025ea19caf347d953866575963f1f5e96df8050788674b56ce"
783
+ "sha256": "d085e5aabede9a981c940d95fcbbc81788f9c6769094e2d6f44d9e021e5fb445"
784
784
  },
785
785
  {
786
786
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -880,16 +880,16 @@
880
880
  },
881
881
  {
882
882
  "path": "funnel-docs.config.json",
883
- "sha256": "c36088a7c3173139a24d4f425a761dc02618b56e0e5e410e29aab314d06d5942"
883
+ "sha256": "75b55e12be2c73c387ef8e3ee3222b7f08e8e0ec4649b559e834ee6bebd5601a"
884
884
  }
885
885
  ]
886
886
  }
887
887
  },
888
888
  {
889
- "repositoryCliVersion": "0.1.359",
889
+ "repositoryCliVersion": "0.1.361",
890
890
  "manifest": {
891
891
  "schemaVersion": 1,
892
- "bundleVersion": "2.0.352",
892
+ "bundleVersion": "2.0.354",
893
893
  "stepContractVersion": 3,
894
894
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
895
895
  "managedFiles": [
@@ -927,7 +927,7 @@
927
927
  },
928
928
  {
929
929
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
930
- "sha256": "eaf84a1cc28753b4b832831ebb43fedba90330000fff223c4512d79e94500086"
930
+ "sha256": "743837afa746bd63ffb9fbd2caa0ee6d64137f017802ab43fb746549cf57affa"
931
931
  },
932
932
  {
933
933
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -1027,7 +1027,7 @@
1027
1027
  },
1028
1028
  {
1029
1029
  "path": "funnel-docs.config.json",
1030
- "sha256": "23ae803bc80a092a62680147747e0b74b66bd923d23d75606d502815f2946a75"
1030
+ "sha256": "9a17d1b37d62b21a7306cde0affe58f9563af24a34ff2b1024f29dc0c10617c9"
1031
1031
  }
1032
1032
  ]
1033
1033
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnelsgrove/cli",
3
- "version": "0.1.365",
3
+ "version": "0.1.367",
4
4
  "description": "FunnelsGrove command-line tools for editing, syncing, and publishing funnels",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,14 +34,14 @@
34
34
  "test": "vitest run"
35
35
  },
36
36
  "dependencies": {
37
- "@funnelsgrove/runtime": "0.44.0",
37
+ "@funnelsgrove/runtime": "0.45.0",
38
38
  "commander": "^12.0.0",
39
39
  "ignore": "^7.0.8",
40
40
  "typescript": "^5.8.3"
41
41
  },
42
42
  "devDependencies": {
43
- "@funnelsgrove/analytics": "0.27.0",
44
- "@funnelsgrove/payments": "0.70.0",
43
+ "@funnelsgrove/analytics": "0.28.0",
44
+ "@funnelsgrove/payments": "0.72.0",
45
45
  "vitest": "^3.0.0"
46
46
  }
47
47
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "bundleVersion": "2.0.358",
3
+ "bundleVersion": "2.0.360",
4
4
  "stepContractVersion": 3,
5
5
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
6
6
  "managedFiles": [
@@ -14,7 +14,7 @@
14
14
  },
15
15
  {
16
16
  "path": "docs/funnelsgrove/START-HERE.md",
17
- "sha256": "5442274f8ca7ddded834147a693677e203a9c223e1db4260e56bf498ec06a362"
17
+ "sha256": "d80f71fcd0fb555ad25808c98e69b3a4b8dc6752d0381ad473e1764ebe0a062c"
18
18
  },
19
19
  {
20
20
  "path": "docs/funnelsgrove/contracts/analytics-events.md",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  {
24
24
  "path": "docs/funnelsgrove/contracts/content-answers.md",
25
- "sha256": "efd912eb405e4c64b33becb1cf9a397ba5fe9afc2d4e2aea115a0f5e0703ca87"
25
+ "sha256": "49ef258b7320628c42fc8381fab7e65fdf4067e8bd6da7afe72e6ab634e2a4b2"
26
26
  },
27
27
  {
28
28
  "path": "docs/funnelsgrove/contracts/flow-routing.md",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  {
32
32
  "path": "docs/funnelsgrove/contracts/payments.md",
33
- "sha256": "6e64acdf171351fddedc96e908f4135e2240751a726c05d938c6e8644ab42082"
33
+ "sha256": "ac346fe0aed3bc3ca48679772870ce98ec7446f23a963f86d707a7fcb051bb46"
34
34
  },
35
35
  {
36
36
  "path": "docs/funnelsgrove/contracts/step-metadata.md",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  {
40
40
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
41
- "sha256": "177644c417fe80371536b9fa0ee0b01ae84d6c66e083e05cc576093ec06c57fc"
41
+ "sha256": "bd323bff8a5b6312aa4e5734c83e50980d0d35d45f94ab6a3a3193e9a696b4cb"
42
42
  },
43
43
  {
44
44
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -62,11 +62,11 @@
62
62
  },
63
63
  {
64
64
  "path": "docs/funnelsgrove/recipes/add-step.md",
65
- "sha256": "fba92b8394b0d622b9886a677af38ddb78042a633c60ab5cb6b1ff600abe2cb9"
65
+ "sha256": "be390e3da8097d5b5a644f33468568939b5f415979920696bec1a6f3d53e002b"
66
66
  },
67
67
  {
68
68
  "path": "docs/funnelsgrove/recipes/edit-step.md",
69
- "sha256": "49eb688c0b3145c025dffe30a9be35e5f5e018da66cbeddf2a08af6a1cc250dc"
69
+ "sha256": "bb9509746bdf8c0e4710b81d32a31f2accf394736fe1e31e0a70d5da5306e21b"
70
70
  },
71
71
  {
72
72
  "path": "docs/funnelsgrove/steps/INDEX.md",
@@ -94,11 +94,11 @@
94
94
  },
95
95
  {
96
96
  "path": "docs/funnelsgrove/steps/paywall_offer.md",
97
- "sha256": "0cf35f69c7d7bfaf3a53ef41cbb833393231ac5dab779f8ace5c529ed3a5d2e8"
97
+ "sha256": "ea24a8474585185bae8793b337956b53ca5a4d34c3f768e464a2b8b84ec5a159"
98
98
  },
99
99
  {
100
100
  "path": "docs/funnelsgrove/steps/progress_interstitial.md",
101
- "sha256": "7ed2d0bf4ac45ee74e36bd87865c250206353ddbd6b34b93975bf87fb0ea09bb"
101
+ "sha256": "5e97cae3e3a4b048efa5d5c4aec9c6371de8db0c1427c012b1eb395ea62a678d"
102
102
  },
103
103
  {
104
104
  "path": "docs/funnelsgrove/steps/purchase_completed.md",
@@ -138,7 +138,7 @@
138
138
  },
139
139
  {
140
140
  "path": "funnel-docs.config.json",
141
- "sha256": "b13c96ce585929d457017df600c19e0b4d315c52ef18a67c194ba29fc7355172"
141
+ "sha256": "9638246c7490ae1dfe1ff07b20a9d820b995df59643119d18ccd11f69b6f6b2f"
142
142
  }
143
143
  ]
144
144
  }
@@ -63,7 +63,7 @@ Contract hash: `d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf
63
63
  ## Standard workflow
64
64
 
65
65
  1. Read the exact type page.
66
- 2. Change the smallest set of component, content/editor, registry, and manifest files needed.
66
+ 2. Change the smallest set of component, content, registry, and manifest files needed.
67
67
  3. Keep component and manifest metadata in parity.
68
68
  4. Run `fgrove validate` and focused tests.
69
69
  5. Perform the relevant manual QA.
@@ -87,9 +87,9 @@ async function onPhotoSelected(file: File) {
87
87
  - Keep `apiService.uploadTempPhoto` for existing photo steps; new file steps use
88
88
  `uploadTempFile`.
89
89
 
90
- ## Content/editor parity
90
+ ## Content modules
91
91
 
92
- Keep builder-editable values in content definitions, expose matching editor sections, and register them once. Do not move stable IDs or answer keys into editable copy.
92
+ Keep editable values in content definitions and register each module once by `contentPath` in `src/steps/step-content.registry.ts`. Editor modules (`src/steps/editor/*.editor.ts`, `editorPath`) are no longer read by any authoring surface: do not create them for new steps or keep them in sync. Do not move stable IDs or answer keys into editable copy.
93
93
 
94
94
  ## Product strategy and plan ownership
95
95