@cedarjs/cli 6.0.0-canary.2816 → 6.0.0-canary.2819
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/serve.js
CHANGED
|
@@ -99,8 +99,8 @@ const builder = async (yargs) => {
|
|
|
99
99
|
const { getAPIHost, getAPIPort, getWebHost, getWebPort } = await import("@cedarjs/api-server/cliHelpers");
|
|
100
100
|
const apiPort = argv.apiPort ?? getAPIPort();
|
|
101
101
|
const apiHost = argv.apiHost ?? getAPIHost();
|
|
102
|
-
const webPort = argv.webPort ?? getWebPort();
|
|
103
|
-
const webHost = argv.webHost ?? getWebHost();
|
|
102
|
+
const webPort = argv.webPort ?? getWebPort({ isPublicSide: true });
|
|
103
|
+
const webHost = argv.webHost ?? getWebHost({ isPublicSide: true });
|
|
104
104
|
const apiRootPath = argv.apiRootPath ?? "/";
|
|
105
105
|
const apiTarget = `http://${apiHost.includes(":") ? `[${apiHost}]` : apiHost}:${apiPort}`;
|
|
106
106
|
const { serveStatic } = await import("srvx/static");
|
|
@@ -187,6 +187,11 @@ const builder = async (yargs) => {
|
|
|
187
187
|
socket: argv.socket,
|
|
188
188
|
apiRootPath: argv.apiRootPath
|
|
189
189
|
});
|
|
190
|
+
const { getAPIHost, getAPIPort } = await import("@cedarjs/api-server/cliHelpers");
|
|
191
|
+
const apiPort = argv.port ?? getAPIPort({ isPublicSide: true });
|
|
192
|
+
const apiHost = argv.host ?? getAPIHost({ isPublicSide: true });
|
|
193
|
+
argv.port = apiPort;
|
|
194
|
+
argv.host = apiHost;
|
|
190
195
|
if (argv.ud) {
|
|
191
196
|
const udEntryPath = resolveUDEntryPath();
|
|
192
197
|
if (!udEntryPath) {
|
|
@@ -197,8 +202,6 @@ const builder = async (yargs) => {
|
|
|
197
202
|
);
|
|
198
203
|
process.exit(1);
|
|
199
204
|
}
|
|
200
|
-
const apiPort = argv.port ?? parseInt(process.env.PORT ?? "8911", 10);
|
|
201
|
-
const apiHost = argv.host ?? process.env.HOST ?? "localhost";
|
|
202
205
|
process.stdout.write(
|
|
203
206
|
`API server starting at http://${apiHost}:${apiPort}...`
|
|
204
207
|
);
|
|
@@ -27,8 +27,8 @@ const bothServerFileHandler = async (argv) => {
|
|
|
27
27
|
} else {
|
|
28
28
|
argv.apiPort ??= getAPIPort();
|
|
29
29
|
argv.apiHost ??= getAPIHost();
|
|
30
|
-
argv.webPort ??= getWebPort();
|
|
31
|
-
argv.webHost ??= getWebHost();
|
|
30
|
+
argv.webPort ??= getWebPort({ isPublicSide: true });
|
|
31
|
+
argv.webHost ??= getWebHost({ isPublicSide: true });
|
|
32
32
|
const apiRootPath = argv.apiRootPath ?? getAPIRootPath();
|
|
33
33
|
const apiProxyTarget = [
|
|
34
34
|
"http://",
|
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.2819",
|
|
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.2819",
|
|
37
|
+
"@cedarjs/cli-helpers": "6.0.0-canary.2819",
|
|
38
|
+
"@cedarjs/fastify-web": "6.0.0-canary.2819",
|
|
39
|
+
"@cedarjs/internal": "6.0.0-canary.2819",
|
|
40
|
+
"@cedarjs/prerender": "6.0.0-canary.2819",
|
|
41
|
+
"@cedarjs/project-config": "6.0.0-canary.2819",
|
|
42
|
+
"@cedarjs/structure": "6.0.0-canary.2819",
|
|
43
|
+
"@cedarjs/telemetry": "6.0.0-canary.2819",
|
|
44
|
+
"@cedarjs/utils": "6.0.0-canary.2819",
|
|
45
|
+
"@cedarjs/vite": "6.0.0-canary.2819",
|
|
46
|
+
"@cedarjs/web-server": "6.0.0-canary.2819",
|
|
47
47
|
"@listr2/prompt-adapter-enquirer": "4.3.0",
|
|
48
48
|
"@opentelemetry/api": "1.9.1",
|
|
49
49
|
"@opentelemetry/core": "1.30.1",
|