@better-update/cli 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5319 -0
- package/dist/index.js.map +1 -0
- package/package.json +12 -9
- package/CHANGELOG.md +0 -58
- package/oxlint.config.ts +0 -6
- package/src/app-layer.ts +0 -29
- package/src/application/build-workflow.ts +0 -222
- package/src/application/command-exit.ts +0 -13
- package/src/application/login.ts +0 -87
- package/src/application/update-promote.ts +0 -88
- package/src/application/update-publish.ts +0 -402
- package/src/application/update-rollback.ts +0 -275
- package/src/commands/analytics/adoption.ts +0 -40
- package/src/commands/analytics/channels.ts +0 -35
- package/src/commands/analytics/helpers.ts +0 -3
- package/src/commands/analytics/index.ts +0 -13
- package/src/commands/analytics/platforms.ts +0 -39
- package/src/commands/analytics/updates.ts +0 -35
- package/src/commands/audit-logs/helpers.ts +0 -3
- package/src/commands/audit-logs/index.ts +0 -8
- package/src/commands/audit-logs/list.ts +0 -66
- package/src/commands/branches.ts +0 -70
- package/src/commands/build/android.ts +0 -129
- package/src/commands/build/index.ts +0 -63
- package/src/commands/build/ios.ts +0 -199
- package/src/commands/build/reserve-and-upload.test.ts +0 -263
- package/src/commands/build/reserve-and-upload.ts +0 -160
- package/src/commands/build/run-step.ts +0 -131
- package/src/commands/builds/compatibility-matrix.ts +0 -48
- package/src/commands/builds/delete.ts +0 -15
- package/src/commands/builds/get.ts +0 -34
- package/src/commands/builds/helpers.ts +0 -3
- package/src/commands/builds/index.ts +0 -20
- package/src/commands/builds/install-link.ts +0 -20
- package/src/commands/builds/list.ts +0 -38
- package/src/commands/channels/create.ts +0 -37
- package/src/commands/channels/delete.ts +0 -15
- package/src/commands/channels/helpers.ts +0 -18
- package/src/commands/channels/index.ts +0 -24
- package/src/commands/channels/list.ts +0 -38
- package/src/commands/channels/pause.ts +0 -15
- package/src/commands/channels/resume.ts +0 -15
- package/src/commands/channels/rollout/complete.ts +0 -17
- package/src/commands/channels/rollout/create.ts +0 -36
- package/src/commands/channels/rollout/index.ts +0 -11
- package/src/commands/channels/rollout/revert.ts +0 -17
- package/src/commands/channels/rollout/update.ts +0 -23
- package/src/commands/channels/update.ts +0 -32
- package/src/commands/credentials/delete.ts +0 -24
- package/src/commands/credentials/index.ts +0 -10
- package/src/commands/credentials/list.ts +0 -33
- package/src/commands/credentials/upload.ts +0 -91
- package/src/commands/env/delete.ts +0 -35
- package/src/commands/env/export.ts +0 -27
- package/src/commands/env/get.ts +0 -25
- package/src/commands/env/helpers.ts +0 -13
- package/src/commands/env/import.ts +0 -31
- package/src/commands/env/index.ts +0 -24
- package/src/commands/env/list.ts +0 -44
- package/src/commands/env/pull.ts +0 -27
- package/src/commands/env/set.ts +0 -42
- package/src/commands/fingerprint/compare.ts +0 -25
- package/src/commands/fingerprint/generate.ts +0 -18
- package/src/commands/fingerprint/index.ts +0 -9
- package/src/commands/init.ts +0 -35
- package/src/commands/login.ts +0 -13
- package/src/commands/logout.ts +0 -12
- package/src/commands/projects.ts +0 -84
- package/src/commands/status.ts +0 -48
- package/src/commands/update/delete.ts +0 -15
- package/src/commands/update/helpers.ts +0 -22
- package/src/commands/update/index.ts +0 -22
- package/src/commands/update/list.ts +0 -60
- package/src/commands/update/promote.ts +0 -30
- package/src/commands/update/publish.ts +0 -94
- package/src/commands/update/rollback.ts +0 -42
- package/src/commands/update/rollout/complete.ts +0 -17
- package/src/commands/update/rollout/index.ts +0 -10
- package/src/commands/update/rollout/revert.ts +0 -17
- package/src/commands/update/rollout/set.ts +0 -23
- package/src/index.ts +0 -53
- package/src/lib/android-keystore.test.ts +0 -114
- package/src/lib/android-keystore.ts +0 -76
- package/src/lib/android-signing-gradle.test.ts +0 -95
- package/src/lib/android-signing-gradle.ts +0 -52
- package/src/lib/app-json.ts +0 -81
- package/src/lib/apple-auth.test.ts +0 -402
- package/src/lib/apple-auth.ts +0 -132
- package/src/lib/artifact-finder.test.ts +0 -195
- package/src/lib/artifact-finder.ts +0 -122
- package/src/lib/browser-login.test.ts +0 -88
- package/src/lib/browser-login.ts +0 -193
- package/src/lib/build-profile.test.ts +0 -290
- package/src/lib/build-profile.ts +0 -234
- package/src/lib/cli-schemas.ts +0 -39
- package/src/lib/command-errors.ts +0 -60
- package/src/lib/credentials-downloader.ts +0 -181
- package/src/lib/credentials-manager.ts +0 -354
- package/src/lib/env-exporter.test.ts +0 -96
- package/src/lib/env-exporter.ts +0 -28
- package/src/lib/exit-codes.ts +0 -82
- package/src/lib/expo-config.ts +0 -130
- package/src/lib/expo-export.test.ts +0 -94
- package/src/lib/expo-export.ts +0 -281
- package/src/lib/fingerprint.ts +0 -67
- package/src/lib/format-error.ts +0 -22
- package/src/lib/git-context.ts +0 -56
- package/src/lib/gradle-config.ts +0 -126
- package/src/lib/ios-export-options.test.ts +0 -98
- package/src/lib/ios-export-options.ts +0 -62
- package/src/lib/ios-keychain.ts +0 -181
- package/src/lib/ios-provisioning.test.ts +0 -115
- package/src/lib/ios-provisioning.ts +0 -179
- package/src/lib/output.ts +0 -32
- package/src/lib/pkcs12.ts +0 -73
- package/src/lib/plist.ts +0 -39
- package/src/lib/post-build-validation.ts +0 -146
- package/src/lib/presigned-upload.test.ts +0 -140
- package/src/lib/presigned-upload.ts +0 -35
- package/src/lib/record.ts +0 -5
- package/src/lib/resolve-named-resource.ts +0 -24
- package/src/lib/runtime-version.test.ts +0 -119
- package/src/lib/runtime-version.ts +0 -62
- package/src/lib/sha256.test.ts +0 -108
- package/src/lib/sha256.ts +0 -80
- package/src/lib/signed-payloads.test.ts +0 -181
- package/src/lib/signed-payloads.ts +0 -164
- package/src/lib/string-utils.ts +0 -4
- package/src/lib/temp-dir.ts +0 -14
- package/src/lib/test-utils.ts +0 -13
- package/src/lib/update-platforms.test.ts +0 -45
- package/src/lib/update-platforms.ts +0 -19
- package/src/lib/xcpretty-formatter.ts +0 -21
- package/src/services/api-client.ts +0 -42
- package/src/services/apple-session-store.ts +0 -100
- package/src/services/auth-store.ts +0 -85
- package/src/services/cli-runtime.ts +0 -46
- package/src/services/config-store.ts +0 -108
- package/src/services/presigned-upload.ts +0 -84
- package/src/services/update-asset-uploader.ts +0 -72
- package/src/types/keychain.d.ts +0 -22
- package/tests/e2e/build.test.ts +0 -270
- package/tests/e2e/commands.test.ts +0 -694
- package/tests/e2e/ota-lifecycle.test.ts +0 -275
- package/tests/e2e/publish.test.ts +0 -150
- package/tests/helpers/cli-e2e.ts +0 -426
- package/tests/helpers/pty-driver.ts +0 -142
- package/tests/interactive/harness/provider-prompt.ts +0 -54
- package/tests/interactive/login.test.ts +0 -47
- package/tests/interactive/provider-select.test.ts +0 -59
- package/tsconfig.json +0 -7
- package/vitest.config.ts +0 -38
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
|
|
3
|
-
import { spawnPty } from "../helpers/pty-driver";
|
|
4
|
-
|
|
5
|
-
const HARNESS = path.resolve(import.meta.dirname, "./harness/provider-prompt.ts");
|
|
6
|
-
|
|
7
|
-
const RESULT_RE = /^RESULT=(\{.*\})$/m;
|
|
8
|
-
|
|
9
|
-
const runHarness = async (actions: (driver: ReturnType<typeof spawnPty>) => Promise<void>) => {
|
|
10
|
-
const driver = spawnPty("bun", [HARNESS], {
|
|
11
|
-
env: {
|
|
12
|
-
FORCE_COLOR: "0",
|
|
13
|
-
NO_COLOR: "1",
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
await driver.expect("Select App Store Connect provider", { timeoutMs: 15_000 });
|
|
18
|
-
await actions(driver);
|
|
19
|
-
await driver.expect(RESULT_RE, { timeoutMs: 10_000 });
|
|
20
|
-
const code = await driver.waitExit({ timeoutMs: 5000 });
|
|
21
|
-
expect(code).toBe(0);
|
|
22
|
-
|
|
23
|
-
const match = RESULT_RE.exec(driver.stripped());
|
|
24
|
-
expect(match, "harness should print RESULT=<json>").not.toBeNull();
|
|
25
|
-
return JSON.parse(match![1]!) as { providerId: number; switched: boolean };
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
describe("provider select prompt (PTY)", () => {
|
|
29
|
-
it("enter without navigation picks the first provider", async () => {
|
|
30
|
-
const result = await runHarness(async (driver) => {
|
|
31
|
-
driver.enter();
|
|
32
|
-
});
|
|
33
|
-
expect(result).toStrictEqual({ providerId: 10, switched: true });
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it("down + enter picks the second provider", async () => {
|
|
37
|
-
const result = await runHarness(async (driver) => {
|
|
38
|
-
driver.down();
|
|
39
|
-
driver.enter();
|
|
40
|
-
});
|
|
41
|
-
expect(result).toStrictEqual({ providerId: 20, switched: true });
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
it("down + down + enter picks the third provider", async () => {
|
|
45
|
-
const result = await runHarness(async (driver) => {
|
|
46
|
-
driver.down(2);
|
|
47
|
-
driver.enter();
|
|
48
|
-
});
|
|
49
|
-
expect(result).toStrictEqual({ providerId: 30, switched: true });
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it("up wraps to the last provider", async () => {
|
|
53
|
-
const result = await runHarness(async (driver) => {
|
|
54
|
-
driver.up();
|
|
55
|
-
driver.enter();
|
|
56
|
-
});
|
|
57
|
-
expect(result).toStrictEqual({ providerId: 30, switched: true });
|
|
58
|
-
});
|
|
59
|
-
});
|
package/tsconfig.json
DELETED
package/vitest.config.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vitest/config";
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
test: {
|
|
5
|
-
projects: [
|
|
6
|
-
// ── Unit tests (Node/Bun runtime) ─────────────────────
|
|
7
|
-
{
|
|
8
|
-
test: {
|
|
9
|
-
name: "unit",
|
|
10
|
-
globals: true,
|
|
11
|
-
include: ["src/**/*.test.ts"],
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
test: {
|
|
16
|
-
name: "e2e",
|
|
17
|
-
globals: true,
|
|
18
|
-
include: ["tests/e2e/**/*.test.ts"],
|
|
19
|
-
hookTimeout: 120_000,
|
|
20
|
-
testTimeout: 120_000,
|
|
21
|
-
// E2E tests share a common fixture dir (fixtures/e2e-app) and a
|
|
22
|
-
// Wrangler seed SQL path — serialize via fileParallelism=false and
|
|
23
|
-
// The --maxWorkers 1 flag set on test:e2e in package.json.
|
|
24
|
-
fileParallelism: false,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
test: {
|
|
29
|
-
name: "interactive",
|
|
30
|
-
globals: true,
|
|
31
|
-
include: ["tests/interactive/**/*.test.ts"],
|
|
32
|
-
hookTimeout: 30_000,
|
|
33
|
-
testTimeout: 30_000,
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
});
|