@cedarjs/cli 4.0.0-canary.13801 → 4.0.0-rc.129
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.
|
@@ -5,8 +5,9 @@ import { Listr } from "listr2";
|
|
|
5
5
|
import * as toml from "smol-toml";
|
|
6
6
|
import { env as envInterpolation } from "string-env-interpolation";
|
|
7
7
|
import { titleCase } from "title-case";
|
|
8
|
-
import { colors as c } from "@cedarjs/cli-helpers";
|
|
8
|
+
import { colors as c, recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
9
9
|
import { getPaths } from "../../../lib/index.js";
|
|
10
|
+
import { SshExecutor } from "./SshExecutor.js";
|
|
10
11
|
const CONFIG_FILENAME = "deploy.toml";
|
|
11
12
|
const SYMLINK_FLAGS = "-nsf";
|
|
12
13
|
const CURRENT_RELEASE_SYMLINK_NAME = "current";
|
|
@@ -491,7 +492,20 @@ const commands = (yargs, ssh) => {
|
|
|
491
492
|
return servers;
|
|
492
493
|
};
|
|
493
494
|
const handler = async (yargs) => {
|
|
494
|
-
|
|
495
|
+
recordTelemetryAttributes({
|
|
496
|
+
command: "deploy baremetal",
|
|
497
|
+
firstRun: yargs.firstRun,
|
|
498
|
+
df: yargs.df,
|
|
499
|
+
update: yargs.update,
|
|
500
|
+
install: yargs.install,
|
|
501
|
+
migrate: yargs.migrate,
|
|
502
|
+
build: yargs.build,
|
|
503
|
+
restart: yargs.restart,
|
|
504
|
+
cleanup: yargs.cleanup,
|
|
505
|
+
maintenance: yargs.maintenance,
|
|
506
|
+
rollback: yargs.rollback,
|
|
507
|
+
verbose: yargs.verbose
|
|
508
|
+
});
|
|
495
509
|
const tomlPath = path.join(getPaths().base, "deploy.toml");
|
|
496
510
|
const ecosystemPath = path.join(getPaths().base, "ecosystem.config.js");
|
|
497
511
|
if (!fs.existsSync(tomlPath) || !fs.existsSync(ecosystemPath)) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { terminalLink } from "termi-link";
|
|
2
|
-
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
3
2
|
import { getPackageManager } from "@cedarjs/project-config/packageManager";
|
|
4
3
|
const command = "baremetal [environment]";
|
|
5
4
|
const description = "Deploy to baremetal server(s)";
|
|
@@ -80,22 +79,8 @@ const builder = (yargs) => {
|
|
|
80
79
|
);
|
|
81
80
|
};
|
|
82
81
|
async function handler(yargs) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
firstRun: yargs.firstRun,
|
|
86
|
-
df: yargs.df,
|
|
87
|
-
update: yargs.update,
|
|
88
|
-
install: yargs.install,
|
|
89
|
-
migrate: yargs.migrate,
|
|
90
|
-
build: yargs.build,
|
|
91
|
-
restart: yargs.restart,
|
|
92
|
-
cleanup: yargs.cleanup,
|
|
93
|
-
maintenance: yargs.maintenance,
|
|
94
|
-
rollback: yargs.rollback,
|
|
95
|
-
verbose: yargs.verbose
|
|
96
|
-
});
|
|
97
|
-
const { handler: baremetalHandler } = await import("./baremetal/baremetalHandler.js");
|
|
98
|
-
return baremetalHandler(yargs);
|
|
82
|
+
const { handler: importedHandler } = await import("./baremetal/baremetalHandler.js");
|
|
83
|
+
return importedHandler(yargs);
|
|
99
84
|
}
|
|
100
85
|
export {
|
|
101
86
|
builder,
|
|
@@ -32,7 +32,7 @@ const handler = async ({
|
|
|
32
32
|
async function runApiCommands() {
|
|
33
33
|
if (!serve) {
|
|
34
34
|
console.log("Building api...");
|
|
35
|
-
await runExecaCommand("yarn
|
|
35
|
+
await runExecaCommand("yarn rw build api --verbose");
|
|
36
36
|
if (prisma) {
|
|
37
37
|
console.log("Running database migrations...");
|
|
38
38
|
await runExecaCommand(
|
|
@@ -41,7 +41,7 @@ const handler = async ({
|
|
|
41
41
|
}
|
|
42
42
|
if (dataMigrate) {
|
|
43
43
|
console.log("Running data migrations...");
|
|
44
|
-
await runExecaCommand("yarn
|
|
44
|
+
await runExecaCommand("yarn rw dataMigrate up");
|
|
45
45
|
}
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
@@ -56,7 +56,7 @@ const handler = async ({
|
|
|
56
56
|
}
|
|
57
57
|
async function runWebCommands() {
|
|
58
58
|
console.log("Building web...");
|
|
59
|
-
await runExecaCommand("yarn
|
|
59
|
+
await runExecaCommand("yarn rw build web --verbose");
|
|
60
60
|
}
|
|
61
61
|
if (side === "api") {
|
|
62
62
|
await runApiCommands();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-rc.129",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/parser": "7.29.2",
|
|
35
35
|
"@babel/preset-typescript": "7.28.5",
|
|
36
|
-
"@cedarjs/api-server": "4.0.0-
|
|
37
|
-
"@cedarjs/cli-helpers": "4.0.0-
|
|
38
|
-
"@cedarjs/fastify-web": "4.0.0-
|
|
39
|
-
"@cedarjs/internal": "4.0.0-
|
|
40
|
-
"@cedarjs/prerender": "4.0.0-
|
|
41
|
-
"@cedarjs/project-config": "4.0.0-
|
|
42
|
-
"@cedarjs/structure": "4.0.0-
|
|
43
|
-
"@cedarjs/telemetry": "4.0.0-
|
|
44
|
-
"@cedarjs/utils": "4.0.0-
|
|
45
|
-
"@cedarjs/web-server": "4.0.0-
|
|
36
|
+
"@cedarjs/api-server": "4.0.0-rc.129",
|
|
37
|
+
"@cedarjs/cli-helpers": "4.0.0-rc.129",
|
|
38
|
+
"@cedarjs/fastify-web": "4.0.0-rc.129",
|
|
39
|
+
"@cedarjs/internal": "4.0.0-rc.129",
|
|
40
|
+
"@cedarjs/prerender": "4.0.0-rc.129",
|
|
41
|
+
"@cedarjs/project-config": "4.0.0-rc.129",
|
|
42
|
+
"@cedarjs/structure": "4.0.0-rc.129",
|
|
43
|
+
"@cedarjs/telemetry": "4.0.0-rc.129",
|
|
44
|
+
"@cedarjs/utils": "4.0.0-rc.129",
|
|
45
|
+
"@cedarjs/web-server": "4.0.0-rc.129",
|
|
46
46
|
"@listr2/prompt-adapter-enquirer": "4.2.1",
|
|
47
47
|
"@opentelemetry/api": "1.9.0",
|
|
48
48
|
"@opentelemetry/core": "1.30.1",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
"publishConfig": {
|
|
109
109
|
"access": "public"
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "1c22a801dc9ffcbf09512278c8048160d9338c0a"
|
|
112
112
|
}
|