anhedral 0.13.0 → 0.15.0
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/README.md +35 -232
- package/assets/patches/audit-deps.mjs +12 -2
- package/assets/ui/LICENSE.shadcn +21 -0
- package/assets/ui/UPSTREAM.json +33 -0
- package/assets/ui/native/button.tsx +85 -0
- package/assets/ui/native/card.tsx +33 -0
- package/assets/ui/native/dialog.tsx +75 -0
- package/assets/ui/native/input.tsx +27 -0
- package/assets/ui/native/label.tsx +4 -0
- package/assets/ui/native/layout.tsx +26 -0
- package/assets/ui/native/text.tsx +20 -0
- package/assets/ui/native/theme-switcher.tsx +22 -0
- package/assets/ui/theme-storage.ts +25 -0
- package/assets/ui/theme.tsx +66 -0
- package/assets/ui/web/button.tsx +59 -0
- package/assets/ui/web/input.tsx +21 -0
- package/assets/ui/web/label.tsx +19 -0
- package/dist/capabilities.d.ts +5 -5
- package/dist/capabilities.js +3 -21
- package/dist/capability-contract.d.ts +3 -3
- package/dist/capability-contract.js +11 -50
- package/dist/cli-delivery.d.ts +1 -1
- package/dist/cli-delivery.js +5 -65
- package/dist/cli-output.js +3 -3
- package/dist/command-schema.js +35 -86
- package/dist/delivery-evidence.d.ts +1 -1
- package/dist/delivery-evidence.js +7 -36
- package/dist/delivery.d.ts +2 -8
- package/dist/delivery.js +20 -101
- package/dist/dependencies.d.ts +6 -57
- package/dist/dependencies.js +54 -188
- package/dist/index.d.ts +1 -4
- package/dist/index.js +1 -4
- package/dist/inspector-model.d.ts +2 -2
- package/dist/integration-service-readers.d.ts +1 -2
- package/dist/integration-service-readers.js +3 -84
- package/dist/lifecycle-model.d.ts +1 -1
- package/dist/lifecycle-model.js +1 -1
- package/dist/mobile-delivery.d.ts +1 -1
- package/dist/mobile-delivery.js +4 -0
- package/dist/platforms/mobile.js +30 -121
- package/dist/platforms/web.d.ts +3 -0
- package/dist/platforms/web.js +299 -0
- package/dist/project-config.d.ts +1 -1
- package/dist/project-config.js +0 -1
- package/dist/project-inspector.js +5 -36
- package/dist/project-state.d.ts +1 -3
- package/dist/project-state.js +2 -85
- package/dist/provider-auth.js +3 -38
- package/dist/provider-readiness.d.ts +1 -1
- package/dist/provider-readiness.js +5 -24
- package/dist/providers/adapters.js +0 -175
- package/dist/providers/api.d.ts +1 -1
- package/dist/providers/api.js +3 -3
- package/dist/providers/config.js +2 -48
- package/dist/providers/definitions.d.ts +1 -204
- package/dist/providers/definitions.js +0 -85
- package/dist/providers/provision.d.ts +1 -1
- package/dist/providers/receipts.js +1 -11
- package/dist/providers/recovery-verification.js +1 -61
- package/dist/providers/runtime.js +4 -35
- package/dist/providers/state.js +1 -7
- package/dist/provision.d.ts +5 -13
- package/dist/provision.js +4 -80
- package/dist/readiness.d.ts +1 -1
- package/dist/readiness.js +3 -8
- package/dist/registry/add.js +10 -70
- package/dist/registry/bootstrap.d.ts +3 -2
- package/dist/registry/bootstrap.js +4 -13
- package/dist/registry/commands.js +8 -10
- package/dist/registry/context.js +0 -1
- package/dist/registry/options.js +8 -38
- package/dist/registry/resolve.d.ts +3 -4
- package/dist/registry/resolve.js +26 -108
- package/dist/registry/types.d.ts +1 -7
- package/dist/registry/usage.js +2 -2
- package/dist/runtime-policy.d.ts +0 -2
- package/dist/runtime-policy.js +0 -16
- package/dist/scaffold/auth.d.ts +1 -2
- package/dist/scaffold/auth.js +55 -130
- package/dist/scaffold/backend.d.ts +0 -4
- package/dist/scaffold/backend.js +1 -186
- package/dist/scaffold/billing-schema.d.ts +1 -1
- package/dist/scaffold/billing-schema.js +4 -4
- package/dist/scaffold/billing.js +11 -19
- package/dist/scaffold/bootstrap.d.ts +2 -3
- package/dist/scaffold/bootstrap.js +37 -43
- package/dist/scaffold/compose.js +2 -14
- package/dist/scaffold/database.d.ts +1 -1
- package/dist/scaffold/database.js +18 -126
- package/dist/scaffold/documentation.d.ts +0 -1
- package/dist/scaffold/documentation.js +22 -86
- package/dist/scaffold/expo-auth.js +33 -22
- package/dist/scaffold/expo-billing.js +17 -52
- package/dist/scaffold/expo-runtime.d.ts +2 -2
- package/dist/scaffold/expo-runtime.js +6 -97
- package/dist/scaffold/integrations.d.ts +1 -3
- package/dist/scaffold/integrations.js +9 -10
- package/dist/scaffold/managed-email.d.ts +3 -0
- package/dist/scaffold/managed-email.js +47 -0
- package/dist/scaffold/native-ui.d.ts +2 -0
- package/dist/scaffold/native-ui.js +69 -0
- package/dist/scaffold/password-reset.d.ts +1 -0
- package/dist/scaffold/password-reset.js +99 -0
- package/dist/scaffold/private-files.d.ts +2 -0
- package/dist/scaffold/private-files.js +78 -0
- package/dist/scaffold/stack-documentation.d.ts +0 -1
- package/dist/scaffold/stack-documentation.js +3 -49
- package/dist/scaffold/styling.d.ts +1 -1
- package/dist/scaffold/styling.js +20 -28
- package/dist/scaffold/web-billing.d.ts +2 -0
- package/dist/scaffold/web-billing.js +48 -0
- package/dist/scaffold/workspace.js +53 -194
- package/dist/service-deletion.js +1 -1
- package/dist/service-descriptor.js +5 -12
- package/dist/service-model.d.ts +1 -1
- package/dist/service-operations.js +2 -32
- package/dist/service-readers.js +1 -32
- package/dist/services-command.d.ts +1 -1
- package/dist/services-command.js +3 -9
- package/dist/ship.d.ts +3 -316
- package/dist/ship.js +10 -142
- package/dist/stack-registry.d.ts +2 -52
- package/dist/stack-registry.js +55 -403
- package/dist/standard.js +7 -14
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/anhedral-stack.md +23 -122
- package/docs/assets/anhedral-stack-light.png +0 -0
- package/docs/assets/anhedral-stack.png +0 -0
- package/docs/software-factory.md +24 -557
- package/docs/stack-standard.md +47 -294
- package/docs/verification.md +320 -0
- package/package.json +20 -22
- package/dist/neon-service-data.d.ts +0 -8
- package/dist/neon-service-data.js +0 -117
- package/dist/platforms/desktop.d.ts +0 -2
- package/dist/platforms/desktop.js +0 -415
- package/dist/platforms/extension.d.ts +0 -2
- package/dist/platforms/extension.js +0 -328
- package/dist/registry/presets.d.ts +0 -4
- package/dist/registry/presets.js +0 -41
- package/dist/scaffold/cloudflare-services.d.ts +0 -8
- package/dist/scaffold/cloudflare-services.js +0 -198
- package/dist/scaffold/lint.d.ts +0 -4
- package/dist/scaffold/lint.js +0 -56
- package/dist/scaffold/neon-realtime.d.ts +0 -2
- package/dist/scaffold/neon-realtime.js +0 -97
- package/dist/scaffold/services.d.ts +0 -5
- package/dist/scaffold/services.js +0 -108
- package/dist/scaffold/stream.d.ts +0 -2
- package/dist/scaffold/stream.js +0 -114
- package/dist/scaffold/void.d.ts +0 -4
- package/dist/scaffold/void.js +0 -264
- package/dist/scaffold/web.d.ts +0 -2
- package/dist/scaffold/web.js +0 -130
- package/dist/vercel-project.d.ts +0 -101
- package/dist/vercel-project.js +0 -305
- package/dist/vercel.d.ts +0 -67
- package/dist/vercel.js +0 -581
- package/dist/vinext.d.ts +0 -2
- package/dist/vinext.js +0 -86
- package/dist/void-execution.d.ts +0 -10
- package/dist/void-execution.js +0 -94
- package/dist/void-migrations.d.ts +0 -6
- package/dist/void-migrations.js +0 -110
- package/dist/void-state.d.ts +0 -16
- package/dist/void-state.js +0 -65
- package/dist/void.d.ts +0 -3
- package/dist/void.js +0 -5
package/dist/ship.d.ts
CHANGED
|
@@ -2,18 +2,12 @@ import { type DeliveryRunner } from './project-state.js';
|
|
|
2
2
|
import { planProvisioning, provisionApplication } from './provision.js';
|
|
3
3
|
import type { CloudflareRequest } from './cloudflare.js';
|
|
4
4
|
import { planProviderProvisioning, provisionSelectedProviders } from './providers/provision.js';
|
|
5
|
-
export declare function shipCloudflareApplication(root: string, dryRun?: boolean, run?: DeliveryRunner, request?: CloudflareRequest, send?: typeof fetch, providerEnvironment?: NodeJS.ProcessEnv
|
|
6
|
-
voidLogsDirectory?: string;
|
|
7
|
-
}): Promise<{
|
|
8
|
-
management: string;
|
|
9
|
-
state?: "configuration-required" | undefined;
|
|
10
|
-
deployed?: false | undefined;
|
|
11
|
-
activated?: true | undefined;
|
|
12
|
-
nextAction?: string | undefined;
|
|
5
|
+
export declare function shipCloudflareApplication(root: string, dryRun?: boolean, run?: DeliveryRunner, request?: CloudflareRequest, send?: typeof fetch, providerEnvironment?: NodeJS.ProcessEnv): Promise<{
|
|
13
6
|
projectId: string;
|
|
14
7
|
release: import("./delivery-evidence.js").Release;
|
|
15
8
|
managementFile: string;
|
|
16
9
|
productVerification: string;
|
|
10
|
+
management: string;
|
|
17
11
|
} | ({
|
|
18
12
|
project: import("./project-state.js").ApplicationProject;
|
|
19
13
|
checks: string[][];
|
|
@@ -38,311 +32,4 @@ export declare function shipCloudflareApplication(root: string, dryRun?: boolean
|
|
|
38
32
|
deployed: false;
|
|
39
33
|
integrations: Awaited<ReturnType<typeof provisionSelectedProviders>>;
|
|
40
34
|
}>;
|
|
41
|
-
export declare
|
|
42
|
-
projectId: string;
|
|
43
|
-
release: import("./vercel-project.js").WebRelease;
|
|
44
|
-
productVerification: string;
|
|
45
|
-
} | {
|
|
46
|
-
integrations: {
|
|
47
|
-
schemaVersion: number;
|
|
48
|
-
providers: {
|
|
49
|
-
provider: keyof import("./index.js").ProviderSettingsById;
|
|
50
|
-
settings: import("./providers/definitions.js").NeonSettings | import("./providers/definitions.js").ClerkSettings | import("./providers/definitions.js").ResendSettings | import("./providers/definitions.js").StripeSettings | import("./providers/definitions.js").RevenueCatSettings | import("./providers/definitions.js").SentrySettings | import("./providers/definitions.js").PostHogSettings | import("./providers/definitions.js").OpenAISettings;
|
|
51
|
-
credential: string;
|
|
52
|
-
missing: string[];
|
|
53
|
-
}[];
|
|
54
|
-
configured: boolean;
|
|
55
|
-
mutation: boolean;
|
|
56
|
-
};
|
|
57
|
-
mutation: boolean;
|
|
58
|
-
project: import("./vercel-project.js").WebProject;
|
|
59
|
-
checks: string[];
|
|
60
|
-
deployment: string[];
|
|
61
|
-
cloudflareServices: string;
|
|
62
|
-
state?: undefined;
|
|
63
|
-
deployed?: undefined;
|
|
64
|
-
} | {
|
|
65
|
-
state: string;
|
|
66
|
-
deployed: boolean;
|
|
67
|
-
integrations: {
|
|
68
|
-
schemaVersion: number;
|
|
69
|
-
results: {
|
|
70
|
-
provider: string;
|
|
71
|
-
resources: Record<string, string>;
|
|
72
|
-
ready: boolean;
|
|
73
|
-
nextActions: string[];
|
|
74
|
-
}[];
|
|
75
|
-
ready: boolean;
|
|
76
|
-
configuredFiles: string[];
|
|
77
|
-
mutation: boolean;
|
|
78
|
-
};
|
|
79
|
-
}>;
|
|
80
|
-
/** Each mixed target keeps its own release receipt; this is not a provider transaction. */
|
|
81
|
-
export declare function shipSelectedStack(root: string, dryRun?: boolean, run?: DeliveryRunner, request?: CloudflareRequest, send?: typeof fetch, providerEnvironment?: NodeJS.ProcessEnv): Promise<{
|
|
82
|
-
management: string;
|
|
83
|
-
state?: "configuration-required" | undefined;
|
|
84
|
-
deployed?: false | undefined;
|
|
85
|
-
activated?: true | undefined;
|
|
86
|
-
nextAction?: string | undefined;
|
|
87
|
-
projectId: string;
|
|
88
|
-
release: import("./delivery-evidence.js").Release;
|
|
89
|
-
managementFile: string;
|
|
90
|
-
productVerification: string;
|
|
91
|
-
} | {
|
|
92
|
-
projectId: string;
|
|
93
|
-
release: import("./vercel-project.js").WebRelease;
|
|
94
|
-
productVerification: string;
|
|
95
|
-
} | ({
|
|
96
|
-
project: import("./project-state.js").ApplicationProject;
|
|
97
|
-
checks: string[][];
|
|
98
|
-
deployments: {
|
|
99
|
-
target: string;
|
|
100
|
-
directory: string;
|
|
101
|
-
command: string[];
|
|
102
|
-
}[];
|
|
103
|
-
resourcesProvisioned: boolean;
|
|
104
|
-
audience: "unconfigured" | "public" | "private";
|
|
105
|
-
} & {
|
|
106
|
-
provisioning: ReturnType<typeof planProvisioning>;
|
|
107
|
-
mutation: false;
|
|
108
|
-
integrations: ReturnType<typeof planProviderProvisioning>;
|
|
109
|
-
}) | {
|
|
110
|
-
state: "configuration-required";
|
|
111
|
-
resources: Awaited<ReturnType<typeof provisionApplication>>;
|
|
112
|
-
deployed: false;
|
|
113
|
-
nextAction: string;
|
|
114
|
-
} | {
|
|
115
|
-
integrations: {
|
|
116
|
-
schemaVersion: number;
|
|
117
|
-
providers: {
|
|
118
|
-
provider: keyof import("./index.js").ProviderSettingsById;
|
|
119
|
-
settings: import("./providers/definitions.js").NeonSettings | import("./providers/definitions.js").ClerkSettings | import("./providers/definitions.js").ResendSettings | import("./providers/definitions.js").StripeSettings | import("./providers/definitions.js").RevenueCatSettings | import("./providers/definitions.js").SentrySettings | import("./providers/definitions.js").PostHogSettings | import("./providers/definitions.js").OpenAISettings;
|
|
120
|
-
credential: string;
|
|
121
|
-
missing: string[];
|
|
122
|
-
}[];
|
|
123
|
-
configured: boolean;
|
|
124
|
-
mutation: boolean;
|
|
125
|
-
};
|
|
126
|
-
mutation: boolean;
|
|
127
|
-
project: import("./vercel-project.js").WebProject;
|
|
128
|
-
checks: string[];
|
|
129
|
-
deployment: string[];
|
|
130
|
-
cloudflareServices: string;
|
|
131
|
-
state?: undefined;
|
|
132
|
-
deployed?: undefined;
|
|
133
|
-
} | {
|
|
134
|
-
state: string;
|
|
135
|
-
deployed: boolean;
|
|
136
|
-
integrations: {
|
|
137
|
-
schemaVersion: number;
|
|
138
|
-
results: {
|
|
139
|
-
provider: string;
|
|
140
|
-
resources: Record<string, string>;
|
|
141
|
-
ready: boolean;
|
|
142
|
-
nextActions: string[];
|
|
143
|
-
}[];
|
|
144
|
-
ready: boolean;
|
|
145
|
-
configuredFiles: string[];
|
|
146
|
-
mutation: boolean;
|
|
147
|
-
};
|
|
148
|
-
} | ({
|
|
149
|
-
state: "configuration-required" | "provider-configuration-required";
|
|
150
|
-
deployed: boolean;
|
|
151
|
-
targets: {
|
|
152
|
-
provider: string;
|
|
153
|
-
result: {
|
|
154
|
-
management: string;
|
|
155
|
-
state?: "configuration-required" | undefined;
|
|
156
|
-
deployed?: false | undefined;
|
|
157
|
-
activated?: true | undefined;
|
|
158
|
-
nextAction?: string | undefined;
|
|
159
|
-
projectId: string;
|
|
160
|
-
release: import("./delivery-evidence.js").Release;
|
|
161
|
-
managementFile: string;
|
|
162
|
-
productVerification: string;
|
|
163
|
-
} | {
|
|
164
|
-
state: "configuration-required";
|
|
165
|
-
resources: Awaited<ReturnType<typeof provisionApplication>>;
|
|
166
|
-
deployed: false;
|
|
167
|
-
nextAction: string;
|
|
168
|
-
} | {
|
|
169
|
-
state: "provider-configuration-required";
|
|
170
|
-
deployed: false;
|
|
171
|
-
integrations: Awaited<ReturnType<typeof provisionSelectedProviders>>;
|
|
172
|
-
};
|
|
173
|
-
}[];
|
|
174
|
-
nextAction: string;
|
|
175
|
-
productVerification?: undefined;
|
|
176
|
-
} & {
|
|
177
|
-
operation: import("./lifecycle-model.js").LifecycleOperation;
|
|
178
|
-
}) | ({
|
|
179
|
-
nextAction?: string | undefined;
|
|
180
|
-
state: string;
|
|
181
|
-
deployed: boolean;
|
|
182
|
-
targets: ({
|
|
183
|
-
provider: string;
|
|
184
|
-
result: {
|
|
185
|
-
management: string;
|
|
186
|
-
state?: "configuration-required" | undefined;
|
|
187
|
-
deployed?: false | undefined;
|
|
188
|
-
activated?: true | undefined;
|
|
189
|
-
nextAction?: string | undefined;
|
|
190
|
-
projectId: string;
|
|
191
|
-
release: import("./delivery-evidence.js").Release;
|
|
192
|
-
managementFile: string;
|
|
193
|
-
productVerification: string;
|
|
194
|
-
} | ({
|
|
195
|
-
project: import("./project-state.js").ApplicationProject;
|
|
196
|
-
checks: string[][];
|
|
197
|
-
deployments: {
|
|
198
|
-
target: string;
|
|
199
|
-
directory: string;
|
|
200
|
-
command: string[];
|
|
201
|
-
}[];
|
|
202
|
-
resourcesProvisioned: boolean;
|
|
203
|
-
audience: "unconfigured" | "public" | "private";
|
|
204
|
-
} & {
|
|
205
|
-
provisioning: ReturnType<typeof planProvisioning>;
|
|
206
|
-
mutation: false;
|
|
207
|
-
integrations: ReturnType<typeof planProviderProvisioning>;
|
|
208
|
-
}) | {
|
|
209
|
-
state: "configuration-required";
|
|
210
|
-
resources: Awaited<ReturnType<typeof provisionApplication>>;
|
|
211
|
-
deployed: false;
|
|
212
|
-
nextAction: string;
|
|
213
|
-
} | {
|
|
214
|
-
state: "provider-configuration-required";
|
|
215
|
-
deployed: false;
|
|
216
|
-
integrations: Awaited<ReturnType<typeof provisionSelectedProviders>>;
|
|
217
|
-
};
|
|
218
|
-
} | {
|
|
219
|
-
provider: string;
|
|
220
|
-
result: {
|
|
221
|
-
projectId: string;
|
|
222
|
-
release: import("./vercel-project.js").WebRelease;
|
|
223
|
-
productVerification: string;
|
|
224
|
-
} | {
|
|
225
|
-
integrations: {
|
|
226
|
-
schemaVersion: number;
|
|
227
|
-
providers: {
|
|
228
|
-
provider: keyof import("./index.js").ProviderSettingsById;
|
|
229
|
-
settings: import("./providers/definitions.js").NeonSettings | import("./providers/definitions.js").ClerkSettings | import("./providers/definitions.js").ResendSettings | import("./providers/definitions.js").StripeSettings | import("./providers/definitions.js").RevenueCatSettings | import("./providers/definitions.js").SentrySettings | import("./providers/definitions.js").PostHogSettings | import("./providers/definitions.js").OpenAISettings;
|
|
230
|
-
credential: string;
|
|
231
|
-
missing: string[];
|
|
232
|
-
}[];
|
|
233
|
-
configured: boolean;
|
|
234
|
-
mutation: boolean;
|
|
235
|
-
};
|
|
236
|
-
mutation: boolean;
|
|
237
|
-
project: import("./vercel-project.js").WebProject;
|
|
238
|
-
checks: string[];
|
|
239
|
-
deployment: string[];
|
|
240
|
-
cloudflareServices: string;
|
|
241
|
-
state?: undefined;
|
|
242
|
-
deployed?: undefined;
|
|
243
|
-
} | {
|
|
244
|
-
state: string;
|
|
245
|
-
deployed: boolean;
|
|
246
|
-
integrations: {
|
|
247
|
-
schemaVersion: number;
|
|
248
|
-
results: {
|
|
249
|
-
provider: string;
|
|
250
|
-
resources: Record<string, string>;
|
|
251
|
-
ready: boolean;
|
|
252
|
-
nextActions: string[];
|
|
253
|
-
}[];
|
|
254
|
-
ready: boolean;
|
|
255
|
-
configuredFiles: string[];
|
|
256
|
-
mutation: boolean;
|
|
257
|
-
};
|
|
258
|
-
};
|
|
259
|
-
})[];
|
|
260
|
-
productVerification: string;
|
|
261
|
-
} & {
|
|
262
|
-
operation: import("./lifecycle-model.js").LifecycleOperation;
|
|
263
|
-
}) | ({
|
|
264
|
-
state: string;
|
|
265
|
-
deployed: boolean;
|
|
266
|
-
targets: ({
|
|
267
|
-
provider: string;
|
|
268
|
-
result: {
|
|
269
|
-
management: string;
|
|
270
|
-
state?: "configuration-required" | undefined;
|
|
271
|
-
deployed?: false | undefined;
|
|
272
|
-
activated?: true | undefined;
|
|
273
|
-
nextAction?: string | undefined;
|
|
274
|
-
projectId: string;
|
|
275
|
-
release: import("./delivery-evidence.js").Release;
|
|
276
|
-
managementFile: string;
|
|
277
|
-
productVerification: string;
|
|
278
|
-
} | ({
|
|
279
|
-
project: import("./project-state.js").ApplicationProject;
|
|
280
|
-
checks: string[][];
|
|
281
|
-
deployments: {
|
|
282
|
-
target: string;
|
|
283
|
-
directory: string;
|
|
284
|
-
command: string[];
|
|
285
|
-
}[];
|
|
286
|
-
resourcesProvisioned: boolean;
|
|
287
|
-
audience: "unconfigured" | "public" | "private";
|
|
288
|
-
} & {
|
|
289
|
-
provisioning: ReturnType<typeof planProvisioning>;
|
|
290
|
-
mutation: false;
|
|
291
|
-
integrations: ReturnType<typeof planProviderProvisioning>;
|
|
292
|
-
}) | {
|
|
293
|
-
state: "configuration-required";
|
|
294
|
-
resources: Awaited<ReturnType<typeof provisionApplication>>;
|
|
295
|
-
deployed: false;
|
|
296
|
-
nextAction: string;
|
|
297
|
-
} | {
|
|
298
|
-
state: "provider-configuration-required";
|
|
299
|
-
deployed: false;
|
|
300
|
-
integrations: Awaited<ReturnType<typeof provisionSelectedProviders>>;
|
|
301
|
-
};
|
|
302
|
-
state?: undefined;
|
|
303
|
-
} | {
|
|
304
|
-
provider: string;
|
|
305
|
-
state: string;
|
|
306
|
-
result?: undefined;
|
|
307
|
-
})[];
|
|
308
|
-
productVerification: string;
|
|
309
|
-
nextAction: string;
|
|
310
|
-
} & {
|
|
311
|
-
operation: import("./lifecycle-model.js").LifecycleOperation;
|
|
312
|
-
}) | {
|
|
313
|
-
mutation: boolean;
|
|
314
|
-
dependencies: {
|
|
315
|
-
target: string;
|
|
316
|
-
after: string[];
|
|
317
|
-
}[];
|
|
318
|
-
targets: ({
|
|
319
|
-
project: import("./project-state.js").ApplicationProject;
|
|
320
|
-
checks: string[][];
|
|
321
|
-
deployments: {
|
|
322
|
-
target: string;
|
|
323
|
-
directory: string;
|
|
324
|
-
command: string[];
|
|
325
|
-
}[];
|
|
326
|
-
resourcesProvisioned: boolean;
|
|
327
|
-
audience: "unconfigured" | "public" | "private";
|
|
328
|
-
provider: string;
|
|
329
|
-
} | {
|
|
330
|
-
project: import("./vercel-project.js").WebProject;
|
|
331
|
-
checks: string[];
|
|
332
|
-
deployment: string[];
|
|
333
|
-
cloudflareServices: string;
|
|
334
|
-
mutation: boolean;
|
|
335
|
-
provider: string;
|
|
336
|
-
})[];
|
|
337
|
-
integrations: {
|
|
338
|
-
schemaVersion: number;
|
|
339
|
-
providers: {
|
|
340
|
-
provider: keyof import("./index.js").ProviderSettingsById;
|
|
341
|
-
settings: import("./providers/definitions.js").NeonSettings | import("./providers/definitions.js").ClerkSettings | import("./providers/definitions.js").ResendSettings | import("./providers/definitions.js").StripeSettings | import("./providers/definitions.js").RevenueCatSettings | import("./providers/definitions.js").SentrySettings | import("./providers/definitions.js").PostHogSettings | import("./providers/definitions.js").OpenAISettings;
|
|
342
|
-
credential: string;
|
|
343
|
-
missing: string[];
|
|
344
|
-
}[];
|
|
345
|
-
configured: boolean;
|
|
346
|
-
mutation: boolean;
|
|
347
|
-
};
|
|
348
|
-
}>;
|
|
35
|
+
export declare const shipSelectedStack: typeof shipCloudflareApplication;
|
package/dist/ship.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { hasProjectSection } from './project-config.js';
|
|
2
1
|
import { realpathSync, writeFileSync, rmSync } from 'node:fs';
|
|
3
2
|
import path from 'node:path';
|
|
4
3
|
import { tmpdir } from 'node:os';
|
|
@@ -7,14 +6,11 @@ import { defaultRunner } from './project-state.js';
|
|
|
7
6
|
import { withLifecycleOperation } from './lifecycle.js';
|
|
8
7
|
import { planDelivery, shipApplication } from './delivery.js';
|
|
9
8
|
import { planProvisioning, provisionApplication } from './provision.js';
|
|
10
|
-
import { syncVoidSecrets, voidServerSecrets } from './void-execution.js';
|
|
11
9
|
import { planProviderProvisioning, provisionSelectedProviders } from './providers/provision.js';
|
|
12
10
|
import { applicationRuntime, configuredRuntime, runtimeTargets, RUNTIME_KEYS, } from './providers/runtime.js';
|
|
13
11
|
import { CREDENTIALS } from './providers/api.js';
|
|
14
|
-
import { readApplication } from './project-state.js';
|
|
15
|
-
import { planVercelDelivery, configureVercelEnvironment, shipVercelApplication } from './vercel.js';
|
|
16
12
|
/** Provisioning can change tracked binding IDs; never silently commit that change. */
|
|
17
|
-
async function executeCloudflareApplication(root, dryRun = false, run = defaultRunner, request, send = fetch, providerEnvironment = process.env, session
|
|
13
|
+
async function executeCloudflareApplication(root, dryRun = false, run = defaultRunner, request, send = fetch, providerEnvironment = process.env, session) {
|
|
18
14
|
root = realpathSync(root);
|
|
19
15
|
const deployment = planDelivery(root, true);
|
|
20
16
|
const provisioning = planProvisioning(root);
|
|
@@ -65,23 +61,6 @@ async function executeCloudflareApplication(root, dryRun = false, run = defaultR
|
|
|
65
61
|
environments[`${relative}/.dev.vars`] ??
|
|
66
62
|
environments[`${relative}/.env.local`];
|
|
67
63
|
const environment = runtimeEnvironment(env, values);
|
|
68
|
-
if (deployment.project.deliveryEngine === 'void' &&
|
|
69
|
-
command === 'pnpm' &&
|
|
70
|
-
args.join(' ') === 'exec void deploy --platform cloudflare') {
|
|
71
|
-
if (values && Object.keys(values).length)
|
|
72
|
-
await syncVoidSecrets(cwd, voidServerSecrets(values), run, environment, async () => {
|
|
73
|
-
const dirty = await run('git', ['status', '--porcelain'], root, environment);
|
|
74
|
-
const changed = dirty
|
|
75
|
-
.split('\n')
|
|
76
|
-
.filter((line) => line.trim())
|
|
77
|
-
.some((line) => !([' M', '??'].includes(line.slice(0, 2)) &&
|
|
78
|
-
deployment.project.targets.some((target) => line.slice(3) === `${target.directory}/void.lock.json`)));
|
|
79
|
-
if (changed ||
|
|
80
|
-
(await run('git', ['rev-parse', 'HEAD'], root, environment)).trim() !== commit)
|
|
81
|
-
throw new Error('Source changed before Void secret upload; deployment was stopped.');
|
|
82
|
-
});
|
|
83
|
-
return run(command, args, cwd, environment);
|
|
84
|
-
}
|
|
85
64
|
if (command !== 'pnpm' ||
|
|
86
65
|
args.join(' ') !== 'run deploy' ||
|
|
87
66
|
!values ||
|
|
@@ -96,54 +75,15 @@ async function executeCloudflareApplication(root, dryRun = false, run = defaultR
|
|
|
96
75
|
rmSync(file, { force: true });
|
|
97
76
|
}
|
|
98
77
|
};
|
|
99
|
-
return phase(session, 'deployment', () => shipApplication(root, buildRunner, request
|
|
100
|
-
}
|
|
101
|
-
async function executeVercelApplication(root, dryRun = false, run = defaultRunner, send = fetch, providerEnvironment = process.env, session) {
|
|
102
|
-
const deployment = planVercelDelivery(root);
|
|
103
|
-
const integrations = planProviderProvisioning(root);
|
|
104
|
-
if (dryRun)
|
|
105
|
-
return { ...deployment, integrations, mutation: false };
|
|
106
|
-
if (!deployment.project.projectId ||
|
|
107
|
-
!deployment.project.teamId ||
|
|
108
|
-
deployment.project.audience === 'unconfigured')
|
|
109
|
-
throw new Error('Connect the intended Vercel account, plan and audience before shipping.');
|
|
110
|
-
const env = runtimeEnvironment(providerEnvironment);
|
|
111
|
-
const providerRun = (command, args, cwd, env, input) => run(command, args, cwd, runtimeEnvironment(env), input);
|
|
112
|
-
if (realpathSync((await run('git', ['rev-parse', '--show-toplevel'], root, env)).trim()) !==
|
|
113
|
-
realpathSync(root) ||
|
|
114
|
-
(await run('git', ['status', '--porcelain'], root, env)).trim())
|
|
115
|
-
throw new Error('Shipping requires a clean application repository before provisioning.');
|
|
116
|
-
const commit = (await run('git', ['rev-parse', 'HEAD'], root, env)).trim();
|
|
117
|
-
const application = await phase(session, 'application-runtime', () => applicationRuntime(root, providerRun));
|
|
118
|
-
await phase(session, 'checks', () => run('pnpm', ['run', 'check'], root, env));
|
|
119
|
-
if ((await run('git', ['status', '--porcelain'], root, env)).trim() ||
|
|
120
|
-
(await run('git', ['rev-parse', 'HEAD'], root, env)).trim() !== commit)
|
|
121
|
-
throw new Error('Source changed during checks; provisioning was not started.');
|
|
122
|
-
const configured = await phase(session, 'integrations', () => provisionSelectedProviders(root, false, providerRun, send, providerEnvironment));
|
|
123
|
-
if (!configured.ready)
|
|
124
|
-
return { state: 'provider-configuration-required', deployed: false, integrations: configured };
|
|
125
|
-
const runtime = configuredRuntime(root);
|
|
126
|
-
if ((await run('git', ['status', '--porcelain'], root, env)).trim() ||
|
|
127
|
-
(await run('git', ['rev-parse', 'HEAD'], root, env)).trim() !== commit)
|
|
128
|
-
throw new Error('Source changed during provider configuration; deployment was not started.');
|
|
129
|
-
const environments = mergeRuntimeTargets(runtimeTargets(root, runtime), application);
|
|
130
|
-
const values = environments['apps/web/.env.local'] ?? {};
|
|
131
|
-
await phase(session, 'runtime', () => configureVercelEnvironment(root, values, providerRun));
|
|
132
|
-
const buildRunner = (command, args, cwd, env) => run(command, args, cwd, runtimeEnvironment(env, values));
|
|
133
|
-
return phase(session, 'deployment', () => shipVercelApplication(root, buildRunner));
|
|
78
|
+
return phase(session, 'deployment', () => shipApplication(root, buildRunner, request));
|
|
134
79
|
}
|
|
135
80
|
function phase(session, name, action) {
|
|
136
81
|
return session ? session.phase(name, action) : action();
|
|
137
82
|
}
|
|
138
|
-
export async function shipCloudflareApplication(root, dryRun = false, run = defaultRunner, request, send = fetch, providerEnvironment = process.env
|
|
139
|
-
if (dryRun)
|
|
140
|
-
return executeCloudflareApplication(root, true, run, request, send, providerEnvironment, undefined, options);
|
|
141
|
-
return withLifecycleOperation(root, 'cloudflare', run, (session) => executeCloudflareApplication(root, false, run, request, send, providerEnvironment, session, options));
|
|
142
|
-
}
|
|
143
|
-
export async function shipSelectedVercelApplication(root, dryRun = false, run = defaultRunner, send = fetch, providerEnvironment = process.env) {
|
|
83
|
+
export async function shipCloudflareApplication(root, dryRun = false, run = defaultRunner, request, send = fetch, providerEnvironment = process.env) {
|
|
144
84
|
if (dryRun)
|
|
145
|
-
return
|
|
146
|
-
return withLifecycleOperation(root, '
|
|
85
|
+
return executeCloudflareApplication(root, true, run, request, send, providerEnvironment, undefined);
|
|
86
|
+
return withLifecycleOperation(root, 'cloudflare', run, (session) => executeCloudflareApplication(root, false, run, request, send, providerEnvironment, session));
|
|
147
87
|
}
|
|
148
88
|
function runtimeEnvironment(base, values = {}) {
|
|
149
89
|
const environment = { ...base, CI: '1', NO_COLOR: '1' };
|
|
@@ -152,6 +92,10 @@ function runtimeEnvironment(base, values = {}) {
|
|
|
152
92
|
for (const name of RUNTIME_KEYS)
|
|
153
93
|
if (!name.startsWith('NEXT_PUBLIC_') && !name.startsWith('EXPO_PUBLIC_'))
|
|
154
94
|
delete environment[name];
|
|
95
|
+
for (const name of Object.keys(environment))
|
|
96
|
+
if (!name.startsWith('EXPO_PUBLIC_') &&
|
|
97
|
+
/SECRET|PASSWORD|ADMIN_KEY|API_KEY|DATABASE_URL|AUTHORIZATION/.test(name))
|
|
98
|
+
delete environment[name];
|
|
155
99
|
return { ...environment, ...values };
|
|
156
100
|
}
|
|
157
101
|
function mergeRuntimeTargets(providers, application) {
|
|
@@ -160,80 +104,4 @@ function mergeRuntimeTargets(providers, application) {
|
|
|
160
104
|
targets[file] = { ...targets[file], ...values };
|
|
161
105
|
return targets;
|
|
162
106
|
}
|
|
163
|
-
|
|
164
|
-
export async function shipSelectedStack(root, dryRun = false, run = defaultRunner, request, send = fetch, providerEnvironment = process.env) {
|
|
165
|
-
root = realpathSync(root);
|
|
166
|
-
const mixed = hasProjectSection(root, 'vercel') &&
|
|
167
|
-
hasProjectSection(root, 'cloudflare') &&
|
|
168
|
-
readApplication(root).targets.length > 0;
|
|
169
|
-
if (!mixed)
|
|
170
|
-
return hasProjectSection(root, 'vercel')
|
|
171
|
-
? shipSelectedVercelApplication(root, dryRun, run, send, providerEnvironment)
|
|
172
|
-
: shipCloudflareApplication(root, dryRun, run, request, send, providerEnvironment);
|
|
173
|
-
const cloudflare = planDelivery(root, true);
|
|
174
|
-
const vercel = planVercelDelivery(root);
|
|
175
|
-
if (dryRun)
|
|
176
|
-
return {
|
|
177
|
-
mutation: false,
|
|
178
|
-
dependencies: [
|
|
179
|
-
{ target: 'cloudflare', after: [] },
|
|
180
|
-
{ target: 'vercel', after: ['cloudflare'] },
|
|
181
|
-
],
|
|
182
|
-
targets: [
|
|
183
|
-
{ provider: 'cloudflare', ...cloudflare },
|
|
184
|
-
{ provider: 'vercel', ...vercel },
|
|
185
|
-
],
|
|
186
|
-
integrations: planProviderProvisioning(root),
|
|
187
|
-
};
|
|
188
|
-
if (!cloudflare.project.accountId ||
|
|
189
|
-
cloudflare.project.audience === 'unconfigured' ||
|
|
190
|
-
!vercel.project.projectId ||
|
|
191
|
-
!vercel.project.teamId ||
|
|
192
|
-
vercel.project.audience === 'unconfigured')
|
|
193
|
-
throw new Error('Connect both intended hosting accounts and audiences before mixed delivery.');
|
|
194
|
-
return withLifecycleOperation(root, 'mixed', run, async (session) => {
|
|
195
|
-
const scoped = (prefix) => ({
|
|
196
|
-
phase: (name, action) => session.phase(`${prefix}-${name}`, action),
|
|
197
|
-
});
|
|
198
|
-
const services = await executeCloudflareApplication(root, false, run, request, send, providerEnvironment, scoped('cloudflare'));
|
|
199
|
-
if ('state' in services &&
|
|
200
|
-
services.state !== undefined &&
|
|
201
|
-
['configuration-required', 'provider-configuration-required'].includes(services.state))
|
|
202
|
-
return {
|
|
203
|
-
state: services.state,
|
|
204
|
-
deployed: false,
|
|
205
|
-
targets: [{ provider: 'cloudflare', result: services }],
|
|
206
|
-
nextAction: 'Resolve Cloudflare setup and review source changes, then repeat ship. Vercel was not deployed.',
|
|
207
|
-
};
|
|
208
|
-
try {
|
|
209
|
-
const web = await executeVercelApplication(root, false, run, send, providerEnvironment, scoped('vercel'));
|
|
210
|
-
const blocked = 'state' in web && web.state === 'provider-configuration-required';
|
|
211
|
-
return {
|
|
212
|
-
state: blocked ? 'partial' : 'deployed',
|
|
213
|
-
deployed: !blocked,
|
|
214
|
-
targets: [
|
|
215
|
-
{ provider: 'cloudflare', result: services },
|
|
216
|
-
{ provider: 'vercel', result: web },
|
|
217
|
-
],
|
|
218
|
-
productVerification: 'required',
|
|
219
|
-
...(blocked
|
|
220
|
-
? {
|
|
221
|
-
nextAction: 'Cloudflare completed. Resolve Vercel prerequisites and repeat ship; no resource or data rollback was attempted.',
|
|
222
|
-
}
|
|
223
|
-
: {}),
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
catch {
|
|
227
|
-
return {
|
|
228
|
-
state: 'partial',
|
|
229
|
-
deployed: false,
|
|
230
|
-
targets: [
|
|
231
|
-
{ provider: 'cloudflare', result: services },
|
|
232
|
-
{ provider: 'vercel', state: 'failed' },
|
|
233
|
-
],
|
|
234
|
-
productVerification: 'required',
|
|
235
|
-
nextAction: 'Cloudflare completed; Vercel stopped. Inspect hosting status and the failed operation phase, then repeat the deployment plan. No resource or data rollback was attempted.',
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
}
|
|
107
|
+
export const shipSelectedStack = shipCloudflareApplication;
|
package/dist/stack-registry.d.ts
CHANGED
|
@@ -1,86 +1,36 @@
|
|
|
1
1
|
import type { ItemDefinition, StackRegistryItem, RecipeContext } from './registry/types.js';
|
|
2
2
|
/** Every product owns its source recipe, setup requirements and composition policy here. */
|
|
3
3
|
declare const PRODUCT_ITEMS: {
|
|
4
|
-
vinext: ItemDefinition;
|
|
5
4
|
next: ItemDefinition;
|
|
6
5
|
expo: ItemDefinition;
|
|
7
|
-
electron: ItemDefinition;
|
|
8
|
-
wxt: ItemDefinition;
|
|
9
6
|
hono: ItemDefinition;
|
|
10
|
-
neon: ItemDefinition;
|
|
11
|
-
'neon-realtime': ItemDefinition;
|
|
12
7
|
d1: ItemDefinition;
|
|
13
|
-
'local-data': ItemDefinition;
|
|
14
|
-
clerk: ItemDefinition;
|
|
15
8
|
'better-auth': ItemDefinition;
|
|
16
9
|
r2: ItemDefinition;
|
|
17
|
-
kv: ItemDefinition;
|
|
18
|
-
realtime: ItemDefinition;
|
|
19
|
-
stream: ItemDefinition;
|
|
20
|
-
queues: ItemDefinition;
|
|
21
|
-
cron: ItemDefinition;
|
|
22
|
-
workflows: ItemDefinition;
|
|
23
|
-
'analytics-engine': ItemDefinition;
|
|
24
|
-
images: ItemDefinition;
|
|
25
|
-
realtimekit: ItemDefinition;
|
|
26
|
-
video: ItemDefinition;
|
|
27
|
-
openai: ItemDefinition;
|
|
28
|
-
'ai-sdk': ItemDefinition;
|
|
29
|
-
'workers-ai': ItemDefinition;
|
|
30
|
-
resend: ItemDefinition;
|
|
31
10
|
stripe: ItemDefinition;
|
|
32
11
|
revenuecat: ItemDefinition;
|
|
33
|
-
sentry: ItemDefinition;
|
|
34
|
-
basin: ItemDefinition;
|
|
35
|
-
posthog: ItemDefinition;
|
|
36
12
|
styling: ItemDefinition;
|
|
37
13
|
};
|
|
38
14
|
export type StandardProduct = keyof typeof PRODUCT_ITEMS;
|
|
39
|
-
export declare const STANDARD_PRODUCTS: readonly ("next" | "
|
|
15
|
+
export declare const STANDARD_PRODUCTS: readonly ("next" | "expo" | "better-auth" | "styling" | "hono" | "d1" | "r2" | "stripe" | "revenuecat")[];
|
|
40
16
|
declare const DEFINITIONS: {
|
|
41
|
-
vinext: ItemDefinition;
|
|
42
17
|
next: ItemDefinition;
|
|
43
18
|
expo: ItemDefinition;
|
|
44
|
-
electron: ItemDefinition;
|
|
45
|
-
wxt: ItemDefinition;
|
|
46
19
|
hono: ItemDefinition;
|
|
47
|
-
neon: ItemDefinition;
|
|
48
|
-
'neon-realtime': ItemDefinition;
|
|
49
20
|
d1: ItemDefinition;
|
|
50
|
-
'local-data': ItemDefinition;
|
|
51
|
-
clerk: ItemDefinition;
|
|
52
21
|
'better-auth': ItemDefinition;
|
|
53
22
|
r2: ItemDefinition;
|
|
54
|
-
kv: ItemDefinition;
|
|
55
|
-
realtime: ItemDefinition;
|
|
56
|
-
stream: ItemDefinition;
|
|
57
|
-
queues: ItemDefinition;
|
|
58
|
-
cron: ItemDefinition;
|
|
59
|
-
workflows: ItemDefinition;
|
|
60
|
-
'analytics-engine': ItemDefinition;
|
|
61
|
-
images: ItemDefinition;
|
|
62
|
-
realtimekit: ItemDefinition;
|
|
63
|
-
video: ItemDefinition;
|
|
64
|
-
openai: ItemDefinition;
|
|
65
|
-
'ai-sdk': ItemDefinition;
|
|
66
|
-
'workers-ai': ItemDefinition;
|
|
67
|
-
resend: ItemDefinition;
|
|
68
23
|
stripe: ItemDefinition;
|
|
69
24
|
revenuecat: ItemDefinition;
|
|
70
|
-
sentry: ItemDefinition;
|
|
71
|
-
basin: ItemDefinition;
|
|
72
|
-
posthog: ItemDefinition;
|
|
73
25
|
styling: ItemDefinition;
|
|
74
26
|
workspace: ItemDefinition;
|
|
75
27
|
typescript: ItemDefinition;
|
|
76
28
|
eslint: ItemDefinition;
|
|
77
|
-
'cloudflare-api': ItemDefinition;
|
|
78
|
-
ui: ItemDefinition;
|
|
79
29
|
};
|
|
80
30
|
export type StackItemId = keyof typeof DEFINITIONS;
|
|
81
31
|
export declare function getStackDefinition(name: string): ItemDefinition;
|
|
82
32
|
export declare function getStackItem(name: string): StackRegistryItem;
|
|
83
|
-
export declare const STACK_ITEMS: Record<"next" | "
|
|
33
|
+
export declare const STACK_ITEMS: Record<"next" | "expo" | "typescript" | "better-auth" | "eslint" | "workspace" | "styling" | "hono" | "d1" | "r2" | "stripe" | "revenuecat", StackRegistryItem>;
|
|
84
34
|
export declare const STACK_REGISTRY: {
|
|
85
35
|
schemaVersion: number;
|
|
86
36
|
name: string;
|