@cedarjs/cli 1.0.0-canary.12728 → 1.0.0-canary.12730
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/generate/directive/directiveHandler.js +2 -8
- package/dist/commands/generate.js +2 -4
- package/dist/commands/lint.js +16 -18
- package/dist/commands/prismaHandler.js +6 -10
- package/dist/commands/serveBothHandler.js +1 -3
- package/dist/commands/serveWebHandler.js +0 -1
- package/dist/commands/testHandler.js +1 -2
- package/dist/commands/testHandlerEsm.js +1 -2
- package/dist/lib/background.js +21 -13
- package/dist/rwfw.js +0 -1
- package/package.json +11 -11
|
@@ -120,15 +120,9 @@ const handler = async (args) => {
|
|
|
120
120
|
title: "Generating TypeScript definitions and GraphQL schemas ...",
|
|
121
121
|
task: () => {
|
|
122
122
|
addFunctionToRollback(async () => {
|
|
123
|
-
await execa("yarn rw-gen"
|
|
124
|
-
stdio: "pipe",
|
|
125
|
-
shell: true
|
|
126
|
-
});
|
|
123
|
+
await execa("yarn", ["rw-gen"], { stdio: "pipe" });
|
|
127
124
|
}, true);
|
|
128
|
-
return execa("yarn rw-gen"
|
|
129
|
-
stdio: "inherit",
|
|
130
|
-
shell: true
|
|
131
|
-
});
|
|
125
|
+
return execa("yarn", ["rw-gen"], { stdio: "inherit" });
|
|
132
126
|
}
|
|
133
127
|
},
|
|
134
128
|
{
|
|
@@ -22,11 +22,9 @@ const command = "generate <type>";
|
|
|
22
22
|
const aliases = ["g"];
|
|
23
23
|
const description = "Generate boilerplate code and type definitions";
|
|
24
24
|
const builder = (yargs) => yargs.command("types", "Generate supplementary code", {}, () => {
|
|
25
|
-
recordTelemetryAttributes({
|
|
26
|
-
command: "generate types"
|
|
27
|
-
});
|
|
25
|
+
recordTelemetryAttributes({ command: "generate types" });
|
|
28
26
|
try {
|
|
29
|
-
execa.sync("yarn rw-gen", {
|
|
27
|
+
execa.sync("yarn", ["rw-gen"], { stdio: "inherit" });
|
|
30
28
|
} catch (error) {
|
|
31
29
|
process.exitCode = error.exitCode ?? 1;
|
|
32
30
|
}
|
package/dist/commands/lint.js
CHANGED
|
@@ -29,24 +29,22 @@ const handler = async ({ path, fix, format }) => {
|
|
|
29
29
|
try {
|
|
30
30
|
const pathString = path?.join(" ");
|
|
31
31
|
const sbPath = getPaths().web.storybook;
|
|
32
|
-
const
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
);
|
|
32
|
+
const args = [
|
|
33
|
+
"eslint",
|
|
34
|
+
fix && "--fix",
|
|
35
|
+
"--format",
|
|
36
|
+
format,
|
|
37
|
+
!pathString && fs.existsSync(getPaths().web.src) && "web/src",
|
|
38
|
+
!pathString && fs.existsSync(getPaths().web.config) && "web/config",
|
|
39
|
+
!pathString && fs.existsSync(sbPath) && "web/.storybook",
|
|
40
|
+
!pathString && fs.existsSync(getPaths().scripts) && "scripts",
|
|
41
|
+
!pathString && fs.existsSync(getPaths().api.src) && "api/src",
|
|
42
|
+
pathString
|
|
43
|
+
].filter(Boolean);
|
|
44
|
+
const result = await execa("yarn", args, {
|
|
45
|
+
cwd: getPaths().base,
|
|
46
|
+
stdio: "inherit"
|
|
47
|
+
});
|
|
50
48
|
process.exitCode = result.exitCode;
|
|
51
49
|
} catch (error) {
|
|
52
50
|
process.exitCode = error.exitCode ?? 1;
|
|
@@ -49,16 +49,12 @@ const handler = async ({ _, $0, commands = [], ...options }) => {
|
|
|
49
49
|
console.log(c.underline("$ yarn prisma " + args.join(" ")));
|
|
50
50
|
console.log();
|
|
51
51
|
try {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
stdio: "inherit",
|
|
59
|
-
cleanup: true
|
|
60
|
-
}
|
|
61
|
-
);
|
|
52
|
+
const prismaBin = path.join(rwjsPaths.base, "node_modules/.bin/prisma");
|
|
53
|
+
execa.sync(prismaBin, args, {
|
|
54
|
+
cwd: rwjsPaths.base,
|
|
55
|
+
stdio: "inherit",
|
|
56
|
+
cleanup: true
|
|
57
|
+
});
|
|
62
58
|
if (hasHelpOption || commands.length === 0) {
|
|
63
59
|
printWrapInfo();
|
|
64
60
|
}
|
|
@@ -16,8 +16,7 @@ const bothServerFileHandler = async (argv) => {
|
|
|
16
16
|
logSkippingFastifyWebServer();
|
|
17
17
|
await execa("yarn", ["rw-serve-fe"], {
|
|
18
18
|
cwd: getPaths().web.base,
|
|
19
|
-
stdio: "inherit"
|
|
20
|
-
shell: true
|
|
19
|
+
stdio: "inherit"
|
|
21
20
|
});
|
|
22
21
|
} else {
|
|
23
22
|
argv.apiPort ??= getAPIPort();
|
|
@@ -74,7 +73,6 @@ const bothSsrRscServerHandler = async (argv, rscEnabled) => {
|
|
|
74
73
|
const fePromise = execa("yarn", ["rw-serve-fe"], {
|
|
75
74
|
cwd: getPaths().web.base,
|
|
76
75
|
stdio: "inherit",
|
|
77
|
-
shell: true,
|
|
78
76
|
env: rscEnabled ? {
|
|
79
77
|
// TODO (RSC): Is this how we want to do it? If so, we need to find a way
|
|
80
78
|
// to merge this with users' NODE_OPTIONS
|
|
@@ -4,7 +4,6 @@ const webSsrServerHandler = async (rscEnabled) => {
|
|
|
4
4
|
await execa("yarn", ["rw-serve-fe"], {
|
|
5
5
|
cwd: getPaths().web.base,
|
|
6
6
|
stdio: "inherit",
|
|
7
|
-
shell: true,
|
|
8
7
|
env: rscEnabled ? {
|
|
9
8
|
// TODO (RSC): Is this how we want to do it? If so, we need to find a way
|
|
10
9
|
// to merge this with users' NODE_OPTIONS
|
|
@@ -114,9 +114,8 @@ const handler = async ({
|
|
|
114
114
|
process.env.SKIP_DB_PUSH = "1";
|
|
115
115
|
}
|
|
116
116
|
const runCommand = async () => {
|
|
117
|
-
await execa("yarn jest", jestArgs, {
|
|
117
|
+
await execa("yarn", ["jest", ...jestArgs], {
|
|
118
118
|
cwd: rwjsPaths.base,
|
|
119
|
-
shell: true,
|
|
120
119
|
stdio: "inherit",
|
|
121
120
|
env: { DATABASE_URL }
|
|
122
121
|
});
|
|
@@ -62,9 +62,8 @@ const handler = async ({
|
|
|
62
62
|
process.env.SKIP_DB_PUSH = "1";
|
|
63
63
|
}
|
|
64
64
|
const runCommand = async () => {
|
|
65
|
-
await execa("yarn vitest", vitestArgs, {
|
|
65
|
+
await execa("yarn", ["vitest", ...vitestArgs], {
|
|
66
66
|
cwd: rwjsPaths.base,
|
|
67
|
-
shell: true,
|
|
68
67
|
stdio: "inherit",
|
|
69
68
|
env: { DATABASE_URL }
|
|
70
69
|
});
|
package/dist/lib/background.js
CHANGED
|
@@ -26,19 +26,27 @@ function spawnBackgroundProcess(name, cmd, args) {
|
|
|
26
26
|
"w"
|
|
27
27
|
);
|
|
28
28
|
fs.writeSync(stderr, logHeader);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
if (os.type() === "Windows_NT") {
|
|
30
|
+
const spawnOptions = {
|
|
31
|
+
// The following options run the process in the background without a
|
|
32
|
+
// console window, even though they don't look like they would.
|
|
33
|
+
// See https://github.com/nodejs/node/issues/21825#issuecomment-503766781
|
|
34
|
+
// for information.
|
|
35
|
+
detached: false,
|
|
36
|
+
windowsHide: false,
|
|
37
|
+
shell: true,
|
|
38
|
+
stdio: ["ignore", stdout, stderr]
|
|
39
|
+
};
|
|
40
|
+
const child = spawn(cmd + " " + args.join(" "), spawnOptions);
|
|
41
|
+
child.unref();
|
|
42
|
+
} else {
|
|
43
|
+
const spawnOptions = {
|
|
44
|
+
detached: true,
|
|
45
|
+
stdio: ["ignore", stdout, stderr]
|
|
46
|
+
};
|
|
47
|
+
const child = spawn(cmd, args, spawnOptions);
|
|
48
|
+
child.unref();
|
|
49
|
+
}
|
|
42
50
|
}
|
|
43
51
|
export {
|
|
44
52
|
spawnBackgroundProcess
|
package/dist/rwfw.js
CHANGED
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.12730+989a16511",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/preset-typescript": "7.27.1",
|
|
34
34
|
"@babel/runtime-corejs3": "7.27.6",
|
|
35
|
-
"@cedarjs/api-server": "1.0.0-canary.
|
|
36
|
-
"@cedarjs/cli-helpers": "1.0.0-canary.
|
|
37
|
-
"@cedarjs/fastify-web": "1.0.0-canary.
|
|
38
|
-
"@cedarjs/internal": "1.0.0-canary.
|
|
39
|
-
"@cedarjs/prerender": "1.0.0-canary.
|
|
40
|
-
"@cedarjs/project-config": "1.0.0-canary.
|
|
41
|
-
"@cedarjs/structure": "1.0.0-canary.
|
|
42
|
-
"@cedarjs/telemetry": "1.0.0-canary.
|
|
43
|
-
"@cedarjs/web-server": "1.0.0-canary.
|
|
35
|
+
"@cedarjs/api-server": "1.0.0-canary.12730",
|
|
36
|
+
"@cedarjs/cli-helpers": "1.0.0-canary.12730",
|
|
37
|
+
"@cedarjs/fastify-web": "1.0.0-canary.12730",
|
|
38
|
+
"@cedarjs/internal": "1.0.0-canary.12730",
|
|
39
|
+
"@cedarjs/prerender": "1.0.0-canary.12730",
|
|
40
|
+
"@cedarjs/project-config": "1.0.0-canary.12730",
|
|
41
|
+
"@cedarjs/structure": "1.0.0-canary.12730",
|
|
42
|
+
"@cedarjs/telemetry": "1.0.0-canary.12730",
|
|
43
|
+
"@cedarjs/web-server": "1.0.0-canary.12730",
|
|
44
44
|
"@listr2/prompt-adapter-enquirer": "2.0.16",
|
|
45
45
|
"@opentelemetry/api": "1.8.0",
|
|
46
46
|
"@opentelemetry/core": "1.22.0",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"publishConfig": {
|
|
103
103
|
"access": "public"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "989a16511067706d010c59ab65f9aadc2ab16276"
|
|
106
106
|
}
|