@donotdev/cli 0.3.1 → 0.3.2
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 +51 -27
- package/dist/bin/commands/agent-setup.js +28 -18
- package/dist/bin/commands/build.js +1086 -58
- package/dist/bin/commands/bump.js +337 -53
- package/dist/bin/commands/cacheout.js +28 -18
- package/dist/bin/commands/coach.js +33 -25
- package/dist/bin/commands/create-app.js +597 -244
- package/dist/bin/commands/create-project.js +607 -254
- package/dist/bin/commands/db-check.js +37 -28
- package/dist/bin/commands/db.js +37 -28
- package/dist/bin/commands/deploy.js +13758 -11807
- package/dist/bin/commands/dev.js +50 -34
- package/dist/bin/commands/doctor.js +33 -25
- package/dist/bin/commands/emu.js +65 -43
- package/dist/bin/commands/format.js +28 -18
- package/dist/bin/commands/get-demo.js +81 -46
- package/dist/bin/commands/make-admin.js +966 -905
- package/dist/bin/commands/preview.js +50 -34
- package/dist/bin/commands/seed.js +37 -28
- package/dist/bin/commands/setup-cicd.js +1286 -87
- package/dist/bin/commands/setup.js +152 -138
- package/dist/bin/commands/staging.js +13758 -11807
- package/dist/bin/commands/sync-secrets.js +152 -132
- package/dist/bin/commands/type-check.js +1086 -39
- package/dist/bin/commands/wai.js +28 -18
- package/dist/bin/dndev.js +501 -27
- package/dist/index.js +14568 -12497
- package/package.json +1 -1
- package/templates/app-demo/index.html.example +0 -1
- package/templates/app-demo/src/pages/ConditionalFormPage.tsx.example +2 -2
- package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +1 -0
- package/templates/app-demo/tsconfig.json.example +1 -1
- package/templates/app-dndev/index.html.example +1 -3
- package/templates/app-expo/app/_layout.tsx.example +1 -1
- package/templates/app-expo/app/form.tsx.example +10 -3
- package/templates/app-expo/app/index.tsx.example +3 -3
- package/templates/app-expo/app/list.tsx.example +2 -2
- package/templates/app-expo/app/profile.tsx.example +4 -3
- package/templates/app-expo/app/signin.tsx.example +2 -2
- package/templates/app-expo/babel.config.js.example +23 -6
- package/templates/app-expo/metro.config.js.example +7 -17
- package/templates/app-expo/tsconfig.json.example +2 -1
- package/templates/app-next/src/app/AppDocument.tsx.example +2 -3
- package/templates/app-vite/index.html.example +1 -3
- package/templates/app-vite/src/locales/home_en.json.example +6 -6
- package/templates/app-vite/src/pages/FormPageExample.tsx.example +1 -1
- package/templates/app-vite/src/pages/HomePage.tsx.example +3 -3
- package/templates/deploy-config/firebase.json.example +6 -5
- package/templates/deploy-config/tsconfig.functions.json.example +2 -7
- package/templates/deploy-config/vercel.json.example +5 -56
- package/templates/functions-firebase/README.md.example +8 -8
- package/templates/functions-firebase/functions.config.js.example +2 -1
- package/templates/functions-firebase/src/index.ts.example +4 -3
- package/templates/functions-firebase/src/oauth/exchangeToken.ts.example +8 -6
- package/templates/functions-firebase/src/oauth/refreshToken.ts.example +8 -6
- package/templates/functions-firebase/tsconfig.json.example +3 -5
- package/templates/functions-supabase/supabase/config.toml.example +2 -1
- package/templates/functions-supabase/supabase/functions/change-plan/index.ts.example +2 -3
- package/templates/functions-supabase/supabase/functions/create-checkout-session/index.ts.example +2 -3
- package/templates/functions-supabase/supabase/functions/stripe-webhook/index.ts.example +2 -3
- package/templates/functions-vercel/README.md.example +15 -25
- package/templates/functions-vercel/build.mjs.example +4 -46
- package/templates/functions-vercel/src/api/auth/setCustomClaims.ts.example +6 -11
- package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +2 -3
- package/templates/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +5 -11
- package/templates/functions-vercel/src/api/oauth/exchangeToken.ts.example +5 -11
- package/templates/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +5 -11
- package/templates/functions-vercel/tsconfig.json.example +5 -6
- package/templates/github/workflows/firebase-deploy.yml.example +1 -1
- package/templates/preset-admin/src/pages/DashboardPage.tsx.example +3 -2
- package/templates/preset-admin/src/pages/ReportsPage.tsx.example +13 -12
- package/templates/preset-admin/src/pages/SettingsPage.tsx.example +5 -5
- package/templates/preset-admin/src/pages/UsersPage.tsx.example +13 -12
- package/templates/preset-ecommerce/src/pages/CartPage.tsx.example +5 -5
- package/templates/preset-ecommerce/src/pages/CatalogPage.tsx.example +1 -4
- package/templates/preset-ecommerce/src/pages/CheckoutPage.tsx.example +10 -12
- package/templates/preset-ecommerce/src/pages/ProductPage.tsx.example +7 -4
- package/templates/preset-landing/src/pages/AboutPage.tsx.example +11 -9
- package/templates/preset-landing/src/pages/ContactPage.tsx.example +13 -7
- package/templates/preset-landing/src/pages/HomePage.tsx.example +50 -32
- package/templates/preset-saas/src/pages/DashboardPage.tsx.example +1 -1
- package/templates/preset-saas/src/pages/HomePage.tsx.example +3 -2
- package/templates/preset-saas/src/pages/PricingPage.tsx.example +4 -3
- package/templates/preset-saas/src/pages/ProfilePage.tsx.example +7 -7
- package/templates/preset-saas/src/pages/SettingsPage.tsx.example +3 -3
- package/templates/root-consumer/.claude/hooks/guard-bash.sh.example +101 -10
- package/templates/root-consumer/.claude/rules/definition-of-done.md.example +2 -2
- package/templates/root-consumer/.claude/rules/framework.md.example +1 -1
- package/templates/root-consumer/.claude/settings.json.example +0 -11
- package/templates/root-consumer/.claude/skills/build/SKILL.md.example +1 -1
- package/templates/root-consumer/.dndev/args.json.example +2 -2
- package/templates/root-consumer/.env.example +1 -1
- package/templates/root-consumer/AGENTS.md.example +3 -3
- package/templates/root-consumer/README.md.example +1 -1
- package/templates/functions-vercel/src/api/oauth/disconnect.ts.example +0 -20
- package/templates/functions-vercel/src/api/oauth/getConnections.ts.example +0 -20
- package/templates/functions-vercel/src/api/oauth/refreshToken.ts.example +0 -20
- package/templates/functions-vercel/vercel.json.example +0 -14
- package/templates/root-consumer/.claude/hooks/typecheck-stop.sh.example +0 -18
|
@@ -7452,11 +7452,12 @@ function getPatternsFor(type, repoRoot = null) {
|
|
|
7452
7452
|
function getGlobOptionsFor(type) {
|
|
7453
7453
|
return GLOB_OPTIONS[type] || GLOB_OPTIONS.base;
|
|
7454
7454
|
}
|
|
7455
|
-
var I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
|
|
7455
|
+
var DEFAULT_OG_IMAGE, I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
|
|
7456
7456
|
var init_constants = __esm({
|
|
7457
7457
|
"packages/core/config/constants.js"() {
|
|
7458
7458
|
"use strict";
|
|
7459
7459
|
init_utils2();
|
|
7460
|
+
DEFAULT_OG_IMAGE = "/og-image.png";
|
|
7460
7461
|
I18N_PATHS = {
|
|
7461
7462
|
// Monorepo source structure (locales at root, not in src/)
|
|
7462
7463
|
SOURCE_ROOT: "packages/core/i18n",
|
|
@@ -7467,7 +7468,9 @@ var init_constants = __esm({
|
|
|
7467
7468
|
PUBLISHED_ROOT: "i18n",
|
|
7468
7469
|
PUBLISHED_LOCALES: "i18n/locales",
|
|
7469
7470
|
PUBLISHED_EAGER: "i18n/locales/eager",
|
|
7470
|
-
PUBLISHED_LAZY: "i18n/locales/lazy"
|
|
7471
|
+
PUBLISHED_LAZY: "i18n/locales/lazy",
|
|
7472
|
+
// Flag artwork: one SVG per flag code (flagFileName), copied to public/flags/ (AssetDiscovery)
|
|
7473
|
+
PUBLISHED_FLAGS: "i18n/flags"
|
|
7471
7474
|
};
|
|
7472
7475
|
SCAN_PATTERNS = {
|
|
7473
7476
|
routes: {
|
|
@@ -7529,7 +7532,12 @@ var init_constants = __esm({
|
|
|
7529
7532
|
"logo.avif",
|
|
7530
7533
|
"apple-touch-icon*.png",
|
|
7531
7534
|
"android-chrome-*.png",
|
|
7532
|
-
|
|
7535
|
+
// Generated from logo.svg (AssetDiscovery._generateMissingAssets) or the app's own
|
|
7536
|
+
"icon-*x*.png",
|
|
7537
|
+
DEFAULT_OG_IMAGE.slice(1)
|
|
7538
|
+
// Not manifest.json: the web app manifest is a build output on Next (the PWA step
|
|
7539
|
+
// rewrites it after this scan), so its scanned size would differ between a clean
|
|
7540
|
+
// build and a rebuild. The asset manifest's `manifest` reads it from disk instead.
|
|
7533
7541
|
],
|
|
7534
7542
|
fonts: ["fonts/**/*.woff2", "fonts/**/*.woff", "fonts/**/*.ttf"],
|
|
7535
7543
|
framework: ["packages/ui/assets/**/*"]
|
|
@@ -7606,7 +7614,6 @@ import {
|
|
|
7606
7614
|
sep,
|
|
7607
7615
|
extname
|
|
7608
7616
|
} from "node:path";
|
|
7609
|
-
import { fileURLToPath } from "node:url";
|
|
7610
7617
|
function isEexistError(error2) {
|
|
7611
7618
|
return typeof error2 === "object" && error2 !== null && "code" in error2 && error2.code === "EEXIST";
|
|
7612
7619
|
}
|
|
@@ -8428,7 +8435,10 @@ var init_PathResolver = __esm({
|
|
|
8428
8435
|
return resolvedPath;
|
|
8429
8436
|
}
|
|
8430
8437
|
/**
|
|
8431
|
-
* Execute fast-glob with normalized results
|
|
8438
|
+
* Execute fast-glob with normalized results, sorted. fast-glob returns files in
|
|
8439
|
+
* filesystem completion order, which varies between runs: every discovery (routes,
|
|
8440
|
+
* themes, i18n, assets) and what it generates (route manifest, sitemap, llms.txt,
|
|
8441
|
+
* proxy) must list the same sources in the same order on every build.
|
|
8432
8442
|
* @private
|
|
8433
8443
|
*/
|
|
8434
8444
|
async _globWithNormalization(patterns, options) {
|
|
@@ -8436,7 +8446,7 @@ var init_PathResolver = __esm({
|
|
|
8436
8446
|
return results.map((path) => {
|
|
8437
8447
|
const pathStr = typeof path === "string" ? path : path.path;
|
|
8438
8448
|
return this.normalizePath(pathStr);
|
|
8439
|
-
});
|
|
8449
|
+
}).sort();
|
|
8440
8450
|
}
|
|
8441
8451
|
/**
|
|
8442
8452
|
* Resolve files using patterns with cross-platform support
|
|
@@ -8591,15 +8601,6 @@ var init_PathResolver = __esm({
|
|
|
8591
8601
|
const cjsPath = this.getEmptyCjsModulePath();
|
|
8592
8602
|
return cjsPath.replace(/\.cjs$/, ".js");
|
|
8593
8603
|
}
|
|
8594
|
-
/**
|
|
8595
|
-
* Get absolute path to empty flag component module.
|
|
8596
|
-
* Returns `export default () => null;` — used by flag filtering plugins
|
|
8597
|
-
* to replace unused flag files at build time.
|
|
8598
|
-
*/
|
|
8599
|
-
getEmptyFlagModulePath() {
|
|
8600
|
-
const __dirname2 = dirname2(fileURLToPath(import.meta.url));
|
|
8601
|
-
return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
|
|
8602
|
-
}
|
|
8603
8604
|
/**
|
|
8604
8605
|
* Get absolute path to empty CJS module for esbuild pre-bundling.
|
|
8605
8606
|
* CJS because esbuild statically analyzes ESM exports — CJS has dynamic
|
|
@@ -8732,7 +8733,7 @@ import {
|
|
|
8732
8733
|
parse,
|
|
8733
8734
|
isAbsolute as pathIsAbsolute
|
|
8734
8735
|
} from "node:path";
|
|
8735
|
-
import { fileURLToPath
|
|
8736
|
+
import { fileURLToPath } from "node:url";
|
|
8736
8737
|
function readdirSync3(dirPath, options) {
|
|
8737
8738
|
if (options !== null && typeof options === "object" && options.withFileTypes === true) {
|
|
8738
8739
|
return pathResolverInstance.readdirSync(dirPath, options);
|
|
@@ -8740,7 +8741,7 @@ function readdirSync3(dirPath, options) {
|
|
|
8740
8741
|
return pathResolverInstance.readdirSync(dirPath, options);
|
|
8741
8742
|
}
|
|
8742
8743
|
function getDirnameFromUrl(importMetaUrl) {
|
|
8743
|
-
return dirname3(
|
|
8744
|
+
return dirname3(fileURLToPath(importMetaUrl));
|
|
8744
8745
|
}
|
|
8745
8746
|
function findNodeModulesDir(startDir) {
|
|
8746
8747
|
let currentDir = normalizePath(startDir);
|
|
@@ -8790,7 +8791,7 @@ function getBinPath(binaryName) {
|
|
|
8790
8791
|
return binaryName;
|
|
8791
8792
|
}
|
|
8792
8793
|
function detectExecutionMode() {
|
|
8793
|
-
const fileUrlPath =
|
|
8794
|
+
const fileUrlPath = fileURLToPath(import.meta.url);
|
|
8794
8795
|
if (fileUrlPath.includes("node_modules")) {
|
|
8795
8796
|
return "published";
|
|
8796
8797
|
}
|
|
@@ -8802,7 +8803,7 @@ function detectExecutionMode() {
|
|
|
8802
8803
|
function getTemplatesRoot() {
|
|
8803
8804
|
const mode = detectExecutionMode();
|
|
8804
8805
|
if (mode === "development") {
|
|
8805
|
-
const fileUrlPath =
|
|
8806
|
+
const fileUrlPath = fileURLToPath(import.meta.url);
|
|
8806
8807
|
const frameworkRoot = normalizePath(dirname3(fileUrlPath), "../../../..");
|
|
8807
8808
|
return normalizePath(frameworkRoot, PACKAGE_PATHS.CLI, "templates");
|
|
8808
8809
|
} else {
|
|
@@ -9114,13 +9115,13 @@ import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFile
|
|
|
9114
9115
|
import { createRequire as createRequire3 } from "node:module";
|
|
9115
9116
|
import { dirname as dirname4, resolve as resolve3 } from "node:path";
|
|
9116
9117
|
import process from "node:process";
|
|
9117
|
-
import { fileURLToPath as
|
|
9118
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
9118
9119
|
var require2, __filename, __dirname;
|
|
9119
9120
|
var init_utils2 = __esm({
|
|
9120
9121
|
"packages/tooling/src/bundler/utils.ts"() {
|
|
9121
9122
|
"use strict";
|
|
9122
9123
|
require2 = createRequire3(import.meta.url);
|
|
9123
|
-
__filename =
|
|
9124
|
+
__filename = fileURLToPath2(import.meta.url);
|
|
9124
9125
|
__dirname = dirname4(__filename);
|
|
9125
9126
|
if (typeof globalThis !== "undefined") {
|
|
9126
9127
|
globalThis.require = require2;
|
|
@@ -9136,6 +9137,9 @@ var init_utils2 = __esm({
|
|
|
9136
9137
|
});
|
|
9137
9138
|
|
|
9138
9139
|
// packages/tooling/src/utils/app-detection.ts
|
|
9140
|
+
function isVercelFunctionsDir(functionsDir) {
|
|
9141
|
+
return statSync2(joinPath(functionsDir, "src", "api"))?.isDirectory() ?? false;
|
|
9142
|
+
}
|
|
9139
9143
|
function detectApps(projectRoot) {
|
|
9140
9144
|
const apps = [];
|
|
9141
9145
|
const appsDir = joinPath(projectRoot, "apps");
|
|
@@ -9276,13 +9280,8 @@ function analyzeApp(appPath, appName) {
|
|
|
9276
9280
|
functions = "supabase";
|
|
9277
9281
|
}
|
|
9278
9282
|
}
|
|
9279
|
-
if (!functions) {
|
|
9280
|
-
|
|
9281
|
-
const apiDir = joinPath(appPath, "api");
|
|
9282
|
-
const apiDirStat = statSync2(apiDir);
|
|
9283
|
-
if (pathExists(vercelJsonPath) && pathExists(apiDir) && (apiDirStat?.isDirectory() ?? false)) {
|
|
9284
|
-
functions = "vercel";
|
|
9285
|
-
}
|
|
9283
|
+
if (!functions && isVercelFunctionsDir(joinPath(appPath, "functions"))) {
|
|
9284
|
+
functions = "vercel";
|
|
9286
9285
|
}
|
|
9287
9286
|
let hosting;
|
|
9288
9287
|
if (hasFirebase && firebaseConfig?.hasHosting) {
|
|
@@ -9359,6 +9358,14 @@ var init_app_selector = __esm({
|
|
|
9359
9358
|
}
|
|
9360
9359
|
});
|
|
9361
9360
|
|
|
9361
|
+
// packages/tooling/src/utils/create-utils.ts
|
|
9362
|
+
var init_create_utils = __esm({
|
|
9363
|
+
"packages/tooling/src/utils/create-utils.ts"() {
|
|
9364
|
+
"use strict";
|
|
9365
|
+
init_utils2();
|
|
9366
|
+
}
|
|
9367
|
+
});
|
|
9368
|
+
|
|
9362
9369
|
// packages/tooling/src/utils/secrets-resolver.ts
|
|
9363
9370
|
function parseEnvFile(filePath) {
|
|
9364
9371
|
if (!pathExists(filePath)) return {};
|
|
@@ -51163,6 +51170,7 @@ var init_app = __esm({
|
|
|
51163
51170
|
// packages/tooling/src/utils/supabase-management.ts
|
|
51164
51171
|
var supabase_management_exports = {};
|
|
51165
51172
|
__export(supabase_management_exports, {
|
|
51173
|
+
MGMT_API_BASE: () => MGMT_API_BASE,
|
|
51166
51174
|
cleanupOldEntityMigrations: () => cleanupOldEntityMigrations,
|
|
51167
51175
|
deployEdgeFunction: () => deployEdgeFunction,
|
|
51168
51176
|
executeMigration: () => executeMigration,
|
|
@@ -191711,6 +191719,7 @@ init_utils2();
|
|
|
191711
191719
|
|
|
191712
191720
|
// packages/tooling/src/cli/index.ts
|
|
191713
191721
|
init_utils2();
|
|
191722
|
+
init_create_utils();
|
|
191714
191723
|
|
|
191715
191724
|
// packages/tooling/src/db/context.ts
|
|
191716
191725
|
init_utils2();
|
package/dist/bin/commands/db.js
CHANGED
|
@@ -7452,11 +7452,12 @@ function getPatternsFor(type, repoRoot = null) {
|
|
|
7452
7452
|
function getGlobOptionsFor(type) {
|
|
7453
7453
|
return GLOB_OPTIONS[type] || GLOB_OPTIONS.base;
|
|
7454
7454
|
}
|
|
7455
|
-
var I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
|
|
7455
|
+
var DEFAULT_OG_IMAGE, I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
|
|
7456
7456
|
var init_constants = __esm({
|
|
7457
7457
|
"packages/core/config/constants.js"() {
|
|
7458
7458
|
"use strict";
|
|
7459
7459
|
init_utils2();
|
|
7460
|
+
DEFAULT_OG_IMAGE = "/og-image.png";
|
|
7460
7461
|
I18N_PATHS = {
|
|
7461
7462
|
// Monorepo source structure (locales at root, not in src/)
|
|
7462
7463
|
SOURCE_ROOT: "packages/core/i18n",
|
|
@@ -7467,7 +7468,9 @@ var init_constants = __esm({
|
|
|
7467
7468
|
PUBLISHED_ROOT: "i18n",
|
|
7468
7469
|
PUBLISHED_LOCALES: "i18n/locales",
|
|
7469
7470
|
PUBLISHED_EAGER: "i18n/locales/eager",
|
|
7470
|
-
PUBLISHED_LAZY: "i18n/locales/lazy"
|
|
7471
|
+
PUBLISHED_LAZY: "i18n/locales/lazy",
|
|
7472
|
+
// Flag artwork: one SVG per flag code (flagFileName), copied to public/flags/ (AssetDiscovery)
|
|
7473
|
+
PUBLISHED_FLAGS: "i18n/flags"
|
|
7471
7474
|
};
|
|
7472
7475
|
SCAN_PATTERNS = {
|
|
7473
7476
|
routes: {
|
|
@@ -7529,7 +7532,12 @@ var init_constants = __esm({
|
|
|
7529
7532
|
"logo.avif",
|
|
7530
7533
|
"apple-touch-icon*.png",
|
|
7531
7534
|
"android-chrome-*.png",
|
|
7532
|
-
|
|
7535
|
+
// Generated from logo.svg (AssetDiscovery._generateMissingAssets) or the app's own
|
|
7536
|
+
"icon-*x*.png",
|
|
7537
|
+
DEFAULT_OG_IMAGE.slice(1)
|
|
7538
|
+
// Not manifest.json: the web app manifest is a build output on Next (the PWA step
|
|
7539
|
+
// rewrites it after this scan), so its scanned size would differ between a clean
|
|
7540
|
+
// build and a rebuild. The asset manifest's `manifest` reads it from disk instead.
|
|
7533
7541
|
],
|
|
7534
7542
|
fonts: ["fonts/**/*.woff2", "fonts/**/*.woff", "fonts/**/*.ttf"],
|
|
7535
7543
|
framework: ["packages/ui/assets/**/*"]
|
|
@@ -7606,7 +7614,6 @@ import {
|
|
|
7606
7614
|
sep,
|
|
7607
7615
|
extname
|
|
7608
7616
|
} from "node:path";
|
|
7609
|
-
import { fileURLToPath } from "node:url";
|
|
7610
7617
|
function isEexistError(error2) {
|
|
7611
7618
|
return typeof error2 === "object" && error2 !== null && "code" in error2 && error2.code === "EEXIST";
|
|
7612
7619
|
}
|
|
@@ -8428,7 +8435,10 @@ var init_PathResolver = __esm({
|
|
|
8428
8435
|
return resolvedPath;
|
|
8429
8436
|
}
|
|
8430
8437
|
/**
|
|
8431
|
-
* Execute fast-glob with normalized results
|
|
8438
|
+
* Execute fast-glob with normalized results, sorted. fast-glob returns files in
|
|
8439
|
+
* filesystem completion order, which varies between runs: every discovery (routes,
|
|
8440
|
+
* themes, i18n, assets) and what it generates (route manifest, sitemap, llms.txt,
|
|
8441
|
+
* proxy) must list the same sources in the same order on every build.
|
|
8432
8442
|
* @private
|
|
8433
8443
|
*/
|
|
8434
8444
|
async _globWithNormalization(patterns, options) {
|
|
@@ -8436,7 +8446,7 @@ var init_PathResolver = __esm({
|
|
|
8436
8446
|
return results.map((path) => {
|
|
8437
8447
|
const pathStr = typeof path === "string" ? path : path.path;
|
|
8438
8448
|
return this.normalizePath(pathStr);
|
|
8439
|
-
});
|
|
8449
|
+
}).sort();
|
|
8440
8450
|
}
|
|
8441
8451
|
/**
|
|
8442
8452
|
* Resolve files using patterns with cross-platform support
|
|
@@ -8591,15 +8601,6 @@ var init_PathResolver = __esm({
|
|
|
8591
8601
|
const cjsPath = this.getEmptyCjsModulePath();
|
|
8592
8602
|
return cjsPath.replace(/\.cjs$/, ".js");
|
|
8593
8603
|
}
|
|
8594
|
-
/**
|
|
8595
|
-
* Get absolute path to empty flag component module.
|
|
8596
|
-
* Returns `export default () => null;` — used by flag filtering plugins
|
|
8597
|
-
* to replace unused flag files at build time.
|
|
8598
|
-
*/
|
|
8599
|
-
getEmptyFlagModulePath() {
|
|
8600
|
-
const __dirname2 = dirname2(fileURLToPath(import.meta.url));
|
|
8601
|
-
return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
|
|
8602
|
-
}
|
|
8603
8604
|
/**
|
|
8604
8605
|
* Get absolute path to empty CJS module for esbuild pre-bundling.
|
|
8605
8606
|
* CJS because esbuild statically analyzes ESM exports — CJS has dynamic
|
|
@@ -8732,7 +8733,7 @@ import {
|
|
|
8732
8733
|
parse,
|
|
8733
8734
|
isAbsolute as pathIsAbsolute
|
|
8734
8735
|
} from "node:path";
|
|
8735
|
-
import { fileURLToPath
|
|
8736
|
+
import { fileURLToPath } from "node:url";
|
|
8736
8737
|
function readdirSync3(dirPath, options) {
|
|
8737
8738
|
if (options !== null && typeof options === "object" && options.withFileTypes === true) {
|
|
8738
8739
|
return pathResolverInstance.readdirSync(dirPath, options);
|
|
@@ -8740,7 +8741,7 @@ function readdirSync3(dirPath, options) {
|
|
|
8740
8741
|
return pathResolverInstance.readdirSync(dirPath, options);
|
|
8741
8742
|
}
|
|
8742
8743
|
function getDirnameFromUrl(importMetaUrl) {
|
|
8743
|
-
return dirname3(
|
|
8744
|
+
return dirname3(fileURLToPath(importMetaUrl));
|
|
8744
8745
|
}
|
|
8745
8746
|
function findNodeModulesDir(startDir) {
|
|
8746
8747
|
let currentDir = normalizePath(startDir);
|
|
@@ -8790,7 +8791,7 @@ function getBinPath(binaryName) {
|
|
|
8790
8791
|
return binaryName;
|
|
8791
8792
|
}
|
|
8792
8793
|
function detectExecutionMode() {
|
|
8793
|
-
const fileUrlPath =
|
|
8794
|
+
const fileUrlPath = fileURLToPath(import.meta.url);
|
|
8794
8795
|
if (fileUrlPath.includes("node_modules")) {
|
|
8795
8796
|
return "published";
|
|
8796
8797
|
}
|
|
@@ -8802,7 +8803,7 @@ function detectExecutionMode() {
|
|
|
8802
8803
|
function getTemplatesRoot() {
|
|
8803
8804
|
const mode = detectExecutionMode();
|
|
8804
8805
|
if (mode === "development") {
|
|
8805
|
-
const fileUrlPath =
|
|
8806
|
+
const fileUrlPath = fileURLToPath(import.meta.url);
|
|
8806
8807
|
const frameworkRoot = normalizePath(dirname3(fileUrlPath), "../../../..");
|
|
8807
8808
|
return normalizePath(frameworkRoot, PACKAGE_PATHS.CLI, "templates");
|
|
8808
8809
|
} else {
|
|
@@ -9114,13 +9115,13 @@ import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFile
|
|
|
9114
9115
|
import { createRequire as createRequire3 } from "node:module";
|
|
9115
9116
|
import { dirname as dirname4, resolve as resolve3 } from "node:path";
|
|
9116
9117
|
import process from "node:process";
|
|
9117
|
-
import { fileURLToPath as
|
|
9118
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
9118
9119
|
var require2, __filename, __dirname;
|
|
9119
9120
|
var init_utils2 = __esm({
|
|
9120
9121
|
"packages/tooling/src/bundler/utils.ts"() {
|
|
9121
9122
|
"use strict";
|
|
9122
9123
|
require2 = createRequire3(import.meta.url);
|
|
9123
|
-
__filename =
|
|
9124
|
+
__filename = fileURLToPath2(import.meta.url);
|
|
9124
9125
|
__dirname = dirname4(__filename);
|
|
9125
9126
|
if (typeof globalThis !== "undefined") {
|
|
9126
9127
|
globalThis.require = require2;
|
|
@@ -9136,6 +9137,9 @@ var init_utils2 = __esm({
|
|
|
9136
9137
|
});
|
|
9137
9138
|
|
|
9138
9139
|
// packages/tooling/src/utils/app-detection.ts
|
|
9140
|
+
function isVercelFunctionsDir(functionsDir) {
|
|
9141
|
+
return statSync2(joinPath(functionsDir, "src", "api"))?.isDirectory() ?? false;
|
|
9142
|
+
}
|
|
9139
9143
|
function detectApps(projectRoot) {
|
|
9140
9144
|
const apps = [];
|
|
9141
9145
|
const appsDir = joinPath(projectRoot, "apps");
|
|
@@ -9276,13 +9280,8 @@ function analyzeApp(appPath, appName) {
|
|
|
9276
9280
|
functions = "supabase";
|
|
9277
9281
|
}
|
|
9278
9282
|
}
|
|
9279
|
-
if (!functions) {
|
|
9280
|
-
|
|
9281
|
-
const apiDir = joinPath(appPath, "api");
|
|
9282
|
-
const apiDirStat = statSync2(apiDir);
|
|
9283
|
-
if (pathExists(vercelJsonPath) && pathExists(apiDir) && (apiDirStat?.isDirectory() ?? false)) {
|
|
9284
|
-
functions = "vercel";
|
|
9285
|
-
}
|
|
9283
|
+
if (!functions && isVercelFunctionsDir(joinPath(appPath, "functions"))) {
|
|
9284
|
+
functions = "vercel";
|
|
9286
9285
|
}
|
|
9287
9286
|
let hosting;
|
|
9288
9287
|
if (hasFirebase && firebaseConfig?.hasHosting) {
|
|
@@ -9359,6 +9358,14 @@ var init_app_selector = __esm({
|
|
|
9359
9358
|
}
|
|
9360
9359
|
});
|
|
9361
9360
|
|
|
9361
|
+
// packages/tooling/src/utils/create-utils.ts
|
|
9362
|
+
var init_create_utils = __esm({
|
|
9363
|
+
"packages/tooling/src/utils/create-utils.ts"() {
|
|
9364
|
+
"use strict";
|
|
9365
|
+
init_utils2();
|
|
9366
|
+
}
|
|
9367
|
+
});
|
|
9368
|
+
|
|
9362
9369
|
// packages/tooling/src/utils/secrets-resolver.ts
|
|
9363
9370
|
function parseEnvFile(filePath) {
|
|
9364
9371
|
if (!pathExists(filePath)) return {};
|
|
@@ -51163,6 +51170,7 @@ var init_app = __esm({
|
|
|
51163
51170
|
// packages/tooling/src/utils/supabase-management.ts
|
|
51164
51171
|
var supabase_management_exports = {};
|
|
51165
51172
|
__export(supabase_management_exports, {
|
|
51173
|
+
MGMT_API_BASE: () => MGMT_API_BASE,
|
|
51166
51174
|
cleanupOldEntityMigrations: () => cleanupOldEntityMigrations,
|
|
51167
51175
|
deployEdgeFunction: () => deployEdgeFunction,
|
|
51168
51176
|
executeMigration: () => executeMigration,
|
|
@@ -191681,6 +191689,7 @@ init_utils2();
|
|
|
191681
191689
|
|
|
191682
191690
|
// packages/tooling/src/cli/index.ts
|
|
191683
191691
|
init_utils2();
|
|
191692
|
+
init_create_utils();
|
|
191684
191693
|
|
|
191685
191694
|
// packages/tooling/src/db/context.ts
|
|
191686
191695
|
init_utils2();
|