vibeview 0.12.2 → 0.12.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.
|
@@ -854,15 +854,14 @@ function persistPickedAppId(cwd, cfg, platform, appId) {
|
|
|
854
854
|
saveDevConfig(cwd, next);
|
|
855
855
|
return next;
|
|
856
856
|
}
|
|
857
|
+
var CREATE_NEW_APP = "__vibeview_create_new_app__";
|
|
857
858
|
async function resolveCloudAppIds(cwd, cfgRef, platforms, opts, listApps) {
|
|
859
|
+
const createFromArtifact = /* @__PURE__ */ new Set();
|
|
858
860
|
const missing = platforms.filter((p) => !cfgRef.current?.platforms?.[p]?.appId);
|
|
859
|
-
if (missing.length === 0) return;
|
|
861
|
+
if (missing.length === 0) return createFromArtifact;
|
|
860
862
|
if (opts.json || !process.stdin.isTTY) {
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
`no app configured for ${missing[0]}: cloud builds attach to an existing app. Run \`vibeview build --platform ${missing[0]}\` once to build and upload locally, or \`vibeview upload-app\`, then retry --cloud`,
|
|
864
|
-
"config_required"
|
|
865
|
-
);
|
|
863
|
+
for (const platform of missing) createFromArtifact.add(platform);
|
|
864
|
+
return createFromArtifact;
|
|
866
865
|
}
|
|
867
866
|
let allApps;
|
|
868
867
|
try {
|
|
@@ -876,21 +875,40 @@ async function resolveCloudAppIds(cwd, cfgRef, platforms, opts, listApps) {
|
|
|
876
875
|
for (const platform of missing) {
|
|
877
876
|
const apps = appsForPlatform(allApps, platform);
|
|
878
877
|
if (apps.length === 0) {
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
878
|
+
createFromArtifact.add(platform);
|
|
879
|
+
if (!opts.json) {
|
|
880
|
+
console.error(
|
|
881
|
+
chalk.dim(`no ${platform} apps yet \u2014 this build will create one from the artifact`)
|
|
882
|
+
);
|
|
883
|
+
}
|
|
884
|
+
continue;
|
|
884
885
|
}
|
|
885
886
|
const appId = await select2({
|
|
886
887
|
message: platforms.length > 1 ? `Which app should these ${platform} builds attach to?` : "Which app should these builds attach to?",
|
|
887
888
|
// No platform suffix on the rows: the list is already filtered to this
|
|
888
889
|
// one platform, so `(ios)` on every row would be pure noise (same
|
|
889
890
|
// reasoning as dev.ts's picker).
|
|
890
|
-
choices:
|
|
891
|
+
choices: [
|
|
892
|
+
...apps.map((a) => ({ value: a.public_id, name: a.name })),
|
|
893
|
+
{ value: CREATE_NEW_APP, name: "Create a new app from this build" }
|
|
894
|
+
]
|
|
891
895
|
});
|
|
896
|
+
if (appId === CREATE_NEW_APP) {
|
|
897
|
+
createFromArtifact.add(platform);
|
|
898
|
+
continue;
|
|
899
|
+
}
|
|
892
900
|
cfgRef.current = persistPickedAppId(cwd, cfgRef.current, platform, appId);
|
|
893
901
|
}
|
|
902
|
+
return createFromArtifact;
|
|
903
|
+
}
|
|
904
|
+
function persistResolvedAppIds(cwd, cfgRef, createFromArtifact, finished) {
|
|
905
|
+
for (const b of finished) {
|
|
906
|
+
if (!b.app_public_id) continue;
|
|
907
|
+
const platform = b.platform;
|
|
908
|
+
if (!createFromArtifact.has(platform)) continue;
|
|
909
|
+
if (cfgRef.current?.platforms?.[platform]?.appId) continue;
|
|
910
|
+
cfgRef.current = persistPickedAppId(cwd, cfgRef.current, platform, b.app_public_id);
|
|
911
|
+
}
|
|
894
912
|
}
|
|
895
913
|
function describeAllExclusions(configured) {
|
|
896
914
|
if (configured.length === 0) return "no platforms are configured";
|
|
@@ -957,7 +975,7 @@ async function runCloudBuildCommand(cwd, cfgRef, opts, deps) {
|
|
|
957
975
|
const { token, baseUrl } = resolveAuth(opts);
|
|
958
976
|
const client = new ApiClient(baseUrl, token);
|
|
959
977
|
const d = deps ?? defaultCloudBuildDeps(client);
|
|
960
|
-
await resolveCloudAppIds(cwd, cfgRef, platforms, opts, d.listApps);
|
|
978
|
+
const createFromArtifact = await resolveCloudAppIds(cwd, cfgRef, platforms, opts, d.listApps);
|
|
961
979
|
const cfg = cfgRef.current;
|
|
962
980
|
for (const p of platforms) {
|
|
963
981
|
try {
|
|
@@ -1005,10 +1023,12 @@ ${offenders}`);
|
|
|
1005
1023
|
const build = entry.build;
|
|
1006
1024
|
return {
|
|
1007
1025
|
platform: p,
|
|
1008
|
-
//
|
|
1009
|
-
//
|
|
1010
|
-
// entry
|
|
1011
|
-
|
|
1026
|
+
// OMITTED, never invented, for a platform whose app the artifact will
|
|
1027
|
+
// create (resolveCloudAppIds). Otherwise the non-null assertion is
|
|
1028
|
+
// safe: resolveCloudAppIds ran for every entry in `platforms` above —
|
|
1029
|
+
// it either persisted a picked appId onto the entry, marked the
|
|
1030
|
+
// platform create-from-artifact, or failed the whole command.
|
|
1031
|
+
...createFromArtifact.has(p) ? {} : { app_public_id: entry.appId },
|
|
1012
1032
|
command: build.command,
|
|
1013
1033
|
artifact_path: build.artifact,
|
|
1014
1034
|
...build.env ? { env: build.env } : {}
|
|
@@ -1040,6 +1060,7 @@ ${offenders}`);
|
|
|
1040
1060
|
return;
|
|
1041
1061
|
}
|
|
1042
1062
|
const finished = await waitForCloudBuilds(created, opts, d);
|
|
1063
|
+
persistResolvedAppIds(cwd, cfgRef, createFromArtifact, finished.values());
|
|
1043
1064
|
let downloadFailed = false;
|
|
1044
1065
|
if (opts.download) {
|
|
1045
1066
|
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-2OI7HL6X.js";
|
|
17
17
|
import {
|
|
18
18
|
ApiClient,
|
|
19
19
|
EXIT_INFRA_ERROR,
|
|
@@ -1717,7 +1717,7 @@ program.command("dev-stop").description("Stop a `vibeview dev --detach` session
|
|
|
1717
1717
|
program.command("mcp").description(
|
|
1718
1718
|
"Run an MCP stdio server exposing the agent verbs (tap, swipe, type, ...) plus dev_start/dev_stop as tools"
|
|
1719
1719
|
).option("--token <token>", "API token (or set VIBEVIEW_API_TOKEN)").action(async (opts) => {
|
|
1720
|
-
const { runMcpServer } = await import("./server-
|
|
1720
|
+
const { runMcpServer } = await import("./server-25CXVTUV.js");
|
|
1721
1721
|
await runMcpServer(opts);
|
|
1722
1722
|
});
|
|
1723
1723
|
program.command("agent-setup").description(
|