@despia/local 1.0.6 → 1.0.8
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 +7 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Universal build plugin to generate `despia/local.json` manifest for [Despia](htt
|
|
|
4
4
|
|
|
5
5
|
**Note**: Despia's local server is optional. Normally, the Despia runtime can run your web app directly from a URL. Despia's local server is for developers who need extra performance and full true native offline support.
|
|
6
6
|
|
|
7
|
-
**Store Compliant**: Despia's local server is fully compliant with Apple App Store and Google Play Store guidelines. It downloads and caches web content (HTML, CSS, JavaScript) for offline display in a WebView
|
|
7
|
+
**Store Compliant**: Despia's local server is fully compliant with Apple App Store and Google Play Store guidelines. It downloads and caches web content (HTML, CSS, JavaScript) for offline display in a WebView - identical to how web browsers work. No native code or executables are downloaded. See [Store Compliance & Security](#store-compliance--security) section for detailed compliance information.
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
@@ -155,7 +155,7 @@ Despia's local server complies with this guideline because:
|
|
|
155
155
|
- Binary behavior
|
|
156
156
|
- System integration
|
|
157
157
|
|
|
158
|
-
**However**, the web UI can be updated to use existing native APIs in new ways. For example, if Face ID is already implemented in the native code and exposed through the WebView bridge, the web UI can be updated to call Face ID from new parts of the app. This is compliant because the native capability already exists in the submitted binary
|
|
158
|
+
**However**, the web UI can be updated to use existing native APIs in new ways. For example, if Face ID is already implemented in the native code and exposed through the WebView bridge, the web UI can be updated to call Face ID from new parts of the app. This is compliant because the native capability already exists in the submitted binary - only the web UI's usage of it changes.
|
|
159
159
|
|
|
160
160
|
**Note**: This follows the same pattern as [Expo](https://expo.dev), which has been generally accepted by app stores. However, Apple's interpretation of "feature changes" under Guideline 3.3.2 is subjective, and your app could still face review challenges. It's recommended to be conservative with updates that significantly change app behavior, even when using existing native APIs.
|
|
161
161
|
|
|
@@ -183,7 +183,7 @@ Despia's local server complies with this policy because:
|
|
|
183
183
|
|
|
184
184
|
4. **Sandboxed Execution**: All web content executes within the WebView's security sandbox, with permissions and capabilities fixed at APK submission time.
|
|
185
185
|
|
|
186
|
-
**However**, the web UI can be updated to use existing native APIs in new ways. For example, if biometric authentication is already implemented in the native code and exposed through the WebView bridge, the web UI can be updated to call it from new parts of the app. This is compliant because the native capability already exists in the submitted APK
|
|
186
|
+
**However**, the web UI can be updated to use existing native APIs in new ways. For example, if biometric authentication is already implemented in the native code and exposed through the WebView bridge, the web UI can be updated to call it from new parts of the app. This is compliant because the native capability already exists in the submitted APK - only the web UI's usage of it changes.
|
|
187
187
|
|
|
188
188
|
**This approach is explicitly permitted** under Play Store policies, as evidenced by:
|
|
189
189
|
- Chrome and other browsers rendering web content
|
|
@@ -649,6 +649,7 @@ The generated `despia/local.json` file contains an object with the entry HTML pa
|
|
|
649
649
|
{
|
|
650
650
|
"entry": "/index.html",
|
|
651
651
|
"assets": [
|
|
652
|
+
"/index.html",
|
|
652
653
|
"/assets/app.abc123.css",
|
|
653
654
|
"/assets/app.def456.js",
|
|
654
655
|
"/assets/logo.xyz789.png"
|
|
@@ -656,8 +657,8 @@ The generated `despia/local.json` file contains an object with the entry HTML pa
|
|
|
656
657
|
}
|
|
657
658
|
```
|
|
658
659
|
|
|
659
|
-
- **`entry`**: The entry HTML file path (e.g., `/index.html`). **Required** - Local apps always need an entry point for client-side rendering.
|
|
660
|
-
- **`assets`**: A sorted array of all asset paths
|
|
660
|
+
- **`entry`**: The entry HTML file path (e.g., `/index.html`). **Required** - Local apps always need an entry point for client-side rendering. The entry path is also included in the `assets` array (unless `skipEntryHtml` is enabled).
|
|
661
|
+
- **`assets`**: A sorted array of all asset paths, **including the entry file**. When `skipEntryHtml` is enabled, the entry is still required in the manifest but won't be included in the `assets` array.
|
|
661
662
|
|
|
662
663
|
## Examples
|
|
663
664
|
|
|
@@ -748,7 +749,7 @@ export default defineConfig({
|
|
|
748
749
|
2. **Scan Output Directory** - Recursively scans the build output directory for all files
|
|
749
750
|
3. **Collect Asset Paths** - Collects paths from both the build tool's bundle metadata and file system
|
|
750
751
|
4. **Normalize Paths** - Converts all paths to root-relative format (starting with `/`)
|
|
751
|
-
5. **
|
|
752
|
+
5. **Include Entry in Assets** - Identifies the entry HTML file and includes it in the assets array (unless `skipEntryHtml` is enabled)
|
|
752
753
|
6. **Sort & Write** - Sorts asset paths alphabetically and writes object format `{ entry, assets }` to `despia/local.json`
|
|
753
754
|
|
|
754
755
|
The generated manifest is then used by Despia during app hydration and updates to ensure all assets are properly cached for offline operation.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@despia/local",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Universal build plugin to generate despia/local.json manifest for offline caching in Despia web-native apps. Supports Vite, Webpack, Rollup, Nuxt, SvelteKit, Astro, Remix, esbuild, Parcel, and more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/core.js",
|