@donotdev/cli 0.0.18 → 0.0.19
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/dependencies-matrix.json +55 -156
- package/dist/bin/commands/coach.js +8177 -0
- package/dist/bin/commands/create-app.js +5 -5
- package/dist/bin/commands/create-project.js +10 -7
- package/dist/bin/commands/deploy.js +81 -59
- package/dist/bin/commands/doctor.js +243 -698
- package/dist/bin/commands/emu.js +2 -2
- package/dist/bin/commands/format.js +4 -1
- package/dist/bin/commands/get-demo.js +8351 -0
- package/dist/bin/commands/make-admin.js +773 -152
- package/dist/bin/commands/setup.js +519 -1711
- package/dist/bin/commands/staging.js +17852 -0
- package/dist/bin/commands/sync-secrets.js +2 -11
- package/dist/bin/commands/type-check.js +7733 -1713
- package/dist/bin/dndev.js +913 -185
- package/dist/bin/donotdev.js +913 -185
- package/dist/index.js +96 -65
- package/package.json +1 -1
- package/templates/app-demo/index.html.example +147 -10
- package/templates/app-demo/src/App.tsx.example +7 -13
- package/templates/app-demo/src/config/app.ts.example +12 -48
- package/templates/app-demo/src/entities/product.ts.example +38 -0
- package/templates/app-demo/src/globals.css.example +5 -1
- package/templates/app-demo/src/main.tsx.example +13 -7
- package/templates/app-demo/src/pages/ChangelogPage.tsx.example +14 -0
- package/templates/app-demo/src/pages/DashboardPage.tsx.example +15 -0
- package/templates/app-demo/src/pages/HomePage.tsx.example +3 -77
- package/templates/app-demo/src/pages/PricingPage.tsx.example +14 -0
- package/templates/app-demo/src/pages/ProductsPage.tsx.example +17 -0
- package/templates/app-demo/src/pages/ProfilePage.tsx.example +16 -0
- package/templates/app-demo/src/pages/SettingsPage.tsx.example +15 -0
- package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +112 -0
- package/templates/app-demo/src/pages/ShowcasePage.tsx.example +91 -0
- package/templates/app-demo/src/pages/legal/LegalPage.tsx.example +14 -0
- package/templates/app-demo/src/pages/legal/PrivacyPage.tsx.example +14 -0
- package/templates/app-demo/src/pages/legal/TermsPage.tsx.example +14 -0
- package/templates/app-demo/tsconfig.json.example +1 -1
- package/templates/app-demo/vite.config.ts.example +23 -48
- package/templates/app-expo/README.md.example +1 -1
- package/templates/app-expo/app/index.tsx.example +1 -1
- package/templates/app-vite/src/pages/HomePage.tsx.example +8 -10
- package/templates/overlay-firebase/env.fragment.example +1 -1
- package/templates/overlay-firebase/env.fragment.expo.example +1 -1
- package/templates/overlay-firebase/env.fragment.nextjs.example +1 -1
- package/templates/overlay-supabase/env.fragment.example +1 -1
- package/templates/overlay-supabase/env.fragment.expo.example +1 -1
- package/templates/overlay-supabase/env.fragment.nextjs.example +1 -1
- package/templates/overlay-vercel/env.fragment.example +1 -1
- package/templates/overlay-vercel/env.fragment.nextjs.example +1 -1
- package/templates/root-consumer/AI.md.example +4 -3
- package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +21 -6
- package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +16 -179
- package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +19 -21
- package/templates/root-consumer/guides/dndev/GOTCHAS.md.example +14 -3
- package/templates/root-consumer/guides/dndev/INDEX.md.example +2 -2
- package/templates/root-consumer/guides/dndev/SETUP_APP_CONFIG.md.example +3 -3
- package/templates/root-consumer/guides/dndev/SETUP_BLOG.md.example +19 -2
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +35 -1
- package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +17 -12
- package/templates/root-consumer/guides/dndev/SETUP_LAYOUTS.md.example +32 -0
- package/templates/root-consumer/guides/dndev/SETUP_OAUTH_PROVIDERS.md.example +1 -1
- package/templates/root-consumer/guides/dndev/SETUP_PAGES.md.example +19 -15
- package/templates/root-consumer/guides/dndev/SETUP_STRIPE.md.example +2 -2
- package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +17 -12
- package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +37 -16
- package/templates/root-consumer/guides/dndev/USE_ROUTING.md.example +18 -18
- package/templates/root-consumer/guides/dndev/essences_reference.css.example +119 -2
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +14 -0
- package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +6 -0
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +14 -0
- package/templates/root-consumer/guides/wai-way/entity_patterns.md.example +4 -5
- package/templates/root-consumer/guides/wai-way/page_patterns.md.example +2 -2
- package/dist/bin/commands/agent-setup.d.ts +0 -6
- package/dist/bin/commands/agent-setup.d.ts.map +0 -1
- package/dist/bin/commands/agent-setup.js.map +0 -1
- package/dist/bin/commands/build.d.ts +0 -11
- package/dist/bin/commands/build.d.ts.map +0 -1
- package/dist/bin/commands/build.js.map +0 -1
- package/dist/bin/commands/bump.d.ts +0 -11
- package/dist/bin/commands/bump.d.ts.map +0 -1
- package/dist/bin/commands/bump.js.map +0 -1
- package/dist/bin/commands/cacheout.d.ts +0 -11
- package/dist/bin/commands/cacheout.d.ts.map +0 -1
- package/dist/bin/commands/cacheout.js.map +0 -1
- package/dist/bin/commands/create-app.d.ts +0 -11
- package/dist/bin/commands/create-app.d.ts.map +0 -1
- package/dist/bin/commands/create-app.js.map +0 -1
- package/dist/bin/commands/create-project.d.ts +0 -11
- package/dist/bin/commands/create-project.d.ts.map +0 -1
- package/dist/bin/commands/create-project.js.map +0 -1
- package/dist/bin/commands/deploy.d.ts +0 -11
- package/dist/bin/commands/deploy.d.ts.map +0 -1
- package/dist/bin/commands/deploy.js.map +0 -1
- package/dist/bin/commands/dev.d.ts +0 -11
- package/dist/bin/commands/dev.d.ts.map +0 -1
- package/dist/bin/commands/dev.js.map +0 -1
- package/dist/bin/commands/doctor.d.ts +0 -6
- package/dist/bin/commands/doctor.d.ts.map +0 -1
- package/dist/bin/commands/doctor.js.map +0 -1
- package/dist/bin/commands/emu.d.ts +0 -11
- package/dist/bin/commands/emu.d.ts.map +0 -1
- package/dist/bin/commands/emu.js.map +0 -1
- package/dist/bin/commands/format.d.ts +0 -11
- package/dist/bin/commands/format.d.ts.map +0 -1
- package/dist/bin/commands/format.js.map +0 -1
- package/dist/bin/commands/make-admin.d.ts +0 -11
- package/dist/bin/commands/make-admin.d.ts.map +0 -1
- package/dist/bin/commands/make-admin.js.map +0 -1
- package/dist/bin/commands/preview.d.ts +0 -11
- package/dist/bin/commands/preview.d.ts.map +0 -1
- package/dist/bin/commands/preview.js.map +0 -1
- package/dist/bin/commands/setup.d.ts +0 -6
- package/dist/bin/commands/setup.d.ts.map +0 -1
- package/dist/bin/commands/setup.js.map +0 -1
- package/dist/bin/commands/sync-secrets.d.ts +0 -11
- package/dist/bin/commands/sync-secrets.d.ts.map +0 -1
- package/dist/bin/commands/sync-secrets.js.map +0 -1
- package/dist/bin/commands/type-check.d.ts +0 -14
- package/dist/bin/commands/type-check.d.ts.map +0 -1
- package/dist/bin/commands/type-check.js.map +0 -1
- package/dist/bin/commands/wai.d.ts +0 -11
- package/dist/bin/commands/wai.d.ts.map +0 -1
- package/dist/bin/commands/wai.js.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/templates/app-demo/src/components/ThemeToggle.tsx.example +0 -48
- package/templates/app-demo/src/pages/DetailPage.tsx.example +0 -103
- package/templates/app-demo/src/pages/FullPage.tsx.example +0 -142
- package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +0 -266
- package/templates/app-demo/src/pages/components/LayoutRoute.tsx.example +0 -20
|
@@ -8649,10 +8649,10 @@ function generateScripts(templateName, options) {
|
|
|
8649
8649
|
scripts.lint = "eslint .";
|
|
8650
8650
|
scripts["type-check"] = "tsc --noEmit";
|
|
8651
8651
|
} else if (templateName === "consumer-root") {
|
|
8652
|
-
scripts.dev = "
|
|
8652
|
+
scripts.dev = "dndev dev";
|
|
8653
8653
|
scripts.build = "turbo run build";
|
|
8654
8654
|
scripts.lint = "turbo run lint";
|
|
8655
|
-
scripts["type-check"] = "
|
|
8655
|
+
scripts["type-check"] = "dndev tc";
|
|
8656
8656
|
} else if (templateName.includes("functions")) {
|
|
8657
8657
|
scripts.build = "node build.mjs";
|
|
8658
8658
|
scripts["build:tsc"] = "tsc";
|
|
@@ -8663,9 +8663,9 @@ function generateScripts(templateName, options) {
|
|
|
8663
8663
|
scripts.dev = "vercel dev";
|
|
8664
8664
|
}
|
|
8665
8665
|
} else if (templateName === "demo") {
|
|
8666
|
-
scripts.dev = "
|
|
8667
|
-
scripts.build = "tsc --noEmit &&
|
|
8668
|
-
scripts.preview = "
|
|
8666
|
+
scripts.dev = "vite";
|
|
8667
|
+
scripts.build = "tsc --noEmit && vite build --mode production";
|
|
8668
|
+
scripts.preview = "vite preview";
|
|
8669
8669
|
scripts["type-check"] = "tsc --noEmit";
|
|
8670
8670
|
} else if (templateName === "entities") {
|
|
8671
8671
|
}
|
|
@@ -8969,10 +8969,10 @@ function generateScripts(templateName, options) {
|
|
|
8969
8969
|
scripts.lint = "eslint .";
|
|
8970
8970
|
scripts["type-check"] = "tsc --noEmit";
|
|
8971
8971
|
} else if (templateName === "consumer-root") {
|
|
8972
|
-
scripts.dev = "
|
|
8972
|
+
scripts.dev = "dndev dev";
|
|
8973
8973
|
scripts.build = "turbo run build";
|
|
8974
8974
|
scripts.lint = "turbo run lint";
|
|
8975
|
-
scripts["type-check"] = "
|
|
8975
|
+
scripts["type-check"] = "dndev tc";
|
|
8976
8976
|
} else if (templateName.includes("functions")) {
|
|
8977
8977
|
scripts.build = "node build.mjs";
|
|
8978
8978
|
scripts["build:tsc"] = "tsc";
|
|
@@ -8983,9 +8983,9 @@ function generateScripts(templateName, options) {
|
|
|
8983
8983
|
scripts.dev = "vercel dev";
|
|
8984
8984
|
}
|
|
8985
8985
|
} else if (templateName === "demo") {
|
|
8986
|
-
scripts.dev = "
|
|
8987
|
-
scripts.build = "tsc --noEmit &&
|
|
8988
|
-
scripts.preview = "
|
|
8986
|
+
scripts.dev = "vite";
|
|
8987
|
+
scripts.build = "tsc --noEmit && vite build --mode production";
|
|
8988
|
+
scripts.preview = "vite preview";
|
|
8989
8989
|
scripts["type-check"] = "tsc --noEmit";
|
|
8990
8990
|
} else if (templateName === "entities") {
|
|
8991
8991
|
}
|
|
@@ -9724,7 +9724,8 @@ async function main(options) {
|
|
|
9724
9724
|
Me(`Configuring "${trimmedName}"...`, "\u2699\uFE0F");
|
|
9725
9725
|
const config = await collectAppConfig(trimmedName);
|
|
9726
9726
|
appConfigs[trimmedName] = config;
|
|
9727
|
-
if (config.backend !== "none" || config.functions !== "none")
|
|
9727
|
+
if (config.backend !== "none" || config.functions !== "none")
|
|
9728
|
+
anyAppNeedsBackend = true;
|
|
9728
9729
|
}
|
|
9729
9730
|
let installDemoApp = await askForConfirmation(
|
|
9730
9731
|
"Would you like to install the demo app? (component showcase)",
|
|
@@ -9850,7 +9851,9 @@ async function main(options) {
|
|
|
9850
9851
|
overwrite: true
|
|
9851
9852
|
});
|
|
9852
9853
|
const relativeMonorepoPath = executionMode === "development" ? calculateRelativePath(projectDirNormalized, monorepoRoot) : "";
|
|
9853
|
-
const primaryPlatform = Object.values(appConfigs).find(
|
|
9854
|
+
const primaryPlatform = Object.values(appConfigs).find(
|
|
9855
|
+
(c) => c.backend !== "none"
|
|
9856
|
+
)?.backend ?? "firebase";
|
|
9854
9857
|
const rootPackageJson = generatePackageJson(
|
|
9855
9858
|
"consumer-root",
|
|
9856
9859
|
executionMode,
|
|
@@ -7847,7 +7847,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
|
7847
7847
|
function readdirSync2(dirPath, options) {
|
|
7848
7848
|
return pathResolverInstance.readdirSync(dirPath, options);
|
|
7849
7849
|
}
|
|
7850
|
-
var pathResolverInstance, resolvePackage, normalizePath, pathExists, readSync,
|
|
7850
|
+
var pathResolverInstance, resolvePackage, normalizePath, pathExists, readSync, writeSync, removeSync, statSync2, ensureDirSync, getRelativePathBetween, getDirname, joinPath;
|
|
7851
7851
|
var init_pathResolver = __esm({
|
|
7852
7852
|
"packages/tooling/src/utils/pathResolver.ts"() {
|
|
7853
7853
|
"use strict";
|
|
@@ -7860,12 +7860,9 @@ var init_pathResolver = __esm({
|
|
|
7860
7860
|
};
|
|
7861
7861
|
pathExists = (filePath, silent = false) => pathResolverInstance.pathExists(filePath, silent);
|
|
7862
7862
|
readSync = (filePath, options) => pathResolverInstance.readSync(filePath, options);
|
|
7863
|
-
write = async (filePath, content, options) => pathResolverInstance.write(filePath, content, options);
|
|
7864
7863
|
writeSync = (filePath, content, options) => pathResolverInstance.writeSync(filePath, content, options);
|
|
7865
|
-
remove = async (path) => pathResolverInstance.remove(path);
|
|
7866
7864
|
removeSync = (path) => pathResolverInstance.removeSync(path);
|
|
7867
7865
|
statSync2 = (filePath) => pathResolverInstance.statSync(filePath);
|
|
7868
|
-
ensureDir = async (dirPath) => pathResolverInstance.ensureDir(dirPath);
|
|
7869
7866
|
ensureDirSync = (dirPath) => pathResolverInstance.ensureDirSync(dirPath);
|
|
7870
7867
|
getRelativePathBetween = (from, to) => {
|
|
7871
7868
|
return normalizePath(relative2(from, to));
|
|
@@ -8181,21 +8178,21 @@ function getCLIInstallInstructions(tool) {
|
|
|
8181
8178
|
]
|
|
8182
8179
|
},
|
|
8183
8180
|
[CLI_TOOLS.YARN]: {
|
|
8184
|
-
win32: ["
|
|
8185
|
-
darwin: ["
|
|
8186
|
-
linux: ["
|
|
8181
|
+
win32: ["bun install -g yarn", "Or: choco install yarn"],
|
|
8182
|
+
darwin: ["bun install -g yarn", "Or: brew install yarn"],
|
|
8183
|
+
linux: ["bun install -g yarn", "Or check your package manager"]
|
|
8187
8184
|
},
|
|
8188
8185
|
[CLI_TOOLS.FIREBASE]: {
|
|
8189
8186
|
win32: [
|
|
8190
|
-
"
|
|
8187
|
+
"bun install -g firebase-tools",
|
|
8191
8188
|
"Or download standalone binary: https://firebase.google.com/docs/cli#windows-standalone-binary"
|
|
8192
8189
|
],
|
|
8193
8190
|
darwin: [
|
|
8194
|
-
"
|
|
8191
|
+
"bun install -g firebase-tools",
|
|
8195
8192
|
"Or: brew install firebase-cli"
|
|
8196
8193
|
],
|
|
8197
8194
|
linux: [
|
|
8198
|
-
"
|
|
8195
|
+
"bun install -g firebase-tools",
|
|
8199
8196
|
"Or check your package manager (dnf, apt, pacman, etc.)"
|
|
8200
8197
|
]
|
|
8201
8198
|
},
|
|
@@ -8212,25 +8209,25 @@ function getCLIInstallInstructions(tool) {
|
|
|
8212
8209
|
]
|
|
8213
8210
|
},
|
|
8214
8211
|
[CLI_TOOLS.VERCEL]: {
|
|
8215
|
-
win32: ["
|
|
8212
|
+
win32: ["bun install -g vercel", "Or: bunx vercel (no install)"],
|
|
8216
8213
|
darwin: [
|
|
8217
|
-
"
|
|
8214
|
+
"bun install -g vercel",
|
|
8218
8215
|
"Or: brew install vercel",
|
|
8219
|
-
"Or:
|
|
8216
|
+
"Or: bunx vercel"
|
|
8220
8217
|
],
|
|
8221
|
-
linux: ["
|
|
8218
|
+
linux: ["bun install -g vercel", "Or: bunx vercel"]
|
|
8222
8219
|
},
|
|
8223
8220
|
[CLI_TOOLS.SENTRY_CLI]: {
|
|
8224
8221
|
win32: [
|
|
8225
|
-
"
|
|
8222
|
+
"bun install -g @sentry/cli",
|
|
8226
8223
|
"Or download from: https://github.com/getsentry/sentry-cli/releases"
|
|
8227
8224
|
],
|
|
8228
8225
|
darwin: [
|
|
8229
|
-
"
|
|
8226
|
+
"bun install -g @sentry/cli",
|
|
8230
8227
|
"Or: brew install getsentry/tools/sentry-cli"
|
|
8231
8228
|
],
|
|
8232
8229
|
linux: [
|
|
8233
|
-
"
|
|
8230
|
+
"bun install -g @sentry/cli",
|
|
8234
8231
|
"Or: curl -sL https://sentry.io/get-cli/ | bash"
|
|
8235
8232
|
]
|
|
8236
8233
|
},
|
|
@@ -8259,9 +8256,9 @@ function getCLIInstallInstructions(tool) {
|
|
|
8259
8256
|
]
|
|
8260
8257
|
},
|
|
8261
8258
|
[CLI_TOOLS.TSX]: {
|
|
8262
|
-
win32: ["
|
|
8263
|
-
darwin: ["
|
|
8264
|
-
linux: ["
|
|
8259
|
+
win32: ["bun install -g tsx"],
|
|
8260
|
+
darwin: ["bun install -g tsx"],
|
|
8261
|
+
linux: ["bun install -g tsx"]
|
|
8265
8262
|
}
|
|
8266
8263
|
};
|
|
8267
8264
|
const platformInstructions = instructions[tool]?.[platform] || instructions[tool]?.linux || [];
|
|
@@ -8356,14 +8353,27 @@ function readEnvVar(filePath, varName) {
|
|
|
8356
8353
|
}
|
|
8357
8354
|
return null;
|
|
8358
8355
|
}
|
|
8359
|
-
function
|
|
8360
|
-
if (process.env
|
|
8361
|
-
const
|
|
8362
|
-
if (fromEnv) return fromEnv;
|
|
8363
|
-
const fromLocal = readEnvVar(joinPath(appDir, ".env.local"), "VERCEL_TOKEN");
|
|
8356
|
+
function resolveVercelVar(appDir, varName) {
|
|
8357
|
+
if (process.env[varName]) return process.env[varName];
|
|
8358
|
+
const fromLocal = readEnvVar(joinPath(appDir, ".env.local"), varName);
|
|
8364
8359
|
if (fromLocal) return fromLocal;
|
|
8360
|
+
const fromEnv = readEnvVar(joinPath(appDir, ".env"), varName);
|
|
8361
|
+
if (fromEnv) return fromEnv;
|
|
8365
8362
|
return null;
|
|
8366
8363
|
}
|
|
8364
|
+
function resolveVercelCredentials(appDir) {
|
|
8365
|
+
const token = resolveVercelVar(appDir, "VERCEL_TOKEN");
|
|
8366
|
+
const orgId = resolveVercelVar(appDir, "VERCEL_ORG_ID");
|
|
8367
|
+
const projectId = resolveVercelVar(appDir, "VERCEL_PROJECT_ID");
|
|
8368
|
+
const missing = [];
|
|
8369
|
+
if (!token) missing.push("VERCEL_TOKEN");
|
|
8370
|
+
if (!orgId) missing.push("VERCEL_ORG_ID");
|
|
8371
|
+
if (!projectId) missing.push("VERCEL_PROJECT_ID");
|
|
8372
|
+
if (missing.length > 0) return { missing };
|
|
8373
|
+
return {
|
|
8374
|
+
credentials: { token, orgId, projectId }
|
|
8375
|
+
};
|
|
8376
|
+
}
|
|
8367
8377
|
var init_vercel_token = __esm({
|
|
8368
8378
|
"packages/tooling/src/cli/setup/vercel-token.ts"() {
|
|
8369
8379
|
"use strict";
|
|
@@ -15943,10 +15953,7 @@ async function setFirebaseSecret(key, value, projectId, dryRun = false, cwd) {
|
|
|
15943
15953
|
}
|
|
15944
15954
|
try {
|
|
15945
15955
|
log.info(`Setting Firebase secret: ${key} (project: ${finalProjectId})`);
|
|
15946
|
-
const
|
|
15947
|
-
await ensureDir(tempDir);
|
|
15948
|
-
const tempFile = joinPath(tempDir, `secret-${key}-${Date.now()}.txt`);
|
|
15949
|
-
await write(tempFile, value);
|
|
15956
|
+
const tempFile = "";
|
|
15950
15957
|
try {
|
|
15951
15958
|
const args = ["functions:secrets:set", key, "--project", finalProjectId];
|
|
15952
15959
|
const firebaseCmd = process.platform === "win32" ? "firebase.cmd" : "firebase";
|
|
@@ -16021,9 +16028,6 @@ ${errorOutput}`
|
|
|
16021
16028
|
}
|
|
16022
16029
|
log.success(`Firebase secret ${key} set successfully`);
|
|
16023
16030
|
} finally {
|
|
16024
|
-
if (pathExists(tempFile)) {
|
|
16025
|
-
await remove(tempFile);
|
|
16026
|
-
}
|
|
16027
16031
|
}
|
|
16028
16032
|
} catch (err) {
|
|
16029
16033
|
log.error(`Failed to set Firebase secret ${key}:`, err);
|
|
@@ -16601,33 +16605,39 @@ init_cli_output();
|
|
|
16601
16605
|
init_vercel_token();
|
|
16602
16606
|
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
16603
16607
|
async function deployVercelFrontend(appDir, _config) {
|
|
16604
|
-
const
|
|
16605
|
-
|
|
16606
|
-
|
|
16607
|
-
|
|
16608
|
-
|
|
16609
|
-
|
|
16610
|
-
const args = ["vercel", "--prod", "--yes"];
|
|
16611
|
-
if (token) {
|
|
16612
|
-
args.push("--token", token);
|
|
16608
|
+
const result = resolveVercelCredentials(appDir);
|
|
16609
|
+
if (result.missing) {
|
|
16610
|
+
throw new Error(
|
|
16611
|
+
`Missing Vercel credentials in .env.local: ${result.missing.join(", ")}
|
|
16612
|
+
Add them to apps/<app>/.env.local \u2014 see guides/dndev/SETUP_VERCEL.md`
|
|
16613
|
+
);
|
|
16613
16614
|
}
|
|
16614
|
-
|
|
16615
|
-
|
|
16615
|
+
const { token, orgId, projectId } = result.credentials;
|
|
16616
|
+
log.debug("Using Vercel credentials from .env (token-based auth)");
|
|
16617
|
+
log.info("Deploying to Vercel...");
|
|
16618
|
+
const deployResult = spawnSync3(
|
|
16619
|
+
"bunx",
|
|
16620
|
+
["vercel", "deploy", "--prod", "--yes", "--token", token],
|
|
16621
|
+
{
|
|
16616
16622
|
cwd: appDir,
|
|
16617
|
-
|
|
16618
|
-
|
|
16619
|
-
|
|
16620
|
-
|
|
16621
|
-
|
|
16622
|
-
|
|
16623
|
-
|
|
16624
|
-
|
|
16625
|
-
);
|
|
16623
|
+
// stdout piped to capture deployment URL, stderr inherits for progress
|
|
16624
|
+
stdio: ["inherit", "pipe", "inherit"],
|
|
16625
|
+
encoding: "utf-8",
|
|
16626
|
+
env: {
|
|
16627
|
+
...process.env,
|
|
16628
|
+
VERCEL_ORG_ID: orgId,
|
|
16629
|
+
VERCEL_PROJECT_ID: projectId
|
|
16630
|
+
}
|
|
16626
16631
|
}
|
|
16627
|
-
|
|
16628
|
-
|
|
16629
|
-
|
|
16630
|
-
|
|
16632
|
+
);
|
|
16633
|
+
if (deployResult.status !== 0) {
|
|
16634
|
+
throw new Error(`vercel deploy exited with code ${deployResult.status}`);
|
|
16635
|
+
}
|
|
16636
|
+
const deployUrl = deployResult.stdout?.trim();
|
|
16637
|
+
if (deployUrl) {
|
|
16638
|
+
log.success(`Production: ${deployUrl}`);
|
|
16639
|
+
} else {
|
|
16640
|
+
log.success("Frontend deployed to Vercel");
|
|
16631
16641
|
}
|
|
16632
16642
|
}
|
|
16633
16643
|
|
|
@@ -16989,7 +16999,7 @@ async function deployFunctions(appDir, serviceAccountPath, projectId, config) {
|
|
|
16989
16999
|
|
|
16990
17000
|
To fix this, run:
|
|
16991
17001
|
cd ${functionsDir}
|
|
16992
|
-
|
|
17002
|
+
bun install --production`,
|
|
16993
17003
|
"file-not-found",
|
|
16994
17004
|
{ context: { missingPackages, functionsDir } }
|
|
16995
17005
|
);
|
|
@@ -17354,7 +17364,19 @@ function detectProvider(appDir) {
|
|
|
17354
17364
|
const supabaseFunctionsDir = joinPath(supabaseDir, "functions");
|
|
17355
17365
|
const supabaseMigrationsDir = joinPath(supabaseDir, "migrations");
|
|
17356
17366
|
const hasFirebase = pathExists(firebaseJsonPath);
|
|
17357
|
-
|
|
17367
|
+
let hasSupabase = pathExists(supabaseDir) || pathExists(supabaseConfigPath);
|
|
17368
|
+
if (!hasSupabase) {
|
|
17369
|
+
try {
|
|
17370
|
+
const envPath = joinPath(appDir, ".env");
|
|
17371
|
+
if (pathExists(envPath)) {
|
|
17372
|
+
const envContent = readSync(envPath);
|
|
17373
|
+
if (envContent.match(/VITE_SUPABASE_URL=.+/)) {
|
|
17374
|
+
hasSupabase = true;
|
|
17375
|
+
}
|
|
17376
|
+
}
|
|
17377
|
+
} catch {
|
|
17378
|
+
}
|
|
17379
|
+
}
|
|
17358
17380
|
let provider = "unknown";
|
|
17359
17381
|
if (hasFirebase && hasSupabase) {
|
|
17360
17382
|
provider = "both";
|
|
@@ -17718,7 +17740,7 @@ async function main2(options = {}) {
|
|
|
17718
17740
|
if (shouldDeployVercelFrontend) {
|
|
17719
17741
|
requireCLI(
|
|
17720
17742
|
CLI_TOOLS.VERCEL,
|
|
17721
|
-
"Vercel CLI is required to deploy the frontend.\nInstall:
|
|
17743
|
+
"Vercel CLI is required to deploy the frontend.\nInstall: bun install -g vercel"
|
|
17722
17744
|
);
|
|
17723
17745
|
}
|
|
17724
17746
|
if (shouldDeployFirebaseFrontend && serviceAccountPath && config.project) {
|