mirror of
https://github.com/community-scripts/ProxmoxVE-Local.git
synced 2026-03-31 06:24:01 -04:00
fix: add missing script parameter (#521)
This commit is contained in:
committed by
GitHub
parent
4da8840d78
commit
7d1169a5ee
@@ -41,6 +41,7 @@ function pbToScript(pb: PBScript): Script {
|
||||
script: m.script,
|
||||
resources: m.resources,
|
||||
config_path: m.config_path,
|
||||
script: scriptDownloaderService.deriveScriptPath(pb.type, m.type, pb.slug) ?? undefined,
|
||||
})),
|
||||
default_credentials: {
|
||||
username: pb.default_user,
|
||||
|
||||
@@ -392,6 +392,7 @@ export class AutoSyncService {
|
||||
type: m.type,
|
||||
resources: m.resources,
|
||||
config_path: m.config_path,
|
||||
script: sds.deriveScriptPath(pb.type, m.type, pb.slug) ?? undefined,
|
||||
})),
|
||||
default_credentials: { username: pb.default_user, password: pb.default_passwd },
|
||||
notes: pb.notes_json,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { readFile, readdir, writeFile, mkdir } from 'fs/promises';
|
||||
import { join } from 'path';
|
||||
import type { Script, ScriptCard } from '~/types/script';
|
||||
import { scriptDownloaderService } from './scriptDownloader.js';
|
||||
|
||||
export class LocalScriptsService {
|
||||
private scriptsDirectory: string;
|
||||
@@ -58,6 +59,7 @@ export class LocalScriptsService {
|
||||
type: m.type,
|
||||
resources: m.resources,
|
||||
config_path: m.config_path,
|
||||
script: scriptDownloaderService.deriveScriptPath(pb.type, m.type, pb.slug) ?? undefined,
|
||||
})),
|
||||
notes: pb.notes_json.map(n => ({ text: n.text, type: n.type })),
|
||||
}));
|
||||
@@ -135,6 +137,7 @@ export class LocalScriptsService {
|
||||
type: m.type,
|
||||
resources: m.resources,
|
||||
config_path: m.config_path,
|
||||
script: scriptDownloaderService.deriveScriptPath(pb.type, m.type, pb.slug) ?? undefined,
|
||||
})),
|
||||
notes: pb.notes_json.map(n => ({ text: n.text, type: n.type })),
|
||||
};
|
||||
|
||||
@@ -12,10 +12,8 @@ export interface ScriptInstallMethod {
|
||||
resources: ScriptResources;
|
||||
config_path?: string;
|
||||
/**
|
||||
* Optional install script file path (e.g. "ct/adguard.sh").
|
||||
* Present in user-defined local JSON scripts.
|
||||
* For PocketBase-sourced scripts this field is absent; the downloader derives
|
||||
* the path from the script type and slug via `deriveScriptPath()`.
|
||||
* Install script file path (e.g. "ct/adguard.sh").
|
||||
* For PocketBase-sourced scripts, this is derived by the backend.
|
||||
*/
|
||||
script?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user