@donotdev/cli 0.0.27 → 0.0.29
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 +28 -35
- package/dist/bin/commands/bump.js +131 -9
- package/dist/bin/commands/db.js +5 -2
- package/dist/bin/commands/deploy.js +7 -4
- package/dist/bin/commands/make-admin.js +225 -122
- package/dist/bin/commands/seed.js +5 -2
- package/dist/bin/commands/setup.js +3 -5
- package/dist/bin/commands/staging.js +7 -4
- package/dist/bin/dndev.js +1 -1
- package/dist/bin/donotdev.js +1 -1
- package/dist/index.js +11 -8
- package/package.json +2 -4
- package/templates/app-demo/src/themes.css.example +1 -3
- package/templates/app-dndev/src/themes.css.example +1 -0
- package/templates/app-next/src/app/ClientLayout.tsx.example +9 -0
- package/templates/app-next/src/locales/home_en.json.example +6 -6
- package/templates/app-next/src/themes.css.example +3 -0
- package/templates/app-vite/src/locales/home_en.json.example +6 -6
- package/templates/app-vite/src/themes.css.example +1 -0
- package/templates/overlay-supabase/src/config/providers.expo.ts.example +1 -2
- package/templates/overlay-supabase/src/config/providers.ts.example +1 -2
- package/templates/root-consumer/guides/dndev/advanced/COOKIE_REFERENCE.md.example +252 -252
- package/templates/root-consumer/guides/dndev/advanced/VERSION_CONTROL.md.example +174 -174
- package/templates/root-consumer/guides/dndev/essences_reference.css.example +0 -3
package/dependencies-matrix.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "./dependencies-matrix.schema.json",
|
|
3
3
|
"version": "0.0.6",
|
|
4
4
|
"description": "Centralized dependency versions for DoNotDev framework. Single source of truth for all external dependencies. Third-party optional deps are auto-detected from peerDependenciesMeta via scanInstalledPackageOptionals() — no manual constants update needed.",
|
|
5
|
-
"lastUpdated": "2026-03-
|
|
5
|
+
"lastUpdated": "2026-03-06",
|
|
6
6
|
"migrationGuides": {
|
|
7
7
|
"0.0→0.1": {
|
|
8
8
|
"path": "docs/migration/v0.0-to-v0.1.md",
|
|
@@ -17,37 +17,37 @@
|
|
|
17
17
|
"@donotdev/auth": {
|
|
18
18
|
"description": "Authentication package",
|
|
19
19
|
"packages": {
|
|
20
|
-
"@donotdev/auth": "^0.0.
|
|
20
|
+
"@donotdev/auth": "^0.0.19"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"@donotdev/billing": {
|
|
24
24
|
"description": "Billing package",
|
|
25
25
|
"packages": {
|
|
26
|
-
"@donotdev/billing": "^0.0.
|
|
26
|
+
"@donotdev/billing": "^0.0.16"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"@donotdev/components": {
|
|
30
30
|
"description": "UI components package",
|
|
31
31
|
"packages": {
|
|
32
|
-
"@donotdev/components": "^0.0.
|
|
32
|
+
"@donotdev/components": "^0.0.27"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"@donotdev/core": {
|
|
36
36
|
"description": "Core framework package",
|
|
37
37
|
"packages": {
|
|
38
|
-
"@donotdev/core": "^0.0.
|
|
38
|
+
"@donotdev/core": "^0.0.37"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"@donotdev/crud": {
|
|
42
42
|
"description": "CRUD operations package",
|
|
43
43
|
"packages": {
|
|
44
|
-
"@donotdev/crud": "^0.0.
|
|
44
|
+
"@donotdev/crud": "^0.0.25"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"@donotdev/firebase": {
|
|
48
48
|
"description": "Firebase provider package",
|
|
49
49
|
"packages": {
|
|
50
|
-
"@donotdev/firebase": "^0.0.
|
|
50
|
+
"@donotdev/firebase": "^0.0.21"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"@donotdev/functions": {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@donotdev/oauth": {
|
|
60
60
|
"description": "OAuth package",
|
|
61
61
|
"packages": {
|
|
62
|
-
"@donotdev/oauth": "^0.0.
|
|
62
|
+
"@donotdev/oauth": "^0.0.16"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"@donotdev/templates": {
|
|
@@ -71,19 +71,19 @@
|
|
|
71
71
|
"@donotdev/ui": {
|
|
72
72
|
"description": "UI and routing package",
|
|
73
73
|
"packages": {
|
|
74
|
-
"@donotdev/ui": "^0.0.
|
|
74
|
+
"@donotdev/ui": "^0.0.24"
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"@donotdev/expo": {
|
|
78
78
|
"description": "Expo/React Native components package",
|
|
79
79
|
"packages": {
|
|
80
|
-
"@donotdev/expo": "^0.0.
|
|
80
|
+
"@donotdev/expo": "^0.0.10"
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@donotdev/supabase": {
|
|
84
84
|
"description": "Supabase provider package",
|
|
85
85
|
"packages": {
|
|
86
|
-
"@donotdev/supabase": "^0.0.
|
|
86
|
+
"@donotdev/supabase": "^0.0.10"
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
"supabase-js": {
|
|
@@ -256,6 +256,12 @@
|
|
|
256
256
|
"browser-image-compression": "^2.0.2"
|
|
257
257
|
}
|
|
258
258
|
},
|
|
259
|
+
"dompurify": {
|
|
260
|
+
"description": "HTML sanitization — XSS-safe alternative to regex-based sanitizers",
|
|
261
|
+
"packages": {
|
|
262
|
+
"dompurify": "^3.3.2"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
259
265
|
"tiptap": {
|
|
260
266
|
"description": "Rich text editor - optional peer dependency. Required: @tiptap/react, @tiptap/pm, @tiptap/starter-kit. Optional: @tiptap/extension-placeholder for placeholder text.",
|
|
261
267
|
"packages": {
|
|
@@ -418,7 +424,7 @@
|
|
|
418
424
|
"@donotdev/cli": {
|
|
419
425
|
"description": "Cli package",
|
|
420
426
|
"packages": {
|
|
421
|
-
"@donotdev/cli": "^0.0.
|
|
427
|
+
"@donotdev/cli": "^0.0.29"
|
|
422
428
|
}
|
|
423
429
|
},
|
|
424
430
|
"@donotdev/mcp-server": {
|
|
@@ -450,7 +456,7 @@
|
|
|
450
456
|
"@donotdev/security": {
|
|
451
457
|
"description": "Security package",
|
|
452
458
|
"packages": {
|
|
453
|
-
"@donotdev/security": "^0.0.
|
|
459
|
+
"@donotdev/security": "^0.0.10"
|
|
454
460
|
}
|
|
455
461
|
},
|
|
456
462
|
"xterm": {
|
|
@@ -462,9 +468,10 @@
|
|
|
462
468
|
}
|
|
463
469
|
},
|
|
464
470
|
"node-pty": {
|
|
465
|
-
"description": "PTY for terminal sidecar",
|
|
471
|
+
"description": "PTY for terminal sidecar (native C++ addon)",
|
|
472
|
+
"rootExclude": true,
|
|
466
473
|
"packages": {
|
|
467
|
-
"node-pty": "^1.
|
|
474
|
+
"node-pty": "^1.1.0"
|
|
468
475
|
}
|
|
469
476
|
},
|
|
470
477
|
"react-markdown-cockpit": {
|
|
@@ -544,7 +551,6 @@
|
|
|
544
551
|
"@donotdev/auth",
|
|
545
552
|
"@donotdev/billing",
|
|
546
553
|
"@donotdev/crud",
|
|
547
|
-
"@donotdev/firebase",
|
|
548
554
|
"@donotdev/oauth",
|
|
549
555
|
"routing",
|
|
550
556
|
"validation"
|
|
@@ -564,9 +570,6 @@
|
|
|
564
570
|
"@donotdev/crud": {
|
|
565
571
|
"optional": true
|
|
566
572
|
},
|
|
567
|
-
"@donotdev/firebase": {
|
|
568
|
-
"optional": true
|
|
569
|
-
},
|
|
570
573
|
"@donotdev/oauth": {
|
|
571
574
|
"optional": true
|
|
572
575
|
},
|
|
@@ -604,27 +607,20 @@
|
|
|
604
607
|
"@donotdev/core",
|
|
605
608
|
"react-easy-crop",
|
|
606
609
|
"@dnd-kit",
|
|
607
|
-
"forms-resolvers"
|
|
610
|
+
"forms-resolvers",
|
|
611
|
+
"dompurify"
|
|
608
612
|
],
|
|
609
613
|
"devDependencies": [
|
|
610
614
|
"tiptap"
|
|
611
615
|
],
|
|
612
616
|
"peerDependencies": [
|
|
613
|
-
"@donotdev/firebase",
|
|
614
617
|
"react",
|
|
615
618
|
"forms",
|
|
616
|
-
"firebase",
|
|
617
619
|
"validation",
|
|
618
620
|
"lucide-react",
|
|
619
621
|
"tiptap"
|
|
620
622
|
],
|
|
621
623
|
"peerDependenciesMeta": {
|
|
622
|
-
"@donotdev/firebase": {
|
|
623
|
-
"optional": true
|
|
624
|
-
},
|
|
625
|
-
"firebase": {
|
|
626
|
-
"optional": true
|
|
627
|
-
},
|
|
628
624
|
"tiptap": {
|
|
629
625
|
"optional": true
|
|
630
626
|
}
|
|
@@ -632,17 +628,14 @@
|
|
|
632
628
|
},
|
|
633
629
|
"@donotdev/firebase": {
|
|
634
630
|
"dependencies": [
|
|
635
|
-
"browser-image-compression"
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
"firebase"
|
|
631
|
+
"browser-image-compression",
|
|
632
|
+
"firebase",
|
|
633
|
+
"firebase-admin"
|
|
639
634
|
]
|
|
640
635
|
},
|
|
641
636
|
"@donotdev/supabase": {
|
|
642
637
|
"dependencies": [
|
|
643
|
-
"validation"
|
|
644
|
-
],
|
|
645
|
-
"peerDependencies": [
|
|
638
|
+
"validation",
|
|
646
639
|
"supabase-js"
|
|
647
640
|
]
|
|
648
641
|
},
|
|
@@ -7875,13 +7875,14 @@ function globSync(pattern, options = {}) {
|
|
|
7875
7875
|
});
|
|
7876
7876
|
return results.map((p2) => pathResolverInstance.normalizePath(p2));
|
|
7877
7877
|
}
|
|
7878
|
-
var pathResolverInstance, getAppRoot, resolveFrameworkPackage, normalizePath, pathExists, read, readSync, write, writeSync, ensureDir, getRelativePathBetween, getDirname, joinPath;
|
|
7878
|
+
var pathResolverInstance, getRepoRoot, getAppRoot, resolveFrameworkPackage, normalizePath, pathExists, read, readSync, write, writeSync, ensureDir, getRelativePathBetween, getDirname, joinPath;
|
|
7879
7879
|
var init_pathResolver = __esm({
|
|
7880
7880
|
"packages/tooling/src/utils/pathResolver.ts"() {
|
|
7881
7881
|
"use strict";
|
|
7882
7882
|
init_utils();
|
|
7883
7883
|
init_PathResolver();
|
|
7884
7884
|
pathResolverInstance = PathResolver.getInstance({ debug: false });
|
|
7885
|
+
getRepoRoot = () => pathResolverInstance.getRepoRoot();
|
|
7885
7886
|
getAppRoot = () => pathResolverInstance.getAppRoot();
|
|
7886
7887
|
resolveFrameworkPackage = (name, from) => pathResolverInstance.resolveFrameworkPackage(name, from || null);
|
|
7887
7888
|
normalizePath = (...pathSegments) => {
|
|
@@ -8042,9 +8043,13 @@ function loadMatrix(mode) {
|
|
|
8042
8043
|
};
|
|
8043
8044
|
return cachedMatrix;
|
|
8044
8045
|
}
|
|
8045
|
-
function
|
|
8046
|
+
function clearMatrixCache() {
|
|
8047
|
+
cachedMatrix = null;
|
|
8048
|
+
}
|
|
8049
|
+
function flattenGroups(groups, options) {
|
|
8046
8050
|
const flat = {};
|
|
8047
8051
|
for (const group of Object.values(groups)) {
|
|
8052
|
+
if (options?.skipRootExclude && group.rootExclude) continue;
|
|
8048
8053
|
for (const [name, version] of Object.entries(group.packages || {})) {
|
|
8049
8054
|
flat[name] = version;
|
|
8050
8055
|
}
|
|
@@ -8100,6 +8105,22 @@ function writePackageJson(filePath, pkg) {
|
|
|
8100
8105
|
overwrite: true
|
|
8101
8106
|
});
|
|
8102
8107
|
}
|
|
8108
|
+
function buildDonotdevVersions(repoRoot) {
|
|
8109
|
+
const versions = {};
|
|
8110
|
+
const root = repoRoot || getRepoRoot();
|
|
8111
|
+
const files = globSync("packages/**/package.json", {
|
|
8112
|
+
cwd: root,
|
|
8113
|
+
absolute: true,
|
|
8114
|
+
ignore: ["**/node_modules/**", "**/dist/**"]
|
|
8115
|
+
});
|
|
8116
|
+
for (const filePath of files) {
|
|
8117
|
+
const pkg = parsePackageJson(filePath);
|
|
8118
|
+
if (pkg?.name?.startsWith("@donotdev/") && pkg.version) {
|
|
8119
|
+
versions[pkg.name] = pkg.version;
|
|
8120
|
+
}
|
|
8121
|
+
}
|
|
8122
|
+
return versions;
|
|
8123
|
+
}
|
|
8103
8124
|
function normalizeVersion(version) {
|
|
8104
8125
|
return version.replace(/^[\^~>=<]+/, "").trim();
|
|
8105
8126
|
}
|
|
@@ -8131,6 +8152,72 @@ function compareVersions(current, expected) {
|
|
|
8131
8152
|
return { behind: false, ahead: false, equal: true, isMajor: false };
|
|
8132
8153
|
}
|
|
8133
8154
|
|
|
8155
|
+
// packages/tooling/src/bundler/sync-dependencies.ts
|
|
8156
|
+
init_utils();
|
|
8157
|
+
import { execSync } from "node:child_process";
|
|
8158
|
+
import { createRequire as createRequire5 } from "node:module";
|
|
8159
|
+
init_pathResolver();
|
|
8160
|
+
var INTERNAL_BUNDLED_PACKAGES = /* @__PURE__ */ new Set([
|
|
8161
|
+
"@donotdev/types",
|
|
8162
|
+
"@donotdev/utils",
|
|
8163
|
+
"@donotdev/stores",
|
|
8164
|
+
"@donotdev/schemas",
|
|
8165
|
+
"@donotdev/hooks",
|
|
8166
|
+
"@donotdev/i18n",
|
|
8167
|
+
"@donotdev/config",
|
|
8168
|
+
"@donotdev/tooling"
|
|
8169
|
+
]);
|
|
8170
|
+
function syncDonotdevToMatrix(matrix, donotdevVersions, dryRun) {
|
|
8171
|
+
const changes = [];
|
|
8172
|
+
for (const [pkgName, actualVersion] of Object.entries(donotdevVersions)) {
|
|
8173
|
+
if (!pkgName.startsWith("@donotdev/")) continue;
|
|
8174
|
+
if (INTERNAL_BUNDLED_PACKAGES.has(pkgName)) continue;
|
|
8175
|
+
const group = matrix.groups[pkgName];
|
|
8176
|
+
if (!group) {
|
|
8177
|
+
matrix.groups[pkgName] = {
|
|
8178
|
+
description: `${pkgName.replace("@donotdev/", "").charAt(0).toUpperCase() + pkgName.replace("@donotdev/", "").slice(1)} package`,
|
|
8179
|
+
packages: { [pkgName]: `^${actualVersion}` }
|
|
8180
|
+
};
|
|
8181
|
+
changes.push({ pkg: pkgName, from: "N/A", to: `^${actualVersion}` });
|
|
8182
|
+
continue;
|
|
8183
|
+
}
|
|
8184
|
+
const matrixVersion = group.packages[pkgName];
|
|
8185
|
+
if (!matrixVersion) {
|
|
8186
|
+
group.packages[pkgName] = `^${actualVersion}`;
|
|
8187
|
+
changes.push({ pkg: pkgName, from: "N/A", to: `^${actualVersion}` });
|
|
8188
|
+
continue;
|
|
8189
|
+
}
|
|
8190
|
+
const normalizedMatrix = matrixVersion.replace(/^\^/, "");
|
|
8191
|
+
if (normalizedMatrix !== actualVersion) {
|
|
8192
|
+
changes.push({
|
|
8193
|
+
pkg: pkgName,
|
|
8194
|
+
from: matrixVersion,
|
|
8195
|
+
to: `^${actualVersion}`
|
|
8196
|
+
});
|
|
8197
|
+
group.packages[pkgName] = `^${actualVersion}`;
|
|
8198
|
+
}
|
|
8199
|
+
}
|
|
8200
|
+
if (changes.length > 0 && !dryRun) {
|
|
8201
|
+
matrix.lastUpdated = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
8202
|
+
try {
|
|
8203
|
+
const require3 = createRequire5(import.meta.url);
|
|
8204
|
+
const matrixPath = require3.resolve("@donotdev/cli/dependencies-matrix.json");
|
|
8205
|
+
writeSync(matrixPath, JSON.stringify(matrix, null, 2) + "\n", {
|
|
8206
|
+
overwrite: true
|
|
8207
|
+
});
|
|
8208
|
+
} catch {
|
|
8209
|
+
const matrixPath = "packages/cli/dependencies-matrix.json";
|
|
8210
|
+
if (pathExists(matrixPath)) {
|
|
8211
|
+
writeSync(matrixPath, JSON.stringify(matrix, null, 2) + "\n", {
|
|
8212
|
+
overwrite: true
|
|
8213
|
+
});
|
|
8214
|
+
}
|
|
8215
|
+
}
|
|
8216
|
+
clearMatrixCache();
|
|
8217
|
+
}
|
|
8218
|
+
return { updated: changes.length > 0, changes };
|
|
8219
|
+
}
|
|
8220
|
+
|
|
8134
8221
|
// packages/tooling/src/utils/dependency-resolver.ts
|
|
8135
8222
|
init_utils();
|
|
8136
8223
|
function applyConditionals(template, options) {
|
|
@@ -8938,19 +9025,37 @@ ${updates.length} update(s) available:`);
|
|
|
8938
9025
|
log.info(` ${relativeFile} (${u2.field})`);
|
|
8939
9026
|
}
|
|
8940
9027
|
}
|
|
8941
|
-
if (majorUpdates.length > 0) {
|
|
8942
|
-
log.info(
|
|
8943
|
-
|
|
8944
|
-
${majorUpdates.length} major update(s) available (manual review required):`
|
|
8945
|
-
);
|
|
9028
|
+
if (majorUpdates.length > 0 && !dryRun) {
|
|
9029
|
+
log.info(`
|
|
9030
|
+
${majorUpdates.length} major update(s) available:`);
|
|
8946
9031
|
for (const u2 of majorUpdates) {
|
|
8947
9032
|
const relativeFile = appRoot ? getRelativePathBetween(appRoot, u2.file) : u2.file;
|
|
8948
9033
|
const normalizedLatest = normalizeVersion(u2.latest);
|
|
8949
9034
|
const displayLatest = ensureCaretPrefix(normalizedLatest);
|
|
8950
|
-
log.info(` \
|
|
9035
|
+
log.info(` \u26A0 ${u2.pkg}: ${u2.current} \u2192 ${displayLatest}`);
|
|
8951
9036
|
log.info(` ${relativeFile} (${u2.field})`);
|
|
8952
|
-
if (u2.migrationPath) log.info(`
|
|
9037
|
+
if (u2.migrationPath) log.info(` migration guide: ${u2.migrationPath}`);
|
|
9038
|
+
if (u2.breakingChanges?.length) {
|
|
9039
|
+
for (const bc of u2.breakingChanges) log.info(` breaking: ${bc}`);
|
|
9040
|
+
}
|
|
9041
|
+
const apply = await askForConfirmation(
|
|
9042
|
+
`Apply major bump for ${u2.pkg}?`,
|
|
9043
|
+
false
|
|
9044
|
+
);
|
|
9045
|
+
if (apply) {
|
|
9046
|
+
updates.push(u2);
|
|
9047
|
+
}
|
|
8953
9048
|
}
|
|
9049
|
+
} else if (majorUpdates.length > 0 && dryRun) {
|
|
9050
|
+
log.info(`
|
|
9051
|
+
${majorUpdates.length} major update(s) available:`);
|
|
9052
|
+
for (const u2 of majorUpdates) {
|
|
9053
|
+
const normalizedLatest = normalizeVersion(u2.latest);
|
|
9054
|
+
const displayLatest = ensureCaretPrefix(normalizedLatest);
|
|
9055
|
+
log.info(` \u26A0 ${u2.pkg}: ${u2.current} \u2192 ${displayLatest}`);
|
|
9056
|
+
if (u2.migrationPath) log.info(` migration guide: ${u2.migrationPath}`);
|
|
9057
|
+
}
|
|
9058
|
+
updates.push(...majorUpdates);
|
|
8954
9059
|
}
|
|
8955
9060
|
if (updates.length > 0) {
|
|
8956
9061
|
let shouldApply = false;
|
|
@@ -9020,6 +9125,23 @@ ${majorUpdates.length} major update(s) available (manual review required):`
|
|
|
9020
9125
|
`
|
|
9021
9126
|
Done. Updated ${updatedFiles.size} file(s). Run "bun install" to apply.`
|
|
9022
9127
|
);
|
|
9128
|
+
if (detectExecutionMode() === "development") {
|
|
9129
|
+
clearMatrixCache();
|
|
9130
|
+
const freshMatrix = loadMatrix();
|
|
9131
|
+
if (freshMatrix) {
|
|
9132
|
+
const freshVersions = buildDonotdevVersions();
|
|
9133
|
+
const sync = syncDonotdevToMatrix(
|
|
9134
|
+
freshMatrix.matrix,
|
|
9135
|
+
freshVersions,
|
|
9136
|
+
false
|
|
9137
|
+
);
|
|
9138
|
+
if (sync.changes.length > 0) {
|
|
9139
|
+
log.success(
|
|
9140
|
+
`Matrix updated (${sync.changes.length} template version(s) synced)`
|
|
9141
|
+
);
|
|
9142
|
+
}
|
|
9143
|
+
}
|
|
9144
|
+
}
|
|
9023
9145
|
}
|
|
9024
9146
|
} else {
|
|
9025
9147
|
log.info("\nUpdates not applied");
|
package/dist/bin/commands/db.js
CHANGED
|
@@ -58878,7 +58878,7 @@ __export(supabase_management_exports, {
|
|
|
58878
58878
|
extractProjectRef: () => extractProjectRef,
|
|
58879
58879
|
tableExists: () => tableExists
|
|
58880
58880
|
});
|
|
58881
|
-
import { execSync } from "node:child_process";
|
|
58881
|
+
import { execSync, spawnSync } from "node:child_process";
|
|
58882
58882
|
function createAdminClient(supabaseUrl, secretKey) {
|
|
58883
58883
|
return createClient(supabaseUrl, secretKey, {
|
|
58884
58884
|
auth: {
|
|
@@ -58988,13 +58988,16 @@ async function deployEdgeFunction(options) {
|
|
|
58988
58988
|
try {
|
|
58989
58989
|
const cmd = getSupabaseCmd();
|
|
58990
58990
|
const projectDir = joinPath(supabaseDir, "..");
|
|
58991
|
-
|
|
58991
|
+
const result = spawnSync(cmd, ["functions", "deploy", functionName], {
|
|
58992
58992
|
cwd: projectDir,
|
|
58993
58993
|
stdio: "pipe",
|
|
58994
58994
|
env: {
|
|
58995
58995
|
...process.env
|
|
58996
58996
|
}
|
|
58997
58997
|
});
|
|
58998
|
+
if (result.status !== 0) {
|
|
58999
|
+
throw new Error(result.stderr?.toString() || "Deploy failed");
|
|
59000
|
+
}
|
|
58998
59001
|
} catch (error2) {
|
|
58999
59002
|
const message = error2 instanceof Error ? error2.message : String(error2);
|
|
59000
59003
|
throw new Error(`Failed to deploy Edge Function: ${message}`);
|
|
@@ -16543,7 +16543,7 @@ var deploy_supabase_functions_exports = {};
|
|
|
16543
16543
|
__export(deploy_supabase_functions_exports, {
|
|
16544
16544
|
deploySupabaseFunctions: () => deploySupabaseFunctions
|
|
16545
16545
|
});
|
|
16546
|
-
import {
|
|
16546
|
+
import { spawnSync as spawnSync6 } from "node:child_process";
|
|
16547
16547
|
async function deploySupabaseFunctions(appDir, config) {
|
|
16548
16548
|
const supabaseDir = joinPath(appDir, "supabase");
|
|
16549
16549
|
const functionsDir = joinPath(supabaseDir, "functions");
|
|
@@ -16578,7 +16578,7 @@ async function deploySupabaseFunctions(appDir, config) {
|
|
|
16578
16578
|
for (const functionName of functionDirs) {
|
|
16579
16579
|
s.start(`Deploying Edge Function: ${functionName}...`);
|
|
16580
16580
|
try {
|
|
16581
|
-
|
|
16581
|
+
const result = spawnSync6("supabase", ["functions", "deploy", functionName], {
|
|
16582
16582
|
cwd: supabaseDir,
|
|
16583
16583
|
stdio: config.verbose ? "inherit" : "pipe",
|
|
16584
16584
|
env: {
|
|
@@ -16586,6 +16586,9 @@ async function deploySupabaseFunctions(appDir, config) {
|
|
|
16586
16586
|
DNDEV_APP_ROOT: appDir
|
|
16587
16587
|
}
|
|
16588
16588
|
});
|
|
16589
|
+
if (result.status !== 0) {
|
|
16590
|
+
throw new Error(result.stderr?.toString() || "Deploy failed");
|
|
16591
|
+
}
|
|
16589
16592
|
s.stop(`Deployed: ${functionName}`);
|
|
16590
16593
|
} catch (error2) {
|
|
16591
16594
|
s.stop(`Failed to deploy: ${functionName}`);
|
|
@@ -16752,7 +16755,7 @@ function safeRemove(path, options = {}) {
|
|
|
16752
16755
|
|
|
16753
16756
|
// packages/tooling/src/apps/deploy.ts
|
|
16754
16757
|
init_utils();
|
|
16755
|
-
import { execSync as
|
|
16758
|
+
import { execSync as execSync3 } from "node:child_process";
|
|
16756
16759
|
|
|
16757
16760
|
// packages/tooling/src/apps/deploy-frontend.ts
|
|
16758
16761
|
init_utils();
|
|
@@ -18055,7 +18058,7 @@ async function main2(options = {}) {
|
|
|
18055
18058
|
isStaging ? "Building (staging mode)..." : "Building application..."
|
|
18056
18059
|
);
|
|
18057
18060
|
try {
|
|
18058
|
-
|
|
18061
|
+
execSync3(buildCmd, {
|
|
18059
18062
|
cwd: appDir,
|
|
18060
18063
|
stdio: "inherit",
|
|
18061
18064
|
env: {
|