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,539 @@
|
|
|
1
|
+
import { a as join, c as resolve, n as dirname } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-BQd7OmIo.mjs";
|
|
3
|
+
import { i as hasSsrEntry } from "./entry-D7yy4xVH.mjs";
|
|
4
|
+
import { i as readPackageJson, n as hasPackageDependency, t as getPackageDependencies } from "./package-json-Cx1osYo6.mjs";
|
|
5
|
+
import { createRequire } from "node:module";
|
|
6
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
|
+
//#region src/shared/dotenv.ts
|
|
9
|
+
/**
|
|
10
|
+
* Shared dotenv parser + variable expander used by every CLI path that reads
|
|
11
|
+
* `.env*` files (`void env check`, `void deploy`, `void init` scaffold
|
|
12
|
+
* inference). A single source of truth avoids the drift we hit when two
|
|
13
|
+
* hand-rolled parsers diverged on quoting / expansion semantics.
|
|
14
|
+
*
|
|
15
|
+
* Expansion supports `${VAR}` and `$VAR`, a `\$VAR` literal-escape, and
|
|
16
|
+
* transitive references across earlier entries in the same record. Cycles
|
|
17
|
+
* are detected and fall through to the raw literal rather than looping.
|
|
18
|
+
*
|
|
19
|
+
* Security note: expansion is deliberately scoped to the in-file record.
|
|
20
|
+
* We do NOT consult `process.env` the way `dotenv-expand` does — a shell
|
|
21
|
+
* env leaking into an `.env.example` via expansion would silently reveal
|
|
22
|
+
* developer machine state in committed output, and `void env check` /
|
|
23
|
+
* `void deploy` would then pass with values that aren't present in CI.
|
|
24
|
+
*
|
|
25
|
+
* The runtime path (Vite's own `loadEnv`) DOES consult `process.env` for
|
|
26
|
+
* expansion. That's a deliberate Vite choice; `filterLoadedEnv` strips
|
|
27
|
+
* shell pollution from the final worker vars so the two sides agree on
|
|
28
|
+
* the observable surface even when expansion sources differ.
|
|
29
|
+
*
|
|
30
|
+
* This module is a leaf — it must not import from `../log` or any non-leaf
|
|
31
|
+
* module so that the prerender subprocess's worker bundle doesn't pick up
|
|
32
|
+
* unwanted transitive dependencies. Warnings are surfaced through the
|
|
33
|
+
* `onWarn` callback and left for the caller to route.
|
|
34
|
+
*/
|
|
35
|
+
/** Valid dotenv key — ASCII letter/underscore followed by letters/digits/underscore. */
|
|
36
|
+
const VALID_KEY = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
37
|
+
/**
|
|
38
|
+
* Parse a single `KEY=VALUE` line into `{ key, value }`, stripping matching
|
|
39
|
+
* single/double quotes around the value. Returns `null` for blanks, comments,
|
|
40
|
+
* and non-assignment lines.
|
|
41
|
+
*/
|
|
42
|
+
function parseDotenvLine(line) {
|
|
43
|
+
const trimmed = line.trim();
|
|
44
|
+
if (!trimmed || trimmed.startsWith("#")) return null;
|
|
45
|
+
const equalsIndex = trimmed.indexOf("=");
|
|
46
|
+
if (equalsIndex === -1) return null;
|
|
47
|
+
const key = trimmed.slice(0, equalsIndex).trim();
|
|
48
|
+
let value = trimmed.slice(equalsIndex + 1).trim();
|
|
49
|
+
if (value.startsWith("\"") && value.endsWith("\"") || value.startsWith("'") && value.endsWith("'")) value = value.slice(1, -1);
|
|
50
|
+
return {
|
|
51
|
+
key,
|
|
52
|
+
value
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Parse the raw contents of a dotenv file into a record, optionally
|
|
57
|
+
* expanding `${VAR}` / `$VAR` references against earlier entries.
|
|
58
|
+
*/
|
|
59
|
+
function parseDotenv(content, options = {}) {
|
|
60
|
+
const { expand: shouldExpand = true, skipInvalidKeys = true, onWarn } = options;
|
|
61
|
+
const env = {};
|
|
62
|
+
for (const line of content.split("\n")) {
|
|
63
|
+
const parsed = parseDotenvLine(line);
|
|
64
|
+
if (!parsed) continue;
|
|
65
|
+
if (!VALID_KEY.test(parsed.key)) {
|
|
66
|
+
if (skipInvalidKeys) continue;
|
|
67
|
+
throw new Error(`dotenv: Invalid key '${parsed.key}'.`);
|
|
68
|
+
}
|
|
69
|
+
env[parsed.key] = parsed.value;
|
|
70
|
+
}
|
|
71
|
+
return shouldExpand ? expandDotenv(env, { onWarn }) : env;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Read and parse a dotenv file. Returns `{}` when the file is missing so
|
|
75
|
+
* callers can treat "no file" and "empty file" identically.
|
|
76
|
+
*/
|
|
77
|
+
function parseDotenvFile(filePath, options = {}) {
|
|
78
|
+
if (!existsSync(filePath)) return {};
|
|
79
|
+
return parseDotenv(readFileSync(filePath, "utf-8"), options);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Expand `${VAR}` / `$VAR` references in every value of a record against
|
|
83
|
+
* the other entries in that same record. Matches the surface of
|
|
84
|
+
* `dotenv-expand` minus the `process.env` fallback.
|
|
85
|
+
*
|
|
86
|
+
* Semantics:
|
|
87
|
+
* - `${VAR}` and `$VAR` both resolve (bare form stops at the first
|
|
88
|
+
* non-identifier character).
|
|
89
|
+
* - `\$VAR` stays literal; the backslash is consumed.
|
|
90
|
+
* - Nested refs resolve transitively — `A=${B}`, `B=${C}`, `C=v` → `A=v`.
|
|
91
|
+
* - Cycles are detected; the offending value keeps its raw literal and
|
|
92
|
+
* `onWarn` fires once per cycle seen.
|
|
93
|
+
* - Missing refs expand to the empty string, matching dotenv-expand.
|
|
94
|
+
*
|
|
95
|
+
* The input record is not mutated; a fresh object is returned.
|
|
96
|
+
*/
|
|
97
|
+
function expandDotenv(input, options = {}) {
|
|
98
|
+
const out = {};
|
|
99
|
+
const resolving = /* @__PURE__ */ new Set();
|
|
100
|
+
const warned = /* @__PURE__ */ new Set();
|
|
101
|
+
function resolveKey(key) {
|
|
102
|
+
if (!(key in input)) return "";
|
|
103
|
+
if (key in out) return out[key];
|
|
104
|
+
if (resolving.has(key)) {
|
|
105
|
+
if (!warned.has(key) && options.onWarn) {
|
|
106
|
+
warned.add(key);
|
|
107
|
+
options.onWarn(`dotenv expansion cycle detected at "${key}" — leaving raw value in place`);
|
|
108
|
+
}
|
|
109
|
+
return input[key];
|
|
110
|
+
}
|
|
111
|
+
resolving.add(key);
|
|
112
|
+
const expanded = expandValue(input[key], resolveKey);
|
|
113
|
+
resolving.delete(key);
|
|
114
|
+
out[key] = expanded;
|
|
115
|
+
return expanded;
|
|
116
|
+
}
|
|
117
|
+
for (const key of Object.keys(input)) resolveKey(key);
|
|
118
|
+
return out;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Expand a single value string. `resolve` returns the fully-expanded value
|
|
122
|
+
* for a referenced key (or `''` when missing). Backslash-escapes (`\$VAR`,
|
|
123
|
+
* `\${VAR}`) keep the `$...` literal and consume the backslash.
|
|
124
|
+
*/
|
|
125
|
+
function expandValue(value, resolve) {
|
|
126
|
+
let result = "";
|
|
127
|
+
let cursor = 0;
|
|
128
|
+
while (cursor < value.length) {
|
|
129
|
+
const character = value[cursor];
|
|
130
|
+
if (character === "\\" && cursor + 1 < value.length && value[cursor + 1] === "$") {
|
|
131
|
+
result += "$";
|
|
132
|
+
cursor += 2;
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
if (character !== "$") {
|
|
136
|
+
result += character;
|
|
137
|
+
cursor++;
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
const next = value[cursor + 1];
|
|
141
|
+
if (next === "{") {
|
|
142
|
+
const endIndex = value.indexOf("}", cursor + 2);
|
|
143
|
+
if (endIndex === -1) {
|
|
144
|
+
result += character;
|
|
145
|
+
cursor++;
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
const key = value.slice(cursor + 2, endIndex);
|
|
149
|
+
if (VALID_KEY.test(key)) result += resolve(key);
|
|
150
|
+
else result += value.slice(cursor, endIndex + 1);
|
|
151
|
+
cursor = endIndex + 1;
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
if (next && /[A-Za-z_]/.test(next)) {
|
|
155
|
+
let keyEndIndex = cursor + 1;
|
|
156
|
+
while (keyEndIndex < value.length && /[A-Za-z0-9_]/.test(value[keyEndIndex])) keyEndIndex++;
|
|
157
|
+
const key = value.slice(cursor + 1, keyEndIndex);
|
|
158
|
+
result += resolve(key);
|
|
159
|
+
cursor = keyEndIndex;
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
result += character;
|
|
163
|
+
cursor++;
|
|
164
|
+
}
|
|
165
|
+
return result;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Merge multiple parsed dotenv records with later-entries-win semantics,
|
|
169
|
+
* then expand across the combined set. This is the recommended path for
|
|
170
|
+
* callers reading multiple `.env*` files (Vite-style precedence), since
|
|
171
|
+
* expansion sees every earlier file's keys at once.
|
|
172
|
+
*/
|
|
173
|
+
function mergeAndExpand(records, options = {}) {
|
|
174
|
+
const merged = {};
|
|
175
|
+
for (const record of records) Object.assign(merged, record);
|
|
176
|
+
return expandDotenv(merged, options);
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Wrangler 4.107's bundled `dotenv` LINE regex (verbatim), used ONLY to detect the
|
|
180
|
+
* declared KEYS wrangler would load — including the OPTIONAL `export ` prefix, the `KEY: val`
|
|
181
|
+
* form, and single/double/backtick quoting — so a transport-redirect / config-override fence
|
|
182
|
+
* sees exactly what wrangler's per-command dotenv reload would. We read keys, never values.
|
|
183
|
+
*/
|
|
184
|
+
const WRANGLER_DOTENV_LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
|
|
185
|
+
/**
|
|
186
|
+
* The set of declared dotenv KEYS in `filePath`, parsed the way wrangler does.
|
|
187
|
+
* Lives in this leaf module (no `proper-lockfile` / lifecycle side effects) so both
|
|
188
|
+
* the provisioner's transport fence and the deploy orchestrator's config-override
|
|
189
|
+
* fence can read keys exactly as wrangler's per-command reload would, without either
|
|
190
|
+
* caller pulling in the provision lifecycle just to parse dotenv keys.
|
|
191
|
+
*/
|
|
192
|
+
function scanWranglerDotenvKeys(filePath) {
|
|
193
|
+
const keys = /* @__PURE__ */ new Set();
|
|
194
|
+
if (!existsSync(filePath)) return keys;
|
|
195
|
+
const content = readFileSync(filePath, "utf-8");
|
|
196
|
+
WRANGLER_DOTENV_LINE.lastIndex = 0;
|
|
197
|
+
let match;
|
|
198
|
+
while ((match = WRANGLER_DOTENV_LINE.exec(content)) !== null) {
|
|
199
|
+
if (match[1]) keys.add(match[1]);
|
|
200
|
+
if (match.index === WRANGLER_DOTENV_LINE.lastIndex) WRANGLER_DOTENV_LINE.lastIndex++;
|
|
201
|
+
}
|
|
202
|
+
return keys;
|
|
203
|
+
}
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region src/cli/preset.ts
|
|
206
|
+
/**
|
|
207
|
+
* Known output conventions for SSGs.
|
|
208
|
+
* Keyed by the SSG name — detection iterates in insertion order.
|
|
209
|
+
*/
|
|
210
|
+
const SSG_PRESETS = {
|
|
211
|
+
vitepress: {
|
|
212
|
+
dep: "vitepress",
|
|
213
|
+
buildCommand: "vitepress build",
|
|
214
|
+
outputDir: ".vitepress/dist",
|
|
215
|
+
appType: "static",
|
|
216
|
+
resolve(root) {
|
|
217
|
+
if (existsSync(join(root, "docs/.vitepress"))) return {
|
|
218
|
+
buildCommand: "vitepress build docs",
|
|
219
|
+
outputDir: "docs/.vitepress/dist"
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
docusaurus: {
|
|
224
|
+
dep: "@docusaurus/core",
|
|
225
|
+
buildCommand: "docusaurus build",
|
|
226
|
+
outputDir: "build",
|
|
227
|
+
appType: "static"
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* Known output conventions for meta-frameworks.
|
|
232
|
+
* Keyed by the framework name from `detectFramework()`.
|
|
233
|
+
*
|
|
234
|
+
* Class A frameworks (tanstack-start, react-router, vinext) use the project's
|
|
235
|
+
* Vite-compatible build command (`vite build` or `vp build`) and have their
|
|
236
|
+
* output structure determined by the framework's Vite plugin.
|
|
237
|
+
*
|
|
238
|
+
* Class B/C frameworks (sveltekit, nuxt, analog, astro) use their own build CLI
|
|
239
|
+
* and have framework-specific output conventions.
|
|
240
|
+
*/
|
|
241
|
+
const FRAMEWORK_PRESETS = {
|
|
242
|
+
"tanstack-start": {
|
|
243
|
+
buildCommand: "vite build",
|
|
244
|
+
workerDir: "dist/server",
|
|
245
|
+
workerMain: "index.js",
|
|
246
|
+
assetsDir: "dist/client"
|
|
247
|
+
},
|
|
248
|
+
"react-router": {
|
|
249
|
+
buildCommand: "vite build",
|
|
250
|
+
workerDir: "build/server",
|
|
251
|
+
workerMain: "index.js",
|
|
252
|
+
assetsDir: "build/client"
|
|
253
|
+
},
|
|
254
|
+
"vinext-app": {
|
|
255
|
+
buildCommand: "vite build",
|
|
256
|
+
workerDir: "dist/rsc",
|
|
257
|
+
workerMain: "index.js",
|
|
258
|
+
assetsDir: "dist/client"
|
|
259
|
+
},
|
|
260
|
+
"vinext-pages": {
|
|
261
|
+
buildCommand: "vite build",
|
|
262
|
+
workerDir: "dist/ssr",
|
|
263
|
+
workerMain: "index.js",
|
|
264
|
+
assetsDir: "dist/client"
|
|
265
|
+
},
|
|
266
|
+
sveltekit: {
|
|
267
|
+
buildCommand: "vite build",
|
|
268
|
+
workerDir: ".svelte-kit/cloudflare",
|
|
269
|
+
workerMain: "_worker.js",
|
|
270
|
+
assetsDir: ".svelte-kit/cloudflare",
|
|
271
|
+
hashedAssetsPrefix: "_app/immutable",
|
|
272
|
+
bundle: true
|
|
273
|
+
},
|
|
274
|
+
nuxt: {
|
|
275
|
+
buildCommand: "nuxt build",
|
|
276
|
+
workerDir: ".output/server",
|
|
277
|
+
workerMain: "index.mjs",
|
|
278
|
+
assetsDir: ".output/public",
|
|
279
|
+
hashedAssetsPrefix: "_nuxt"
|
|
280
|
+
},
|
|
281
|
+
analog: {
|
|
282
|
+
buildCommand: "vite build",
|
|
283
|
+
workerDir: "dist/analog/server",
|
|
284
|
+
workerMain: "index.mjs",
|
|
285
|
+
assetsDir: "dist/analog/public",
|
|
286
|
+
hashedAssetsPrefix: "assets"
|
|
287
|
+
},
|
|
288
|
+
astro: {
|
|
289
|
+
buildCommand: "astro build",
|
|
290
|
+
workerDir: "dist/server",
|
|
291
|
+
workerMain: "entry.mjs",
|
|
292
|
+
assetsDir: "dist/client",
|
|
293
|
+
hashedAssetsPrefix: "_astro"
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
/**
|
|
297
|
+
* Resolve a project-local command, rewriting `vite` to `vp` when the project
|
|
298
|
+
* depends on Vite+ and preferring node_modules/.bin when available.
|
|
299
|
+
*/
|
|
300
|
+
function resolveProjectCommand(root, command) {
|
|
301
|
+
const [bin, ...args] = command.trim().split(/\s+/);
|
|
302
|
+
const resolvedBin = shellQuoteExecutable(localBin(root, resolveCommandBin(root, bin)));
|
|
303
|
+
return args.length > 0 ? `${resolvedBin} ${args.join(" ")}` : resolvedBin;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Shell-quote a resolved executable path so it survives being concatenated into
|
|
307
|
+
* a command string. The deploy path runs these via `execSync`/`spawnSync`,
|
|
308
|
+
* which invoke a shell, so a bare absolute path containing a space (e.g. a
|
|
309
|
+
* project root like `/tmp/my app`) would be word-split by the shell and try to
|
|
310
|
+
* exec the wrong binary. Paths with no shell-significant characters are returned
|
|
311
|
+
* unchanged, so ordinary paths stay byte-identical and copy-pasteable; only the
|
|
312
|
+
* executable segment is quoted (the trailing subcommand args are known-safe
|
|
313
|
+
* tokens). Platform-aware: cmd.exe (Windows) uses double quotes, POSIX shells
|
|
314
|
+
* use single quotes.
|
|
315
|
+
*/
|
|
316
|
+
function shellQuoteExecutable(value) {
|
|
317
|
+
if (process.platform === "win32") return /[\s&|<>^()"]/.test(value) ? `"${value}"` : value;
|
|
318
|
+
if (/^[A-Za-z0-9_@%+=:,./-]+$/.test(value)) return value;
|
|
319
|
+
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Resolve the project-local `wrangler` as an ARGV LAUNCHER — an array of tokens
|
|
323
|
+
* `[executable, ...prefixArgs]` meant to be spawned with `shell: false` and the
|
|
324
|
+
* real wrangler subcommand appended as further DISCRETE argv elements.
|
|
325
|
+
*
|
|
326
|
+
* Unlike {@link resolveWranglerCommand} (which returns a shell-quoted STRING for
|
|
327
|
+
* `shell: true` callers), this never builds a shell command line, so untrusted
|
|
328
|
+
* values — resource names, a Postgres connection string riddled with `&`/`$`/`;`,
|
|
329
|
+
* a config path containing spaces — can be passed as their own argv elements and
|
|
330
|
+
* are IMMUNE to shell metacharacter injection/splitting.
|
|
331
|
+
*
|
|
332
|
+
* Resolution order — ALWAYS launches the resolved JS entry as
|
|
333
|
+
* `[process.execPath, <wrangler-dist/cli.js>]`, which is shell-free AND
|
|
334
|
+
* cross-platform (it sidesteps the Windows `.cmd`/`.ps1` shim that Node cannot
|
|
335
|
+
* spawn with `shell: false`):
|
|
336
|
+
* 1. MODULE RESOLUTION of `wrangler/package.json` relative to THIS module (the
|
|
337
|
+
* `void` package). The provisioner targets wrangler 4.107's EXACT flags,
|
|
338
|
+
* `--json` shapes, and error strings, so void's own pinned wrangler must be
|
|
339
|
+
* PREFERRED — an app that hoists an older, incompatible wrangler at its root
|
|
340
|
+
* must not shadow it. Under strict pnpm (void + consumers use pnpm) void's
|
|
341
|
+
* wrangler is not at the app root anyway; module resolution finds it wherever
|
|
342
|
+
* pnpm placed it.
|
|
343
|
+
* 2. FALLBACK: the app-root `node_modules/wrangler` probe, used only when void's
|
|
344
|
+
* own wrangler cannot be resolved (e.g. a bundled/vendored layout).
|
|
345
|
+
*
|
|
346
|
+
* The resolved entry is wrangler's REAL CLI (`wrangler-dist/cli.js`, its
|
|
347
|
+
* package `main`/`exports["."]`), NOT the `bin.wrangler` WRAPPER. The wrapper
|
|
348
|
+
* (`bin/wrangler.js`) merely does a Node-version guard and then RE-SPAWNS
|
|
349
|
+
* `wrangler-dist/cli.js`, forwarding only SIGINT/SIGTERM to the grandchild (via a
|
|
350
|
+
* default `.kill()` = SIGTERM) and mapping a signal-killed grandchild (`code === null`)
|
|
351
|
+
* to `process.exit(0)`. Launching through it defeats the provisioner's hard command
|
|
352
|
+
* timeout: a `SIGKILL` sent to the wrapper cannot be relayed to the inner CLI, which
|
|
353
|
+
* survives holding the inherited stdio pipes so the parent's `close` never fires; and a
|
|
354
|
+
* killed inner CLI is masked as a clean exit 0. Launching `wrangler-dist/cli.js`
|
|
355
|
+
* DIRECTLY removes that layer entirely — the SIGKILL now hits the real process, and no
|
|
356
|
+
* wrapper can swallow the signal or rewrite the exit code. Bypassing the wrapper is
|
|
357
|
+
* safe: its only behaviors are the version guard (we spawn with the SAME `process.execPath`
|
|
358
|
+
* that already passed it) and an IPC-forwarding channel that is inert here (the runner
|
|
359
|
+
* spawns with `stdio: ['ignore','pipe','pipe']`, so the wrapper's `process.send` would be
|
|
360
|
+
* undefined and forward nothing).
|
|
361
|
+
*
|
|
362
|
+
* If wrangler cannot be resolved by EITHER avenue, throws a clear error — it never
|
|
363
|
+
* degrades to a bare `wrangler` (ENOENT in clean CI) or a `.cmd` shim.
|
|
364
|
+
*/
|
|
365
|
+
function resolveWranglerArgv(root, resolveWranglerPackageJson = defaultResolveWranglerPackageJson) {
|
|
366
|
+
const jsBin = resolveLocalWranglerJsBin(root, resolveWranglerPackageJson);
|
|
367
|
+
if (jsBin) return [process.execPath, jsBin];
|
|
368
|
+
throw new Error("provision: could not resolve the \"wrangler\" package. wrangler ships as a dependency of \"void\"; reinstall dependencies (e.g. `pnpm install`) so it is present, then retry.");
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Resolve `wrangler/package.json` via Node module resolution, relative to THIS
|
|
372
|
+
* module (the `void` package), so it is found wherever pnpm placed void's own
|
|
373
|
+
* wrangler dependency. wrangler explicitly exports `./package.json`, so both
|
|
374
|
+
* `import.meta.resolve` and `createRequire().resolve()` succeed. Returns the
|
|
375
|
+
* absolute manifest path, or `undefined` when unresolvable.
|
|
376
|
+
*/
|
|
377
|
+
function defaultResolveWranglerPackageJson() {
|
|
378
|
+
if (typeof import.meta.resolve === "function") try {
|
|
379
|
+
return fileURLToPath(import.meta.resolve("wrangler/package.json"));
|
|
380
|
+
} catch {}
|
|
381
|
+
try {
|
|
382
|
+
return createRequire(import.meta.url).resolve("wrangler/package.json");
|
|
383
|
+
} catch {
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Absolute path to wrangler's REAL CLI JS entry (its `package.json` `main` /
|
|
389
|
+
* `exports["."]` → `wrangler-dist/cli.js`, NOT the `bin.wrangler` wrapper — see
|
|
390
|
+
* {@link resolveWranglerArgv} for why we bypass the wrapper), trying the injected
|
|
391
|
+
* module resolver (void's OWN wrangler) FIRST, then falling back to the app-root
|
|
392
|
+
* probe. Returns `undefined` when wrangler cannot be located or its manifest is
|
|
393
|
+
* unreadable.
|
|
394
|
+
*/
|
|
395
|
+
function resolveLocalWranglerJsBin(root, resolveWranglerPackageJson) {
|
|
396
|
+
const fromVoid = wranglerCliEntryFromPackageJson(resolveWranglerPackageJson());
|
|
397
|
+
if (fromVoid) return fromVoid;
|
|
398
|
+
return wranglerCliEntryFromPackageJson(join(root, "node_modules", "wrangler", "package.json"));
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Resolve wrangler's REAL CLI entry from its `package.json` at `pkgPath`. Reads the
|
|
402
|
+
* `main` field (`wrangler-dist/cli.js`), falling back to `exports["."]` (its `default`
|
|
403
|
+
* condition, or a bare string), and resolves it to an absolute JS entry relative to the
|
|
404
|
+
* manifest's own directory (so it works for BOTH the app-root probe and module
|
|
405
|
+
* resolution). Deliberately does NOT read `bin.wrangler`: that is the signal-swallowing
|
|
406
|
+
* wrapper the provisioner must bypass. Returns `undefined` on any missing/unreadable/
|
|
407
|
+
* absent-entry case.
|
|
408
|
+
*/
|
|
409
|
+
function wranglerCliEntryFromPackageJson(pkgPath) {
|
|
410
|
+
if (!pkgPath || !existsSync(pkgPath)) return;
|
|
411
|
+
try {
|
|
412
|
+
const rel = wranglerCliRelativeEntry(JSON.parse(readFileSync(pkgPath, "utf-8")));
|
|
413
|
+
if (!rel) return;
|
|
414
|
+
const jsEntry = join(dirname(pkgPath), rel);
|
|
415
|
+
return existsSync(jsEntry) ? jsEntry : void 0;
|
|
416
|
+
} catch {
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* The relative CLI entry from a wrangler manifest: `main` first (wrangler 4.107 sets it
|
|
422
|
+
* to `wrangler-dist/cli.js`, which equals `exports["."].default`), then the `.` export
|
|
423
|
+
* (`{ default: string }` or a bare string). Returns `undefined` when neither is a string.
|
|
424
|
+
*/
|
|
425
|
+
function wranglerCliRelativeEntry(pkg) {
|
|
426
|
+
if (typeof pkg.main === "string" && pkg.main.length > 0) return pkg.main;
|
|
427
|
+
const exports = pkg.exports;
|
|
428
|
+
if (exports && typeof exports === "object" && !Array.isArray(exports)) {
|
|
429
|
+
const dot = exports["."];
|
|
430
|
+
if (typeof dot === "string" && dot.length > 0) return dot;
|
|
431
|
+
if (dot && typeof dot === "object" && !Array.isArray(dot)) {
|
|
432
|
+
const dflt = dot.default;
|
|
433
|
+
if (typeof dflt === "string" && dflt.length > 0) return dflt;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Format a user-facing command string, rewriting `vite` to `vp` when the
|
|
439
|
+
* project depends on Vite+ without expanding to an absolute local bin path.
|
|
440
|
+
*/
|
|
441
|
+
function formatProjectCommand(root, command) {
|
|
442
|
+
const [bin, ...args] = command.trim().split(/\s+/);
|
|
443
|
+
const formattedBin = resolveCommandBin(root, bin);
|
|
444
|
+
return args.length > 0 ? `${formattedBin} ${args.join(" ")}` : formattedBin;
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Detect a static deploy preset based on the project root.
|
|
448
|
+
* Returns null when the project requires a full worker deploy.
|
|
449
|
+
*/
|
|
450
|
+
function detectPreset(root, options) {
|
|
451
|
+
if (options?.dir) return {
|
|
452
|
+
buildCommand: null,
|
|
453
|
+
outputDir: resolve(root, options.dir),
|
|
454
|
+
appType: options.spa ? "spa" : "static"
|
|
455
|
+
};
|
|
456
|
+
const pkg = readPackageJson(root);
|
|
457
|
+
if (pkg) {
|
|
458
|
+
const allDeps = getPackageDependencies(pkg);
|
|
459
|
+
for (const preset of Object.values(SSG_PRESETS)) if (preset.dep in allDeps) {
|
|
460
|
+
const overrides = preset.resolve?.(root);
|
|
461
|
+
const cmd = overrides?.buildCommand ?? preset.buildCommand;
|
|
462
|
+
const out = overrides?.outputDir ?? preset.outputDir;
|
|
463
|
+
return {
|
|
464
|
+
buildCommand: resolveProjectCommand(root, cmd),
|
|
465
|
+
outputDir: resolve(root, out),
|
|
466
|
+
appType: preset.appType
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
if (hasBackendFiles(root)) return null;
|
|
471
|
+
if (pkg && hasViteLike(pkg)) return {
|
|
472
|
+
buildCommand: resolveProjectScriptCommand(root, "build") ?? resolveProjectCommand(root, "vite build"),
|
|
473
|
+
outputDir: resolve(root, "dist"),
|
|
474
|
+
appType: "spa"
|
|
475
|
+
};
|
|
476
|
+
if (existsSync(join(root, "dist/index.html"))) return {
|
|
477
|
+
buildCommand: null,
|
|
478
|
+
outputDir: resolve(root, "dist"),
|
|
479
|
+
appType: options?.spa ? "spa" : "static"
|
|
480
|
+
};
|
|
481
|
+
if (existsSync(join(root, "index.html"))) return {
|
|
482
|
+
buildCommand: null,
|
|
483
|
+
outputDir: root,
|
|
484
|
+
appType: options?.spa ? "spa" : "static"
|
|
485
|
+
};
|
|
486
|
+
return null;
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Resolve a local node_modules/.bin executable path.
|
|
490
|
+
* Falls back to bare command name if the bin doesn't exist locally.
|
|
491
|
+
*/
|
|
492
|
+
function localBin(root, name) {
|
|
493
|
+
const bin = join(root, "node_modules", ".bin", name);
|
|
494
|
+
return existsSync(bin) ? bin : name;
|
|
495
|
+
}
|
|
496
|
+
function resolveCommandBin(root, name) {
|
|
497
|
+
if (name === "vite") return detectViteBinary(root);
|
|
498
|
+
return name;
|
|
499
|
+
}
|
|
500
|
+
function detectPackageManager(root) {
|
|
501
|
+
if (existsSync(join(root, "pnpm-lock.yaml"))) return "pnpm";
|
|
502
|
+
if (existsSync(join(root, "yarn.lock"))) return "yarn";
|
|
503
|
+
if (existsSync(join(root, "bun.lock")) || existsSync(join(root, "bun.lockb"))) return "bun";
|
|
504
|
+
return "npm";
|
|
505
|
+
}
|
|
506
|
+
function resolveProjectScriptCommand(root, scriptName) {
|
|
507
|
+
const script = readPackageJson(root)?.scripts;
|
|
508
|
+
if (!script || typeof script !== "object" || Array.isArray(script)) return null;
|
|
509
|
+
if (typeof script[scriptName] !== "string") return null;
|
|
510
|
+
switch (detectPackageManager(root)) {
|
|
511
|
+
case "pnpm": return `pnpm ${scriptName}`;
|
|
512
|
+
case "yarn": return `yarn ${scriptName}`;
|
|
513
|
+
case "bun": return `bun run ${scriptName}`;
|
|
514
|
+
default: return `npm run ${scriptName}`;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
function hasViteLike(pkg) {
|
|
518
|
+
return hasPackageDependency(pkg, "vite") || hasPackageDependency(pkg, "vite-plus");
|
|
519
|
+
}
|
|
520
|
+
function detectViteBinary(root) {
|
|
521
|
+
const pkg = readPackageJson(root);
|
|
522
|
+
if (pkg && hasPackageDependency(pkg, "vite-plus")) return "vp";
|
|
523
|
+
return "vite";
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Check whether the project has backend files that require a full worker deploy.
|
|
527
|
+
*/
|
|
528
|
+
function hasBackendFiles(root) {
|
|
529
|
+
const paths = readProjectPaths(root);
|
|
530
|
+
if (existsSync(paths.routesDir)) return true;
|
|
531
|
+
if (existsSync(paths.pagesDir)) return true;
|
|
532
|
+
if (existsSync(paths.middlewareDir)) return true;
|
|
533
|
+
if (existsSync(paths.cronsDir)) return true;
|
|
534
|
+
if (existsSync(paths.queuesDir)) return true;
|
|
535
|
+
if (hasSsrEntry(root, paths)) return true;
|
|
536
|
+
return false;
|
|
537
|
+
}
|
|
538
|
+
//#endregion
|
|
539
|
+
export { resolveProjectCommand as a, mergeAndExpand as c, hasBackendFiles as i, parseDotenvFile as l, detectPreset as n, resolveWranglerArgv as o, formatProjectCommand as r, expandDotenv as s, FRAMEWORK_PRESETS as t, scanWranglerDotenvKeys as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as outro, T as log, a as cliTitle, f as tablePrefix, s as dim, u as import_picocolors, w as intro } from "./agents-
|
|
2
|
-
import { d as getSiteDomain, f as getToken, n as PlatformClient } from "./client-
|
|
1
|
+
import { D as outro, T as log, a as cliTitle, f as tablePrefix, s as dim, u as import_picocolors, w as intro } from "./agents-CtgBYqld.mjs";
|
|
2
|
+
import { d as getSiteDomain, f as getToken, n as PlatformClient } from "./client-Gb71-XkG.mjs";
|
|
3
3
|
//#region src/cli/projects.ts
|
|
4
4
|
async function runProjectsCommand(root) {
|
|
5
5
|
console.log();
|
|
@@ -33,32 +33,36 @@ async function runProjectsCommand(root) {
|
|
|
33
33
|
//#region src/cli/project-cmd.ts
|
|
34
34
|
async function runProjectCommand(root, args) {
|
|
35
35
|
if (args.subcommand === "status") {
|
|
36
|
-
const { runListCommand } = await import("./list-
|
|
36
|
+
const { runListCommand } = await import("./list-CPwFDZ_c.mjs");
|
|
37
37
|
return runListCommand(root, args.name || void 0);
|
|
38
38
|
}
|
|
39
39
|
if (args.subcommand === "link") {
|
|
40
|
-
const { runLink } = await import("./link-
|
|
40
|
+
const { runLink } = await import("./link-CdGHSIy-.mjs");
|
|
41
41
|
return runLink(root, args.name || void 0);
|
|
42
42
|
}
|
|
43
43
|
if (args.subcommand === "list") return runProjectsCommand(root);
|
|
44
44
|
if (args.subcommand === "logs") {
|
|
45
|
-
const { runLogsCommand } = await import("./logs-
|
|
45
|
+
const { runLogsCommand } = await import("./logs-Bt313ax7.mjs");
|
|
46
46
|
return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
|
|
47
47
|
}
|
|
48
|
+
if (args.subcommand === "requests") {
|
|
49
|
+
const { runRequestsCommand } = await import("./requests-B8sZxaFM.mjs");
|
|
50
|
+
return runRequestsCommand(root, args.range, args.status || void 0);
|
|
51
|
+
}
|
|
48
52
|
if (args.subcommand === "rollback") {
|
|
49
|
-
const { runRollbackCommand } = await import("./rollback-
|
|
53
|
+
const { runRollbackCommand } = await import("./rollback-CkvTFXx5.mjs");
|
|
50
54
|
return runRollbackCommand(root, args.deployId || void 0);
|
|
51
55
|
}
|
|
52
56
|
if (args.subcommand === "cancel") {
|
|
53
|
-
const { runCancelDeployCommand } = await import("./cancel-deploy-
|
|
57
|
+
const { runCancelDeployCommand } = await import("./cancel-deploy-fwFYF04b.mjs");
|
|
54
58
|
return runCancelDeployCommand(root, args.deployId || void 0);
|
|
55
59
|
}
|
|
56
60
|
if (args.subcommand === "delete") {
|
|
57
|
-
const { runDeleteCommand } = await import("./delete-
|
|
61
|
+
const { runDeleteCommand } = await import("./delete-mh6p-zkQ.mjs");
|
|
58
62
|
return runDeleteCommand(root, args.name || void 0, { force: args.force });
|
|
59
63
|
}
|
|
60
64
|
if (args.subcommand === "purge-cache") {
|
|
61
|
-
const { runPurgeCacheCommand } = await import("./cache-
|
|
65
|
+
const { runPurgeCacheCommand } = await import("./cache-C11V8Fxq.mjs");
|
|
62
66
|
return runPurgeCacheCommand(root, args.projectSlug || void 0);
|
|
63
67
|
}
|
|
64
68
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as join, i as isAbsolute, o as normalize, s as relative } from "./
|
|
1
|
+
import { a as join, i as isAbsolute, o as normalize, s as relative } from "./dist-DaKKDf8D.mjs";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
//#region src/project-paths.ts
|
|
4
4
|
const SOURCE_CONVENTION_DIRECTORIES = [
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RewriteDestination } from "void/routes";
|
|
2
|
+
|
|
3
|
+
//#region src/project-paths.d.ts
|
|
4
|
+
type ProjectPaths = {
|
|
5
|
+
root: string;
|
|
6
|
+
sourceDir: string;
|
|
7
|
+
sourceRoot: string;
|
|
8
|
+
routesDir: string;
|
|
9
|
+
middlewareDir: string;
|
|
10
|
+
cronsDir: string;
|
|
11
|
+
queuesDir: string;
|
|
12
|
+
pagesDir: string;
|
|
13
|
+
dbDir: string;
|
|
14
|
+
migrationsDir: string;
|
|
15
|
+
schemaFile: string;
|
|
16
|
+
schemaDir: string;
|
|
17
|
+
srcDir: string;
|
|
18
|
+
ssrDir: string;
|
|
19
|
+
sourceRelative: (path: string) => string;
|
|
20
|
+
authConfigCandidates: ReadonlyArray<string>;
|
|
21
|
+
envFileCandidates: ReadonlyArray<string>;
|
|
22
|
+
};
|
|
23
|
+
declare function resolvePagesDir(root?: string): string;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { resolvePagesDir as n, ProjectPaths as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as join, n as dirname, s as relative } from "./
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
1
|
+
import { a as join, n as dirname, s as relative } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-BQd7OmIo.mjs";
|
|
3
3
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
4
4
|
//#region src/codegen/write-if-changed.ts
|
|
5
5
|
function writeFileIfChanged(path, content) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as HeadDescriptor, t as HeadConfig } from "./head-nmvOgFjd.mjs";
|
|
2
|
-
import { n as CloudBindings, r as CloudContext } from "./handler-
|
|
2
|
+
import { n as CloudBindings, r as CloudContext } from "./handler-Cjh8uM3Y.mjs";
|
|
3
3
|
import { a as PageRenderMode, t as DevCssAsset } from "./types-lLjNE9Qp.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/pages/protocol.d.ts
|