native-update 1.4.7 → 1.4.9

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/docs/CHANGELOG.md CHANGED
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.4.9] - 2026-03-11
9
+
10
+ ### Added
11
+ - Firestore-backed manifest reads through `backendType: 'firestore'`
12
+ - Secure manifest lookup support via `apiKeys/{apiKey}/manifests/{channel}`
13
+ - Concrete no-cost backend implementation guide for `website + Firestore + Google Drive`
14
+
15
+ ### Changed
16
+ - Website dashboard publish flow aligned to Google Drive asset uploads plus Firestore manifest publishing
17
+ - Website dashboard configuration/docs now recommend Firestore instead of the old `/api/updates` path
18
+ - Package config types now expose Firestore configuration for production app integration
19
+
20
+ ### Fixed
21
+ - Manifest publishing now writes the full manifest shape to both secure and compatibility Firestore paths
22
+ - Google Drive asset uploads now preserve correct filenames for ZIP bundles and generated manifest files
23
+
8
24
  ## [1.4.5] - 2026-02-25
9
25
 
10
26
  ### Changed
@@ -0,0 +1,27 @@
1
+ # Firebase Backend Example
2
+
3
+ This example describes a serverless backend approach using Firebase services for manifests and bundle delivery.
4
+
5
+ ## What It Covers
6
+
7
+ - Firestore-backed manifest strategy
8
+ - Cloud Functions integration pattern
9
+ - Firebase-centric deployment approach
10
+
11
+ ## Recommended Setup Flow
12
+
13
+ 1. Start with baseline architecture docs:
14
+ https://nativeupdate.aoneahsan.com/docs/server-requirements
15
+ 2. Review backend template guidance:
16
+ https://nativeupdate.aoneahsan.com/docs/guides/BACKEND_TEMPLATES_GUIDE
17
+ 3. Apply rollout and channel strategies:
18
+ https://nativeupdate.aoneahsan.com/docs/guides/channel-management
19
+
20
+ ## Related Docs
21
+
22
+ - Dashboard Guide:
23
+ https://nativeupdate.aoneahsan.com/docs/guides/dashboard-guide
24
+ - End-to-End Workflow:
25
+ https://nativeupdate.aoneahsan.com/docs/guides/end-to-end-workflow
26
+ - Security Best Practices:
27
+ https://nativeupdate.aoneahsan.com/docs/guides/security-best-practices
@@ -0,0 +1,28 @@
1
+ # Node.js + Express Backend Example
2
+
3
+ This example shows a self-hosted backend for serving update manifests and bundles using Node.js + Express.
4
+
5
+ ## What It Covers
6
+
7
+ - Bundle upload endpoint
8
+ - Manifest responses for client update checks
9
+ - Local file-based storage flow for development
10
+
11
+ ## Recommended Setup Flow
12
+
13
+ 1. Understand server requirements:
14
+ https://nativeupdate.aoneahsan.com/docs/server-requirements
15
+ 2. Review backend patterns:
16
+ https://nativeupdate.aoneahsan.com/docs/guides/BACKEND_TEMPLATES_GUIDE
17
+ 3. Apply security requirements before production:
18
+ https://nativeupdate.aoneahsan.com/docs/BUNDLE_SIGNING
19
+ https://nativeupdate.aoneahsan.com/docs/guides/security-best-practices
20
+
21
+ ## Related Docs
22
+
23
+ - Deployment Guide:
24
+ https://nativeupdate.aoneahsan.com/docs/guides/deployment-guide
25
+ - CLI Reference:
26
+ https://nativeupdate.aoneahsan.com/docs/cli-reference
27
+ - Troubleshooting:
28
+ https://nativeupdate.aoneahsan.com/docs/guides/troubleshooting
@@ -0,0 +1,29 @@
1
+ # React + Capacitor Example App
2
+
3
+ This example demonstrates the frontend integration of `native-update` in a React + Capacitor application.
4
+
5
+ ## What It Covers
6
+
7
+ - Plugin initialization in app startup
8
+ - Checking for updates
9
+ - Downloading and applying OTA bundles
10
+ - Basic troubleshooting flow
11
+
12
+ ## Recommended Setup Flow
13
+
14
+ 1. Install and configure the plugin:
15
+ - https://nativeupdate.aoneahsan.com/docs/getting-started/installation
16
+ - https://nativeupdate.aoneahsan.com/docs/getting-started/configuration
17
+ 2. Implement update checks:
18
+ - https://nativeupdate.aoneahsan.com/docs/examples/basic-usage
19
+ 3. Review advanced patterns:
20
+ - https://nativeupdate.aoneahsan.com/docs/examples/advanced-scenarios
21
+
22
+ ## Related Docs
23
+
24
+ - End-to-End Workflow:
25
+ https://nativeupdate.aoneahsan.com/docs/guides/end-to-end-workflow
26
+ - Live Updates API:
27
+ https://nativeupdate.aoneahsan.com/docs/api/live-update-api
28
+ - Troubleshooting:
29
+ https://nativeupdate.aoneahsan.com/docs/guides/troubleshooting
@@ -0,0 +1,77 @@
1
+ # No-Cost Backend Implementation Plan
2
+
3
+ This document is the concrete production plan for the `website` sub-project using a no-cost backend built from browser code, Firestore, and Google Drive.
4
+
5
+ ## Architecture
6
+
7
+ - Dashboard: `website`
8
+ - Metadata backend: Firestore
9
+ - Bundle storage: user-owned Google Drive
10
+ - App manifest read path: `apiKeys/{apiKey}/manifests/{channel}`
11
+ - Compatibility read path: `manifests/{appId}_{channel}`
12
+ - Human discovery endpoints: `/sitemap`, `/feed`
13
+ - Machine discovery endpoints: `/sitemap.xml`, `/feed.xml`
14
+
15
+ ## Publish Flow
16
+
17
+ 1. User signs into the website dashboard.
18
+ 2. User connects Google Drive.
19
+ 3. User uploads a ZIP bundle from the dashboard.
20
+ 4. The website computes bundle checksum and manifest metadata in-browser.
21
+ 5. The website uploads the ZIP and generated manifest JSON to Google Drive.
22
+ 6. The website writes build history to Firestore.
23
+ 7. The website updates both manifest documents:
24
+ - `apiKeys/{apiKey}/manifests/{channel}`
25
+ - `manifests/{appId}_{channel}`
26
+ 8. Apps configured with `backendType: 'firestore'` read the latest manifest and download the published ZIP from Google Drive.
27
+
28
+ ## Firestore Collections
29
+
30
+ - `apps/{appId}`
31
+ - dashboard-owned app registry and channel settings
32
+ - `builds/{buildId}`
33
+ - uploaded build history, Drive URLs, release notes, checksums
34
+ - `apiKeys/{apiKey}`
35
+ - secret lookup key metadata for manifest access
36
+ - `apiKeys/{apiKey}/manifests/{channel}`
37
+ - primary manifest document for app update checks
38
+ - `manifests/{appId}_{channel}`
39
+ - compatibility manifest document for existing readers
40
+
41
+ ## Security Model
42
+
43
+ - Firestore rules allow public read only for manifest documents that apps need.
44
+ - App, build, and API key documents stay owner-restricted.
45
+ - Browser code does not hold server secrets.
46
+ - Google Drive is used because the asset owner controls storage without paid compute.
47
+
48
+ ## Website Responsibilities
49
+
50
+ - Keep dashboard configuration examples aligned with Firestore backend usage.
51
+ - Keep upload flow routed through `uploadBundle()`.
52
+ - Keep footer links to `/sitemap` and `/feed`.
53
+ - Keep `scripts/generate-sitemap.mjs` current whenever routes or public content change.
54
+
55
+ ## Package Responsibilities
56
+
57
+ - Support Firestore manifest reads through `backendType: 'firestore'`.
58
+ - Accept `firestore.projectId` and optional `firestore.apiKey` in public config types.
59
+ - Preserve HTTP backend support for users who self-host.
60
+
61
+ ## When A Separate Backend Is Justified
62
+
63
+ Only add Laravel or another backend if one of these becomes mandatory:
64
+
65
+ - server-held private signing keys
66
+ - private asset proxy/download authorization
67
+ - scheduled rollout jobs or cleanup tasks
68
+ - heavy processing such as delta generation outside the browser
69
+
70
+ ## Production Checklist
71
+
72
+ - Dashboard can connect Google Drive
73
+ - ZIP publish updates Firestore manifest documents
74
+ - App config snippets use `backendType: 'firestore'`
75
+ - `/sitemap`, `/sitemap.xml`, `/feed`, and `/feed.xml` build successfully
76
+ - Firestore rules are deployed
77
+ - Google OAuth and Firebase environment variables are configured
@@ -0,0 +1,60 @@
1
+ # No-Cost Backend Architecture
2
+
3
+ This project's recommended zero-cost backend uses:
4
+
5
+ - `website/` as the dashboard and publishing UI
6
+ - Firestore for manifest metadata and rollout state
7
+ - Google Drive for bundle and manifest file storage
8
+ - direct browser uploads instead of server-side processing
9
+
10
+ ## Why this architecture
11
+
12
+ - avoids Firebase Functions and other paid compute
13
+ - keeps bundle ownership in each user's own Google Drive
14
+ - uses Firestore's free tier for lightweight manifest reads
15
+ - supports staged rollout metadata without custom backend code
16
+
17
+ ## Publish flow
18
+
19
+ 1. User signs in to the website.
20
+ 2. User connects Google Drive.
21
+ 3. User uploads a ZIP bundle.
22
+ 4. Website calculates SHA-256 and generates a file manifest in-browser.
23
+ 5. Website uploads the bundle and generated manifest JSON to Google Drive.
24
+ 6. Website writes the published version into Firestore.
25
+ 7. Apps read Firestore manifests and download the bundle from Google Drive.
26
+
27
+ ## Firestore documents
28
+
29
+ Recommended secure path:
30
+
31
+ - `/apiKeys/{apiKey}/manifests/{channel}`
32
+
33
+ Backward-compatible path:
34
+
35
+ - `/manifests/{appId}_{channel}`
36
+
37
+ The dashboard publishes both today. New integrations should prefer the API key path.
38
+
39
+ ## Operational limits
40
+
41
+ - bundle files must be reachable by the app, so Google Drive files are published with direct-download access
42
+ - there is no trusted server for private signing keys, cron jobs, or private bundle proxying
43
+ - if you later need private downloads, server-side signing, scheduled jobs, or delta generation, add a real backend
44
+
45
+ ## Required dashboard capabilities
46
+
47
+ - app creation with generated API keys
48
+ - Google Drive connect/disconnect
49
+ - ZIP bundle upload and publish
50
+ - rollout editing in Firestore
51
+ - copy-paste integration config for apps
52
+
53
+ ## Production checklist
54
+
55
+ - connect Google Drive before first publish
56
+ - publish ZIP bundles only
57
+ - keep API keys out of public repos
58
+ - sign bundles client-side or via CLI if you need signature verification
59
+ - verify Firestore rules before launch
60
+ - test download/install flow on real devices
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "native-update",
3
- "version": "1.4.7",
3
+ "version": "1.4.9",
4
4
  "engines": {
5
5
  "node": ">=24.13.0"
6
6
  },
7
- "description": "Foundation package for building a comprehensive update system for Capacitor apps. Provides architecture and interfaces but requires backend implementation.",
7
+ "description": "Capacitor update plugin with live updates, app update checks, app reviews, and support for HTTP or Firestore-backed release delivery.",
8
8
  "type": "module",
9
9
  "main": "dist/plugin.cjs.js",
10
10
  "module": "dist/esm/index.js",