mirror of
https://github.com/hansjone/netxops.git
synced 2026-10-15 10:50:45 +08:00
Sync Netx Ops declarative preset into web profile on DSH 0.2.
0.2 web no longer lists ~/.dsh/.agent-presets; without a cordis.patch.yml insert the preset never appears in Settings. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
6bf5268dfb
commit
a313dd0eae
4 changed files with 36 additions and 145 deletions
|
|
@ -437,7 +437,7 @@ function installDirectoryPreset(artifacts, logger) {
|
|||
logger.info("netxops: directory preset composed from %s → %s", artifacts.standardSource, dest);
|
||||
}
|
||||
function syncDeclarativeIntoProfilePatch(profileName, declarativePatch, logger) {
|
||||
if (profileName !== "desktop")
|
||||
if (profileName !== "desktop" && profileName !== "web")
|
||||
return;
|
||||
const profileDir = join(resolveDshHome(), "profiles", profileName);
|
||||
const patchPath = join(profileDir, "cordis.patch.yml");
|
||||
|
|
@ -458,7 +458,11 @@ ${declarativePatch.trimEnd()}
|
|||
${DESKTOP_PATCH_END}
|
||||
`;
|
||||
writeFileSync(patchPath, `${patch}${managed}`, "utf8");
|
||||
logger.info("netxops: declarative preset synced into profiles/%s/cordis.patch.yml (restart Desktop to load)", profileName);
|
||||
logger.info(
|
||||
"netxops: declarative preset synced into profiles/%s/cordis.patch.yml (restart %s to load)",
|
||||
profileName,
|
||||
profileName === "desktop" ? "Desktop" : "dsh web"
|
||||
);
|
||||
}
|
||||
function stripManagedPresetBlocks(patch) {
|
||||
let out = patch;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue