@cedarjs/cli 1.0.0-canary.12509 → 1.0.0-canary.12511
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,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { argv } from "node:process";
|
|
2
3
|
import concurrently from "concurrently";
|
|
3
4
|
import fs from "fs-extra";
|
|
4
5
|
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
@@ -124,12 +125,17 @@ const handler = async ({
|
|
|
124
125
|
return "";
|
|
125
126
|
};
|
|
126
127
|
const redwoodConfigPath = getConfigPath();
|
|
127
|
-
const streamingSsrEnabled = getConfig().experimental
|
|
128
|
+
const streamingSsrEnabled = getConfig().experimental?.streamingSsr?.enabled;
|
|
128
129
|
process.env.VITE_CJS_IGNORE_WARNING = "true";
|
|
129
130
|
let webCommand = `yarn cross-env NODE_ENV=development rw-vite-dev ${forward}`;
|
|
130
131
|
if (streamingSsrEnabled) {
|
|
131
132
|
webCommand = `yarn cross-env NODE_ENV=development rw-dev-fe ${forward}`;
|
|
132
133
|
}
|
|
134
|
+
const rootPackageJson = JSON.parse(
|
|
135
|
+
fs.readFileSync(path.join(rwjsPaths.base, "package.json"), "utf8")
|
|
136
|
+
);
|
|
137
|
+
const isEsm = rootPackageJson.type === "module";
|
|
138
|
+
const serverWatchCommand = isEsm ? `cedarjs-api-server-watch` : `rw-api-server-watch`;
|
|
133
139
|
const jobs = {
|
|
134
140
|
api: {
|
|
135
141
|
name: "api",
|
|
@@ -137,7 +143,7 @@ const handler = async ({
|
|
|
137
143
|
"yarn nodemon",
|
|
138
144
|
" --quiet",
|
|
139
145
|
` --watch "${redwoodConfigPath}"`,
|
|
140
|
-
|
|
146
|
+
` --exec "yarn ${serverWatchCommand}`,
|
|
141
147
|
` --port ${apiAvailablePort}`,
|
|
142
148
|
` ${getApiDebugFlag()}`,
|
|
143
149
|
' | rw-log-formatter"'
|
|
@@ -99,7 +99,7 @@ ENV NODE_ENV=production
|
|
|
99
99
|
# This is important if you intend to configure GraphQL to use Realtime.
|
|
100
100
|
#
|
|
101
101
|
# CMD [ "./api/dist/server.js" ]
|
|
102
|
-
CMD [ "node_modules/.bin/
|
|
102
|
+
CMD [ "node_modules/.bin/cedarjs-server", "api" ]
|
|
103
103
|
|
|
104
104
|
# web serve
|
|
105
105
|
# ---------
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "1.0.0-canary.
|
|
3
|
+
"version": "1.0.0-canary.12511+c27e34429",
|
|
4
4
|
"description": "The Redwood Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime-corejs3": "7.27.6",
|
|
34
|
-
"@cedarjs/api-server": "1.0.0-canary.
|
|
35
|
-
"@cedarjs/cli-helpers": "1.0.0-canary.
|
|
36
|
-
"@cedarjs/fastify-web": "1.0.0-canary.
|
|
37
|
-
"@cedarjs/internal": "1.0.0-canary.
|
|
38
|
-
"@cedarjs/prerender": "1.0.0-canary.
|
|
39
|
-
"@cedarjs/project-config": "1.0.0-canary.
|
|
40
|
-
"@cedarjs/structure": "1.0.0-canary.
|
|
41
|
-
"@cedarjs/telemetry": "1.0.0-canary.
|
|
42
|
-
"@cedarjs/web-server": "1.0.0-canary.
|
|
34
|
+
"@cedarjs/api-server": "1.0.0-canary.12511",
|
|
35
|
+
"@cedarjs/cli-helpers": "1.0.0-canary.12511",
|
|
36
|
+
"@cedarjs/fastify-web": "1.0.0-canary.12511",
|
|
37
|
+
"@cedarjs/internal": "1.0.0-canary.12511",
|
|
38
|
+
"@cedarjs/prerender": "1.0.0-canary.12511",
|
|
39
|
+
"@cedarjs/project-config": "1.0.0-canary.12511",
|
|
40
|
+
"@cedarjs/structure": "1.0.0-canary.12511",
|
|
41
|
+
"@cedarjs/telemetry": "1.0.0-canary.12511",
|
|
42
|
+
"@cedarjs/web-server": "1.0.0-canary.12511",
|
|
43
43
|
"@listr2/prompt-adapter-enquirer": "2.0.16",
|
|
44
44
|
"@opentelemetry/api": "1.8.0",
|
|
45
45
|
"@opentelemetry/core": "1.22.0",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"typescript": "5.6.2",
|
|
99
99
|
"vitest": "3.2.4"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "c27e34429e30fdbb2c6fbf6f502c3d130ecd9ca9"
|
|
102
102
|
}
|