@gfean/react-native-bundle-drop 0.4.2 → 0.4.3
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 +203 -64
- package/lib/CLI/cli.js +10 -17
- package/lib/CLI/logo.d.ts +9 -0
- package/lib/CLI/logo.js +26 -0
- package/lib/CLI/scripts/aipowered/scanner.js +22 -0
- package/lib/CLI/scripts/init-config.js +1 -2
- package/lib/context.js +1 -1
- package/lib/loadConfig.d.ts +5 -1
- package/lib/scripts/bundle.js +20 -2
- package/lib/scripts/download-bundle.js +1 -1
- package/package.json +25 -11
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Bundle Drop
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@gfean/react-native-bundle-drop)
|
|
4
4
|
[](#license)
|
|
@@ -6,36 +6,45 @@
|
|
|
6
6
|
[](https://bundledrop.app/docs)
|
|
7
7
|
[](https://developer.bundledrop.app)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Ship OTA updates to React Native with confidence.**
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Push instant over-the-air updates to your React Native apps and skip the App Store
|
|
12
|
+
and Play Store review cycle entirely. Full-bundle reliability with patch-sized
|
|
13
|
+
downloads — a drop-in [CodePush alternative](https://bundledrop.app/codepush-alternative)
|
|
14
|
+
for bare React Native.
|
|
12
15
|
|
|
13
|
-
[Website](https://bundledrop.app) • [Docs](https://bundledrop.app/docs) • [Dashboard](https://developer.bundledrop.app)
|
|
16
|
+
[Website](https://bundledrop.app) • [Docs](https://bundledrop.app/docs) • [Dashboard](https://developer.bundledrop.app) • [Coming from CodePush?](https://bundledrop.app/codepush-alternative)
|
|
14
17
|
|
|
15
18
|
---
|
|
16
19
|
|
|
17
|
-
## Why
|
|
20
|
+
## Why Bundle Drop?
|
|
18
21
|
|
|
19
22
|
Shipping a small fix should not require a full mobile release.
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- manage releases from a dedicated dashboard
|
|
24
|
+
| The old way | With Bundle Drop |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| Fix a typo, rebuild the whole app. | Publish the JavaScript change from your machine or CI. |
|
|
27
|
+
| Wait days on an App Store / Play Store review. | Compatible devices pick it up in minutes, no review cycle. |
|
|
28
|
+
| Users stay on the broken version until they manually update. | Roll it out gradually, and roll back instantly if something looks off. |
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
Over-the-air updates deliver the JavaScript and assets that run on top of your
|
|
31
|
+
existing native binary — so the fixes and features that don't touch native code
|
|
32
|
+
reach users the moment you publish them.
|
|
29
33
|
|
|
30
34
|
---
|
|
31
35
|
|
|
32
|
-
##
|
|
36
|
+
## Features
|
|
33
37
|
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
- target
|
|
37
|
-
-
|
|
38
|
-
-
|
|
38
|
+
- **Instant delivery** — publish an update and compatible devices pick it up on their next check.
|
|
39
|
+
- **Channel-based distribution** — ship to `develop`, `production`, `beta`, or any channel you define.
|
|
40
|
+
- **Targeted rollouts** — stage releases and target specific cohorts with user properties.
|
|
41
|
+
- **Rollback safety** — every install is a verified, immutable bundle; rollback is an instant local pointer switch.
|
|
42
|
+
- **Hybrid OTA transport** — full-bundle reliability with patch-sized downloads (see [below](#hybrid-ota-delivery)).
|
|
43
|
+
- **Version gating** — updates only reach binaries they're compatible with, so a JS update never lands on the wrong native build.
|
|
44
|
+
- **Works with your error stack** — per-bundle hashes and source maps keep stack traces accurate in Sentry, Bugsnag, Datadog, or anything else.
|
|
45
|
+
- **CI/CD friendly** — upload with a Personal Access Token from any pipeline.
|
|
46
|
+
|
|
47
|
+
Built for production React Native apps on iOS and Android.
|
|
39
48
|
|
|
40
49
|
---
|
|
41
50
|
|
|
@@ -43,6 +52,7 @@ Built for production React Native apps.
|
|
|
43
52
|
|
|
44
53
|
```bash
|
|
45
54
|
npm install @gfean/react-native-bundle-drop
|
|
55
|
+
# or: yarn add @gfean/react-native-bundle-drop
|
|
46
56
|
```
|
|
47
57
|
|
|
48
58
|
```bash
|
|
@@ -60,7 +70,17 @@ npx bundle-drop login
|
|
|
60
70
|
npx bundle-drop init
|
|
61
71
|
```
|
|
62
72
|
|
|
63
|
-
|
|
73
|
+
`init` generates `bundle.drop.config.js` from your logged-in account context.
|
|
74
|
+
Optionally, apply the native wiring automatically:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npx bundle-drop init-native # patches AppDelegate / MainApplication
|
|
78
|
+
npx bundle-drop init-metro # lets Metro resolve bundle.drop.config.js
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 2. Bootstrap Bundle Drop in your app
|
|
82
|
+
|
|
83
|
+
Call `init` once, as early as possible in your app entrypoint:
|
|
64
84
|
|
|
65
85
|
```ts
|
|
66
86
|
import { BundleDrop } from '@gfean/react-native-bundle-drop';
|
|
@@ -68,62 +88,75 @@ import { BundleDrop } from '@gfean/react-native-bundle-drop';
|
|
|
68
88
|
BundleDrop.init({
|
|
69
89
|
enabled: !__DEV__,
|
|
70
90
|
environment: __DEV__ ? 'development' : 'production',
|
|
91
|
+
channelName: 'develop', // the channel created for every new project by default
|
|
71
92
|
policy: 'on-next-launch',
|
|
72
|
-
channelName: 'General',
|
|
73
93
|
});
|
|
74
94
|
```
|
|
75
95
|
|
|
76
96
|
### 3. Ship an update
|
|
77
97
|
|
|
78
98
|
```bash
|
|
79
|
-
npx bundle-drop upload android --version 1.2.3 --channel
|
|
80
|
-
npx bundle-drop upload ios --plist-file ios/Info.plist --channel
|
|
99
|
+
npx bundle-drop upload android --version 1.2.3 --channel develop
|
|
100
|
+
npx bundle-drop upload ios --plist-file ios/Info.plist --channel develop
|
|
81
101
|
```
|
|
82
102
|
|
|
83
|
-
|
|
103
|
+
Add `--sourcemap` to keep crash reports readable, and `--token <PAT>` to upload
|
|
104
|
+
from CI/CD without an interactive login.
|
|
84
105
|
|
|
85
106
|
---
|
|
86
107
|
|
|
87
108
|
## Update Policies
|
|
88
109
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- `manual`: check only, no automatic apply
|
|
92
|
-
- `immediate`: download and apply right away
|
|
93
|
-
- `on-next-launch`: stage now, apply on next launch
|
|
110
|
+
`policy` controls what happens after Bundle Drop hydrates its local state on startup:
|
|
94
111
|
|
|
95
|
-
|
|
112
|
+
| Policy | Behavior |
|
|
113
|
+
| --- | --- |
|
|
114
|
+
| `manual` | Check only when you call the APIs yourself. Default. |
|
|
115
|
+
| `immediate` | Download and apply a new bundle right away. |
|
|
116
|
+
| `on-next-launch` | Stage the update now, apply it on the next cold launch. |
|
|
96
117
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
BundleDrop installs complete immutable bundle folders, identified by a canonical
|
|
100
|
-
`bundleHash` for the full reconstructed file tree. Patch transports are only a
|
|
101
|
-
download optimization: the SDK reconstructs a complete target folder, validates
|
|
102
|
-
the manifest contract in JS, verifies file hashes/sizes with native batch
|
|
103
|
-
verification, then promotes `bundle-drop/bundles/{bundleHash}`.
|
|
104
|
-
The SDK always supports `asset-only-v1` patch sets and advertises
|
|
105
|
-
`xdelta3-vcdiff` when native xdelta support passes its probe.
|
|
106
|
-
|
|
107
|
-
The current production manifest contract is `manifestVersion: 1`. This is not a
|
|
108
|
-
legacy compatibility mode; it is the only accepted canonical manifest after the
|
|
109
|
-
hard shift. `jsBundleHash` is retained as metadata only.
|
|
110
|
-
|
|
111
|
-
When patch transport is unavailable or fails, the SDK falls back to the signed
|
|
112
|
-
full ZIP. Rollback remains a local pointer switch between verified bundle hashes.
|
|
118
|
+
`on-next-launch` is the safest choice for most apps: users never see a reload
|
|
119
|
+
mid-session, and the update is already on-device the next time they open the app.
|
|
113
120
|
|
|
114
121
|
---
|
|
115
122
|
|
|
116
|
-
##
|
|
117
|
-
|
|
118
|
-
|
|
123
|
+
## Driving Updates Manually
|
|
124
|
+
|
|
125
|
+
For custom "Update available" UI, use the `useBundleDrop()` hook. It subscribes to
|
|
126
|
+
the singleton runtime and exposes actions plus live state:
|
|
127
|
+
|
|
128
|
+
```tsx
|
|
129
|
+
import { useBundleDrop } from '@gfean/react-native-bundle-drop';
|
|
130
|
+
|
|
131
|
+
function UpdateBanner() {
|
|
132
|
+
const { checkLatest, downloadUpdate, applyUpdate, pendingApply, isBusy } =
|
|
133
|
+
useBundleDrop();
|
|
134
|
+
|
|
135
|
+
if (pendingApply) {
|
|
136
|
+
return <Button title="Restart to update" onPress={applyUpdate} />;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return (
|
|
140
|
+
<Button
|
|
141
|
+
title="Check for updates"
|
|
142
|
+
disabled={isBusy}
|
|
143
|
+
onPress={async () => {
|
|
144
|
+
await checkLatest();
|
|
145
|
+
await downloadUpdate();
|
|
146
|
+
}}
|
|
147
|
+
/>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
```
|
|
119
151
|
|
|
120
|
-
|
|
152
|
+
The same actions are available as standalone functions (`checkForUpdate`,
|
|
153
|
+
`downloadUpdate`, `applyUpdate`, `setChannel`, `reportHealthy`, …) for use outside React.
|
|
121
154
|
|
|
122
155
|
---
|
|
123
156
|
|
|
124
157
|
## Targeted Rollouts
|
|
125
158
|
|
|
126
|
-
|
|
159
|
+
Attach user properties to target specific cohorts when you stage a release:
|
|
127
160
|
|
|
128
161
|
```ts
|
|
129
162
|
import { setUserProperty } from '@gfean/react-native-bundle-drop';
|
|
@@ -133,29 +166,135 @@ await setUserProperty('age', 33);
|
|
|
133
166
|
await setUserProperty('beta', true);
|
|
134
167
|
```
|
|
135
168
|
|
|
136
|
-
|
|
137
|
-
non-empty, 128 characters or fewer, and cannot start with `$`, contain `.`,
|
|
138
|
-
use reserved prototype names.
|
|
169
|
+
Property values must be strings, finite numbers, or booleans. Keys are trimmed and
|
|
170
|
+
must be non-empty, 128 characters or fewer, and cannot start with `$`, contain `.`,
|
|
171
|
+
contain a null byte, or use reserved prototype names.
|
|
139
172
|
|
|
140
173
|
---
|
|
141
174
|
|
|
142
|
-
##
|
|
175
|
+
## Hybrid OTA Delivery
|
|
143
176
|
|
|
144
|
-
|
|
177
|
+
Bundle Drop installs complete, immutable bundle folders, each identified by a
|
|
178
|
+
canonical `bundleHash` for the full reconstructed file tree. Patch transports are
|
|
179
|
+
purely a download optimization: the SDK reconstructs the complete target folder,
|
|
180
|
+
validates the manifest contract in JS, verifies file hashes and sizes with native
|
|
181
|
+
batch verification, then promotes `bundle-drop/bundles/{bundleHash}`.
|
|
145
182
|
|
|
146
|
-
-
|
|
147
|
-
|
|
148
|
-
-
|
|
183
|
+
The result is **full-bundle reliability with patch-sized downloads**: you get the
|
|
184
|
+
integrity guarantees of shipping a whole bundle, without making every device
|
|
185
|
+
re-download everything on each release.
|
|
186
|
+
|
|
187
|
+
- The SDK always supports `asset-only-v1` patch sets and advertises `xdelta3-vcdiff`
|
|
188
|
+
when native xdelta support passes its probe.
|
|
189
|
+
- When patch transport is unavailable or fails, the SDK falls back to the signed full ZIP.
|
|
190
|
+
- Rollback stays a local pointer switch between already-verified bundle hashes.
|
|
191
|
+
|
|
192
|
+
The current production manifest contract is `manifestVersion: 1`. This is not a
|
|
193
|
+
legacy compatibility mode — it is the only accepted canonical manifest. `jsBundleHash`
|
|
194
|
+
is retained as metadata only.
|
|
149
195
|
|
|
150
196
|
---
|
|
151
197
|
|
|
152
|
-
##
|
|
198
|
+
## Observability
|
|
199
|
+
|
|
200
|
+
OTA shouldn't blind your crash reporter. Every bundle has a unique hash, and
|
|
201
|
+
`bundle-drop upload --sourcemap` produces source maps alongside the bundle so stack
|
|
202
|
+
traces stay accurate across every update. Use `getObservabilityContext()` to tag
|
|
203
|
+
error reports with the currently running bundle:
|
|
204
|
+
|
|
205
|
+
```ts
|
|
206
|
+
import { getObservabilityContext } from '@gfean/react-native-bundle-drop';
|
|
207
|
+
|
|
208
|
+
const context = await getObservabilityContext(); // e.g. attach to Sentry/Bugsnag scope
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Works with Sentry, Bugsnag, Datadog, or any error tracker. See the
|
|
212
|
+
[observability guide](https://bundledrop.app/docs/observability). Apps on
|
|
213
|
+
`@sentry/react-native` 7.8.x that combine Sentry's Metro wrapper with Hermes
|
|
214
|
+
should follow the guide's
|
|
215
|
+
[Sentry/Hermes OTA setup](https://bundledrop.app/docs/observability#sentry-and-hermes-ota-builds)
|
|
216
|
+
to keep content-derived Debug IDs from inflating binary patches.
|
|
153
217
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## API Reference
|
|
221
|
+
|
|
222
|
+
Import from `@gfean/react-native-bundle-drop`.
|
|
223
|
+
|
|
224
|
+
**Runtime controller**
|
|
225
|
+
|
|
226
|
+
| Export | Description |
|
|
227
|
+
| --- | --- |
|
|
228
|
+
| `BundleDrop.init(options)` | Initialize the runtime for the app process. |
|
|
229
|
+
| `BundleDrop.setChannel(name)` / `setChannel` | Change the active channel for singleton actions. |
|
|
230
|
+
| `BundleDrop.getChannelName()` / `getChannelName` | Read the active channel. |
|
|
231
|
+
| `BundleDrop.reportHealthy()` / `reportHealthy` | Mark the running OTA candidate healthy for this device. |
|
|
232
|
+
|
|
233
|
+
**`BundleDrop.init(options)`**
|
|
234
|
+
|
|
235
|
+
| Option | Type | Default | Description |
|
|
236
|
+
| --- | --- | --- | --- |
|
|
237
|
+
| `environment` | `string` | — (required) | App environment shown in analytics, e.g. `production`, `staging`, `development`. |
|
|
238
|
+
| `enabled` | `boolean` | `true` | When `false`, the SDK stays configured but fully no-ops. |
|
|
239
|
+
| `channelName` | `string` | config `defaultChannel` (`develop`) | Initial OTA channel for this process. |
|
|
240
|
+
| `policy` | `'manual' \| 'immediate' \| 'on-next-launch'` | `'manual'` | Startup behavior after hydration. |
|
|
241
|
+
| `checkOnly` | `boolean` | `false` | Startup performs only a resolve/check, never download/apply. |
|
|
242
|
+
| `onStatusUpdate` | `(status: string) => void` | — | Listener for human-readable status messages. |
|
|
243
|
+
|
|
244
|
+
**Update actions** — `checkForUpdate`, `downloadUpdate`, `installBundle`, `applyUpdate`, `getUpdateState`, `getInstalledBundleInfo`, `getAvailableBundles`, `getAvailableChannels`.
|
|
245
|
+
|
|
246
|
+
**React** — `useBundleDrop()` → live state (`status`, `isEnabled`, `isBusy`, `channelName`, `installedInfo`, `pendingApply`, `hasBundle`, `availableChannels`) plus the action functions above.
|
|
247
|
+
|
|
248
|
+
**User properties** — `setUserProperty`, `removeUserProperty`, `getUserProperties`, `getCurrentUserProperties`, `resetUserProperties`.
|
|
249
|
+
|
|
250
|
+
**Errors** — `BundleDropError`, `isBundleDropError`.
|
|
251
|
+
|
|
252
|
+
**CLI** (`npx bundle-drop <command>`) — `login`, `logout`, `whoami`, `init`, `init-native`, `init-metro`, `upload <ios|android>`.
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Requirements
|
|
257
|
+
|
|
258
|
+
- Bare React Native on iOS and Android (`react-native >= 0.71`, `react >= 17`).
|
|
259
|
+
- iOS 13.0 or newer.
|
|
260
|
+
- A Bundle Drop account and project (`npx bundle-drop login && npx bundle-drop init`).
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Good To Know
|
|
265
|
+
|
|
266
|
+
Bundle Drop is an OTA delivery system for React Native, not a magic bypass of how
|
|
267
|
+
mobile apps work. A few things to keep in mind so it works the way you expect:
|
|
268
|
+
|
|
269
|
+
- **OTA covers JavaScript and assets, not native code.** Anything that changes the
|
|
270
|
+
native binary — new native modules, native dependency upgrades, permission or
|
|
271
|
+
config changes, a React Native version bump — still ships through a normal App
|
|
272
|
+
Store / Play Store release. Bundle Drop updates run on top of that native binary.
|
|
273
|
+
- **Use it within store policies.** Over-the-air updates are meant to fix bugs and
|
|
274
|
+
improve the app you already shipped, not to change its core purpose or sneak in
|
|
275
|
+
behavior that would fail review. Ship responsibly and stay within Apple and Google
|
|
276
|
+
guidelines.
|
|
277
|
+
- **Version gating is a feature, not a bug.** A JS bundle is only delivered to
|
|
278
|
+
binaries it's compatible with. If a device is on an older native build, it won't
|
|
279
|
+
receive an incompatible update — that's what keeps rollouts safe.
|
|
280
|
+
- **It's a hosted service.** Bundle Drop needs its backend and your project to
|
|
281
|
+
resolve, sign, and serve bundles. It is not a zero-backend, offline-only tool.
|
|
282
|
+
- **Native changes need a rebuild.** Updating this package's native code requires
|
|
283
|
+
rebuilding the host app; `nativeVersion` tracks that boundary (bump it → run `pod install`).
|
|
284
|
+
- **It is not a crash reporter.** Bundle Drop keeps your existing error tracker
|
|
285
|
+
accurate across OTA updates; it doesn't replace Sentry, Bugsnag, or Datadog.
|
|
286
|
+
- **Not for the Expo Go / managed workflow.** You need a native build (bare RN or an
|
|
287
|
+
Expo prebuild) to install the native module.
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## Docs & Links
|
|
292
|
+
|
|
293
|
+
- Website: [bundledrop.app](https://bundledrop.app)
|
|
294
|
+
- Docs: [bundledrop.app/docs](https://bundledrop.app/docs)
|
|
295
|
+
- Dashboard: [developer.bundledrop.app](https://developer.bundledrop.app)
|
|
296
|
+
- Migrating from CodePush: [bundledrop.app/codepush-alternative](https://bundledrop.app/codepush-alternative)
|
|
297
|
+
- Issues: [github.com/GFean/react-native-bundle-drop/issues](https://github.com/GFean/react-native-bundle-drop/issues)
|
|
159
298
|
|
|
160
299
|
---
|
|
161
300
|
|
package/lib/CLI/cli.js
CHANGED
|
@@ -8,21 +8,14 @@ exports.buildProgram = void 0;
|
|
|
8
8
|
const axios_1 = __importDefault(require("axios"));
|
|
9
9
|
const chalk_1 = __importDefault(require("chalk"));
|
|
10
10
|
const commander_1 = require("commander");
|
|
11
|
-
const figures_1 = __importDefault(require("figures"));
|
|
12
11
|
const fs_1 = __importDefault(require("fs"));
|
|
13
12
|
const os_1 = __importDefault(require("os"));
|
|
14
13
|
const path_1 = __importDefault(require("path"));
|
|
15
14
|
const upload_cli_1 = __importDefault(require("./scripts/upload-cli"));
|
|
16
15
|
const post_init_1 = require("./scripts/post-init");
|
|
16
|
+
const logo_1 = require("./logo");
|
|
17
17
|
const package_json_1 = __importDefault(require("../../package.json"));
|
|
18
|
-
const logo =
|
|
19
|
-
______ ______
|
|
20
|
-
|_ _ \\ |_ _ \`.
|
|
21
|
-
| |_) | | | \`. \\
|
|
22
|
-
| __'. | | | |
|
|
23
|
-
_| |__) |_| |_.' /
|
|
24
|
-
|_______/|______.'
|
|
25
|
-
`) + chalk_1.default.bold.cyanBright(`\n${figures_1.default.star} React Native Bundle Drop CLI ${figures_1.default.star}`);
|
|
18
|
+
const logo = (0, logo_1.buildBundleDropLogo)();
|
|
26
19
|
const DEFAULT_SERVER_URL = 'https://api.bundledrop.app';
|
|
27
20
|
const DOCS_CLI_URL = 'https://bundledrop.app/docs/cli';
|
|
28
21
|
const DOCS_UPLOADING_URL = 'https://bundledrop.app/docs/uploading';
|
|
@@ -97,9 +90,9 @@ ${chalk_1.default.bold.cyan('Available Commands:')}
|
|
|
97
90
|
${chalk_1.default.bold.cyan('Common Usage:')}
|
|
98
91
|
${chalk_1.default.gray('bundle-drop login')}
|
|
99
92
|
${chalk_1.default.gray('bundle-drop init')}
|
|
100
|
-
${chalk_1.default.gray('bundle-drop upload android --version 1.2.3 --channel
|
|
101
|
-
${chalk_1.default.gray('bundle-drop upload ios --plist-file ios/Info.plist --channel
|
|
102
|
-
${chalk_1.default.gray('bundle-drop upload android --buildgradle-path android/app/build.gradle --channel
|
|
93
|
+
${chalk_1.default.gray('bundle-drop upload android --version 1.2.3 --channel develop')}
|
|
94
|
+
${chalk_1.default.gray('bundle-drop upload ios --plist-file ios/Info.plist --channel develop')}
|
|
95
|
+
${chalk_1.default.gray('bundle-drop upload android --buildgradle-path android/app/build.gradle --channel develop --release-notes "Fixes"')}
|
|
103
96
|
|
|
104
97
|
${chalk_1.default.gray('Docs →')} ${chalk_1.default.underline.gray(DOCS_CLI_URL)}
|
|
105
98
|
${chalk_1.default.gray('Uploading →')} ${chalk_1.default.underline.gray(DOCS_UPLOADING_URL)}
|
|
@@ -119,11 +112,11 @@ ${chalk_1.default.gray('CI/CD →')} ${chalk_1.default.underline.gray(DOCS_CI_CD
|
|
|
119
112
|
.description(chalk_1.default.whiteBright('Bundle and upload an OTA zip to the server'))
|
|
120
113
|
.addHelpText('after', `
|
|
121
114
|
${chalk_1.default.bold('Examples:')}
|
|
122
|
-
${chalk_1.default.gray('bundle-drop upload android --version 1.2.3 --channel
|
|
123
|
-
${chalk_1.default.gray('bundle-drop upload ios --plist-file ios/Info.plist --channel
|
|
124
|
-
${chalk_1.default.gray('bundle-drop upload android --buildgradle-path android/app/build.gradle --channel
|
|
125
|
-
${chalk_1.default.gray('bundle-drop upload android --version 1.2.3 --channel
|
|
126
|
-
${chalk_1.default.gray('bundle-drop upload android --version 1.2.3 --channel
|
|
115
|
+
${chalk_1.default.gray('bundle-drop upload android --version 1.2.3 --channel develop')}
|
|
116
|
+
${chalk_1.default.gray('bundle-drop upload ios --plist-file ios/Info.plist --channel develop')}
|
|
117
|
+
${chalk_1.default.gray('bundle-drop upload android --buildgradle-path android/app/build.gradle --channel beta --release-notes "Bug fixes"')}
|
|
118
|
+
${chalk_1.default.gray('bundle-drop upload android --version 1.2.3 --channel develop --token bdp_pat_xxx')}
|
|
119
|
+
${chalk_1.default.gray('bundle-drop upload android --version 1.2.3 --channel develop --sourcemap --artifact-dir ./build/bundledrop')}
|
|
127
120
|
|
|
128
121
|
${chalk_1.default.gray('Uploading docs →')} ${chalk_1.default.underline.gray(DOCS_UPLOADING_URL)}
|
|
129
122
|
${chalk_1.default.gray('CI/CD docs →')} ${chalk_1.default.underline.gray(DOCS_CI_CD_URL)}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** 24-bit truecolor half-block render of the Bundle Drop logo. */
|
|
2
|
+
export declare const BUNDLE_DROP_LOGO_TRUECOLOR = "\u001B[0m \u001B[38;2;49;219;247m\u001B[48;2;53;239;251m\u2580\u001B[38;2;53;236;252m\u001B[48;2;52;233;251m\u2580\u001B[38;2;54;243;255m\u001B[48;2;49;225;247m\u2580\u001B[38;2;52;232;250m\u001B[48;2;51;229;249m\u2580\u001B[38;2;51;233;251m\u001B[48;2;53;238;255m\u2580\u001B[38;2;52;235;252m\u001B[49m\u2584\u001B[38;2;51;231;250m\u2584\u001B[0m \u001B[38;2;52;231;249m\u2584\u001B[38;2;52;235;252m\u2584\u001B[38;2;52;233;251m\u001B[48;2;53;238;255m\u2580\u001B[38;2;51;232;250m\u001B[48;2;51;228;248m\u2580\u001B[38;2;55;243;255m\u001B[48;2;51;225;247m\u2580\u001B[38;2;52;236;252m\u001B[48;2;52;232;251m\u2580\u001B[38;2;50;220;243m\u001B[48;2;53;238;251m\u2580\u001B[0m\n\u001B[0m \u001B[38;2;51;227;249m\u001B[48;2;51;227;248m\u2580\u001B[38;2;54;240;253m\u001B[48;2;50;226;246m\u2580\u001B[0m \u001B[38;2;52;233;251m\u2580\u001B[38;2;58;255;255m\u001B[48;2;50;229;248m\u2580\u001B[38;2;52;236;250m\u001B[48;2;54;241;251m\u2580\u001B[38;2;51;232;251m\u001B[49m\u2584\u001B[38;2;51;231;249m\u2584\u001B[38;2;53;236;250m\u001B[48;2;54;241;252m\u2580\u001B[38;2;57;255;255m\u001B[48;2;52;231;249m\u2580\u001B[38;2;51;233;250m\u001B[49m\u2580\u001B[0m \u001B[38;2;55;246;255m\u001B[48;2;50;225;247m\u2580\u001B[38;2;51;228;248m\u001B[48;2;51;227;247m\u2580\u001B[0m\n\u001B[0m \u001B[38;2;51;228;248m\u001B[48;2;51;228;248m\u2580\u001B[38;2;50;228;247m\u001B[48;2;50;229;248m\u2580\u001B[0m \u001B[38;2;46;212;243m\u001B[48;2;53;240;252m\u2580\u001B[38;2;55;247;255m\u001B[48;2;51;232;251m\u2580\u001B[38;2;57;253;255m\u001B[48;2;52;233;252m\u2580\u001B[38;2;47;216;245m\u001B[48;2;54;239;251m\u2580\u001B[0m \u001B[38;2;51;227;247m\u001B[48;2;50;227;246m\u2580\u001B[38;2;50;227;248m\u001B[48;2;51;227;247m\u2580\u001B[0m\n\u001B[0m \u001B[38;2;51;227;247m\u001B[48;2;49;227;247m\u2580\u001B[38;2;51;226;248m\u001B[48;2;53;237;253m\u2580\u001B[0m \u001B[38;2;52;232;249m\u2584\u001B[38;2;52;234;251m\u001B[48;2;56;251;255m\u2580\u001B[38;2;54;240;251m\u001B[48;2;48;218;243m\u2580\u001B[0m \u001B[38;2;54;241;251m\u001B[48;2;48;221;243m\u2580\u001B[38;2;52;234;251m\u001B[48;2;57;252;255m\u2580\u001B[38;2;52;231;249m\u001B[49m\u2584\u001B[0m \u001B[38;2;51;228;248m\u001B[48;2;54;242;255m\u2580\u001B[38;2;50;227;248m\u001B[48;2;51;226;249m\u2580\u001B[0m\n\u001B[0m \u001B[38;2;52;233;251m\u2584\u001B[38;2;52;233;250m\u2584\u001B[38;2;51;232;250m\u001B[48;2;54;241;255m\u2580\u001B[38;2;54;239;253m\u001B[48;2;52;231;251m\u2580\u001B[38;2;51;228;248m\u001B[48;2;51;229;248m\u2580\u001B[38;2;51;228;247m\u001B[48;2;51;228;249m\u2580\u001B[38;2;51;229;248m\u001B[48;2;51;228;248m\u2580\u001B[38;2;51;227;248m\u001B[48;2;54;242;255m\u2580\u001B[38;2;57;254;255m\u001B[48;2;49;228;248m\u2580\u001B[38;2;49;224;246m\u001B[49m\u2580\u001B[0m \u001B[38;2;2;205;235m\u001B[48;2;1;209;238m\u2580\u001B[38;2;2;203;233m\u2580\u001B[0m \u001B[38;2;48;224;246m\u2580\u001B[38;2;57;253;255m\u001B[48;2;51;226;248m\u2580\u001B[38;2;50;227;248m\u001B[48;2;55;244;255m\u2580\u001B[38;2;51;228;248m\u001B[48;2;50;226;246m\u2580\u001B[48;2;51;228;249m\u2580\u001B[38;2;50;227;247m\u001B[48;2;51;227;247m\u2580\u001B[38;2;53;237;252m\u001B[48;2;51;230;250m\u2580\u001B[38;2;52;231;250m\u001B[48;2;53;239;255m\u2580\u001B[38;2;52;232;250m\u001B[49m\u2584\u001B[38;2;52;234;251m\u2584\u001B[38;2;49;230;250m\u2584\u001B[0m\n\u001B[0m \u001B[38;2;52;234;249m\u2584\u001B[38;2;51;232;249m\u001B[48;2;56;251;255m\u2580\u001B[38;2;55;247;255m\u001B[48;2;51;232;250m\u2580\u001B[38;2;52;233;251m\u001B[49m\u2580\u001B[38;2;51;233;251m\u2580\u001B[38;2;51;224;246m\u2580\u001B[38;2;50;230;248m\u001B[48;2;52;228;246m\u2580\u001B[38;2;52;234;251m\u001B[48;2;54;241;255m\u2580\u001B[38;2;49;224;247m\u001B[49m\u2584\u001B[38;2;50;226;246m\u001B[48;2;53;238;255m\u2580\u001B[38;2;54;241;252m\u001B[48;2;49;224;246m\u2580\u001B[0m \u001B[38;2;1;205;233m\u2584\u001B[38;2;1;207;236m\u001B[48;2;1;220;251m\u2580\u001B[38;2;1;213;243m\u001B[48;2;1;214;244m\u2580\u001B[38;2;1;212;242m\u001B[48;2;1;217;247m\u2580\u001B[38;2;1;206;236m\u001B[48;2;1;221;252m\u2580\u001B[38;2;1;203;234m\u001B[49m\u2584\u001B[0m \u001B[38;2;54;241;251m\u001B[48;2;49;223;246m\u2580\u001B[38;2;50;226;247m\u001B[48;2;54;239;255m\u2580\u001B[38;2;50;226;248m\u001B[49m\u2584\u001B[38;2;52;236;251m\u001B[48;2;53;239;255m\u2580\u001B[38;2;51;229;248m\u001B[49m\u2580\u001B[0m \u001B[38;2;51;234;251m\u2580\u001B[38;2;52;233;250m\u2580\u001B[38;2;56;249;255m\u001B[48;2;51;232;250m\u2580\u001B[38;2;51;234;250m\u001B[48;2;56;249;255m\u2580\u001B[38;2;52;235;251m\u001B[49m\u2584\u001B[0m\n\u001B[38;2;50;226;247m\u001B[48;2;54;243;255m\u2580\u001B[38;2;55;244;255m\u001B[48;2;50;226;247m\u2580\u001B[38;2;51;227;247m\u001B[49m\u2580\u001B[0m \u001B[38;2;50;226;247m\u001B[48;2;51;230;248m\u2580\u001B[38;2;56;251;255m\u001B[48;2;57;255;255m\u2580\u001B[38;2;50;229;249m\u001B[48;2;56;230;247m\u2580\u001B[0m \u001B[38;2;3;200;231m\u001B[48;2;2;212;241m\u2580\u001B[38;2;1;230;255m\u001B[48;2;1;218;247m\u2580\u001B[38;2;1;217;248m\u001B[48;2;0;206;233m\u2580\u001B[38;2;1;205;233m\u001B[48;2;0;210;240m\u2580\u001B[38;2;1;205;234m\u001B[48;2;0;208;237m\u2580\u001B[38;2;1;212;242m\u001B[49m\u2580\u001B[38;2;1;232;255m\u001B[48;2;1;219;248m\u2580\u001B[38;2;3;204;234m\u001B[48;2;2;212;241m\u2580\u001B[0m \u001B[38;2;50;229;249m\u001B[48;2;55;230;248m\u2580\u001B[38;2;57;254;255m\u001B[48;2;57;254;255m\u2580\u001B[38;2;51;226;247m\u001B[48;2;51;227;249m\u2580\u001B[0m \u001B[38;2;50;224;247m\u2580\u001B[38;2;55;245;255m\u001B[48;2;49;223;247m\u2580\u001B[38;2;50;226;247m\u001B[48;2;55;244;255m\u2580\u001B[0m\n\u001B[38;2;52;234;251m\u001B[48;2;49;225;246m\u2580\u001B[38;2;50;229;248m\u001B[48;2;57;255;255m\u2580\u001B[38;2;52;231;247m\u001B[49m\u2584\u001B[0m \u001B[38;2;51;226;247m\u001B[48;2;51;232;249m\u2580\u001B[38;2;51;228;249m\u001B[48;2;60;229;249m\u2580\u001B[38;2;0;199;231m\u001B[49m\u2584\u001B[38;2;1;205;234m\u001B[48;2;2;206;235m\u2580\u001B[38;2;0;213;244m\u001B[49m\u2580\u001B[38;2;0;197;228m\u001B[48;2;0;207;238m\u2580\u001B[38;2;1;214;242m\u001B[48;2;0;209;238m\u2580\u001B[38;2;1;213;242m\u001B[48;2;0;201;230m\u2580\u001B[38;2;0;205;232m\u001B[48;2;1;214;242m\u2580\u001B[38;2;0;212;240m\u001B[48;2;1;215;243m\u2580\u001B[38;2;0;205;234m\u001B[48;2;0;202;234m\u2580\u001B[38;2;0;213;243m\u001B[49m\u2580\u001B[38;2;1;204;234m\u001B[48;2;2;207;236m\u2580\u001B[38;2;0;199;230m\u001B[49m\u2584\u001B[38;2;50;229;249m\u001B[48;2;58;232;249m\u2580\u001B[38;2;50;225;247m\u001B[48;2;51;234;250m\u2580\u001B[0m \u001B[38;2;51;230;248m\u2584\u001B[38;2;51;229;248m\u001B[48;2;57;255;255m\u2580\u001B[38;2;52;234;251m\u001B[48;2;50;225;246m\u2580\u001B[0m\n\u001B[0m \u001B[38;2;51;230;248m\u2580\u001B[38;2;58;255;255m\u001B[48;2;50;228;247m\u2580\u001B[38;2;53;233;251m\u001B[48;2;52;236;252m\u2580\u001B[38;2;54;241;255m\u001B[49m\u2584\u001B[38;2;52;230;249m\u2584\u001B[38;2;51;226;249m\u2584\u001B[38;2;50;225;246m\u001B[48;2;52;229;249m\u2580\u001B[38;2;55;249;255m\u001B[48;2;51;233;251m\u2580\u001B[0m \u001B[38;2;0;204;233m\u001B[48;2;0;204;234m\u2580\u001B[38;2;1;206;236m\u001B[48;2;1;205;234m\u2580\u001B[38;2;0;208;237m\u001B[48;2;0;208;237m\u2580\u001B[38;2;1;205;233m\u001B[48;2;1;209;239m\u2580\u001B[38;2;0;207;236m\u001B[49m\u2584\u001B[38;2;0;209;236m\u001B[48;2;0;205;233m\u2580\u001B[38;2;0;213;242m\u001B[48;2;0;205;235m\u2580\u001B[38;2;0;205;235m\u001B[48;2;1;229;255m\u2580\u001B[38;2;1;220;248m\u001B[48;2;1;227;255m\u2580\u001B[38;2;0;205;234m\u001B[48;2;0;208;233m\u2580\u001B[38;2;1;206;235m\u001B[48;2;1;206;235m\u2580\u001B[38;2;0;204;233m\u001B[48;2;0;205;234m\u2580\u001B[0m \u001B[38;2;55;250;255m\u001B[48;2;51;232;251m\u2580\u001B[38;2;50;228;247m\u001B[48;2;51;229;249m\u2580\u001B[38;2;49;225;247m\u001B[49m\u2584\u001B[38;2;51;233;249m\u2584\u001B[38;2;55;244;255m\u2584\u001B[38;2;53;233;252m\u001B[48;2;53;235;252m\u2580\u001B[38;2;58;255;255m\u001B[48;2;51;228;246m\u2580\u001B[38;2;51;228;247m\u001B[49m\u2580\u001B[0m\n\u001B[0m \u001B[38;2;51;234;250m\u2580\u001B[38;2;52;233;251m\u2580\u001B[38;2;54;239;255m\u001B[48;2;51;231;250m\u2580\u001B[38;2;53;235;255m\u001B[48;2;53;236;253m\u2580\u001B[38;2;51;233;254m\u001B[48;2;49;227;248m\u2580\u001B[0m \u001B[38;2;0;205;234m\u2580\u001B[38;2;1;206;234m\u001B[48;2;1;205;234m\u2580\u001B[0m \u001B[38;2;1;230;255m\u001B[48;2;0;205;232m\u2580\u001B[38;2;1;236;255m\u001B[48;2;1;223;249m\u2580\u001B[38;2;0;207;235m\u001B[48;2;0;206;234m\u2580\u001B[38;2;0;205;236m\u001B[48;2;0;204;233m\u2580\u001B[38;2;1;231;255m\u001B[48;2;1;222;249m\u2580\u001B[38;2;1;224;255m\u001B[48;2;0;206;234m\u2580\u001B[0m \u001B[38;2;1;205;234m\u001B[48;2;1;206;235m\u2580\u001B[38;2;0;204;234m\u001B[48;2;0;200;230m\u2580\u001B[0m \u001B[38;2;51;232;253m\u001B[48;2;49;227;247m\u2580\u001B[38;2;53;235;255m\u001B[48;2;53;236;253m\u2580\u001B[38;2;54;241;255m\u001B[48;2;51;230;248m\u2580\u001B[38;2;52;232;251m\u001B[49m\u2580\u001B[38;2;52;233;252m\u2580\u001B[0m\n\u001B[0m \u001B[38;2;51;226;247m\u001B[48;2;51;228;248m\u2580\u001B[38;2;51;230;249m\u001B[48;2;50;227;246m\u2580\u001B[0m \u001B[38;2;1;206;236m\u2580\u001B[38;2;1;219;246m\u001B[48;2;1;208;237m\u2580\u001B[38;2;0;209;240m\u001B[48;2;1;242;255m\u2580\u001B[38;2;1;211;241m\u001B[49m\u2584\u001B[38;2;0;205;234m\u2584\u2584\u001B[38;2;1;211;241m\u2584\u001B[38;2;0;208;238m\u001B[48;2;1;242;255m\u2580\u001B[38;2;1;220;246m\u001B[48;2;1;208;237m\u2580\u001B[38;2;1;207;234m\u001B[49m\u2580\u001B[0m \u001B[38;2;51;228;248m\u001B[48;2;51;228;248m\u2580\u001B[38;2;51;226;247m\u2580\u001B[0m\n\u001B[0m \u001B[38;2;50;227;247m\u001B[48;2;51;228;248m\u2580\u001B[38;2;50;227;248m\u001B[48;2;50;229;248m\u2580\u001B[0m \u001B[38;2;2;208;238m\u2580\u001B[38;2;2;212;241m\u2580\u001B[38;2;2;210;239m\u2580\u001B[38;2;2;209;239m\u2580\u001B[38;2;2;211;241m\u2580\u001B[38;2;2;211;239m\u2580\u001B[0m \u001B[38;2;51;227;247m\u001B[48;2;51;228;247m\u2580\u001B[38;2;51;227;248m\u001B[48;2;50;229;248m\u2580\u001B[0m\n\u001B[0m \u001B[38;2;50;227;247m\u001B[48;2;50;228;247m\u2580\u001B[38;2;51;224;247m\u001B[48;2;54;239;251m\u2580\u001B[0m \u001B[38;2;51;230;250m\u2584\u001B[38;2;54;242;255m\u2584\u001B[38;2;53;240;253m\u001B[48;2;53;238;251m\u2580\u001B[38;2;52;228;247m\u001B[48;2;49;225;245m\u2580\u001B[38;2;52;229;249m\u001B[48;2;52;228;248m\u2580\u001B[38;2;53;238;252m\u001B[48;2;53;240;251m\u2580\u001B[38;2;53;237;252m\u001B[49m\u2584\u001B[38;2;51;231;250m\u2584\u001B[0m \u001B[38;2;51;225;247m\u001B[48;2;55;245;255m\u2580\u001B[38;2;50;227;247m\u001B[48;2;50;227;249m\u2580\u001B[0m\n\u001B[0m \u001B[38;2;53;238;251m\u001B[48;2;48;219;246m\u2580\u001B[38;2;52;233;252m\u001B[48;2;52;236;252m\u2580\u001B[38;2;50;227;247m\u001B[48;2;53;239;255m\u2580\u001B[38;2;51;228;248m\u001B[48;2;52;234;253m\u2580\u001B[38;2;52;232;250m\u001B[48;2;52;233;250m\u2580\u001B[38;2;55;244;255m\u001B[48;2;51;226;245m\u2580\u001B[38;2;53;234;251m\u001B[49m\u2580\u001B[0m \u001B[38;2;52;233;250m\u2580\u001B[38;2;56;249;255m\u001B[48;2;51;229;247m\u2580\u001B[38;2;51;232;250m\u001B[48;2;52;234;250m\u2580\u001B[38;2;50;226;247m\u001B[48;2;52;233;252m\u2580\u001B[38;2;51;225;245m\u001B[48;2;54;241;255m\u2580\u001B[38;2;52;234;251m\u001B[48;2;53;236;252m\u2580\u001B[38;2;53;237;251m\u001B[48;2;50;218;245m\u2580\u001B[0m";
|
|
3
|
+
/** Monochrome silhouette (glyphs only); colorized at runtime for non-truecolor terminals. */
|
|
4
|
+
export declare const BUNDLE_DROP_LOGO_MONO = " \u2588\u2588\u2588\u2588\u2588\u2584\u2584 \u2584\u2584\u2588\u2588\u2588\u2588\u2588\n \u2588\u2588 \u2580\u2588\u2588\u2584\u2584\u2588\u2588\u2580 \u2588\u2588\n \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588\n \u2588\u2588 \u2584\u2588\u2588 \u2588\u2588\u2584 \u2588\u2588\n \u2584\u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2580 \u2588\u2588 \u2580\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2584\u2584\u2584\n \u2584\u2588\u2588\u2580\u2580\u2580\u2588\u2588\u2584\u2588\u2588 \u2584\u2588\u2588\u2588\u2588\u2584 \u2588\u2588\u2584\u2588\u2580 \u2580\u2580\u2588\u2588\u2584\n\u2588\u2588\u2580 \u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2580\u2588\u2588 \u2588\u2588\u2588 \u2580\u2588\u2588\n\u2588\u2588\u2584 \u2588\u2588\u2584\u2588\u2580\u2588\u2588\u2588\u2588\u2588\u2588\u2580\u2588\u2584\u2588\u2588 \u2584\u2588\u2588\n \u2580\u2588\u2588\u2584\u2584\u2584\u2588\u2588 \u2588\u2588\u2588\u2588\u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2584\u2584\u2584\u2588\u2588\u2580\n \u2580\u2580\u2588\u2588\u2588 \u2580\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2580\u2580\n \u2588\u2588 \u2580\u2588\u2588\u2584\u2584\u2584\u2584\u2588\u2588\u2580 \u2588\u2588\n \u2588\u2588 \u2580\u2580\u2580\u2580\u2580\u2580 \u2588\u2588\n \u2588\u2588 \u2584\u2584\u2588\u2588\u2588\u2588\u2584\u2584 \u2588\u2588\n \u2588\u2588\u2588\u2588\u2588\u2588\u2580 \u2580\u2588\u2588\u2588\u2588\u2588\u2588";
|
|
5
|
+
/**
|
|
6
|
+
* Builds the CLI banner. Truecolor terminals get the full-color logo; every
|
|
7
|
+
* other terminal falls back to a cyan silhouette so the banner still renders.
|
|
8
|
+
*/
|
|
9
|
+
export declare const buildBundleDropLogo: () => string;
|
package/lib/CLI/logo.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// AUTO-GENERATED from bundle-drop-logo-no-bg.png (half-block render, width 32).
|
|
3
|
+
// The string constants below are generated; regenerate rather than hand-editing them.
|
|
4
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6
|
+
};
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.buildBundleDropLogo = exports.BUNDLE_DROP_LOGO_MONO = exports.BUNDLE_DROP_LOGO_TRUECOLOR = void 0;
|
|
9
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
10
|
+
const figures_1 = __importDefault(require("figures"));
|
|
11
|
+
/** 24-bit truecolor half-block render of the Bundle Drop logo. */
|
|
12
|
+
exports.BUNDLE_DROP_LOGO_TRUECOLOR = "\u001b[0m \u001b[38;2;49;219;247m\u001b[48;2;53;239;251m\u2580\u001b[38;2;53;236;252m\u001b[48;2;52;233;251m\u2580\u001b[38;2;54;243;255m\u001b[48;2;49;225;247m\u2580\u001b[38;2;52;232;250m\u001b[48;2;51;229;249m\u2580\u001b[38;2;51;233;251m\u001b[48;2;53;238;255m\u2580\u001b[38;2;52;235;252m\u001b[49m\u2584\u001b[38;2;51;231;250m\u2584\u001b[0m \u001b[38;2;52;231;249m\u2584\u001b[38;2;52;235;252m\u2584\u001b[38;2;52;233;251m\u001b[48;2;53;238;255m\u2580\u001b[38;2;51;232;250m\u001b[48;2;51;228;248m\u2580\u001b[38;2;55;243;255m\u001b[48;2;51;225;247m\u2580\u001b[38;2;52;236;252m\u001b[48;2;52;232;251m\u2580\u001b[38;2;50;220;243m\u001b[48;2;53;238;251m\u2580\u001b[0m\n\u001b[0m \u001b[38;2;51;227;249m\u001b[48;2;51;227;248m\u2580\u001b[38;2;54;240;253m\u001b[48;2;50;226;246m\u2580\u001b[0m \u001b[38;2;52;233;251m\u2580\u001b[38;2;58;255;255m\u001b[48;2;50;229;248m\u2580\u001b[38;2;52;236;250m\u001b[48;2;54;241;251m\u2580\u001b[38;2;51;232;251m\u001b[49m\u2584\u001b[38;2;51;231;249m\u2584\u001b[38;2;53;236;250m\u001b[48;2;54;241;252m\u2580\u001b[38;2;57;255;255m\u001b[48;2;52;231;249m\u2580\u001b[38;2;51;233;250m\u001b[49m\u2580\u001b[0m \u001b[38;2;55;246;255m\u001b[48;2;50;225;247m\u2580\u001b[38;2;51;228;248m\u001b[48;2;51;227;247m\u2580\u001b[0m\n\u001b[0m \u001b[38;2;51;228;248m\u001b[48;2;51;228;248m\u2580\u001b[38;2;50;228;247m\u001b[48;2;50;229;248m\u2580\u001b[0m \u001b[38;2;46;212;243m\u001b[48;2;53;240;252m\u2580\u001b[38;2;55;247;255m\u001b[48;2;51;232;251m\u2580\u001b[38;2;57;253;255m\u001b[48;2;52;233;252m\u2580\u001b[38;2;47;216;245m\u001b[48;2;54;239;251m\u2580\u001b[0m \u001b[38;2;51;227;247m\u001b[48;2;50;227;246m\u2580\u001b[38;2;50;227;248m\u001b[48;2;51;227;247m\u2580\u001b[0m\n\u001b[0m \u001b[38;2;51;227;247m\u001b[48;2;49;227;247m\u2580\u001b[38;2;51;226;248m\u001b[48;2;53;237;253m\u2580\u001b[0m \u001b[38;2;52;232;249m\u2584\u001b[38;2;52;234;251m\u001b[48;2;56;251;255m\u2580\u001b[38;2;54;240;251m\u001b[48;2;48;218;243m\u2580\u001b[0m \u001b[38;2;54;241;251m\u001b[48;2;48;221;243m\u2580\u001b[38;2;52;234;251m\u001b[48;2;57;252;255m\u2580\u001b[38;2;52;231;249m\u001b[49m\u2584\u001b[0m \u001b[38;2;51;228;248m\u001b[48;2;54;242;255m\u2580\u001b[38;2;50;227;248m\u001b[48;2;51;226;249m\u2580\u001b[0m\n\u001b[0m \u001b[38;2;52;233;251m\u2584\u001b[38;2;52;233;250m\u2584\u001b[38;2;51;232;250m\u001b[48;2;54;241;255m\u2580\u001b[38;2;54;239;253m\u001b[48;2;52;231;251m\u2580\u001b[38;2;51;228;248m\u001b[48;2;51;229;248m\u2580\u001b[38;2;51;228;247m\u001b[48;2;51;228;249m\u2580\u001b[38;2;51;229;248m\u001b[48;2;51;228;248m\u2580\u001b[38;2;51;227;248m\u001b[48;2;54;242;255m\u2580\u001b[38;2;57;254;255m\u001b[48;2;49;228;248m\u2580\u001b[38;2;49;224;246m\u001b[49m\u2580\u001b[0m \u001b[38;2;2;205;235m\u001b[48;2;1;209;238m\u2580\u001b[38;2;2;203;233m\u2580\u001b[0m \u001b[38;2;48;224;246m\u2580\u001b[38;2;57;253;255m\u001b[48;2;51;226;248m\u2580\u001b[38;2;50;227;248m\u001b[48;2;55;244;255m\u2580\u001b[38;2;51;228;248m\u001b[48;2;50;226;246m\u2580\u001b[48;2;51;228;249m\u2580\u001b[38;2;50;227;247m\u001b[48;2;51;227;247m\u2580\u001b[38;2;53;237;252m\u001b[48;2;51;230;250m\u2580\u001b[38;2;52;231;250m\u001b[48;2;53;239;255m\u2580\u001b[38;2;52;232;250m\u001b[49m\u2584\u001b[38;2;52;234;251m\u2584\u001b[38;2;49;230;250m\u2584\u001b[0m\n\u001b[0m \u001b[38;2;52;234;249m\u2584\u001b[38;2;51;232;249m\u001b[48;2;56;251;255m\u2580\u001b[38;2;55;247;255m\u001b[48;2;51;232;250m\u2580\u001b[38;2;52;233;251m\u001b[49m\u2580\u001b[38;2;51;233;251m\u2580\u001b[38;2;51;224;246m\u2580\u001b[38;2;50;230;248m\u001b[48;2;52;228;246m\u2580\u001b[38;2;52;234;251m\u001b[48;2;54;241;255m\u2580\u001b[38;2;49;224;247m\u001b[49m\u2584\u001b[38;2;50;226;246m\u001b[48;2;53;238;255m\u2580\u001b[38;2;54;241;252m\u001b[48;2;49;224;246m\u2580\u001b[0m \u001b[38;2;1;205;233m\u2584\u001b[38;2;1;207;236m\u001b[48;2;1;220;251m\u2580\u001b[38;2;1;213;243m\u001b[48;2;1;214;244m\u2580\u001b[38;2;1;212;242m\u001b[48;2;1;217;247m\u2580\u001b[38;2;1;206;236m\u001b[48;2;1;221;252m\u2580\u001b[38;2;1;203;234m\u001b[49m\u2584\u001b[0m \u001b[38;2;54;241;251m\u001b[48;2;49;223;246m\u2580\u001b[38;2;50;226;247m\u001b[48;2;54;239;255m\u2580\u001b[38;2;50;226;248m\u001b[49m\u2584\u001b[38;2;52;236;251m\u001b[48;2;53;239;255m\u2580\u001b[38;2;51;229;248m\u001b[49m\u2580\u001b[0m \u001b[38;2;51;234;251m\u2580\u001b[38;2;52;233;250m\u2580\u001b[38;2;56;249;255m\u001b[48;2;51;232;250m\u2580\u001b[38;2;51;234;250m\u001b[48;2;56;249;255m\u2580\u001b[38;2;52;235;251m\u001b[49m\u2584\u001b[0m\n\u001b[38;2;50;226;247m\u001b[48;2;54;243;255m\u2580\u001b[38;2;55;244;255m\u001b[48;2;50;226;247m\u2580\u001b[38;2;51;227;247m\u001b[49m\u2580\u001b[0m \u001b[38;2;50;226;247m\u001b[48;2;51;230;248m\u2580\u001b[38;2;56;251;255m\u001b[48;2;57;255;255m\u2580\u001b[38;2;50;229;249m\u001b[48;2;56;230;247m\u2580\u001b[0m \u001b[38;2;3;200;231m\u001b[48;2;2;212;241m\u2580\u001b[38;2;1;230;255m\u001b[48;2;1;218;247m\u2580\u001b[38;2;1;217;248m\u001b[48;2;0;206;233m\u2580\u001b[38;2;1;205;233m\u001b[48;2;0;210;240m\u2580\u001b[38;2;1;205;234m\u001b[48;2;0;208;237m\u2580\u001b[38;2;1;212;242m\u001b[49m\u2580\u001b[38;2;1;232;255m\u001b[48;2;1;219;248m\u2580\u001b[38;2;3;204;234m\u001b[48;2;2;212;241m\u2580\u001b[0m \u001b[38;2;50;229;249m\u001b[48;2;55;230;248m\u2580\u001b[38;2;57;254;255m\u001b[48;2;57;254;255m\u2580\u001b[38;2;51;226;247m\u001b[48;2;51;227;249m\u2580\u001b[0m \u001b[38;2;50;224;247m\u2580\u001b[38;2;55;245;255m\u001b[48;2;49;223;247m\u2580\u001b[38;2;50;226;247m\u001b[48;2;55;244;255m\u2580\u001b[0m\n\u001b[38;2;52;234;251m\u001b[48;2;49;225;246m\u2580\u001b[38;2;50;229;248m\u001b[48;2;57;255;255m\u2580\u001b[38;2;52;231;247m\u001b[49m\u2584\u001b[0m \u001b[38;2;51;226;247m\u001b[48;2;51;232;249m\u2580\u001b[38;2;51;228;249m\u001b[48;2;60;229;249m\u2580\u001b[38;2;0;199;231m\u001b[49m\u2584\u001b[38;2;1;205;234m\u001b[48;2;2;206;235m\u2580\u001b[38;2;0;213;244m\u001b[49m\u2580\u001b[38;2;0;197;228m\u001b[48;2;0;207;238m\u2580\u001b[38;2;1;214;242m\u001b[48;2;0;209;238m\u2580\u001b[38;2;1;213;242m\u001b[48;2;0;201;230m\u2580\u001b[38;2;0;205;232m\u001b[48;2;1;214;242m\u2580\u001b[38;2;0;212;240m\u001b[48;2;1;215;243m\u2580\u001b[38;2;0;205;234m\u001b[48;2;0;202;234m\u2580\u001b[38;2;0;213;243m\u001b[49m\u2580\u001b[38;2;1;204;234m\u001b[48;2;2;207;236m\u2580\u001b[38;2;0;199;230m\u001b[49m\u2584\u001b[38;2;50;229;249m\u001b[48;2;58;232;249m\u2580\u001b[38;2;50;225;247m\u001b[48;2;51;234;250m\u2580\u001b[0m \u001b[38;2;51;230;248m\u2584\u001b[38;2;51;229;248m\u001b[48;2;57;255;255m\u2580\u001b[38;2;52;234;251m\u001b[48;2;50;225;246m\u2580\u001b[0m\n\u001b[0m \u001b[38;2;51;230;248m\u2580\u001b[38;2;58;255;255m\u001b[48;2;50;228;247m\u2580\u001b[38;2;53;233;251m\u001b[48;2;52;236;252m\u2580\u001b[38;2;54;241;255m\u001b[49m\u2584\u001b[38;2;52;230;249m\u2584\u001b[38;2;51;226;249m\u2584\u001b[38;2;50;225;246m\u001b[48;2;52;229;249m\u2580\u001b[38;2;55;249;255m\u001b[48;2;51;233;251m\u2580\u001b[0m \u001b[38;2;0;204;233m\u001b[48;2;0;204;234m\u2580\u001b[38;2;1;206;236m\u001b[48;2;1;205;234m\u2580\u001b[38;2;0;208;237m\u001b[48;2;0;208;237m\u2580\u001b[38;2;1;205;233m\u001b[48;2;1;209;239m\u2580\u001b[38;2;0;207;236m\u001b[49m\u2584\u001b[38;2;0;209;236m\u001b[48;2;0;205;233m\u2580\u001b[38;2;0;213;242m\u001b[48;2;0;205;235m\u2580\u001b[38;2;0;205;235m\u001b[48;2;1;229;255m\u2580\u001b[38;2;1;220;248m\u001b[48;2;1;227;255m\u2580\u001b[38;2;0;205;234m\u001b[48;2;0;208;233m\u2580\u001b[38;2;1;206;235m\u001b[48;2;1;206;235m\u2580\u001b[38;2;0;204;233m\u001b[48;2;0;205;234m\u2580\u001b[0m \u001b[38;2;55;250;255m\u001b[48;2;51;232;251m\u2580\u001b[38;2;50;228;247m\u001b[48;2;51;229;249m\u2580\u001b[38;2;49;225;247m\u001b[49m\u2584\u001b[38;2;51;233;249m\u2584\u001b[38;2;55;244;255m\u2584\u001b[38;2;53;233;252m\u001b[48;2;53;235;252m\u2580\u001b[38;2;58;255;255m\u001b[48;2;51;228;246m\u2580\u001b[38;2;51;228;247m\u001b[49m\u2580\u001b[0m\n\u001b[0m \u001b[38;2;51;234;250m\u2580\u001b[38;2;52;233;251m\u2580\u001b[38;2;54;239;255m\u001b[48;2;51;231;250m\u2580\u001b[38;2;53;235;255m\u001b[48;2;53;236;253m\u2580\u001b[38;2;51;233;254m\u001b[48;2;49;227;248m\u2580\u001b[0m \u001b[38;2;0;205;234m\u2580\u001b[38;2;1;206;234m\u001b[48;2;1;205;234m\u2580\u001b[0m \u001b[38;2;1;230;255m\u001b[48;2;0;205;232m\u2580\u001b[38;2;1;236;255m\u001b[48;2;1;223;249m\u2580\u001b[38;2;0;207;235m\u001b[48;2;0;206;234m\u2580\u001b[38;2;0;205;236m\u001b[48;2;0;204;233m\u2580\u001b[38;2;1;231;255m\u001b[48;2;1;222;249m\u2580\u001b[38;2;1;224;255m\u001b[48;2;0;206;234m\u2580\u001b[0m \u001b[38;2;1;205;234m\u001b[48;2;1;206;235m\u2580\u001b[38;2;0;204;234m\u001b[48;2;0;200;230m\u2580\u001b[0m \u001b[38;2;51;232;253m\u001b[48;2;49;227;247m\u2580\u001b[38;2;53;235;255m\u001b[48;2;53;236;253m\u2580\u001b[38;2;54;241;255m\u001b[48;2;51;230;248m\u2580\u001b[38;2;52;232;251m\u001b[49m\u2580\u001b[38;2;52;233;252m\u2580\u001b[0m\n\u001b[0m \u001b[38;2;51;226;247m\u001b[48;2;51;228;248m\u2580\u001b[38;2;51;230;249m\u001b[48;2;50;227;246m\u2580\u001b[0m \u001b[38;2;1;206;236m\u2580\u001b[38;2;1;219;246m\u001b[48;2;1;208;237m\u2580\u001b[38;2;0;209;240m\u001b[48;2;1;242;255m\u2580\u001b[38;2;1;211;241m\u001b[49m\u2584\u001b[38;2;0;205;234m\u2584\u2584\u001b[38;2;1;211;241m\u2584\u001b[38;2;0;208;238m\u001b[48;2;1;242;255m\u2580\u001b[38;2;1;220;246m\u001b[48;2;1;208;237m\u2580\u001b[38;2;1;207;234m\u001b[49m\u2580\u001b[0m \u001b[38;2;51;228;248m\u001b[48;2;51;228;248m\u2580\u001b[38;2;51;226;247m\u2580\u001b[0m\n\u001b[0m \u001b[38;2;50;227;247m\u001b[48;2;51;228;248m\u2580\u001b[38;2;50;227;248m\u001b[48;2;50;229;248m\u2580\u001b[0m \u001b[38;2;2;208;238m\u2580\u001b[38;2;2;212;241m\u2580\u001b[38;2;2;210;239m\u2580\u001b[38;2;2;209;239m\u2580\u001b[38;2;2;211;241m\u2580\u001b[38;2;2;211;239m\u2580\u001b[0m \u001b[38;2;51;227;247m\u001b[48;2;51;228;247m\u2580\u001b[38;2;51;227;248m\u001b[48;2;50;229;248m\u2580\u001b[0m\n\u001b[0m \u001b[38;2;50;227;247m\u001b[48;2;50;228;247m\u2580\u001b[38;2;51;224;247m\u001b[48;2;54;239;251m\u2580\u001b[0m \u001b[38;2;51;230;250m\u2584\u001b[38;2;54;242;255m\u2584\u001b[38;2;53;240;253m\u001b[48;2;53;238;251m\u2580\u001b[38;2;52;228;247m\u001b[48;2;49;225;245m\u2580\u001b[38;2;52;229;249m\u001b[48;2;52;228;248m\u2580\u001b[38;2;53;238;252m\u001b[48;2;53;240;251m\u2580\u001b[38;2;53;237;252m\u001b[49m\u2584\u001b[38;2;51;231;250m\u2584\u001b[0m \u001b[38;2;51;225;247m\u001b[48;2;55;245;255m\u2580\u001b[38;2;50;227;247m\u001b[48;2;50;227;249m\u2580\u001b[0m\n\u001b[0m \u001b[38;2;53;238;251m\u001b[48;2;48;219;246m\u2580\u001b[38;2;52;233;252m\u001b[48;2;52;236;252m\u2580\u001b[38;2;50;227;247m\u001b[48;2;53;239;255m\u2580\u001b[38;2;51;228;248m\u001b[48;2;52;234;253m\u2580\u001b[38;2;52;232;250m\u001b[48;2;52;233;250m\u2580\u001b[38;2;55;244;255m\u001b[48;2;51;226;245m\u2580\u001b[38;2;53;234;251m\u001b[49m\u2580\u001b[0m \u001b[38;2;52;233;250m\u2580\u001b[38;2;56;249;255m\u001b[48;2;51;229;247m\u2580\u001b[38;2;51;232;250m\u001b[48;2;52;234;250m\u2580\u001b[38;2;50;226;247m\u001b[48;2;52;233;252m\u2580\u001b[38;2;51;225;245m\u001b[48;2;54;241;255m\u2580\u001b[38;2;52;234;251m\u001b[48;2;53;236;252m\u2580\u001b[38;2;53;237;251m\u001b[48;2;50;218;245m\u2580\u001b[0m";
|
|
13
|
+
/** Monochrome silhouette (glyphs only); colorized at runtime for non-truecolor terminals. */
|
|
14
|
+
exports.BUNDLE_DROP_LOGO_MONO = " \u2588\u2588\u2588\u2588\u2588\u2584\u2584 \u2584\u2584\u2588\u2588\u2588\u2588\u2588\n \u2588\u2588 \u2580\u2588\u2588\u2584\u2584\u2588\u2588\u2580 \u2588\u2588\n \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588\n \u2588\u2588 \u2584\u2588\u2588 \u2588\u2588\u2584 \u2588\u2588\n \u2584\u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2580 \u2588\u2588 \u2580\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2584\u2584\u2584\n \u2584\u2588\u2588\u2580\u2580\u2580\u2588\u2588\u2584\u2588\u2588 \u2584\u2588\u2588\u2588\u2588\u2584 \u2588\u2588\u2584\u2588\u2580 \u2580\u2580\u2588\u2588\u2584\n\u2588\u2588\u2580 \u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2580\u2588\u2588 \u2588\u2588\u2588 \u2580\u2588\u2588\n\u2588\u2588\u2584 \u2588\u2588\u2584\u2588\u2580\u2588\u2588\u2588\u2588\u2588\u2588\u2580\u2588\u2584\u2588\u2588 \u2584\u2588\u2588\n \u2580\u2588\u2588\u2584\u2584\u2584\u2588\u2588 \u2588\u2588\u2588\u2588\u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2584\u2584\u2584\u2588\u2588\u2580\n \u2580\u2580\u2588\u2588\u2588 \u2580\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2580\u2580\n \u2588\u2588 \u2580\u2588\u2588\u2584\u2584\u2584\u2584\u2588\u2588\u2580 \u2588\u2588\n \u2588\u2588 \u2580\u2580\u2580\u2580\u2580\u2580 \u2588\u2588\n \u2588\u2588 \u2584\u2584\u2588\u2588\u2588\u2588\u2584\u2584 \u2588\u2588\n \u2588\u2588\u2588\u2588\u2588\u2588\u2580 \u2580\u2588\u2588\u2588\u2588\u2588\u2588";
|
|
15
|
+
/**
|
|
16
|
+
* Builds the CLI banner. Truecolor terminals get the full-color logo; every
|
|
17
|
+
* other terminal falls back to a cyan silhouette so the banner still renders.
|
|
18
|
+
*/
|
|
19
|
+
const buildBundleDropLogo = () => {
|
|
20
|
+
const art = chalk_1.default.level >= 3
|
|
21
|
+
? exports.BUNDLE_DROP_LOGO_TRUECOLOR
|
|
22
|
+
: chalk_1.default.cyanBright(exports.BUNDLE_DROP_LOGO_MONO);
|
|
23
|
+
const title = chalk_1.default.bold.cyanBright(`${figures_1.default.star} React Native Bundle Drop CLI ${figures_1.default.star}`);
|
|
24
|
+
return `\n${art}\n${title}`;
|
|
25
|
+
};
|
|
26
|
+
exports.buildBundleDropLogo = buildBundleDropLogo;
|
|
@@ -35,6 +35,10 @@ const CONTEXT_SUMMARY_SIGNALS = [
|
|
|
35
35
|
'@gfean/react-native-bundle-drop',
|
|
36
36
|
'react-native-bundle-drop',
|
|
37
37
|
'bundle-drop-config',
|
|
38
|
+
'react-native-code-push',
|
|
39
|
+
'CodePush',
|
|
40
|
+
'codepush.gradle',
|
|
41
|
+
'CodePushDeploymentKey',
|
|
38
42
|
'serverUrl',
|
|
39
43
|
'org',
|
|
40
44
|
'project',
|
|
@@ -288,6 +292,24 @@ const detectSignals = (files) => {
|
|
|
288
292
|
signals.push('multipleAndroidEntrypoints');
|
|
289
293
|
if (iosEntrypoints.length > 1)
|
|
290
294
|
signals.push('multipleIosEntrypoints');
|
|
295
|
+
// CodePush migration detection. The native bundle-resolution hooks CodePush
|
|
296
|
+
// overrides (Android getJSBundleFile, iOS bundleURL/sourceURLForBridge) are the
|
|
297
|
+
// exact seams BundleDrop rewrites, so surfacing these lets the planner migrate
|
|
298
|
+
// them and flag the remaining CodePush cleanup.
|
|
299
|
+
const hasCodePushDependency = allContent.includes('react-native-code-push');
|
|
300
|
+
const hasCodePushAndroidOverride = codeContent.includes('CodePush.getJSBundleFile');
|
|
301
|
+
const hasCodePushIosOverride = codeContent.includes('[CodePush bundleURL]') ||
|
|
302
|
+
codeContent.includes('CodePush.bundleURL') ||
|
|
303
|
+
codeContent.includes('CodePushConfig');
|
|
304
|
+
if (hasCodePushDependency)
|
|
305
|
+
signals.push('codePushDependency');
|
|
306
|
+
if (hasCodePushAndroidOverride)
|
|
307
|
+
signals.push('codePushAndroidBundleOverride');
|
|
308
|
+
if (hasCodePushIosOverride)
|
|
309
|
+
signals.push('codePushIosBundleOverride');
|
|
310
|
+
if (hasCodePushDependency || hasCodePushAndroidOverride || hasCodePushIosOverride) {
|
|
311
|
+
signals.push('codePushDetected');
|
|
312
|
+
}
|
|
291
313
|
return {
|
|
292
314
|
rnVersion: null,
|
|
293
315
|
androidLanguage,
|
|
@@ -145,7 +145,7 @@ async function initConfig(params) {
|
|
|
145
145
|
}
|
|
146
146
|
const content = `module.exports = {
|
|
147
147
|
serverUrl: '${resolvedServerUrl}',
|
|
148
|
-
defaultChannel: '
|
|
148
|
+
defaultChannel: 'develop',
|
|
149
149
|
runtimeVersion: {
|
|
150
150
|
ios: '1.0.0',
|
|
151
151
|
android: '1.0.0',
|
|
@@ -158,7 +158,6 @@ async function initConfig(params) {
|
|
|
158
158
|
slug: '${projectSlug}',
|
|
159
159
|
apiKey: '${apiKey.replace(/'/g, "\\'")}',
|
|
160
160
|
},
|
|
161
|
-
debugLocal: false,
|
|
162
161
|
};
|
|
163
162
|
`;
|
|
164
163
|
await fs_extra_1.default.writeFile(configPath, content, 'utf8');
|
package/lib/context.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.config = (0, loadConfig_1.loadConfig)();
|
|
|
11
11
|
exports.platform = react_native_1.Platform.OS === 'ios' ? 'ios' : 'android';
|
|
12
12
|
exports.isIOS = exports.platform === 'ios';
|
|
13
13
|
exports.runtimeVersion = exports.config.runtimeVersion?.[exports.platform];
|
|
14
|
-
exports.defaultChannel = exports.config.defaultChannel || '
|
|
14
|
+
exports.defaultChannel = exports.config.defaultChannel || 'develop';
|
|
15
15
|
exports.BUNDLE_DROP_ROOT = exports.isIOS
|
|
16
16
|
? `${fs_1.default.LibraryDirectoryPath}/bundle-drop`
|
|
17
17
|
: `${fs_1.default.DocumentDirectoryPath}/bundle-drop`;
|
package/lib/loadConfig.d.ts
CHANGED
|
@@ -18,7 +18,11 @@ export type BundleDropProjectConfig = {
|
|
|
18
18
|
/** Optional public API key used by CLI/runtime integrations. */
|
|
19
19
|
apiKey?: string;
|
|
20
20
|
};
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Internal, undocumented escape hatch. When true, routes local dev traffic to
|
|
23
|
+
* emulator/simulator-friendly localhost URLs. Intentionally not written by the
|
|
24
|
+
* CLI template or documented; add it manually only when debugging locally.
|
|
25
|
+
*/
|
|
22
26
|
debugLocal?: boolean;
|
|
23
27
|
/** Native runtime versions for platform compatibility checks. */
|
|
24
28
|
runtimeVersion?: {
|
package/lib/scripts/bundle.js
CHANGED
|
@@ -47,6 +47,8 @@ const path = __importStar(require("path"));
|
|
|
47
47
|
const bundleManifest_1 = require("../manifest/bundleManifest");
|
|
48
48
|
const projectRoot_1 = require("./projectRoot");
|
|
49
49
|
Object.defineProperty(exports, "findProjectRoot", { enumerable: true, get: function () { return projectRoot_1.findProjectRoot; } });
|
|
50
|
+
const SENTRY_HERMES_OTA_DOCS_URL = 'https://bundledrop.app/docs/observability#sentry-and-hermes-ota-builds';
|
|
51
|
+
const SENTRY_DEBUG_ID_MARKERS = ['//# debugId=', 'sentry-dbid-'];
|
|
50
52
|
const getPackageRoot = () => process.env.BUNDLE_DROP_PACKAGE_ROOT_OVERRIDE || path.resolve(__dirname, '..', '..');
|
|
51
53
|
const sha256Buffer = (buffer) => (0, crypto_1.createHash)('sha256').update(buffer).digest('hex');
|
|
52
54
|
const manifestRoleForPath = (filePath) => {
|
|
@@ -132,6 +134,15 @@ const promoteHermesBytecode = (hbcPath, bundlePath) => {
|
|
|
132
134
|
fs.copyFileSync(hbcPath, bundlePath);
|
|
133
135
|
fs.unlinkSync(hbcPath);
|
|
134
136
|
};
|
|
137
|
+
const warnAboutSentryDebugId = (bundlePath, hermesEnabled) => {
|
|
138
|
+
if (!hermesEnabled || !fs.existsSync(bundlePath))
|
|
139
|
+
return;
|
|
140
|
+
const bundleSource = fs.readFileSync(bundlePath, 'utf8');
|
|
141
|
+
const hasSentryDebugId = SENTRY_DEBUG_ID_MARKERS.some(marker => bundleSource.includes(marker));
|
|
142
|
+
if (!hasSentryDebugId)
|
|
143
|
+
return;
|
|
144
|
+
console.warn(`⚠️ Sentry Debug ID detected in a Hermes OTA bundle. Content-derived Debug IDs can increase binary patch sizes. Configure the Sentry Metro wrapper for Bundle Drop OTA builds: ${SENTRY_HERMES_OTA_DOCS_URL}`);
|
|
145
|
+
};
|
|
135
146
|
const detectHermesFromNativeProject = (projectRoot, platform) => {
|
|
136
147
|
if (platform === 'android') {
|
|
137
148
|
return detectBoolean([
|
|
@@ -213,6 +224,7 @@ function runBundleScript(options) {
|
|
|
213
224
|
console.error('❌ BUNDLE_DROP_APP_VERSION is required so bundle-manifest.json can include the app version');
|
|
214
225
|
process.exit(1);
|
|
215
226
|
}
|
|
227
|
+
const hermesEnabled = shouldCompileHermesBytecode(cfg, platform, projectRoot);
|
|
216
228
|
[bundlePath, zipPath, metadataPath, manifestPath, sourceMapPath].forEach(file => {
|
|
217
229
|
if (fs.existsSync(file))
|
|
218
230
|
fs.unlinkSync(file);
|
|
@@ -229,8 +241,15 @@ function runBundleScript(options) {
|
|
|
229
241
|
--entry-file index.js \
|
|
230
242
|
--bundle-output "${bundlePath}" \
|
|
231
243
|
--assets-dest "${assetsDir}" \
|
|
232
|
-
--reset-cache${sourcemapFlag}`, {
|
|
244
|
+
--reset-cache${sourcemapFlag}`, {
|
|
245
|
+
stdio: 'inherit',
|
|
246
|
+
env: {
|
|
247
|
+
...process.env,
|
|
248
|
+
BUNDLE_DROP_OTA_BUILD: '1',
|
|
249
|
+
},
|
|
250
|
+
});
|
|
233
251
|
console.log('✅ Bundle created');
|
|
252
|
+
warnAboutSentryDebugId(bundlePath, hermesEnabled);
|
|
234
253
|
const osBin = process.platform === 'darwin'
|
|
235
254
|
? 'osx-bin'
|
|
236
255
|
: process.platform === 'win32'
|
|
@@ -242,7 +261,6 @@ function runBundleScript(options) {
|
|
|
242
261
|
path.join(projectRoot, 'node_modules', 'hermes-engine', osBin, 'hermesc'),
|
|
243
262
|
];
|
|
244
263
|
const hermescPath = hermesLocations.find(p => fs.existsSync(p));
|
|
245
|
-
const hermesEnabled = shouldCompileHermesBytecode(cfg, platform, projectRoot);
|
|
246
264
|
if (hermesEnabled && hermescPath) {
|
|
247
265
|
const hbcPath = bundlePath + '.hbc';
|
|
248
266
|
try {
|
|
@@ -68,7 +68,7 @@ async function runDownloadBundle(options) {
|
|
|
68
68
|
process.exit(1);
|
|
69
69
|
}
|
|
70
70
|
const runtimeVersion = config?.runtimeVersion?.[platform] || config?.runtimeVersion?.[platform];
|
|
71
|
-
const channelName = argv[3] || config?.defaultChannel || '
|
|
71
|
+
const channelName = argv[3] || config?.defaultChannel || 'develop';
|
|
72
72
|
const resolveEndpoint = `${serverUrl}/projects/${encodeURIComponent(project.slug)}/ota/resolve`;
|
|
73
73
|
const outputPath = path.join(outputDir, `bundle-${platform}.zip`);
|
|
74
74
|
if (!fs.existsSync(outputDir)) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gfean/react-native-bundle-drop",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"nativeVersion": "0.4.2",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Instant over-the-air (OTA) updates for React Native — ship JavaScript & asset fixes with no App Store or Play Store review. Channels, staged rollouts, instant rollback, and hybrid patch-sized delivery. A drop-in CodePush alternative for bare React Native.",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
8
8
|
"author": {
|
|
@@ -123,24 +123,38 @@
|
|
|
123
123
|
"keywords": [
|
|
124
124
|
"react-native",
|
|
125
125
|
"react-native-ota",
|
|
126
|
+
"ota",
|
|
126
127
|
"ota-updates",
|
|
127
128
|
"over-the-air",
|
|
129
|
+
"over-the-air-updates",
|
|
130
|
+
"codepush",
|
|
131
|
+
"codepush-alternative",
|
|
132
|
+
"react-native-code-push",
|
|
133
|
+
"app-center-codepush",
|
|
134
|
+
"eas-update-alternative",
|
|
135
|
+
"expo-updates-alternative",
|
|
136
|
+
"expo-eas-update-alternative",
|
|
128
137
|
"react-native-update",
|
|
129
138
|
"react-native-updates",
|
|
130
|
-
"bundle-updates",
|
|
131
139
|
"hot-update",
|
|
132
|
-
"codepush-alternative",
|
|
133
|
-
"expo-eas-update-alternative",
|
|
134
|
-
"react-native-deployment",
|
|
135
|
-
"mobile-updates",
|
|
136
|
-
"app-updates",
|
|
137
140
|
"live-updates",
|
|
138
|
-
"
|
|
141
|
+
"instant-updates",
|
|
142
|
+
"hotfix",
|
|
143
|
+
"bundle-updates",
|
|
144
|
+
"js-bundle",
|
|
145
|
+
"delta-updates",
|
|
146
|
+
"patch-updates",
|
|
139
147
|
"staged-rollout",
|
|
148
|
+
"feature-rollout",
|
|
140
149
|
"rollback",
|
|
141
|
-
"react-native-
|
|
150
|
+
"react-native-deployment",
|
|
142
151
|
"react-native-release",
|
|
143
|
-
"react-native-
|
|
152
|
+
"react-native-ci",
|
|
153
|
+
"react-native-production",
|
|
154
|
+
"mobile-updates",
|
|
155
|
+
"app-updates",
|
|
156
|
+
"react-native-ios",
|
|
157
|
+
"react-native-android"
|
|
144
158
|
],
|
|
145
159
|
"peerDependencies": {
|
|
146
160
|
"react": ">=17.0.0",
|