@cedarjs/cli 6.0.0-canary.2658 → 6.0.0-canary.2660
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.
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
runBin,
|
|
6
|
+
runTransitiveBin,
|
|
7
|
+
runWithNode
|
|
8
|
+
} from "@cedarjs/cli-helpers/packageManager/exec";
|
|
5
9
|
import { getPaths } from "@cedarjs/project-config";
|
|
6
10
|
async function runBinWithThrow(bin, args, options) {
|
|
7
11
|
const result = await runBin(bin, args, options);
|
|
@@ -10,6 +14,13 @@ async function runBinWithThrow(bin, args, options) {
|
|
|
10
14
|
}
|
|
11
15
|
return result;
|
|
12
16
|
}
|
|
17
|
+
async function runTransitiveBinWithThrow(bin, args, options) {
|
|
18
|
+
const result = await runTransitiveBin(bin, args, options);
|
|
19
|
+
if (result.failed) {
|
|
20
|
+
throw new Error(`Command (${bin} ${args.join(" ")}) failed`);
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
13
24
|
const handler = async ({
|
|
14
25
|
side,
|
|
15
26
|
serve,
|
|
@@ -35,7 +46,7 @@ const handler = async ({
|
|
|
35
46
|
await runBinWithThrow("cedar", ["build", "api", "--verbose"], execaConfig);
|
|
36
47
|
if (prisma) {
|
|
37
48
|
console.log("Running database migrations...");
|
|
38
|
-
await
|
|
49
|
+
await runTransitiveBinWithThrow(
|
|
39
50
|
"prisma",
|
|
40
51
|
["migrate", "deploy", "--config", cedarPaths.api.prismaConfig],
|
|
41
52
|
execaConfig
|
|
@@ -4,6 +4,7 @@ import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
|
4
4
|
import { formatAddRootPackagesCommand } from "@cedarjs/cli-helpers/packageManager/display";
|
|
5
5
|
import {
|
|
6
6
|
runBinSync,
|
|
7
|
+
runTransitiveBinSync,
|
|
7
8
|
runWithNode
|
|
8
9
|
} from "@cedarjs/cli-helpers/packageManager/exec";
|
|
9
10
|
import { installPackages } from "@cedarjs/cli-helpers/packageManager/packages";
|
|
@@ -28,7 +29,7 @@ const handler = async ({
|
|
|
28
29
|
async function runApiCommands() {
|
|
29
30
|
if (prisma) {
|
|
30
31
|
console.log("Running database migrations...");
|
|
31
|
-
|
|
32
|
+
runTransitiveBinSync(
|
|
32
33
|
"prisma",
|
|
33
34
|
["migrate", "deploy", "--config", cedarPaths.api.prismaConfig],
|
|
34
35
|
execaConfig
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "6.0.0-canary.
|
|
3
|
+
"version": "6.0.0-canary.2660",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/parser": "7.29.7",
|
|
35
35
|
"@babel/preset-typescript": "7.29.7",
|
|
36
|
-
"@cedarjs/api-server": "6.0.0-canary.
|
|
37
|
-
"@cedarjs/cli-helpers": "6.0.0-canary.
|
|
38
|
-
"@cedarjs/fastify-web": "6.0.0-canary.
|
|
39
|
-
"@cedarjs/internal": "6.0.0-canary.
|
|
40
|
-
"@cedarjs/prerender": "6.0.0-canary.
|
|
41
|
-
"@cedarjs/project-config": "6.0.0-canary.
|
|
42
|
-
"@cedarjs/structure": "6.0.0-canary.
|
|
43
|
-
"@cedarjs/telemetry": "6.0.0-canary.
|
|
44
|
-
"@cedarjs/utils": "6.0.0-canary.
|
|
45
|
-
"@cedarjs/vite": "6.0.0-canary.
|
|
46
|
-
"@cedarjs/web-server": "6.0.0-canary.
|
|
36
|
+
"@cedarjs/api-server": "6.0.0-canary.2660",
|
|
37
|
+
"@cedarjs/cli-helpers": "6.0.0-canary.2660",
|
|
38
|
+
"@cedarjs/fastify-web": "6.0.0-canary.2660",
|
|
39
|
+
"@cedarjs/internal": "6.0.0-canary.2660",
|
|
40
|
+
"@cedarjs/prerender": "6.0.0-canary.2660",
|
|
41
|
+
"@cedarjs/project-config": "6.0.0-canary.2660",
|
|
42
|
+
"@cedarjs/structure": "6.0.0-canary.2660",
|
|
43
|
+
"@cedarjs/telemetry": "6.0.0-canary.2660",
|
|
44
|
+
"@cedarjs/utils": "6.0.0-canary.2660",
|
|
45
|
+
"@cedarjs/vite": "6.0.0-canary.2660",
|
|
46
|
+
"@cedarjs/web-server": "6.0.0-canary.2660",
|
|
47
47
|
"@listr2/prompt-adapter-enquirer": "4.2.1",
|
|
48
48
|
"@opentelemetry/api": "1.9.1",
|
|
49
49
|
"@opentelemetry/core": "1.30.1",
|