From 68c5a326cf380ddd531140d0fece79a582876f43 Mon Sep 17 00:00:00 2001 From: Blu-J Date: Mon, 5 Jun 2023 16:19:44 -0600 Subject: [PATCH] feat: Fixing small things like toml; --- lib/types.ts | 17 ++++++----------- lib/util/fileHelper.ts | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/lib/types.ts b/lib/types.ts index dfec7b3..4b20a93 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -233,21 +233,13 @@ export type Effects = { }, ): DaemonReturned - /** Uses the chown on the system */ - chown(input: { volumeId: string; path: string; uid: string }): Promise - /** Uses the chmod on the system */ - chmod(input: { volumeId: string; path: string; mode: string }): Promise - executeAction(opts: { serviceId?: string input: Input }): Promise /** Sandbox mode lets us read but not write */ - is_sandboxed(): boolean - - /** Check that a file exists or not */ - exists(input: { volumeId: string; path: string }): Promise + is_sandboxed(): Promise /** Removes all network bindings */ clearBindings(): Promise @@ -425,11 +417,14 @@ export type Effects = { getSslCertificate: ( packageId: string, algorithm?: "ecdsa" | "ed25519", - ) => [string, string, string] + ) => Promise<[string, string, string]> /** * @returns PEM encoded ssl key (ecdsa) */ - getSslKey: (packageId: string, algorithm?: "ecdsa" | "ed25519") => string + getSslKey: ( + packageId: string, + algorithm?: "ecdsa" | "ed25519", + ) => Promise setHealth(o: { name: string diff --git a/lib/util/fileHelper.ts b/lib/util/fileHelper.ts index 5ea8110..3e0b88d 100644 --- a/lib/util/fileHelper.ts +++ b/lib/util/fileHelper.ts @@ -118,7 +118,7 @@ export class FileHelper { return new FileHelper( path, (inData) => { - return JSON.stringify(inData, null, 2) + return TOML.stringify(inData as any) }, (inString) => { return shape.unsafeCast(TOML.parse(inString))