native-update 3.4.0 → 3.4.2

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 DELETED
@@ -1,565 +0,0 @@
1
- # Capacitor Native Update Plugin
2
-
3
- [![npm version](https://img.shields.io/npm/v/native-update)](https://www.npmjs.com/package/native-update)
4
- [![license](https://img.shields.io/npm/l/native-update)](./LICENSE)
5
-
6
- > ⚠️ **Production-Ready** ⚠️
7
- >
8
- > - ✅ **Complete native implementations** - iOS (Swift) and Android (Kotlin) fully implemented
9
- > - ✅ **Two complete examples** - React + Capacitor app and a Node.js + Express backend in `example-apps/`
10
- > - ✅ **Backend included** - Laravel 13 + Nova 5 reference backend (`backend/`) powers the hosted SaaS and is self-hostable
11
- > - ✅ **Development tools included** - Bundle creator, signer, and CLI tools
12
- > - ✅ **Security features implemented** - HTTPS enforcement, signatures, checksums
13
- >
14
- > **🚀 Try the example app in `example-apps/` to see all features in action!**
15
-
16
- ## Current State
17
-
18
- - Package version: see the npm badge above — the single source of truth is `package.json` `version`, and it is deliberately not duplicated in this file
19
- - Verified on: `2026-07-14`
20
- - Tests: `134/134` backend PHPUnit via `php artisan test`
21
- - Build: `yarn build` succeeds (root plugin Rollup + website Vite + Docusaurus docs site)
22
- - Root package manager is standardized on Yarn, and the root scripts no longer shell out to npm or pnpm
23
- - Backend: Laravel 13 + Nova 5 — the only backend after v3.0.0 (Firestore removed); identity via Laravel Socialite + Sanctum personal access tokens; RBAC via `spatie/laravel-permission` (roles `super-admin`, `admin`, `user`)
24
-
25
- ## 📚 Documentation
26
-
27
- - **[AI Integration Guide](https://nativeupdate-docs.aoneahsan.com/ai-integration)** - Quick reference for AI development agents (Claude, Cursor, Copilot)
28
-
29
- ### Getting Started
30
-
31
- - **[Installation Guide](https://nativeupdate-docs.aoneahsan.com/getting-started/installation)** - Step-by-step installation instructions
32
- - **[Quick Start Guide](https://nativeupdate-docs.aoneahsan.com/getting-started/quick-start)** - Get up and running in minutes
33
- - **[Configuration Guide](https://nativeupdate-docs.aoneahsan.com/reference/sdk/core/config)** - Detailed configuration options
34
- - **[End-to-End Workflow](https://nativeupdate-docs.aoneahsan.com/tutorials/backend-first-walkthrough)** - Complete setup to production guide
35
-
36
- ### Dashboard & Management
37
-
38
- - **[Dashboard Guide](https://nativeupdate-docs.aoneahsan.com/backend/nova-admin-overview)** - Complete dashboard user guide
39
- - **[Channel Management](https://nativeupdate-docs.aoneahsan.com/how-to/manage-channels)** - Dev/staging/production channels
40
- - **[Admin Panel](https://nativeupdate-docs.aoneahsan.com/backend/nova-admin-overview)** - Super-admin documentation
41
-
42
- ### Features Documentation
43
-
44
- - **[Live Updates (OTA)](https://nativeupdate-docs.aoneahsan.com/reference/sdk/live-update/overview)** - Deploy web updates instantly
45
- - **[App Updates](https://nativeupdate-docs.aoneahsan.com/reference/sdk/app-update/overview)** - Native app store update management
46
- - **[App Reviews](https://nativeupdate-docs.aoneahsan.com/reference/sdk/app-review/overview)** - In-app review integration
47
- - **[Background Updates](https://nativeupdate-docs.aoneahsan.com/reference/sdk/background-update/overview)** - Background update management
48
-
49
- ### Guides & Best Practices
50
-
51
- - **[Security Best Practices](https://nativeupdate-docs.aoneahsan.com/concepts/security-model)** - Implement secure updates
52
- - **[Deployment Guide](https://nativeupdate-docs.aoneahsan.com/how-to/ci-cd-github-actions)** - Deployment procedures
53
- - **[Migration Guide](https://nativeupdate-docs.aoneahsan.com/how-to/migrate-from-codepush)** - Migrate from other solutions
54
- - **[Production Readiness](https://nativeupdate-docs.aoneahsan.com/concepts/security-model)** - Production deployment checklist
55
- - **[Bundle Signing](https://nativeupdate-docs.aoneahsan.com/concepts/bundle-integrity-and-signing)** - Cryptographic signing guide
56
- - **[Troubleshooting](https://nativeupdate-docs.aoneahsan.com/how-to/troubleshooting)** - Common issues and solutions
57
-
58
- ### API Reference
59
-
60
- - **[Live Update API](https://nativeupdate-docs.aoneahsan.com/reference/sdk/live-update/methods)** - Complete API for OTA updates
61
- - **[App Update API](https://nativeupdate-docs.aoneahsan.com/reference/sdk/app-update/methods)** - Native app update methods
62
- - **[App Review API](https://nativeupdate-docs.aoneahsan.com/reference/sdk/app-review/methods)** - Review request methods
63
- - **[Events API](https://nativeupdate-docs.aoneahsan.com/reference/sdk/live-update/events)** - Event listeners and handlers
64
- - **[CLI Reference](https://nativeupdate-docs.aoneahsan.com/reference/cli/overview)** - Command-line tools documentation
65
-
66
- ### Examples
67
-
68
- - **[Basic Usage](https://nativeupdate-docs.aoneahsan.com/tutorials/first-ota-update)** - Simple implementation examples
69
- - **[Advanced Scenarios](https://nativeupdate-docs.aoneahsan.com/tutorials/backend-first-walkthrough)** - Complex use cases
70
-
71
- ---
72
-
73
- A production-oriented Capacitor update platform that combines Live/OTA updates, native app store update flows, in-app reviews, release tooling, dashboard support, example backends, and operational documentation in one ecosystem.
74
-
75
- ## 🌐 Dashboard & Management Platform
76
-
77
- The Native Update platform includes a complete web dashboard for managing your updates:
78
-
79
- **Dashboard URL**: [nativeupdate.aoneahsan.com](https://nativeupdate.aoneahsan.com)
80
-
81
- ### Dashboard Features
82
-
83
- - **App Management**: Register and configure multiple apps
84
- - **Build Uploads**: Upload and manage build versions
85
- - **Channel Management**: Configure production/staging/development channels
86
- - **Rollouts**: Gradual rollout with percentage control
87
- - **Analytics**: Track downloads, installs, errors, and rollbacks
88
- - **Google Drive Integration**: Secure build storage
89
- - **Configuration Generator**: Get ready-to-use integration code
90
-
91
- ### Update Channels
92
-
93
- Native Update supports three deployment channels:
94
-
95
- | Channel | Purpose | Auto-Update | Check Interval |
96
- |---------|---------|-------------|----------------|
97
- | **Development** | Internal testing | Yes | 1 minute |
98
- | **Staging** | QA/Beta testing | Configurable | 1 hour |
99
- | **Production** | Live users | No (consent) | Daily |
100
-
101
- See [Channel Management Guide](https://nativeupdate-docs.aoneahsan.com/how-to/manage-channels) for detailed configuration.
102
-
103
- ---
104
-
105
- ## Features
106
-
107
- ### 🚀 Live Updates (OTA)
108
-
109
- Deploy JavaScript, HTML, and CSS updates instantly without going through app store approval:
110
-
111
- - **Multiple update strategies**: Immediate, background, or manual updates
112
- - **Delta updates**: Only download changed files for faster updates
113
- - **Automatic rollback**: Revert to previous version if update fails
114
- - **Update channels**: Support for production, staging, and development environments
115
- - **Security**: End-to-end encryption and signature verification
116
-
117
- ### 📱 Native App Updates
118
-
119
- Seamlessly manage app store updates with native UI integration:
120
-
121
- - **Version checking**: Detect when newer versions are available
122
- - **Flexible updates**: Background download with user-controlled installation
123
- - **Immediate updates**: Force critical updates with blocking UI
124
- - **Platform integration**: Google Play Core (Android) and App Store (iOS) support
125
-
126
- ### ⭐ App Reviews
127
-
128
- Increase user engagement with intelligent review prompts:
129
-
130
- - **In-app reviews**: Native review dialogs without leaving the app
131
- - **Smart triggering**: Request reviews at optimal moments
132
- - **Rate limiting**: Respect platform limits (iOS: 3x/year)
133
- - **Analytics**: Track review request performance
134
-
135
- ## Installation
136
-
137
- ```bash
138
- yarn add native-update
139
- npx cap sync
140
- ```
141
-
142
- ## Quick Start
143
-
144
- ### 1. Basic Setup
145
-
146
- ```typescript
147
- import { NativeUpdate } from 'native-update';
148
-
149
- // Initialize on app start
150
- async function initializeApp() {
151
- // Configure the plugin
152
- await NativeUpdate.configure({
153
- updateUrl: 'https://updates.yourdomain.com/api/v1',
154
- autoCheck: true,
155
- publicKey: 'your-public-key-for-security',
156
- });
157
- }
158
- ```
159
-
160
- ### 2. Live Updates (OTA)
161
-
162
- ```typescript
163
- // Check and apply live updates
164
- async function checkLiveUpdates() {
165
- try {
166
- const result = await NativeUpdate.sync();
167
-
168
- if (result.status === 'UPDATE_INSTALLED') {
169
- // sync() already downloaded and staged the bundle — reload to apply
170
- await NativeUpdate.reload();
171
- return;
172
- }
173
-
174
- if (result.status === 'UPDATE_AVAILABLE') {
175
- // Manual flow: fetch the manifest, then download + apply
176
- const latest = await NativeUpdate.getLatest();
177
- if (!latest.available || !latest.url || !latest.version || !latest.checksum) {
178
- return;
179
- }
180
-
181
- // Track download progress
182
- const listener = await NativeUpdate.addListener('downloadProgress', (progress) => {
183
- console.log(`Downloading: ${progress.percent}%`);
184
- });
185
-
186
- const bundle = await NativeUpdate.download({
187
- url: latest.url,
188
- version: latest.version,
189
- checksum: latest.checksum,
190
- });
191
- await listener.remove();
192
-
193
- // Set the bundle and reload
194
- await NativeUpdate.set(bundle);
195
- await NativeUpdate.reload();
196
- }
197
- } catch (error) {
198
- console.error('Update failed:', error);
199
- }
200
- }
201
- ```
202
-
203
- ### 3. Native App Updates
204
-
205
- ```typescript
206
- // Check for app store updates
207
- async function checkNativeUpdates() {
208
- const result = await NativeUpdate.getAppUpdateInfo();
209
-
210
- if (result.updateAvailable) {
211
- if (result.immediateUpdateAllowed) {
212
- // Critical update - must install
213
- await NativeUpdate.performImmediateUpdate();
214
- } else if (result.flexibleUpdateAllowed) {
215
- // Optional update - download in background
216
- await NativeUpdate.startFlexibleUpdate();
217
- }
218
- }
219
- }
220
- ```
221
-
222
- ### 4. App Reviews
223
-
224
- ```typescript
225
- // Request app review at the right moment
226
- async function requestAppReview() {
227
- // Only ask after positive interactions
228
- const shouldAsk = await checkIfGoodMoment();
229
-
230
- if (shouldAsk) {
231
- const result = await NativeUpdate.requestReview();
232
- if (result.displayed) {
233
- console.log('Review prompt was shown');
234
- }
235
- }
236
- }
237
- ```
238
-
239
- ## Real-World Example
240
-
241
- ```typescript
242
- import { Component, OnInit } from '@angular/core';
243
- import { NativeUpdate } from 'native-update';
244
- import { AlertController } from '@ionic/angular';
245
-
246
- @Component({
247
- selector: 'app-root',
248
- templateUrl: 'app.component.html',
249
- })
250
- export class AppComponent implements OnInit {
251
- constructor(private alertCtrl: AlertController) {}
252
-
253
- async ngOnInit() {
254
- // Check for updates on app start
255
- await this.checkAllUpdates();
256
-
257
- // Set up periodic checks
258
- setInterval(() => this.checkAllUpdates(), 3600000); // Every hour
259
- }
260
-
261
- async checkAllUpdates() {
262
- // 1. Check live updates first (fastest)
263
- const liveUpdate = await NativeUpdate.sync();
264
- if (liveUpdate.status === 'UPDATE_AVAILABLE' || liveUpdate.status === 'UPDATE_INSTALLED') {
265
- await this.promptLiveUpdate(liveUpdate);
266
- return; // Don't check native if live update is available
267
- }
268
-
269
- // 2. Check native updates
270
- const nativeUpdate = await NativeUpdate.getAppUpdateInfo();
271
- if (nativeUpdate.updateAvailable) {
272
- await this.promptNativeUpdate(nativeUpdate);
273
- }
274
- }
275
-
276
- async promptLiveUpdate(update: any) {
277
- const alert = await this.alertCtrl.create({
278
- header: 'Update Available',
279
- message: `Version ${update.version} is ready to install`,
280
- buttons: [
281
- { text: 'Later', role: 'cancel' },
282
- {
283
- text: 'Update',
284
- handler: () => this.installLiveUpdate(),
285
- },
286
- ],
287
- });
288
- await alert.present();
289
- }
290
-
291
- async installLiveUpdate() {
292
- // The sync method already handles download if needed
293
- // Just reload to apply the update
294
- await NativeUpdate.reload(); // App restarts
295
- }
296
-
297
- // Request review after positive events
298
- async onPositiveEvent() {
299
- setTimeout(() => {
300
- NativeUpdate.requestReview();
301
- }, 2000);
302
- }
303
- }
304
- ```
305
-
306
- ## Configuration
307
-
308
- ### capacitor.config.json
309
-
310
- ```json
311
- {
312
- "plugins": {
313
- "NativeUpdate": {
314
- "updateUrl": "https://updates.yourdomain.com/api/v1",
315
- "autoCheck": true,
316
- "checkInterval": 3600,
317
- "channel": "production",
318
- "publicKey": "YOUR_BASE64_PUBLIC_KEY",
319
- "appStoreId": "123456789",
320
- "enforceMinVersion": true
321
- }
322
- }
323
- }
324
- ```
325
-
326
- ## Platform Support
327
-
328
- | Platform | Live Updates | App Updates | App Reviews |
329
- | -------- | ------------ | ----------- | ----------- |
330
- | iOS | ✅ | ✅ | ✅ |
331
- | Android | ✅ | ✅ | ✅ |
332
- | Web | ✅ | ⚠️ | ⚠️ |
333
-
334
- ⚠️ = Graceful fallback with limited functionality
335
-
336
- ## Requirements
337
-
338
- - Capacitor 8.x (peer dependency `@capacitor/core` `^8.0.1`)
339
- - iOS 13.0+
340
- - Android 5.0+ (API 21+)
341
-
342
- ## Security
343
-
344
- This plugin implements multiple security layers:
345
-
346
- - **HTTPS enforcement** for all update downloads
347
- - **Public key signature verification** for bundle integrity
348
- - **Checksum validation** before applying updates
349
- - **Certificate pinning** support for enhanced security
350
-
351
- ## 🎯 Complete Example Implementations
352
-
353
- The example app references the local plugin via yarn's `portal:` protocol - no need to publish to npm for testing!
354
-
355
- ### Frontend Example: React + Capacitor
356
-
357
- **[React + Capacitor Example](https://nativeupdate-docs.aoneahsan.com/tutorials/first-ota-update)**
358
-
359
- - ✅ Simple, focused demonstration of OTA updates
360
- - ✅ Single-page app with "change this text and deploy" example
361
- - ✅ Capacitor integration (iOS + Android)
362
- - ✅ TypeScript + Vite for modern development
363
- - ✅ Uses local plugin via yarn `portal:` reference
364
-
365
- ### Backend Examples
366
-
367
- #### 1. Node.js + Express Backend
368
-
369
- **[Node.js + Express Backend Example](https://nativeupdate-docs.aoneahsan.com/backend/node-express-minimal)**
370
-
371
- - ✅ Production-ready update server
372
- - ✅ Bundle management API
373
- - ✅ SQLite database for bundle tracking
374
- - ✅ Authentication & security
375
- - ✅ Rate limiting and compression
376
- - ✅ Signature verification
377
-
378
- #### 2. Laravel + Nova SaaS Backend
379
-
380
- The canonical backend ships in this monorepo under [`backend/`](./backend) — a
381
- Laravel 13 + Nova 5 application that powers the hosted Native Update SaaS at
382
- `nativeupdatebe.aoneahsan.com`. You can use it as a managed service or
383
- self-host it on any PHP 8.3+ host. Setup is documented in
384
- [`docs/deployment/PRODUCTION-DEPLOY-CHECKLIST.md`](./docs/deployment/PRODUCTION-DEPLOY-CHECKLIST.md).
385
-
386
- - ✅ Google OAuth (Socialite) + Sanctum bearer tokens + spatie/laravel-permission RBAC
387
- - ✅ MySQL / PostgreSQL bundle metadata + signed download URLs
388
- - ✅ Per-app API keys + signing keys generated through Nova
389
- - ✅ Per-bundle rollout percentages + per-device rollout buckets
390
- - ✅ Google Drive integration so bundle ZIPs stay in your own Drive
391
-
392
- **🚀 Get started:** Each example app has its own README with setup instructions.
393
-
394
- ## Contributing
395
-
396
- We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details.
397
-
398
- ## 🛠️ CLI Tools & Utilities
399
-
400
- ### Zero-Install CLI Access
401
-
402
- All tools are available via `npx` without cloning the repo:
403
-
404
- ```bash
405
- # Quick start
406
- npx native-update init --example
407
- npx native-update backend create express --with-admin
408
- ```
409
-
410
- ### Available Commands
411
-
412
- ✅ **Bundle Management**
413
- - Create bundles: `npx native-update bundle create ./www`
414
- - Sign bundles: `npx native-update bundle sign bundle.zip --key private.pem`
415
- - Verify signatures: `npx native-update bundle verify bundle.zip --key public.pem`
416
-
417
- ✅ **Key Management**
418
- - Generate keys: `npx native-update keys generate --type rsa --size 4096`
419
- - Supports RSA (2048/4096) and EC (256/384) keys
420
- - Creates timestamped key pairs with proper permissions
421
- - See [Key Management Guide](https://nativeupdate-docs.aoneahsan.com/how-to/rotate-signing-keys) for detailed instructions
422
-
423
- ✅ **Backend Templates**
424
- - Express.js: `npx native-update backend create express --with-admin`
425
- - Firebase: `npx native-update backend create firebase --with-monitoring`
426
- - Vercel: `npx native-update backend create vercel`
427
-
428
- ✅ **Development Tools**
429
- - Start dev server: `npx native-update server start --port 3000`
430
- - Monitor updates: `npx native-update monitor --server https://your-server.com`
431
- - Validate config: `npx native-update config check`
432
-
433
- ✅ **Migration Tools**
434
- - From CodePush: `npx native-update migrate --from codepush`
435
-
436
- ✅ **Deploy from CI** (hosted backend — needs an access token, see below)
437
- - Ship a release: `npx native-update deploy ./dist --app com.example.app --version 1.2.0 --wait`
438
- - Inspect: `npx native-update token info` · `apps list` · `builds list com.example.app`
439
- - Release control: `builds promote <app> <build> --to production` · `builds rollout <app> <build> --percent 25` · `builds status <app> <build> --set paused`
440
- - Manage the app: `apps create|show|update|delete` · `apps keys list|create|rotate|reveal|restrict|revoke|deprecate|delete` · `apps signing show|create|rotate` · `apps keystore upload|info|download|delete`
441
-
442
- See [CLI Reference](https://nativeupdate-docs.aoneahsan.com/reference/cli/overview) for complete documentation.
443
-
444
- ## 🤖 Public Management API (run an app's lifecycle from CI or an agent)
445
-
446
- Everything the dashboard does — create and configure apps, mint and rotate API keys, manage a signing
447
- key, back up a keystore, upload a bundle, publish, promote, adjust a rollout — is also an HTTP API on
448
- the hosted backend, so CI systems and AI agents can run an app's whole lifecycle.
449
-
450
- Create an **access token** in the dashboard (**Access Tokens** → New token), tick the apps it may
451
- manage (or **All apps**), then:
452
-
453
- ```bash
454
- export NATIVE_UPDATE_TOKEN=nu_pat_… # a CI secret — never a flag, never a browser
455
-
456
- # Zips ./dist, uploads it, and blocks until the release is live.
457
- # Exits non-zero if it fails, so a broken release fails the build.
458
- npx native-update deploy ./dist --app com.example.app --version 1.2.0 --wait
459
- ```
460
-
461
- A token is scoped to the apps you select — or, with **All apps**, every app you own including any
462
- created later — and carries `manage` (read; create/edit apps; mint, rotate and restrict API keys;
463
- create and rotate a signing key; upload, publish, promote and roll out builds; upload and download a
464
- keystore). The three **delete** permissions (`builds.delete`, `apps.delete`, `keys.delete`) are
465
- separate opt-ins, so a leaked CI token can ship a release but never erase history or tear an app down.
466
- Uploads are queued: the API answers `202` with a job id, and the build stays invisible to devices until
467
- processing completes. Access tokens themselves are dashboard-only — nothing on the API can create,
468
- rotate, or delete one.
469
-
470
- Access tokens (`nu_pat_…`) are not app API keys (`nu_app_…`): the key authenticates the plugin inside
471
- your app, while a token is a user-level secret for server and CI use only.
472
-
473
- - [Public API overview](https://nativeupdate-docs.aoneahsan.com/public-api/overview) · [Endpoints](https://nativeupdate-docs.aoneahsan.com/public-api/endpoints) · [Queued jobs](https://nativeupdate-docs.aoneahsan.com/public-api/async-jobs)
474
- - [OpenAPI 3.1 spec](https://nativeupdate-docs.aoneahsan.com/openapi/public-api.json) — machine-readable, for agents and codegen. Raw Markdown mirror + index: [`/raw/manifest.json`](https://nativeupdate-docs.aoneahsan.com/raw/manifest.json)
475
-
476
- ## 🏗️ What Ships in This Package
477
-
478
- ✅ **Complete plugin implementation**
479
- - TypeScript/web implementation with full type definitions (`src/definitions.ts`)
480
- - Native iOS (Swift) and Android (Kotlin) implementations
481
- - Live updates, app store updates, in-app reviews, and background updates
482
-
483
- ✅ **Tooling**
484
- - `npx native-update` CLI: bundle create/sign/verify, key generation, backend templates, migration, and `deploy` + release control against the hosted backend
485
- - Example React + Capacitor app and Node.js + Express backend in `example-apps/`
486
-
487
- ✅ **Backend options**
488
- - Hosted dashboard at [nativeupdate.aoneahsan.com](https://nativeupdate.aoneahsan.com) (Laravel 13 + Nova 5, source in `backend/`, self-hostable), plus its [public management API](https://nativeupdate-docs.aoneahsan.com/public-api/overview) for CI and agents
489
- - Documented HTTP contract for fully custom servers ([server requirements](https://nativeupdate-docs.aoneahsan.com/backend/overview))
490
-
491
- ### What You Still Own as an Integrator
492
-
493
- - Choosing a backend: the hosted dashboard, a self-hosted `backend/` deployment, the Express example, or your own server implementing the documented contract
494
- - Generating and safeguarding your bundle-signing keys (`npx native-update keys generate`)
495
- - Testing your update flows on real devices before production rollouts
496
-
497
- ## 🚀 Getting Started
498
-
499
- 1. **Install and configure** — follow the [Quick Start](https://nativeupdate-docs.aoneahsan.com/getting-started/quick-start)
500
- 2. **Pick a backend** — hosted dashboard or self-hosted (see [server requirements](https://nativeupdate-docs.aoneahsan.com/backend/overview))
501
- 3. **Create signing keys and a first bundle** — `npx native-update keys generate`, then `npx native-update bundle create ./dist`
502
- 4. **Verify the full cycle on a device** — deploy, update, and roll back through channels before going live
503
-
504
- ## 💡 Key Benefits
505
-
506
- - **Zero Downtime Updates**: Deploy fixes instantly without app store delays
507
- - **Native Integration**: Seamless platform-specific implementations
508
- - **Developer Friendly**: Comprehensive TypeScript support and documentation
509
- - **Community Driven**: Open-source with active community support
510
- - **Professional Support**: Enterprise support options available
511
-
512
- ## 🤝 Community & Support
513
-
514
- This package is **open-source** and created by **Ahsan Mahmood** for the developer community. We welcome contributions, feedback, and collaboration.
515
-
516
- ### Community Resources
517
-
518
- - **[NPM Package](https://www.npmjs.com/package/native-update)** - Package and versions
519
- - **[Website](https://nativeupdate.aoneahsan.com)** - Official website and dashboard
520
- - **[Documentation](https://nativeupdate-docs.aoneahsan.com/)** - Comprehensive documentation
521
- - **[Examples](https://nativeupdate-docs.aoneahsan.com/tutorials/first-ota-update)** - Real-world usage examples
522
-
523
- ### Professional Support
524
-
525
- - **Custom Implementation**: Tailored solutions for your needs
526
- - **Security Audits**: Professional security assessments
527
- - **Performance Optimization**: Performance tuning and optimization
528
- - **Training and Consulting**: Team training and consultation
529
-
530
- ## 📈 Why Native Update?
531
-
532
- - **Solid Architecture**: Well-designed plugin structure and interfaces
533
- - **Platform Agnostic**: Works with any JavaScript framework
534
- - **Security-First**: Built with security best practices in mind
535
- - **Comprehensive Documentation**: Detailed guides for implementation
536
-
537
- ## License
538
-
539
- MIT License - see [LICENSE](./LICENSE) for details.
540
-
541
- ## Support
542
-
543
- - 📧 Email: aoneahsan@gmail.com
544
- - 🌐 Website: [nativeupdate.aoneahsan.com](https://nativeupdate.aoneahsan.com)
545
- - 📦 NPM: [native-update](https://www.npmjs.com/package/native-update)
546
- - 💼 LinkedIn: [Ahsan Mahmood](https://linkedin.com/in/aoneahsan)
547
-
548
- ## Author
549
-
550
- **Ahsan Mahmood**
551
-
552
- - Portfolio: [aoneahsan.com](https://aoneahsan.com)
553
- - LinkedIn: [linkedin.com/in/aoneahsan](https://linkedin.com/in/aoneahsan)
554
- - Email: aoneahsan@gmail.com
555
- - Phone: +923046619706
556
-
557
- <!-- project-links:start -->
558
- ## Links
559
-
560
- - Live: https://nativeupdate.aoneahsan.com
561
- - Play Store: https://play.google.com/store/apps/details?id=com.aoneahsan.nativeupdate
562
- - NPM: https://www.npmjs.com/package/native-update
563
-
564
- _URL source of truth: `01-code/projects/project-live-urls.json` (auto-generated — do not hand-edit between these markers)._
565
- <!-- project-links:end -->
package/cli/AGENTS.md DELETED
@@ -1,52 +0,0 @@
1
- # AGENTS.md - CLI Tool
2
-
3
- Agent instructions for the native-update CLI tool.
4
-
5
- ## 🔴 3-Day Freshness Rule
6
- Check and update this file at least every 3 days. See root AGENTS.md.
7
-
8
- ## Package Manager Hierarchy: nvm → npm (global) → yarn (local) (IRON-SOLID)
9
-
10
- Three tiers, each tool ONLY for its tier — for the best, most reproducible dev results:
11
- - **`nvm`** → install/update Node.js (which bundles `npm`): `nvm install --lts`. Use nvm to get/update `npm` itself.
12
- - **`npm`** → ALL global packages: `npm install -g yarn` (install yarn globally if missing) + `npm install -g <pkg>` (every other global CLI).
13
- - **`yarn`** → ALL local project work: `yarn`, `yarn add <pkg>`, `yarn add -D <pkg>` inside the project.
14
-
15
- ❌ NEVER use `npm`/`pnpm` for LOCAL installs. NEVER use `pnpm` at all. ✅ Only `yarn.lock` in the project — delete `package-lock.json` and `pnpm-lock.yaml`.
16
-
17
- ## Scope
18
-
19
- Node.js CLI for release management, bundle operations, and configuration. Distributed as part of the npm package.
20
-
21
- ## Key Rules
22
-
23
- 1. **ESM module**: Uses `"type": "module"` — all imports must use ESM syntax
24
- 2. **Interactive prompts**: Use `prompts` library for user input
25
- 3. **Error messages**: Clear, actionable error messages without exposing internals
26
- 4. **Exit codes**: Use proper exit codes (0 success, 1 error)
27
- 5. **Help text**: Every command must have `--help` documentation
28
-
29
- ## When Adding CLI Commands
30
-
31
- 1. Create command file in `commands/`
32
- 2. Register in `index.js`
33
- 3. Update `docs/CLI_REFERENCE.md`
34
- 4. Add usage example to relevant docs
35
-
36
- ---
37
-
38
- ## Gitignore Hygiene (IRON-SOLID)
39
- `.gitignore` stays current with the project structure — ignore only recoverable artifacts (build/`dist`/`www`/`node_modules`/logs/caches/IDE), never lose source. Custom rules always present: `*.ignore.*`, `project-record-ignore/`. This is a **PRIVATE** repo -> `.env`/secrets/keystores ARE tracked in git. Capacitor: track `android`/`ios` source, ignore native build.
40
- Full rule + private/public protocol: `~/.claude/rules/project-config.md`.
41
- Gitignore Last Verified: 2026-06-24
42
-
43
- **Last Updated**: 2026-07-14
44
-
45
-
46
- ## Sub-agents & Skills — Main-Context-First (IRON-SOLID)
47
- Default/built-in sub-agents (`general-purpose`, `Explore`, `Plan`, `claude`, `fork`, …) do NOT have
48
- access to `/skills`, so delegating to them silently SKIPS the skills RULE #0 requires. Do all
49
- skill-relevant work in the **MAIN context**; use a sub-agent ONLY when a **custom** agent exists in
50
- `.claude/agents/` for that job; a default `Explore`/`Plan` agent is allowed ONLY for read-only,
51
- no-skill search/exploration. When a relevant skill is missing, **install/enable it** rather than
52
- proceeding skill-less. (Owner directive 2026-07-11; full text in `~/.claude/CLAUDE.md`.)
package/cli/CLAUDE.md DELETED
@@ -1,74 +0,0 @@
1
- # Native Update - CLI
2
-
3
- Command-line interface for native-update release management and bundle operations.
4
-
5
- ## 🔴 3-Day Freshness Rule
6
- Check and update this file at least every 3 days. See root CLAUDE.md.
7
-
8
- ## Package Manager Hierarchy: nvm → npm (global) → yarn (local) (IRON-SOLID)
9
-
10
- Three tiers, each tool ONLY for its tier — for the best, most reproducible dev results:
11
- - **`nvm`** → install/update Node.js (which bundles `npm`): `nvm install --lts`. Use nvm to get/update `npm` itself.
12
- - **`npm`** → ALL global packages: `npm install -g yarn` (install yarn globally if missing) + `npm install -g <pkg>` (every other global CLI).
13
- - **`yarn`** → ALL local project work: `yarn`, `yarn add <pkg>`, `yarn add -D <pkg>` inside the project.
14
-
15
- ❌ NEVER use `npm`/`pnpm` for LOCAL installs. NEVER use `pnpm` at all. ✅ Only `yarn.lock` in the project — delete `package-lock.json` and `pnpm-lock.yaml`.
16
-
17
- ## Structure
18
-
19
- | File/Folder | Purpose |
20
- |-------------|---------|
21
- | `index.js` | CLI entry point (~10KB) |
22
- | `commands/` | Command implementations |
23
- | `package.json` | CLI dependencies |
24
-
25
- ## Dependencies
26
- - `commander` — Argument parsing
27
- - `chalk` — Colored terminal output
28
- - `ora` — Loading spinners
29
- - `archiver` — ZIP creation
30
- - `prompts` — Interactive prompts
31
-
32
- ## Usage
33
-
34
- ```bash
35
- # Via npx
36
- npx native-update <command>
37
-
38
- # Or install globally
39
- npm install -g native-update
40
- native-update <command>
41
- ```
42
-
43
- ## Commands
44
-
45
- The CLI provides commands for:
46
- - Bundle management (create, verify, sign)
47
- - Update publishing (upload, activate, rollback)
48
- - Configuration management
49
- - Release management
50
-
51
- ## Module System
52
- - ESM (`"type": "module"` in package.json)
53
- - Uses `commander` for CLI framework
54
-
55
- ## FilesHub Rule (inherited)
56
- All file storage uses FilesHub API. See root CLAUDE.md.
57
-
58
- ---
59
-
60
- ## Gitignore Hygiene (IRON-SOLID)
61
- `.gitignore` stays current with the project structure — ignore only recoverable artifacts (build/`dist`/`www`/`node_modules`/logs/caches/IDE), never lose source. Custom rules always present: `*.ignore.*`, `project-record-ignore/`. This is a **PRIVATE** repo -> `.env`/secrets/keystores ARE tracked in git. Capacitor: track `android`/`ios` source, ignore native build.
62
- Full rule + private/public protocol: `~/.claude/rules/project-config.md`.
63
- Gitignore Last Verified: 2026-06-24
64
-
65
- **Last Updated**: 2026-07-14
66
-
67
-
68
- ## Sub-agents & Skills — Main-Context-First (IRON-SOLID)
69
- Default/built-in sub-agents (`general-purpose`, `Explore`, `Plan`, `claude`, `fork`, …) do NOT have
70
- access to `/skills`, so delegating to them silently SKIPS the skills RULE #0 requires. Do all
71
- skill-relevant work in the **MAIN context**; use a sub-agent ONLY when a **custom** agent exists in
72
- `.claude/agents/` for that job; a default `Explore`/`Plan` agent is allowed ONLY for read-only,
73
- no-skill search/exploration. When a relevant skill is missing, **install/enable it** rather than
74
- proceeding skill-less. (Owner directive 2026-07-11; full text in `~/.claude/CLAUDE.md`.)