@cedarjs/cli 4.0.0-canary.13671 → 4.0.0-canary.13673

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,17 +1,18 @@
1
1
  import { argv } from "node:process";
2
2
  import { getConfig } from "@cedarjs/project-config";
3
- const defaultApiDebugPort = 18911;
4
- function getApiDebugFlag(apiDebugPort) {
3
+ function getApiDebugFlag(apiDebugPort, apiAvailablePort) {
5
4
  if (apiDebugPort) {
6
5
  return `--debug-port ${apiDebugPort}`;
7
6
  } else if (argv.includes("--apiDebugPort")) {
8
- return `--debug-port ${defaultApiDebugPort}`;
7
+ return `--debug-port ${"1" + apiAvailablePort}`;
9
8
  }
10
9
  const apiDebugPortInConfig = getConfig().api.debugPort;
11
10
  if (apiDebugPortInConfig) {
12
11
  return `--debug-port ${apiDebugPortInConfig}`;
12
+ } else if (apiDebugPortInConfig === false) {
13
+ return "";
13
14
  }
14
- return "";
15
+ return `--debug-port ${"1" + apiAvailablePort}`;
15
16
  }
16
17
  export {
17
18
  getApiDebugFlag
@@ -135,7 +135,7 @@ const handler = async ({
135
135
  ` --watch "${cedarConfigPath}"`,
136
136
  ` --exec "yarn ${serverWatchCommand}`,
137
137
  ` --port ${apiAvailablePort}`,
138
- ` ${getApiDebugFlag(apiDebugPort)}`,
138
+ ` ${getApiDebugFlag(apiDebugPort, apiAvailablePort)}`,
139
139
  ' | rw-log-formatter"'
140
140
  ].join(" ").replace(/\s+/g, " "),
141
141
  env: {
@@ -23,7 +23,7 @@ const builder = (yargs) => {
23
23
  description: "Generate artifacts"
24
24
  }).option("apiDebugPort", {
25
25
  type: "number",
26
- description: "Port on which to expose API server debugger. If you supply the flag with no value it defaults to 18911."
26
+ description: "Port on which to expose API server debugger. If you supply the flag with no value it defaults to 1 prepended to the api port (e.g. api port 8913 -> debug port 18913)."
27
27
  }).middleware(() => {
28
28
  const check = checkNodeVersion();
29
29
  if (check.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/cli",
3
- "version": "4.0.0-canary.13671+ae2ca154d",
3
+ "version": "4.0.0-canary.13673+dcde8831a",
4
4
  "description": "The CedarJS Command Line",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,16 +33,16 @@
33
33
  "dependencies": {
34
34
  "@babel/parser": "7.29.2",
35
35
  "@babel/preset-typescript": "7.28.5",
36
- "@cedarjs/api-server": "4.0.0-canary.13671",
37
- "@cedarjs/cli-helpers": "4.0.0-canary.13671",
38
- "@cedarjs/fastify-web": "4.0.0-canary.13671",
39
- "@cedarjs/internal": "4.0.0-canary.13671",
40
- "@cedarjs/prerender": "4.0.0-canary.13671",
41
- "@cedarjs/project-config": "4.0.0-canary.13671",
42
- "@cedarjs/structure": "4.0.0-canary.13671",
43
- "@cedarjs/telemetry": "4.0.0-canary.13671",
44
- "@cedarjs/utils": "4.0.0-canary.13671",
45
- "@cedarjs/web-server": "4.0.0-canary.13671",
36
+ "@cedarjs/api-server": "4.0.0-canary.13673",
37
+ "@cedarjs/cli-helpers": "4.0.0-canary.13673",
38
+ "@cedarjs/fastify-web": "4.0.0-canary.13673",
39
+ "@cedarjs/internal": "4.0.0-canary.13673",
40
+ "@cedarjs/prerender": "4.0.0-canary.13673",
41
+ "@cedarjs/project-config": "4.0.0-canary.13673",
42
+ "@cedarjs/structure": "4.0.0-canary.13673",
43
+ "@cedarjs/telemetry": "4.0.0-canary.13673",
44
+ "@cedarjs/utils": "4.0.0-canary.13673",
45
+ "@cedarjs/web-server": "4.0.0-canary.13673",
46
46
  "@listr2/prompt-adapter-enquirer": "4.2.1",
47
47
  "@opentelemetry/api": "1.9.0",
48
48
  "@opentelemetry/core": "1.30.1",
@@ -105,5 +105,5 @@
105
105
  "publishConfig": {
106
106
  "access": "public"
107
107
  },
108
- "gitHead": "ae2ca154dbb0f88d84ee8702d293bc85f8639624"
108
+ "gitHead": "dcde8831a217305e62b1cfa418fa7448a23c0a28"
109
109
  }