elit 3.4.8 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -100,6 +100,8 @@ interface DesktopWapkRunOptions {
100
100
  file: string;
101
101
  syncInterval?: number;
102
102
  useWatcher?: boolean;
103
+ password?: string;
104
+ passwordEnv?: string;
103
105
  }
104
106
 
105
107
  const PACKAGE_ROOT = resolve(__dirname, '..');
@@ -538,6 +540,8 @@ function printDesktopHelp(): void {
538
540
  ' -r, --runtime <name> Packaged app runtime: node, bun, deno',
539
541
  ' --sync-interval <ms> Polling interval for live sync (ms, default 300)',
540
542
  ' --watcher, --use-watcher Use event-driven file watcher instead of polling',
543
+ ' --password <value> Password used to unlock a protected archive',
544
+ ' --password-env <name> Read the unlock password from an environment variable',
541
545
  ' --release Use the release desktop runtime binary',
542
546
  '',
543
547
  'Examples:',
@@ -578,6 +582,8 @@ async function runDesktopWapkCommand(args: string[], config?: DesktopConfig): Pr
578
582
  runtime: options.runtime,
579
583
  syncInterval: options.syncInterval,
580
584
  useWatcher: options.useWatcher,
585
+ password: options.password,
586
+ passwordEnv: options.passwordEnv,
581
587
  });
582
588
  const preparedEntry = await createDesktopWapkEntry(preparedApp);
583
589
  const liveSync = createWapkLiveSync(preparedApp);
@@ -627,7 +633,7 @@ function parseDesktopWapkRunArgs(args: string[], config?: DesktopConfig['wapk'])
627
633
  options.release = true;
628
634
  break;
629
635
  case '--sync-interval': {
630
- const value = parseInt(normalizedArgs[++i], 10);
636
+ const value = parseInt(normalizedArgs[++i] ?? '', 10);
631
637
  if (Number.isNaN(value) || value < 50) {
632
638
  throw new Error('--sync-interval must be a number >= 50 (milliseconds)');
633
639
  }
@@ -639,6 +645,18 @@ function parseDesktopWapkRunArgs(args: string[], config?: DesktopConfig['wapk'])
639
645
  options.useWatcher = true;
640
646
  break;
641
647
  }
648
+ case '--password':
649
+ options.password = normalizedArgs[++i];
650
+ if (!options.password) {
651
+ throw new Error('--password requires a value.');
652
+ }
653
+ break;
654
+ case '--password-env':
655
+ options.passwordEnv = normalizedArgs[++i];
656
+ if (!options.passwordEnv) {
657
+ throw new Error('--password-env requires a value.');
658
+ }
659
+ break;
642
660
  default:
643
661
  if (arg.startsWith('-')) {
644
662
  throw new Error(`Unknown desktop WAPK option: ${arg}`);