@cedarjs/cli 1.0.0-canary.12728 → 1.0.0-canary.12729

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.
@@ -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", { shell: true, stdio: "inherit" });
27
+ execa.sync("yarn", ["rw-gen"], { stdio: "inherit" });
30
28
  } catch (error) {
31
29
  process.exitCode = error.exitCode ?? 1;
32
30
  }
@@ -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 result = await execa(
33
- "yarn eslint",
34
- [
35
- fix && "--fix",
36
- `--format ${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
- {
45
- cwd: getPaths().base,
46
- shell: true,
47
- stdio: "inherit"
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
- execa.sync(
53
- `"${path.join(rwjsPaths.base, "node_modules/.bin/prisma")}"`,
54
- args,
55
- {
56
- shell: true,
57
- cwd: rwjsPaths.base,
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/rwfw.js CHANGED
@@ -36,7 +36,6 @@ if (!command.length || command.some((cmd) => helpCommands.includes(cmd))) {
36
36
  try {
37
37
  execa.sync("yarn", [...command], {
38
38
  stdio: "inherit",
39
- shell: true,
40
39
  cwd: absRwFwPath,
41
40
  env: {
42
41
  RWJS_CWD: projectPath
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/cli",
3
- "version": "1.0.0-canary.12728+3953ec3e6",
3
+ "version": "1.0.0-canary.12729+338020ede",
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.12728",
36
- "@cedarjs/cli-helpers": "1.0.0-canary.12728",
37
- "@cedarjs/fastify-web": "1.0.0-canary.12728",
38
- "@cedarjs/internal": "1.0.0-canary.12728",
39
- "@cedarjs/prerender": "1.0.0-canary.12728",
40
- "@cedarjs/project-config": "1.0.0-canary.12728",
41
- "@cedarjs/structure": "1.0.0-canary.12728",
42
- "@cedarjs/telemetry": "1.0.0-canary.12728",
43
- "@cedarjs/web-server": "1.0.0-canary.12728",
35
+ "@cedarjs/api-server": "1.0.0-canary.12729",
36
+ "@cedarjs/cli-helpers": "1.0.0-canary.12729",
37
+ "@cedarjs/fastify-web": "1.0.0-canary.12729",
38
+ "@cedarjs/internal": "1.0.0-canary.12729",
39
+ "@cedarjs/prerender": "1.0.0-canary.12729",
40
+ "@cedarjs/project-config": "1.0.0-canary.12729",
41
+ "@cedarjs/structure": "1.0.0-canary.12729",
42
+ "@cedarjs/telemetry": "1.0.0-canary.12729",
43
+ "@cedarjs/web-server": "1.0.0-canary.12729",
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": "3953ec3e6653502060786ab8ea1746bafa585bf2"
105
+ "gitHead": "338020ede5f5249d4126a6914f762c35ad1448f2"
106
106
  }