@cedarjs/cli 5.0.0-canary.2446 → 5.0.0-canary.2447
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/dist/commands/build/buildHandler.js +2 -1
- package/dist/commands/serveApiHandler.js +5 -5
- package/dist/commands/serveBothHandler.js +6 -5
- package/dist/commands/serveWebHandler.js +2 -2
- package/dist/commands/test/testHandler.js +2 -1
- package/dist/commands/test/testHandlerEsm.js +2 -2
- package/dist/commands/type-checkHandler.js +4 -6
- package/package.json +12 -12
|
@@ -232,7 +232,8 @@ Run ` + c.info(formatCedarCommand(["build"])) + " (without specifying a workspac
|
|
|
232
232
|
{
|
|
233
233
|
stdio: verbose ? "inherit" : "pipe",
|
|
234
234
|
shell: true,
|
|
235
|
-
// `cwd` is needed for yarn to find the
|
|
235
|
+
// `cwd` is needed for the package manager (e.g. yarn) to find the
|
|
236
|
+
// cedar-vite-build binary
|
|
236
237
|
// It won't change process.cwd for anything else here, in this
|
|
237
238
|
// process
|
|
238
239
|
cwd: cedarPaths.web.base
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { runBin } from "@cedarjs/cli-helpers/packageManager/exec";
|
|
2
2
|
import { getPaths } from "@cedarjs/project-config";
|
|
3
|
-
|
|
4
|
-
const args = ["
|
|
3
|
+
async function apiServerFileHandler(argv) {
|
|
4
|
+
const args = ["server.js", "--apiRootPath", argv.apiRootPath ?? "/"];
|
|
5
5
|
if (argv.port) {
|
|
6
6
|
args.push("--apiPort", String(argv.port));
|
|
7
7
|
}
|
|
8
8
|
const filteredArgs = args.filter((arg) => Boolean(arg));
|
|
9
|
-
await
|
|
9
|
+
await runBin("node", filteredArgs, {
|
|
10
10
|
cwd: getPaths().api.dist,
|
|
11
11
|
stdio: "inherit"
|
|
12
12
|
});
|
|
13
|
-
}
|
|
13
|
+
}
|
|
14
14
|
export {
|
|
15
15
|
apiServerFileHandler
|
|
16
16
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import concurrently from "concurrently";
|
|
3
|
-
import execa from "execa";
|
|
4
3
|
import { handler as apiServerHandler } from "@cedarjs/api-server/cjs/apiCliConfigHandler";
|
|
5
4
|
import {
|
|
6
5
|
getAPIHost,
|
|
@@ -9,6 +8,8 @@ import {
|
|
|
9
8
|
getWebHost,
|
|
10
9
|
getWebPort
|
|
11
10
|
} from "@cedarjs/api-server/cjs/cliHelpers";
|
|
11
|
+
import { formatRunBinCommand } from "@cedarjs/cli-helpers/packageManager/display";
|
|
12
|
+
import { runBin } from "@cedarjs/cli-helpers/packageManager/exec";
|
|
12
13
|
import { getConfig, getPaths } from "@cedarjs/project-config";
|
|
13
14
|
import { errorTelemetry } from "@cedarjs/telemetry";
|
|
14
15
|
import { exitWithError } from "../lib/exit.js";
|
|
@@ -19,7 +20,7 @@ const hasStringMessage = (error) => {
|
|
|
19
20
|
const bothServerFileHandler = async (argv) => {
|
|
20
21
|
if (getConfig().experimental?.rsc?.enabled || getConfig().experimental?.streamingSsr?.enabled) {
|
|
21
22
|
logSkippingFastifyWebServer();
|
|
22
|
-
await
|
|
23
|
+
await runBin("cedar-serve-fe", [], {
|
|
23
24
|
cwd: getPaths().web.base,
|
|
24
25
|
stdio: "inherit"
|
|
25
26
|
});
|
|
@@ -40,13 +41,13 @@ const bothServerFileHandler = async (argv) => {
|
|
|
40
41
|
[
|
|
41
42
|
{
|
|
42
43
|
name: "api",
|
|
43
|
-
command:
|
|
44
|
+
command: `${formatRunBinCommand("node", [path.join("dist", "server.js"), "--apiPort", String(argv.apiPort), "--apiHost", argv.apiHost, "--apiRootPath", apiRootPath])}`,
|
|
44
45
|
cwd: getPaths().api.base,
|
|
45
46
|
prefixColor: "cyan"
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
name: "web",
|
|
49
|
-
command:
|
|
50
|
+
command: `${formatRunBinCommand("cedar-web-server", ["--port", String(argv.webPort), "--host", argv.webHost, "--api-proxy-target", apiProxyTarget])}`,
|
|
50
51
|
cwd: getPaths().base,
|
|
51
52
|
prefixColor: "blue"
|
|
52
53
|
}
|
|
@@ -77,7 +78,7 @@ const bothSsrRscServerHandler = async (argv, rscEnabled) => {
|
|
|
77
78
|
host: argv.apiHost,
|
|
78
79
|
port: argv.apiPort
|
|
79
80
|
});
|
|
80
|
-
const fePromise =
|
|
81
|
+
const fePromise = runBin("cedar-serve-fe", [], {
|
|
81
82
|
cwd: getPaths().web.base,
|
|
82
83
|
stdio: "inherit",
|
|
83
84
|
env: rscEnabled ? {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { runBin } from "@cedarjs/cli-helpers/packageManager/exec";
|
|
2
2
|
import { getPaths } from "@cedarjs/project-config";
|
|
3
3
|
const webSsrServerHandler = async (rscEnabled) => {
|
|
4
|
-
await
|
|
4
|
+
await runBin("cedar-serve-fe", [], {
|
|
5
5
|
cwd: getPaths().web.base,
|
|
6
6
|
stdio: "inherit",
|
|
7
7
|
env: rscEnabled ? {
|
|
@@ -2,6 +2,7 @@ import fs from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import execa from "execa";
|
|
4
4
|
import { recordTelemetryAttributes, colors as c } from "@cedarjs/cli-helpers";
|
|
5
|
+
import { runBin } from "@cedarjs/cli-helpers/packageManager/exec";
|
|
5
6
|
import { ensurePosixPath } from "@cedarjs/project-config";
|
|
6
7
|
import { errorTelemetry, timedTelemetry } from "@cedarjs/telemetry";
|
|
7
8
|
import { getPaths } from "../../lib/index.js";
|
|
@@ -125,7 +126,7 @@ const handler = async ({
|
|
|
125
126
|
await warnIfNonStandardDatasourceUrl({ force });
|
|
126
127
|
}
|
|
127
128
|
const runCommand = async () => {
|
|
128
|
-
await
|
|
129
|
+
await runBin("jest", jestArgs, {
|
|
129
130
|
cwd: rwjsPaths.base,
|
|
130
131
|
stdio: "inherit",
|
|
131
132
|
env: { ...process.env, DATABASE_URL }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import execa from "execa";
|
|
2
1
|
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
2
|
+
import { runBin } from "@cedarjs/cli-helpers/packageManager/exec";
|
|
3
3
|
import { ensurePosixPath } from "@cedarjs/project-config";
|
|
4
4
|
import { errorTelemetry, timedTelemetry } from "@cedarjs/telemetry";
|
|
5
5
|
import { getPaths } from "../../lib/index.js";
|
|
@@ -76,7 +76,7 @@ const handler = async ({
|
|
|
76
76
|
await warnIfNonStandardDatasourceUrl({ force });
|
|
77
77
|
}
|
|
78
78
|
const runCommand = async () => {
|
|
79
|
-
await
|
|
79
|
+
await runBin("vitest", vitestArgs, {
|
|
80
80
|
cwd: rwjsPaths.base,
|
|
81
81
|
stdio: "inherit",
|
|
82
82
|
env: { ...process.env, DATABASE_URL }
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import concurrently from "concurrently";
|
|
3
|
-
import execa from "execa";
|
|
4
3
|
import { Listr } from "listr2";
|
|
5
4
|
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
5
|
+
import { formatRunBinCommand } from "@cedarjs/cli-helpers/packageManager/display";
|
|
6
|
+
import { runBin } from "@cedarjs/cli-helpers/packageManager/exec";
|
|
6
7
|
import { generatePrismaClient } from "../lib/generatePrismaClient.js";
|
|
7
8
|
import { getPaths } from "../lib/index.js";
|
|
8
9
|
const isConcurrentlyErrorArray = (value) => {
|
|
@@ -30,7 +31,7 @@ const handler = async ({
|
|
|
30
31
|
const projectDir = path.join(getPaths().base, side);
|
|
31
32
|
return {
|
|
32
33
|
cwd: projectDir,
|
|
33
|
-
command: "
|
|
34
|
+
command: formatRunBinCommand("tsc", ["--noEmit", "--skipLibCheck"])
|
|
34
35
|
};
|
|
35
36
|
});
|
|
36
37
|
const { result } = concurrently(tscForAllSides, {
|
|
@@ -55,10 +56,7 @@ const handler = async ({
|
|
|
55
56
|
[
|
|
56
57
|
{
|
|
57
58
|
title: "Generating types",
|
|
58
|
-
task: () =>
|
|
59
|
-
shell: true,
|
|
60
|
-
stdio: verbose ? "inherit" : "ignore"
|
|
61
|
-
})
|
|
59
|
+
task: () => runBin("cedar-gen", [], { stdio: verbose ? "inherit" : "ignore" })
|
|
62
60
|
}
|
|
63
61
|
],
|
|
64
62
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "5.0.0-canary.
|
|
3
|
+
"version": "5.0.0-canary.2447",
|
|
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.3",
|
|
35
35
|
"@babel/preset-typescript": "7.28.5",
|
|
36
|
-
"@cedarjs/api-server": "5.0.0-canary.
|
|
37
|
-
"@cedarjs/cli-helpers": "5.0.0-canary.
|
|
38
|
-
"@cedarjs/fastify-web": "5.0.0-canary.
|
|
39
|
-
"@cedarjs/internal": "5.0.0-canary.
|
|
40
|
-
"@cedarjs/prerender": "5.0.0-canary.
|
|
41
|
-
"@cedarjs/project-config": "5.0.0-canary.
|
|
42
|
-
"@cedarjs/structure": "5.0.0-canary.
|
|
43
|
-
"@cedarjs/telemetry": "5.0.0-canary.
|
|
44
|
-
"@cedarjs/utils": "5.0.0-canary.
|
|
45
|
-
"@cedarjs/vite": "5.0.0-canary.
|
|
46
|
-
"@cedarjs/web-server": "5.0.0-canary.
|
|
36
|
+
"@cedarjs/api-server": "5.0.0-canary.2447",
|
|
37
|
+
"@cedarjs/cli-helpers": "5.0.0-canary.2447",
|
|
38
|
+
"@cedarjs/fastify-web": "5.0.0-canary.2447",
|
|
39
|
+
"@cedarjs/internal": "5.0.0-canary.2447",
|
|
40
|
+
"@cedarjs/prerender": "5.0.0-canary.2447",
|
|
41
|
+
"@cedarjs/project-config": "5.0.0-canary.2447",
|
|
42
|
+
"@cedarjs/structure": "5.0.0-canary.2447",
|
|
43
|
+
"@cedarjs/telemetry": "5.0.0-canary.2447",
|
|
44
|
+
"@cedarjs/utils": "5.0.0-canary.2447",
|
|
45
|
+
"@cedarjs/vite": "5.0.0-canary.2447",
|
|
46
|
+
"@cedarjs/web-server": "5.0.0-canary.2447",
|
|
47
47
|
"@listr2/prompt-adapter-enquirer": "4.2.1",
|
|
48
48
|
"@opentelemetry/api": "1.9.1",
|
|
49
49
|
"@opentelemetry/core": "1.30.1",
|