@cedarjs/cli 5.0.1-next.0 → 5.0.1-next.12

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,7 +1,11 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
4
- import { runBin, runWithNode } from "@cedarjs/cli-helpers/packageManager/exec";
4
+ import {
5
+ runBin,
6
+ runTransitiveBin,
7
+ runWithNode
8
+ } from "@cedarjs/cli-helpers/packageManager/exec";
5
9
  import { getPaths } from "@cedarjs/project-config";
6
10
  async function runBinWithThrow(bin, args, options) {
7
11
  const result = await runBin(bin, args, options);
@@ -10,6 +14,13 @@ async function runBinWithThrow(bin, args, options) {
10
14
  }
11
15
  return result;
12
16
  }
17
+ async function runTransitiveBinWithThrow(bin, args, options) {
18
+ const result = await runTransitiveBin(bin, args, options);
19
+ if (result.failed) {
20
+ throw new Error(`Command (${bin} ${args.join(" ")}) failed`);
21
+ }
22
+ return result;
23
+ }
13
24
  const handler = async ({
14
25
  side,
15
26
  serve,
@@ -35,7 +46,7 @@ const handler = async ({
35
46
  await runBinWithThrow("cedar", ["build", "api", "--verbose"], execaConfig);
36
47
  if (prisma) {
37
48
  console.log("Running database migrations...");
38
- await runBinWithThrow(
49
+ await runTransitiveBinWithThrow(
39
50
  "prisma",
40
51
  ["migrate", "deploy", "--config", cedarPaths.api.prismaConfig],
41
52
  execaConfig
@@ -4,6 +4,7 @@ import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
4
4
  import { formatAddRootPackagesCommand } from "@cedarjs/cli-helpers/packageManager/display";
5
5
  import {
6
6
  runBinSync,
7
+ runTransitiveBinSync,
7
8
  runWithNode
8
9
  } from "@cedarjs/cli-helpers/packageManager/exec";
9
10
  import { installPackages } from "@cedarjs/cli-helpers/packageManager/packages";
@@ -28,7 +29,7 @@ const handler = async ({
28
29
  async function runApiCommands() {
29
30
  if (prisma) {
30
31
  console.log("Running database migrations...");
31
- runBinSync(
32
+ runTransitiveBinSync(
32
33
  "prisma",
33
34
  ["migrate", "deploy", "--config", cedarPaths.api.prismaConfig],
34
35
  execaConfig
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/cli",
3
- "version": "5.0.1-next.0",
3
+ "version": "5.0.1-next.12",
4
4
  "description": "The CedarJS Command Line",
5
5
  "repository": {
6
6
  "type": "git",
@@ -91,14 +91,14 @@
91
91
  "title-case": "3.0.3",
92
92
  "unionfs": "4.6.0",
93
93
  "uuid": "11.1.0",
94
- "yargs": "17.7.2"
94
+ "yargs": "17.7.3"
95
95
  },
96
96
  "devDependencies": {
97
97
  "@babel/cli": "7.29.7",
98
98
  "@babel/core": "^7.26.10",
99
99
  "@prisma/dmmf": "7.8.0",
100
100
  "@types/archiver": "^7.0.0",
101
- "memfs": "4.57.7",
101
+ "memfs": "4.64.0",
102
102
  "node-ssh": "13.2.1",
103
103
  "ts-dedent": "2.3.0",
104
104
  "typescript": "5.9.3",
@@ -1,21 +0,0 @@
1
- import { rgPath } from "@vscode/ripgrep";
2
- import execa from "execa";
3
- const getFilesWithPattern = ({
4
- pattern,
5
- filesToSearch
6
- }) => {
7
- try {
8
- const { stdout } = execa.sync(rgPath, [
9
- "--files-with-matches",
10
- pattern,
11
- ...filesToSearch
12
- ]);
13
- return stdout.toString().split("\n");
14
- } catch {
15
- return [];
16
- }
17
- };
18
- var getFilesWithPattern_default = getFilesWithPattern;
19
- export {
20
- getFilesWithPattern_default as default
21
- };