@mittwald/cli 1.13.1-beta.8 → 1.13.1

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,4 +1,4 @@
1
- import * as child_process from "child_process";
1
+ import { spawnSync } from "child_process";
2
2
  import { Args, Flags } from "@oclif/core";
3
3
  import { ExtendedBaseCommand } from "../../lib/basecommands/ExtendedBaseCommand.js";
4
4
  import { sshConnectionFlags } from "../../lib/resources/ssh/flags.js";
@@ -61,7 +61,7 @@ export default class Exec extends ExtendedBaseCommand {
61
61
  });
62
62
  const wrappedExecCommand = shellEscape(["/bin/bash", "-c", execCommand]);
63
63
  this.debug("running ssh %o, with command %o", sshArgs, wrappedExecCommand);
64
- const result = child_process.spawnSync("/usr/bin/ssh", [...sshArgs, wrappedExecCommand], {
64
+ const result = spawnSync("/usr/bin/ssh", [...sshArgs, wrappedExecCommand], {
65
65
  stdio: "inherit",
66
66
  });
67
67
  if (result.status !== 0) {
@@ -1,4 +1,4 @@
1
- import * as child_process from "child_process";
1
+ import { spawnSync } from "child_process";
2
2
  import { appInstallationArgs } from "../../lib/resources/app/flags.js";
3
3
  import { Flags } from "@oclif/core";
4
4
  import { ExtendedBaseCommand } from "../../lib/basecommands/ExtendedBaseCommand.js";
@@ -55,7 +55,7 @@ export default class Ssh extends ExtendedBaseCommand {
55
55
  if (flags.cd) {
56
56
  this.log("changing to %o; use --no-cd to disable this behaviour", directory);
57
57
  }
58
- child_process.spawnSync("/usr/bin/ssh", [...args, cmd], {
58
+ spawnSync("/usr/bin/ssh", [...args, cmd], {
59
59
  stdio: "inherit",
60
60
  });
61
61
  }
@@ -1,4 +1,4 @@
1
- import * as child_process from "child_process";
1
+ import { spawnSync } from "child_process";
2
2
  import { Args, Flags } from "@oclif/core";
3
3
  import { ExtendedBaseCommand } from "../../lib/basecommands/ExtendedBaseCommand.js";
4
4
  import { getSSHConnectionForContainer } from "../../lib/resources/ssh/container.js";
@@ -72,7 +72,7 @@ export default class Exec extends ExtendedBaseCommand {
72
72
  });
73
73
  const wrappedExecCommand = shellEscape([flags.shell, "-c", execCommand]);
74
74
  this.debug("running ssh %o, with command %o", sshArgs, wrappedExecCommand);
75
- const result = child_process.spawnSync("/usr/bin/ssh", [...sshArgs, wrappedExecCommand], {
75
+ const result = spawnSync("/usr/bin/ssh", [...sshArgs, wrappedExecCommand], {
76
76
  stdio: "inherit",
77
77
  });
78
78
  if (result.status !== 0) {
@@ -1,4 +1,4 @@
1
- import * as child_process from "child_process";
1
+ import { spawnSync } from "child_process";
2
2
  import { Args, Flags } from "@oclif/core";
3
3
  import { ExtendedBaseCommand } from "../../lib/basecommands/ExtendedBaseCommand.js";
4
4
  import { getSSHConnectionForContainer } from "../../lib/resources/ssh/container.js";
@@ -44,7 +44,7 @@ export default class Ssh extends ExtendedBaseCommand {
44
44
  this.log("connecting to %o as %o", host, user);
45
45
  const [cmd, args] = buildSSHCmdAndFlags(user, host, flags);
46
46
  this.debug("running ssh %o, with command %o", args, cmd);
47
- child_process.spawnSync("/usr/bin/ssh", [...args, cmd], {
47
+ spawnSync("/usr/bin/ssh", [...args, cmd], {
48
48
  stdio: "inherit",
49
49
  });
50
50
  }
@@ -138,6 +138,7 @@ export class Init extends ExecRenderBaseCommand {
138
138
  const parsed = load(existing);
139
139
  const alreadyContainsAPIToken = (parsed.web_environment ?? []).some((e) => e.startsWith("MITTWALD_API_TOKEN="));
140
140
  if (!alreadyContainsAPIToken) {
141
+ // eslint-disable-next-line camelcase
141
142
  parsed.web_environment = [
142
143
  ...(parsed.web_environment ?? []),
143
144
  `MITTWALD_API_TOKEN=${token}`,
@@ -148,6 +149,7 @@ export class Init extends ExecRenderBaseCommand {
148
149
  catch (err) {
149
150
  if (isNotFound(err)) {
150
151
  const config = {
152
+ // eslint-disable-next-line camelcase
151
153
  web_environment: [`MITTWALD_API_TOKEN=${token}`],
152
154
  };
153
155
  await writeContentsToFile(configFile, dump(config));
@@ -1,4 +1,4 @@
1
- import * as child_process from "child_process";
1
+ import { spawnSync } from "child_process";
2
2
  import { projectArgs } from "../../lib/resources/project/flags.js";
3
3
  import { ExtendedBaseCommand } from "../../lib/basecommands/ExtendedBaseCommand.js";
4
4
  import { sshConnectionFlags } from "../../lib/resources/ssh/flags.js";
@@ -16,7 +16,7 @@ export default class Ssh extends ExtendedBaseCommand {
16
16
  const projectId = await this.withProjectId(Ssh);
17
17
  const { user, host } = await getSSHConnectionForProject(this.apiClient, projectId, this.flags["ssh-user"]);
18
18
  this.log("connecting to %o as %o", host, user);
19
- child_process.spawnSync("/usr/bin/ssh", ["-l", user, host], {
19
+ spawnSync("/usr/bin/ssh", ["-l", user, host], {
20
20
  stdio: "inherit",
21
21
  });
22
22
  }
@@ -1,3 +1,4 @@
1
+ /* eslint-disable camelcase */
1
2
  import { assertStatus } from "@mittwald/api-client";
2
3
  import { determineProjectTypeFromAppInstallation } from "./init_projecttype.js";
3
4
  export class DDEVConfigBuilder {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/cli",
3
- "version": "1.13.1-beta.8",
3
+ "version": "1.13.1",
4
4
  "description": "Hand-crafted CLI for the mittwald API",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -26,7 +26,7 @@
26
26
  "compile": "tsc --build tsconfig.json",
27
27
  "format": "yarn format:prettier --write",
28
28
  "format:prettier": "prettier $@ '**/*.{ts,tsx,yaml,yml,json,md,mdx}'",
29
- "generate:readme": "oclif readme --multi --output-dir=docs < /dev/null",
29
+ "generate:readme": "oclif readme --multi --output-dir=docs < /dev/null && sed -i -e '/See code: .src/d' docs/*.md",
30
30
  "license-check": "yarn pnpify license-checker-rseidelsohn ",
31
31
  "lint": "eslint . --cache",
32
32
  "package": "yarn package:tarballs && yarn package:windows && yarn package:macos",