mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-31 04:33:40 +00:00
feat: Fixing small things like toml;
This commit is contained in:
17
lib/types.ts
17
lib/types.ts
@@ -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
|
||||||
|
|||||||
@@ -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))
|
||||||
|
|||||||
Reference in New Issue
Block a user