mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-04-01 21:13:11 +00:00
chore: Update deps
This commit is contained in:
26
lib/esm/compat/setConfig.js
Normal file
26
lib/esm/compat/setConfig.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { YAML } from "../dependencies.js";
|
||||
/**
|
||||
* Will set the config to the default start9/config.yaml
|
||||
* Assumption: start9/config.yaml is the location of the configuration
|
||||
* @param effects
|
||||
* @param newConfig Config to be written to start9/config.yaml
|
||||
* @param depends_on This would be the depends on for condition depends_on
|
||||
* @returns
|
||||
*/
|
||||
export const setConfig = async (effects, newConfig, dependsOn = {}) => {
|
||||
await effects.createDir({
|
||||
path: "start9",
|
||||
volumeId: "main",
|
||||
});
|
||||
await effects.writeFile({
|
||||
path: "start9/config.yaml",
|
||||
toWrite: YAML.stringify(newConfig),
|
||||
volumeId: "main",
|
||||
});
|
||||
const result = {
|
||||
signal: "SIGTERM",
|
||||
"depends-on": dependsOn,
|
||||
};
|
||||
return { result };
|
||||
};
|
||||
const _typeConversionCheck = setConfig;
|
||||
Reference in New Issue
Block a user