@cedarjs/cli 5.0.2-rc.5 → 6.0.0-canary.2616
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,11 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
4
|
-
import {
|
|
5
|
-
runBin,
|
|
6
|
-
runTransitiveBin,
|
|
7
|
-
runWithNode
|
|
8
|
-
} from "@cedarjs/cli-helpers/packageManager/exec";
|
|
4
|
+
import { runBin, runWithNode } from "@cedarjs/cli-helpers/packageManager/exec";
|
|
9
5
|
import { getPaths } from "@cedarjs/project-config";
|
|
10
6
|
async function runBinWithThrow(bin, args, options) {
|
|
11
7
|
const result = await runBin(bin, args, options);
|
|
@@ -14,13 +10,6 @@ async function runBinWithThrow(bin, args, options) {
|
|
|
14
10
|
}
|
|
15
11
|
return result;
|
|
16
12
|
}
|
|
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
|
-
}
|
|
24
13
|
const handler = async ({
|
|
25
14
|
side,
|
|
26
15
|
serve,
|
|
@@ -46,7 +35,7 @@ const handler = async ({
|
|
|
46
35
|
await runBinWithThrow("cedar", ["build", "api", "--verbose"], execaConfig);
|
|
47
36
|
if (prisma) {
|
|
48
37
|
console.log("Running database migrations...");
|
|
49
|
-
await
|
|
38
|
+
await runBinWithThrow(
|
|
50
39
|
"prisma",
|
|
51
40
|
["migrate", "deploy", "--config", cedarPaths.api.prismaConfig],
|
|
52
41
|
execaConfig
|
|
@@ -4,7 +4,6 @@ import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
|
4
4
|
import { formatAddRootPackagesCommand } from "@cedarjs/cli-helpers/packageManager/display";
|
|
5
5
|
import {
|
|
6
6
|
runBinSync,
|
|
7
|
-
runTransitiveBinSync,
|
|
8
7
|
runWithNode
|
|
9
8
|
} from "@cedarjs/cli-helpers/packageManager/exec";
|
|
10
9
|
import { installPackages } from "@cedarjs/cli-helpers/packageManager/packages";
|
|
@@ -29,7 +28,7 @@ const handler = async ({
|
|
|
29
28
|
async function runApiCommands() {
|
|
30
29
|
if (prisma) {
|
|
31
30
|
console.log("Running database migrations...");
|
|
32
|
-
|
|
31
|
+
runBinSync(
|
|
33
32
|
"prisma",
|
|
34
33
|
["migrate", "deploy", "--config", cedarPaths.api.prismaConfig],
|
|
35
34
|
execaConfig
|
|
@@ -30,14 +30,8 @@ const customOrDefaultTemplatePath = ({
|
|
|
30
30
|
generator,
|
|
31
31
|
templatePath
|
|
32
32
|
);
|
|
33
|
-
const deprecatedCustomPath = getPaths()[side].generators ? path.join(getPaths()[side].generators, generator, templatePath) : void 0;
|
|
34
33
|
if (fs.existsSync(customPath)) {
|
|
35
34
|
return customPath;
|
|
36
|
-
} else if (deprecatedCustomPath && fs.existsSync(deprecatedCustomPath)) {
|
|
37
|
-
console.log(
|
|
38
|
-
`Having generator templates in ${getPaths()[side].generators} has been deprecated. Please move them to ${getPaths().generatorTemplates}.`
|
|
39
|
-
);
|
|
40
|
-
return deprecatedCustomPath;
|
|
41
35
|
} else {
|
|
42
36
|
return defaultPath;
|
|
43
37
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-canary.2616",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/parser": "7.29.7",
|
|
35
35
|
"@babel/preset-typescript": "7.29.7",
|
|
36
|
-
"@cedarjs/api-server": "
|
|
37
|
-
"@cedarjs/cli-helpers": "
|
|
38
|
-
"@cedarjs/fastify-web": "
|
|
39
|
-
"@cedarjs/internal": "
|
|
40
|
-
"@cedarjs/prerender": "
|
|
41
|
-
"@cedarjs/project-config": "
|
|
42
|
-
"@cedarjs/structure": "
|
|
43
|
-
"@cedarjs/telemetry": "
|
|
44
|
-
"@cedarjs/utils": "
|
|
45
|
-
"@cedarjs/vite": "
|
|
46
|
-
"@cedarjs/web-server": "
|
|
36
|
+
"@cedarjs/api-server": "6.0.0-canary.2616",
|
|
37
|
+
"@cedarjs/cli-helpers": "6.0.0-canary.2616",
|
|
38
|
+
"@cedarjs/fastify-web": "6.0.0-canary.2616",
|
|
39
|
+
"@cedarjs/internal": "6.0.0-canary.2616",
|
|
40
|
+
"@cedarjs/prerender": "6.0.0-canary.2616",
|
|
41
|
+
"@cedarjs/project-config": "6.0.0-canary.2616",
|
|
42
|
+
"@cedarjs/structure": "6.0.0-canary.2616",
|
|
43
|
+
"@cedarjs/telemetry": "6.0.0-canary.2616",
|
|
44
|
+
"@cedarjs/utils": "6.0.0-canary.2616",
|
|
45
|
+
"@cedarjs/vite": "6.0.0-canary.2616",
|
|
46
|
+
"@cedarjs/web-server": "6.0.0-canary.2616",
|
|
47
47
|
"@listr2/prompt-adapter-enquirer": "4.2.1",
|
|
48
48
|
"@opentelemetry/api": "1.9.1",
|
|
49
49
|
"@opentelemetry/core": "1.30.1",
|
|
@@ -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.
|
|
94
|
+
"yargs": "17.7.2"
|
|
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.
|
|
101
|
+
"memfs": "4.57.7",
|
|
102
102
|
"node-ssh": "13.2.1",
|
|
103
103
|
"ts-dedent": "2.3.0",
|
|
104
104
|
"typescript": "5.9.3",
|