Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@miakapp/cli",
"version": "4.7.0",
"version": "4.7.1",
"description": "Agent-first Miakapp command line: check, build, publish, activate and roll back home interfaces",
"type": "module",
"engines": {
Expand Down
11 changes: 8 additions & 3 deletions packages/cli/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,10 @@ async function previewSession(host: CliHost, invocation: Invocation): Promise<Te
}
const artifact = await loadArtifact(host, project);
const { target, credential } = await publicationTarget(host, invocation, project);
await stage(target, artifact, { release, abi: project.abi, requires: project.requires });
// A build already finalized (published before, or previewed) is not uploaded again.
if (await readRelease(target, artifact.sha256) === undefined) {
await stage(target, artifact, { release, abi: project.abi, requires: project.requires });
}
const options = host.fetch === undefined ? {} : { fetch: host.fetch };
const discovery = await fetchDiscovery({ issuer: project.issuer, ...options });
const minutes = testMinutes(invocation);
Expand Down Expand Up @@ -1329,8 +1332,10 @@ function tapsResult(report: TapReport, send: readonly string[]): CommandResult {
.filter((call) => call.outcome === 'held')
.map((call) => `${tap.page} › ${tap.element}: ${call.name}`));
const startupProblems = report.startupCalls
.filter((call) => call.outcome === 'error' || (call.ms ?? 0) > 1_500)
.map((call) => `${call.name}: ${call.outcome === 'error' ? call.error ?? 'failed' : 'ok'} in ${call.ms ?? '?'} ms`);
.filter((call) => call.outcome !== 'ok' || (call.ms ?? 0) > 1_500)
.map((call) => (call.outcome === 'pending'
? `${call.name}: no answer after 5 s`
: `${call.name}: ${call.outcome === 'error' ? call.error ?? 'failed' : 'ok'} in ${call.ms ?? '?'} ms`));
const tapErrors = report.taps.flatMap((tap) => tap.errors.map((error) => `${tap.page} › ${tap.element}: ${error}`));
const problems = dead.length + failed.length + startupProblems.length + report.errors.length
+ (report.width === 390 ? 0 : 1);
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/src/taps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,11 @@ export async function runTaps(options: TapOptions): Promise<TapReport> {
await navigate(options.url);
let app = await load();
const width = await evaluate<number>(app.session, 'innerWidth', app.context);
// Let the start-up calls answer (or not) before reading them.
for (let waited = 0; waited < 5_000; waited += 250) {
if (!await shell("(window.miakappTest?.calls ?? []).some((call) => call.outcome === 'pending')")) break;
await sleep(250);
}
const startupCalls = await shell('JSON.stringify(window.miakappTest?.calls ?? [])')
.then((raw) => (JSON.parse(String(raw)) as CallRecord[]).map(({ name, outcome, error, ms }) => ({
name, outcome, ...(error === undefined ? {} : { error }), ...(ms === undefined ? {} : { ms }),
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
*/
export const PACKAGE_NAME = '@miakapp/cli';

export const CLI_VERSION = '4.7.0';
export const CLI_VERSION = '4.7.1';
Loading