Clarify native template bridge contract
This commit is contained in:
2
dist/main/file_handlers.js
vendored
2
dist/main/file_handlers.js
vendored
@@ -144,7 +144,7 @@ function registerFileHandlers() {
|
||||
// 1. Copy the file to temp folder with original name
|
||||
fs.copyFileSync(source, target);
|
||||
// 2a. Data-driven launcher template (no rebuild needed for config changes).
|
||||
// Svelte resolves launch_profiles to a single AppleScript string or "shell:<cmd>" template.
|
||||
// Svelte resolves a Launch Profile to a single native_template string.
|
||||
// Format: AppleScript string with {{path}} placeholder, OR "shell:<cmd> {{path}}"
|
||||
if (!native_template) {
|
||||
return { success: false, error: 'No native template configured for this file' };
|
||||
|
||||
2
dist/main/file_handlers.js.map
vendored
2
dist/main/file_handlers.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -12,8 +12,8 @@
|
||||
Svelte config object keyed by extension; **Native Template** = the AppleScript or shell
|
||||
string Electron actually executes after the file lands in temp.
|
||||
- Update `src/main/file_handlers.ts` comments and any bridge-facing wording so they describe the
|
||||
resolved template string accurately. The current IPC arg name in source is `launch_profiles`,
|
||||
but it carries a single native template string. Do not reintroduce `launch_scripts` as the
|
||||
resolved `native_template` string accurately. `launch_profiles` is only the Svelte-side map;
|
||||
the IPC payload is the single executable string. Do not reintroduce `launch_scripts` as the
|
||||
public term.
|
||||
- Keep the source of truth in Svelte. Electron should remain a thin executor/copy layer.
|
||||
- After source/docs updates, rebuild/regenerate `dist/main/file_handlers.js` from source; do not
|
||||
|
||||
@@ -118,7 +118,7 @@ export function registerFileHandlers() {
|
||||
fs.copyFileSync(source, target);
|
||||
|
||||
// 2a. Data-driven launcher template (no rebuild needed for config changes).
|
||||
// Svelte resolves launch_profiles to a single AppleScript string or "shell:<cmd>" template.
|
||||
// Svelte resolves a Launch Profile to a single native_template string.
|
||||
// Format: AppleScript string with {{path}} placeholder, OR "shell:<cmd> {{path}}"
|
||||
if (!native_template) {
|
||||
return { success: false, error: 'No native template configured for this file' };
|
||||
|
||||
Reference in New Issue
Block a user