vibeview 0.14.1 → 0.15.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.
|
@@ -421,7 +421,7 @@ var ANDROID_PRODUCTION_ARTIFACT = "android/app/build/outputs/bundle/release/*.aa
|
|
|
421
421
|
var ANDROID_PRODUCTION_COMMAND = "yarn install --immutable && cd android && ./gradlew bundleRelease";
|
|
422
422
|
var IOS_PRODUCTION_ARTIFACT = "ios/build/*.ipa";
|
|
423
423
|
function productionDefaultsFor(cwd, platform) {
|
|
424
|
-
if (platform === "android") {
|
|
424
|
+
if (platform === "android" || platform === "androidtv") {
|
|
425
425
|
return { buildCommand: ANDROID_PRODUCTION_COMMAND, artifact: ANDROID_PRODUCTION_ARTIFACT };
|
|
426
426
|
}
|
|
427
427
|
if (platform === "ios") {
|
|
@@ -711,7 +711,13 @@ function runTar(args) {
|
|
|
711
711
|
|
|
712
712
|
// src/commands/build.ts
|
|
713
713
|
var CLOUD_PLATFORMS = ["ios", "android", "tvos", "androidtv"];
|
|
714
|
-
var PRODUCTION_SIGNING_PLATFORMS = ["ios", "android"];
|
|
714
|
+
var PRODUCTION_SIGNING_PLATFORMS = ["ios", "android", "androidtv"];
|
|
715
|
+
function productionUnsupportedReason(platform) {
|
|
716
|
+
if (platform === "tvos") {
|
|
717
|
+
return "--production doesn't support tvos yet \u2014 tvOS production builds are not yet enabled";
|
|
718
|
+
}
|
|
719
|
+
return `--production doesn't support ${platform} \u2014 production signing supports ${PRODUCTION_SIGNING_PLATFORMS.join(", ")}`;
|
|
720
|
+
}
|
|
715
721
|
function isCloudPlatform(p) {
|
|
716
722
|
return CLOUD_PLATFORMS.includes(p);
|
|
717
723
|
}
|
|
@@ -921,7 +927,7 @@ async function resolveCloudPlatforms(cwd, cfgRef, opts) {
|
|
|
921
927
|
);
|
|
922
928
|
if (unsupported.length > 0) {
|
|
923
929
|
for (const p of unsupported) {
|
|
924
|
-
const reason =
|
|
930
|
+
const reason = productionUnsupportedReason(p);
|
|
925
931
|
emitCloud(opts.json, { event: "skipped", platform: p, reason });
|
|
926
932
|
if (!opts.json) console.error(chalk2.yellow(`\u26A0 skipping ${p}: ${reason}`));
|
|
927
933
|
}
|
|
@@ -932,7 +938,7 @@ async function resolveCloudPlatforms(cwd, cfgRef, opts) {
|
|
|
932
938
|
const prefix = exclusions ? `${exclusions}; ` : "";
|
|
933
939
|
fail(
|
|
934
940
|
opts,
|
|
935
|
-
`--platform all --production: ${prefix}none of the configured platforms support production signing (${PRODUCTION_SIGNING_PLATFORMS.join("
|
|
941
|
+
`--platform all --production: ${prefix}none of the configured platforms support production signing (${PRODUCTION_SIGNING_PLATFORMS.join(", ")} only)`,
|
|
936
942
|
"config_required"
|
|
937
943
|
);
|
|
938
944
|
}
|
|
@@ -980,10 +986,7 @@ function requireCloudCapable(opts, platform) {
|
|
|
980
986
|
}
|
|
981
987
|
function requireProductionCapable(opts, platform) {
|
|
982
988
|
if (opts.production && !PRODUCTION_SIGNING_PLATFORMS.includes(platform)) {
|
|
983
|
-
fail(
|
|
984
|
-
opts,
|
|
985
|
-
`--production doesn't support ${platform} \u2014 production signing supports ${PRODUCTION_SIGNING_PLATFORMS.join(" and ")}`
|
|
986
|
-
);
|
|
989
|
+
fail(opts, productionUnsupportedReason(platform));
|
|
987
990
|
}
|
|
988
991
|
}
|
|
989
992
|
function persistPickedAppId(cwd, cfg, platform, appId) {
|
|
@@ -998,6 +1001,7 @@ function persistPickedAppId(cwd, cfg, platform, appId) {
|
|
|
998
1001
|
return next;
|
|
999
1002
|
}
|
|
1000
1003
|
var CREATE_NEW_APP = "__vibeview_create_new_app__";
|
|
1004
|
+
var DONT_LINK_APP = "__vibeview_dont_link_app__";
|
|
1001
1005
|
async function resolveCloudAppIds(cwd, cfgRef, platforms, opts, listApps) {
|
|
1002
1006
|
const createFromArtifact = /* @__PURE__ */ new Set();
|
|
1003
1007
|
const missing = platforms.filter((p) => !cfgRef.current?.platforms?.[p]?.appId);
|
|
@@ -1021,7 +1025,9 @@ async function resolveCloudAppIds(cwd, cfgRef, platforms, opts, listApps) {
|
|
|
1021
1025
|
createFromArtifact.add(platform);
|
|
1022
1026
|
if (!opts.json) {
|
|
1023
1027
|
console.error(
|
|
1024
|
-
chalk2.dim(
|
|
1028
|
+
chalk2.dim(
|
|
1029
|
+
opts.production ? `no ${platform} apps yet \u2014 production builds aren't linked to an app; the signed artifact will be available from the build itself` : `no ${platform} apps yet \u2014 this build will create one from the artifact`
|
|
1030
|
+
)
|
|
1025
1031
|
);
|
|
1026
1032
|
}
|
|
1027
1033
|
continue;
|
|
@@ -1032,11 +1038,21 @@ async function resolveCloudAppIds(cwd, cfgRef, platforms, opts, listApps) {
|
|
|
1032
1038
|
// one platform, so `(ios)` on every row would be pure noise (same
|
|
1033
1039
|
// reasoning as dev.ts's picker).
|
|
1034
1040
|
choices: [
|
|
1041
|
+
// Under --production a "Don't link an app" row leads the list (the
|
|
1042
|
+
// neutral default, since the create-from-artifact escape hatch below
|
|
1043
|
+
// is suppressed there): production builds aren't linked to an app
|
|
1044
|
+
// unless the user explicitly wants the link — see DONT_LINK_APP.
|
|
1045
|
+
...opts.production ? [{ value: DONT_LINK_APP, name: "Don't link an app" }] : [],
|
|
1035
1046
|
...apps.map((a) => ({ value: a.public_id, name: a.name })),
|
|
1036
|
-
|
|
1047
|
+
// No create-from-artifact row under --production: a production build
|
|
1048
|
+
// never creates an app (internal_builds returns before app creation),
|
|
1049
|
+
// so offering it would promise something that can't happen. Picking
|
|
1050
|
+
// an EXISTING app is still meaningful — app-scoped signing
|
|
1051
|
+
// credentials resolve by app.
|
|
1052
|
+
...opts.production ? [] : [{ value: CREATE_NEW_APP, name: "Create a new app from this build" }]
|
|
1037
1053
|
]
|
|
1038
1054
|
});
|
|
1039
|
-
if (appId === CREATE_NEW_APP) {
|
|
1055
|
+
if (appId === CREATE_NEW_APP || appId === DONT_LINK_APP) {
|
|
1040
1056
|
createFromArtifact.add(platform);
|
|
1041
1057
|
continue;
|
|
1042
1058
|
}
|
|
@@ -1213,7 +1229,9 @@ ${offenders}`);
|
|
|
1213
1229
|
return;
|
|
1214
1230
|
}
|
|
1215
1231
|
const finished = await waitForCloudBuilds(created, opts, d);
|
|
1216
|
-
|
|
1232
|
+
if (!opts.production) {
|
|
1233
|
+
persistResolvedAppIds(cwd, cfgRef, createFromArtifact, finished.values());
|
|
1234
|
+
}
|
|
1217
1235
|
let downloadFailed = false;
|
|
1218
1236
|
if (opts.download) {
|
|
1219
1237
|
for (const b of finished.values()) {
|
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
readDevState,
|
|
14
14
|
readMetroState,
|
|
15
15
|
runAgentVerb
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-B7GWF2BT.js";
|
|
17
17
|
import {
|
|
18
18
|
ApiClient,
|
|
19
19
|
EXIT_INFRA_ERROR,
|
|
@@ -1288,7 +1288,10 @@ The build may still be running server-side \u2014 resume watching it with \`vibe
|
|
|
1288
1288
|
id,
|
|
1289
1289
|
platform: "",
|
|
1290
1290
|
status,
|
|
1291
|
+
distribution: "simulator",
|
|
1291
1292
|
app_public_id: null,
|
|
1293
|
+
app_name: null,
|
|
1294
|
+
requested_by: null,
|
|
1292
1295
|
created_at: null,
|
|
1293
1296
|
started_at: null,
|
|
1294
1297
|
finished_at: null,
|
|
@@ -1296,6 +1299,9 @@ The build may still be running server-side \u2014 resume watching it with \`vibe
|
|
|
1296
1299
|
used_free_quota: false,
|
|
1297
1300
|
error_summary: null,
|
|
1298
1301
|
app_build_id: null,
|
|
1302
|
+
has_artifact: false,
|
|
1303
|
+
artifact_size: 0,
|
|
1304
|
+
artifact_filename: null,
|
|
1299
1305
|
timeout_s: 0
|
|
1300
1306
|
};
|
|
1301
1307
|
const final = await fetchFinalSummary(id, fallback, deps);
|
|
@@ -1705,16 +1711,24 @@ function defaultDeps4(client) {
|
|
|
1705
1711
|
}
|
|
1706
1712
|
var ANDROID_KIND = "android_keystore";
|
|
1707
1713
|
var IOS_KIND = "ios_distribution";
|
|
1714
|
+
var CREDENTIAL_PLATFORMS = ["ios", "android", "tvos"];
|
|
1715
|
+
function isCredentialPlatform(p) {
|
|
1716
|
+
return CREDENTIAL_PLATFORMS.includes(p);
|
|
1717
|
+
}
|
|
1708
1718
|
async function credentialsAdd(opts, deps) {
|
|
1709
1719
|
const d = deps ?? defaultDeps4(clientFor2(opts));
|
|
1710
|
-
if (!opts.platform || opts.platform
|
|
1711
|
-
throw new UsageError('--platform is required and must be "ios" or "
|
|
1720
|
+
if (!opts.platform || !isCredentialPlatform(opts.platform)) {
|
|
1721
|
+
throw new UsageError('--platform is required and must be "ios", "android", or "tvos"');
|
|
1712
1722
|
}
|
|
1723
|
+
const platform = opts.platform;
|
|
1713
1724
|
if (!opts.file) {
|
|
1714
1725
|
throw new UsageError("--file is required");
|
|
1715
1726
|
}
|
|
1716
|
-
|
|
1717
|
-
|
|
1727
|
+
const needsProfile = platform === "ios" || platform === "tvos";
|
|
1728
|
+
if (needsProfile && !opts.profile) {
|
|
1729
|
+
throw new UsageError(
|
|
1730
|
+
`--profile is required for ${platform} credentials (a .mobileprovision file)`
|
|
1731
|
+
);
|
|
1718
1732
|
}
|
|
1719
1733
|
const canPrompt = !opts.json && d.isTTY;
|
|
1720
1734
|
if (!canPrompt) {
|
|
@@ -1727,7 +1741,7 @@ async function credentialsAdd(opts, deps) {
|
|
|
1727
1741
|
const file = await d.readFile(opts.file);
|
|
1728
1742
|
const filename = basename2(opts.file);
|
|
1729
1743
|
let body;
|
|
1730
|
-
if (
|
|
1744
|
+
if (platform === "android") {
|
|
1731
1745
|
const storePassword = await d.prompt({ message: "Keystore (store) password", hidden: true });
|
|
1732
1746
|
const keyPassword = await d.prompt({ message: "Key password", hidden: true });
|
|
1733
1747
|
const keyAlias = await d.prompt({ message: "Key alias", hidden: false });
|
|
@@ -1746,7 +1760,7 @@ async function credentialsAdd(opts, deps) {
|
|
|
1746
1760
|
const p12Password = await d.prompt({ message: ".p12 password", hidden: true });
|
|
1747
1761
|
const profile = await d.readFile(opts.profile);
|
|
1748
1762
|
body = {
|
|
1749
|
-
platform
|
|
1763
|
+
platform,
|
|
1750
1764
|
kind: IOS_KIND,
|
|
1751
1765
|
name,
|
|
1752
1766
|
app: opts.app,
|
|
@@ -2221,7 +2235,10 @@ env.command("pull").description(
|
|
|
2221
2235
|
var credentials = program.command("credentials").description("Manage app-signing credentials for production cloud builds");
|
|
2222
2236
|
credentials.command("add").description(
|
|
2223
2237
|
"Add a signing credential. Prompts for passwords with hidden input \u2014 they are never accepted as flags (a flag lands in shell history and in `ps`)."
|
|
2224
|
-
).option("--token <token>", "API token (or set VIBEVIEW_API_TOKEN)").option("--platform <platform>", "ios or
|
|
2238
|
+
).option("--token <token>", "API token (or set VIBEVIEW_API_TOKEN)").option("--platform <platform>", "ios, android, or tvos").option("--file <path>", "The keystore (.jks) or certificate (.p12) file").option(
|
|
2239
|
+
"--profile <path>",
|
|
2240
|
+
"ios/tvos: the .mobileprovision file (required; tvOS profiles are distinct from iOS ones)"
|
|
2241
|
+
).option("--app <id>", "Scope to a single app (default: org-wide)").option("--name <name>", "Credential name (default: the file basename without extension)").action((opts) => credentialsAdd(opts));
|
|
2225
2242
|
credentials.command("list").description("List signing credentials (never prints key material)").option("--token <token>", "API token (or set VIBEVIEW_API_TOKEN)").option("--app <id>", "Scope to a single app (default: org-wide credentials only)").option("--json", "Print the raw credential list as a JSON array", false).action((opts) => credentialsList(opts));
|
|
2226
2243
|
credentials.command("rm <name>").description("Remove a signing credential (replace by rm then add)").option("--token <token>", "API token (or set VIBEVIEW_API_TOKEN)").option("--app <id>", "Scope to a single app (default: org-wide)").option("--json", "Print the result as one JSON line", false).action((name, opts) => credentialsRm(name, opts));
|
|
2227
2244
|
program.command("dev-status").description("Show the status of a `vibeview dev --detach` session in this project").option("--token <token>", "API token (or set VIBEVIEW_API_TOKEN)").option("--json", "Print as one JSON line", false).action((opts) => devStatus(opts));
|
|
@@ -2229,7 +2246,7 @@ program.command("dev-stop").description("Stop a `vibeview dev --detach` session
|
|
|
2229
2246
|
program.command("mcp").description(
|
|
2230
2247
|
"Run an MCP stdio server exposing the agent verbs (tap, swipe, type, ...) plus dev_start/dev_stop as tools"
|
|
2231
2248
|
).option("--token <token>", "API token (or set VIBEVIEW_API_TOKEN)").action(async (opts) => {
|
|
2232
|
-
const { runMcpServer } = await import("./server-
|
|
2249
|
+
const { runMcpServer } = await import("./server-CSXGGDJL.js");
|
|
2233
2250
|
await runMcpServer(opts);
|
|
2234
2251
|
});
|
|
2235
2252
|
program.command("agent-setup").description(
|