@cedarjs/cli 2.4.0 → 3.0.0-canary.13187

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,10 +5,8 @@ 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 { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
9
8
  import c from "../../../lib/colors.js";
10
9
  import { getPaths } from "../../../lib/index.js";
11
- import { SshExecutor } from "./SshExecutor.js";
12
10
  const CONFIG_FILENAME = "deploy.toml";
13
11
  const SYMLINK_FLAGS = "-nsf";
14
12
  const CURRENT_RELEASE_SYMLINK_NAME = "current";
@@ -493,20 +491,7 @@ const commands = (yargs, ssh) => {
493
491
  return servers;
494
492
  };
495
493
  const handler = async (yargs) => {
496
- recordTelemetryAttributes({
497
- command: "deploy baremetal",
498
- firstRun: yargs.firstRun,
499
- df: yargs.df,
500
- update: yargs.update,
501
- install: yargs.install,
502
- migrate: yargs.migrate,
503
- build: yargs.build,
504
- restart: yargs.restart,
505
- cleanup: yargs.cleanup,
506
- maintenance: yargs.maintenance,
507
- rollback: yargs.rollback,
508
- verbose: yargs.verbose
509
- });
494
+ const { SshExecutor } = await import("./SshExecutor.js");
510
495
  const tomlPath = path.join(getPaths().base, "deploy.toml");
511
496
  const ecosystemPath = path.join(getPaths().base, "ecosystem.config.js");
512
497
  if (!fs.existsSync(tomlPath) || !fs.existsSync(ecosystemPath)) {
@@ -1,4 +1,5 @@
1
1
  import { terminalLink } from "termi-link";
2
+ import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
2
3
  const command = "baremetal [environment]";
3
4
  const description = "Deploy to baremetal server(s)";
4
5
  const builder = (yargs) => {
@@ -78,8 +79,22 @@ const builder = (yargs) => {
78
79
  );
79
80
  };
80
81
  async function handler(yargs) {
81
- const { handler: importedHandler } = await import("./baremetal/baremetalHandler.js");
82
- return importedHandler(yargs);
82
+ recordTelemetryAttributes({
83
+ command: "deploy baremetal",
84
+ firstRun: yargs.firstRun,
85
+ df: yargs.df,
86
+ update: yargs.update,
87
+ install: yargs.install,
88
+ migrate: yargs.migrate,
89
+ build: yargs.build,
90
+ restart: yargs.restart,
91
+ cleanup: yargs.cleanup,
92
+ maintenance: yargs.maintenance,
93
+ rollback: yargs.rollback,
94
+ verbose: yargs.verbose
95
+ });
96
+ const { handler: baremetalHandler } = await import("./baremetal/baremetalHandler.js");
97
+ return baremetalHandler(yargs);
83
98
  }
84
99
  export {
85
100
  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 rw build api --verbose");
35
+ await runExecaCommand("yarn cedar 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 rw dataMigrate up");
44
+ await runExecaCommand("yarn cedar 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 rw build web --verbose");
59
+ await runExecaCommand("yarn cedar build web --verbose");
60
60
  }
61
61
  if (side === "api") {
62
62
  await runApiCommands();
@@ -41,6 +41,11 @@ const handler = async (args) => {
41
41
  printAvailableScriptsToConsole();
42
42
  return;
43
43
  }
44
+ scriptArgs._ = scriptArgs._.slice(1);
45
+ delete scriptArgs.$0;
46
+ delete scriptArgs.l;
47
+ delete scriptArgs.s;
48
+ delete scriptArgs.silent;
44
49
  const scriptPath = resolveScriptPath(name);
45
50
  if (!scriptPath) {
46
51
  console.error(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/cli",
3
- "version": "2.4.0",
3
+ "version": "3.0.0-canary.13187+947a27d51",
4
4
  "description": "The CedarJS Command Line",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,15 +33,15 @@
33
33
  "dependencies": {
34
34
  "@babel/preset-typescript": "7.28.5",
35
35
  "@babel/runtime-corejs3": "7.28.4",
36
- "@cedarjs/api-server": "2.4.0",
37
- "@cedarjs/cli-helpers": "2.4.0",
38
- "@cedarjs/fastify-web": "2.4.0",
39
- "@cedarjs/internal": "2.4.0",
40
- "@cedarjs/prerender": "2.4.0",
41
- "@cedarjs/project-config": "2.4.0",
42
- "@cedarjs/structure": "2.4.0",
43
- "@cedarjs/telemetry": "2.4.0",
44
- "@cedarjs/web-server": "2.4.0",
36
+ "@cedarjs/api-server": "3.0.0-canary.13187",
37
+ "@cedarjs/cli-helpers": "3.0.0-canary.13187",
38
+ "@cedarjs/fastify-web": "3.0.0-canary.13187",
39
+ "@cedarjs/internal": "3.0.0-canary.13187",
40
+ "@cedarjs/prerender": "3.0.0-canary.13187",
41
+ "@cedarjs/project-config": "3.0.0-canary.13187",
42
+ "@cedarjs/structure": "3.0.0-canary.13187",
43
+ "@cedarjs/telemetry": "3.0.0-canary.13187",
44
+ "@cedarjs/web-server": "3.0.0-canary.13187",
45
45
  "@listr2/prompt-adapter-enquirer": "2.0.16",
46
46
  "@opentelemetry/api": "1.8.0",
47
47
  "@opentelemetry/core": "1.22.0",
@@ -103,5 +103,5 @@
103
103
  "publishConfig": {
104
104
  "access": "public"
105
105
  },
106
- "gitHead": "16e3ae25fc2f37603ab14dfeea5562d33fb13e8c"
106
+ "gitHead": "947a27d5126e707b44a936fe22b1c153312904a8"
107
107
  }