@livx.cc/appwrap 0.55.0 → 0.57.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.
Files changed (43) hide show
  1. package/package.json +2 -3
  2. package/runtime/app/shell/capabilities.manifest.ts +3 -3
  3. package/runtime/tests/bridge-response-delivery.test.ts +10 -1
  4. package/runtime/tests/env-scheme.test.ts +6 -0
  5. package/scripts/stage-assets.mjs +1 -1
  6. package/src/cli.ts +40 -570
  7. package/src/config.ts +1 -1
  8. package/src/handlers.ts +1 -1
  9. package/src/packs.ts +1 -1
  10. package/templates/ci/fastlane/Fastfile +47 -6
  11. package/runtime-desktop/autotest/index.html +0 -77
  12. package/runtime-desktop/bridge-shim/build.sh +0 -9
  13. package/runtime-desktop/bridge-shim/content-entry.ts +0 -87
  14. package/runtime-desktop/bridge-shim/shim.ts +0 -132
  15. package/runtime-desktop/chrome/appwrap-browser-chrome.html +0 -185
  16. package/runtime-desktop/crates/webview-control/Cargo.lock +0 -330
  17. package/runtime-desktop/crates/webview-control/Cargo.toml +0 -28
  18. package/runtime-desktop/crates/webview-control/examples/host_harness.rs +0 -362
  19. package/runtime-desktop/crates/webview-control/src/embedded.rs +0 -138
  20. package/runtime-desktop/crates/webview-control/src/lib.rs +0 -100
  21. package/runtime-desktop/crates/webview-control/src/popup.rs +0 -522
  22. package/runtime-desktop/crates/webview-control/src/profiles.rs +0 -57
  23. package/runtime-desktop/crates/webview-control/src/wkwebview_backend.rs +0 -558
  24. package/runtime-desktop/src-tauri/Cargo.lock +0 -5474
  25. package/runtime-desktop/src-tauri/Cargo.toml +0 -45
  26. package/runtime-desktop/src-tauri/build.rs +0 -3
  27. package/runtime-desktop/src-tauri/capabilities/default.json +0 -6
  28. package/runtime-desktop/src-tauri/icons/icon.png +0 -0
  29. package/runtime-desktop/src-tauri/shell_config.json +0 -10
  30. package/runtime-desktop/src-tauri/src/biometrics_mac.rs +0 -138
  31. package/runtime-desktop/src-tauri/src/bridge_mac.rs +0 -424
  32. package/runtime-desktop/src-tauri/src/browser_tab.rs +0 -804
  33. package/runtime-desktop/src-tauri/src/main.rs +0 -1228
  34. package/runtime-desktop/src-tauri/src/notifications_mac.rs +0 -202
  35. package/runtime-desktop/src-tauri/src/oauth_mac.rs +0 -139
  36. package/runtime-desktop/src-tauri/src/plugin_host.rs +0 -522
  37. package/runtime-desktop/src-tauri/src/popup_mac.rs +0 -5
  38. package/runtime-desktop/src-tauri/src/push_mac.rs +0 -193
  39. package/runtime-desktop/src-tauri/src/server.rs +0 -156
  40. package/runtime-desktop/src-tauri/src/sidecar.rs +0 -398
  41. package/runtime-desktop/src-tauri/tauri.conf.json +0 -14
  42. package/src/desktop.ts +0 -300
  43. package/src/plugin/host.ts +0 -242
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livx.cc/appwrap",
3
- "version": "0.55.0",
3
+ "version": "0.57.0",
4
4
  "description": "Wrap any PWA into a native app with native capabilities (appwrap runtime + @livx.cc/native-kit).",
5
5
  "license": "MIT",
6
6
  "author": "Elya Livshitz",
@@ -39,13 +39,12 @@
39
39
  "files": [
40
40
  "src",
41
41
  "runtime",
42
- "runtime-desktop",
43
42
  "templates",
44
43
  "scripts/stage-assets.mjs"
45
44
  ],
46
45
  "scripts": {
47
46
  "prepack": "node scripts/stage-assets.mjs",
48
- "postpack": "rm -rf runtime runtime-desktop templates"
47
+ "postpack": "rm -rf runtime templates"
49
48
  },
50
49
  "publishConfig": {
51
50
  "access": "public"
@@ -272,8 +272,8 @@ export const MODULES: ModuleManifest[] = [
272
272
  android: { gradleDeps: ['androidx.work:work-runtime:2.9.1', 'com.google.guava:guava:33.3.1-android'] },
273
273
  },
274
274
 
275
- // NOTE: billing, health, and widget were EXTRACTED into appwrap-ee module packs
276
- // (packages/ee/packs/{billing,health,widget}); a consumer opts in via `modulePacks`.
275
+ // NOTE: billing, health, and widget are NOT part of CE — they live in host-provided module packs
276
+ // (a consumer opts in via `modulePacks`).
277
277
  ];
278
278
 
279
279
  /** Opt-in registration groups that own their own NS handler file (strippable when inactive). Core
@@ -281,7 +281,7 @@ export const MODULES: ModuleManifest[] = [
281
281
  export const OPTIONAL_GROUPS = ['oauth', 'reviews', 'scanner', 'speech', 'tracking', 'appleSignIn', 'backgroundTask'] as const;
282
282
 
283
283
  /** CLI-gated groups (strippable in explicit mode) that legacy mode (no `modules` key) STILL auto-bundles
284
- * for back-compat. Empty now that billing (its only member) moved to an appwrap-ee pack — kept as the
284
+ * for back-compat. Empty now that billing (its only member) moved to a host-provided pack — kept as the
285
285
  * seam so the carve-out can be reinstated without touching cli.ts if a future built-in needs it. */
286
286
  export const LEGACY_BUNDLED_GROUPS = [] as const;
287
287
 
@@ -1,7 +1,16 @@
1
1
  import { beforeEach, describe, expect, mock, test } from 'bun:test';
2
2
 
3
3
  // The shell imports NativeScript globals at module load; the bridge only needs isIOS/isAndroid.
4
- mock.module('@nativescript/core', () => ({ isIOS: false, isAndroid: false, WebView: class {} }));
4
+ // Superset shape — bun shares the runtime-module cache across files in a dir run, so every
5
+ // @nativescript/core mock must expose the same named exports the runtime modules import.
6
+ mock.module('@nativescript/core', () => ({
7
+ isIOS: false, isAndroid: false, WebView: class {},
8
+ ApplicationSettings: { getString: (_k: string, d = '') => d, setString: () => {}, remove: () => {} },
9
+ Dialogs: { confirm: async () => true, action: async () => '', alert: async () => undefined, prompt: async () => ({ result: false, text: '' }) },
10
+ Utils: { dispatchToMainThread: (fn: () => void) => fn() },
11
+ Application: { on: () => {}, suspendEvent: 's', resumeEvent: 'r', orientationChangedEvent: 'o', android: {} },
12
+ Connectivity: { startMonitoring: () => {} },
13
+ }));
5
14
 
6
15
  const { Bridge } = await import('../app/shell/bridge');
7
16
 
@@ -14,6 +14,12 @@ mock.module('@nativescript/core', () => ({
14
14
  get isAndroid() { return androidFlag; },
15
15
  isIOS: false,
16
16
  WebView: class {},
17
+ // Superset shape — bun shares the runtime-module cache across files in a dir run, so every
18
+ // @nativescript/core mock must expose the same named exports the runtime modules import.
19
+ ApplicationSettings: { getString: (_k: string, d = '') => d, setString: () => {}, remove: () => {} },
20
+ Dialogs: { confirm: async () => true, action: async () => '', alert: async () => undefined, prompt: async () => ({ result: false, text: '' }) },
21
+ Utils: { dispatchToMainThread: (fn: () => void) => fn() },
22
+ Connectivity: { startMonitoring: () => {} },
17
23
  }));
18
24
 
19
25
  // Dynamic import AFTER mock.module so the stub is registered before env.ts pulls @nativescript/core
@@ -12,7 +12,7 @@ const repoRoot = resolve(pkgDir, '../..');
12
12
  // src-tauri/target — gigabytes — and src-tauri/gen — regenerated on build) and OS cruft.
13
13
  const EXCLUDE = /(?:^|\/)(?:node_modules|platforms|hooks|app\/www|target|gen|\.DS_Store)(?:\/|$)/;
14
14
 
15
- for (const name of ['runtime', 'runtime-desktop', 'templates']) {
15
+ for (const name of ['runtime', 'templates']) {
16
16
  const srcRoot = resolve(repoRoot, name);
17
17
  const dest = resolve(pkgDir, name);
18
18
  rmSync(dest, { recursive: true, force: true });