ramm 0.0.22 → 0.0.23

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
@@ -191,6 +191,9 @@ var getCreateCommand = async (name) => {
191
191
  const podmanCreateCommand = await $2`podman inspect --format '{{.Config.CreateCommand}}' ${name}`.nothrow().quiet();
192
192
  return podmanCreateCommand.text().slice(0, -1).slice(1, -1) || "";
193
193
  };
194
+ var loginPodman = async (address, login, password) => {
195
+ return await execCommand(`echo "${password}" | podman login --username "${login}" --password-stdin ${address}`);
196
+ };
194
197
  var runPodmanContainer = async (name, command) => {
195
198
  if (await getCreateCommand(name) !== command) {
196
199
  await $2`podman rm -f ${name}`;
@@ -436,6 +439,7 @@ export {
436
439
  passVarsClient,
437
440
  normalizePath,
438
441
  normalizeFileContent,
442
+ loginPodman,
439
443
  installSystemPackage,
440
444
  installPodman,
441
445
  installBun,
@@ -1,6 +1,11 @@
1
1
  import type { Context } from "./context.ts";
2
2
  export declare const installPodman: () => Promise<void>;
3
3
  export declare const getCreateCommand: (name: string) => Promise<string>;
4
+ export declare const loginPodman: (address: string, login: string, password: string) => Promise<{
5
+ outputErr: string;
6
+ output: string;
7
+ spawnResult: import("bun").Subprocess<"inherit", "pipe", "pipe">;
8
+ }>;
4
9
  export declare const runPodmanContainer: (name: string, command: string) => Promise<void>;
5
10
  export declare const runPodmanContainerService: (name: string, command: string, context?: Context) => Promise<void>;
6
11
  export declare const addNftPodmanRule: () => Promise<void>;
@@ -1,7 +1,7 @@
1
1
  export { execBySsh, execCommand, copyFilesBySsh } from "./base.ts";
2
2
  export { Context } from "./context.ts";
3
3
  export { installBun } from "./init.ts";
4
- export { installPodman, runPodmanContainer } from "./podman.ts";
4
+ export { installPodman, runPodmanContainer, loginPodman } from "./podman.ts";
5
5
  export { runPodmanContainerService, addNftPodmanRule } from "./podman.ts";
6
6
  export { restartSystemdService } from "./systemd.ts";
7
7
  export { installSystemPackage } from "./packages.ts";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ramm",
3
3
  "type": "module",
4
- "version": "0.0.22",
4
+ "version": "0.0.23",
5
5
  "scripts": {
6
6
  "build": "bun build ./src/ramm.ts --target bun --outdir ./dist && cp ./src/bun.sh ./dist/bun.sh && bun run types",
7
7
  "types": "tsc --project tsconfig.types.json"