ramm 0.0.45 → 0.0.47
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 +7 -7
- package/dist/types/context.d.ts +3 -3
- package/dist/types/init.d.ts +1 -1
- package/dist/types/ramm.d.ts +1 -1
- package/package.json +1 -1
package/dist/ramm.js
CHANGED
|
@@ -18,27 +18,27 @@ var printBlock = (name) => {
|
|
|
18
18
|
|
|
19
19
|
// src/context.ts
|
|
20
20
|
class Context {
|
|
21
|
-
|
|
21
|
+
user;
|
|
22
22
|
domain;
|
|
23
23
|
userspace;
|
|
24
24
|
sudo;
|
|
25
25
|
sshKey;
|
|
26
26
|
params = {};
|
|
27
27
|
constructor({
|
|
28
|
-
|
|
28
|
+
user,
|
|
29
29
|
address,
|
|
30
30
|
userspace = false,
|
|
31
31
|
sudo = false,
|
|
32
32
|
sshKey
|
|
33
33
|
}) {
|
|
34
|
-
this.
|
|
34
|
+
this.user = user;
|
|
35
35
|
this.domain = address;
|
|
36
36
|
this.sudo = sudo;
|
|
37
37
|
this.userspace = userspace;
|
|
38
38
|
this.sshKey = sshKey;
|
|
39
39
|
}
|
|
40
40
|
getAddress() {
|
|
41
|
-
return `${this.
|
|
41
|
+
return `${this.user}@${this.domain}`;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -76,7 +76,7 @@ var teeStderr = (read, prefix) => {
|
|
|
76
76
|
|
|
77
77
|
// src/base/base.ts
|
|
78
78
|
var defaultContext = new Context({
|
|
79
|
-
|
|
79
|
+
user: "root",
|
|
80
80
|
address: "0.0.0.0",
|
|
81
81
|
userspace: false,
|
|
82
82
|
sudo: false
|
|
@@ -123,7 +123,7 @@ var execCommandOverSsh = async (command, context) => {
|
|
|
123
123
|
return await execCommand(`ssh${sshKeyPart} ${context.getAddress()} '${command}'`);
|
|
124
124
|
};
|
|
125
125
|
// src/init.ts
|
|
126
|
-
var
|
|
126
|
+
var installBunOverSsh = async (context) => {
|
|
127
127
|
const bunPath = new URL(import.meta.resolve("./bun.sh")).pathname;
|
|
128
128
|
await copyFilesBySsh(bunPath, "./bun.sh", context);
|
|
129
129
|
await execCommandOverSsh("./bun.sh", context);
|
|
@@ -506,7 +506,7 @@ export {
|
|
|
506
506
|
loginPodman,
|
|
507
507
|
installSystemPackage,
|
|
508
508
|
installPodman,
|
|
509
|
-
|
|
509
|
+
installBunOverSsh,
|
|
510
510
|
getSystemdPathToUnit as getSystemdPathToService,
|
|
511
511
|
getServerFingerprint,
|
|
512
512
|
execCommandRaw,
|
package/dist/types/context.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare class Context {
|
|
2
|
-
|
|
2
|
+
user: string;
|
|
3
3
|
domain: string;
|
|
4
4
|
userspace: boolean;
|
|
5
5
|
sudo: boolean;
|
|
6
6
|
sshKey?: string;
|
|
7
7
|
params: Record<string, string>;
|
|
8
|
-
constructor({
|
|
9
|
-
|
|
8
|
+
constructor({ user, address, userspace, sudo, sshKey, }: {
|
|
9
|
+
user: string;
|
|
10
10
|
address: string;
|
|
11
11
|
userspace?: boolean;
|
|
12
12
|
sudo?: boolean;
|
package/dist/types/init.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Context } from "./context.ts";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const installBunOverSsh: (context: Context) => Promise<void>;
|
package/dist/types/ramm.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { execCommandOverSsh, execCommand, execCommandMayError, copyFilesBySsh, execCommandRaw, } from "./base/base.ts";
|
|
2
2
|
export { Context } from "./context.ts";
|
|
3
|
-
export {
|
|
3
|
+
export { installBunOverSsh } from "./init.ts";
|
|
4
4
|
export { installPodman, runPodmanContainer, loginPodman } from "./podman.ts";
|
|
5
5
|
export { runPodmanContainerService, addNftPodmanRule } from "./podman.ts";
|
|
6
6
|
export { startSystemdUnit, enabledSystemdUnit, restartSystemdUnit, createSystemdService, getSystemdPathToUnit as getSystemdPathToService, createSystemdUnit, reloadSystemd, } from "./systemd.ts";
|
package/package.json
CHANGED