@scalebun-release/cli 2.5.0
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/bin/scalebun.js +2 -0
- package/lib/api/client.d.ts +52 -0
- package/lib/api/client.d.ts.map +1 -0
- package/lib/api/client.js +335 -0
- package/lib/api/client.js.map +1 -0
- package/lib/commands/ci-init.d.ts +3 -0
- package/lib/commands/ci-init.d.ts.map +1 -0
- package/lib/commands/ci-init.js +348 -0
- package/lib/commands/ci-init.js.map +1 -0
- package/lib/commands/doctor.d.ts +31 -0
- package/lib/commands/doctor.d.ts.map +1 -0
- package/lib/commands/doctor.js +559 -0
- package/lib/commands/doctor.js.map +1 -0
- package/lib/commands/launch.d.ts +3 -0
- package/lib/commands/launch.d.ts.map +1 -0
- package/lib/commands/launch.js +23 -0
- package/lib/commands/launch.js.map +1 -0
- package/lib/commands/link.d.ts +16 -0
- package/lib/commands/link.d.ts.map +1 -0
- package/lib/commands/link.js +164 -0
- package/lib/commands/link.js.map +1 -0
- package/lib/commands/login.d.ts +12 -0
- package/lib/commands/login.d.ts.map +1 -0
- package/lib/commands/login.js +124 -0
- package/lib/commands/login.js.map +1 -0
- package/lib/commands/migrate-codepush.d.ts +13 -0
- package/lib/commands/migrate-codepush.d.ts.map +1 -0
- package/lib/commands/migrate-codepush.js +98 -0
- package/lib/commands/migrate-codepush.js.map +1 -0
- package/lib/commands/ota-bundle.d.ts +22 -0
- package/lib/commands/ota-bundle.d.ts.map +1 -0
- package/lib/commands/ota-bundle.js +253 -0
- package/lib/commands/ota-bundle.js.map +1 -0
- package/lib/commands/ota-channels.d.ts +3 -0
- package/lib/commands/ota-channels.d.ts.map +1 -0
- package/lib/commands/ota-channels.js +231 -0
- package/lib/commands/ota-channels.js.map +1 -0
- package/lib/commands/ota-delete-bundle.d.ts +16 -0
- package/lib/commands/ota-delete-bundle.d.ts.map +1 -0
- package/lib/commands/ota-delete-bundle.js +96 -0
- package/lib/commands/ota-delete-bundle.js.map +1 -0
- package/lib/commands/ota-inspect.d.ts +3 -0
- package/lib/commands/ota-inspect.d.ts.map +1 -0
- package/lib/commands/ota-inspect.js +258 -0
- package/lib/commands/ota-inspect.js.map +1 -0
- package/lib/commands/ota-keys.d.ts +91 -0
- package/lib/commands/ota-keys.d.ts.map +1 -0
- package/lib/commands/ota-keys.js +765 -0
- package/lib/commands/ota-keys.js.map +1 -0
- package/lib/commands/ota-promote.d.ts +3 -0
- package/lib/commands/ota-promote.d.ts.map +1 -0
- package/lib/commands/ota-promote.js +194 -0
- package/lib/commands/ota-promote.js.map +1 -0
- package/lib/commands/ota-publish.d.ts +26 -0
- package/lib/commands/ota-publish.d.ts.map +1 -0
- package/lib/commands/ota-publish.js +892 -0
- package/lib/commands/ota-publish.js.map +1 -0
- package/lib/commands/ota-rollout.d.ts +3 -0
- package/lib/commands/ota-rollout.d.ts.map +1 -0
- package/lib/commands/ota-rollout.js +265 -0
- package/lib/commands/ota-rollout.js.map +1 -0
- package/lib/commands/ota-sign.d.ts +19 -0
- package/lib/commands/ota-sign.d.ts.map +1 -0
- package/lib/commands/ota-sign.js +245 -0
- package/lib/commands/ota-sign.js.map +1 -0
- package/lib/commands/push-apns.d.ts +3 -0
- package/lib/commands/push-apns.d.ts.map +1 -0
- package/lib/commands/push-apns.js +166 -0
- package/lib/commands/push-apns.js.map +1 -0
- package/lib/commands/quickstart.d.ts +4 -0
- package/lib/commands/quickstart.d.ts.map +1 -0
- package/lib/commands/quickstart.js +672 -0
- package/lib/commands/quickstart.js.map +1 -0
- package/lib/commands/shell.d.ts +28 -0
- package/lib/commands/shell.d.ts.map +1 -0
- package/lib/commands/shell.js +512 -0
- package/lib/commands/shell.js.map +1 -0
- package/lib/commands/tls-pins.d.ts +27 -0
- package/lib/commands/tls-pins.d.ts.map +1 -0
- package/lib/commands/tls-pins.js +209 -0
- package/lib/commands/tls-pins.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +233 -0
- package/lib/index.js.map +1 -0
- package/lib/ui/banner.d.ts +23 -0
- package/lib/ui/banner.d.ts.map +1 -0
- package/lib/ui/banner.js +162 -0
- package/lib/ui/banner.js.map +1 -0
- package/lib/ui/graphics.d.ts +18 -0
- package/lib/ui/graphics.d.ts.map +1 -0
- package/lib/ui/graphics.js +134 -0
- package/lib/ui/graphics.js.map +1 -0
- package/lib/ui/mark.d.ts +4 -0
- package/lib/ui/mark.d.ts.map +1 -0
- package/lib/ui/mark.js +21 -0
- package/lib/ui/mark.js.map +1 -0
- package/lib/ui/menu.d.ts +109 -0
- package/lib/ui/menu.d.ts.map +1 -0
- package/lib/ui/menu.js +314 -0
- package/lib/ui/menu.js.map +1 -0
- package/lib/ui/sixel.d.ts +6 -0
- package/lib/ui/sixel.d.ts.map +1 -0
- package/lib/ui/sixel.js +9 -0
- package/lib/ui/sixel.js.map +1 -0
- package/lib/utils/apps.d.ts +29 -0
- package/lib/utils/apps.d.ts.map +1 -0
- package/lib/utils/apps.js +19 -0
- package/lib/utils/apps.js.map +1 -0
- package/lib/utils/browser.d.ts +9 -0
- package/lib/utils/browser.d.ts.map +1 -0
- package/lib/utils/browser.js +39 -0
- package/lib/utils/browser.js.map +1 -0
- package/lib/utils/bundle.d.ts +153 -0
- package/lib/utils/bundle.d.ts.map +1 -0
- package/lib/utils/bundle.js +459 -0
- package/lib/utils/bundle.js.map +1 -0
- package/lib/utils/bundleStore.d.ts +128 -0
- package/lib/utils/bundleStore.d.ts.map +1 -0
- package/lib/utils/bundleStore.js +250 -0
- package/lib/utils/bundleStore.js.map +1 -0
- package/lib/utils/context.d.ts +88 -0
- package/lib/utils/context.d.ts.map +1 -0
- package/lib/utils/context.js +247 -0
- package/lib/utils/context.js.map +1 -0
- package/lib/utils/credentials.d.ts +59 -0
- package/lib/utils/credentials.d.ts.map +1 -0
- package/lib/utils/credentials.js +147 -0
- package/lib/utils/credentials.js.map +1 -0
- package/lib/utils/guide.d.ts +63 -0
- package/lib/utils/guide.d.ts.map +1 -0
- package/lib/utils/guide.js +191 -0
- package/lib/utils/guide.js.map +1 -0
- package/lib/utils/hash.d.ts +3 -0
- package/lib/utils/hash.d.ts.map +1 -0
- package/lib/utils/hash.js +44 -0
- package/lib/utils/hash.js.map +1 -0
- package/lib/utils/native-id.d.ts +17 -0
- package/lib/utils/native-id.d.ts.map +1 -0
- package/lib/utils/native-id.js +105 -0
- package/lib/utils/native-id.js.map +1 -0
- package/lib/utils/output.d.ts +96 -0
- package/lib/utils/output.d.ts.map +1 -0
- package/lib/utils/output.js +135 -0
- package/lib/utils/output.js.map +1 -0
- package/lib/utils/prompt.d.ts +106 -0
- package/lib/utils/prompt.d.ts.map +1 -0
- package/lib/utils/prompt.js +457 -0
- package/lib/utils/prompt.js.map +1 -0
- package/lib/utils/provenance.d.ts +30 -0
- package/lib/utils/provenance.d.ts.map +1 -0
- package/lib/utils/provenance.js +157 -0
- package/lib/utils/provenance.js.map +1 -0
- package/lib/utils/resolve.d.ts +81 -0
- package/lib/utils/resolve.d.ts.map +1 -0
- package/lib/utils/resolve.js +139 -0
- package/lib/utils/resolve.js.map +1 -0
- package/lib/utils/sdkBin.d.ts +18 -0
- package/lib/utils/sdkBin.d.ts.map +1 -0
- package/lib/utils/sdkBin.js +76 -0
- package/lib/utils/sdkBin.js.map +1 -0
- package/lib/utils/signer.d.ts +94 -0
- package/lib/utils/signer.d.ts.map +1 -0
- package/lib/utils/signer.js +230 -0
- package/lib/utils/signer.js.map +1 -0
- package/lib/utils/signing.d.ts +102 -0
- package/lib/utils/signing.d.ts.map +1 -0
- package/lib/utils/signing.js +229 -0
- package/lib/utils/signing.js.map +1 -0
- package/lib/utils/transportSecurity.d.ts +36 -0
- package/lib/utils/transportSecurity.d.ts.map +1 -0
- package/lib/utils/transportSecurity.js +74 -0
- package/lib/utils/transportSecurity.js.map +1 -0
- package/lib/utils/trustAnchor.d.ts +109 -0
- package/lib/utils/trustAnchor.d.ts.map +1 -0
- package/lib/utils/trustAnchor.js +169 -0
- package/lib/utils/trustAnchor.js.map +1 -0
- package/lib/utils/ui.d.ts +12 -0
- package/lib/utils/ui.d.ts.map +1 -0
- package/lib/utils/ui.js +60 -0
- package/lib/utils/ui.js.map +1 -0
- package/lib/utils/validate.d.ts +62 -0
- package/lib/utils/validate.d.ts.map +1 -0
- package/lib/utils/validate.js +189 -0
- package/lib/utils/validate.js.map +1 -0
- package/lib/vendor/ota-protocol/base64.d.ts +11 -0
- package/lib/vendor/ota-protocol/base64.d.ts.map +1 -0
- package/lib/vendor/ota-protocol/base64.js +39 -0
- package/lib/vendor/ota-protocol/base64.js.map +1 -0
- package/lib/vendor/ota-protocol/codec.d.ts +26 -0
- package/lib/vendor/ota-protocol/codec.d.ts.map +1 -0
- package/lib/vendor/ota-protocol/codec.js +349 -0
- package/lib/vendor/ota-protocol/codec.js.map +1 -0
- package/lib/vendor/ota-protocol/hex.d.ts +8 -0
- package/lib/vendor/ota-protocol/hex.d.ts.map +1 -0
- package/lib/vendor/ota-protocol/hex.js +31 -0
- package/lib/vendor/ota-protocol/hex.js.map +1 -0
- package/lib/vendor/ota-protocol/index.d.ts +17 -0
- package/lib/vendor/ota-protocol/index.d.ts.map +1 -0
- package/lib/vendor/ota-protocol/index.js +41 -0
- package/lib/vendor/ota-protocol/index.js.map +1 -0
- package/lib/vendor/ota-protocol/limits.d.ts +39 -0
- package/lib/vendor/ota-protocol/limits.d.ts.map +1 -0
- package/lib/vendor/ota-protocol/limits.js +42 -0
- package/lib/vendor/ota-protocol/limits.js.map +1 -0
- package/lib/vendor/ota-protocol/types.d.ts +73 -0
- package/lib/vendor/ota-protocol/types.d.ts.map +1 -0
- package/lib/vendor/ota-protocol/types.js +24 -0
- package/lib/vendor/ota-protocol/types.js.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ota-delete-bundle.js","sourceRoot":"","sources":["../../src/commands/ota-delete-bundle.ts"],"names":[],"mappings":";;;;;AA6BA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CAkN7D"}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.registerOtaInspectCommands = registerOtaInspectCommands;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const client_1 = require("../api/client");
|
|
9
|
+
const validate_1 = require("../utils/validate");
|
|
10
|
+
const output_1 = require("../utils/output");
|
|
11
|
+
/** Kept beside the flags that accept them so the help text cannot drift. */
|
|
12
|
+
const PLATFORMS = ['android', 'ios'];
|
|
13
|
+
const BUNDLE_SORTS = ['newest', 'oldest', 'version', 'largest'];
|
|
14
|
+
const credentials_1 = require("../utils/credentials");
|
|
15
|
+
const resolve_1 = require("../utils/resolve");
|
|
16
|
+
const context_1 = require("../utils/context");
|
|
17
|
+
const output_2 = require("../utils/output");
|
|
18
|
+
/** Decimal MB, defined once. The dashboard reported MiB on one tab and MB on
|
|
19
|
+
* another, both labelled "MB", so the same bundle showed two sizes. */
|
|
20
|
+
function mb(bytes) {
|
|
21
|
+
if (typeof bytes !== 'number')
|
|
22
|
+
return '—';
|
|
23
|
+
return `${(bytes / 1000000).toFixed(2)} MB`;
|
|
24
|
+
}
|
|
25
|
+
function age(iso) {
|
|
26
|
+
if (!iso)
|
|
27
|
+
return '—';
|
|
28
|
+
const ms = Date.now() - new Date(iso).getTime();
|
|
29
|
+
if (!Number.isFinite(ms) || ms < 0)
|
|
30
|
+
return '—';
|
|
31
|
+
const h = ms / 3600000;
|
|
32
|
+
if (h < 1)
|
|
33
|
+
return `${Math.max(1, Math.round(ms / 60000))}m`;
|
|
34
|
+
if (h < 48)
|
|
35
|
+
return `${Math.round(h)}h`;
|
|
36
|
+
return `${Math.round(h / 24)}d`;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* One vocabulary for a rate, used everywhere.
|
|
40
|
+
*
|
|
41
|
+
* The dashboard rendered this five different ways — "no data", "not measured",
|
|
42
|
+
* "too early", a green "0.00% ✓" and a flat "0%". Two of those manufactured a
|
|
43
|
+
* passing grade out of zero installs. Three states only: a number, "collecting"
|
|
44
|
+
* below the floor, or a named reason.
|
|
45
|
+
*/
|
|
46
|
+
const RATE_FLOOR = 25;
|
|
47
|
+
function rate(installs = 0, rollbacks = 0) {
|
|
48
|
+
if (installs === 0)
|
|
49
|
+
return chalk_1.default.dim('no installs');
|
|
50
|
+
if (installs < RATE_FLOOR)
|
|
51
|
+
return chalk_1.default.dim(`collecting · ${installs}/${RATE_FLOOR}`);
|
|
52
|
+
const pct = (rollbacks / installs) * 100;
|
|
53
|
+
const s = `${pct.toFixed(1)}%`;
|
|
54
|
+
return pct >= 5 ? chalk_1.default.red(s) : pct >= 2 ? chalk_1.default.yellow(s) : chalk_1.default.green(s);
|
|
55
|
+
}
|
|
56
|
+
function statusLabel(s) {
|
|
57
|
+
switch (s) {
|
|
58
|
+
case 'ACTIVE': return chalk_1.default.cyan('live');
|
|
59
|
+
case 'PAUSED': return chalk_1.default.yellow('paused');
|
|
60
|
+
case 'ROLLED_BACK': return chalk_1.default.red('rolled back');
|
|
61
|
+
// Superseded is the NORMAL end of every release, so it is never coloured
|
|
62
|
+
// like a failure. Painting it red made 7 of 8 rows look like disasters.
|
|
63
|
+
case 'SUPERSEDED': return chalk_1.default.dim('superseded');
|
|
64
|
+
default: return chalk_1.default.dim(s.toLowerCase());
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function registerOtaInspectCommands(ota) {
|
|
68
|
+
// ── ota bundles ───────────────────────────────────────────────────────────
|
|
69
|
+
ota
|
|
70
|
+
.command('bundles')
|
|
71
|
+
.alias('bundle-list')
|
|
72
|
+
.description('List uploaded bundles — the only way to learn a --bundle-id')
|
|
73
|
+
.option('--app-id <id>', 'Scalebun app ID (resolved from scalebun.json when omitted)')
|
|
74
|
+
.option('--platform <p>', 'ios | android')
|
|
75
|
+
.option('--signed <v>', 'signed | unsigned')
|
|
76
|
+
.option('--search <q>', 'Match version, hash or note')
|
|
77
|
+
.option('--sort <s>', 'newest | oldest | version | largest', 'newest')
|
|
78
|
+
.option('--limit <n>', 'How many to show', '20')
|
|
79
|
+
.option('--latest', 'Print only the newest bundle id, for scripting')
|
|
80
|
+
.option('--json', 'Machine-readable output')
|
|
81
|
+
.action(async (opts) => {
|
|
82
|
+
const creds = (0, credentials_1.readCredentials)();
|
|
83
|
+
if (!creds)
|
|
84
|
+
(0, output_2.fail)('Not signed in.', ['Run `scalebun login`.'], output_2.ExitCode.Usage);
|
|
85
|
+
const appId = await (0, resolve_1.resolveAppId)({ appId: opts.appId, nonInteractive: opts.json });
|
|
86
|
+
// Everything is checked BEFORE the round trip: a typo should cost a
|
|
87
|
+
// second, not a request. (--limit was validated after the fetch, so junk
|
|
88
|
+
// still paid for the network.)
|
|
89
|
+
const limit = (0, validate_1.checkedInt)('--limit', opts.limit, { min: 1, max: 1000, fallback: 20 });
|
|
90
|
+
// Every one of these was forwarded to the API verbatim. A typo did not
|
|
91
|
+
// fail — it produced a filtered list that looked authoritative, which is
|
|
92
|
+
// the worst outcome for a command whose whole job is telling you what
|
|
93
|
+
// exists.
|
|
94
|
+
const qs = new URLSearchParams();
|
|
95
|
+
if (opts.platform)
|
|
96
|
+
qs.set('platform', (0, validate_1.checkedEnum)('--platform', opts.platform, PLATFORMS, { caseInsensitive: true }));
|
|
97
|
+
if (opts.signed)
|
|
98
|
+
qs.set('signed', (0, validate_1.checkedEnum)('--signed', opts.signed, ['signed', 'unsigned'], { caseInsensitive: true }));
|
|
99
|
+
if (opts.search)
|
|
100
|
+
qs.set('search', opts.search);
|
|
101
|
+
if (opts.sort)
|
|
102
|
+
qs.set('sort', (0, validate_1.checkedEnum)('--sort', opts.sort, BUNDLE_SORTS, { caseInsensitive: true }));
|
|
103
|
+
let rows;
|
|
104
|
+
try {
|
|
105
|
+
const res = await new client_1.ApiClient(creds).get(`/saas/apps/${appId}/ota/bundles${qs.toString() ? `?${qs}` : ''}`);
|
|
106
|
+
// The endpoint returns a plain array without `page` and an envelope
|
|
107
|
+
// with it — accept both rather than pinning one shape.
|
|
108
|
+
rows = Array.isArray(res) ? res : (res?.rows ?? []);
|
|
109
|
+
}
|
|
110
|
+
catch (err) {
|
|
111
|
+
(0, output_2.failFromError)('Could not list bundles', err);
|
|
112
|
+
}
|
|
113
|
+
const shown = rows.slice(0, limit);
|
|
114
|
+
// --latest exists so a pipeline can do the thing that was impossible:
|
|
115
|
+
// BUNDLE=$(scalebun ota bundles --latest)
|
|
116
|
+
if (opts.latest) {
|
|
117
|
+
const newest = shown[0];
|
|
118
|
+
if (!newest)
|
|
119
|
+
(0, output_2.fail)('No bundles on this app.', [], output_2.ExitCode.Usage);
|
|
120
|
+
(0, output_2.emit)(() => console.log(newest.id), { ok: true, bundleId: newest.id, version: newest.version ?? null });
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
(0, output_2.emit)(() => {
|
|
124
|
+
if (!shown.length) {
|
|
125
|
+
console.log('\nNo bundles match.');
|
|
126
|
+
// The early return skipped the block at the end of this function,
|
|
127
|
+
// so the empty state — the one place a next step is worth most,
|
|
128
|
+
// because there is nothing on screen to act on — offered nothing.
|
|
129
|
+
(0, output_1.printNextSteps)([{ label: 'Build and ship one', argv: ['ota', 'publish'] }], chalk_1.default.cyan);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
console.log('');
|
|
133
|
+
for (const b of shown) {
|
|
134
|
+
const v = b.version != null ? `v${b.version}` : b.id.slice(0, 8);
|
|
135
|
+
const sig = b.signature ? chalk_1.default.green('signed') : chalk_1.default.yellow('unsigned');
|
|
136
|
+
console.log(` ${chalk_1.default.bold(v.padEnd(6))} ${chalk_1.default.dim((b.platform ?? '?').padEnd(8))} ` +
|
|
137
|
+
`${mb(b.sizeBytes).padStart(9)} ${sig.padEnd(18)} ${chalk_1.default.dim(age(b.createdAt).padStart(4))} ${chalk_1.default.dim(b.id)}`);
|
|
138
|
+
}
|
|
139
|
+
if (rows.length > shown.length) {
|
|
140
|
+
console.log(chalk_1.default.dim(`\n ${rows.length - shown.length} more — raise --limit to see them.`));
|
|
141
|
+
}
|
|
142
|
+
console.log('');
|
|
143
|
+
// This list exists to find something to promote — its own help text
|
|
144
|
+
// calls it "the only way to learn a --bundle-id". The empty case
|
|
145
|
+
// returned above, so there is nothing to branch on here.
|
|
146
|
+
(0, output_1.printNextSteps)([
|
|
147
|
+
{ label: 'Make one live', argv: ['ota', 'promote'] },
|
|
148
|
+
{ label: 'See what is live', argv: ['ota', 'status'] },
|
|
149
|
+
], chalk_1.default.cyan);
|
|
150
|
+
}, { ok: true, count: shown.length, total: rows.length, bundles: shown });
|
|
151
|
+
});
|
|
152
|
+
// ── ota status ────────────────────────────────────────────────────────────
|
|
153
|
+
ota
|
|
154
|
+
.command('status')
|
|
155
|
+
.description('What is live, and what needs a decision')
|
|
156
|
+
.option('--app-id <id>', 'Scalebun app ID (resolved from scalebun.json when omitted)')
|
|
157
|
+
.option('--fail-on <level>', 'Exit 3 when an item at this level exists: act | read')
|
|
158
|
+
.option('--json', 'Machine-readable output')
|
|
159
|
+
.action(async (opts) => {
|
|
160
|
+
// Checked here rather than where it is used, at the bottom of the action:
|
|
161
|
+
// a typo used to disable the gate silently — `--fail-on acts` matched no
|
|
162
|
+
// branch, the command exited 0, and the pipeline went green having
|
|
163
|
+
// checked nothing. A gate that a typo can switch off is not a gate. And
|
|
164
|
+
// validating up here means the whole report is not printed before the
|
|
165
|
+
// usage error that invalidates it.
|
|
166
|
+
const failOn = opts.failOn
|
|
167
|
+
? (0, validate_1.checkedEnum)('--fail-on', opts.failOn, ['act', 'read'], { caseInsensitive: true })
|
|
168
|
+
: undefined;
|
|
169
|
+
const creds = (0, credentials_1.readCredentials)();
|
|
170
|
+
if (!creds)
|
|
171
|
+
(0, output_2.fail)('Not signed in.', ['Run `scalebun login`.'], output_2.ExitCode.Usage);
|
|
172
|
+
const appId = await (0, resolve_1.resolveAppId)({ appId: opts.appId, nonInteractive: opts.json });
|
|
173
|
+
const client = new client_1.ApiClient(creds);
|
|
174
|
+
// Composed from endpoints that already exist. Attention evaluates guards
|
|
175
|
+
// DRY, so asking for status can never pause a live release.
|
|
176
|
+
const [releases, attention] = await Promise.all([
|
|
177
|
+
client.get(`/saas/apps/${appId}/ota/releases`).catch(() => []),
|
|
178
|
+
client.get(`/saas/apps/${appId}/ota/attention`).catch(() => null),
|
|
179
|
+
]);
|
|
180
|
+
// Any command that fetched releases refreshes the cache the splash reads.
|
|
181
|
+
if (Array.isArray(releases))
|
|
182
|
+
(0, context_1.cacheReleaseCount)(releases.length, process.cwd());
|
|
183
|
+
const live = (releases ?? []).filter((r) => r.status === 'ACTIVE');
|
|
184
|
+
const items = attention?.items ?? [];
|
|
185
|
+
const actItems = items.filter((i) => i.severity === 'act');
|
|
186
|
+
(0, output_2.emit)(() => {
|
|
187
|
+
console.log('');
|
|
188
|
+
if (!live.length) {
|
|
189
|
+
console.log(chalk_1.default.dim(' Nothing is live on this app.'));
|
|
190
|
+
}
|
|
191
|
+
for (const r of live) {
|
|
192
|
+
const v = r.bundle?.version != null ? `v${r.bundle.version}` : r.id.slice(0, 8);
|
|
193
|
+
const s = r.stats ?? {};
|
|
194
|
+
console.log(` ${chalk_1.default.bold(v)} ${statusLabel(r.status)} ${chalk_1.default.dim('@')} ${chalk_1.default.bold(`${r.rolloutPercent ?? 0}%`)}` +
|
|
195
|
+
chalk_1.default.dim(` ${r.bundle?.platform ?? ''} · ${r.bundle?.channel?.name ?? 'default'} · ${age(r.createdAt)} old`));
|
|
196
|
+
console.log(chalk_1.default.dim(` installs `) + String(s.installs ?? 0).padEnd(8) +
|
|
197
|
+
chalk_1.default.dim('rollback rate ') + rate(s.installs, s.rollbacks));
|
|
198
|
+
}
|
|
199
|
+
console.log('');
|
|
200
|
+
if (!attention) {
|
|
201
|
+
console.log(chalk_1.default.yellow(' Could not evaluate what needs a decision.'));
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
const g = attention.guards;
|
|
205
|
+
if (g) {
|
|
206
|
+
// NEVER collapse an unevaluated guard into "0 breaching" — an app
|
|
207
|
+
// that was not measured has not been found clean.
|
|
208
|
+
const breach = g.evaluated
|
|
209
|
+
? `${g.breaching ?? 0} breaching`
|
|
210
|
+
: chalk_1.default.dim(`not evaluated${g.reason ? ` (${g.reason})` : ''}`);
|
|
211
|
+
console.log(chalk_1.default.dim(` guards ${g.armed} armed · ${breach}`));
|
|
212
|
+
}
|
|
213
|
+
if (!items.length) {
|
|
214
|
+
console.log(chalk_1.default.green(' Nothing needs a decision.'));
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
for (const i of items) {
|
|
218
|
+
const tag = i.severity === 'act' ? chalk_1.default.yellow('act ') : chalk_1.default.dim('read');
|
|
219
|
+
console.log(` ${tag} ${i.title}`);
|
|
220
|
+
if (i.facts?.length)
|
|
221
|
+
console.log(chalk_1.default.dim(` ${i.facts.join(' · ')}`));
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
// Offer the levers that match the state. With a release live these
|
|
226
|
+
// are the three things you can do about it; with nothing live the
|
|
227
|
+
// only honest suggestion is to ship something.
|
|
228
|
+
(0, output_1.printNextSteps)(live.length
|
|
229
|
+
? [
|
|
230
|
+
{ label: 'Change the share', argv: ['ota', 'rollout', '--percent', '100'] },
|
|
231
|
+
{ label: 'Stop new deliveries', argv: ['ota', 'pause'] },
|
|
232
|
+
{ label: 'Revert every device', argv: ['ota', 'rollback'] },
|
|
233
|
+
]
|
|
234
|
+
: [{ label: 'Ship an update', argv: ['ota', 'publish'] }], chalk_1.default.cyan);
|
|
235
|
+
}, {
|
|
236
|
+
ok: true,
|
|
237
|
+
live: live.map((r) => ({
|
|
238
|
+
id: r.id, version: r.bundle?.version ?? null,
|
|
239
|
+
rolloutPercent: r.rolloutPercent ?? 0, stats: r.stats ?? {},
|
|
240
|
+
})),
|
|
241
|
+
guards: attention?.guards ?? null,
|
|
242
|
+
attention: items,
|
|
243
|
+
});
|
|
244
|
+
// --fail-on turns status into a CI gate. Exit 3 is "a check you asked for
|
|
245
|
+
// said no" — distinct from a 4xx (2) and from the API being down (4).
|
|
246
|
+
if (failOn === 'act' && actItems.length) {
|
|
247
|
+
if (!(0, output_2.isJson)())
|
|
248
|
+
console.error(chalk_1.default.yellow(` ${actItems.length} decision(s) waiting.`));
|
|
249
|
+
process.exit(output_2.ExitCode.Gate);
|
|
250
|
+
}
|
|
251
|
+
if (failOn === 'read' && items.length) {
|
|
252
|
+
if (!(0, output_2.isJson)())
|
|
253
|
+
console.error(chalk_1.default.yellow(` ${items.length} item(s) to review.`));
|
|
254
|
+
process.exit(output_2.ExitCode.Gate);
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
//# sourceMappingURL=ota-inspect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ota-inspect.js","sourceRoot":"","sources":["../../src/commands/ota-inspect.ts"],"names":[],"mappings":";;;;;AA6GA,gEAkNC;AA9TD,kDAA0B;AAC1B,0CAA0C;AAC1C,gDAA4D;AAC5D,4CAAiD;AAEjD,4EAA4E;AAC5E,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,KAAK,CAAU,CAAC;AAC9C,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAU,CAAC;AACzE,sDAAuD;AACvD,8CAAgD;AAChD,8CAAqD;AACrD,4CAA8E;AAmD9E;wEACwE;AACxE,SAAS,EAAE,CAAC,KAAc;IACxB,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC;IAC1C,OAAO,GAAG,CAAC,KAAK,GAAG,OAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AAChD,CAAC;A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IAAI;YACjC,SAAS,EAAE,KAAK;SACjB,CACF,CAAC;QAEF,0EAA0E;QAC1E,sEAAsE;QACtE,IAAI,MAAM,KAAK,KAAK,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;YACxC,IAAI,CAAC,IAAA,eAAM,GAAE;gBAAE,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,MAAM,CAAC,KAAK,QAAQ,CAAC,MAAM,uBAAuB,CAAC,CAAC,CAAC;YACxF,OAAO,CAAC,IAAI,CAAC,iBAAQ,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC;QACD,IAAI,MAAM,KAAK,MAAM,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YACtC,IAAI,CAAC,IAAA,eAAM,GAAE;gBAAE,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC,MAAM,qBAAqB,CAAC,CAAC,CAAC;YACnF,OAAO,CAAC,IAAI,CAAC,iBAAQ,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import * as crypto from 'crypto';
|
|
3
|
+
import { ApiClient } from '../api/client';
|
|
4
|
+
import { spkiFingerprint } from '../utils/signing';
|
|
5
|
+
/**
|
|
6
|
+
* OTA signing keys for SB-OTA-RSA-SHA256-V1 (RSA-3072 / SHA-256).
|
|
7
|
+
*
|
|
8
|
+
* The security model, and the reason this command exists: the private key is
|
|
9
|
+
* generated on the developer's machine and NEVER leaves it. Only the SPKI PUBLIC
|
|
10
|
+
* key is uploaded/registered. A server that cannot sign cannot forge a release,
|
|
11
|
+
* so a compromise of ScaleBun's infrastructure still cannot push code to a
|
|
12
|
+
* customer's users.
|
|
13
|
+
*
|
|
14
|
+
* (Pre-1.14 ScaleBun signed with ed25519 over the bundle's SHA-256. That path is
|
|
15
|
+
* removed: the protocol is now native-verifiable RSA on every supported Android
|
|
16
|
+
* API level. Legacy ed25519 key ROWS remain readable in the dashboard, labelled
|
|
17
|
+
* "Ed25519 — Legacy"; new keys are RSA only.)
|
|
18
|
+
*/
|
|
19
|
+
export declare const KEY_DIR = ".scalebun";
|
|
20
|
+
export declare const PRIVATE_KEY_FILE = "ota-signing-key.pem";
|
|
21
|
+
export declare const PUBLIC_KEY_FILE = "ota-signing-key.pub.pem";
|
|
22
|
+
export declare const KEY_ID_FILE = "ota-key-id.txt";
|
|
23
|
+
/** Absolute path to the private key for a key dir (default ./.scalebun). */
|
|
24
|
+
export declare function privateKeyPath(keyDir?: string): string;
|
|
25
|
+
/** The locally stored keyId, if any (written next to the private key at generate). */
|
|
26
|
+
export declare function readLocalKeyId(keyDir?: string): string | null;
|
|
27
|
+
/** The local private key PEM, if present. */
|
|
28
|
+
export declare function readLocalPrivatePem(keyDir?: string): string | null;
|
|
29
|
+
/** SPKI public-key PEM derived from the local private key, if present. */
|
|
30
|
+
export declare function localPublicPem(keyDir?: string): string | null;
|
|
31
|
+
export declare const ENV_SIGNING_PRIVATE_KEY = "SCALEBUN_SIGNING_PRIVATE_KEY";
|
|
32
|
+
export declare const ENV_SIGNING_KEY_PASSPHRASE = "SCALEBUN_SIGNING_KEY_PASSPHRASE";
|
|
33
|
+
export declare const ENV_KEY_ID = "SCALEBUN_KEY_ID";
|
|
34
|
+
export declare const ENV_REQUIRE_SIGNING = "SCALEBUN_REQUIRE_SIGNING";
|
|
35
|
+
export type MaterialSource = 'flag' | 'env' | 'file' | 'none';
|
|
36
|
+
export interface SigningMaterial {
|
|
37
|
+
/** PKCS#8 private-key PEM (possibly encrypted), or null when none is configured. */
|
|
38
|
+
privatePem: string | null;
|
|
39
|
+
privateSource: MaterialSource;
|
|
40
|
+
keyId: string | null;
|
|
41
|
+
keyIdSource: MaterialSource;
|
|
42
|
+
/** Passphrase for an encrypted private key, if supplied. */
|
|
43
|
+
passphrase: string | undefined;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Resolve the RSA signing material with precedence **CLI flag > env var > local
|
|
47
|
+
* .scalebun file**, for each of: private key, key id, passphrase.
|
|
48
|
+
*
|
|
49
|
+
* private key : --key-dir <dir>/ota-signing-key.pem
|
|
50
|
+
* → $SCALEBUN_SIGNING_PRIVATE_KEY (PEM contents)
|
|
51
|
+
* → ./.scalebun/ota-signing-key.pem
|
|
52
|
+
* key id : --key-id → $SCALEBUN_KEY_ID → ./.scalebun/ota-key-id.txt
|
|
53
|
+
* passphrase : --passphrase → $SCALEBUN_SIGNING_KEY_PASSPHRASE
|
|
54
|
+
*/
|
|
55
|
+
export declare function resolveSigningMaterial(opts: {
|
|
56
|
+
keyDir?: string;
|
|
57
|
+
keyId?: string;
|
|
58
|
+
passphrase?: string;
|
|
59
|
+
}): SigningMaterial;
|
|
60
|
+
/**
|
|
61
|
+
* Whether this publish must be signed (so a missing key fails closed instead of
|
|
62
|
+
* silently shipping an unsigned release a signature-enforcing device rejects).
|
|
63
|
+
*
|
|
64
|
+
* True when: --require-signing / $SCALEBUN_REQUIRE_SIGNING is set, OR a key id is
|
|
65
|
+
* configured by any source (a configured key id means "sign with this key").
|
|
66
|
+
*/
|
|
67
|
+
export declare function signingRequired(opts: {
|
|
68
|
+
requireSigning?: boolean;
|
|
69
|
+
}, material: SigningMaterial): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Keep the private key out of version control WITHOUT relying on the operator
|
|
72
|
+
* reading a warning. An existing .gitignore is appended to; a missing one is
|
|
73
|
+
* created only inside an actual git repo. Returns a human-readable outcome.
|
|
74
|
+
*/
|
|
75
|
+
export declare function ensureKeyDirGitignored(outDir: string, cwd?: string): string;
|
|
76
|
+
/**
|
|
77
|
+
* Prove possession of a signing key without leaving the terminal.
|
|
78
|
+
*
|
|
79
|
+
* Registering a public key only asserts "trust this key". Proving possession
|
|
80
|
+
* shows the caller actually holds the private half — and until that happens the
|
|
81
|
+
* key is not ACTIVE and every promote is refused as high-risk. It is not
|
|
82
|
+
* optional in practice, so it should not be a separate errand.
|
|
83
|
+
*
|
|
84
|
+
* The private key never leaves this machine: the server mints the bytes, we sign
|
|
85
|
+
* those exact bytes, and only the signature goes back.
|
|
86
|
+
*/
|
|
87
|
+
export declare function proveOwnership(client: ApiClient, appId: string, keyRowId: string, privateKey: crypto.KeyObject): Promise<boolean>;
|
|
88
|
+
export declare function registerOtaKeysCommand(ota: Command): void;
|
|
89
|
+
/** Re-export so callers can compute a fingerprint without importing signing.ts. */
|
|
90
|
+
export { spkiFingerprint };
|
|
91
|
+
//# sourceMappingURL=ota-keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ota-keys.d.ts","sourceRoot":"","sources":["../../src/commands/ota-keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AASjC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAwC,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEzF;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,OAAO,cAAc,CAAC;AACnC,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AACtD,eAAO,MAAM,eAAe,4BAA4B,CAAC;AACzD,eAAO,MAAM,WAAW,mBAAmB,CAAC;AAE5C,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,MAAM,GAAE,MAAgB,GAAG,MAAM,CAE/D;AAED,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,MAAM,GAAE,MAAgB,GAAG,MAAM,GAAG,IAAI,CAStE;AAED,6CAA6C;AAC7C,wBAAgB,mBAAmB,CAAC,MAAM,GAAE,MAAgB,GAAG,MAAM,GAAG,IAAI,CAG3E;AAED,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,MAAM,GAAE,MAAgB,GAAG,MAAM,GAAG,IAAI,CAQtE;AAOD,eAAO,MAAM,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