@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.
- package/package.json +2 -3
- package/runtime/app/shell/capabilities.manifest.ts +3 -3
- package/runtime/tests/bridge-response-delivery.test.ts +10 -1
- package/runtime/tests/env-scheme.test.ts +6 -0
- package/scripts/stage-assets.mjs +1 -1
- package/src/cli.ts +40 -570
- package/src/config.ts +1 -1
- package/src/handlers.ts +1 -1
- package/src/packs.ts +1 -1
- package/templates/ci/fastlane/Fastfile +47 -6
- package/runtime-desktop/autotest/index.html +0 -77
- package/runtime-desktop/bridge-shim/build.sh +0 -9
- package/runtime-desktop/bridge-shim/content-entry.ts +0 -87
- package/runtime-desktop/bridge-shim/shim.ts +0 -132
- package/runtime-desktop/chrome/appwrap-browser-chrome.html +0 -185
- package/runtime-desktop/crates/webview-control/Cargo.lock +0 -330
- package/runtime-desktop/crates/webview-control/Cargo.toml +0 -28
- package/runtime-desktop/crates/webview-control/examples/host_harness.rs +0 -362
- package/runtime-desktop/crates/webview-control/src/embedded.rs +0 -138
- package/runtime-desktop/crates/webview-control/src/lib.rs +0 -100
- package/runtime-desktop/crates/webview-control/src/popup.rs +0 -522
- package/runtime-desktop/crates/webview-control/src/profiles.rs +0 -57
- package/runtime-desktop/crates/webview-control/src/wkwebview_backend.rs +0 -558
- package/runtime-desktop/src-tauri/Cargo.lock +0 -5474
- package/runtime-desktop/src-tauri/Cargo.toml +0 -45
- package/runtime-desktop/src-tauri/build.rs +0 -3
- package/runtime-desktop/src-tauri/capabilities/default.json +0 -6
- package/runtime-desktop/src-tauri/icons/icon.png +0 -0
- package/runtime-desktop/src-tauri/shell_config.json +0 -10
- package/runtime-desktop/src-tauri/src/biometrics_mac.rs +0 -138
- package/runtime-desktop/src-tauri/src/bridge_mac.rs +0 -424
- package/runtime-desktop/src-tauri/src/browser_tab.rs +0 -804
- package/runtime-desktop/src-tauri/src/main.rs +0 -1228
- package/runtime-desktop/src-tauri/src/notifications_mac.rs +0 -202
- package/runtime-desktop/src-tauri/src/oauth_mac.rs +0 -139
- package/runtime-desktop/src-tauri/src/plugin_host.rs +0 -522
- package/runtime-desktop/src-tauri/src/popup_mac.rs +0 -5
- package/runtime-desktop/src-tauri/src/push_mac.rs +0 -193
- package/runtime-desktop/src-tauri/src/server.rs +0 -156
- package/runtime-desktop/src-tauri/src/sidecar.rs +0 -398
- package/runtime-desktop/src-tauri/tauri.conf.json +0 -14
- package/src/desktop.ts +0 -300
- 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.
|
|
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
|
|
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
|
|
276
|
-
// (
|
|
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
|
|
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
|
-
|
|
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
|
package/scripts/stage-assets.mjs
CHANGED
|
@@ -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', '
|
|
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 });
|