@funnelsgrove/cli 0.1.80 → 0.1.87
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 +10 -0
- package/dist/cli.js +112 -4
- package/dist/emailCommands.d.ts +46 -1
- package/dist/emailCommands.js +172 -0
- package/dist/emailFiles.js +2 -2
- package/funnel-contract-compatibility.json +28 -28
- package/package.json +3 -3
- package/template_docs/.funnelsgrove-docs.json +3 -3
- package/template_docs/docs/funnelsgrove/migrations/step-contract-v3.md +1 -1
- package/template_docs/funnel-docs.config.json +1 -1
- package/template_scaffold/.funnelsgrove-docs.json +3 -3
- package/template_scaffold/.funnelsgrove-scaffold.json +8 -8
- package/template_scaffold/docs/funnelsgrove/migrations/step-contract-v3.md +1 -1
- package/template_scaffold/funnel-docs.config.json +1 -1
- package/template_scaffold/package-lock.json +9 -9
- package/template_scaffold/package.json +2 -2
- package/template_scaffold/tests/funnel-agent-docs.test.ts +1 -1
package/dist/cli.d.ts
CHANGED
|
@@ -247,6 +247,16 @@ export declare const executePublishAndWait: (input: {
|
|
|
247
247
|
domains?: string[];
|
|
248
248
|
backend?: PublishCommandBackend;
|
|
249
249
|
}) => Promise<string>;
|
|
250
|
+
export declare const buildCloneFunnelMutationInput: (input: {
|
|
251
|
+
workspaceId: string;
|
|
252
|
+
funnelId: string;
|
|
253
|
+
name: string;
|
|
254
|
+
}, createIdempotencyKey?: () => string) => {
|
|
255
|
+
idempotencyKey: string;
|
|
256
|
+
workspaceId: string;
|
|
257
|
+
funnelId: string;
|
|
258
|
+
name: string;
|
|
259
|
+
};
|
|
250
260
|
export type GitHubSyncTimeoutPolicy = 'strict' | 'continue';
|
|
251
261
|
export declare const PUBLISH_GITHUB_SYNC_TIMEOUT_POLICY: GitHubSyncTimeoutPolicy;
|
|
252
262
|
export declare const OFFER_SETS_GITHUB_SYNC_TIMEOUT_POLICY: GitHubSyncTimeoutPolicy;
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { createHash } from 'node:crypto';
|
|
2
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
3
3
|
import { constants as fsConstants, realpathSync } from 'node:fs';
|
|
4
4
|
import { cp, link, lstat, mkdir, mkdtemp, open, readFile, readdir, rmdir, rm, unlink, writeFile, } from 'node:fs/promises';
|
|
5
5
|
import { spawn } from 'node:child_process';
|
|
@@ -15,7 +15,7 @@ import { buildCommittedSyncManifest, buildDownloadedSyncManifest, buildSourceCan
|
|
|
15
15
|
import { mergeTextSourceWithGit } from './sourceRebase.js';
|
|
16
16
|
import { executeExperimentCreate, formatExperimentCreateSuccess, recoverExperimentCreateTransaction, } from './experimentCreate.js';
|
|
17
17
|
import { pullEnvFile } from './envSync.js';
|
|
18
|
-
import { executeEmailPull, executeEmailPush, executeEmailSequencePublish, executeEmailTemplatePublish, executeEmailValidate, } from './emailCommands.js';
|
|
18
|
+
import { executeEmailPull, executeEmailPush, executeEmailSend, executeEmailSequenceAddStep, executeEmailSequenceCreate, executeEmailSequencePublish, executeEmailSequenceSetActive, executeEmailTemplatePublish, executeEmailValidate, parseEmailVariablesJson, } from './emailCommands.js';
|
|
19
19
|
import { formatGitHubConnectRows, formatGitHubJobRows, formatGitHubStatusRows, } from './githubOutput.js';
|
|
20
20
|
import { GitHubSyncTimeoutError, syncGitHubDraftIfConnected, } from './githubSyncFlow.js';
|
|
21
21
|
import { reskinFunnel } from './reskin.js';
|
|
@@ -1372,6 +1372,10 @@ const listFunnels = async (token, workspaceId) => {
|
|
|
1372
1372
|
});
|
|
1373
1373
|
return result.funnels;
|
|
1374
1374
|
};
|
|
1375
|
+
export const buildCloneFunnelMutationInput = (input, createIdempotencyKey = randomUUID) => ({
|
|
1376
|
+
...input,
|
|
1377
|
+
idempotencyKey: `cli-clone:${createIdempotencyKey()}`,
|
|
1378
|
+
});
|
|
1375
1379
|
const resolveFunnel = async (token, workspaceId, funnel) => {
|
|
1376
1380
|
if (UUID_PATTERN.test(funnel)) {
|
|
1377
1381
|
return {
|
|
@@ -1707,8 +1711,41 @@ const emailCommand = addExamples(program.command('email').description('Manage pr
|
|
|
1707
1711
|
'fgrove email pull',
|
|
1708
1712
|
'fgrove email validate',
|
|
1709
1713
|
'fgrove email push',
|
|
1714
|
+
'fgrove email send --template welcome --to delivered@example.com',
|
|
1710
1715
|
'fgrove email template publish welcome',
|
|
1711
1716
|
]);
|
|
1717
|
+
emailCommand
|
|
1718
|
+
.command('send')
|
|
1719
|
+
.description('Send a published email template with a private project token')
|
|
1720
|
+
.requiredOption('--template <slug>', 'Published email template slug')
|
|
1721
|
+
.requiredOption('--to <email>', 'Recipient email address')
|
|
1722
|
+
.option('--variables <json>', 'Template variables as a JSON object', '{}')
|
|
1723
|
+
.option('--idempotency-key <key>', 'Stable key used to deduplicate retries')
|
|
1724
|
+
.option('--api-url <url>', 'Emails SDK API URL', process.env.FUNNELSGROVE_EMAILS_API_URL || 'https://sdk-api.funnelsgrove.com')
|
|
1725
|
+
.option('--private-token <token>', 'Private project token (defaults to FUNNELSGROVE_PRIVATE_TOKEN)', process.env.FUNNELSGROVE_PRIVATE_TOKEN)
|
|
1726
|
+
.option('--no-wait', 'Return after the email is queued')
|
|
1727
|
+
.option('--timeout-seconds <seconds>', 'Maximum time to wait for delivery', '120')
|
|
1728
|
+
.action(async (options) => {
|
|
1729
|
+
const timeoutSeconds = Number(options.timeoutSeconds);
|
|
1730
|
+
if (!Number.isInteger(timeoutSeconds) || timeoutSeconds <= 0) {
|
|
1731
|
+
throw new Error('--timeout-seconds must be a positive integer.');
|
|
1732
|
+
}
|
|
1733
|
+
const result = await executeEmailSend({
|
|
1734
|
+
apiUrl: options.apiUrl,
|
|
1735
|
+
privateToken: options.privateToken || '',
|
|
1736
|
+
template: options.template,
|
|
1737
|
+
to: options.to,
|
|
1738
|
+
variables: parseEmailVariablesJson(options.variables),
|
|
1739
|
+
idempotencyKey: options.idempotencyKey,
|
|
1740
|
+
wait: options.wait,
|
|
1741
|
+
timeoutMs: timeoutSeconds * 1_000,
|
|
1742
|
+
pollIntervalMs: 2_000,
|
|
1743
|
+
});
|
|
1744
|
+
console.log(JSON.stringify(result, null, 2));
|
|
1745
|
+
if (result.status === 'failed' || result.status === 'unknown') {
|
|
1746
|
+
throw new Error(`Email delivery ${result.id} finished with status ${result.status}.`);
|
|
1747
|
+
}
|
|
1748
|
+
});
|
|
1712
1749
|
addEmailScopeOptions(emailCommand
|
|
1713
1750
|
.command('pull')
|
|
1714
1751
|
.description('Pull project email drafts into local files'))
|
|
@@ -1752,6 +1789,63 @@ addEmailScopeOptions(emailTemplateCommand
|
|
|
1752
1789
|
console.log(`Published email template ${slug}.`);
|
|
1753
1790
|
});
|
|
1754
1791
|
const emailSequenceCommand = emailCommand.command('sequence').description('Manage email sequences');
|
|
1792
|
+
const parseEmailSequenceDelay = (options) => {
|
|
1793
|
+
const hasHours = options.delayHours !== undefined;
|
|
1794
|
+
const hasDays = options.delayDays !== undefined;
|
|
1795
|
+
if (hasHours === hasDays)
|
|
1796
|
+
throw new Error('Provide exactly one of --delay-hours or --delay-days.');
|
|
1797
|
+
const value = Number(hasHours ? options.delayHours : options.delayDays);
|
|
1798
|
+
if (!Number.isInteger(value) || value < 0)
|
|
1799
|
+
throw new Error('Delay must be a non-negative integer.');
|
|
1800
|
+
return value * (hasDays ? 86_400 : 3_600);
|
|
1801
|
+
};
|
|
1802
|
+
addEmailScopeOptions(emailSequenceCommand
|
|
1803
|
+
.command('create <slug>')
|
|
1804
|
+
.description('Create a local email sequence with its first published-template step')
|
|
1805
|
+
.requiredOption('--name <name>', 'Sequence display name')
|
|
1806
|
+
.requiredOption('--template <slug>', 'Published email template slug')
|
|
1807
|
+
.requiredOption('--key <key>', 'Unique first-step key')
|
|
1808
|
+
.option('--trigger <event>', 'Trigger event: email_captured, purchase_completed, or registration_completed', 'email_captured')
|
|
1809
|
+
.option('--funnel-id <uuid>', 'Limit the sequence to one project funnel')
|
|
1810
|
+
.option('--all-funnels', 'Apply the sequence to every funnel in the project')
|
|
1811
|
+
.option('--delay-hours <hours>', 'First-step delay in hours')
|
|
1812
|
+
.option('--delay-days <days>', 'First-step delay in days'))
|
|
1813
|
+
.action(async (slug, options) => {
|
|
1814
|
+
if (Boolean(options.funnelId) === Boolean(options.allFunnels)) {
|
|
1815
|
+
throw new Error('Provide exactly one of --funnel-id or --all-funnels.');
|
|
1816
|
+
}
|
|
1817
|
+
if (!['email_captured', 'purchase_completed', 'registration_completed'].includes(options.trigger)) {
|
|
1818
|
+
throw new Error('--trigger must be email_captured, purchase_completed, or registration_completed.');
|
|
1819
|
+
}
|
|
1820
|
+
await executeEmailSequenceCreate({
|
|
1821
|
+
...await resolveEmailCommandScope(options),
|
|
1822
|
+
slug,
|
|
1823
|
+
name: options.name,
|
|
1824
|
+
triggerEventType: options.trigger,
|
|
1825
|
+
funnelId: options.funnelId || null,
|
|
1826
|
+
firstStepKey: options.key,
|
|
1827
|
+
templateSlug: options.template,
|
|
1828
|
+
delaySeconds: parseEmailSequenceDelay(options),
|
|
1829
|
+
});
|
|
1830
|
+
console.log(`Created local email sequence ${slug}.`);
|
|
1831
|
+
});
|
|
1832
|
+
addEmailScopeOptions(emailSequenceCommand
|
|
1833
|
+
.command('add-step <slug>')
|
|
1834
|
+
.description('Add a published-template step to a local email sequence')
|
|
1835
|
+
.requiredOption('--key <key>', 'Unique step key')
|
|
1836
|
+
.requiredOption('--template <slug>', 'Published email template slug')
|
|
1837
|
+
.option('--delay-hours <hours>', 'Delay after the previous step in hours')
|
|
1838
|
+
.option('--delay-days <days>', 'Delay after the previous step in days'))
|
|
1839
|
+
.action(async (slug, options) => {
|
|
1840
|
+
await executeEmailSequenceAddStep({
|
|
1841
|
+
...await resolveEmailCommandScope(options),
|
|
1842
|
+
slug,
|
|
1843
|
+
key: options.key,
|
|
1844
|
+
templateSlug: options.template,
|
|
1845
|
+
delaySeconds: parseEmailSequenceDelay(options),
|
|
1846
|
+
});
|
|
1847
|
+
console.log(`Added email sequence step ${options.key} to ${slug}.`);
|
|
1848
|
+
});
|
|
1755
1849
|
addEmailScopeOptions(emailSequenceCommand
|
|
1756
1850
|
.command('publish <slug>')
|
|
1757
1851
|
.description('Publish one email sequence explicitly'))
|
|
@@ -1762,6 +1856,20 @@ addEmailScopeOptions(emailSequenceCommand
|
|
|
1762
1856
|
});
|
|
1763
1857
|
console.log(`Published email sequence ${slug}.`);
|
|
1764
1858
|
});
|
|
1859
|
+
for (const active of [true, false]) {
|
|
1860
|
+
const action = active ? 'enable' : 'disable';
|
|
1861
|
+
addEmailScopeOptions(emailSequenceCommand
|
|
1862
|
+
.command(`${action} <slug>`)
|
|
1863
|
+
.description(`${active ? 'Enable' : 'Disable'} one published email sequence`))
|
|
1864
|
+
.action(async (slug, options) => {
|
|
1865
|
+
await executeEmailSequenceSetActive({
|
|
1866
|
+
...await resolveEmailCommandScope(options),
|
|
1867
|
+
slug,
|
|
1868
|
+
active,
|
|
1869
|
+
});
|
|
1870
|
+
console.log(`${active ? 'Enabled' : 'Disabled'} email sequence ${slug}.`);
|
|
1871
|
+
});
|
|
1872
|
+
}
|
|
1765
1873
|
const projectsCommand = addExamples(program.command('projects').description('Manage projects'), [
|
|
1766
1874
|
'fgrove projects list',
|
|
1767
1875
|
'fgrove projects list --workspace acme',
|
|
@@ -1813,11 +1921,11 @@ addExamples(funnelsCommand
|
|
|
1813
1921
|
path: 'funnels.clone',
|
|
1814
1922
|
type: 'mutation',
|
|
1815
1923
|
token,
|
|
1816
|
-
data: {
|
|
1924
|
+
data: buildCloneFunnelMutationInput({
|
|
1817
1925
|
workspaceId,
|
|
1818
1926
|
funnelId,
|
|
1819
1927
|
name: options.name,
|
|
1820
|
-
},
|
|
1928
|
+
}),
|
|
1821
1929
|
});
|
|
1822
1930
|
console.log(`${result.funnel.id}\t${result.funnel.name}\t${result.funnel.slug}`);
|
|
1823
1931
|
});
|
package/dist/emailCommands.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type EmailFilesResult } from './emailFiles.js';
|
|
1
|
+
import { type EmailFilesResult, type EmailEventType } from './emailFiles.js';
|
|
2
2
|
export type EmailCallApi = <T>(input: {
|
|
3
3
|
path: string;
|
|
4
4
|
type: 'query' | 'mutation';
|
|
@@ -12,6 +12,32 @@ type EmailCommandScope = {
|
|
|
12
12
|
projectId: string;
|
|
13
13
|
sourceDir: string;
|
|
14
14
|
};
|
|
15
|
+
export type EmailSendStatus = {
|
|
16
|
+
id: string;
|
|
17
|
+
status: 'queued' | 'sent' | 'failed' | 'unknown';
|
|
18
|
+
terminalReason?: string | null;
|
|
19
|
+
createdAt?: string;
|
|
20
|
+
updatedAt?: string;
|
|
21
|
+
sentAt?: string | null;
|
|
22
|
+
failedAt?: string | null;
|
|
23
|
+
};
|
|
24
|
+
type EmailSendFetch = typeof globalThis.fetch;
|
|
25
|
+
export declare const parseEmailVariablesJson: (value: string) => Record<string, string | number | boolean>;
|
|
26
|
+
export declare function executeEmailSend(input: {
|
|
27
|
+
apiUrl: string;
|
|
28
|
+
privateToken: string;
|
|
29
|
+
template: string;
|
|
30
|
+
to: string;
|
|
31
|
+
variables: Record<string, string | number | boolean>;
|
|
32
|
+
idempotencyKey?: string;
|
|
33
|
+
wait: boolean;
|
|
34
|
+
timeoutMs: number;
|
|
35
|
+
pollIntervalMs: number;
|
|
36
|
+
}, dependencies?: {
|
|
37
|
+
fetchImpl?: EmailSendFetch;
|
|
38
|
+
sleep?: (durationMs: number) => Promise<void>;
|
|
39
|
+
now?: () => number;
|
|
40
|
+
}): Promise<EmailSendStatus>;
|
|
15
41
|
export declare function executeEmailPull(scope: EmailCommandScope): Promise<{
|
|
16
42
|
templates: number;
|
|
17
43
|
sequences: number;
|
|
@@ -23,6 +49,25 @@ export declare function executeEmailPush(scope: EmailCommandScope): Promise<{
|
|
|
23
49
|
templates: number;
|
|
24
50
|
sequences: number;
|
|
25
51
|
}>;
|
|
52
|
+
export declare function executeEmailSequenceAddStep(input: EmailCommandScope & {
|
|
53
|
+
slug: string;
|
|
54
|
+
key: string;
|
|
55
|
+
templateSlug: string;
|
|
56
|
+
delaySeconds: number;
|
|
57
|
+
}): Promise<void>;
|
|
58
|
+
export declare function executeEmailSequenceCreate(input: EmailCommandScope & {
|
|
59
|
+
slug: string;
|
|
60
|
+
name: string;
|
|
61
|
+
triggerEventType: EmailEventType;
|
|
62
|
+
funnelId: string | null;
|
|
63
|
+
firstStepKey: string;
|
|
64
|
+
templateSlug: string;
|
|
65
|
+
delaySeconds: number;
|
|
66
|
+
}): Promise<void>;
|
|
67
|
+
export declare function executeEmailSequenceSetActive(input: EmailCommandScope & {
|
|
68
|
+
slug: string;
|
|
69
|
+
active: boolean;
|
|
70
|
+
}): Promise<void>;
|
|
26
71
|
export declare function executeEmailTemplatePublish(scope: EmailCommandScope & {
|
|
27
72
|
slug: string;
|
|
28
73
|
}): Promise<unknown>;
|
package/dist/emailCommands.js
CHANGED
|
@@ -1,6 +1,89 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
1
2
|
import { readEmailFiles, replaceEmailFiles, writeEmailFiles, writeEmailSequenceFile, writeEmailTemplateFile, } from './emailFiles.js';
|
|
2
3
|
const isRecord = (value) => (typeof value === 'object' && value !== null && !Array.isArray(value));
|
|
3
4
|
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
5
|
+
const STEP_KEY = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
6
|
+
const TERMINAL_EMAIL_STATUSES = new Set(['sent', 'failed', 'unknown']);
|
|
7
|
+
export const parseEmailVariablesJson = (value) => {
|
|
8
|
+
let parsed;
|
|
9
|
+
try {
|
|
10
|
+
parsed = JSON.parse(value);
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
throw new Error('--variables must be a JSON object.');
|
|
14
|
+
}
|
|
15
|
+
if (!isRecord(parsed))
|
|
16
|
+
throw new Error('--variables must be a JSON object.');
|
|
17
|
+
if (Object.values(parsed).some((item) => (typeof item !== 'string'
|
|
18
|
+
&& typeof item !== 'number'
|
|
19
|
+
&& typeof item !== 'boolean'))) {
|
|
20
|
+
throw new Error('--variables must contain only string, number, or boolean values.');
|
|
21
|
+
}
|
|
22
|
+
return parsed;
|
|
23
|
+
};
|
|
24
|
+
const emailApiRequest = async (input) => {
|
|
25
|
+
const response = await input.fetchImpl(`${input.apiUrl.replace(/\/+$/, '')}${input.path}`, {
|
|
26
|
+
method: input.method || 'GET',
|
|
27
|
+
headers: {
|
|
28
|
+
authorization: `Bearer ${input.privateToken}`,
|
|
29
|
+
accept: 'application/json',
|
|
30
|
+
...(input.body ? { 'content-type': 'application/json' } : {}),
|
|
31
|
+
...(input.idempotencyKey ? { 'idempotency-key': input.idempotencyKey } : {}),
|
|
32
|
+
},
|
|
33
|
+
...(input.body ? { body: JSON.stringify(input.body) } : {}),
|
|
34
|
+
});
|
|
35
|
+
const body = await response.json().catch(() => ({}));
|
|
36
|
+
if (!response.ok) {
|
|
37
|
+
const message = isRecord(body) && typeof body.error === 'string'
|
|
38
|
+
? body.error
|
|
39
|
+
: 'Email API request failed';
|
|
40
|
+
throw new Error(`${message} (HTTP ${response.status})`);
|
|
41
|
+
}
|
|
42
|
+
if (!isRecord(body))
|
|
43
|
+
throw new Error('Email API returned an invalid response.');
|
|
44
|
+
return body;
|
|
45
|
+
};
|
|
46
|
+
const parseEmailSendStatus = (value) => {
|
|
47
|
+
if (typeof value.id !== 'string'
|
|
48
|
+
|| !UUID.test(value.id)
|
|
49
|
+
|| !['queued', 'sent', 'failed', 'unknown'].includes(String(value.status))) {
|
|
50
|
+
throw new Error('Email API returned an invalid delivery status.');
|
|
51
|
+
}
|
|
52
|
+
return value;
|
|
53
|
+
};
|
|
54
|
+
export async function executeEmailSend(input, dependencies = {}) {
|
|
55
|
+
if (!input.privateToken.trim())
|
|
56
|
+
throw new Error('A private project token is required.');
|
|
57
|
+
const fetchImpl = dependencies.fetchImpl || fetch;
|
|
58
|
+
const sleep = dependencies.sleep || ((durationMs) => new Promise((resolve) => {
|
|
59
|
+
setTimeout(resolve, durationMs);
|
|
60
|
+
}));
|
|
61
|
+
const now = dependencies.now || Date.now;
|
|
62
|
+
const receipt = parseEmailSendStatus(await emailApiRequest({
|
|
63
|
+
apiUrl: input.apiUrl,
|
|
64
|
+
privateToken: input.privateToken,
|
|
65
|
+
path: '/sdk/private/emails/send',
|
|
66
|
+
method: 'POST',
|
|
67
|
+
idempotencyKey: input.idempotencyKey || `email-cli:${randomUUID()}`,
|
|
68
|
+
body: { template: input.template, to: input.to, variables: input.variables },
|
|
69
|
+
fetchImpl,
|
|
70
|
+
}));
|
|
71
|
+
if (!input.wait || TERMINAL_EMAIL_STATUSES.has(receipt.status))
|
|
72
|
+
return receipt;
|
|
73
|
+
const deadline = now() + input.timeoutMs;
|
|
74
|
+
while (now() < deadline) {
|
|
75
|
+
await sleep(Math.min(input.pollIntervalMs, Math.max(0, deadline - now())));
|
|
76
|
+
const status = parseEmailSendStatus(await emailApiRequest({
|
|
77
|
+
apiUrl: input.apiUrl,
|
|
78
|
+
privateToken: input.privateToken,
|
|
79
|
+
path: `/sdk/private/emails/${encodeURIComponent(receipt.id)}`,
|
|
80
|
+
fetchImpl,
|
|
81
|
+
}));
|
|
82
|
+
if (TERMINAL_EMAIL_STATUSES.has(status.status))
|
|
83
|
+
return status;
|
|
84
|
+
}
|
|
85
|
+
throw new Error(`Timed out waiting for email delivery ${receipt.id}.`);
|
|
86
|
+
}
|
|
4
87
|
const hasDraft = (value) => (isRecord(value) && isRecord(value.draft));
|
|
5
88
|
const assertRemoteResource = (value, resource) => {
|
|
6
89
|
if (!isRecord(value)
|
|
@@ -211,6 +294,95 @@ export async function executeEmailPush(scope) {
|
|
|
211
294
|
});
|
|
212
295
|
return { templates: files.templates.length, sequences: files.sequences.length };
|
|
213
296
|
}
|
|
297
|
+
export async function executeEmailSequenceAddStep(input) {
|
|
298
|
+
const files = await readEmailFiles(input.sourceDir);
|
|
299
|
+
assertValidFiles(files);
|
|
300
|
+
const sequence = files.sequences.find((item) => item.slug === input.slug);
|
|
301
|
+
if (!sequence)
|
|
302
|
+
throw new Error(`Email sequence "${input.slug}" was not found locally.`);
|
|
303
|
+
if (sequence.draft.steps.some((step) => step.key === input.key)) {
|
|
304
|
+
throw new Error(`Email sequence step "${input.key}" already exists.`);
|
|
305
|
+
}
|
|
306
|
+
const templateVersionId = await resolvePublishedTemplateVersionId(input, input.templateSlug);
|
|
307
|
+
sequence.draft.steps.push({
|
|
308
|
+
key: input.key,
|
|
309
|
+
delaySeconds: input.delaySeconds,
|
|
310
|
+
templateVersionId,
|
|
311
|
+
});
|
|
312
|
+
await writeEmailSequenceFile(input.sourceDir, sequence);
|
|
313
|
+
}
|
|
314
|
+
const resolvePublishedTemplateVersionId = async (scope, templateSlug) => {
|
|
315
|
+
const templates = await scope.callApi({
|
|
316
|
+
path: 'emailTemplates.list',
|
|
317
|
+
type: 'query',
|
|
318
|
+
token: scope.token,
|
|
319
|
+
data: projectData(scope),
|
|
320
|
+
});
|
|
321
|
+
const template = templates.find((item) => item.slug === templateSlug);
|
|
322
|
+
if (!template?.currentPublishedVersionId) {
|
|
323
|
+
throw new Error(`Published email template "${templateSlug}" was not found.`);
|
|
324
|
+
}
|
|
325
|
+
return template.currentPublishedVersionId;
|
|
326
|
+
};
|
|
327
|
+
export async function executeEmailSequenceCreate(input) {
|
|
328
|
+
const files = await readEmailFiles(input.sourceDir);
|
|
329
|
+
assertValidFiles(files);
|
|
330
|
+
if (files.sequences.some((item) => item.slug === input.slug)) {
|
|
331
|
+
throw new Error(`Email sequence "${input.slug}" already exists locally.`);
|
|
332
|
+
}
|
|
333
|
+
const name = input.name.trim();
|
|
334
|
+
if (!name || name.length > 120)
|
|
335
|
+
throw new Error('Sequence name must be 1 to 120 characters.');
|
|
336
|
+
if (!STEP_KEY.test(input.firstStepKey) || input.firstStepKey.length > 64) {
|
|
337
|
+
throw new Error('Sequence step key must be lowercase kebab-case up to 64 characters.');
|
|
338
|
+
}
|
|
339
|
+
if (!Number.isInteger(input.delaySeconds) || input.delaySeconds < 0 || input.delaySeconds > 7_776_000) {
|
|
340
|
+
throw new Error('Sequence delay must be an integer from 0 to 7776000 seconds.');
|
|
341
|
+
}
|
|
342
|
+
if (input.funnelId !== null && !UUID.test(input.funnelId)) {
|
|
343
|
+
throw new Error('--funnel-id must be a UUID.');
|
|
344
|
+
}
|
|
345
|
+
const templateVersionId = await resolvePublishedTemplateVersionId(input, input.templateSlug);
|
|
346
|
+
await writeEmailSequenceFile(input.sourceDir, {
|
|
347
|
+
id: null,
|
|
348
|
+
slug: input.slug,
|
|
349
|
+
name,
|
|
350
|
+
draft: {
|
|
351
|
+
triggerEventType: input.triggerEventType,
|
|
352
|
+
funnelIds: input.funnelId === null ? [] : [input.funnelId],
|
|
353
|
+
steps: [{
|
|
354
|
+
key: input.firstStepKey,
|
|
355
|
+
delaySeconds: input.delaySeconds,
|
|
356
|
+
templateVersionId,
|
|
357
|
+
}],
|
|
358
|
+
exitEventTypes: input.triggerEventType === 'purchase_completed'
|
|
359
|
+
? []
|
|
360
|
+
: ['purchase_completed'],
|
|
361
|
+
},
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
export async function executeEmailSequenceSetActive(input) {
|
|
365
|
+
const files = await readEmailFiles(input.sourceDir);
|
|
366
|
+
assertValidFiles(files);
|
|
367
|
+
const sequence = files.sequences.find((item) => item.slug === input.slug);
|
|
368
|
+
if (!sequence)
|
|
369
|
+
throw new Error(`Email sequence "${input.slug}" was not found locally.`);
|
|
370
|
+
if (!sequence.id)
|
|
371
|
+
throw new Error(`Push email sequence "${input.slug}" before changing activation.`);
|
|
372
|
+
await assertRemoteIdentities(input, {
|
|
373
|
+
resource: 'emailSequences',
|
|
374
|
+
local: [{ id: sequence.id, slug: sequence.slug }],
|
|
375
|
+
});
|
|
376
|
+
await input.callApi({
|
|
377
|
+
path: `emailSequences.${input.active ? 'enable' : 'disable'}`,
|
|
378
|
+
type: 'mutation',
|
|
379
|
+
token: input.token,
|
|
380
|
+
data: {
|
|
381
|
+
...projectData(input),
|
|
382
|
+
sequenceId: sequence.id,
|
|
383
|
+
},
|
|
384
|
+
});
|
|
385
|
+
}
|
|
214
386
|
export async function executeEmailTemplatePublish(scope) {
|
|
215
387
|
return executeEmailPublish(scope, {
|
|
216
388
|
kind: 'template',
|
package/dist/emailFiles.js
CHANGED
|
@@ -226,8 +226,8 @@ const validateSequence = (value, pathSlug, file, diagnostics) => {
|
|
|
226
226
|
if (!EMAIL_EVENTS.has(value.triggerEventType)) {
|
|
227
227
|
diagnostics.push(schemaDiagnostic(file, 'triggerEventType', [...EMAIL_EVENTS], value.triggerEventType));
|
|
228
228
|
}
|
|
229
|
-
if (!Array.isArray(value.funnelIds) || value.funnelIds.length
|
|
230
|
-
diagnostics.push(schemaDiagnostic(file, 'funnelIds', '
|
|
229
|
+
if (!Array.isArray(value.funnelIds) || value.funnelIds.length > 50) {
|
|
230
|
+
diagnostics.push(schemaDiagnostic(file, 'funnelIds', '0 to 50 UUIDs; empty means all funnels', value.funnelIds));
|
|
231
231
|
}
|
|
232
232
|
else {
|
|
233
233
|
value.funnelIds.forEach((id, index) => {
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"minimumCliVersion": "0.1.20",
|
|
5
5
|
"entries": [
|
|
6
6
|
{
|
|
7
|
-
"repositoryCliVersion": "0.1.
|
|
7
|
+
"repositoryCliVersion": "0.1.87",
|
|
8
8
|
"manifest": {
|
|
9
9
|
"schemaVersion": 1,
|
|
10
|
-
"bundleVersion": "2.0.
|
|
10
|
+
"bundleVersion": "2.0.76",
|
|
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": "62d2ac1276e187a648d4469596e82e8babf46f914d3e5bb23d2409312a61d661"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -145,16 +145,16 @@
|
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
"path": "funnel-docs.config.json",
|
|
148
|
-
"sha256": "
|
|
148
|
+
"sha256": "a46bf14afcce1c00ae4edbaf88780e06626302484ba6b1ed87d845604d2bea84"
|
|
149
149
|
}
|
|
150
150
|
]
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
|
-
"repositoryCliVersion": "0.1.
|
|
154
|
+
"repositoryCliVersion": "0.1.86",
|
|
155
155
|
"manifest": {
|
|
156
156
|
"schemaVersion": 1,
|
|
157
|
-
"bundleVersion": "2.0.
|
|
157
|
+
"bundleVersion": "2.0.75",
|
|
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": "a50e601c2ed9351b5322fc71cdb5a8e58dc2826d0a17cf0a5763c6c80ccfb28b"
|
|
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": "
|
|
295
|
+
"sha256": "2979bb06b0823bf925e99fc2ec5f4bb52ec5dfca103c57d391e4e82521d64feb"
|
|
296
296
|
}
|
|
297
297
|
]
|
|
298
298
|
}
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
|
-
"repositoryCliVersion": "0.1.
|
|
301
|
+
"repositoryCliVersion": "0.1.85",
|
|
302
302
|
"manifest": {
|
|
303
303
|
"schemaVersion": 1,
|
|
304
|
-
"bundleVersion": "2.0.
|
|
304
|
+
"bundleVersion": "2.0.74",
|
|
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": "5bc3de862b0824a2bbeb324d5aa0a097f2b93c9d8a250b292e1002e1f10f127a"
|
|
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": "
|
|
442
|
+
"sha256": "7d9ebfea22bb7e47c3233f1229c8924da048c27253755ec4ce2cdc280f576400"
|
|
443
443
|
}
|
|
444
444
|
]
|
|
445
445
|
}
|
|
446
446
|
},
|
|
447
447
|
{
|
|
448
|
-
"repositoryCliVersion": "0.1.
|
|
448
|
+
"repositoryCliVersion": "0.1.84",
|
|
449
449
|
"manifest": {
|
|
450
450
|
"schemaVersion": 1,
|
|
451
|
-
"bundleVersion": "2.0.
|
|
451
|
+
"bundleVersion": "2.0.73",
|
|
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": "0dfaf22828481cb206164304c15d06f5900ca47cf37d38a4e650facd0ad84ec8"
|
|
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": "79d08c93ffa111b31c8b5ed95b022ea5ce800d1e31b1ee1b7c957bffc18dc336"
|
|
590
590
|
}
|
|
591
591
|
]
|
|
592
592
|
}
|
|
593
593
|
},
|
|
594
594
|
{
|
|
595
|
-
"repositoryCliVersion": "0.1.
|
|
595
|
+
"repositoryCliVersion": "0.1.83",
|
|
596
596
|
"manifest": {
|
|
597
597
|
"schemaVersion": 1,
|
|
598
|
-
"bundleVersion": "2.0.
|
|
598
|
+
"bundleVersion": "2.0.72",
|
|
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": "ff879b9479fa097459e9527a99b1d267e0a35b6cc056dace34a3b1ed640bdc5e"
|
|
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": "1011fadb554a1bbc28110119ee43417c5e75d8b6c71482e21ca6014a9a66716a"
|
|
737
737
|
}
|
|
738
738
|
]
|
|
739
739
|
}
|
|
740
740
|
},
|
|
741
741
|
{
|
|
742
|
-
"repositoryCliVersion": "0.1.
|
|
742
|
+
"repositoryCliVersion": "0.1.81",
|
|
743
743
|
"manifest": {
|
|
744
744
|
"schemaVersion": 1,
|
|
745
|
-
"bundleVersion": "2.0.
|
|
745
|
+
"bundleVersion": "2.0.70",
|
|
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": "9da61fe189a9b34001c3c73a0abb217d3db109f512fc0a80187123c2c07b356c"
|
|
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": "3bff17f060f71f221c36703b668b601d1f80fac5ff43c55b99cdb5a1d6136962"
|
|
884
884
|
}
|
|
885
885
|
]
|
|
886
886
|
}
|
|
887
887
|
},
|
|
888
888
|
{
|
|
889
|
-
"repositoryCliVersion": "0.1.
|
|
889
|
+
"repositoryCliVersion": "0.1.80",
|
|
890
890
|
"manifest": {
|
|
891
891
|
"schemaVersion": 1,
|
|
892
|
-
"bundleVersion": "2.0.
|
|
892
|
+
"bundleVersion": "2.0.69",
|
|
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": "00b0089ec0997a0ef095e1216a4b2322d4e4e00816e0fa7eea6bfc1238e9e459"
|
|
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": "f66d2e8d39c457cbc30a9fe120b72df3a15f31259f1ac03afb829d87c7679e40"
|
|
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.87",
|
|
4
4
|
"description": "FunnelsGrove command-line tools for editing, syncing, and publishing funnels",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"test": "vitest run"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@funnelsgrove/runtime": "0.7.
|
|
37
|
+
"@funnelsgrove/runtime": "0.7.9",
|
|
38
38
|
"commander": "^12.0.0",
|
|
39
39
|
"typescript": "^5.8.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@funnelsgrove/analytics": "0.1.
|
|
42
|
+
"@funnelsgrove/analytics": "0.1.58",
|
|
43
43
|
"@funnelsgrove/payments": "0.7.3",
|
|
44
44
|
"vitest": "^3.0.0"
|
|
45
45
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"bundleVersion": "2.0.
|
|
3
|
+
"bundleVersion": "2.0.76",
|
|
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": "62d2ac1276e187a648d4469596e82e8babf46f914d3e5bb23d2409312a61d661"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "funnel-docs.config.json",
|
|
141
|
-
"sha256": "
|
|
141
|
+
"sha256": "a46bf14afcce1c00ae4edbaf88780e06626302484ba6b1ed87d845604d2bea84"
|
|
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/runtime` `0.7.
|
|
20
|
+
Release `@funnelsgrove/runtime` `0.7.9` first, then `@funnelsgrove/analytics` `0.1.58`, then `@funnelsgrove/payments` `0.7.3`. Deploy the API and funnel template, then confirm production `/health` reports the new docs identity. Only then publish `@funnelsgrove/cli` `0.1.87`. 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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"bundleVersion": "2.0.
|
|
3
|
+
"bundleVersion": "2.0.76",
|
|
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": "62d2ac1276e187a648d4469596e82e8babf46f914d3e5bb23d2409312a61d661"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "funnel-docs.config.json",
|
|
141
|
-
"sha256": "
|
|
141
|
+
"sha256": "a46bf14afcce1c00ae4edbaf88780e06626302484ba6b1ed87d845604d2bea84"
|
|
142
142
|
}
|
|
143
143
|
]
|
|
144
144
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"sourceTreeHash": "
|
|
3
|
+
"sourceTreeHash": "9cdc47f2ec560389bcf15171230841098c0f0e07524e4cc8d96d66e29e0acf9e",
|
|
4
4
|
"stepContractVersion": 3,
|
|
5
|
-
"docsBundleVersion": "2.0.
|
|
5
|
+
"docsBundleVersion": "2.0.76",
|
|
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": "1f50fbf4536630064402f1a5aa386dd8e02580abfdcfb4489b7cb9fdaf88bdcb",
|
|
20
20
|
"mode": "100644"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
104
|
-
"sha256": "
|
|
104
|
+
"sha256": "62d2ac1276e187a648d4469596e82e8babf46f914d3e5bb23d2409312a61d661",
|
|
105
105
|
"mode": "100644"
|
|
106
106
|
},
|
|
107
107
|
{
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
},
|
|
237
237
|
{
|
|
238
238
|
"path": "funnel-docs.config.json",
|
|
239
|
-
"sha256": "
|
|
239
|
+
"sha256": "a46bf14afcce1c00ae4edbaf88780e06626302484ba6b1ed87d845604d2bea84",
|
|
240
240
|
"mode": "100644"
|
|
241
241
|
},
|
|
242
242
|
{
|
|
@@ -261,12 +261,12 @@
|
|
|
261
261
|
},
|
|
262
262
|
{
|
|
263
263
|
"path": "package-lock.json",
|
|
264
|
-
"sha256": "
|
|
264
|
+
"sha256": "6310cad764c6569cfdbb91e7472bfc5817a725588190d61d167bbb3c297dbc86",
|
|
265
265
|
"mode": "100644"
|
|
266
266
|
},
|
|
267
267
|
{
|
|
268
268
|
"path": "package.json",
|
|
269
|
-
"sha256": "
|
|
269
|
+
"sha256": "f82ef00e2cb053b2bd4c3d3e07e905676f384aee6b1c5a0266acb1295c79fd5e",
|
|
270
270
|
"mode": "100644"
|
|
271
271
|
},
|
|
272
272
|
{
|
|
@@ -916,7 +916,7 @@
|
|
|
916
916
|
},
|
|
917
917
|
{
|
|
918
918
|
"path": "tests/funnel-agent-docs.test.ts",
|
|
919
|
-
"sha256": "
|
|
919
|
+
"sha256": "99afa24e5a7fbcbf6e4055b0274c04396d8468ae8112d263bde3728d68a736b2",
|
|
920
920
|
"mode": "100644"
|
|
921
921
|
},
|
|
922
922
|
{
|
|
@@ -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/runtime` `0.7.
|
|
20
|
+
Release `@funnelsgrove/runtime` `0.7.9` first, then `@funnelsgrove/analytics` `0.1.58`, then `@funnelsgrove/payments` `0.7.3`. Deploy the API and funnel template, then confirm production `/health` reports the new docs identity. Only then publish `@funnelsgrove/cli` `0.1.87`. 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
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"name": "funnel-template",
|
|
9
9
|
"version": "0.1.0",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@funnelsgrove/analytics": "^0.1.
|
|
11
|
+
"@funnelsgrove/analytics": "^0.1.58",
|
|
12
12
|
"@funnelsgrove/payments": "^0.7.3",
|
|
13
|
-
"@funnelsgrove/runtime": "^0.7.
|
|
13
|
+
"@funnelsgrove/runtime": "^0.7.9",
|
|
14
14
|
"@stripe/react-stripe-js": "^5.6.0",
|
|
15
15
|
"@stripe/stripe-js": "^8.7.0",
|
|
16
16
|
"lucide-react": "^0.553.0",
|
|
@@ -891,11 +891,11 @@
|
|
|
891
891
|
}
|
|
892
892
|
},
|
|
893
893
|
"node_modules/@funnelsgrove/analytics": {
|
|
894
|
-
"version": "0.1.
|
|
895
|
-
"resolved": "https://registry.npmjs.org/@funnelsgrove/analytics/-/analytics-0.1.
|
|
896
|
-
"integrity": "sha512-
|
|
894
|
+
"version": "0.1.58",
|
|
895
|
+
"resolved": "https://registry.npmjs.org/@funnelsgrove/analytics/-/analytics-0.1.58.tgz",
|
|
896
|
+
"integrity": "sha512-bTSq7SO7CuicexEXUKIc3WMW7RQV1VI9pQfCOn79E6ygHa/1shoY7GZyzB/9n5Pn2pAOdZzNIy+erPPHaQROQQ==",
|
|
897
897
|
"dependencies": {
|
|
898
|
-
"@funnelsgrove/runtime": "0.7.
|
|
898
|
+
"@funnelsgrove/runtime": "0.7.9"
|
|
899
899
|
}
|
|
900
900
|
},
|
|
901
901
|
"node_modules/@funnelsgrove/payments": {
|
|
@@ -913,9 +913,9 @@
|
|
|
913
913
|
}
|
|
914
914
|
},
|
|
915
915
|
"node_modules/@funnelsgrove/runtime": {
|
|
916
|
-
"version": "0.7.
|
|
917
|
-
"resolved": "https://registry.npmjs.org/@funnelsgrove/runtime/-/runtime-0.7.
|
|
918
|
-
"integrity": "sha512-
|
|
916
|
+
"version": "0.7.9",
|
|
917
|
+
"resolved": "https://registry.npmjs.org/@funnelsgrove/runtime/-/runtime-0.7.9.tgz",
|
|
918
|
+
"integrity": "sha512-j6T7n2YZ5CaQc1IPc+2HX/gBq7U/rtNKKrBEttMMNtrC/ip1PcLdoj7qBgsyh6dgjpg+eYi6lExr8I1g5gA/ew==",
|
|
919
919
|
"dependencies": {
|
|
920
920
|
"posthog-js": "^1.369.2",
|
|
921
921
|
"react": "19.2.3",
|
|
@@ -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.1.
|
|
15
|
+
"@funnelsgrove/analytics": "^0.1.58",
|
|
16
16
|
"@funnelsgrove/payments": "^0.7.3",
|
|
17
|
-
"@funnelsgrove/runtime": "^0.7.
|
|
17
|
+
"@funnelsgrove/runtime": "^0.7.9",
|
|
18
18
|
"@stripe/react-stripe-js": "^5.6.0",
|
|
19
19
|
"@stripe/stripe-js": "^8.7.0",
|
|
20
20
|
"lucide-react": "^0.553.0",
|
|
@@ -363,7 +363,7 @@ describe('funnel agent documentation supply', () => {
|
|
|
363
363
|
|
|
364
364
|
expect(manifest).toMatchObject({
|
|
365
365
|
schemaVersion: 1,
|
|
366
|
-
bundleVersion: '2.0.
|
|
366
|
+
bundleVersion: '2.0.76',
|
|
367
367
|
stepContractVersion: contract.stepContractVersion,
|
|
368
368
|
contractHash: contract.contractHash,
|
|
369
369
|
});
|