elit 3.4.9 → 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.
- package/README.md +18 -4
- package/dist/cli.js +362 -58
- package/dist/config.d.mts +8 -1
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/config.mjs.map +1 -1
- package/dist/desktop-cli.d.ts.map +1 -1
- package/dist/wapk-cli.d.ts +15 -4
- package/dist/wapk-cli.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/config.ts +8 -0
- package/src/desktop-cli.ts +19 -1
- package/src/wapk-cli.ts +451 -52
package/README.md
CHANGED
|
@@ -255,12 +255,14 @@ Useful flags:
|
|
|
255
255
|
- `elit native generate android ./src/native-screen.ts --name HomeScreen --package com.example.app`
|
|
256
256
|
- `elit native generate ios ./src/native-screen.ts --out ./ios/HomeScreen.swift --no-preview`
|
|
257
257
|
- `elit native generate ir ./src/native-screen.ts --platform android --export screen`
|
|
258
|
+
- `elit wapk pack . --password-env WAPK_PASSWORD`
|
|
258
259
|
- `elit wapk ./app.wapk --runtime node|bun|deno`
|
|
259
|
-
- `elit wapk run ./app.wapk --sync-interval 100 --watcher`
|
|
260
|
+
- `elit wapk run ./app.wapk --password-env WAPK_PASSWORD --sync-interval 100 --watcher`
|
|
260
261
|
- `elit wapk pack . --include-deps`
|
|
261
|
-
- `elit wapk inspect ./app.wapk`
|
|
262
|
+
- `elit wapk inspect ./app.wapk --password-env WAPK_PASSWORD`
|
|
262
263
|
- `elit wapk extract ./app.wapk`
|
|
263
264
|
- `elit desktop wapk ./app.wapk --runtime node|bun|deno --watcher`
|
|
265
|
+
- `elit desktop wapk run ./app.wapk --runtime bun --password-env WAPK_PASSWORD`
|
|
264
266
|
|
|
265
267
|
Desktop mode notes:
|
|
266
268
|
|
|
@@ -306,8 +308,12 @@ WAPK mode notes:
|
|
|
306
308
|
- `elit desktop wapk <file.wapk>` and `elit desktop wapk run <file.wapk>` run packaged apps in desktop mode.
|
|
307
309
|
- During run, the archive is expanded into a temporary work directory and changes are synced back to the same `.wapk` file.
|
|
308
310
|
- Use `--sync-interval <ms>` for polling mode, or `--watcher` / `--use-watcher` for event-driven sync.
|
|
309
|
-
-
|
|
310
|
-
-
|
|
311
|
+
- Use `--password` or, preferably, `--password-env` when packing, inspecting, extracting, or running a locked archive.
|
|
312
|
+
- `inspect` without credentials still reports whether the archive is locked, but it does not print the archive contents.
|
|
313
|
+
- Locked archives stay encrypted when live sync writes changes back into the same `.wapk` file.
|
|
314
|
+
- Configure package metadata in `elit.config.*` under `wapk`, and use `wapk.lock` when you want password-protected archives by default.
|
|
315
|
+
- WAPK stays unlocked by default unless `wapk.lock.password`, `wapk.lock.passwordEnv`, `--password`, or `--password-env` is provided.
|
|
316
|
+
- See [docs/wapk.md](docs/wapk.md) for the full archive guide and `examples/wapk-example` for an end-to-end sample.
|
|
311
317
|
|
|
312
318
|
## Config File
|
|
313
319
|
|
|
@@ -380,6 +386,10 @@ The config shape is:
|
|
|
380
386
|
port?: number;
|
|
381
387
|
env?: Record<string, string | number | boolean>;
|
|
382
388
|
desktop?: Record<string, unknown>;
|
|
389
|
+
lock?: {
|
|
390
|
+
password?: string;
|
|
391
|
+
passwordEnv?: string;
|
|
392
|
+
};
|
|
383
393
|
};
|
|
384
394
|
}
|
|
385
395
|
```
|
|
@@ -460,6 +470,9 @@ export default {
|
|
|
460
470
|
env: {
|
|
461
471
|
NODE_ENV: 'production',
|
|
462
472
|
},
|
|
473
|
+
lock: {
|
|
474
|
+
passwordEnv: 'WAPK_PASSWORD',
|
|
475
|
+
},
|
|
463
476
|
},
|
|
464
477
|
};
|
|
465
478
|
```
|
|
@@ -473,6 +486,7 @@ Important details:
|
|
|
473
486
|
- `desktop` config provides defaults for `elit desktop`, `elit desktop run`, `elit desktop build`, and `elit desktop wapk`. Use `desktop.entry` for hybrid defaults, `desktop.native.entry` for native defaults, and `desktop.mode` to choose which one runs by default.
|
|
474
487
|
- `mobile` config provides defaults for `elit mobile init|sync|open|run|build`.
|
|
475
488
|
- `wapk` config is loaded from `elit.config.*`, then package metadata is used as fallback.
|
|
489
|
+
- `wapk.lock.passwordEnv` is the safest reusable way to protect archives without putting the password directly into shell history or committed config.
|
|
476
490
|
- `wapk run` and `desktop wapk run` sync runtime file changes back into the same `.wapk` archive.
|
|
477
491
|
|
|
478
492
|
## Browser Patterns
|