@cedarjs/cli 0.11.1-next.0 → 0.12.0-rc.6
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,7 @@
|
|
|
1
1
|
import execa from "execa";
|
|
2
2
|
import { getPaths } from "@cedarjs/project-config";
|
|
3
3
|
import c from "../../../lib/colors.js";
|
|
4
|
-
const deployHandler =
|
|
4
|
+
const deployHandler = ({ build, prisma, dm: dataMigrate }) => {
|
|
5
5
|
const paths = getPaths();
|
|
6
6
|
let commandSet = [];
|
|
7
7
|
if (build) {
|
|
@@ -14,9 +14,7 @@ const deployHandler = async ({ build, prisma, dm: dataMigrate }) => {
|
|
|
14
14
|
commandSet.push("yarn rw data-migrate up");
|
|
15
15
|
}
|
|
16
16
|
const joinedCommands = commandSet.join(" && ");
|
|
17
|
-
console.log(c.note(
|
|
18
|
-
Running:
|
|
19
|
-
`) + `${joinedCommands}
|
|
17
|
+
console.log(c.note("\nRunning:\n") + `${joinedCommands}
|
|
20
18
|
`);
|
|
21
19
|
return execa(joinedCommands, {
|
|
22
20
|
shell: true,
|
|
@@ -10,8 +10,8 @@ async function handler(yargs) {
|
|
|
10
10
|
prisma: yargs.prisma,
|
|
11
11
|
dataMigrate: yargs.dataMigrate
|
|
12
12
|
});
|
|
13
|
-
const {
|
|
14
|
-
return
|
|
13
|
+
const { deployHandler } = await import("./helpers/deployHandler.js");
|
|
14
|
+
return deployHandler(yargs);
|
|
15
15
|
}
|
|
16
16
|
export {
|
|
17
17
|
builder,
|
|
@@ -10,8 +10,8 @@ async function handler(yargs) {
|
|
|
10
10
|
prisma: yargs.prisma,
|
|
11
11
|
dataMigrate: yargs.dataMigrate
|
|
12
12
|
});
|
|
13
|
-
const {
|
|
14
|
-
return
|
|
13
|
+
const { deployHandler } = await import("./helpers/deployHandler.js");
|
|
14
|
+
return deployHandler(yargs);
|
|
15
15
|
}
|
|
16
16
|
export {
|
|
17
17
|
builder,
|
|
@@ -97,24 +97,26 @@ const handler = async ({ name, force, ...rest }) => {
|
|
|
97
97
|
queueName = jobManager.jobs?.queues[0] ?? "default";
|
|
98
98
|
} catch (_e) {
|
|
99
99
|
}
|
|
100
|
+
let jobFiles = {};
|
|
100
101
|
const tasks = new Listr(
|
|
101
102
|
[
|
|
102
103
|
{
|
|
103
104
|
title: "Generating job files...",
|
|
104
105
|
task: async () => {
|
|
105
|
-
|
|
106
|
+
jobFiles = await files({ name, queueName, ...rest });
|
|
106
107
|
return writeFilesTask(jobFiles, { overwriteExisting: force });
|
|
107
108
|
}
|
|
108
109
|
},
|
|
109
110
|
{
|
|
110
111
|
title: "Cleaning up...",
|
|
111
112
|
task: () => {
|
|
112
|
-
execa.
|
|
113
|
+
execa.sync("yarn", [
|
|
113
114
|
"eslint",
|
|
114
115
|
"--fix",
|
|
115
116
|
"--config",
|
|
116
117
|
`${getPaths().base}/node_modules/@cedarjs/eslint-config/shared.js`,
|
|
117
|
-
`${getPaths().api.jobsConfig}
|
|
118
|
+
`${getPaths().api.jobsConfig}`,
|
|
119
|
+
...Object.keys(jobFiles)
|
|
118
120
|
]);
|
|
119
121
|
}
|
|
120
122
|
}
|
package/dist/commands/serve.js
CHANGED
|
@@ -4,6 +4,7 @@ import { terminalLink } from "termi-link";
|
|
|
4
4
|
import * as apiServerCLIConfig from "@cedarjs/api-server/apiCliConfig";
|
|
5
5
|
import * as bothServerCLIConfig from "@cedarjs/api-server/bothCliConfig";
|
|
6
6
|
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
7
|
+
import { projectIsEsm } from "@cedarjs/project-config";
|
|
7
8
|
import * as webServerCLIConfig from "@cedarjs/web-server";
|
|
8
9
|
import c from "../lib/colors.js";
|
|
9
10
|
import { getPaths, getConfig } from "../lib/index.js";
|
|
@@ -51,7 +52,12 @@ const builder = async (yargs) => {
|
|
|
51
52
|
const { apiServerFileHandler } = await import("./serveApiHandler.js");
|
|
52
53
|
await apiServerFileHandler(argv);
|
|
53
54
|
} else {
|
|
54
|
-
|
|
55
|
+
if (!projectIsEsm()) {
|
|
56
|
+
const { handler } = await import("@cedarjs/api-server/cjs/apiCliConfigHandler");
|
|
57
|
+
await handler(argv);
|
|
58
|
+
} else {
|
|
59
|
+
await apiServerCLIConfig.handler(argv);
|
|
60
|
+
}
|
|
55
61
|
}
|
|
56
62
|
}
|
|
57
63
|
}).command({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0-rc.6+08018d9b9",
|
|
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": "0.
|
|
36
|
-
"@cedarjs/cli-helpers": "0.
|
|
37
|
-
"@cedarjs/fastify-web": "0.
|
|
38
|
-
"@cedarjs/internal": "0.
|
|
39
|
-
"@cedarjs/prerender": "0.
|
|
40
|
-
"@cedarjs/project-config": "0.
|
|
41
|
-
"@cedarjs/structure": "0.
|
|
42
|
-
"@cedarjs/telemetry": "0.
|
|
43
|
-
"@cedarjs/web-server": "0.
|
|
35
|
+
"@cedarjs/api-server": "0.12.0-rc.6+08018d9b9",
|
|
36
|
+
"@cedarjs/cli-helpers": "0.12.0-rc.6+08018d9b9",
|
|
37
|
+
"@cedarjs/fastify-web": "0.12.0-rc.6+08018d9b9",
|
|
38
|
+
"@cedarjs/internal": "0.12.0-rc.6+08018d9b9",
|
|
39
|
+
"@cedarjs/prerender": "0.12.0-rc.6+08018d9b9",
|
|
40
|
+
"@cedarjs/project-config": "0.12.0-rc.6+08018d9b9",
|
|
41
|
+
"@cedarjs/structure": "0.12.0-rc.6+08018d9b9",
|
|
42
|
+
"@cedarjs/telemetry": "0.12.0-rc.6+08018d9b9",
|
|
43
|
+
"@cedarjs/web-server": "0.12.0-rc.6+08018d9b9",
|
|
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": "08018d9b9666eaffc33698f9e137dfcc32b62efc"
|
|
106
106
|
}
|