@funnelsgrove/cli 0.1.301 → 0.1.305
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/funnelValidation.js +69 -0
- package/funnel-contract-compatibility.json +43 -43
- package/package.json +1 -1
- package/template_docs/.funnelsgrove-docs.json +6 -6
- package/template_docs/docs/funnelsgrove/contracts/analytics-events.md +2 -0
- package/template_docs/docs/funnelsgrove/contracts/flow-routing.md +6 -0
- package/template_docs/docs/funnelsgrove/migrations/step-contract-v3.md +1 -1
- package/template_docs/docs/funnelsgrove/qa/publish.md +8 -0
- package/template_docs/funnel-docs.config.json +1 -1
- package/template_scaffold/.funnelsgrove-docs.json +6 -6
- package/template_scaffold/.funnelsgrove-scaffold.json +8 -8
- package/template_scaffold/docs/funnelsgrove/contracts/analytics-events.md +2 -0
- package/template_scaffold/docs/funnelsgrove/contracts/flow-routing.md +6 -0
- package/template_scaffold/docs/funnelsgrove/migrations/step-contract-v3.md +1 -1
- package/template_scaffold/docs/funnelsgrove/qa/publish.md +8 -0
- package/template_scaffold/funnel-docs.config.json +1 -1
package/dist/funnelValidation.js
CHANGED
|
@@ -16,6 +16,7 @@ const MANAGED_VALIDATOR_PATHS = [
|
|
|
16
16
|
];
|
|
17
17
|
const RUNNER_SCRIPT = 'vite-node --config src/contract/funnel-validator.vite.config.ts src/contract/validate-funnel.cli.ts';
|
|
18
18
|
const MIGRATION_COMMAND = 'fgrove migrate step-contract --to 3';
|
|
19
|
+
const FLOW_CONTROLLER_PATH = 'src/runtime/use-funnel-flow-controller.ts';
|
|
19
20
|
const resultWith = (diagnostics, exitCode, contractVersion = PROJECT_VALIDATOR_CONTRACT_VERSION) => ({
|
|
20
21
|
schemaVersion: 1,
|
|
21
22
|
contractVersion,
|
|
@@ -56,6 +57,71 @@ const clientDiagnostic = (received) => createValidationDiagnostic({
|
|
|
56
57
|
guide: 'docs/funnelsgrove/qa/local.md',
|
|
57
58
|
repair: 'Restore the managed validator runner and rerun fgrove validate.',
|
|
58
59
|
});
|
|
60
|
+
const flowAnalyticsDiagnostic = (received) => createValidationDiagnostic({
|
|
61
|
+
code: 'FG-ANALYTICS-001',
|
|
62
|
+
file: FLOW_CONTROLLER_PATH,
|
|
63
|
+
expected: 'useFunnelFlowController({ analytics: publicAnalyticsSdk }) with publicAnalyticsSdk imported from @funnelsgrove/analytics',
|
|
64
|
+
received,
|
|
65
|
+
reason: 'A partial or wrapped analytics adapter silently drops step lifecycle events.',
|
|
66
|
+
guide: 'docs/funnelsgrove/contracts/analytics-events.md',
|
|
67
|
+
repair: 'Pass publicAnalyticsSdk directly as analytics; never subset the analytics adapter. To limit events for a third-party destination, use NEXT_PUBLIC_AMPLITUDE_EXCLUDED_EVENTS.',
|
|
68
|
+
});
|
|
69
|
+
const namedImportBindings = (sourceFile, moduleName, exportName) => {
|
|
70
|
+
const bindings = new Set();
|
|
71
|
+
for (const statement of sourceFile.statements) {
|
|
72
|
+
if (!ts.isImportDeclaration(statement)
|
|
73
|
+
|| !ts.isStringLiteral(statement.moduleSpecifier)
|
|
74
|
+
|| statement.moduleSpecifier.text !== moduleName
|
|
75
|
+
|| statement.importClause?.isTypeOnly
|
|
76
|
+
|| !statement.importClause?.namedBindings
|
|
77
|
+
|| !ts.isNamedImports(statement.importClause.namedBindings))
|
|
78
|
+
continue;
|
|
79
|
+
for (const element of statement.importClause.namedBindings.elements) {
|
|
80
|
+
if (!element.isTypeOnly && (element.propertyName?.text ?? element.name.text) === exportName) {
|
|
81
|
+
bindings.add(element.name.text);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return bindings;
|
|
86
|
+
};
|
|
87
|
+
/** Every shared controller call must receive the SDK itself, so no lifecycle method can be dropped. */
|
|
88
|
+
const inspectFlowControllerAnalytics = async (projectDir) => {
|
|
89
|
+
let source;
|
|
90
|
+
try {
|
|
91
|
+
source = await readFile(path.join(projectDir, FLOW_CONTROLLER_PATH), 'utf8');
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
return flowAnalyticsDiagnostic('missing flow controller wrapper');
|
|
95
|
+
}
|
|
96
|
+
const sourceFile = ts.createSourceFile(FLOW_CONTROLLER_PATH, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
|
|
97
|
+
const sdkBindings = namedImportBindings(sourceFile, '@funnelsgrove/analytics', 'publicAnalyticsSdk');
|
|
98
|
+
const controllerBindings = namedImportBindings(sourceFile, '@funnelsgrove/runtime', 'useFunnelFlowController');
|
|
99
|
+
const passesSdk = (call) => {
|
|
100
|
+
const input = call.arguments[0] && unwrapExpression(call.arguments[0]);
|
|
101
|
+
if (!input || !ts.isObjectLiteralExpression(input))
|
|
102
|
+
return false;
|
|
103
|
+
return input.properties.some((property) => {
|
|
104
|
+
if (ts.isShorthandPropertyAssignment(property)) {
|
|
105
|
+
return property.name.text === 'analytics' && sdkBindings.has('analytics');
|
|
106
|
+
}
|
|
107
|
+
if (!ts.isPropertyAssignment(property) || property.name.getText(sourceFile) !== 'analytics')
|
|
108
|
+
return false;
|
|
109
|
+
const value = unwrapExpression(property.initializer);
|
|
110
|
+
return ts.isIdentifier(value) && sdkBindings.has(value.text);
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
const calls = [];
|
|
114
|
+
const visit = (node) => {
|
|
115
|
+
if (ts.isCallExpression(node) && ts.isIdentifier(node.expression) && controllerBindings.has(node.expression.text)) {
|
|
116
|
+
calls.push(node);
|
|
117
|
+
}
|
|
118
|
+
ts.forEachChild(node, visit);
|
|
119
|
+
};
|
|
120
|
+
visit(sourceFile);
|
|
121
|
+
if (calls.length === 0)
|
|
122
|
+
return flowAnalyticsDiagnostic('no useFunnelFlowController call from @funnelsgrove/runtime');
|
|
123
|
+
return calls.every(passesSdk) ? null : flowAnalyticsDiagnostic('analytics is not publicAnalyticsSdk');
|
|
124
|
+
};
|
|
59
125
|
const unwrapExpression = (input) => {
|
|
60
126
|
let expression = input;
|
|
61
127
|
while (ts.isParenthesizedExpression(expression)
|
|
@@ -286,6 +352,9 @@ export const validateFunnel = async (options) => {
|
|
|
286
352
|
const packageDiagnostics = inspectPackageCompatibility(projectDir);
|
|
287
353
|
if (packageDiagnostics.length)
|
|
288
354
|
return resultWith(packageDiagnostics, 1);
|
|
355
|
+
const flowAnalytics = await inspectFlowControllerAnalytics(projectDir);
|
|
356
|
+
if (flowAnalytics)
|
|
357
|
+
return resultWith([flowAnalytics], 1);
|
|
289
358
|
let childResult;
|
|
290
359
|
try {
|
|
291
360
|
childResult = await (options.runProjectValidator ?? runCheckedInProjectValidator)({
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"minimumCliVersion": "0.1.20",
|
|
5
5
|
"entries": [
|
|
6
6
|
{
|
|
7
|
-
"repositoryCliVersion": "0.1.
|
|
7
|
+
"repositoryCliVersion": "0.1.305",
|
|
8
8
|
"manifest": {
|
|
9
9
|
"schemaVersion": 1,
|
|
10
|
-
"bundleVersion": "2.0.
|
|
10
|
+
"bundleVersion": "2.0.298",
|
|
11
11
|
"stepContractVersion": 3,
|
|
12
12
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
13
13
|
"managedFiles": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"path": "docs/funnelsgrove/contracts/analytics-events.md",
|
|
28
|
-
"sha256": "
|
|
28
|
+
"sha256": "11c79bd21570374ae591f21594c7235cc2bb015067ad901eddc1420a9998cd25"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"path": "docs/funnelsgrove/contracts/content-answers.md",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"path": "docs/funnelsgrove/contracts/flow-routing.md",
|
|
36
|
-
"sha256": "
|
|
36
|
+
"sha256": "fd81ec6c973f4c3a9c26db813bf44c6cfce3c8bbe17287cdaec330fa566ee78c"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"path": "docs/funnelsgrove/contracts/payments.md",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
48
|
-
"sha256": "
|
|
48
|
+
"sha256": "6a7df14c1aad5de56a90931928a2ed3f0ac08cf1e04c34f9a4da77ad65cec8b3"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
"path": "docs/funnelsgrove/qa/publish.md",
|
|
64
|
-
"sha256": "
|
|
64
|
+
"sha256": "dd1584f08ffd779375b4ffec6890d6ef731734925d7abb2d021f7f0ad15d11f6"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"path": "docs/funnelsgrove/recipes/add-experiment.md",
|
|
@@ -145,16 +145,16 @@
|
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
"path": "funnel-docs.config.json",
|
|
148
|
-
"sha256": "
|
|
148
|
+
"sha256": "0009f06c828f9441ff7a9a8a36ca4fe799fc70236b0338506a2e8fb9325092ca"
|
|
149
149
|
}
|
|
150
150
|
]
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
|
-
"repositoryCliVersion": "0.1.
|
|
154
|
+
"repositoryCliVersion": "0.1.304",
|
|
155
155
|
"manifest": {
|
|
156
156
|
"schemaVersion": 1,
|
|
157
|
-
"bundleVersion": "2.0.
|
|
157
|
+
"bundleVersion": "2.0.297",
|
|
158
158
|
"stepContractVersion": 3,
|
|
159
159
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
160
160
|
"managedFiles": [
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
174
|
"path": "docs/funnelsgrove/contracts/analytics-events.md",
|
|
175
|
-
"sha256": "
|
|
175
|
+
"sha256": "11c79bd21570374ae591f21594c7235cc2bb015067ad901eddc1420a9998cd25"
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
"path": "docs/funnelsgrove/contracts/content-answers.md",
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
194
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
195
|
-
"sha256": "
|
|
195
|
+
"sha256": "6b5546c6bfabf6c03b3d576bf945de4350a0d8f465a4159a3fb7cae40ba6142a"
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
198
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
},
|
|
209
209
|
{
|
|
210
210
|
"path": "docs/funnelsgrove/qa/publish.md",
|
|
211
|
-
"sha256": "
|
|
211
|
+
"sha256": "dd1584f08ffd779375b4ffec6890d6ef731734925d7abb2d021f7f0ad15d11f6"
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
"path": "docs/funnelsgrove/recipes/add-experiment.md",
|
|
@@ -292,16 +292,16 @@
|
|
|
292
292
|
},
|
|
293
293
|
{
|
|
294
294
|
"path": "funnel-docs.config.json",
|
|
295
|
-
"sha256": "
|
|
295
|
+
"sha256": "ba7cf49d4b85969994262ae8ca59989cc5ef6a7db7272820556a99887bc5c408"
|
|
296
296
|
}
|
|
297
297
|
]
|
|
298
298
|
}
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
|
-
"repositoryCliVersion": "0.1.
|
|
301
|
+
"repositoryCliVersion": "0.1.303",
|
|
302
302
|
"manifest": {
|
|
303
303
|
"schemaVersion": 1,
|
|
304
|
-
"bundleVersion": "2.0.
|
|
304
|
+
"bundleVersion": "2.0.296",
|
|
305
305
|
"stepContractVersion": 3,
|
|
306
306
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
307
307
|
"managedFiles": [
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
},
|
|
320
320
|
{
|
|
321
321
|
"path": "docs/funnelsgrove/contracts/analytics-events.md",
|
|
322
|
-
"sha256": "
|
|
322
|
+
"sha256": "11c79bd21570374ae591f21594c7235cc2bb015067ad901eddc1420a9998cd25"
|
|
323
323
|
},
|
|
324
324
|
{
|
|
325
325
|
"path": "docs/funnelsgrove/contracts/content-answers.md",
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
},
|
|
340
340
|
{
|
|
341
341
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
342
|
-
"sha256": "
|
|
342
|
+
"sha256": "b54e093d99f163b399ca52788beabc94530accea7b3c7d60caaf9f067a5aeb04"
|
|
343
343
|
},
|
|
344
344
|
{
|
|
345
345
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
},
|
|
356
356
|
{
|
|
357
357
|
"path": "docs/funnelsgrove/qa/publish.md",
|
|
358
|
-
"sha256": "
|
|
358
|
+
"sha256": "dd1584f08ffd779375b4ffec6890d6ef731734925d7abb2d021f7f0ad15d11f6"
|
|
359
359
|
},
|
|
360
360
|
{
|
|
361
361
|
"path": "docs/funnelsgrove/recipes/add-experiment.md",
|
|
@@ -439,16 +439,16 @@
|
|
|
439
439
|
},
|
|
440
440
|
{
|
|
441
441
|
"path": "funnel-docs.config.json",
|
|
442
|
-
"sha256": "
|
|
442
|
+
"sha256": "51ad1bfe95afe002bc2fabefe00655881cc41ab34cfb1d13a0dbf92b31ab0c7e"
|
|
443
443
|
}
|
|
444
444
|
]
|
|
445
445
|
}
|
|
446
446
|
},
|
|
447
447
|
{
|
|
448
|
-
"repositoryCliVersion": "0.1.
|
|
448
|
+
"repositoryCliVersion": "0.1.302",
|
|
449
449
|
"manifest": {
|
|
450
450
|
"schemaVersion": 1,
|
|
451
|
-
"bundleVersion": "2.0.
|
|
451
|
+
"bundleVersion": "2.0.295",
|
|
452
452
|
"stepContractVersion": 3,
|
|
453
453
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
454
454
|
"managedFiles": [
|
|
@@ -466,7 +466,7 @@
|
|
|
466
466
|
},
|
|
467
467
|
{
|
|
468
468
|
"path": "docs/funnelsgrove/contracts/analytics-events.md",
|
|
469
|
-
"sha256": "
|
|
469
|
+
"sha256": "482b159a6b88a86009b9d2bec643d3e6dc4389c7693e1ab26c8df60b1eeb1f19"
|
|
470
470
|
},
|
|
471
471
|
{
|
|
472
472
|
"path": "docs/funnelsgrove/contracts/content-answers.md",
|
|
@@ -486,7 +486,7 @@
|
|
|
486
486
|
},
|
|
487
487
|
{
|
|
488
488
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
489
|
-
"sha256": "
|
|
489
|
+
"sha256": "373b181e673ad2fffcbcb68a11fa43186a57cac67493a746aafec03bd0a0ab94"
|
|
490
490
|
},
|
|
491
491
|
{
|
|
492
492
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -502,7 +502,7 @@
|
|
|
502
502
|
},
|
|
503
503
|
{
|
|
504
504
|
"path": "docs/funnelsgrove/qa/publish.md",
|
|
505
|
-
"sha256": "
|
|
505
|
+
"sha256": "dd1584f08ffd779375b4ffec6890d6ef731734925d7abb2d021f7f0ad15d11f6"
|
|
506
506
|
},
|
|
507
507
|
{
|
|
508
508
|
"path": "docs/funnelsgrove/recipes/add-experiment.md",
|
|
@@ -586,16 +586,16 @@
|
|
|
586
586
|
},
|
|
587
587
|
{
|
|
588
588
|
"path": "funnel-docs.config.json",
|
|
589
|
-
"sha256": "
|
|
589
|
+
"sha256": "df1b6615d35d8d2385038e26580604bae5921075126dd01159bf7300ba675bf9"
|
|
590
590
|
}
|
|
591
591
|
]
|
|
592
592
|
}
|
|
593
593
|
},
|
|
594
594
|
{
|
|
595
|
-
"repositoryCliVersion": "0.1.
|
|
595
|
+
"repositoryCliVersion": "0.1.301",
|
|
596
596
|
"manifest": {
|
|
597
597
|
"schemaVersion": 1,
|
|
598
|
-
"bundleVersion": "2.0.
|
|
598
|
+
"bundleVersion": "2.0.294",
|
|
599
599
|
"stepContractVersion": 3,
|
|
600
600
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
601
601
|
"managedFiles": [
|
|
@@ -625,7 +625,7 @@
|
|
|
625
625
|
},
|
|
626
626
|
{
|
|
627
627
|
"path": "docs/funnelsgrove/contracts/payments.md",
|
|
628
|
-
"sha256": "
|
|
628
|
+
"sha256": "6e64acdf171351fddedc96e908f4135e2240751a726c05d938c6e8644ab42082"
|
|
629
629
|
},
|
|
630
630
|
{
|
|
631
631
|
"path": "docs/funnelsgrove/contracts/step-metadata.md",
|
|
@@ -633,7 +633,7 @@
|
|
|
633
633
|
},
|
|
634
634
|
{
|
|
635
635
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
636
|
-
"sha256": "
|
|
636
|
+
"sha256": "39d41b41132bf4ecbae9f2e98500cea9045c66889bd4b6daf67673a566f282d3"
|
|
637
637
|
},
|
|
638
638
|
{
|
|
639
639
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -725,7 +725,7 @@
|
|
|
725
725
|
},
|
|
726
726
|
{
|
|
727
727
|
"path": "docs/funnelsgrove/steps/upsell_offer.md",
|
|
728
|
-
"sha256": "
|
|
728
|
+
"sha256": "4a4d6122e868bbef1ca9e11238f6e7f4f8e03b5bf7dba7a1a0205c3ac422d4bd"
|
|
729
729
|
},
|
|
730
730
|
{
|
|
731
731
|
"path": "docs/funnelsgrove/steps/value_prop_story.md",
|
|
@@ -733,16 +733,16 @@
|
|
|
733
733
|
},
|
|
734
734
|
{
|
|
735
735
|
"path": "funnel-docs.config.json",
|
|
736
|
-
"sha256": "
|
|
736
|
+
"sha256": "69f6150b16fa1293a238fdc56d2f097dec4f626f3cdf32dc51f75b0f5cb06485"
|
|
737
737
|
}
|
|
738
738
|
]
|
|
739
739
|
}
|
|
740
740
|
},
|
|
741
741
|
{
|
|
742
|
-
"repositoryCliVersion": "0.1.
|
|
742
|
+
"repositoryCliVersion": "0.1.300",
|
|
743
743
|
"manifest": {
|
|
744
744
|
"schemaVersion": 1,
|
|
745
|
-
"bundleVersion": "2.0.
|
|
745
|
+
"bundleVersion": "2.0.293",
|
|
746
746
|
"stepContractVersion": 3,
|
|
747
747
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
748
748
|
"managedFiles": [
|
|
@@ -772,7 +772,7 @@
|
|
|
772
772
|
},
|
|
773
773
|
{
|
|
774
774
|
"path": "docs/funnelsgrove/contracts/payments.md",
|
|
775
|
-
"sha256": "
|
|
775
|
+
"sha256": "6e64acdf171351fddedc96e908f4135e2240751a726c05d938c6e8644ab42082"
|
|
776
776
|
},
|
|
777
777
|
{
|
|
778
778
|
"path": "docs/funnelsgrove/contracts/step-metadata.md",
|
|
@@ -780,7 +780,7 @@
|
|
|
780
780
|
},
|
|
781
781
|
{
|
|
782
782
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
783
|
-
"sha256": "
|
|
783
|
+
"sha256": "24c93bea6e2b118908401b7ef82d36ae846669f7cf62d0b4cc18674caf531866"
|
|
784
784
|
},
|
|
785
785
|
{
|
|
786
786
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -872,7 +872,7 @@
|
|
|
872
872
|
},
|
|
873
873
|
{
|
|
874
874
|
"path": "docs/funnelsgrove/steps/upsell_offer.md",
|
|
875
|
-
"sha256": "
|
|
875
|
+
"sha256": "4a4d6122e868bbef1ca9e11238f6e7f4f8e03b5bf7dba7a1a0205c3ac422d4bd"
|
|
876
876
|
},
|
|
877
877
|
{
|
|
878
878
|
"path": "docs/funnelsgrove/steps/value_prop_story.md",
|
|
@@ -880,16 +880,16 @@
|
|
|
880
880
|
},
|
|
881
881
|
{
|
|
882
882
|
"path": "funnel-docs.config.json",
|
|
883
|
-
"sha256": "
|
|
883
|
+
"sha256": "ec0d3caed99d53b09e28ecf2e59fd3100caf0d32c08c507651611a05c7019b6d"
|
|
884
884
|
}
|
|
885
885
|
]
|
|
886
886
|
}
|
|
887
887
|
},
|
|
888
888
|
{
|
|
889
|
-
"repositoryCliVersion": "0.1.
|
|
889
|
+
"repositoryCliVersion": "0.1.299",
|
|
890
890
|
"manifest": {
|
|
891
891
|
"schemaVersion": 1,
|
|
892
|
-
"bundleVersion": "2.0.
|
|
892
|
+
"bundleVersion": "2.0.292",
|
|
893
893
|
"stepContractVersion": 3,
|
|
894
894
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
895
895
|
"managedFiles": [
|
|
@@ -919,7 +919,7 @@
|
|
|
919
919
|
},
|
|
920
920
|
{
|
|
921
921
|
"path": "docs/funnelsgrove/contracts/payments.md",
|
|
922
|
-
"sha256": "
|
|
922
|
+
"sha256": "6e64acdf171351fddedc96e908f4135e2240751a726c05d938c6e8644ab42082"
|
|
923
923
|
},
|
|
924
924
|
{
|
|
925
925
|
"path": "docs/funnelsgrove/contracts/step-metadata.md",
|
|
@@ -927,7 +927,7 @@
|
|
|
927
927
|
},
|
|
928
928
|
{
|
|
929
929
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
930
|
-
"sha256": "
|
|
930
|
+
"sha256": "c0dd6a75b2a824e38686b0ef29721b8bf6c61267254cfefeb036279eb40ddc0b"
|
|
931
931
|
},
|
|
932
932
|
{
|
|
933
933
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -1019,7 +1019,7 @@
|
|
|
1019
1019
|
},
|
|
1020
1020
|
{
|
|
1021
1021
|
"path": "docs/funnelsgrove/steps/upsell_offer.md",
|
|
1022
|
-
"sha256": "
|
|
1022
|
+
"sha256": "4a4d6122e868bbef1ca9e11238f6e7f4f8e03b5bf7dba7a1a0205c3ac422d4bd"
|
|
1023
1023
|
},
|
|
1024
1024
|
{
|
|
1025
1025
|
"path": "docs/funnelsgrove/steps/value_prop_story.md",
|
|
@@ -1027,7 +1027,7 @@
|
|
|
1027
1027
|
},
|
|
1028
1028
|
{
|
|
1029
1029
|
"path": "funnel-docs.config.json",
|
|
1030
|
-
"sha256": "
|
|
1030
|
+
"sha256": "f381938717d2b2bf89f9ee4a8b671ac6a7618d63aad64f4abbeb214d1426de39"
|
|
1031
1031
|
}
|
|
1032
1032
|
]
|
|
1033
1033
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"bundleVersion": "2.0.
|
|
3
|
+
"bundleVersion": "2.0.298",
|
|
4
4
|
"stepContractVersion": 3,
|
|
5
5
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
6
6
|
"managedFiles": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"path": "docs/funnelsgrove/contracts/analytics-events.md",
|
|
21
|
-
"sha256": "
|
|
21
|
+
"sha256": "11c79bd21570374ae591f21594c7235cc2bb015067ad901eddc1420a9998cd25"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"path": "docs/funnelsgrove/contracts/content-answers.md",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"path": "docs/funnelsgrove/contracts/flow-routing.md",
|
|
29
|
-
"sha256": "
|
|
29
|
+
"sha256": "fd81ec6c973f4c3a9c26db813bf44c6cfce3c8bbe17287cdaec330fa566ee78c"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"path": "docs/funnelsgrove/contracts/payments.md",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
41
|
-
"sha256": "
|
|
41
|
+
"sha256": "6a7df14c1aad5de56a90931928a2ed3f0ac08cf1e04c34f9a4da77ad65cec8b3"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"path": "docs/funnelsgrove/qa/publish.md",
|
|
57
|
-
"sha256": "
|
|
57
|
+
"sha256": "dd1584f08ffd779375b4ffec6890d6ef731734925d7abb2d021f7f0ad15d11f6"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
"path": "docs/funnelsgrove/recipes/add-experiment.md",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "funnel-docs.config.json",
|
|
141
|
-
"sha256": "
|
|
141
|
+
"sha256": "0009f06c828f9441ff7a9a8a36ca4fe799fc70236b0338506a2e8fb9325092ca"
|
|
142
142
|
}
|
|
143
143
|
]
|
|
144
144
|
}
|
|
@@ -32,6 +32,8 @@ The `purchase_completed` event is owned by `trusted-server` and is recorded only
|
|
|
32
32
|
## Ownership rules
|
|
33
33
|
|
|
34
34
|
- The flow controller emits lifecycle events. Step components do not duplicate them.
|
|
35
|
+
- `src/runtime/use-funnel-flow-controller.ts` passes `publicAnalyticsSdk` as `analytics` unchanged; never wrap, subset, or replace it (`FG-ANALYTICS-001`). Limit Amplitude events with `NEXT_PUBLIC_AMPLITUDE_EXCLUDED_EVENTS`.
|
|
36
|
+
- When porting from another funnel, take `src/runtime/` and `src/contract/` from the current template.
|
|
35
37
|
- `step_engaged` is non-automatic and absent by default; only an explicit, centralized, tested policy may emit it through the approved controller/helper boundary.
|
|
36
38
|
- `submitEmailCapture` creates `email_captured` transactionally, then routes only after success.
|
|
37
39
|
- Shared payments components emit checkout semantic events at real payment boundaries when given `checkoutAnalytics`: a visible checkout form or wallet button owns `checkout_shown`, dialog/wallet intent owns `checkout_started`, actual submit owns `add_payment_info`, and verified success owns `checkout_completed`. Funnel components do not call those SDK methods directly.
|
|
@@ -33,6 +33,12 @@ Use the flow controller so answer writes, semantic conversions, completion, and
|
|
|
33
33
|
|
|
34
34
|
For experiments, follow [the add-experiment recipe](../recipes/add-experiment.md). Run `fgrove validate` after any graph change.
|
|
35
35
|
|
|
36
|
+
## First screen speed
|
|
37
|
+
|
|
38
|
+
- The first step may wait only for the published runtime config. Never hide or delay a step until visitor bootstrap, attribution, PostHog, analytics, checkout or any other request settles; the shared controller already queues lifecycle events until attribution is ready.
|
|
39
|
+
- Keep the entry step's first viewport image local, mark it with framework `priority`, and keep heavy work (checkout SDKs, uploads, animations) off the first step's render path.
|
|
40
|
+
- Do not add loading screens, artificial delays or blocking `await` calls in `FunnelFlow` or the entry step.
|
|
41
|
+
|
|
36
42
|
## Asset and preload metadata
|
|
37
43
|
|
|
38
44
|
- Give each funnel-critical image a stable `funnelManifest.assets` entry and attach it through the owning step's `assetIds`; every ID must resolve.
|
|
@@ -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.
|
|
20
|
+
Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.38.0`, then `@funnelsgrove/analytics` `0.20.0`, then `@funnelsgrove/payments` `0.51.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.305`, 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
|
|
@@ -31,3 +31,11 @@ Contract hash: `d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf
|
|
|
31
31
|
## Production gate
|
|
32
32
|
|
|
33
33
|
Publish production only after explicit approval and successful preview QA. Confirm the selected project/funnel/environment immediately before publishing, then smoke-test the live journey without creating duplicate conversions.
|
|
34
|
+
|
|
35
|
+
## Paid-traffic launch gate
|
|
36
|
+
|
|
37
|
+
Run on production before paid traffic reaches a new or cloned funnel and after runtime, analytics, or payment wiring changes. Preview cannot pass it. Missing evidence means NOT ready, never skipped or blocked.
|
|
38
|
+
|
|
39
|
+
1. In the live domain's network panel, the first step sends `step_started` and `first_step_viewed` to `/ingest` with the funnel id; `fgrove analytics transitions` shows them within ~1h.
|
|
40
|
+
2. The live payment webhook shows verified for the current secret. Unverified means live purchases are not recorded.
|
|
41
|
+
3. One real live purchase records the subscription and sends the purchase conversion; then refund it.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"bundleVersion": "2.0.
|
|
3
|
+
"bundleVersion": "2.0.298",
|
|
4
4
|
"stepContractVersion": 3,
|
|
5
5
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
6
6
|
"managedFiles": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"path": "docs/funnelsgrove/contracts/analytics-events.md",
|
|
21
|
-
"sha256": "
|
|
21
|
+
"sha256": "11c79bd21570374ae591f21594c7235cc2bb015067ad901eddc1420a9998cd25"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"path": "docs/funnelsgrove/contracts/content-answers.md",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"path": "docs/funnelsgrove/contracts/flow-routing.md",
|
|
29
|
-
"sha256": "
|
|
29
|
+
"sha256": "fd81ec6c973f4c3a9c26db813bf44c6cfce3c8bbe17287cdaec330fa566ee78c"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"path": "docs/funnelsgrove/contracts/payments.md",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
41
|
-
"sha256": "
|
|
41
|
+
"sha256": "6a7df14c1aad5de56a90931928a2ed3f0ac08cf1e04c34f9a4da77ad65cec8b3"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"path": "docs/funnelsgrove/qa/publish.md",
|
|
57
|
-
"sha256": "
|
|
57
|
+
"sha256": "dd1584f08ffd779375b4ffec6890d6ef731734925d7abb2d021f7f0ad15d11f6"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
"path": "docs/funnelsgrove/recipes/add-experiment.md",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "funnel-docs.config.json",
|
|
141
|
-
"sha256": "
|
|
141
|
+
"sha256": "0009f06c828f9441ff7a9a8a36ca4fe799fc70236b0338506a2e8fb9325092ca"
|
|
142
142
|
}
|
|
143
143
|
]
|
|
144
144
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"sourceTreeHash": "
|
|
3
|
+
"sourceTreeHash": "7b8e91fde9272292216e30eef90608465a8c24da463c510c3c0961fdea92b6f4",
|
|
4
4
|
"stepContractVersion": 3,
|
|
5
|
-
"docsBundleVersion": "2.0.
|
|
5
|
+
"docsBundleVersion": "2.0.298",
|
|
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": "c428f777dea0be45118c1c3a1d196e266c50995968dd6aa5e6542d9ad6708478",
|
|
20
20
|
"mode": "100644"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"path": "docs/funnelsgrove/contracts/analytics-events.md",
|
|
54
|
-
"sha256": "
|
|
54
|
+
"sha256": "11c79bd21570374ae591f21594c7235cc2bb015067ad901eddc1420a9998cd25",
|
|
55
55
|
"mode": "100644"
|
|
56
56
|
},
|
|
57
57
|
{
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
"path": "docs/funnelsgrove/contracts/flow-routing.md",
|
|
64
|
-
"sha256": "
|
|
64
|
+
"sha256": "fd81ec6c973f4c3a9c26db813bf44c6cfce3c8bbe17287cdaec330fa566ee78c",
|
|
65
65
|
"mode": "100644"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
79
|
-
"sha256": "
|
|
79
|
+
"sha256": "6a7df14c1aad5de56a90931928a2ed3f0ac08cf1e04c34f9a4da77ad65cec8b3",
|
|
80
80
|
"mode": "100644"
|
|
81
81
|
},
|
|
82
82
|
{
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"path": "docs/funnelsgrove/qa/publish.md",
|
|
99
|
-
"sha256": "
|
|
99
|
+
"sha256": "dd1584f08ffd779375b4ffec6890d6ef731734925d7abb2d021f7f0ad15d11f6",
|
|
100
100
|
"mode": "100644"
|
|
101
101
|
},
|
|
102
102
|
{
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
"path": "funnel-docs.config.json",
|
|
209
|
-
"sha256": "
|
|
209
|
+
"sha256": "0009f06c828f9441ff7a9a8a36ca4fe799fc70236b0338506a2e8fb9325092ca",
|
|
210
210
|
"mode": "100644"
|
|
211
211
|
},
|
|
212
212
|
{
|
|
@@ -32,6 +32,8 @@ The `purchase_completed` event is owned by `trusted-server` and is recorded only
|
|
|
32
32
|
## Ownership rules
|
|
33
33
|
|
|
34
34
|
- The flow controller emits lifecycle events. Step components do not duplicate them.
|
|
35
|
+
- `src/runtime/use-funnel-flow-controller.ts` passes `publicAnalyticsSdk` as `analytics` unchanged; never wrap, subset, or replace it (`FG-ANALYTICS-001`). Limit Amplitude events with `NEXT_PUBLIC_AMPLITUDE_EXCLUDED_EVENTS`.
|
|
36
|
+
- When porting from another funnel, take `src/runtime/` and `src/contract/` from the current template.
|
|
35
37
|
- `step_engaged` is non-automatic and absent by default; only an explicit, centralized, tested policy may emit it through the approved controller/helper boundary.
|
|
36
38
|
- `submitEmailCapture` creates `email_captured` transactionally, then routes only after success.
|
|
37
39
|
- Shared payments components emit checkout semantic events at real payment boundaries when given `checkoutAnalytics`: a visible checkout form or wallet button owns `checkout_shown`, dialog/wallet intent owns `checkout_started`, actual submit owns `add_payment_info`, and verified success owns `checkout_completed`. Funnel components do not call those SDK methods directly.
|
|
@@ -33,6 +33,12 @@ Use the flow controller so answer writes, semantic conversions, completion, and
|
|
|
33
33
|
|
|
34
34
|
For experiments, follow [the add-experiment recipe](../recipes/add-experiment.md). Run `fgrove validate` after any graph change.
|
|
35
35
|
|
|
36
|
+
## First screen speed
|
|
37
|
+
|
|
38
|
+
- The first step may wait only for the published runtime config. Never hide or delay a step until visitor bootstrap, attribution, PostHog, analytics, checkout or any other request settles; the shared controller already queues lifecycle events until attribution is ready.
|
|
39
|
+
- Keep the entry step's first viewport image local, mark it with framework `priority`, and keep heavy work (checkout SDKs, uploads, animations) off the first step's render path.
|
|
40
|
+
- Do not add loading screens, artificial delays or blocking `await` calls in `FunnelFlow` or the entry step.
|
|
41
|
+
|
|
36
42
|
## Asset and preload metadata
|
|
37
43
|
|
|
38
44
|
- Give each funnel-critical image a stable `funnelManifest.assets` entry and attach it through the owning step's `assetIds`; every ID must resolve.
|
|
@@ -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.
|
|
20
|
+
Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.38.0`, then `@funnelsgrove/analytics` `0.20.0`, then `@funnelsgrove/payments` `0.51.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.305`, 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
|
|
@@ -31,3 +31,11 @@ Contract hash: `d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf
|
|
|
31
31
|
## Production gate
|
|
32
32
|
|
|
33
33
|
Publish production only after explicit approval and successful preview QA. Confirm the selected project/funnel/environment immediately before publishing, then smoke-test the live journey without creating duplicate conversions.
|
|
34
|
+
|
|
35
|
+
## Paid-traffic launch gate
|
|
36
|
+
|
|
37
|
+
Run on production before paid traffic reaches a new or cloned funnel and after runtime, analytics, or payment wiring changes. Preview cannot pass it. Missing evidence means NOT ready, never skipped or blocked.
|
|
38
|
+
|
|
39
|
+
1. In the live domain's network panel, the first step sends `step_started` and `first_step_viewed` to `/ingest` with the funnel id; `fgrove analytics transitions` shows them within ~1h.
|
|
40
|
+
2. The live payment webhook shows verified for the current secret. Unverified means live purchases are not recorded.
|
|
41
|
+
3. One real live purchase records the subscription and sends the purchase conversion; then refund it.
|