Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ export default [
],

curly: ["error", "all"],
camelcase: [
"error",
{ properties: "always", ignoreImports: true, ignoreGlobals: true },
],
},
},
];
12 changes: 4 additions & 8 deletions src/commands/app/exec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as child_process from "child_process";
import { spawnSync } from "child_process";
import { Args, Flags } from "@oclif/core";
import { ExtendedBaseCommand } from "../../lib/basecommands/ExtendedBaseCommand.js";
import { sshConnectionFlags } from "../../lib/resources/ssh/flags.js";
Expand Down Expand Up @@ -82,13 +82,9 @@ export default class Exec extends ExtendedBaseCommand<typeof Exec> {

this.debug("running ssh %o, with command %o", sshArgs, wrappedExecCommand);

const result = child_process.spawnSync(
"/usr/bin/ssh",
[...sshArgs, wrappedExecCommand],
{
stdio: "inherit",
},
);
const result = spawnSync("/usr/bin/ssh", [...sshArgs, wrappedExecCommand], {
stdio: "inherit",
});

if (result.status !== 0) {
this.error(`Command failed with exit code ${result.status}`);
Expand Down
4 changes: 2 additions & 2 deletions src/commands/app/ssh.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as child_process from "child_process";
import { spawnSync } from "child_process";
import { appInstallationArgs } from "../../lib/resources/app/flags.js";
import { Flags } from "@oclif/core";
import { ExtendedBaseCommand } from "../../lib/basecommands/ExtendedBaseCommand.js";
Expand Down Expand Up @@ -80,7 +80,7 @@ export default class Ssh extends ExtendedBaseCommand<typeof Ssh> {
);
}

child_process.spawnSync("/usr/bin/ssh", [...args, cmd], {
spawnSync("/usr/bin/ssh", [...args, cmd], {
stdio: "inherit",
});
}
Expand Down
12 changes: 4 additions & 8 deletions src/commands/container/exec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as child_process from "child_process";
import { spawnSync } from "child_process";
import { Args, Flags } from "@oclif/core";
import { ExtendedBaseCommand } from "../../lib/basecommands/ExtendedBaseCommand.js";
import { getSSHConnectionForContainer } from "../../lib/resources/ssh/container.js";
Expand Down Expand Up @@ -100,13 +100,9 @@ export default class Exec extends ExtendedBaseCommand<typeof Exec> {

this.debug("running ssh %o, with command %o", sshArgs, wrappedExecCommand);

const result = child_process.spawnSync(
"/usr/bin/ssh",
[...sshArgs, wrappedExecCommand],
{
stdio: "inherit",
},
);
const result = spawnSync("/usr/bin/ssh", [...sshArgs, wrappedExecCommand], {
stdio: "inherit",
});

if (result.status !== 0) {
this.error(`Command failed with exit code ${result.status}`);
Expand Down
4 changes: 2 additions & 2 deletions src/commands/container/ssh.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as child_process from "child_process";
import { spawnSync } from "child_process";
import { Args, Flags } from "@oclif/core";
import { ExtendedBaseCommand } from "../../lib/basecommands/ExtendedBaseCommand.js";
import { getSSHConnectionForContainer } from "../../lib/resources/ssh/container.js";
Expand Down Expand Up @@ -69,7 +69,7 @@ export default class Ssh extends ExtendedBaseCommand<typeof Ssh> {

this.debug("running ssh %o, with command %o", args, cmd);

child_process.spawnSync("/usr/bin/ssh", [...args, cmd], {
spawnSync("/usr/bin/ssh", [...args, cmd], {
stdio: "inherit",
});
}
Expand Down
2 changes: 2 additions & 0 deletions src/commands/ddev/init.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export class Init extends ExecRenderBaseCommand<typeof Init, void> {
(e) => e.startsWith("MITTWALD_API_TOKEN="),
);
if (!alreadyContainsAPIToken) {
// eslint-disable-next-line camelcase
parsed.web_environment = [
...(parsed.web_environment ?? []),
`MITTWALD_API_TOKEN=${token}`,
Expand All @@ -208,6 +209,7 @@ export class Init extends ExecRenderBaseCommand<typeof Init, void> {
} catch (err) {
if (isNotFound(err)) {
const config: Partial<DDEVConfig> = {
// eslint-disable-next-line camelcase
web_environment: [`MITTWALD_API_TOKEN=${token}`],
};

Expand Down
4 changes: 2 additions & 2 deletions src/commands/project/ssh.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as child_process from "child_process";
import { spawnSync } from "child_process";
import { projectArgs } from "../../lib/resources/project/flags.js";
import { ExtendedBaseCommand } from "../../lib/basecommands/ExtendedBaseCommand.js";
import { sshConnectionFlags } from "../../lib/resources/ssh/flags.js";
Expand Down Expand Up @@ -27,7 +27,7 @@ export default class Ssh extends ExtendedBaseCommand<typeof Ssh> {

this.log("connecting to %o as %o", host, user);

child_process.spawnSync("/usr/bin/ssh", ["-l", user, host], {
spawnSync("/usr/bin/ssh", ["-l", user, host], {
stdio: "inherit",
});
}
Expand Down
2 changes: 2 additions & 0 deletions src/lib/ddev/config_builder.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable camelcase */

import type { MittwaldAPIV2 } from "@mittwald/api-client";
import { assertStatus, MittwaldAPIV2Client } from "@mittwald/api-client";
import {
Expand Down