anhedral 0.12.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 -172
- 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 -39
- 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 -80
- package/dist/command.js +9 -11
- 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 +23 -102
- package/dist/dependencies.d.ts +12 -58
- package/dist/dependencies.js +67 -189
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -3
- 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.d.ts +1 -1
- package/dist/platforms/mobile.js +64 -114
- 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 +6 -86
- package/dist/provider-auth.js +3 -32
- package/dist/provider-readiness.d.ts +1 -1
- package/dist/provider-readiness.js +5 -24
- package/dist/providers/adapters.js +9 -178
- 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 +15 -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 -6
- package/dist/registry/add.js +11 -38
- 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 -26
- package/dist/registry/resolve.d.ts +3 -2
- package/dist/registry/resolve.js +26 -82
- package/dist/registry/types.d.ts +2 -7
- package/dist/registry/usage.js +2 -2
- package/dist/runtime-policy.d.ts +0 -2
- package/dist/runtime-policy.js +0 -13
- package/dist/scaffold/api.js +10 -2
- package/dist/scaffold/auth.d.ts +1 -2
- package/dist/scaffold/auth.js +57 -116
- package/dist/scaffold/backend.d.ts +2 -0
- package/dist/scaffold/backend.js +39 -0
- package/dist/scaffold/billing-config.d.ts +1 -0
- package/dist/scaffold/billing-config.js +73 -0
- package/dist/scaffold/billing-contracts.d.ts +2 -0
- package/dist/scaffold/billing-contracts.js +48 -0
- package/dist/scaffold/billing-providers.d.ts +1 -0
- package/dist/scaffold/billing-providers.js +249 -0
- package/dist/scaffold/billing-schema.d.ts +1 -0
- package/dist/scaffold/billing-schema.js +34 -0
- package/dist/scaffold/billing-security.d.ts +1 -0
- package/dist/scaffold/billing-security.js +46 -0
- package/dist/scaffold/billing-server.d.ts +1 -0
- package/dist/scaffold/billing-server.js +139 -0
- package/dist/scaffold/billing-store.d.ts +1 -0
- package/dist/scaffold/billing-store.js +72 -0
- package/dist/scaffold/billing.d.ts +2 -0
- package/dist/scaffold/billing.js +208 -0
- package/dist/scaffold/bootstrap.d.ts +2 -3
- package/dist/scaffold/bootstrap.js +37 -43
- package/dist/scaffold/compose.js +2 -12
- package/dist/scaffold/database.d.ts +1 -1
- package/dist/scaffold/database.js +20 -111
- package/dist/scaffold/documentation.d.ts +0 -1
- package/dist/scaffold/documentation.js +22 -82
- package/dist/scaffold/expo-auth.d.ts +3 -0
- package/dist/scaffold/expo-auth.js +203 -0
- package/dist/scaffold/expo-billing.d.ts +3 -0
- package/dist/scaffold/expo-billing.js +257 -0
- package/dist/scaffold/expo-runtime.d.ts +3 -0
- package/dist/scaffold/expo-runtime.js +43 -0
- package/dist/scaffold/integrations.d.ts +1 -2
- package/dist/scaffold/integrations.js +9 -5
- 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 -189
- 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 +13 -143
- package/dist/stack-registry.d.ts +2 -43
- package/dist/stack-registry.js +80 -308
- 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 -0
- package/docs/assets/anhedral-stack-light.png +0 -0
- package/docs/assets/anhedral-stack.png +0 -0
- package/docs/software-factory.md +25 -499
- package/docs/stack-standard.md +48 -226
- package/docs/verification.md +433 -0
- package/package.json +22 -21
- 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/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 -256
- package/dist/scaffold/web.d.ts +0 -2
- package/dist/scaffold/web.js +0 -128
- 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);
|
|
@@ -61,25 +57,10 @@ async function executeCloudflareApplication(root, dryRun = false, run = defaultR
|
|
|
61
57
|
const environments = mergeRuntimeTargets(runtimeTargets(root, runtime), application);
|
|
62
58
|
const buildRunner = async (command, args, cwd, env) => {
|
|
63
59
|
const relative = path.relative(root, cwd).split(path.sep).join('/');
|
|
64
|
-
const values = environments[`${relative}/.env`] ??
|
|
60
|
+
const values = environments[`${relative}/.env`] ??
|
|
61
|
+
environments[`${relative}/.dev.vars`] ??
|
|
62
|
+
environments[`${relative}/.env.local`];
|
|
65
63
|
const environment = runtimeEnvironment(env, values);
|
|
66
|
-
if (deployment.project.deliveryEngine === 'void' &&
|
|
67
|
-
command === 'pnpm' &&
|
|
68
|
-
args.join(' ') === 'exec void deploy --platform cloudflare') {
|
|
69
|
-
if (values && Object.keys(values).length)
|
|
70
|
-
await syncVoidSecrets(cwd, voidServerSecrets(values), run, environment, async () => {
|
|
71
|
-
const dirty = await run('git', ['status', '--porcelain'], root, environment);
|
|
72
|
-
const changed = dirty
|
|
73
|
-
.split('\n')
|
|
74
|
-
.filter((line) => line.trim())
|
|
75
|
-
.some((line) => !([' M', '??'].includes(line.slice(0, 2)) &&
|
|
76
|
-
deployment.project.targets.some((target) => line.slice(3) === `${target.directory}/void.lock.json`)));
|
|
77
|
-
if (changed ||
|
|
78
|
-
(await run('git', ['rev-parse', 'HEAD'], root, environment)).trim() !== commit)
|
|
79
|
-
throw new Error('Source changed before Void secret upload; deployment was stopped.');
|
|
80
|
-
});
|
|
81
|
-
return run(command, args, cwd, environment);
|
|
82
|
-
}
|
|
83
64
|
if (command !== 'pnpm' ||
|
|
84
65
|
args.join(' ') !== 'run deploy' ||
|
|
85
66
|
!values ||
|
|
@@ -94,54 +75,15 @@ async function executeCloudflareApplication(root, dryRun = false, run = defaultR
|
|
|
94
75
|
rmSync(file, { force: true });
|
|
95
76
|
}
|
|
96
77
|
};
|
|
97
|
-
return phase(session, 'deployment', () => shipApplication(root, buildRunner, request
|
|
98
|
-
}
|
|
99
|
-
async function executeVercelApplication(root, dryRun = false, run = defaultRunner, send = fetch, providerEnvironment = process.env, session) {
|
|
100
|
-
const deployment = planVercelDelivery(root);
|
|
101
|
-
const integrations = planProviderProvisioning(root);
|
|
102
|
-
if (dryRun)
|
|
103
|
-
return { ...deployment, integrations, mutation: false };
|
|
104
|
-
if (!deployment.project.projectId ||
|
|
105
|
-
!deployment.project.teamId ||
|
|
106
|
-
deployment.project.audience === 'unconfigured')
|
|
107
|
-
throw new Error('Connect the intended Vercel account, plan and audience before shipping.');
|
|
108
|
-
const env = runtimeEnvironment(providerEnvironment);
|
|
109
|
-
const providerRun = (command, args, cwd, env, input) => run(command, args, cwd, runtimeEnvironment(env), input);
|
|
110
|
-
if (realpathSync((await run('git', ['rev-parse', '--show-toplevel'], root, env)).trim()) !==
|
|
111
|
-
realpathSync(root) ||
|
|
112
|
-
(await run('git', ['status', '--porcelain'], root, env)).trim())
|
|
113
|
-
throw new Error('Shipping requires a clean application repository before provisioning.');
|
|
114
|
-
const commit = (await run('git', ['rev-parse', 'HEAD'], root, env)).trim();
|
|
115
|
-
const application = await phase(session, 'application-runtime', () => applicationRuntime(root, providerRun));
|
|
116
|
-
await phase(session, 'checks', () => run('pnpm', ['run', 'check'], root, env));
|
|
117
|
-
if ((await run('git', ['status', '--porcelain'], root, env)).trim() ||
|
|
118
|
-
(await run('git', ['rev-parse', 'HEAD'], root, env)).trim() !== commit)
|
|
119
|
-
throw new Error('Source changed during checks; provisioning was not started.');
|
|
120
|
-
const configured = await phase(session, 'integrations', () => provisionSelectedProviders(root, false, providerRun, send, providerEnvironment));
|
|
121
|
-
if (!configured.ready)
|
|
122
|
-
return { state: 'provider-configuration-required', deployed: false, integrations: configured };
|
|
123
|
-
const runtime = configuredRuntime(root);
|
|
124
|
-
if ((await run('git', ['status', '--porcelain'], root, env)).trim() ||
|
|
125
|
-
(await run('git', ['rev-parse', 'HEAD'], root, env)).trim() !== commit)
|
|
126
|
-
throw new Error('Source changed during provider configuration; deployment was not started.');
|
|
127
|
-
const environments = mergeRuntimeTargets(runtimeTargets(root, runtime), application);
|
|
128
|
-
const values = environments['apps/web/.env.local'] ?? {};
|
|
129
|
-
await phase(session, 'runtime', () => configureVercelEnvironment(root, values, providerRun));
|
|
130
|
-
const buildRunner = (command, args, cwd, env) => run(command, args, cwd, runtimeEnvironment(env, values));
|
|
131
|
-
return phase(session, 'deployment', () => shipVercelApplication(root, buildRunner));
|
|
78
|
+
return phase(session, 'deployment', () => shipApplication(root, buildRunner, request));
|
|
132
79
|
}
|
|
133
80
|
function phase(session, name, action) {
|
|
134
81
|
return session ? session.phase(name, action) : action();
|
|
135
82
|
}
|
|
136
|
-
export async function shipCloudflareApplication(root, dryRun = false, run = defaultRunner, request, send = fetch, providerEnvironment = process.env
|
|
137
|
-
if (dryRun)
|
|
138
|
-
return executeCloudflareApplication(root, true, run, request, send, providerEnvironment, undefined, options);
|
|
139
|
-
return withLifecycleOperation(root, 'cloudflare', run, (session) => executeCloudflareApplication(root, false, run, request, send, providerEnvironment, session, options));
|
|
140
|
-
}
|
|
141
|
-
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) {
|
|
142
84
|
if (dryRun)
|
|
143
|
-
return
|
|
144
|
-
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));
|
|
145
87
|
}
|
|
146
88
|
function runtimeEnvironment(base, values = {}) {
|
|
147
89
|
const environment = { ...base, CI: '1', NO_COLOR: '1' };
|
|
@@ -150,6 +92,10 @@ function runtimeEnvironment(base, values = {}) {
|
|
|
150
92
|
for (const name of RUNTIME_KEYS)
|
|
151
93
|
if (!name.startsWith('NEXT_PUBLIC_') && !name.startsWith('EXPO_PUBLIC_'))
|
|
152
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];
|
|
153
99
|
return { ...environment, ...values };
|
|
154
100
|
}
|
|
155
101
|
function mergeRuntimeTargets(providers, application) {
|
|
@@ -158,80 +104,4 @@ function mergeRuntimeTargets(providers, application) {
|
|
|
158
104
|
targets[file] = { ...targets[file], ...values };
|
|
159
105
|
return targets;
|
|
160
106
|
}
|
|
161
|
-
|
|
162
|
-
export async function shipSelectedStack(root, dryRun = false, run = defaultRunner, request, send = fetch, providerEnvironment = process.env) {
|
|
163
|
-
root = realpathSync(root);
|
|
164
|
-
const mixed = hasProjectSection(root, 'vercel') &&
|
|
165
|
-
hasProjectSection(root, 'cloudflare') &&
|
|
166
|
-
readApplication(root).targets.length > 0;
|
|
167
|
-
if (!mixed)
|
|
168
|
-
return hasProjectSection(root, 'vercel')
|
|
169
|
-
? shipSelectedVercelApplication(root, dryRun, run, send, providerEnvironment)
|
|
170
|
-
: shipCloudflareApplication(root, dryRun, run, request, send, providerEnvironment);
|
|
171
|
-
const cloudflare = planDelivery(root, true);
|
|
172
|
-
const vercel = planVercelDelivery(root);
|
|
173
|
-
if (dryRun)
|
|
174
|
-
return {
|
|
175
|
-
mutation: false,
|
|
176
|
-
dependencies: [
|
|
177
|
-
{ target: 'cloudflare', after: [] },
|
|
178
|
-
{ target: 'vercel', after: ['cloudflare'] },
|
|
179
|
-
],
|
|
180
|
-
targets: [
|
|
181
|
-
{ provider: 'cloudflare', ...cloudflare },
|
|
182
|
-
{ provider: 'vercel', ...vercel },
|
|
183
|
-
],
|
|
184
|
-
integrations: planProviderProvisioning(root),
|
|
185
|
-
};
|
|
186
|
-
if (!cloudflare.project.accountId ||
|
|
187
|
-
cloudflare.project.audience === 'unconfigured' ||
|
|
188
|
-
!vercel.project.projectId ||
|
|
189
|
-
!vercel.project.teamId ||
|
|
190
|
-
vercel.project.audience === 'unconfigured')
|
|
191
|
-
throw new Error('Connect both intended hosting accounts and audiences before mixed delivery.');
|
|
192
|
-
return withLifecycleOperation(root, 'mixed', run, async (session) => {
|
|
193
|
-
const scoped = (prefix) => ({
|
|
194
|
-
phase: (name, action) => session.phase(`${prefix}-${name}`, action),
|
|
195
|
-
});
|
|
196
|
-
const services = await executeCloudflareApplication(root, false, run, request, send, providerEnvironment, scoped('cloudflare'));
|
|
197
|
-
if ('state' in services &&
|
|
198
|
-
services.state !== undefined &&
|
|
199
|
-
['configuration-required', 'provider-configuration-required'].includes(services.state))
|
|
200
|
-
return {
|
|
201
|
-
state: services.state,
|
|
202
|
-
deployed: false,
|
|
203
|
-
targets: [{ provider: 'cloudflare', result: services }],
|
|
204
|
-
nextAction: 'Resolve Cloudflare setup and review source changes, then repeat ship. Vercel was not deployed.',
|
|
205
|
-
};
|
|
206
|
-
try {
|
|
207
|
-
const web = await executeVercelApplication(root, false, run, send, providerEnvironment, scoped('vercel'));
|
|
208
|
-
const blocked = 'state' in web && web.state === 'provider-configuration-required';
|
|
209
|
-
return {
|
|
210
|
-
state: blocked ? 'partial' : 'deployed',
|
|
211
|
-
deployed: !blocked,
|
|
212
|
-
targets: [
|
|
213
|
-
{ provider: 'cloudflare', result: services },
|
|
214
|
-
{ provider: 'vercel', result: web },
|
|
215
|
-
],
|
|
216
|
-
productVerification: 'required',
|
|
217
|
-
...(blocked
|
|
218
|
-
? {
|
|
219
|
-
nextAction: 'Cloudflare completed. Resolve Vercel prerequisites and repeat ship; no resource or data rollback was attempted.',
|
|
220
|
-
}
|
|
221
|
-
: {}),
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
catch {
|
|
225
|
-
return {
|
|
226
|
-
state: 'partial',
|
|
227
|
-
deployed: false,
|
|
228
|
-
targets: [
|
|
229
|
-
{ provider: 'cloudflare', result: services },
|
|
230
|
-
{ provider: 'vercel', state: 'failed' },
|
|
231
|
-
],
|
|
232
|
-
productVerification: 'required',
|
|
233
|
-
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.',
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
}
|
|
107
|
+
export const shipSelectedStack = shipCloudflareApplication;
|
package/dist/stack-registry.d.ts
CHANGED
|
@@ -1,77 +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
|
-
openai: ItemDefinition;
|
|
24
|
-
'ai-sdk': ItemDefinition;
|
|
25
|
-
'workers-ai': ItemDefinition;
|
|
26
|
-
resend: ItemDefinition;
|
|
27
10
|
stripe: ItemDefinition;
|
|
28
11
|
revenuecat: ItemDefinition;
|
|
29
|
-
sentry: ItemDefinition;
|
|
30
|
-
basin: ItemDefinition;
|
|
31
|
-
posthog: ItemDefinition;
|
|
32
12
|
styling: ItemDefinition;
|
|
33
13
|
};
|
|
34
14
|
export type StandardProduct = keyof typeof PRODUCT_ITEMS;
|
|
35
|
-
export declare const STANDARD_PRODUCTS: readonly ("next" | "
|
|
15
|
+
export declare const STANDARD_PRODUCTS: readonly ("next" | "expo" | "better-auth" | "styling" | "hono" | "d1" | "r2" | "stripe" | "revenuecat")[];
|
|
36
16
|
declare const DEFINITIONS: {
|
|
37
|
-
vinext: ItemDefinition;
|
|
38
17
|
next: ItemDefinition;
|
|
39
18
|
expo: ItemDefinition;
|
|
40
|
-
electron: ItemDefinition;
|
|
41
|
-
wxt: ItemDefinition;
|
|
42
19
|
hono: ItemDefinition;
|
|
43
|
-
neon: ItemDefinition;
|
|
44
|
-
'neon-realtime': ItemDefinition;
|
|
45
20
|
d1: ItemDefinition;
|
|
46
|
-
'local-data': ItemDefinition;
|
|
47
|
-
clerk: ItemDefinition;
|
|
48
21
|
'better-auth': ItemDefinition;
|
|
49
22
|
r2: ItemDefinition;
|
|
50
|
-
kv: ItemDefinition;
|
|
51
|
-
realtime: ItemDefinition;
|
|
52
|
-
stream: ItemDefinition;
|
|
53
|
-
queues: ItemDefinition;
|
|
54
|
-
cron: ItemDefinition;
|
|
55
|
-
workflows: ItemDefinition;
|
|
56
|
-
openai: ItemDefinition;
|
|
57
|
-
'ai-sdk': ItemDefinition;
|
|
58
|
-
'workers-ai': ItemDefinition;
|
|
59
|
-
resend: ItemDefinition;
|
|
60
23
|
stripe: ItemDefinition;
|
|
61
24
|
revenuecat: ItemDefinition;
|
|
62
|
-
sentry: ItemDefinition;
|
|
63
|
-
basin: ItemDefinition;
|
|
64
|
-
posthog: ItemDefinition;
|
|
65
25
|
styling: ItemDefinition;
|
|
66
26
|
workspace: ItemDefinition;
|
|
67
27
|
typescript: ItemDefinition;
|
|
68
28
|
eslint: ItemDefinition;
|
|
69
|
-
ui: ItemDefinition;
|
|
70
29
|
};
|
|
71
30
|
export type StackItemId = keyof typeof DEFINITIONS;
|
|
72
31
|
export declare function getStackDefinition(name: string): ItemDefinition;
|
|
73
32
|
export declare function getStackItem(name: string): StackRegistryItem;
|
|
74
|
-
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>;
|
|
75
34
|
export declare const STACK_REGISTRY: {
|
|
76
35
|
schemaVersion: number;
|
|
77
36
|
name: string;
|