@funnelsgrove/cli 0.1.381 → 0.1.386
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/dist/cli.d.ts +5 -0
- package/dist/cli.js +8 -2
- package/dist/funnelValidation.js +1 -3
- package/dist/projectValidator.d.ts +4 -2
- package/dist/projectValidator.js +41 -11
- package/dist/setupCommands.js +1 -1
- package/funnel-contract-compatibility.json +31 -31
- package/package.json +4 -4
- package/template_docs/.funnelsgrove-docs.json +4 -4
- package/template_docs/docs/funnelsgrove/migrations/step-contract-v3.md +1 -1
- package/template_docs/docs/funnelsgrove/recipes/add-experiment.md +6 -0
- package/template_docs/funnel-docs.config.json +1 -1
- package/template_scaffold/.funnelsgrove-docs.json +4 -4
- package/template_scaffold/.funnelsgrove-scaffold.json +9 -9
- package/template_scaffold/docs/funnelsgrove/migrations/step-contract-v3.md +1 -1
- package/template_scaffold/docs/funnelsgrove/recipes/add-experiment.md +6 -0
- package/template_scaffold/funnel-docs.config.json +1 -1
- package/template_scaffold/package-lock.json +15 -15
- package/template_scaffold/package.json +3 -3
- package/template_scaffold/src/steps/step-32-paywall.tsx +6 -0
package/dist/cli.d.ts
CHANGED
|
@@ -106,6 +106,11 @@ export type BoundedNpmCommandOptions = {
|
|
|
106
106
|
terminationGraceMs?: number;
|
|
107
107
|
finalizationGraceMs?: number;
|
|
108
108
|
};
|
|
109
|
+
export declare const npmSpawnCommand: (args: readonly string[], platform?: NodeJS.Platform) => {
|
|
110
|
+
command: string;
|
|
111
|
+
args: string[];
|
|
112
|
+
shell: boolean;
|
|
113
|
+
};
|
|
109
114
|
export declare const runBoundedNpmCommand: (targetDir: string, args: readonly string[], options?: BoundedNpmCommandOptions) => Promise<void>;
|
|
110
115
|
export declare function executeStepContractMigrationCommand(input: {
|
|
111
116
|
targetDir: string;
|
package/dist/cli.js
CHANGED
|
@@ -595,15 +595,21 @@ const installManagedFunnelFiles = async (targetDir) => {
|
|
|
595
595
|
throw new CliContractError(diagnostic?.code ?? 'FG-DOC-001', diagnostic?.message ?? 'Managed documentation could not be installed.');
|
|
596
596
|
}
|
|
597
597
|
};
|
|
598
|
+
// Windows has only npm.cmd, which Node starts only through a shell. The arguments are fixed CLI
|
|
599
|
+
// constants, so they are joined into one command string rather than passed with `shell: true`.
|
|
600
|
+
export const npmSpawnCommand = (args, platform = process.platform) => (platform === 'win32'
|
|
601
|
+
? { command: ['npm', ...args].join(' '), args: [], shell: true }
|
|
602
|
+
: { command: 'npm', args: [...args], shell: false });
|
|
598
603
|
export const runBoundedNpmCommand = async (targetDir, args, options = {}) => new Promise((resolve, reject) => {
|
|
599
604
|
const timeoutMs = options.timeoutMs ?? 10 * 60_000;
|
|
600
605
|
const terminationGraceMs = options.terminationGraceMs ?? 5_000;
|
|
601
606
|
const finalizationGraceMs = options.finalizationGraceMs ?? 1_000;
|
|
602
|
-
const
|
|
607
|
+
const npm = npmSpawnCommand(args);
|
|
608
|
+
const child = spawn(npm.command, npm.args, {
|
|
603
609
|
cwd: targetDir,
|
|
604
610
|
detached: process.platform !== 'win32',
|
|
605
611
|
env: process.env,
|
|
606
|
-
shell:
|
|
612
|
+
shell: npm.shell,
|
|
607
613
|
stdio: 'inherit',
|
|
608
614
|
windowsHide: true,
|
|
609
615
|
});
|
package/dist/funnelValidation.js
CHANGED
|
@@ -4,11 +4,9 @@ import ts from 'typescript';
|
|
|
4
4
|
import { inspectPackageBaseline, inspectPackageCompatibility } from './packageCompatibility.js';
|
|
5
5
|
import { createValidationDiagnostic, isValidationDiagnostic, } from './diagnosticOutput.js';
|
|
6
6
|
import { inspectTemplateDocs, loadBundledDocs, planTemplateDocsUpdate, } from './docsTransaction.js';
|
|
7
|
-
import { PROJECT_VALIDATOR_CONTRACT_VERSION, runProjectValidator as runCheckedInProjectValidator, } from './projectValidator.js';
|
|
7
|
+
import { PROJECT_VALIDATOR_CONTRACT_VERSION, RUNNER_PATH, VALIDATOR_VITE_CONFIG_PATH, runProjectValidator as runCheckedInProjectValidator, } from './projectValidator.js';
|
|
8
8
|
const MANIFEST_PATH = 'src/config/funnel.manifest.ts';
|
|
9
9
|
const PROJECT_VALIDATOR_PATH = 'src/contract/funnel-project.validation.ts';
|
|
10
|
-
const VALIDATOR_VITE_CONFIG_PATH = 'src/contract/funnel-validator.vite.config.ts';
|
|
11
|
-
const RUNNER_PATH = 'src/contract/validate-funnel.cli.ts';
|
|
12
10
|
const MANAGED_VALIDATOR_PATHS = [
|
|
13
11
|
PROJECT_VALIDATOR_PATH,
|
|
14
12
|
VALIDATOR_VITE_CONFIG_PATH,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type FunnelValidationResult } from './diagnosticOutput.js';
|
|
2
|
+
export declare const VALIDATOR_VITE_CONFIG_PATH = "src/contract/funnel-validator.vite.config.ts";
|
|
3
|
+
export declare const RUNNER_PATH = "src/contract/validate-funnel.cli.ts";
|
|
2
4
|
export declare const PROJECT_VALIDATOR_TIMEOUT_MS = 120000;
|
|
3
5
|
export declare const PROJECT_VALIDATOR_CONTRACT_VERSION: 3;
|
|
4
6
|
export type ProjectValidatorProcessRequest = {
|
|
5
|
-
command:
|
|
6
|
-
args: [
|
|
7
|
+
command: string;
|
|
8
|
+
args: string[];
|
|
7
9
|
cwd: string;
|
|
8
10
|
env: NodeJS.ProcessEnv;
|
|
9
11
|
timeoutMs: number;
|
package/dist/projectValidator.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
|
+
import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
2
4
|
import path from 'node:path';
|
|
3
5
|
import { CURRENT_STEP_CONTRACT_VERSION } from '@funnelsgrove/runtime';
|
|
4
6
|
import { createValidationDiagnostic, isValidationDiagnostic, } from './diagnosticOutput.js';
|
|
7
|
+
export const VALIDATOR_VITE_CONFIG_PATH = 'src/contract/funnel-validator.vite.config.ts';
|
|
8
|
+
export const RUNNER_PATH = 'src/contract/validate-funnel.cli.ts';
|
|
5
9
|
export const PROJECT_VALIDATOR_TIMEOUT_MS = 120_000;
|
|
6
10
|
export const PROJECT_VALIDATOR_CONTRACT_VERSION = CURRENT_STEP_CONTRACT_VERSION;
|
|
7
11
|
const PROJECT_VALIDATOR_TERMINATION_GRACE_MS = 250;
|
|
@@ -28,9 +32,16 @@ export const buildProjectValidatorEnvironment = (parentEnv) => ({
|
|
|
28
32
|
const value = parentEnv[key];
|
|
29
33
|
return value === undefined ? [] : [[key, value]];
|
|
30
34
|
})),
|
|
31
|
-
npm_config_ignore_scripts: 'true',
|
|
32
|
-
npm_config_loglevel: 'silent',
|
|
33
35
|
});
|
|
36
|
+
// The `validate:funnel` script is byte-checked before this runs, so the CLI starts the same vite-node
|
|
37
|
+
// command itself. The managed runner only self-starts when argv[1] is named `vite-node` (npm's Windows
|
|
38
|
+
// shim runs `vite-node.mjs`), so the entry clears argv and calls it once, explicitly.
|
|
39
|
+
const validatorEntrySource = (runnerImport) => [
|
|
40
|
+
'process.argv.length = 1;',
|
|
41
|
+
`const { runValidateFunnelCli } = await import(${JSON.stringify(runnerImport)});`,
|
|
42
|
+
"process.exitCode = await runValidateFunnelCli({ args: ['--json'] });",
|
|
43
|
+
'',
|
|
44
|
+
].join('\n');
|
|
34
45
|
const runProcessWithSpawn = async (request) => new Promise((resolve) => {
|
|
35
46
|
let stdout = '';
|
|
36
47
|
let stderr = '';
|
|
@@ -175,21 +186,40 @@ const protocolMatchesExit = (exitCode, protocol) => {
|
|
|
175
186
|
return false;
|
|
176
187
|
};
|
|
177
188
|
export const runProjectValidator = async (options) => {
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
189
|
+
const cwd = path.resolve(options.projectDir);
|
|
190
|
+
let viteNodeBin;
|
|
191
|
+
try {
|
|
192
|
+
viteNodeBin = createRequire(path.join(cwd, 'package.json')).resolve('vite-node/vite-node.mjs');
|
|
193
|
+
}
|
|
194
|
+
catch {
|
|
195
|
+
return failedResult('project validator failed to start');
|
|
196
|
+
}
|
|
197
|
+
// Inside the project, so the entry shares the project's drive and Vite root on Windows.
|
|
198
|
+
const cacheDir = path.join(cwd, 'node_modules', '.cache');
|
|
199
|
+
let entryDir;
|
|
186
200
|
let processResult;
|
|
187
201
|
try {
|
|
188
|
-
|
|
202
|
+
await mkdir(cacheDir, { recursive: true });
|
|
203
|
+
entryDir = await mkdtemp(path.join(cacheDir, 'fgrove-validate-'));
|
|
204
|
+
const entryPath = path.join(entryDir, 'fgrove-validate.ts');
|
|
205
|
+
const runnerImport = path.relative(entryDir, path.join(cwd, RUNNER_PATH)).split(path.sep).join('/');
|
|
206
|
+
await writeFile(entryPath, validatorEntrySource(runnerImport));
|
|
207
|
+
processResult = await (options.runProcess ?? runProcessWithSpawn)({
|
|
208
|
+
command: process.execPath,
|
|
209
|
+
args: [viteNodeBin, '--config', VALIDATOR_VITE_CONFIG_PATH, entryPath],
|
|
210
|
+
cwd,
|
|
211
|
+
env: buildProjectValidatorEnvironment(options.parentEnv ?? process.env),
|
|
212
|
+
timeoutMs: options.timeoutMs ?? PROJECT_VALIDATOR_TIMEOUT_MS,
|
|
213
|
+
});
|
|
189
214
|
}
|
|
190
215
|
catch {
|
|
191
216
|
return failedResult('project validator failed to start');
|
|
192
217
|
}
|
|
218
|
+
finally {
|
|
219
|
+
// A Windows virus scan can briefly lock the entry; a leftover cache folder must not fail validation.
|
|
220
|
+
if (entryDir)
|
|
221
|
+
await rm(entryDir, { recursive: true, force: true }).catch(() => undefined);
|
|
222
|
+
}
|
|
193
223
|
if (processResult.timedOut)
|
|
194
224
|
return failedResult('project validator timed out');
|
|
195
225
|
if (processResult.error)
|
package/dist/setupCommands.js
CHANGED
|
@@ -111,7 +111,7 @@ const runActiveCheck = async (scope, stepKey, options) => {
|
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
const connection = await scope.callApi({ path: 'projects.validatePaymentProfile', type: 'mutation', token: scope.token, data: profileData });
|
|
114
|
+
const connection = await scope.callApi({ path: 'projects.validatePaymentProfile', type: 'mutation', token: scope.token, data: { ...profileData, autoEnable: true } });
|
|
115
115
|
const webhooks = await scope.callApi({ path: 'projects.checkIntegrationGuideStripeLiveWebhooks', type: 'mutation', token: scope.token, data });
|
|
116
116
|
return { catalogs, connection, webhooks };
|
|
117
117
|
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"minimumCliVersion": "0.1.20",
|
|
5
5
|
"entries": [
|
|
6
6
|
{
|
|
7
|
-
"repositoryCliVersion": "0.1.
|
|
7
|
+
"repositoryCliVersion": "0.1.386",
|
|
8
8
|
"manifest": {
|
|
9
9
|
"schemaVersion": 1,
|
|
10
|
-
"bundleVersion": "2.0.
|
|
10
|
+
"bundleVersion": "2.0.379",
|
|
11
11
|
"stepContractVersion": 3,
|
|
12
12
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
13
13
|
"managedFiles": [
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
48
|
-
"sha256": "
|
|
48
|
+
"sha256": "806815a4d9393db1977179b790c2480dae44e99f5b1a0fad0e2abb9a4a42ed12"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"path": "docs/funnelsgrove/recipes/add-experiment.md",
|
|
68
|
-
"sha256": "
|
|
68
|
+
"sha256": "4ffda52eecb6caaabe5ac45a1049e995065db983f98d844d256f2296bcfe9ce7"
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
"path": "docs/funnelsgrove/recipes/add-step.md",
|
|
@@ -145,16 +145,16 @@
|
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
"path": "funnel-docs.config.json",
|
|
148
|
-
"sha256": "
|
|
148
|
+
"sha256": "85c5912ad82f93ac73658b735b6b598b404305bcf3c18c60d3c000157eba3d58"
|
|
149
149
|
}
|
|
150
150
|
]
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
|
-
"repositoryCliVersion": "0.1.
|
|
154
|
+
"repositoryCliVersion": "0.1.385",
|
|
155
155
|
"manifest": {
|
|
156
156
|
"schemaVersion": 1,
|
|
157
|
-
"bundleVersion": "2.0.
|
|
157
|
+
"bundleVersion": "2.0.378",
|
|
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": "
|
|
195
|
+
"sha256": "5c256aedf9279b598e1289493ee5c69beb8ba7c12ee645d1f4b96642c245a233"
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
198
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
"path": "docs/funnelsgrove/recipes/add-experiment.md",
|
|
215
|
-
"sha256": "
|
|
215
|
+
"sha256": "4ffda52eecb6caaabe5ac45a1049e995065db983f98d844d256f2296bcfe9ce7"
|
|
216
216
|
},
|
|
217
217
|
{
|
|
218
218
|
"path": "docs/funnelsgrove/recipes/add-step.md",
|
|
@@ -292,16 +292,16 @@
|
|
|
292
292
|
},
|
|
293
293
|
{
|
|
294
294
|
"path": "funnel-docs.config.json",
|
|
295
|
-
"sha256": "
|
|
295
|
+
"sha256": "3bc93d3697c4ba731a8c632285156e7a50ddef952e70a152e0bc405c76f340b7"
|
|
296
296
|
}
|
|
297
297
|
]
|
|
298
298
|
}
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
|
-
"repositoryCliVersion": "0.1.
|
|
301
|
+
"repositoryCliVersion": "0.1.384",
|
|
302
302
|
"manifest": {
|
|
303
303
|
"schemaVersion": 1,
|
|
304
|
-
"bundleVersion": "2.0.
|
|
304
|
+
"bundleVersion": "2.0.377",
|
|
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": "
|
|
342
|
+
"sha256": "5890c665af845196bdc73985e504af850caf1d7f67f10d87afa5f49c8b503961"
|
|
343
343
|
},
|
|
344
344
|
{
|
|
345
345
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -359,7 +359,7 @@
|
|
|
359
359
|
},
|
|
360
360
|
{
|
|
361
361
|
"path": "docs/funnelsgrove/recipes/add-experiment.md",
|
|
362
|
-
"sha256": "
|
|
362
|
+
"sha256": "4ffda52eecb6caaabe5ac45a1049e995065db983f98d844d256f2296bcfe9ce7"
|
|
363
363
|
},
|
|
364
364
|
{
|
|
365
365
|
"path": "docs/funnelsgrove/recipes/add-step.md",
|
|
@@ -439,16 +439,16 @@
|
|
|
439
439
|
},
|
|
440
440
|
{
|
|
441
441
|
"path": "funnel-docs.config.json",
|
|
442
|
-
"sha256": "
|
|
442
|
+
"sha256": "1d7cbc72cd78b0c50307917b6b3ab067aa9ef769323489e0094e81b7f93c4d61"
|
|
443
443
|
}
|
|
444
444
|
]
|
|
445
445
|
}
|
|
446
446
|
},
|
|
447
447
|
{
|
|
448
|
-
"repositoryCliVersion": "0.1.
|
|
448
|
+
"repositoryCliVersion": "0.1.383",
|
|
449
449
|
"manifest": {
|
|
450
450
|
"schemaVersion": 1,
|
|
451
|
-
"bundleVersion": "2.0.
|
|
451
|
+
"bundleVersion": "2.0.376",
|
|
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": "
|
|
489
|
+
"sha256": "8baf2af97abca602260c12cd60e4a84756eadefe1d317336f8d5b6625fc3a8a2"
|
|
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": "
|
|
589
|
+
"sha256": "7e635ec7551e08724a57b95cf6358ae5cd79576acf7ccfd81aae889ce4930a91"
|
|
590
590
|
}
|
|
591
591
|
]
|
|
592
592
|
}
|
|
593
593
|
},
|
|
594
594
|
{
|
|
595
|
-
"repositoryCliVersion": "0.1.
|
|
595
|
+
"repositoryCliVersion": "0.1.382",
|
|
596
596
|
"manifest": {
|
|
597
597
|
"schemaVersion": 1,
|
|
598
|
-
"bundleVersion": "2.0.
|
|
598
|
+
"bundleVersion": "2.0.375",
|
|
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": "
|
|
636
|
+
"sha256": "c99540fa18e87ea6a279574bbcf76c8b92d4aec7d6dce2e9bc7a38b67a568438"
|
|
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": "
|
|
736
|
+
"sha256": "c1312e547ebc2746eb497563929afbdf0360a0175e429a1eb3e62117ed9148cc"
|
|
737
737
|
}
|
|
738
738
|
]
|
|
739
739
|
}
|
|
740
740
|
},
|
|
741
741
|
{
|
|
742
|
-
"repositoryCliVersion": "0.1.
|
|
742
|
+
"repositoryCliVersion": "0.1.381",
|
|
743
743
|
"manifest": {
|
|
744
744
|
"schemaVersion": 1,
|
|
745
|
-
"bundleVersion": "2.0.
|
|
745
|
+
"bundleVersion": "2.0.374",
|
|
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": "
|
|
783
|
+
"sha256": "e5698da9513ea856b8e3c8a7b68e0cf2820ed4b3f794f30f2092fc6281f3f6e0"
|
|
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": "
|
|
883
|
+
"sha256": "3c758542f2486e1cd8b8bac81cbcf1bd6bcffd2f4c4576968a74514e268d1eee"
|
|
884
884
|
}
|
|
885
885
|
]
|
|
886
886
|
}
|
|
887
887
|
},
|
|
888
888
|
{
|
|
889
|
-
"repositoryCliVersion": "0.1.
|
|
889
|
+
"repositoryCliVersion": "0.1.380",
|
|
890
890
|
"manifest": {
|
|
891
891
|
"schemaVersion": 1,
|
|
892
|
-
"bundleVersion": "2.0.
|
|
892
|
+
"bundleVersion": "2.0.373",
|
|
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": "
|
|
930
|
+
"sha256": "c664510cb88aee6d114b0738e3f739c99040a368411514f30d62783ffe1724f5"
|
|
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": "
|
|
1030
|
+
"sha256": "805c8d728fe89a06b5a29b5c05d0fdc89efbbd4fc8273d4b24c0ee525ec46993"
|
|
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.
|
|
3
|
+
"version": "0.1.386",
|
|
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.
|
|
37
|
+
"@funnelsgrove/runtime": "0.47.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.
|
|
44
|
-
"@funnelsgrove/payments": "0.
|
|
43
|
+
"@funnelsgrove/analytics": "0.30.0",
|
|
44
|
+
"@funnelsgrove/payments": "0.75.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.
|
|
3
|
+
"bundleVersion": "2.0.379",
|
|
4
4
|
"stepContractVersion": 3,
|
|
5
5
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
6
6
|
"managedFiles": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
41
|
-
"sha256": "
|
|
41
|
+
"sha256": "806815a4d9393db1977179b790c2480dae44e99f5b1a0fad0e2abb9a4a42ed12"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
"path": "docs/funnelsgrove/recipes/add-experiment.md",
|
|
61
|
-
"sha256": "
|
|
61
|
+
"sha256": "4ffda52eecb6caaabe5ac45a1049e995065db983f98d844d256f2296bcfe9ce7"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
"path": "docs/funnelsgrove/recipes/add-step.md",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "funnel-docs.config.json",
|
|
141
|
-
"sha256": "
|
|
141
|
+
"sha256": "85c5912ad82f93ac73658b735b6b598b404305bcf3c18c60d3c000157eba3d58"
|
|
142
142
|
}
|
|
143
143
|
]
|
|
144
144
|
}
|
|
@@ -17,7 +17,7 @@ Supported read versions: `1`, `2`, `3`. Authoring and publish target version `3`
|
|
|
17
17
|
|
|
18
18
|
### Package release order
|
|
19
19
|
|
|
20
|
-
Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.47.0`, then `@funnelsgrove/analytics` `0.30.0`, then `@funnelsgrove/payments` `0.
|
|
20
|
+
Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.47.0`, then `@funnelsgrove/analytics` `0.30.0`, then `@funnelsgrove/payments` `0.76.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.386`, and only then promotes the candidate to production traffic. The serving API must never advertise an unpublished preferred CLI. Publishing packages and deploying production remain separately approved operational actions.
|
|
21
21
|
<!-- funnelsgrove:generated:end contract-v3/migration/step-contract-v3 -->
|
|
22
22
|
|
|
23
23
|
## Version-last policy
|
|
@@ -192,3 +192,9 @@ For a GitHub-connected funnel, commit and push only the variant step or offer-se
|
|
|
192
192
|
Force every assignment, verify analytics metadata and deduplication, confirm refresh keeps assignment, test missing/invalid flags, and leave inactive variants unreachable from the default flow.
|
|
193
193
|
|
|
194
194
|
Pre-activation, missing-assignment, invalid-assignment, and fallback paths must not create phantom `step_started`, `step_completed`, or `step_exited` events.
|
|
195
|
+
|
|
196
|
+
## Verify a running experiment
|
|
197
|
+
|
|
198
|
+
Open each variant with a forced link: `?mode=test&experiment=<experiment-key>&variant=<variantKey>`. Judge the live split from the experiment's results page in FunnelsGrove once real visitors arrive.
|
|
199
|
+
|
|
200
|
+
Headless browsers (Playwright, Puppeteer, any `HeadlessChrome` user agent) always land on control. PostHog classifies them as bots, `/ingest/flags` returns `"flags":{}`, and the runtime falls back to control. A run of headless visits that all land on control is expected and is not evidence of a missing or misscoped flag.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"bundleVersion": "2.0.
|
|
3
|
+
"bundleVersion": "2.0.379",
|
|
4
4
|
"stepContractVersion": 3,
|
|
5
5
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
6
6
|
"managedFiles": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
41
|
-
"sha256": "
|
|
41
|
+
"sha256": "806815a4d9393db1977179b790c2480dae44e99f5b1a0fad0e2abb9a4a42ed12"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
"path": "docs/funnelsgrove/recipes/add-experiment.md",
|
|
61
|
-
"sha256": "
|
|
61
|
+
"sha256": "4ffda52eecb6caaabe5ac45a1049e995065db983f98d844d256f2296bcfe9ce7"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
"path": "docs/funnelsgrove/recipes/add-step.md",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "funnel-docs.config.json",
|
|
141
|
-
"sha256": "
|
|
141
|
+
"sha256": "85c5912ad82f93ac73658b735b6b598b404305bcf3c18c60d3c000157eba3d58"
|
|
142
142
|
}
|
|
143
143
|
]
|
|
144
144
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"sourceTreeHash": "
|
|
3
|
+
"sourceTreeHash": "7501f0a6e1c2a69b7577ea56e52733cb02323e87cf22495c548fe8b9ab83b8e3",
|
|
4
4
|
"stepContractVersion": 3,
|
|
5
|
-
"docsBundleVersion": "2.0.
|
|
5
|
+
"docsBundleVersion": "2.0.379",
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": ".env.example",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"path": ".funnelsgrove-docs.json",
|
|
19
|
-
"sha256": "
|
|
19
|
+
"sha256": "b0e574281e1c9727c3c964f200a4085d7f82752cd504cfbe256cd3a3df7ee849",
|
|
20
20
|
"mode": "100644"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
79
|
-
"sha256": "
|
|
79
|
+
"sha256": "806815a4d9393db1977179b790c2480dae44e99f5b1a0fad0e2abb9a4a42ed12",
|
|
80
80
|
"mode": "100644"
|
|
81
81
|
},
|
|
82
82
|
{
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
"path": "docs/funnelsgrove/recipes/add-experiment.md",
|
|
104
|
-
"sha256": "
|
|
104
|
+
"sha256": "4ffda52eecb6caaabe5ac45a1049e995065db983f98d844d256f2296bcfe9ce7",
|
|
105
105
|
"mode": "100644"
|
|
106
106
|
},
|
|
107
107
|
{
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
"path": "funnel-docs.config.json",
|
|
209
|
-
"sha256": "
|
|
209
|
+
"sha256": "85c5912ad82f93ac73658b735b6b598b404305bcf3c18c60d3c000157eba3d58",
|
|
210
210
|
"mode": "100644"
|
|
211
211
|
},
|
|
212
212
|
{
|
|
@@ -236,12 +236,12 @@
|
|
|
236
236
|
},
|
|
237
237
|
{
|
|
238
238
|
"path": "package-lock.json",
|
|
239
|
-
"sha256": "
|
|
239
|
+
"sha256": "1fbeb27f6b47de881d72ef6f1a370ff45517df91195b53ee3015ee3de767f8e6",
|
|
240
240
|
"mode": "100644"
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
243
|
"path": "package.json",
|
|
244
|
-
"sha256": "
|
|
244
|
+
"sha256": "9bc55f9d3db61ba8d7e26b215154b550bc43fa8020f8549d8a3ccf223e929e47",
|
|
245
245
|
"mode": "100644"
|
|
246
246
|
},
|
|
247
247
|
{
|
|
@@ -531,7 +531,7 @@
|
|
|
531
531
|
},
|
|
532
532
|
{
|
|
533
533
|
"path": "src/steps/step-32-paywall.tsx",
|
|
534
|
-
"sha256": "
|
|
534
|
+
"sha256": "fc7b4eeddc91a832ced8e4d73e8e30a024b2cb51a6b9d80b8c3cad5f0ab05712",
|
|
535
535
|
"mode": "100644"
|
|
536
536
|
},
|
|
537
537
|
{
|
|
@@ -17,7 +17,7 @@ Supported read versions: `1`, `2`, `3`. Authoring and publish target version `3`
|
|
|
17
17
|
|
|
18
18
|
### Package release order
|
|
19
19
|
|
|
20
|
-
Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.47.0`, then `@funnelsgrove/analytics` `0.30.0`, then `@funnelsgrove/payments` `0.
|
|
20
|
+
Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.47.0`, then `@funnelsgrove/analytics` `0.30.0`, then `@funnelsgrove/payments` `0.76.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.386`, and only then promotes the candidate to production traffic. The serving API must never advertise an unpublished preferred CLI. Publishing packages and deploying production remain separately approved operational actions.
|
|
21
21
|
<!-- funnelsgrove:generated:end contract-v3/migration/step-contract-v3 -->
|
|
22
22
|
|
|
23
23
|
## Version-last policy
|
|
@@ -192,3 +192,9 @@ For a GitHub-connected funnel, commit and push only the variant step or offer-se
|
|
|
192
192
|
Force every assignment, verify analytics metadata and deduplication, confirm refresh keeps assignment, test missing/invalid flags, and leave inactive variants unreachable from the default flow.
|
|
193
193
|
|
|
194
194
|
Pre-activation, missing-assignment, invalid-assignment, and fallback paths must not create phantom `step_started`, `step_completed`, or `step_exited` events.
|
|
195
|
+
|
|
196
|
+
## Verify a running experiment
|
|
197
|
+
|
|
198
|
+
Open each variant with a forced link: `?mode=test&experiment=<experiment-key>&variant=<variantKey>`. Judge the live split from the experiment's results page in FunnelsGrove once real visitors arrive.
|
|
199
|
+
|
|
200
|
+
Headless browsers (Playwright, Puppeteer, any `HeadlessChrome` user agent) always land on control. PostHog classifies them as bots, `/ingest/flags` returns `"flags":{}`, and the runtime falls back to control. A run of headless visits that all land on control is expected and is not evidence of a missing or misscoped flag.
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"name": "funnel-template",
|
|
9
9
|
"version": "0.1.0",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@funnelsgrove/analytics": "^0.
|
|
12
|
-
"@funnelsgrove/payments": "^0.
|
|
13
|
-
"@funnelsgrove/runtime": "^0.
|
|
11
|
+
"@funnelsgrove/analytics": "^0.30.0",
|
|
12
|
+
"@funnelsgrove/payments": "^0.75.0",
|
|
13
|
+
"@funnelsgrove/runtime": "^0.47.0",
|
|
14
14
|
"@stripe/react-stripe-js": "^5.6.0",
|
|
15
15
|
"@stripe/stripe-js": "^8.7.0",
|
|
16
16
|
"lucide-react": "^0.553.0",
|
|
@@ -940,17 +940,17 @@
|
|
|
940
940
|
}
|
|
941
941
|
},
|
|
942
942
|
"node_modules/@funnelsgrove/analytics": {
|
|
943
|
-
"version": "0.
|
|
944
|
-
"resolved": "https://registry.npmjs.org/@funnelsgrove/analytics/-/analytics-0.
|
|
945
|
-
"integrity": "sha512-
|
|
943
|
+
"version": "0.30.0",
|
|
944
|
+
"resolved": "https://registry.npmjs.org/@funnelsgrove/analytics/-/analytics-0.30.0.tgz",
|
|
945
|
+
"integrity": "sha512-pvTosZ2UDRjTTlQ/H+Rd3K/P7M+mSymJKBO5dfy8NYwWb/S+0ix1IjmhraHll30250nK0snWWBUKbu9PtoDRFg==",
|
|
946
946
|
"peerDependencies": {
|
|
947
|
-
"@funnelsgrove/runtime": "^0.
|
|
947
|
+
"@funnelsgrove/runtime": "^0.47.0"
|
|
948
948
|
}
|
|
949
949
|
},
|
|
950
950
|
"node_modules/@funnelsgrove/payments": {
|
|
951
|
-
"version": "0.
|
|
952
|
-
"resolved": "https://registry.npmjs.org/@funnelsgrove/payments/-/payments-0.
|
|
953
|
-
"integrity": "sha512-
|
|
951
|
+
"version": "0.75.0",
|
|
952
|
+
"resolved": "https://registry.npmjs.org/@funnelsgrove/payments/-/payments-0.75.0.tgz",
|
|
953
|
+
"integrity": "sha512-Povjy6ISavL4v3QrsKy22cTxbwLDyIQVAq1TqW4uQAjdXCSke44bkLSLE7tyhq/kv6ImuVx87+48c8H4czlP+g==",
|
|
954
954
|
"dependencies": {
|
|
955
955
|
"@solidgate/react-sdk": "1.34.0",
|
|
956
956
|
"@stripe/react-stripe-js": "^5.6.0",
|
|
@@ -960,14 +960,14 @@
|
|
|
960
960
|
"stripe": "^20.3.1"
|
|
961
961
|
},
|
|
962
962
|
"peerDependencies": {
|
|
963
|
-
"@funnelsgrove/analytics": "^0.
|
|
964
|
-
"@funnelsgrove/runtime": "^0.
|
|
963
|
+
"@funnelsgrove/analytics": "^0.30.0",
|
|
964
|
+
"@funnelsgrove/runtime": "^0.47.0"
|
|
965
965
|
}
|
|
966
966
|
},
|
|
967
967
|
"node_modules/@funnelsgrove/runtime": {
|
|
968
|
-
"version": "0.
|
|
969
|
-
"resolved": "https://registry.npmjs.org/@funnelsgrove/runtime/-/runtime-0.
|
|
970
|
-
"integrity": "sha512-
|
|
968
|
+
"version": "0.47.0",
|
|
969
|
+
"resolved": "https://registry.npmjs.org/@funnelsgrove/runtime/-/runtime-0.47.0.tgz",
|
|
970
|
+
"integrity": "sha512-vs1yctbG7f2B/gQt3KoYfKRuyKV/hEHaf6z5oUmVrhDlTpnRl060Wr6C4a5Au1e8STwO4xL9UelTdoN9KAVBig==",
|
|
971
971
|
"dependencies": {
|
|
972
972
|
"@funnelsgrove/sdk": "0.4.0",
|
|
973
973
|
"posthog-js": "^1.369.2",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"validate:funnel": "vite-node --config src/contract/funnel-validator.vite.config.ts src/contract/validate-funnel.cli.ts"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@funnelsgrove/analytics": "^0.
|
|
16
|
-
"@funnelsgrove/payments": "^0.
|
|
17
|
-
"@funnelsgrove/runtime": "^0.
|
|
15
|
+
"@funnelsgrove/analytics": "^0.30.0",
|
|
16
|
+
"@funnelsgrove/payments": "^0.75.0",
|
|
17
|
+
"@funnelsgrove/runtime": "^0.47.0",
|
|
18
18
|
"@stripe/react-stripe-js": "^5.6.0",
|
|
19
19
|
"@stripe/stripe-js": "^8.7.0",
|
|
20
20
|
"lucide-react": "^0.553.0",
|
|
@@ -513,6 +513,11 @@ function StepPaywallRuntime({
|
|
|
513
513
|
|
|
514
514
|
return selectedDisplayPlan.priceLabel.split('/')[0]?.trim() || selectedDisplayPlan.priceLabel;
|
|
515
515
|
}, [selectedDisplayPlan]);
|
|
516
|
+
// PayPal charges its own native plan; its first price leads the platform-formatted summary, e.g. "$1.00/day".
|
|
517
|
+
const checkoutPayPalTotalValue = useMemo(
|
|
518
|
+
() => (paypalOption ? paypalOption.summary.split('/')[0]?.trim() || paypalOption.summary : undefined),
|
|
519
|
+
[paypalOption],
|
|
520
|
+
);
|
|
516
521
|
const checkoutDiscountLabel = checkoutPromoActive
|
|
517
522
|
? content.checkout.discountRowLabelTemplate.replace(
|
|
518
523
|
'{percent}',
|
|
@@ -977,6 +982,7 @@ function StepPaywallRuntime({
|
|
|
977
982
|
paypalPending={paypalPending || Boolean(pendingPayPal)}
|
|
978
983
|
paypalButtonLabel={content.checkout.paypalButtonLabel}
|
|
979
984
|
paypalLabel={content.checkout.paypalLabel}
|
|
985
|
+
paypalTotalValue={checkoutPayPalTotalValue}
|
|
980
986
|
promoActive={checkoutPromoActive}
|
|
981
987
|
promoCode={promoDisplayName}
|
|
982
988
|
promoCodeLabel={content.checkout.promoCodeLabel}
|