feat: Fixing small things like toml;

This commit is contained in:
Blu-J
2023-06-05 16:19:44 -06:00
parent 4fd6bc5bc5
commit 68c5a326cf
2 changed files with 7 additions and 12 deletions

View File

@@ -233,21 +233,13 @@ export type Effects = {
}, },
): DaemonReturned ): DaemonReturned
/** Uses the chown on the system */
chown(input: { volumeId: string; path: string; uid: string }): Promise<null>
/** Uses the chmod on the system */
chmod(input: { volumeId: string; path: string; mode: string }): Promise<null>
executeAction<Input>(opts: { executeAction<Input>(opts: {
serviceId?: string serviceId?: string
input: Input input: Input
}): Promise<unknown> }): Promise<unknown>
/** Sandbox mode lets us read but not write */ /** Sandbox mode lets us read but not write */
is_sandboxed(): boolean is_sandboxed(): Promise<boolean>
/** Check that a file exists or not */
exists(input: { volumeId: string; path: string }): Promise<boolean>
/** Removes all network bindings */ /** Removes all network bindings */
clearBindings(): Promise<void> clearBindings(): Promise<void>
@@ -425,11 +417,14 @@ export type Effects = {
getSslCertificate: ( getSslCertificate: (
packageId: string, packageId: string,
algorithm?: "ecdsa" | "ed25519", algorithm?: "ecdsa" | "ed25519",
) => [string, string, string] ) => Promise<[string, string, string]>
/** /**
* @returns PEM encoded ssl key (ecdsa) * @returns PEM encoded ssl key (ecdsa)
*/ */
getSslKey: (packageId: string, algorithm?: "ecdsa" | "ed25519") => string getSslKey: (
packageId: string,
algorithm?: "ecdsa" | "ed25519",
) => Promise<string>
setHealth(o: { setHealth(o: {
name: string name: string

View File

@@ -118,7 +118,7 @@ export class FileHelper<A> {
return new FileHelper<A>( return new FileHelper<A>(
path, path,
(inData) => { (inData) => {
return JSON.stringify(inData, null, 2) return TOML.stringify(inData as any)
}, },
(inString) => { (inString) => {
return shape.unsafeCast(TOML.parse(inString)) return shape.unsafeCast(TOML.parse(inString))