ramm 0.0.29 → 0.0.30

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.
package/dist/ramm.js CHANGED
@@ -109,7 +109,7 @@ var execCommandMayError = async (command, props) => {
109
109
  var execCommand = async (command, props) => {
110
110
  const result = await execCommandMayError(command, props);
111
111
  if (result.spawnResult.exitCode !== 0) {
112
- console.error(`Error exit code:" ${result.spawnResult.exitCode}`);
112
+ console.error(`Error exit code: ${result.spawnResult.exitCode}`);
113
113
  console.error(`Command: ${command}`);
114
114
  throw new Error(command);
115
115
  }
@@ -122,6 +122,10 @@ var execBySsh = async (command, context) => {
122
122
  const sshKeyPart = context.sshKey ? ` -i ${context.sshKey}` : "";
123
123
  return await execCommand(`ssh${sshKeyPart} ${context.getAddress()} '${command}'`);
124
124
  };
125
+ var execCommandOverSsh = async (command, context) => {
126
+ const sshKeyPart = context.sshKey ? ` -i ${context.sshKey}` : "";
127
+ return await execCommand(`ssh${sshKeyPart} ${context.getAddress()} '${command}'`);
128
+ };
125
129
  // src/init.ts
126
130
  var installBun = async (context) => {
127
131
  const bunPath = new URL(import.meta.resolve("./bun.sh")).pathname;
@@ -472,6 +476,7 @@ export {
472
476
  installPodman,
473
477
  installBun,
474
478
  getServerFingerprintBySsh,
479
+ execCommandOverSsh,
475
480
  execCommandMayError as execCommand,
476
481
  execBySsh,
477
482
  createCron,
@@ -32,4 +32,9 @@ export declare const execBySsh: (command: string, context: Context) => Promise<{
32
32
  stdout: string;
33
33
  spawnResult: Subprocess<"inherit", "pipe", "pipe">;
34
34
  }>;
35
+ export declare const execCommandOverSsh: (command: string, context: Context) => Promise<{
36
+ stderr: string;
37
+ stdout: string;
38
+ spawnResult: Subprocess<"inherit", "pipe", "pipe">;
39
+ }>;
35
40
  export {};
@@ -1,4 +1,4 @@
1
- export { execBySsh, execCommandMayError as execCommand, copyFilesBySsh, } from "./base/base.ts";
1
+ export { execBySsh, execCommandOverSsh, execCommandMayError as execCommand, copyFilesBySsh, } from "./base/base.ts";
2
2
  export { Context } from "./context.ts";
3
3
  export { installBun } from "./init.ts";
4
4
  export { installPodman, runPodmanContainer, loginPodman } from "./podman.ts";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ramm",
3
3
  "type": "module",
4
- "version": "0.0.29",
4
+ "version": "0.0.30",
5
5
  "scripts": {
6
6
  "build": "bun build ./src/ramm.ts --target bun --outdir ./dist && cp ./src/bun.sh ./dist/bun.sh",
7
7
  "types": "tsc --project tsconfig.types.json"