@cedarjs/cli 8.0.0-canary.3603 → 8.0.0-canary.3608
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.
|
@@ -129,7 +129,23 @@ const handler = async ({
|
|
|
129
129
|
},
|
|
130
130
|
rendererOptions: { persistentOutput: true }
|
|
131
131
|
},
|
|
132
|
-
addApiPackages(opentelemetryPackages)
|
|
132
|
+
addApiPackages(opentelemetryPackages),
|
|
133
|
+
{
|
|
134
|
+
title: "Notice: running under your own process manager...",
|
|
135
|
+
task: (_ctx, task) => {
|
|
136
|
+
task.output = [
|
|
137
|
+
"The setup file is loaded automatically by `cedar dev`, `cedar serve`, `cedarjs-server` and the job workers.",
|
|
138
|
+
"If you run the API server under your own process manager, load it yourself:",
|
|
139
|
+
"",
|
|
140
|
+
c.info(
|
|
141
|
+
"node --import ./api/dist/opentelemetry.js path/to/your/server.js"
|
|
142
|
+
),
|
|
143
|
+
"",
|
|
144
|
+
"(or set the same flag in NODE_OPTIONS)"
|
|
145
|
+
].join("\n");
|
|
146
|
+
},
|
|
147
|
+
rendererOptions: { persistentOutput: true }
|
|
148
|
+
}
|
|
133
149
|
];
|
|
134
150
|
const prismaTasks = [
|
|
135
151
|
{
|
package/dist/commands/serve.js
CHANGED
|
@@ -31,6 +31,11 @@ function resolveUDEntryPath() {
|
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
33
33
|
async function startUDServer(entryPath, host, port) {
|
|
34
|
+
const { getOTelSetupFileUrl } = await import("@cedarjs/project-config");
|
|
35
|
+
const otelSetupFileUrl = getOTelSetupFileUrl();
|
|
36
|
+
if (otelSetupFileUrl !== void 0) {
|
|
37
|
+
await import(otelSetupFileUrl);
|
|
38
|
+
}
|
|
34
39
|
const mod = await import(pathToFileURL(entryPath).href);
|
|
35
40
|
const fetchable = mod.default ?? mod;
|
|
36
41
|
if (!fetchable || typeof fetchable.fetch !== "function") {
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { runBin } from "@cedarjs/cli-helpers/packageManager/exec";
|
|
2
|
-
import { getPaths } from "@cedarjs/project-config";
|
|
2
|
+
import { getOTelImportArgs, getPaths } from "@cedarjs/project-config";
|
|
3
3
|
async function apiServerFileHandler(argv) {
|
|
4
|
-
const args = [
|
|
4
|
+
const args = [
|
|
5
|
+
...getOTelImportArgs(),
|
|
6
|
+
"server.js",
|
|
7
|
+
"--apiRootPath",
|
|
8
|
+
argv.apiRootPath ?? "/"
|
|
9
|
+
];
|
|
5
10
|
if (argv.port) {
|
|
6
11
|
args.push("--apiPort", String(argv.port));
|
|
7
12
|
}
|
|
@@ -10,7 +10,12 @@ import {
|
|
|
10
10
|
} from "@cedarjs/api-server/cliHelpers";
|
|
11
11
|
import { formatRunBinCommand } from "@cedarjs/cli-helpers/packageManager/display";
|
|
12
12
|
import { runBin } from "@cedarjs/cli-helpers/packageManager/exec";
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
getConfig,
|
|
15
|
+
getOTelImportArgs,
|
|
16
|
+
getPaths,
|
|
17
|
+
quoteOTelImportArgs
|
|
18
|
+
} from "@cedarjs/project-config";
|
|
14
19
|
import { errorTelemetry } from "@cedarjs/telemetry";
|
|
15
20
|
import { exitWithError } from "../lib/exit.js";
|
|
16
21
|
const hasStringMessage = (error) => {
|
|
@@ -41,7 +46,13 @@ const bothServerFileHandler = async (argv) => {
|
|
|
41
46
|
[
|
|
42
47
|
{
|
|
43
48
|
name: "api",
|
|
44
|
-
|
|
49
|
+
// The `--import` argument is a `file://` URL, which can contain
|
|
50
|
+
// characters that are special to the shell `concurrently` runs
|
|
51
|
+
// this command through. `quoteOTelImportArgs` picks the quoting
|
|
52
|
+
// that suits the platform's shell: single quotes (with embedded
|
|
53
|
+
// quotes escaped) for POSIX `sh`, double quotes for Windows
|
|
54
|
+
// `cmd.exe`.
|
|
55
|
+
command: `${formatRunBinCommand("node", [...quoteOTelImportArgs(getOTelImportArgs()), path.join("dist", "server.js"), "--apiPort", String(argv.apiPort), "--apiHost", argv.apiHost, "--apiRootPath", apiRootPath])}`,
|
|
45
56
|
cwd: getPaths().api.base,
|
|
46
57
|
prefixColor: "cyan"
|
|
47
58
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "8.0.0-canary.
|
|
3
|
+
"version": "8.0.0-canary.3608",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"@babel/preset-typescript": "7.29.7",
|
|
37
37
|
"@babel/traverse": "7.29.12",
|
|
38
38
|
"@babel/types": "7.29.11",
|
|
39
|
-
"@cedarjs/api-server": "8.0.0-canary.
|
|
40
|
-
"@cedarjs/babel-config": "8.0.0-canary.
|
|
41
|
-
"@cedarjs/cli-helpers": "8.0.0-canary.
|
|
42
|
-
"@cedarjs/internal": "8.0.0-canary.
|
|
43
|
-
"@cedarjs/prerender": "8.0.0-canary.
|
|
44
|
-
"@cedarjs/project-config": "8.0.0-canary.
|
|
45
|
-
"@cedarjs/structure": "8.0.0-canary.
|
|
46
|
-
"@cedarjs/telemetry": "8.0.0-canary.
|
|
47
|
-
"@cedarjs/utils": "8.0.0-canary.
|
|
48
|
-
"@cedarjs/vite": "8.0.0-canary.
|
|
49
|
-
"@cedarjs/web-server": "8.0.0-canary.
|
|
39
|
+
"@cedarjs/api-server": "8.0.0-canary.3608",
|
|
40
|
+
"@cedarjs/babel-config": "8.0.0-canary.3608",
|
|
41
|
+
"@cedarjs/cli-helpers": "8.0.0-canary.3608",
|
|
42
|
+
"@cedarjs/internal": "8.0.0-canary.3608",
|
|
43
|
+
"@cedarjs/prerender": "8.0.0-canary.3608",
|
|
44
|
+
"@cedarjs/project-config": "8.0.0-canary.3608",
|
|
45
|
+
"@cedarjs/structure": "8.0.0-canary.3608",
|
|
46
|
+
"@cedarjs/telemetry": "8.0.0-canary.3608",
|
|
47
|
+
"@cedarjs/utils": "8.0.0-canary.3608",
|
|
48
|
+
"@cedarjs/vite": "8.0.0-canary.3608",
|
|
49
|
+
"@cedarjs/web-server": "8.0.0-canary.3608",
|
|
50
50
|
"@listr2/prompt-adapter-enquirer": "4.4.3",
|
|
51
51
|
"@prisma/internals": "7.10.1",
|
|
52
52
|
"ansis": "4.4.0",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"yargs": "18.2.0"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@cedarjs/framework-tools": "8.0.0-canary.
|
|
90
|
+
"@cedarjs/framework-tools": "8.0.0-canary.3608",
|
|
91
91
|
"@prisma/dmmf": "7.10.1",
|
|
92
92
|
"@types/archiver": "^7.0.0",
|
|
93
93
|
"memfs": "4.80.0",
|