ramm 0.0.12 → 0.0.14
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 -0
- package/dist/types/ramm.d.ts +1 -1
- package/package.json +1 -1
package/dist/ramm.js
CHANGED
|
@@ -239,6 +239,7 @@ EOF`);
|
|
|
239
239
|
};
|
|
240
240
|
// src/files.ts
|
|
241
241
|
import { appendFile, exists } from "fs/promises";
|
|
242
|
+
var {write } = globalThis.Bun;
|
|
242
243
|
|
|
243
244
|
// src/path.ts
|
|
244
245
|
import { homedir } from "os";
|
|
@@ -294,6 +295,11 @@ var writeIfNew = async (rawFilePath, str) => {
|
|
|
294
295
|
}
|
|
295
296
|
await appendFile(filePath, finalizeWithNewline(str));
|
|
296
297
|
};
|
|
298
|
+
var writeFile = async (pathToFile, str) => {
|
|
299
|
+
const normalizedPath = normalizePath(pathToFile);
|
|
300
|
+
await createFileIfNeed(normalizedPath);
|
|
301
|
+
await write(normalizedPath, str);
|
|
302
|
+
};
|
|
297
303
|
// src/ssh.ts
|
|
298
304
|
import { debug } from "console";
|
|
299
305
|
var addKeyToHostConfig = async (pathToHost, address, pathToKey) => {
|
|
@@ -335,6 +341,7 @@ var createAndAddSshKey = async (pathToKey, comment, context) => {
|
|
|
335
341
|
};
|
|
336
342
|
export {
|
|
337
343
|
writeIfNew,
|
|
344
|
+
writeFile,
|
|
338
345
|
setupNftable,
|
|
339
346
|
runPodmanContainerService,
|
|
340
347
|
runPodmanContainer,
|
package/dist/types/ramm.d.ts
CHANGED
|
@@ -7,6 +7,6 @@ export { restartSystemdService } from "./systemd.ts";
|
|
|
7
7
|
export { installSystemPackage } from "./packages.ts";
|
|
8
8
|
export { debugBlock } from "./debug.ts";
|
|
9
9
|
export { setupNftable } from "./nft.ts";
|
|
10
|
-
export { writeIfNew } from "./files.ts";
|
|
10
|
+
export { writeIfNew, writeFile } from "./files.ts";
|
|
11
11
|
export { createAndAddSshKey, getServerFingerprintBySsh, addKeyToHostConfig, } from "./ssh.ts";
|
|
12
12
|
export { normalizePath } from "./path.ts";
|
package/package.json
CHANGED