@bipopush/cli 0.2.0 → 0.3.0-beta.11
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/LICENSE +35 -21
- package/README.md +38 -24
- package/dist/diff.wasm +0 -0
- package/dist/index.js +1 -166
- package/package.json +9 -6
- package/dist/commands.js +0 -303
- package/dist/config.js +0 -29
- package/dist/http.js +0 -41
- package/dist/keys.js +0 -41
- package/dist/login.js +0 -73
- package/dist/pack.js +0 -174
- package/dist/project.js +0 -177
package/LICENSE
CHANGED
|
@@ -1,21 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 BipoPush
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
The
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
BipoPush Software License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 BipoPush. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software (the "Software") is licensed, not sold, under these terms and the BipoPush Terms of Service
|
|
6
|
+
(https://bipopush.com/terms). By installing or using the Software you accept them.
|
|
7
|
+
|
|
8
|
+
1. License. While you have a BipoPush account and follow these terms, BipoPush grants you a limited,
|
|
9
|
+
non-exclusive, non-transferable, revocable license to install and use the Software to deliver
|
|
10
|
+
over-the-air updates through the BipoPush service, including in your build and CI systems.
|
|
11
|
+
|
|
12
|
+
2. Your apps. The updates you publish with the Software are yours. The Software itself is not part of your
|
|
13
|
+
apps and may not be distributed with them.
|
|
14
|
+
|
|
15
|
+
3. Restrictions. You may not, and may not let others:
|
|
16
|
+
a. copy, modify, adapt or create derivative works of the Software, except to install it as in section 1;
|
|
17
|
+
b. decompile, disassemble, deobfuscate or otherwise reverse engineer the Software, except where the law
|
|
18
|
+
allows it despite this restriction;
|
|
19
|
+
c. use the Software with any service other than BipoPush, or to build a competing product or service;
|
|
20
|
+
d. distribute, sublicense, rent or publish the Software;
|
|
21
|
+
e. remove or change any notice in the Software.
|
|
22
|
+
|
|
23
|
+
4. Third-party software. Parts of the Software are covered by their own licenses, listed in the
|
|
24
|
+
THIRD_PARTY_NOTICES file where present. Those licenses apply to those parts.
|
|
25
|
+
|
|
26
|
+
5. Termination. This license ends automatically if you breach these terms or your BipoPush account ends.
|
|
27
|
+
|
|
28
|
+
6. No warranty. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
|
29
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT, TO THE EXTENT THE LAW ALLOWS.
|
|
30
|
+
|
|
31
|
+
7. Limitation of liability. To the extent the law allows, BipoPush is not liable for any indirect, incidental,
|
|
32
|
+
special or consequential damages arising from the Software, and its total liability is limited as in the
|
|
33
|
+
BipoPush Terms of Service.
|
|
34
|
+
|
|
35
|
+
Questions: contact@bipopush.com
|
package/README.md
CHANGED
|
@@ -1,42 +1,61 @@
|
|
|
1
1
|
# @bipopush/cli
|
|
2
2
|
|
|
3
|
-
Register a React Native / Expo app and publish signed, compressed
|
|
3
|
+
Register a React Native / Expo app with [BipoPush](https://bipopush.com) and publish signed, compressed over-the-air updates.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npx @bipopush/cli login # browser sign-in
|
|
7
7
|
npx @bipopush/cli init # once per project
|
|
8
|
+
npx @bipopush/cli doctor # checks the setup
|
|
8
9
|
npx @bipopush/cli release # every JS update
|
|
9
10
|
```
|
|
10
11
|
|
|
11
|
-
Installed as a dev dependency, the binary is `bipopush`.
|
|
12
|
+
Installed as a dev dependency, the binary is `bipopush`. Full docs: https://app.bipopush.com/docs
|
|
12
13
|
|
|
13
14
|
## Commands
|
|
14
15
|
|
|
15
16
|
| Command | |
|
|
16
17
|
|---|---|
|
|
17
|
-
| `login` / `logout` / `whoami` | Browser login
|
|
18
|
-
| `init [--name] [--scheme] [--org <slug>] [--app <id>] [--new-signing-key]` | Detects Expo vs React Native, reads the iOS bundle id, Android package, native versions and URL scheme, creates the app in your organization (
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
18
|
+
| `login` / `logout` / `whoami` | Browser login; the token is stored in `~/.config/bipopush/credentials.json` (0600). `whoami` lists your organizations with role and plan |
|
|
19
|
+
| `init [--name] [--scheme] [--org <id\|slug>] [--app <id>] [--new-signing-key]` | Detects Expo vs React Native, reads the iOS bundle id, Android package, native versions and URL scheme, creates the app in your organization (a list to pick from when you belong to several; `--org` in CI) or links an existing one (`--app`), generates the release signing key, writes `bipopush.json` and puts the app's keys in `Info.plist` and `AndroidManifest.xml` (Expo: the plugin entry in `app.json`). Then it shows, side by side, the lines to add to `AppDelegate.swift` and `MainApplication.kt`; it never edits them. `--new-signing-key` replaces a lost key (installed builds need a store update) |
|
|
20
|
+
| `doctor` | Checks the project: SDK installed, other OTA libraries, the app on the server, keys in Info.plist / AndroidManifest / app.json, the signing key, the native setup (with the side-by-side change when something is missing), the iOS pod and the URL scheme. Exit code 1 when something must be fixed |
|
|
21
|
+
| `release [-p ios\|android\|all] [-c <channel>] [-m <text>] [--mandatory] [--rollout <percent>] [--dry-run]` | Builds and publishes one update. `-c` defaults to `production`; a new channel name is created if the plan allows. `--mandatory`: devices with auto update install it right away, also when they skip to a later version. `--rollout`: only that share of devices gets it at first (Plus and above) |
|
|
22
|
+
| `rollout <percent> [-c] [-p] [--number <n>]` | Changes how many devices get the newest version; `100` finishes the rollout |
|
|
23
|
+
| `disable [-c] [-p] [--number <n>]` | Disables the newest version (or version n). Devices get the newest enabled version on their next check: that is the rollback |
|
|
24
|
+
| `promote [--from staging] [--to production] [-p] [--number <n>]` | Re-publishes a tested version in another channel: same bundle and assets, next version number there |
|
|
25
|
+
| `apps` | Your apps by organization, with MAU and usage |
|
|
26
|
+
| `migrate` | Finds CodePush, RevoPush or expo-updates in the project and prints the steps to switch |
|
|
27
|
+
|
|
28
|
+
## Coming from CodePush, RevoPush or EAS Update
|
|
29
|
+
|
|
30
|
+
Swap the binary name and your scripts keep working; the app comes from `bipopush.json`.
|
|
31
|
+
|
|
32
|
+
| You ran | BipoPush does |
|
|
33
|
+
|---|---|
|
|
34
|
+
| `release-react MyApp ios -d Production --description … -m -r 25` | release to production, mandatory, to 25% |
|
|
35
|
+
| `release-expo MyApp android -d Production …` (RevoPush) | the same release (Expo projects are detected) |
|
|
36
|
+
| `promote MyApp Staging Production` | promote from staging to production |
|
|
37
|
+
| `rollback MyApp Production` | disable the newest production version |
|
|
38
|
+
| `patch MyApp Production -m true -r 50` | mandatory and 50% on the newest production version |
|
|
39
|
+
| `codepush …` / `revopush …` prefixes, `-a owner/MyApp` | accepted |
|
|
40
|
+
| `update --channel production --message … --rollout-percentage 10` | release to production, to 10% (`--branch` works as `--channel`) |
|
|
41
|
+
| `update:edit --channel production --rollout-percentage 100` | rollout 100 on production |
|
|
42
|
+
| `release-native MyApp ios ./app.ipa` | refused: app binaries go through the App Store and Google Play |
|
|
22
43
|
|
|
23
44
|
## What `release` does
|
|
24
45
|
|
|
25
46
|
For each platform:
|
|
26
47
|
|
|
27
48
|
1. **Bundle** with the project's own toolchain (`react-native bundle` or `expo export:embed`), collecting the images and fonts the JS requires.
|
|
28
|
-
2. **Compile** to Hermes bytecode with the app's `hermesc
|
|
29
|
-
3. **Hash** (SHA-256) the bundle and every asset, and **sign** with the app's
|
|
30
|
-
4. **Compress** with brotli
|
|
31
|
-
5. **Diff** against the previous release of the same channel
|
|
32
|
-
6. **Upload** straight to storage with
|
|
33
|
-
|
|
34
|
-
Example output for a 2 MB app where only an image changed:
|
|
49
|
+
2. **Compile** to Hermes bytecode with the app's `hermesc`.
|
|
50
|
+
3. **Hash** (SHA-256) the bundle and every asset, and **sign** with the app's Ed25519 key (a manifest of all hashes when there are assets).
|
|
51
|
+
4. **Compress** with brotli.
|
|
52
|
+
5. **Diff** against the previous release of the same channel and native version: devices on it download a binary patch of a few KB instead of the full bundle.
|
|
53
|
+
6. **Upload** straight to storage with short-lived URLs (assets already stored are skipped), then **publish**. Versions are numbered `v1, v2, …` per channel, platform and native version.
|
|
35
54
|
|
|
36
55
|
```
|
|
37
56
|
ios 1.0
|
|
38
57
|
JS 2016.7 KB → Hermes 1279.5 KB → brotli 462.1 KB (77% smaller)
|
|
39
|
-
patch
|
|
58
|
+
patch 1.9 KB vs previous release (100% smaller than full)
|
|
40
59
|
assets 3 files, 322.3 KB (manifest signed)
|
|
41
60
|
Assets: 2 new uploaded (0.6 KB), 1 already stored.
|
|
42
61
|
Published iOS 1.0 v7 to production.
|
|
@@ -44,11 +63,8 @@ Published iOS 1.0 v7 to production.
|
|
|
44
63
|
|
|
45
64
|
## Keys and CI
|
|
46
65
|
|
|
47
|
-
- The signing key is saved at `~/.config/bipopush/keys/<appId>.pem`. Keep it private
|
|
48
|
-
- In CI set `BIPOPUSH_TOKEN` (a CLI token) and `BIPOPUSH_SIGNING_KEY` (the PEM, or its base64)
|
|
49
|
-
- `bsdiff-nodejs` is an optional native dependency; without it releases still work, just without patches.
|
|
50
|
-
|
|
51
|
-
## Environment
|
|
66
|
+
- The signing key is saved at `~/.config/bipopush/keys/<appId>.pem`. Keep it private: whoever has it can sign updates for your app.
|
|
67
|
+
- In CI, set `BIPOPUSH_TOKEN` (a CLI token) and `BIPOPUSH_SIGNING_KEY` (the PEM, or its base64), then run `npx @bipopush/cli release`.
|
|
52
68
|
|
|
53
69
|
| Variable | Default |
|
|
54
70
|
|---|---|
|
|
@@ -58,8 +74,6 @@ Published iOS 1.0 v7 to production.
|
|
|
58
74
|
| `BIPOPUSH_SIGNING_KEY` | — |
|
|
59
75
|
| `BIPOPUSH_NO_BROWSER` | Print the login URL instead of opening it |
|
|
60
76
|
|
|
61
|
-
##
|
|
77
|
+
## License
|
|
62
78
|
|
|
63
|
-
|
|
64
|
-
npm test # runs the real hermesc, brotli and bsdiff on sample bundles
|
|
65
|
-
```
|
|
79
|
+
Proprietary: use with a BipoPush account under the [BipoPush Software License](LICENSE) and the [Terms of Service](https://bipopush.com/terms). Questions: contact@bipopush.com
|
package/dist/diff.wasm
ADDED
|
Binary file
|