native-update 1.3.5 → 1.3.6
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 +1 -1
- package/docs/APP_REVIEW_GUIDE.md +1 -1
- package/docs/LIVE_UPDATES_GUIDE.md +3 -3
- package/docs/NATIVE_UPDATES_GUIDE.md +1 -1
- package/docs/cli-reference.md +6 -6
- package/docs/features/live-updates.md +3 -3
- package/docs/getting-started/installation.md +1 -9
- package/docs/getting-started/quick-start.md +3 -3
- package/docs/guides/deployment-guide.md +5 -5
- package/docs/guides/migration-from-codepush.md +2 -2
- package/docs/guides/testing-guide.md +9 -9
- package/package.json +1 -1
package/Readme.md
CHANGED
package/docs/APP_REVIEW_GUIDE.md
CHANGED
|
@@ -69,7 +69,7 @@ sequenceDiagram
|
|
|
69
69
|
### 1. Install the Plugin
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
|
-
|
|
72
|
+
yarn add native-update
|
|
73
73
|
npx cap sync
|
|
74
74
|
```
|
|
75
75
|
|
|
@@ -329,7 +329,7 @@ export class UpdateStrategies {
|
|
|
329
329
|
|
|
330
330
|
```bash
|
|
331
331
|
cd server-example
|
|
332
|
-
|
|
332
|
+
yarn install
|
|
333
333
|
npm start
|
|
334
334
|
```
|
|
335
335
|
|
|
@@ -389,7 +389,7 @@ Response:
|
|
|
389
389
|
|
|
390
390
|
```bash
|
|
391
391
|
# 1. Build your web app
|
|
392
|
-
|
|
392
|
+
yarn build
|
|
393
393
|
|
|
394
394
|
# 2. Create bundle
|
|
395
395
|
cd dist
|
package/docs/cli-reference.md
CHANGED
|
@@ -11,10 +11,10 @@ The CLI is included with the native-update package. You can use it via npx witho
|
|
|
11
11
|
npx native-update <command>
|
|
12
12
|
|
|
13
13
|
# Or install globally
|
|
14
|
-
|
|
14
|
+
yarn global add native-update
|
|
15
15
|
|
|
16
16
|
# Or use locally in your project
|
|
17
|
-
|
|
17
|
+
yarn add native-update
|
|
18
18
|
npx native-update <command>
|
|
19
19
|
```
|
|
20
20
|
|
|
@@ -218,11 +218,11 @@ npx native-update backend create express --with-admin
|
|
|
218
218
|
|
|
219
219
|
# 4. Start the backend (in another terminal)
|
|
220
220
|
cd native-update-backend
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
yarn install
|
|
222
|
+
yarn dev
|
|
223
223
|
|
|
224
224
|
# 5. Build your app
|
|
225
|
-
|
|
225
|
+
yarn build
|
|
226
226
|
|
|
227
227
|
# 6. Create and sign a bundle
|
|
228
228
|
npx native-update bundle create ./www --version 1.0.1
|
|
@@ -292,7 +292,7 @@ chmod 600 ./keys/private-*.pem
|
|
|
292
292
|
Ensure your web directory contains built files:
|
|
293
293
|
```bash
|
|
294
294
|
# Build first
|
|
295
|
-
|
|
295
|
+
yarn build
|
|
296
296
|
|
|
297
297
|
# Then create bundle
|
|
298
298
|
npx native-update bundle create ./www
|
|
@@ -370,7 +370,7 @@ async function getFeatureFlags() {
|
|
|
370
370
|
|
|
371
371
|
```bash
|
|
372
372
|
# Use production builds
|
|
373
|
-
|
|
373
|
+
yarn build -- --mode production
|
|
374
374
|
|
|
375
375
|
# Enable compression
|
|
376
376
|
gzip -9 bundle.js
|
|
@@ -548,8 +548,8 @@ Set up a local update server for testing:
|
|
|
548
548
|
```bash
|
|
549
549
|
# See server-example directory
|
|
550
550
|
cd server-example
|
|
551
|
-
|
|
552
|
-
|
|
551
|
+
yarn install
|
|
552
|
+
yarn dev
|
|
553
553
|
```
|
|
554
554
|
|
|
555
555
|
### Test Scenarios
|
|
@@ -29,14 +29,6 @@ Before installing the plugin, ensure you have:
|
|
|
29
29
|
|
|
30
30
|
### 1. Install the Plugin
|
|
31
31
|
|
|
32
|
-
Using npm:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npm install native-update
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Using yarn:
|
|
39
|
-
|
|
40
32
|
```bash
|
|
41
33
|
yarn add native-update
|
|
42
34
|
```
|
|
@@ -267,7 +259,7 @@ import type {
|
|
|
267
259
|
### Common Issues
|
|
268
260
|
|
|
269
261
|
1. **"Module not found" error**
|
|
270
|
-
- Run `
|
|
262
|
+
- Run `yarn install` again
|
|
271
263
|
- Delete `node_modules` and reinstall
|
|
272
264
|
- Ensure you've run `npx cap sync`
|
|
273
265
|
|
|
@@ -360,8 +360,8 @@ npx native-update backend create firebase --with-monitoring
|
|
|
360
360
|
|
|
361
361
|
# Start the development server
|
|
362
362
|
cd native-update-backend
|
|
363
|
-
|
|
364
|
-
|
|
363
|
+
yarn install
|
|
364
|
+
yarn dev
|
|
365
365
|
```
|
|
366
366
|
|
|
367
367
|
### Creating and Deploying Updates
|
|
@@ -374,7 +374,7 @@ npm run dev
|
|
|
374
374
|
|
|
375
375
|
2. **Build and create update bundle**:
|
|
376
376
|
```bash
|
|
377
|
-
|
|
377
|
+
yarn build
|
|
378
378
|
npx native-update bundle create ./www --version 1.0.1
|
|
379
379
|
```
|
|
380
380
|
|
|
@@ -18,7 +18,7 @@ This guide covers deploying the Capacitor Native Update plugin to production.
|
|
|
18
18
|
cd production-backend
|
|
19
19
|
|
|
20
20
|
# Install dependencies
|
|
21
|
-
|
|
21
|
+
yarn install
|
|
22
22
|
|
|
23
23
|
# Set environment variables
|
|
24
24
|
cp .env.example .env
|
|
@@ -29,7 +29,7 @@ cp .env.example .env
|
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
31
|
# Initialize production database
|
|
32
|
-
|
|
32
|
+
yarn db:init
|
|
33
33
|
|
|
34
34
|
# For PostgreSQL (recommended for production)
|
|
35
35
|
# Update DB_PATH in .env to PostgreSQL connection string
|
|
@@ -76,7 +76,7 @@ docker run -p 3000:3000 update-server
|
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
78
|
# Install PM2
|
|
79
|
-
|
|
79
|
+
yarn install -g pm2
|
|
80
80
|
|
|
81
81
|
# Start server
|
|
82
82
|
pm2 start src/index.js --name update-server
|
|
@@ -143,7 +143,7 @@ bundle.downloadUrl = `${cdnUrl}/${bundle.id}`;
|
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
145
|
# Install monitoring dependencies
|
|
146
|
-
|
|
146
|
+
yarn install @opentelemetry/api @opentelemetry/sdk-node
|
|
147
147
|
|
|
148
148
|
# Configure in server
|
|
149
149
|
const { NodeSDK } = require('@opentelemetry/sdk-node');
|
|
@@ -180,7 +180,7 @@ ServerDown:
|
|
|
180
180
|
|
|
181
181
|
```bash
|
|
182
182
|
# Build your app
|
|
183
|
-
|
|
183
|
+
yarn build
|
|
184
184
|
|
|
185
185
|
# Create bundle
|
|
186
186
|
npx native-update bundle create ./www
|
|
@@ -10,13 +10,13 @@ The plugin includes unit tests for core functionality:
|
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
# Run all tests
|
|
13
|
-
|
|
13
|
+
yarn test
|
|
14
14
|
|
|
15
15
|
# Run with coverage
|
|
16
|
-
|
|
16
|
+
yarn test:coverage
|
|
17
17
|
|
|
18
18
|
# Watch mode for development
|
|
19
|
-
|
|
19
|
+
yarn test:watch
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
#### Test Structure
|
|
@@ -38,8 +38,8 @@ src/__tests__/
|
|
|
38
38
|
```bash
|
|
39
39
|
# Start the test server
|
|
40
40
|
cd production-backend
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
yarn install
|
|
42
|
+
yarn db:init
|
|
43
43
|
npm start
|
|
44
44
|
```
|
|
45
45
|
|
|
@@ -256,9 +256,9 @@ jobs:
|
|
|
256
256
|
steps:
|
|
257
257
|
- uses: actions/checkout@v2
|
|
258
258
|
- uses: actions/setup-node@v2
|
|
259
|
-
- run:
|
|
260
|
-
- run:
|
|
261
|
-
- run:
|
|
259
|
+
- run: yarn install
|
|
260
|
+
- run: yarn test
|
|
261
|
+
- run: yarn test:e2e
|
|
262
262
|
```
|
|
263
263
|
|
|
264
264
|
### 10. Manual Testing Checklist
|
|
@@ -322,7 +322,7 @@ curl -X POST http://localhost:3000/api/analytics/event \
|
|
|
322
322
|
### Load Testing
|
|
323
323
|
```bash
|
|
324
324
|
# Install artillery
|
|
325
|
-
|
|
325
|
+
yarn install -g artillery
|
|
326
326
|
|
|
327
327
|
# Run load test
|
|
328
328
|
artillery quick --count 100 --num 10 \
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "native-update",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"description": "Foundation package for building a comprehensive update system for Capacitor apps. Provides architecture and interfaces but requires backend implementation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/plugin.cjs.js",
|