void 0.9.2 → 0.10.1
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 +1 -0
- package/dist/{auth-cmd-CPkWrQR9.mjs → auth-cmd-DBnbrX9Y.mjs} +2 -2
- package/dist/{better-auth-shared-ChVbrq52.mjs → better-auth-shared-D0Mbmx5V.mjs} +1 -1
- package/dist/{better-auth-shared-CmEQZs1T.d.mts → better-auth-shared-a7H3wk9J.d.mts} +2 -2
- package/dist/{cache-1SVxZ7BK.mjs → cache-DNX0hLsO.mjs} +1 -1
- package/dist/{cancel-deploy-JaFClLr7.mjs → cancel-deploy-CDzkVaYZ.mjs} +1 -1
- package/dist/cli/cli.mjs +205 -36
- package/dist/{client-DIfOFf1W.mjs → client-D4awzTnj.mjs} +149 -45
- package/dist/{config-BVEC0lti.mjs → config-8dLIngKW.mjs} +1 -1
- package/dist/{create-project-DCUrFJxa.mjs → create-project-CGodxfzH.mjs} +1 -1
- package/dist/{db-DiddQC2v.mjs → db-ERzz4oly.mjs} +16 -16
- package/dist/{delete-CYknzwXU.mjs → delete-CJZGDLBR.mjs} +1 -1
- package/dist/{deploy-CRU9fGjE.mjs → deploy-Cwa5sooV.mjs} +97 -108
- package/dist/{domain-B7RntQ1r.mjs → domain-WvoAHE6w.mjs} +1 -1
- package/dist/{drizzle-2fs1qTgy.mjs → drizzle-DqstQTGq.mjs} +1 -1
- package/dist/{env-Bvw0wMTI.mjs → env-Cx4czPsR.mjs} +3 -3
- package/dist/{env-helpers-Bd2wVdxz.d.mts → env-helpers-ZatKyjen.d.mts} +1 -1
- package/dist/{env-types-D6qI1ThV.mjs → env-types-CaJaIRXU.mjs} +1 -1
- package/dist/{env-validation-DBJsxZLz.mjs → env-validation-LH6eoyW-.mjs} +3 -3
- package/dist/{gen-CZdNWIaA.mjs → gen-Dgi4D7GC.mjs} +3 -3
- package/dist/git-metadata-Ce0AtSZL.mjs +82 -0
- package/dist/github-cmd-CUB041gj.mjs +308 -0
- package/dist/{handler-xflsMwWM.d.mts → handler-DczZlaXR.d.mts} +24 -4
- package/dist/{headers-Y0jshugF.mjs → headers-BNWymgnH.mjs} +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +60 -55
- package/dist/{init-BHupO7Fm.mjs → init-DvaRDMIc.mjs} +125 -80
- package/dist/{link-7MoXUMaI.mjs → link-CpbWJY3P.mjs} +2 -2
- package/dist/{list-N2mCHv8q.mjs → list-BkwE5vH4.mjs} +1 -1
- package/dist/{login-tt1OmNVg.mjs → login-Ca6mhQVI.mjs} +1 -1
- package/dist/{logs-Cl7q2CjZ.mjs → logs-ArQzZquo.mjs} +1 -1
- package/dist/{mcp-BXD35N2J.mjs → mcp-Cc2MMXdQ.mjs} +1 -1
- package/dist/{node-CHWVVjO6.mjs → node-B07cZs0d.mjs} +4 -4
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +1 -0
- package/dist/pages/head-client.d.mts +1 -1
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/index.d.mts +8 -6
- package/dist/pages/index.mjs +3 -3
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +30 -12
- package/dist/{plugin-inference-BUBhHt_1.mjs → plugin-inference-C3fLzFvP.mjs} +3 -1
- package/dist/{prepare-CrlAVbWS.mjs → prepare-DH2WnEpD.mjs} +14 -19
- package/dist/{preset-CIJG2O7a.mjs → preset-B7ZQZn0u.mjs} +2 -2
- package/dist/{project-cmd-CLrqSbqj.mjs → project-cmd-CWZeawuN.mjs} +8 -8
- package/dist/{project-tsconfig-HAGjfY6w.mjs → project-tsconfig-BTNuNoJ0.mjs} +18 -4
- package/dist/{protocol-DYca39yJ.d.mts → protocol-63PHtCHS.d.mts} +8 -5
- package/dist/{rollback-CEbAwbHK.mjs → rollback-BJ60ktsW.mjs} +1 -1
- package/dist/{route-types-jxRfWuCb.mjs → route-types-D03ryMXz.mjs} +3 -2
- package/dist/{runner-DLZ9E_cX.mjs → runner-BQyKUqAL.mjs} +1 -1
- package/dist/runtime/ai.mjs +1 -1
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +3 -3
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +2 -2
- package/dist/runtime/client-react.d.mts +2 -2
- package/dist/runtime/client-react.mjs +1 -1
- package/dist/runtime/client-solid.d.mts +2 -2
- package/dist/runtime/client-solid.mjs +1 -1
- package/dist/runtime/client-svelte.d.mts +2 -2
- package/dist/runtime/client-svelte.mjs +1 -1
- package/dist/runtime/client-vue.d.mts +2 -2
- package/dist/runtime/client-vue.mjs +1 -1
- package/dist/runtime/client.d.mts +2 -2
- package/dist/runtime/client.mjs +1 -1
- package/dist/runtime/env-helpers.d.mts +1 -1
- package/dist/runtime/env-public-client.d.mts +1 -1
- package/dist/runtime/env-public.d.mts +2 -2
- package/dist/runtime/env-public.mjs +1 -1
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +2 -2
- package/dist/runtime/handler.mjs +68 -2
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/migration-handler-pg.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 +2 -2
- package/dist/runtime/ws.d.mts +3 -3
- package/dist/{scan-BNC_1OsY.mjs → scan-DGEp1-1Q.mjs} +19 -11
- package/dist/{scan-2YmJkYAf.mjs → scan-VCAM1oh3.mjs} +55 -29
- package/dist/{secret-C_uTY7xx.mjs → secret-BRbXyu7E.mjs} +1 -1
- package/dist/{types-Dm9kep2X.d.mts → types-BnHMXezo.d.mts} +12 -3
- package/package.json +2 -2
- package/schema.json +3 -3
- package/skills/void/docs/guide/deployment.md +37 -11
- package/skills/void/docs/guide/edge/headers.md +10 -3
- package/skills/void/docs/guide/edge/rewrites.md +5 -5
- package/skills/void/docs/guide/pages-routing/layouts.md +8 -7
- package/skills/void/docs/guide/pages-routing/loaders.md +1 -1
- package/skills/void/docs/guide/pages-routing/overview.md +32 -5
- package/skills/void/docs/guide/server-routing.md +28 -0
- package/skills/void/docs/node_modules/void/AGENTS.md +15 -14
- package/skills/void/docs/node_modules/void/README.md +1 -0
- package/skills/void/docs/reference/api.md +44 -1
- package/skills/void/docs/reference/cli.md +65 -2
- package/skills/void/docs/reference/config.md +1 -1
- /package/dist/{auth-migrations-CuQkjjWE.mjs → auth-migrations-BP-hMzYl.mjs} +0 -0
- /package/dist/{auth-CDeb2XAl.d.mts → auth-nEUVHuFI.d.mts} +0 -0
- /package/dist/{defer-CouVukrf.mjs → defer-C-bdSM_b.mjs} +0 -0
- /package/dist/{dist-DR9sIMbM.mjs → dist-5cGIJHQQ.mjs} +0 -0
- /package/dist/{dotenv-Bkoqyq9r.mjs → dotenv-lS94ymhM.mjs} +0 -0
- /package/dist/{env-raw-RDkMnSTC.mjs → env-raw-Dtj1UAoK.mjs} +0 -0
- /package/dist/{fetch-error-CimrygMq.d.mts → fetch-error-BQMdPvge.d.mts} +0 -0
- /package/dist/{fetch-error-BFIoojjf.mjs → fetch-error-C6qffTl2.mjs} +0 -0
- /package/dist/{head-BsSTGnIe.d.mts → head-JAH2l3fg.d.mts} +0 -0
- /package/dist/{log-CWWZV4V1.mjs → log-BdD_Fpms.mjs} +0 -0
- /package/dist/{package-json-B2TD0JLu.mjs → package-json-Bg_GJdJB.mjs} +0 -0
- /package/dist/{pg-CMZ_5wsC.mjs → pg-CempqvEJ.mjs} +0 -0
- /package/dist/{providers-3Kkv63Ha.d.mts → providers-BkiAlEad.d.mts} +0 -0
- /package/dist/{providers-uC0PJg1c.mjs → providers-BwPbdHdi.mjs} +0 -0
- /package/dist/{runner-pg-Cv9V7ydr.mjs → runner-pg-BAheiT6v.mjs} +0 -0
- /package/dist/{skills-BRKc--As.mjs → skills--OMgLmXW.mjs} +0 -0
- /package/dist/{standard-schema-Dnsh2vnl.d.mts → standard-schema-BCBv-QaP.d.mts} +0 -0
- /package/dist/{subcommand-prompt-OD-x_Tsm.mjs → subcommand-prompt-ClwpLlKD.mjs} +0 -0
- /package/dist/{yarn-pnp-0SwYgQxx.mjs → yarn-pnp-DhCHHLAz.mjs} +0 -0
|
@@ -3,34 +3,35 @@ import { a as join, c as resolve, i as isAbsolute, n as dirname, r as extname, s
|
|
|
3
3
|
import { n as cliTitle, r as createSpinner, s as import_picocolors } from "./output-DeiS4oEX.mjs";
|
|
4
4
|
import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-CCMrHYQm.mjs";
|
|
5
5
|
import { t as findVoidAuthConfig } from "./config-hhMYPVRT.mjs";
|
|
6
|
-
import { a as isExpiredTokenError,
|
|
6
|
+
import { a as isExpiredTokenError, d as getToken, f as getTokenSource, i as isCliOutdatedError, n as PlatformClient, o as parsePlatformErrorBody, p as isStagingMode, t as PlatformApiError } from "./client-D4awzTnj.mjs";
|
|
7
7
|
import { c as R, g as ge, u as Se, v as ue, x as q, y as ye } from "./dist-abzUneor.mjs";
|
|
8
8
|
import { a as writeProjectConfig, r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
9
|
-
import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-
|
|
10
|
-
import { a as scanQueuesSync, i as scanWebSocketRoutesSync, o as scanJobsSync, r as scanRoutes } from "./scan-
|
|
11
|
-
import { i as inferProjectBindings, l as validateSsrEntry, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference-
|
|
12
|
-
import { i as voidWarn, r as voidLog } from "./log-
|
|
9
|
+
import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-8dLIngKW.mjs";
|
|
10
|
+
import { a as scanQueuesSync, i as scanWebSocketRoutesSync, o as scanJobsSync, r as scanRoutes } from "./scan-DGEp1-1Q.mjs";
|
|
11
|
+
import { i as inferProjectBindings, l as validateSsrEntry, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference-C3fLzFvP.mjs";
|
|
12
|
+
import { i as voidWarn, r as voidLog } from "./log-BdD_Fpms.mjs";
|
|
13
13
|
import { t as discoverSchema } from "./discover-C8N1I4tK.mjs";
|
|
14
|
-
import { t as findEnvFile } from "./env-types-
|
|
15
|
-
import { i as validateProdEnv, n as formatEnvReport, r as getDeployEnvDefaults, t as fetchRemoteSecretNames } from "./env-validation-
|
|
14
|
+
import { t as findEnvFile } from "./env-types-CaJaIRXU.mjs";
|
|
15
|
+
import { i as validateProdEnv, n as formatEnvReport, r as getDeployEnvDefaults, t as fetchRemoteSecretNames } from "./env-validation-LH6eoyW-.mjs";
|
|
16
16
|
import { n as writeDrizzleConfig } from "./config--wXmVOoe.mjs";
|
|
17
17
|
import { t as collectMigrations } from "./collect-9rO3JFNM.mjs";
|
|
18
18
|
import { n as buildMigrationPlanBundle } from "./plan-aD3wRDqF.mjs";
|
|
19
19
|
import { r as validateMigrations, t as assertJournalCoherence } from "./validate-CNWm-PsL.mjs";
|
|
20
|
-
import { t as scanPages } from "./scan-
|
|
20
|
+
import { t as scanPages } from "./scan-VCAM1oh3.mjs";
|
|
21
21
|
import { n as STAGING_PROXY_URL, t as DEFAULT_PROXY_URL } from "./proxy-M3pxItg2.mjs";
|
|
22
|
-
import { i as promptProjectSetupAction, n as promptAndCreateProject, r as promptProjectSelection } from "./create-project-
|
|
22
|
+
import { i as promptProjectSetupAction, n as promptAndCreateProject, r as promptProjectSelection } from "./create-project-CGodxfzH.mjs";
|
|
23
23
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D4O1_fZz.mjs";
|
|
24
|
-
import {
|
|
25
|
-
import { t as
|
|
26
|
-
import {
|
|
24
|
+
import { t as collectGitDeployMetadata } from "./git-metadata-Ce0AtSZL.mjs";
|
|
25
|
+
import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-BNWymgnH.mjs";
|
|
26
|
+
import { t as promptForLoginToken } from "./login-Ca6mhQVI.mjs";
|
|
27
|
+
import { i as resolveProjectCommand, n as detectPreset, r as formatProjectCommand, t as FRAMEWORK_PRESETS } from "./preset-B7ZQZn0u.mjs";
|
|
27
28
|
import { createRequire } from "node:module";
|
|
28
29
|
import { copyFileSync, cpSync, createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
29
30
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
30
31
|
import { build, loadEnv } from "vite";
|
|
31
32
|
import { createHash } from "node:crypto";
|
|
32
33
|
import { homedir } from "node:os";
|
|
33
|
-
import { execFile,
|
|
34
|
+
import { execFile, execSync, spawnSync } from "node:child_process";
|
|
34
35
|
import { parse } from "jsonc-parser";
|
|
35
36
|
import { hash } from "blake3-jit";
|
|
36
37
|
import ignore from "ignore";
|
|
@@ -1167,86 +1168,6 @@ function sleep(ms) {
|
|
|
1167
1168
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
1168
1169
|
}
|
|
1169
1170
|
//#endregion
|
|
1170
|
-
//#region src/cli/git-metadata.ts
|
|
1171
|
-
function git(root, args) {
|
|
1172
|
-
try {
|
|
1173
|
-
return execFileSync("git", args, {
|
|
1174
|
-
cwd: root,
|
|
1175
|
-
encoding: "utf-8",
|
|
1176
|
-
stdio: [
|
|
1177
|
-
"ignore",
|
|
1178
|
-
"pipe",
|
|
1179
|
-
"ignore"
|
|
1180
|
-
]
|
|
1181
|
-
}).trim();
|
|
1182
|
-
} catch {
|
|
1183
|
-
return null;
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1186
|
-
function stripGitSuffix(pathname) {
|
|
1187
|
-
return pathname.endsWith(".git") ? pathname.slice(0, -4) : pathname;
|
|
1188
|
-
}
|
|
1189
|
-
function normalizeGitRemoteUrl(remote) {
|
|
1190
|
-
if (!remote) return null;
|
|
1191
|
-
const trimmed = remote.trim();
|
|
1192
|
-
if (!trimmed) return null;
|
|
1193
|
-
const scpLike = /^(?:[^@]+@)?([^:]+):(.+)$/.exec(trimmed);
|
|
1194
|
-
if (scpLike && !trimmed.includes("://")) {
|
|
1195
|
-
const host = scpLike[1]?.toLowerCase();
|
|
1196
|
-
const path = stripGitSuffix(scpLike[2] ?? "").replace(/^\/+/, "");
|
|
1197
|
-
return host && path ? `https://${host}/${path}` : null;
|
|
1198
|
-
}
|
|
1199
|
-
try {
|
|
1200
|
-
const url = new URL(trimmed);
|
|
1201
|
-
if (url.protocol !== "https:" && url.protocol !== "http:" && url.protocol !== "ssh:") return null;
|
|
1202
|
-
const host = url.hostname.toLowerCase();
|
|
1203
|
-
const path = stripGitSuffix(url.pathname).replace(/^\/+/, "");
|
|
1204
|
-
return host && path ? `https://${host}/${path}` : null;
|
|
1205
|
-
} catch {
|
|
1206
|
-
return null;
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
function buildCommitUrl(repositoryUrl, commit) {
|
|
1210
|
-
if (!repositoryUrl || !commit) return null;
|
|
1211
|
-
try {
|
|
1212
|
-
const url = new URL(repositoryUrl);
|
|
1213
|
-
if (url.hostname === "github.com") return `${repositoryUrl}/commit/${commit}`;
|
|
1214
|
-
if (url.hostname === "gitlab.com") return `${repositoryUrl}/-/commit/${commit}`;
|
|
1215
|
-
if (url.hostname === "bitbucket.org") return `${repositoryUrl}/commits/${commit}`;
|
|
1216
|
-
} catch {
|
|
1217
|
-
return null;
|
|
1218
|
-
}
|
|
1219
|
-
return null;
|
|
1220
|
-
}
|
|
1221
|
-
function getGitRefFromEnv(env) {
|
|
1222
|
-
if (env.GITHUB_HEAD_REF) return env.GITHUB_HEAD_REF;
|
|
1223
|
-
if (env.GITHUB_REF_NAME) return env.GITHUB_REF_NAME;
|
|
1224
|
-
if (env.GITHUB_REF) return env.GITHUB_REF.replace(/^refs\/(?:heads|tags|pull)\//, "");
|
|
1225
|
-
return null;
|
|
1226
|
-
}
|
|
1227
|
-
function getGitHubRepositoryUrl(env) {
|
|
1228
|
-
if (!env.GITHUB_REPOSITORY) return null;
|
|
1229
|
-
return normalizeGitRemoteUrl(`${env.GITHUB_SERVER_URL ?? "https://github.com"}/${env.GITHUB_REPOSITORY}`);
|
|
1230
|
-
}
|
|
1231
|
-
function collectGitDeployMetadata(root, commit, env = process.env) {
|
|
1232
|
-
const repositoryUrl = getGitHubRepositoryUrl(env) ?? normalizeGitRemoteUrl(git(root, [
|
|
1233
|
-
"remote",
|
|
1234
|
-
"get-url",
|
|
1235
|
-
"origin"
|
|
1236
|
-
]));
|
|
1237
|
-
const gitRef = getGitRefFromEnv(env) ?? git(root, [
|
|
1238
|
-
"rev-parse",
|
|
1239
|
-
"--abbrev-ref",
|
|
1240
|
-
"HEAD"
|
|
1241
|
-
]);
|
|
1242
|
-
return {
|
|
1243
|
-
commit,
|
|
1244
|
-
commitUrl: buildCommitUrl(repositoryUrl, commit),
|
|
1245
|
-
gitRef: gitRef && gitRef !== "HEAD" ? gitRef : null,
|
|
1246
|
-
repositoryUrl
|
|
1247
|
-
};
|
|
1248
|
-
}
|
|
1249
|
-
//#endregion
|
|
1250
1171
|
//#region src/cli/log-file.ts
|
|
1251
1172
|
/**
|
|
1252
1173
|
* Walk `err.cause` up to 6 levels and return a plain JSON-friendly chain.
|
|
@@ -2292,11 +2213,13 @@ function generateHandlersSource(root, features) {
|
|
|
2292
2213
|
//#region src/cli/deploy.ts
|
|
2293
2214
|
var deploy_exports = /* @__PURE__ */ __exportAll({
|
|
2294
2215
|
applyDeployEvent: () => applyDeployEvent,
|
|
2216
|
+
buildEnv: () => buildEnv,
|
|
2295
2217
|
ensurePreviouslyDeployedLiveBindingConfig: () => ensurePreviouslyDeployedLiveBindingConfig,
|
|
2296
2218
|
generateDeployWrapperIfNeeded: () => generateDeployWrapperIfNeeded,
|
|
2297
2219
|
hasDeploySchemaDrift: () => hasDeploySchemaDrift,
|
|
2298
2220
|
promptDeployProjectConfig: () => promptDeployProjectConfig,
|
|
2299
2221
|
resolveDeployLiveBindingConfig: () => resolveDeployLiveBindingConfig,
|
|
2222
|
+
resolveDeployWorkerMain: () => resolveDeployWorkerMain,
|
|
2300
2223
|
resolveDeployWranglerCompat: () => resolveDeployWranglerCompat,
|
|
2301
2224
|
resolveDistDir: () => resolveDistDir,
|
|
2302
2225
|
resolveStaticBuildCommand: () => resolveStaticBuildCommand,
|
|
@@ -2304,7 +2227,9 @@ var deploy_exports = /* @__PURE__ */ __exportAll({
|
|
|
2304
2227
|
resolveWorkerDirName: () => resolveWorkerDirName,
|
|
2305
2228
|
runDeploy: () => runDeploy,
|
|
2306
2229
|
runStaticDeploy: () => runStaticDeploy,
|
|
2307
|
-
|
|
2230
|
+
streamDeployEvents: () => streamDeployEvents,
|
|
2231
|
+
warnRedundantForceOn3xx: () => warnRedundantForceOn3xx,
|
|
2232
|
+
warnUnpublishedRouting: () => warnUnpublishedRouting
|
|
2308
2233
|
});
|
|
2309
2234
|
const drizzleKitBin = join(fileURLToPath(import.meta.resolve("drizzle-kit")), "..", "bin.cjs");
|
|
2310
2235
|
const deployDriftCheckDir = join(".void", "deploy-drift-check");
|
|
@@ -2376,6 +2301,19 @@ function resolveDeployWranglerCompat(root, config, buildOutputDir, requirements)
|
|
|
2376
2301
|
compatibilityFlags
|
|
2377
2302
|
};
|
|
2378
2303
|
}
|
|
2304
|
+
function resolveDeployWorkerMain(config, buildOutputDir) {
|
|
2305
|
+
if (isNodeTarget(config.target)) return;
|
|
2306
|
+
try {
|
|
2307
|
+
const wrangler = JSON.parse(readFileSync(join(buildOutputDir, "wrangler.json"), "utf-8"));
|
|
2308
|
+
return typeof wrangler.main === "string" && wrangler.main.length > 0 ? wrangler.main : void 0;
|
|
2309
|
+
} catch {
|
|
2310
|
+
return;
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
function assertWorkerMainUploaded(workerFiles, workerMain) {
|
|
2314
|
+
if (!workerMain || workerFiles.size === 0) return;
|
|
2315
|
+
if (!workerFiles.has(workerMain)) throw new Error(`deploy: Worker entry '${workerMain}' from wrangler.json was not found in uploaded worker modules.`);
|
|
2316
|
+
}
|
|
2379
2317
|
/**
|
|
2380
2318
|
* Run the full deploy pipeline:
|
|
2381
2319
|
* 1. Check auth
|
|
@@ -2409,6 +2347,33 @@ async function runDeploy(root, options) {
|
|
|
2409
2347
|
await cliLog.close().catch(() => {});
|
|
2410
2348
|
}
|
|
2411
2349
|
}
|
|
2350
|
+
/**
|
|
2351
|
+
* Build a child-process environment with the CF Access service-token PAIR
|
|
2352
|
+
* removed.
|
|
2353
|
+
*
|
|
2354
|
+
* The deploy flow spawns UNTRUSTED user build code (`vite build`, framework
|
|
2355
|
+
* preset builds, drizzle-kit loading the user schema) which inherits the
|
|
2356
|
+
* spawn env. A shared, long-lived CF Access service token is needed only by
|
|
2357
|
+
* this CLI's own API client (which captures the Access headers once at
|
|
2358
|
+
* construction and reuses them for every request) — never by the build — so it
|
|
2359
|
+
* must not survive into those children, or it would leak to arbitrary repo
|
|
2360
|
+
* build scripts/plugins.
|
|
2361
|
+
*
|
|
2362
|
+
* We scrub it on the CHILD env rather than mutating `process.env`: deleting it
|
|
2363
|
+
* from the parent also breaks interactive expired-token re-auth, which reads
|
|
2364
|
+
* `cfAccessHeaders(process.env)` / the cloudflared pair-guard AFTER the build
|
|
2365
|
+
* step. Only the service-token pair is scrubbed; the cloudflared
|
|
2366
|
+
* `CF_ACCESS_TOKEN` JWT (dev path) is left untouched.
|
|
2367
|
+
*/
|
|
2368
|
+
function buildEnv(extra) {
|
|
2369
|
+
const env = {
|
|
2370
|
+
...process.env,
|
|
2371
|
+
...extra
|
|
2372
|
+
};
|
|
2373
|
+
delete env.CF_ACCESS_CLIENT_ID;
|
|
2374
|
+
delete env.CF_ACCESS_CLIENT_SECRET;
|
|
2375
|
+
return env;
|
|
2376
|
+
}
|
|
2412
2377
|
async function runDeployInner(root, options, cliLog) {
|
|
2413
2378
|
let reauthenticated = false;
|
|
2414
2379
|
while (true) try {
|
|
@@ -2584,7 +2549,8 @@ function applyDeployEvent(event, s) {
|
|
|
2584
2549
|
s.message(`Prerendering ${event.pages} pages...`);
|
|
2585
2550
|
return { kind: "continue" };
|
|
2586
2551
|
case "done":
|
|
2587
|
-
s.stop("Deployed
|
|
2552
|
+
if (event.published === false) s.stop("Deployed, but routing was not published — the project may be unreachable or still serving the previous deploy. Re-run `void deploy` to publish routing.");
|
|
2553
|
+
else s.stop("Deployed!");
|
|
2588
2554
|
return {
|
|
2589
2555
|
kind: "done",
|
|
2590
2556
|
event
|
|
@@ -2625,12 +2591,14 @@ async function streamDeployEvents(projectId, events, s, cliLog) {
|
|
|
2625
2591
|
deploymentId = result.deploymentId;
|
|
2626
2592
|
cliLog?.info("stream_deployment_id", { deploymentId });
|
|
2627
2593
|
} else if (result.kind === "done") {
|
|
2628
|
-
|
|
2594
|
+
const degraded = result.event.published === false;
|
|
2595
|
+
cliLog?.info(degraded ? "deploy_degraded" : "deploy_success", {
|
|
2629
2596
|
deploymentId,
|
|
2630
2597
|
url: result.event.url,
|
|
2631
2598
|
assets: result.event.assets,
|
|
2632
2599
|
workers: result.event.workers,
|
|
2633
|
-
durationMs: Date.now() - startedAt
|
|
2600
|
+
durationMs: Date.now() - startedAt,
|
|
2601
|
+
degraded
|
|
2634
2602
|
});
|
|
2635
2603
|
return result.event;
|
|
2636
2604
|
} else if (result.kind === "error") {
|
|
@@ -2770,7 +2738,8 @@ async function runStaticDeploy(root, config, client, preset, skipBuild, gitMetad
|
|
|
2770
2738
|
const buildStartedAt = Date.now();
|
|
2771
2739
|
execSync(preset.buildCommand, {
|
|
2772
2740
|
cwd: root,
|
|
2773
|
-
stdio: "inherit"
|
|
2741
|
+
stdio: "inherit",
|
|
2742
|
+
env: buildEnv()
|
|
2774
2743
|
});
|
|
2775
2744
|
cliLog?.info("build_end", { durationMs: Date.now() - buildStartedAt });
|
|
2776
2745
|
} else if (skipBuild) cliLog?.info("build_skipped", { reason: "skipBuild" });
|
|
@@ -2822,9 +2791,21 @@ async function runStaticDeploy(root, config, client, preset, skipBuild, gitMetad
|
|
|
2822
2791
|
});
|
|
2823
2792
|
const result = await streamDirectR2Deploy(client, config.projectId, manifest, assetManifest, assetFiles, needed, gitMetadata, neededSet !== null, void 0, s, cliLog);
|
|
2824
2793
|
Se([`${typeLabel} — ${formatKnownAssetSummary(result, skipped)}`].join("\n"), result.url);
|
|
2794
|
+
warnUnpublishedRouting(result);
|
|
2825
2795
|
ye("Done!");
|
|
2826
2796
|
}
|
|
2827
2797
|
/**
|
|
2798
|
+
* Surface a persistent warning when a deploy committed live but its routing
|
|
2799
|
+
* KV was not published. Uses `log.warn` (not the spinner) so the warning
|
|
2800
|
+
* survives the following `note`/`outro` calls and the user sees it after the
|
|
2801
|
+
* deploy summary. The deploy is still committed — this is a warning, not a
|
|
2802
|
+
* failure, so the process exit code is unaffected.
|
|
2803
|
+
*/
|
|
2804
|
+
function warnUnpublishedRouting(result) {
|
|
2805
|
+
if (result.published !== false) return;
|
|
2806
|
+
R.warn("Routing was not published for this deploy. The project may be unreachable (first deploy) or still serving the previous deploy. Re-run `void deploy` to publish routing.");
|
|
2807
|
+
}
|
|
2808
|
+
/**
|
|
2828
2809
|
* Emit a single aggregated lint warning when a `_redirects` file contains
|
|
2829
2810
|
* one or more `!` force suffixes on 3xx entries (e.g. `301!`, `302!`).
|
|
2830
2811
|
* The `!` is a no-op on redirects — we parse them as if the `!` weren't
|
|
@@ -2852,7 +2833,8 @@ async function runFrameworkDeploy(root, config, client, detected, fwPreset, void
|
|
|
2852
2833
|
const buildStartedAt = Date.now();
|
|
2853
2834
|
execSync(voidConfig.inference?.build ?? resolveProjectCommand(root, fwPreset.buildCommand), {
|
|
2854
2835
|
cwd: root,
|
|
2855
|
-
stdio: "inherit"
|
|
2836
|
+
stdio: "inherit",
|
|
2837
|
+
env: buildEnv()
|
|
2856
2838
|
});
|
|
2857
2839
|
cliLog?.info("build_end", { durationMs: Date.now() - buildStartedAt });
|
|
2858
2840
|
} else cliLog?.info("build_skipped", { reason: "skipBuild" });
|
|
@@ -3029,6 +3011,7 @@ async function runFrameworkDeploy(root, config, client, detected, fwPreset, void
|
|
|
3029
3011
|
summary.push(`Framework: ${detected.name}`);
|
|
3030
3012
|
Se(summary.join("\n"), result.url);
|
|
3031
3013
|
cleanupWrapper(root);
|
|
3014
|
+
warnUnpublishedRouting(result);
|
|
3032
3015
|
ye("Done!");
|
|
3033
3016
|
}
|
|
3034
3017
|
async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetadata, detected, cliLog) {
|
|
@@ -3045,10 +3028,7 @@ async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetad
|
|
|
3045
3028
|
execSync(resolveProjectCommand(root, "vite build"), {
|
|
3046
3029
|
cwd: root,
|
|
3047
3030
|
stdio: "inherit",
|
|
3048
|
-
env: {
|
|
3049
|
-
...process.env,
|
|
3050
|
-
VOID_DEPLOY_PROJECT_ID: config.projectId
|
|
3051
|
-
}
|
|
3031
|
+
env: buildEnv({ VOID_DEPLOY_PROJECT_ID: config.projectId })
|
|
3052
3032
|
});
|
|
3053
3033
|
cliLog?.info("build_end", { durationMs: Date.now() - buildStartedAt });
|
|
3054
3034
|
} catch (err) {
|
|
@@ -3196,7 +3176,7 @@ async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetad
|
|
|
3196
3176
|
else revalidate = perPageRules;
|
|
3197
3177
|
}
|
|
3198
3178
|
if (deployConfig.output === "static" && pageScan && !isSsr) {
|
|
3199
|
-
if (pageScan.pages.every((p) => p.
|
|
3179
|
+
if (pageScan.pages.every((p) => p.shouldPrerender && (p.params.length === 0 && !p.catchAll || p.hasGetPrerenderPaths)) && !(hasRoutes || hasMiddleware || hasWebSockets || authEnabled || liveConfig !== void 0) && schedules.length === 0 && queues.length === 0) {
|
|
3200
3180
|
R.info("All pages prerendered — deploying as static site");
|
|
3201
3181
|
cliLog?.info("full_to_static_redirect", { reason: "all_pages_prerendered" });
|
|
3202
3182
|
return runStaticDeploy(root, config, client, {
|
|
@@ -3223,6 +3203,7 @@ async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetad
|
|
|
3223
3203
|
dialect,
|
|
3224
3204
|
needsSandbox: effectiveBindings.needsSandbox
|
|
3225
3205
|
});
|
|
3206
|
+
const workerMain = resolveDeployWorkerMain(deployConfig, join(distDir, workerDirName));
|
|
3226
3207
|
const envVars = loadDeployEnv(root);
|
|
3227
3208
|
await assertEnvSchemaValid(root, client, config.projectId);
|
|
3228
3209
|
await applySchemaDefaultsToVars(root, envVars);
|
|
@@ -3264,6 +3245,7 @@ async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetad
|
|
|
3264
3245
|
const voidPackageOptions = {
|
|
3265
3246
|
compatibilityDate: wranglerCompat?.compatibilityDate,
|
|
3266
3247
|
compatibilityFlags: wranglerCompat?.compatibilityFlags,
|
|
3248
|
+
...workerMain && { workerMain },
|
|
3267
3249
|
...sandboxConfig && { sandbox: sandboxConfig },
|
|
3268
3250
|
...liveConfig && { live: liveConfig },
|
|
3269
3251
|
revalidateQueryAllowlist: deployConfig.routing?.revalidateQueryAllowlist
|
|
@@ -3311,6 +3293,7 @@ async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetad
|
|
|
3311
3293
|
}
|
|
3312
3294
|
}
|
|
3313
3295
|
const workerFiles = collectWorkerFiles(workerDir);
|
|
3296
|
+
assertWorkerMainUploaded(workerFiles, workerMain);
|
|
3314
3297
|
cliLog?.info("package_end", {
|
|
3315
3298
|
mode: "full",
|
|
3316
3299
|
durationMs: Date.now() - packageStartedAt
|
|
@@ -3326,6 +3309,7 @@ async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetad
|
|
|
3326
3309
|
else summary.push(`ISR revalidate: ${Object.keys(revalidate).length} path rule(s)`);
|
|
3327
3310
|
if (isFrameworkMode) summary.push("Framework mode");
|
|
3328
3311
|
Se(summary.join("\n"), result.url);
|
|
3312
|
+
warnUnpublishedRouting(result);
|
|
3329
3313
|
ye("Done!");
|
|
3330
3314
|
}
|
|
3331
3315
|
async function createProjectFromSlug(root, client, slug, cliLog) {
|
|
@@ -3348,17 +3332,21 @@ function getGitCommit(root) {
|
|
|
3348
3332
|
try {
|
|
3349
3333
|
const githubSha = process.env.GITHUB_SHA?.trim();
|
|
3350
3334
|
if (githubSha && /^[0-9a-f]{7,64}$/i.test(githubSha)) return githubSha;
|
|
3335
|
+
const gitEnv = buildEnv();
|
|
3351
3336
|
execSync("git rev-parse --is-inside-work-tree", {
|
|
3352
3337
|
cwd: root,
|
|
3353
|
-
stdio: "ignore"
|
|
3338
|
+
stdio: "ignore",
|
|
3339
|
+
env: gitEnv
|
|
3354
3340
|
});
|
|
3355
3341
|
if (execSync("git status --porcelain", {
|
|
3356
3342
|
cwd: root,
|
|
3357
|
-
encoding: "utf-8"
|
|
3343
|
+
encoding: "utf-8",
|
|
3344
|
+
env: gitEnv
|
|
3358
3345
|
}).trim() !== "") return null;
|
|
3359
3346
|
return execSync("git rev-parse HEAD", {
|
|
3360
3347
|
cwd: root,
|
|
3361
|
-
encoding: "utf-8"
|
|
3348
|
+
encoding: "utf-8",
|
|
3349
|
+
env: gitEnv
|
|
3362
3350
|
}).trim();
|
|
3363
3351
|
} catch {
|
|
3364
3352
|
return null;
|
|
@@ -3404,7 +3392,8 @@ function runDrizzleKitGenerate(root, configPath) {
|
|
|
3404
3392
|
configPath
|
|
3405
3393
|
], {
|
|
3406
3394
|
cwd: root,
|
|
3407
|
-
encoding: "utf-8"
|
|
3395
|
+
encoding: "utf-8",
|
|
3396
|
+
env: buildEnv()
|
|
3408
3397
|
});
|
|
3409
3398
|
const stderr = bufferToString(result.stderr);
|
|
3410
3399
|
const output = [stderr, bufferToString(result.stdout)].filter(Boolean).join("\n").trim();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as import_picocolors } from "./output-DeiS4oEX.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { d as getToken, n as PlatformClient } from "./client-D4awzTnj.mjs";
|
|
3
3
|
import { c as R, u as Se } from "./dist-abzUneor.mjs";
|
|
4
4
|
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
5
5
|
//#region src/cli/domain.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as isVoidSocialAuthProvider } from "./providers-
|
|
1
|
+
import { a as isVoidSocialAuthProvider } from "./providers-BwPbdHdi.mjs";
|
|
2
2
|
import { getAuthTables, getSchema } from "better-auth/db";
|
|
3
3
|
//#region src/auth/drizzle.ts
|
|
4
4
|
const DEFAULT_TABLE_ORDER = Number.MAX_SAFE_INTEGER;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as join } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
2
2
|
import { n as cliTitle } from "./output-DeiS4oEX.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { d as getToken, n as PlatformClient } from "./client-D4awzTnj.mjs";
|
|
4
4
|
import { c as R, g as ge, u as Se, y as ye } from "./dist-abzUneor.mjs";
|
|
5
5
|
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
6
|
-
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-
|
|
7
|
-
import { a as loadUserEnvFile, i as validateProdEnv, n as formatEnvReport, t as fetchRemoteSecretNames } from "./env-validation-
|
|
6
|
+
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-CaJaIRXU.mjs";
|
|
7
|
+
import { a as loadUserEnvFile, i as validateProdEnv, n as formatEnvReport, t as fetchRemoteSecretNames } from "./env-validation-LH6eoyW-.mjs";
|
|
8
8
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
9
9
|
//#region src/cli/env-example.ts
|
|
10
10
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as relative } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
2
2
|
import { n as readProjectPaths } from "./project-paths-CCMrHYQm.mjs";
|
|
3
|
-
import { i as voidWarn } from "./log-
|
|
3
|
+
import { i as voidWarn } from "./log-BdD_Fpms.mjs";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
//#region src/codegen/env-types.ts
|
|
6
6
|
/** Roots already warned about duplicate env.ts files — dedupes noisy repeat calls. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as join } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
2
|
-
import { i as voidWarn } from "./log-
|
|
3
|
-
import { n as mergeAndExpand, r as parseDotenvFile } from "./dotenv-
|
|
4
|
-
import { t as findEnvFile } from "./env-types-
|
|
2
|
+
import { i as voidWarn } from "./log-BdD_Fpms.mjs";
|
|
3
|
+
import { n as mergeAndExpand, r as parseDotenvFile } from "./dotenv-lS94ymhM.mjs";
|
|
4
|
+
import { t as findEnvFile } from "./env-types-CaJaIRXU.mjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
//#region src/host/load-user-env.ts
|
|
7
7
|
/**
|
|
@@ -2,12 +2,12 @@ import { a as join, n as dirname, s as relative } from "./pathe.M-eThtNZ-BrPhGF_
|
|
|
2
2
|
import { n as cliTitle } from "./output-DeiS4oEX.mjs";
|
|
3
3
|
import { n as readProjectPaths } from "./project-paths-CCMrHYQm.mjs";
|
|
4
4
|
import { _ as me, c as R, g as ge, i as Ee, x as q, y as ye } from "./dist-abzUneor.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { n as ensureProjectTsconfig } from "./project-tsconfig-BTNuNoJ0.mjs";
|
|
6
|
+
import { c as getDatabaseDialect, f as readConfig } from "./config-8dLIngKW.mjs";
|
|
7
7
|
import { n as writeDrizzleConfig } from "./config--wXmVOoe.mjs";
|
|
8
8
|
import { r as readJournal, t as collectMigrations } from "./collect-9rO3JFNM.mjs";
|
|
9
9
|
import { n as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-CNWm-PsL.mjs";
|
|
10
|
-
import { t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-
|
|
10
|
+
import { t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-DhCHHLAz.mjs";
|
|
11
11
|
import { existsSync, mkdirSync, readFileSync, readdirSync, unlinkSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { fileURLToPath } from "node:url";
|
|
13
13
|
import { spawnSync } from "node:child_process";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
//#region src/cli/git-metadata.ts
|
|
3
|
+
function git(root, args) {
|
|
4
|
+
try {
|
|
5
|
+
return execFileSync("git", args, {
|
|
6
|
+
cwd: root,
|
|
7
|
+
encoding: "utf-8",
|
|
8
|
+
stdio: [
|
|
9
|
+
"ignore",
|
|
10
|
+
"pipe",
|
|
11
|
+
"ignore"
|
|
12
|
+
]
|
|
13
|
+
}).trim();
|
|
14
|
+
} catch {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function stripGitSuffix(pathname) {
|
|
19
|
+
return pathname.endsWith(".git") ? pathname.slice(0, -4) : pathname;
|
|
20
|
+
}
|
|
21
|
+
function normalizeGitRemoteUrl(remote) {
|
|
22
|
+
if (!remote) return null;
|
|
23
|
+
const trimmed = remote.trim();
|
|
24
|
+
if (!trimmed) return null;
|
|
25
|
+
const scpLike = /^(?:[^@]+@)?([^:]+):(.+)$/.exec(trimmed);
|
|
26
|
+
if (scpLike && !trimmed.includes("://")) {
|
|
27
|
+
const host = scpLike[1]?.toLowerCase();
|
|
28
|
+
const path = stripGitSuffix(scpLike[2] ?? "").replace(/^\/+/, "");
|
|
29
|
+
return host && path ? `https://${host}/${path}` : null;
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
const url = new URL(trimmed);
|
|
33
|
+
if (url.protocol !== "https:" && url.protocol !== "http:" && url.protocol !== "ssh:") return null;
|
|
34
|
+
const host = url.hostname.toLowerCase();
|
|
35
|
+
const path = stripGitSuffix(url.pathname).replace(/^\/+/, "");
|
|
36
|
+
return host && path ? `https://${host}/${path}` : null;
|
|
37
|
+
} catch {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function buildCommitUrl(repositoryUrl, commit) {
|
|
42
|
+
if (!repositoryUrl || !commit) return null;
|
|
43
|
+
try {
|
|
44
|
+
const url = new URL(repositoryUrl);
|
|
45
|
+
if (url.hostname === "github.com") return `${repositoryUrl}/commit/${commit}`;
|
|
46
|
+
if (url.hostname === "gitlab.com") return `${repositoryUrl}/-/commit/${commit}`;
|
|
47
|
+
if (url.hostname === "bitbucket.org") return `${repositoryUrl}/commits/${commit}`;
|
|
48
|
+
} catch {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
function getGitRefFromEnv(env) {
|
|
54
|
+
if (env.GITHUB_HEAD_REF) return env.GITHUB_HEAD_REF;
|
|
55
|
+
if (env.GITHUB_REF_NAME) return env.GITHUB_REF_NAME;
|
|
56
|
+
if (env.GITHUB_REF) return env.GITHUB_REF.replace(/^refs\/(?:heads|tags|pull)\//, "");
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
function getGitHubRepositoryUrl(env) {
|
|
60
|
+
if (!env.GITHUB_REPOSITORY) return null;
|
|
61
|
+
return normalizeGitRemoteUrl(`${env.GITHUB_SERVER_URL ?? "https://github.com"}/${env.GITHUB_REPOSITORY}`);
|
|
62
|
+
}
|
|
63
|
+
function collectGitDeployMetadata(root, commit, env = process.env) {
|
|
64
|
+
const repositoryUrl = getGitHubRepositoryUrl(env) ?? normalizeGitRemoteUrl(git(root, [
|
|
65
|
+
"remote",
|
|
66
|
+
"get-url",
|
|
67
|
+
"origin"
|
|
68
|
+
]));
|
|
69
|
+
const gitRef = getGitRefFromEnv(env) ?? git(root, [
|
|
70
|
+
"rev-parse",
|
|
71
|
+
"--abbrev-ref",
|
|
72
|
+
"HEAD"
|
|
73
|
+
]);
|
|
74
|
+
return {
|
|
75
|
+
commit,
|
|
76
|
+
commitUrl: buildCommitUrl(repositoryUrl, commit),
|
|
77
|
+
gitRef: gitRef && gitRef !== "HEAD" ? gitRef : null,
|
|
78
|
+
repositoryUrl
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { collectGitDeployMetadata as t };
|