void 0.10.8 → 0.10.11
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/AGENT_PROMPT.md +4 -0
- package/README.md +1 -1
- package/dist/{agents-Bmr5tFFb.mjs → agents-CtgBYqld.mjs} +1 -1
- package/dist/{auth-cmd-DlgNwByu.mjs → auth-cmd-BqsdZJp5.mjs} +3 -3
- package/dist/{better-auth-shared-BvnM9px6.d.mts → better-auth-shared-DealXecJ.d.mts} +1 -1
- package/dist/{build-cmd-Br8qL0rA.mjs → build-cmd-Bujrv5q-.mjs} +3 -3
- package/dist/{cache-wH-mP8UE.mjs → cache-C11V8Fxq.mjs} +3 -3
- package/dist/{cancel-deploy-BEBOEgtu.mjs → cancel-deploy-fwFYF04b.mjs} +2 -2
- package/dist/cli/cli.mjs +175 -43
- package/dist/cli/env-schema-probe.d.mts +96 -0
- package/dist/cli/env-schema-probe.mjs +272 -0
- package/dist/{client-Cj96iiBH.mjs → client-Gb71-XkG.mjs} +20 -2
- package/dist/{config-BdUctCZD.mjs → config-CutEMNGJ.mjs} +3 -3
- package/dist/{config-1twldYCW.mjs → config-E03l1C_h.mjs} +8 -2
- package/dist/{create-project-DD9n8Ho-.mjs → create-project-DsYvl3TB.mjs} +3 -3
- package/dist/{db-DjKE2-A-.mjs → db-PZBsLSGb.mjs} +27 -27
- package/dist/{delete-D2kr3Kmk.mjs → delete-mh6p-zkQ.mjs} +3 -3
- package/dist/deploy-DT8wsPZd.mjs +6990 -0
- package/dist/{discover-BuVVSAum.mjs → discover-CJHyvYfR.mjs} +2 -2
- package/dist/dist-DaKKDf8D.mjs +41 -0
- package/dist/{domain-_luIsM_B.mjs → domain-DiaNQbrl.mjs} +2 -2
- package/dist/entry-D7yy4xVH.mjs +100 -0
- package/dist/{env-CO5XAS9t.mjs → env-AAHU02L6.mjs} +5 -5
- package/dist/env-mask-Dd47NbR6.mjs +90 -0
- package/dist/env-public-BfiLcMBk.d.mts +140 -0
- package/dist/env-raw-Cx8ElDdj.mjs +58 -0
- package/dist/{env-types-D51bnR-c.mjs → env-types-QBj-ndax.mjs} +2 -2
- package/dist/env-validation-BdDlGhbN.mjs +1069 -0
- package/dist/{gen-Cf79J4aw.mjs → gen-oup1xBN0.mjs} +8 -8
- package/dist/{github-cmd-B6OX9c7d.mjs → github-cmd-BdNaOVNa.mjs} +102 -3
- package/dist/{handler-imD0UVDT.d.mts → handler-Cjh8uM3Y.d.mts} +1 -1
- package/dist/{headers-BwvFGhkx.mjs → headers-BQknpzkn.mjs} +2 -2
- package/dist/index.d.mts +14 -2
- package/dist/index.mjs +102 -55
- package/dist/{init-KirOzVDs.mjs → init-Dl2PKuQn.mjs} +13 -14
- package/dist/{link-CUmiosyb.mjs → link-CdGHSIy-.mjs} +4 -4
- package/dist/{list-3GEw7b6m.mjs → list-CPwFDZ_c.mjs} +3 -3
- package/dist/{login-DJReaT_Q.mjs → login-BT3H8PN3.mjs} +2 -2
- package/dist/{logs-D-rQ56Lq.mjs → logs-Bt313ax7.mjs} +3 -2
- package/dist/{mcp-D7yc0dXY.mjs → mcp-DoM3_nhd.mjs} +7 -2
- package/dist/{node-yFFk626c.mjs → node-BDx8pmhq.mjs} +5 -5
- package/dist/{package-json-B0NuUWGd.mjs → package-json-Cx1osYo6.mjs} +1 -1
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/index.d.mts +1 -23
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.mjs +2 -2
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/{plugin-inference-CJxi_fWI.mjs → plugin-inference-DMeavIJ6.mjs} +4 -98
- package/dist/{prepare-C_cVurhP.mjs → prepare-DOBTY0o4.mjs} +10 -10
- package/dist/preset-BGrvB4Bl.mjs +539 -0
- package/dist/{project-cmd-DnU7u9QF.mjs → project-cmd-D_w-4w5B.mjs} +13 -9
- package/dist/{project-paths-tpdR1mJR.mjs → project-paths-BQd7OmIo.mjs} +1 -1
- package/dist/project-paths-GpziKeQQ.d.mts +25 -0
- package/dist/{project-tsconfig-D9uSVVpA.mjs → project-tsconfig-B-QtXjLQ.mjs} +2 -2
- package/dist/{protocol-6hTJ04T1.d.mts → protocol-Bnb0LFp3.d.mts} +1 -1
- package/dist/provision-BLrCEBbI.mjs +2557 -0
- package/dist/requests-B8sZxaFM.mjs +50 -0
- package/dist/{resolve-project-D2HI3TrG.mjs → resolve-project-BBMtLLV9.mjs} +1 -1
- package/dist/{rollback-Yh7bCKob.mjs → rollback-CkvTFXx5.mjs} +2 -2
- package/dist/{route-types-CfKfhbIg.mjs → route-types-COI2DsZv.mjs} +2 -2
- package/dist/{runner-h272wcPj.mjs → runner-kapo9aPs.mjs} +3 -3
- package/dist/{runner-pg-waxJOnBb.mjs → runner-pg-CHM76xuC.mjs} +1 -1
- package/dist/runtime/ai.mjs +113 -15
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/env-public.d.mts +1 -139
- package/dist/runtime/env-public.mjs +10 -93
- package/dist/runtime/env.d.mts +14 -1
- package/dist/runtime/env.mjs +24 -10
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/isr-cache.d.mts +207 -0
- package/dist/runtime/isr-cache.mjs +523 -0
- package/dist/runtime/isr.d.mts +4 -3
- package/dist/runtime/isr.mjs +44 -5
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/sandbox.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +1 -1
- package/dist/runtime/ws.d.mts +2 -2
- package/dist/{scan-Dp_Gyzs3.mjs → scan-DEwlM_Xy.mjs} +2 -2
- package/dist/{scan-i7Yz54fv.mjs → scan-DYXkrasO.mjs} +4 -4
- package/dist/{secret-u7FRvg8d.mjs → secret-Dt32J6RI.mjs} +3 -3
- package/dist/{skills-DsdNDtX3.mjs → skills-CLjN0uUO.mjs} +2 -2
- package/dist/{subcommand-prompt-DtES-oP6.mjs → subcommand-prompt-BzV8iQZo.mjs} +1 -1
- package/dist/sveltekit.mjs +1 -1
- package/dist/{validate-DT7nFMlf.mjs → validate-Cw_RLeTj.mjs} +1 -1
- package/dist/{yarn-pnp-CW8LB6g_.mjs → yarn-pnp-DJn3SAHF.mjs} +1 -1
- package/getting-started-prompt.txt +3 -1
- package/package.json +6 -3
- package/schema.json +11 -0
- package/skills/void/SKILL.md +34 -33
- package/skills/void/docs/guide/auth.md +8 -0
- package/skills/void/docs/guide/deployment.md +1 -1
- package/skills/void/docs/guide/env-vars.md +14 -6
- package/skills/void/docs/guide/queues.md +4 -0
- package/skills/void/docs/integrations/cloudflare.md +171 -5
- package/skills/void/docs/node_modules/void/AGENT_PROMPT.md +4 -0
- package/skills/void/docs/node_modules/void/{AGENTS.md → CLAUDE.md} +14 -0
- package/skills/void/docs/node_modules/void/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@types/proper-lockfile/README.md +51 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathslash/README.md +64 -0
- package/skills/void/docs/node_modules/void/node_modules/pathslash/README.md +64 -0
- package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/CHANGELOG.md +108 -0
- package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/README.md +183 -0
- package/skills/void/docs/node_modules/void/skills/void/SKILL.md +34 -33
- package/skills/void/docs/node_modules/void/test/e2e/README.md +85 -0
- package/skills/void/docs/reference/cli.md +97 -14
- package/dist/deploy-C4PbkFyE.mjs +0 -3705
- package/dist/dotenv-D_UbC_vc.mjs +0 -173
- package/dist/env-raw-CoS20LHP.mjs +0 -32
- package/dist/env-validation-CeC2FL66.mjs +0 -163
- package/dist/pathe.M-eThtNZ-CQzLbt4c.mjs +0 -150
- package/dist/preset-CVvwCeIy.mjs +0 -208
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathe/README.md +0 -73
- package/skills/void/docs/node_modules/void/node_modules/pathe/README.md +0 -73
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { a as join } from "../dist-DaKKDf8D.mjs";
|
|
2
|
+
import { writeSync } from "node:fs";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { spawnSync } from "node:child_process";
|
|
5
|
+
//#region src/cli/env-schema-probe.ts
|
|
6
|
+
/**
|
|
7
|
+
* The self-host `void deploy --backend cloudflare` orchestrator validates the REAL
|
|
8
|
+
* build artifact (`dist/ssr/wrangler.json` `vars`) instead of predicting it. Two
|
|
9
|
+
* pieces still need project code, and BOTH run here — in an ISOLATED SUBPROCESS —
|
|
10
|
+
* because the orchestrator runs in a credential-bearing PARENT (CF Access service
|
|
11
|
+
* token / `CLOUDFLARE_API_TOKEN` in `process.env`) and must NOT evaluate arbitrary
|
|
12
|
+
* project code in-process:
|
|
13
|
+
*
|
|
14
|
+
* 1. `facts` — the env-INSENSITIVE schema facts (required-secret NAMES + the
|
|
15
|
+
* `.secret()` flags), fixed by env.ts's structure. The child ALSO resolves the
|
|
16
|
+
* Vite config here purely to read the final `{ envDir, mode }` and reject a
|
|
17
|
+
* custom `envDir` or a non-`production` build mode (v1 supports neither): the
|
|
18
|
+
* build generates the auth artifact under the project root while the worker
|
|
19
|
+
* `vars` come from the build's `envDir`, so a custom `envDir` could validate a
|
|
20
|
+
* different table set than the worker ships. Resolving the config runs the full
|
|
21
|
+
* plugin pipeline (arbitrary code, timers/`beforeExit` risk) — safe HERE in the
|
|
22
|
+
* child (which `process.exit`s), never in the credentialed parent.
|
|
23
|
+
* 2. `validate-emitted` — validate the REAL emitted worker `vars` (post-build
|
|
24
|
+
* ground truth) against the schema's Standard-Schema validators and return the
|
|
25
|
+
* FAILING key NAMES only. A required var shipped with an INVALID value (fails
|
|
26
|
+
* the validator) must fail the deploy closed before any remote mutation, not
|
|
27
|
+
* only at worker boot.
|
|
28
|
+
*
|
|
29
|
+
* Three hardening rules apply to the child:
|
|
30
|
+
* - the framed result is written to a DEDICATED file descriptor (fd 3), NOT
|
|
31
|
+
* stdout, so anything the user's code prints while evaluating can never
|
|
32
|
+
* truncate or interleave with the result;
|
|
33
|
+
* - the caller scrubs the FULL wrangler-auth credential set from the child env
|
|
34
|
+
* (neither derivation needs credentials);
|
|
35
|
+
* - the parent NEVER captures the child's stdout/stderr — they are IGNORED
|
|
36
|
+
* (fds 1 + 2), never buffered — so a leaking env.ts / validator cannot print a
|
|
37
|
+
* raw secret to the terminal or CI log, and every failure surfaces as a stable
|
|
38
|
+
* classification only.
|
|
39
|
+
*/
|
|
40
|
+
/** argv[2] sentinel that switches this module from library import to child-process entry. */
|
|
41
|
+
const PROBE_MARKER = "__void-deploy-env-schema-probe__";
|
|
42
|
+
/** The dedicated fd the child writes its framed result to (see stdio config below). */
|
|
43
|
+
const RESULT_FD = 3;
|
|
44
|
+
/**
|
|
45
|
+
* Default spawner: run THIS module as a child and read ONLY the dedicated fd-3
|
|
46
|
+
* result. stdin is ignored, stdout/stderr are IGNORED (fds 1 + 2) so a broken /
|
|
47
|
+
* leaking env.ts can never print a raw secret to the terminal or a captured CI log,
|
|
48
|
+
* and fd 3 is a pipe carrying the framed JSON result. `spawnSync`'s `output` array
|
|
49
|
+
* is indexed by fd, so `output[3]` is the result channel — isolated from stdout
|
|
50
|
+
* entirely (and unaffected by ignoring fds 1 + 2).
|
|
51
|
+
*/
|
|
52
|
+
const defaultSpawn = (command, args, options) => {
|
|
53
|
+
const result = spawnSync(command, args, {
|
|
54
|
+
cwd: options.cwd,
|
|
55
|
+
env: options.env,
|
|
56
|
+
stdio: [
|
|
57
|
+
"ignore",
|
|
58
|
+
"ignore",
|
|
59
|
+
"ignore",
|
|
60
|
+
"pipe"
|
|
61
|
+
],
|
|
62
|
+
encoding: "utf-8"
|
|
63
|
+
});
|
|
64
|
+
const fd3 = result.output?.[RESULT_FD];
|
|
65
|
+
return {
|
|
66
|
+
status: result.status,
|
|
67
|
+
fd3: typeof fd3 === "string" ? fd3 : fd3 == null ? null : String(fd3),
|
|
68
|
+
error: result.error ?? null,
|
|
69
|
+
signal: result.signal ?? null
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Spawn THIS module as a child (`node <self> <marker> <json>`) under the scrubbed
|
|
74
|
+
* `env` for one operation, and return its framed fd-3 result. The child inherits
|
|
75
|
+
* ONLY `env` (the caller scrubs the full wrangler-auth credential set), so the
|
|
76
|
+
* arbitrary project code never sees the parent's credentials. `import.meta.url` is
|
|
77
|
+
* this module's own path — a named build entry (`dist/cli/env-schema-probe.mjs`),
|
|
78
|
+
* stable in source and dist — so the child re-enters here and hits the {@link
|
|
79
|
+
* PROBE_MARKER} branch. Throws (caller fails closed) on a spawn error, a signal-kill,
|
|
80
|
+
* a nonzero exit, or a missing/unparseable result — exactly the cases where the
|
|
81
|
+
* project code itself could not be evaluated. NEVER echoes the child's
|
|
82
|
+
* stdout/stderr (never captured), so no env value the child may have printed can
|
|
83
|
+
* reach the thrown error.
|
|
84
|
+
*/
|
|
85
|
+
async function spawnEnvSchemaProbe(op, input, env, spawn) {
|
|
86
|
+
const childInput = {
|
|
87
|
+
op,
|
|
88
|
+
root: input.root
|
|
89
|
+
};
|
|
90
|
+
const self = fileURLToPath(import.meta.url);
|
|
91
|
+
const result = spawn(process.execPath, [
|
|
92
|
+
self,
|
|
93
|
+
PROBE_MARKER,
|
|
94
|
+
JSON.stringify(childInput)
|
|
95
|
+
], {
|
|
96
|
+
cwd: input.root,
|
|
97
|
+
env
|
|
98
|
+
});
|
|
99
|
+
if (result.error) throw new Error(`could not spawn the env-schema probe: ${result.error.message}`);
|
|
100
|
+
if (result.signal) throw new Error(`the env-schema probe was killed by signal ${result.signal}`);
|
|
101
|
+
if (result.status !== 0) throw new Error(`the env-schema probe exited with code ${String(result.status)}.`);
|
|
102
|
+
const parsed = parseProbeResult(result.fd3 ?? "");
|
|
103
|
+
if (!parsed) throw new Error("the env-schema probe produced no parseable result.");
|
|
104
|
+
return parsed;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* PARENT side (`facts`): return the env-insensitive schema facts + the v1 envDir/mode
|
|
108
|
+
* narrowing. Runs pre-build so a custom envDir / non-production mode / broken env.ts
|
|
109
|
+
* fails fast, before any account op.
|
|
110
|
+
*/
|
|
111
|
+
async function resolveEnvSchemaFactsViaSubprocess(input, env, spawn = defaultSpawn) {
|
|
112
|
+
const result = await spawnEnvSchemaProbe("facts", input, env, spawn);
|
|
113
|
+
if (result.kind === "invalid-keys") throw new Error("the env-schema probe returned an unexpected result for the facts operation.");
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* PARENT side (`validate-emitted`): validate the REAL emitted worker `vars` against
|
|
118
|
+
* the schema validators and return the FAILING key NAMES only. Runs post-build so
|
|
119
|
+
* the values validated are exactly what the worker ships.
|
|
120
|
+
*/
|
|
121
|
+
async function validateEmittedVarsViaSubprocess(input, env, spawn = defaultSpawn) {
|
|
122
|
+
const result = await spawnEnvSchemaProbe("validate-emitted", input, env, spawn);
|
|
123
|
+
if (result.kind === "ok" || result.kind === "reject") throw new Error("the env-schema probe returned an unexpected result for the validate-emitted operation.");
|
|
124
|
+
return result;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Parse the child's framed result from the DEDICATED fd-3 channel. The whole buffer
|
|
128
|
+
* is the JSON result (nothing else writes to fd 3), so no sentinel scan is needed —
|
|
129
|
+
* that is the truncation fix: config/env.ts stdout noise lives on a different fd and
|
|
130
|
+
* can never reach here. Returns undefined on a missing/unparseable/ill-shaped result
|
|
131
|
+
* so the caller fails closed.
|
|
132
|
+
*/
|
|
133
|
+
function parseProbeResult(fd3) {
|
|
134
|
+
const trimmed = fd3.trim();
|
|
135
|
+
if (!trimmed) return;
|
|
136
|
+
let parsed;
|
|
137
|
+
try {
|
|
138
|
+
parsed = JSON.parse(trimmed);
|
|
139
|
+
} catch {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (!parsed || typeof parsed !== "object") return;
|
|
143
|
+
const record = parsed;
|
|
144
|
+
if (record.kind === "ok" && isSchemaFacts(record.facts)) return {
|
|
145
|
+
kind: "ok",
|
|
146
|
+
facts: record.facts
|
|
147
|
+
};
|
|
148
|
+
if (record.kind === "reject" && (record.reason === "custom-envdir" || record.reason === "non-production-mode")) return {
|
|
149
|
+
kind: "reject",
|
|
150
|
+
reason: record.reason
|
|
151
|
+
};
|
|
152
|
+
if (record.kind === "invalid-keys" && Array.isArray(record.invalidKeys) && record.invalidKeys.every((k) => typeof k === "string")) return {
|
|
153
|
+
kind: "invalid-keys",
|
|
154
|
+
invalidKeys: record.invalidKeys
|
|
155
|
+
};
|
|
156
|
+
if (record.kind === "schema-error" && (record.reason === "schema-load-failed" || record.reason === "schema-validation-error")) return {
|
|
157
|
+
kind: "schema-error",
|
|
158
|
+
reason: record.reason
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/** Structural guard for the values-free facts the child returns. */
|
|
162
|
+
function isSchemaFacts(value) {
|
|
163
|
+
if (!value || typeof value !== "object") return false;
|
|
164
|
+
const f = value;
|
|
165
|
+
return typeof f.hasSchema === "boolean" && Array.isArray(f.requiredKeys) && f.requiredKeys.every((k) => typeof k === "string") && Array.isArray(f.secretKeys) && f.secretKeys.every((k) => typeof k === "string");
|
|
166
|
+
}
|
|
167
|
+
/** Write the framed result to the dedicated fd 3 (synchronous → flushed before exit). */
|
|
168
|
+
function emitResult(result) {
|
|
169
|
+
writeSync(RESULT_FD, JSON.stringify(result));
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Read the RAW (root-relative, unnormalized) envDir the build's worker-vars loader
|
|
173
|
+
* actually uses, straight from the `void:env` config hook's captured value (exposed on
|
|
174
|
+
* that plugin's `api.getVoidDeployBuildConfig`). This is the only faithful input to the
|
|
175
|
+
* build's OWN `join(root, rawEnvDir)` computation: Vite's `resolved.envDir` is already
|
|
176
|
+
* normalized (`path.resolve`), which loses the distinction an absolute-root envDir needs.
|
|
177
|
+
* Returns `undefined` when the hook is absent (a non-void config), which the caller
|
|
178
|
+
* treats as "no custom raw envDir" and falls back to Vite's normalized view.
|
|
179
|
+
*/
|
|
180
|
+
function readBuildRawEnvDir(plugins) {
|
|
181
|
+
return (plugins.find((p) => p.name === "void:env")?.api)?.getVoidDeployBuildConfig?.()?.envDir;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* CHILD side (`facts`): resolve the Vite config HERE (the FULL plugin pipeline the
|
|
185
|
+
* real `vite build` runs, under the scrubbed env — never in the parent) purely to
|
|
186
|
+
* read the effective `{ envDir, mode }` and reject a custom envDir / non-production
|
|
187
|
+
* mode; then, when accepted, import the user's env.ts and derive the env-insensitive
|
|
188
|
+
* schema facts. All heavy imports are DYNAMIC so a plain library import of this
|
|
189
|
+
* module (by the CLI, for the parent-side helper) never pulls Vite / env-validation /
|
|
190
|
+
* the user's env.ts in.
|
|
191
|
+
*/
|
|
192
|
+
async function runFactsChild(root) {
|
|
193
|
+
const { resolveConfig } = await import("vite");
|
|
194
|
+
const resolved = await resolveConfig({ root }, "build", "production", "production");
|
|
195
|
+
const rawEnvDir = readBuildRawEnvDir(resolved.plugins);
|
|
196
|
+
const buildVarsDir = rawEnvDir ? join(resolved.root, rawEnvDir) : resolved.root;
|
|
197
|
+
if (resolved.envDir === false || resolved.envDir !== resolved.root || buildVarsDir !== resolved.root) {
|
|
198
|
+
emitResult({
|
|
199
|
+
kind: "reject",
|
|
200
|
+
reason: "custom-envdir"
|
|
201
|
+
});
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (resolved.mode !== "production") {
|
|
205
|
+
emitResult({
|
|
206
|
+
kind: "reject",
|
|
207
|
+
reason: "non-production-mode"
|
|
208
|
+
});
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-BdDlGhbN.mjs").then((n) => n.c);
|
|
212
|
+
try {
|
|
213
|
+
emitResult({
|
|
214
|
+
kind: "ok",
|
|
215
|
+
facts: await deriveSelfHostSchemaFacts(root)
|
|
216
|
+
});
|
|
217
|
+
} catch (err) {
|
|
218
|
+
if (err instanceof SelfHostSchemaError) {
|
|
219
|
+
emitResult({
|
|
220
|
+
kind: "schema-error",
|
|
221
|
+
reason: err.reason
|
|
222
|
+
});
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
throw err;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* CHILD side (`validate-emitted`): read the REAL emitted worker `vars` the build
|
|
230
|
+
* baked into `dist/ssr/wrangler.json` (ground truth), validate them against the
|
|
231
|
+
* schema's validators, and emit the FAILING key NAMES only. The parent already
|
|
232
|
+
* confirmed the artifact exists, so a read failure here is a probe-infrastructure
|
|
233
|
+
* fault → fail closed as a values-free schema error.
|
|
234
|
+
*/
|
|
235
|
+
async function runValidateEmittedChild(root) {
|
|
236
|
+
const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-BdDlGhbN.mjs").then((n) => n.c);
|
|
237
|
+
const emitted = readEmittedWorkerVars(root);
|
|
238
|
+
if (!emitted.ok) {
|
|
239
|
+
emitResult({
|
|
240
|
+
kind: "schema-error",
|
|
241
|
+
reason: "schema-load-failed"
|
|
242
|
+
});
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
try {
|
|
246
|
+
emitResult({
|
|
247
|
+
kind: "invalid-keys",
|
|
248
|
+
invalidKeys: await computeInvalidEmittedKeys(root, emitted.vars)
|
|
249
|
+
});
|
|
250
|
+
} catch (err) {
|
|
251
|
+
if (err instanceof SelfHostSchemaError) {
|
|
252
|
+
emitResult({
|
|
253
|
+
kind: "schema-error",
|
|
254
|
+
reason: err.reason
|
|
255
|
+
});
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
throw err;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
/** Dispatch the child to the requested operation. */
|
|
262
|
+
async function runEnvSchemaProbeChild(rawInput) {
|
|
263
|
+
const input = JSON.parse(rawInput);
|
|
264
|
+
if (input.op === "validate-emitted") {
|
|
265
|
+
await runValidateEmittedChild(input.root);
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
await runFactsChild(input.root);
|
|
269
|
+
}
|
|
270
|
+
if (process.argv[2] === PROBE_MARKER) runEnvSchemaProbeChild(process.argv[3] ?? "null").then(() => process.exit(0), () => process.exit(1));
|
|
271
|
+
//#endregion
|
|
272
|
+
export { resolveEnvSchemaFactsViaSubprocess, validateEmittedVarsViaSubprocess };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-DJK8HYOj.mjs";
|
|
2
|
-
import { a as join, n as dirname } from "./
|
|
3
|
-
import { r as getPackageDir, u as import_picocolors } from "./agents-
|
|
2
|
+
import { a as join, n as dirname } from "./dist-DaKKDf8D.mjs";
|
|
3
|
+
import { r as getPackageDir, u as import_picocolors } from "./agents-CtgBYqld.mjs";
|
|
4
4
|
import { t as cfAccessHeaders } from "./cf-access-Bqw81xAf.mjs";
|
|
5
5
|
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { createHash, randomBytes } from "node:crypto";
|
|
@@ -905,6 +905,16 @@ var PlatformClient = class {
|
|
|
905
905
|
if (!res.ok) await throwPlatformApiError("Failed to fetch logs", res);
|
|
906
906
|
return (await res.json()).data;
|
|
907
907
|
}
|
|
908
|
+
async getRequests(projectId, since, limit = 200, status) {
|
|
909
|
+
const params = new URLSearchParams({
|
|
910
|
+
since,
|
|
911
|
+
limit: String(limit)
|
|
912
|
+
});
|
|
913
|
+
if (status && status !== "all") params.set("status", status);
|
|
914
|
+
const res = await fetch(`${this.baseUrl}/projects/${projectId}/requests?${params}`, { headers: { ...this.authHeaders } });
|
|
915
|
+
if (!res.ok) await throwPlatformApiError("Failed to fetch requests", res);
|
|
916
|
+
return (await res.json()).data;
|
|
917
|
+
}
|
|
908
918
|
async listBuilds(projectId, limit = 20) {
|
|
909
919
|
const params = new URLSearchParams({ limit: String(limit) });
|
|
910
920
|
const res = await fetch(`${this.baseUrl}/projects/${projectId}/builds?${params}`, { headers: { ...this.authHeaders } });
|
|
@@ -975,6 +985,14 @@ var PlatformClient = class {
|
|
|
975
985
|
if (!res.ok) await throwPlatformApiError("Failed to update GitHub connection", res);
|
|
976
986
|
return res.json();
|
|
977
987
|
}
|
|
988
|
+
async deleteGithubConnection(projectId) {
|
|
989
|
+
const res = await fetch(`${this.baseUrl}/projects/${projectId}/github`, {
|
|
990
|
+
method: "DELETE",
|
|
991
|
+
headers: { ...this.authHeaders }
|
|
992
|
+
});
|
|
993
|
+
if (!res.ok) await throwPlatformApiError("Failed to disconnect GitHub repository", res);
|
|
994
|
+
return res.json();
|
|
995
|
+
}
|
|
978
996
|
async getGithubLinkUrl(redirect, codeChallenge) {
|
|
979
997
|
const params = new URLSearchParams({
|
|
980
998
|
redirect,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-DJK8HYOj.mjs";
|
|
2
|
-
import { a as join, s as relative } from "./
|
|
3
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
4
|
-
import { r as schemaSpecifier, t as discoverSchema } from "./discover-
|
|
2
|
+
import { a as join, s as relative } from "./dist-DaKKDf8D.mjs";
|
|
3
|
+
import { n as readProjectPaths } from "./project-paths-BQd7OmIo.mjs";
|
|
4
|
+
import { r as schemaSpecifier, t as discoverSchema } from "./discover-CJHyvYfR.mjs";
|
|
5
5
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
6
6
|
//#region src/drizzle/config.ts
|
|
7
7
|
var config_exports = /* @__PURE__ */ __exportAll({ writeDrizzleConfig: () => writeDrizzleConfig });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-DJK8HYOj.mjs";
|
|
2
|
-
import { a as join } from "./
|
|
3
|
-
import { a as validateSourceDir } from "./project-paths-
|
|
2
|
+
import { a as join } from "./dist-DaKKDf8D.mjs";
|
|
3
|
+
import { a as validateSourceDir } from "./project-paths-BQd7OmIo.mjs";
|
|
4
4
|
import { i as isVoidAuthProvider, t as VOID_AUTH_PROVIDERS } from "./providers-CJlNS3kT.mjs";
|
|
5
5
|
import { readFileSync } from "node:fs";
|
|
6
6
|
//#region src/config.ts
|
|
@@ -430,6 +430,12 @@ function readConfig(root) {
|
|
|
430
430
|
if (obj.database !== void 0) {
|
|
431
431
|
if (typeof obj.database !== "string" || !VALID_DATABASE_VALUES.has(obj.database)) throw new Error(`config: "database" in ${CONFIG_FILE} must be "pg".`);
|
|
432
432
|
}
|
|
433
|
+
if (obj.ai !== void 0) {
|
|
434
|
+
if (typeof obj.ai !== "object" || obj.ai === null || Array.isArray(obj.ai)) throw new Error(`config: "ai" in ${CONFIG_FILE} must be an object.`);
|
|
435
|
+
const aiCfg = obj.ai;
|
|
436
|
+
for (const key of Object.keys(aiCfg)) if (key !== "gateway") throw new Error(`config: Unknown key 'ai.${key}' in ${CONFIG_FILE}. Valid: gateway.`);
|
|
437
|
+
if (aiCfg.gateway !== void 0 && (typeof aiCfg.gateway !== "string" || aiCfg.gateway.length === 0)) throw new Error(`config: "ai.gateway" in ${CONFIG_FILE} must be a non-empty string.`);
|
|
438
|
+
}
|
|
433
439
|
return obj;
|
|
434
440
|
}
|
|
435
441
|
/** Returns true if the target is a non-Cloudflare runtime (Node.js, Bun, Deno). */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-DJK8HYOj.mjs";
|
|
2
|
-
import { A as text, S as confirm, T as log, j as isCancel, k as select, u as import_picocolors, x as cancel } from "./agents-
|
|
3
|
-
import { S as writeProjectConfig, d as getSiteDomain, t as PlatformApiError } from "./client-
|
|
4
|
-
import { n as inferDefaultSlug } from "./resolve-project-
|
|
2
|
+
import { A as text, S as confirm, T as log, j as isCancel, k as select, u as import_picocolors, x as cancel } from "./agents-CtgBYqld.mjs";
|
|
3
|
+
import { S as writeProjectConfig, d as getSiteDomain, t as PlatformApiError } from "./client-Gb71-XkG.mjs";
|
|
4
|
+
import { n as inferDefaultSlug } from "./resolve-project-BBMtLLV9.mjs";
|
|
5
5
|
//#region src/cli/project-slug.ts
|
|
6
6
|
var project_slug_exports = /* @__PURE__ */ __exportAll({ validateProjectSlug: () => validateProjectSlug });
|
|
7
7
|
function validateProjectSlug(value) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { a as join, c as resolve, r as extname, s as relative } from "./
|
|
2
|
-
import { D as outro, S as confirm, T as log, a as cliTitle, j as isCancel, s as dim, u as import_picocolors, w as intro } from "./agents-
|
|
3
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
1
|
+
import { a as join, c as resolve, r as extname, s as relative } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { D as outro, S as confirm, T as log, a as cliTitle, j as isCancel, s as dim, u as import_picocolors, w as intro } from "./agents-CtgBYqld.mjs";
|
|
3
|
+
import { n as readProjectPaths } from "./project-paths-BQd7OmIo.mjs";
|
|
4
4
|
import { t as cfAccessHeaders } from "./cf-access-Bqw81xAf.mjs";
|
|
5
|
-
import { b as readProjectConfig, f as getToken, m as isStagingMode, n as PlatformClient, t as PlatformApiError } from "./client-
|
|
6
|
-
import { c as getDatabaseDialect, f as readConfig, p as resolveBindingNames } from "./config-
|
|
7
|
-
import { r as detectFramework } from "./plugin-inference-
|
|
8
|
-
import { c as collectMigrations, d as stripSqlExt, f as writeJournal, n as listDrizzleArtifacts, r as validateMigrations, t as assertJournalCoherence, u as readJournal } from "./validate-
|
|
5
|
+
import { b as readProjectConfig, f as getToken, m as isStagingMode, n as PlatformClient, t as PlatformApiError } from "./client-Gb71-XkG.mjs";
|
|
6
|
+
import { c as getDatabaseDialect, f as readConfig, p as resolveBindingNames } from "./config-E03l1C_h.mjs";
|
|
7
|
+
import { r as detectFramework } from "./plugin-inference-DMeavIJ6.mjs";
|
|
8
|
+
import { c as collectMigrations, d as stripSqlExt, f as writeJournal, n as listDrizzleArtifacts, r as validateMigrations, t as assertJournalCoherence, u as readJournal } from "./validate-Cw_RLeTj.mjs";
|
|
9
9
|
import { n as STAGING_PROXY_URL, t as DEFAULT_PROXY_URL } from "./proxy-D-3_D-Gl.mjs";
|
|
10
|
-
import { formatTimestamp } from "./gen-
|
|
10
|
+
import { formatTimestamp } from "./gen-oup1xBN0.mjs";
|
|
11
11
|
import { existsSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
13
13
|
import { execFileSync } from "node:child_process";
|
|
@@ -96,13 +96,13 @@ async function runDbCommand(root, args) {
|
|
|
96
96
|
else await runExport(root, args, dialect);
|
|
97
97
|
}
|
|
98
98
|
async function runPush(root, dialect) {
|
|
99
|
-
const { writeDrizzleConfig } = await import("./config-
|
|
99
|
+
const { writeDrizzleConfig } = await import("./config-CutEMNGJ.mjs").then((n) => n.t);
|
|
100
100
|
let configPath;
|
|
101
101
|
if (dialect === "postgresql") configPath = writeDrizzleConfig(root, getPgUrl(root), "postgresql");
|
|
102
102
|
else {
|
|
103
103
|
const { mkdirSync } = await import("node:fs");
|
|
104
104
|
const { dirname } = await import("node:path");
|
|
105
|
-
const { getMiniflareDatabasePath } = await import("./runner-
|
|
105
|
+
const { getMiniflareDatabasePath } = await import("./runner-kapo9aPs.mjs");
|
|
106
106
|
const dbPath = getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local");
|
|
107
107
|
mkdirSync(dirname(dbPath), { recursive: true });
|
|
108
108
|
configPath = writeDrizzleConfig(root, dbPath);
|
|
@@ -119,7 +119,7 @@ async function runPush(root, dialect) {
|
|
|
119
119
|
outro("Done.");
|
|
120
120
|
}
|
|
121
121
|
async function runGenerate(root, dialect) {
|
|
122
|
-
const { writeDrizzleConfig } = await import("./config-
|
|
122
|
+
const { writeDrizzleConfig } = await import("./config-CutEMNGJ.mjs").then((n) => n.t);
|
|
123
123
|
const configPath = dialect === "postgresql" ? writeDrizzleConfig(root, "postgresql://dummy", "postgresql") : writeDrizzleConfig(root, ":memory:");
|
|
124
124
|
try {
|
|
125
125
|
runDrizzleKit(root, [
|
|
@@ -160,7 +160,7 @@ async function runStatus(root, dialect) {
|
|
|
160
160
|
localApplied = [];
|
|
161
161
|
}
|
|
162
162
|
else {
|
|
163
|
-
const { getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-
|
|
163
|
+
const { getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-kapo9aPs.mjs");
|
|
164
164
|
localApplied = await getAppliedMigrations(getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local"));
|
|
165
165
|
}
|
|
166
166
|
const localSet = new Set(localApplied.map((m) => m.name));
|
|
@@ -218,7 +218,7 @@ async function resetDatabase(root, dialect) {
|
|
|
218
218
|
});
|
|
219
219
|
return migrations.length;
|
|
220
220
|
}
|
|
221
|
-
const { getMiniflareDatabasePath, runMigrations } = await import("./runner-
|
|
221
|
+
const { getMiniflareDatabasePath, runMigrations } = await import("./runner-kapo9aPs.mjs");
|
|
222
222
|
const dbPath = getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local");
|
|
223
223
|
rmSync(dbPath, { force: true });
|
|
224
224
|
rmSync(dbPath + "-wal", { force: true });
|
|
@@ -245,7 +245,7 @@ async function runSeed(root, file, dialect) {
|
|
|
245
245
|
outro("Done.");
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
248
|
-
const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-
|
|
248
|
+
const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-kapo9aPs.mjs");
|
|
249
249
|
const db = await openSqliteDatabase(getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local"));
|
|
250
250
|
try {
|
|
251
251
|
db.exec(sql);
|
|
@@ -408,7 +408,7 @@ async function runExecute(root, command, file, dialect, remote) {
|
|
|
408
408
|
outro("Done.");
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
|
-
const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-
|
|
411
|
+
const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-kapo9aPs.mjs");
|
|
412
412
|
const dbPath = getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local");
|
|
413
413
|
if (!existsSync(dbPath)) {
|
|
414
414
|
log.error("No local database found. Run `void dev` first.");
|
|
@@ -511,7 +511,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
511
511
|
return;
|
|
512
512
|
}
|
|
513
513
|
if (dialect === "postgresql") {
|
|
514
|
-
const { applyPgMigrations } = await import("./runner-pg-
|
|
514
|
+
const { applyPgMigrations } = await import("./runner-pg-CHM76xuC.mjs");
|
|
515
515
|
const applied = await withPgClient(root, async (client) => {
|
|
516
516
|
let existingRows = [];
|
|
517
517
|
try {
|
|
@@ -535,7 +535,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
535
535
|
outro("Done.");
|
|
536
536
|
return;
|
|
537
537
|
}
|
|
538
|
-
const { getMiniflareDatabasePath, getAppliedMigrations, runMigrations } = await import("./runner-
|
|
538
|
+
const { getMiniflareDatabasePath, getAppliedMigrations, runMigrations } = await import("./runner-kapo9aPs.mjs");
|
|
539
539
|
const dbPath = getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local");
|
|
540
540
|
try {
|
|
541
541
|
const existingRows = await getAppliedMigrations(dbPath);
|
|
@@ -570,7 +570,7 @@ async function runStudio(root, dialect, remote) {
|
|
|
570
570
|
process.exit(1);
|
|
571
571
|
}
|
|
572
572
|
const dbUrl = await fetchRemoteDatabaseUrl(new PlatformClient(token, { root }), projectConfig.projectId);
|
|
573
|
-
const { writeDrizzleConfig } = await import("./config-
|
|
573
|
+
const { writeDrizzleConfig } = await import("./config-CutEMNGJ.mjs").then((n) => n.t);
|
|
574
574
|
const configPath = writeDrizzleConfig(root, dbUrl, "postgresql");
|
|
575
575
|
log.info("Opening Drizzle Studio (remote)...");
|
|
576
576
|
try {
|
|
@@ -585,7 +585,7 @@ async function runStudio(root, dialect, remote) {
|
|
|
585
585
|
return;
|
|
586
586
|
}
|
|
587
587
|
if (dialect === "postgresql") {
|
|
588
|
-
const { writeDrizzleConfig } = await import("./config-
|
|
588
|
+
const { writeDrizzleConfig } = await import("./config-CutEMNGJ.mjs").then((n) => n.t);
|
|
589
589
|
const configPath = writeDrizzleConfig(root, getPgUrl(root), "postgresql");
|
|
590
590
|
log.info("Opening Drizzle Studio...");
|
|
591
591
|
try {
|
|
@@ -599,8 +599,8 @@ async function runStudio(root, dialect, remote) {
|
|
|
599
599
|
}
|
|
600
600
|
return;
|
|
601
601
|
}
|
|
602
|
-
const { writeDrizzleConfig } = await import("./config-
|
|
603
|
-
const { getMiniflareDatabasePath } = await import("./runner-
|
|
602
|
+
const { writeDrizzleConfig } = await import("./config-CutEMNGJ.mjs").then((n) => n.t);
|
|
603
|
+
const { getMiniflareDatabasePath } = await import("./runner-kapo9aPs.mjs");
|
|
604
604
|
const dbPath = getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local");
|
|
605
605
|
if (!existsSync(dbPath)) {
|
|
606
606
|
log.error("No local database found. Run `void dev` first.");
|
|
@@ -820,7 +820,7 @@ async function runRenameMigrations(root, dialect) {
|
|
|
820
820
|
process.exit(1);
|
|
821
821
|
}
|
|
822
822
|
else {
|
|
823
|
-
const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-
|
|
823
|
+
const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-kapo9aPs.mjs");
|
|
824
824
|
const dbPath = getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local");
|
|
825
825
|
if (existsSync(dbPath)) try {
|
|
826
826
|
const db = await openSqliteDatabase(dbPath);
|
|
@@ -899,7 +899,7 @@ async function runExport(root, args, dialect) {
|
|
|
899
899
|
} else process.stdout.write(output);
|
|
900
900
|
return;
|
|
901
901
|
}
|
|
902
|
-
const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-
|
|
902
|
+
const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-kapo9aPs.mjs");
|
|
903
903
|
const dbPath = getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local");
|
|
904
904
|
if (!existsSync(dbPath)) {
|
|
905
905
|
log.error("No local database found. Run `void dev` first.", errOut);
|
|
@@ -947,7 +947,7 @@ async function runExport(root, args, dialect) {
|
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
949
|
async function runSetUrl(root) {
|
|
950
|
-
const { readConfig: readVoidConfig, getDatabaseDialect: getDialect } = await import("./config-
|
|
950
|
+
const { readConfig: readVoidConfig, getDatabaseDialect: getDialect } = await import("./config-E03l1C_h.mjs").then((n) => n.n);
|
|
951
951
|
if (getDialect(readVoidConfig(root)) !== "postgresql") {
|
|
952
952
|
log.error("db: This command is only for PostgreSQL projects. Set \"database\": \"pg\" in void.json.");
|
|
953
953
|
process.exit(1);
|
|
@@ -962,7 +962,7 @@ async function runSetUrl(root) {
|
|
|
962
962
|
log.error("No project linked. Run `void deploy` first or link a project.");
|
|
963
963
|
process.exit(1);
|
|
964
964
|
}
|
|
965
|
-
const { text: promptText, isCancel: isCancelCheck } = await import("./agents-
|
|
965
|
+
const { text: promptText, isCancel: isCancelCheck } = await import("./agents-CtgBYqld.mjs").then((n) => n.C);
|
|
966
966
|
const connectionString = await promptText({
|
|
967
967
|
message: "Enter your PostgreSQL connection string:",
|
|
968
968
|
placeholder: "postgresql://user:pass@host:5432/dbname",
|
|
@@ -1028,7 +1028,7 @@ async function runSeedModule(root, seedPath, dialect) {
|
|
|
1028
1028
|
return;
|
|
1029
1029
|
}
|
|
1030
1030
|
const { drizzle } = await import("drizzle-orm/better-sqlite3");
|
|
1031
|
-
const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-
|
|
1031
|
+
const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-kapo9aPs.mjs");
|
|
1032
1032
|
const sqlite = await openSqliteDatabase(getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local"));
|
|
1033
1033
|
try {
|
|
1034
1034
|
const options = getDrizzleSchemaOptions(schema);
|
|
@@ -1048,7 +1048,7 @@ async function loadSeedFunction(seedPath) {
|
|
|
1048
1048
|
return seed;
|
|
1049
1049
|
}
|
|
1050
1050
|
async function loadSeedSchema(root) {
|
|
1051
|
-
const { discoverSchema } = await import("./discover-
|
|
1051
|
+
const { discoverSchema } = await import("./discover-CJHyvYfR.mjs").then((n) => n.n);
|
|
1052
1052
|
const location = discoverSchema(root, readProjectPaths(root));
|
|
1053
1053
|
if (!location) return {};
|
|
1054
1054
|
if (location.type === "file") {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as text, D as outro, E as note, T as log, a as cliTitle, j as isCancel, o as createSpinner, w as intro, x as cancel } from "./agents-
|
|
2
|
-
import { b as readProjectConfig, f as getToken, n as PlatformClient, x as removeProjectConfig } from "./client-
|
|
3
|
-
import { r as resolveProjectBySlug } from "./resolve-project-
|
|
1
|
+
import { A as text, D as outro, E as note, T as log, a as cliTitle, j as isCancel, o as createSpinner, w as intro, x as cancel } from "./agents-CtgBYqld.mjs";
|
|
2
|
+
import { b as readProjectConfig, f as getToken, n as PlatformClient, x as removeProjectConfig } from "./client-Gb71-XkG.mjs";
|
|
3
|
+
import { r as resolveProjectBySlug } from "./resolve-project-BBMtLLV9.mjs";
|
|
4
4
|
//#region src/cli/delete.ts
|
|
5
5
|
async function runDeleteCommand(root, slug, options) {
|
|
6
6
|
console.log();
|