Remove Cupertino fixture alternatives
Keep capture and probe tooling on the app's single Material surface by removing obsolete platform switches, hosts, and documentation. Preserve the existing Material routes and fixture behavior while retaining compatibility APIs outside this lane.
This commit is contained in:
@@ -16,7 +16,7 @@ import { contactSheet, pickFrames } from './sheet.mjs';
|
||||
import { describe, flutterPage, parseTarget } from './page.mjs';
|
||||
|
||||
const USAGE = `usage: capture.mjs (--build <dir> | --url <url>) --out <dir> [options] [steps...]
|
||||
options: --script <steps.json> --size WxH (880x1000) --platform material|cupertino
|
||||
options: --script <steps.json> --size WxH (880x1000)
|
||||
--theme light|dark --q <search> --wait <ms after actions, 1000>
|
||||
--film-ms <ms, 900> --cdp http://127.0.0.1:<port> --probe true|false
|
||||
--params <query, e.g. chats=2&rich=1, added to every open>
|
||||
@@ -47,7 +47,7 @@ let steps = cliSteps;
|
||||
if (opts.script) {
|
||||
const script = JSON.parse(await readFile(opts.script, 'utf8'));
|
||||
const list = Array.isArray(script) ? script : script.steps;
|
||||
if (!Array.isArray(script)) for (const k of ['size', 'platform', 'theme', 'q', 'params']) if (script[k] && !opts[k]) opts[k] = script[k];
|
||||
if (!Array.isArray(script)) for (const k of ['size', 'theme', 'q', 'params']) if (script[k] && !opts[k]) opts[k] = script[k];
|
||||
steps = [...list, ...cliSteps];
|
||||
}
|
||||
// The default size applies only when neither the command line nor the script sets one.
|
||||
@@ -74,7 +74,7 @@ const save = async (path, data) => { await writeFile(path, data); report.files.p
|
||||
|
||||
function routeUrl(step, base) {
|
||||
const route = step.open;
|
||||
const params = { platform: step.platform ?? opts.platform, theme: step.theme ?? opts.theme, q: step.q ?? opts.q };
|
||||
const params = { theme: step.theme ?? opts.theme, q: step.q ?? opts.q };
|
||||
let url;
|
||||
if (/^https?:/.test(route)) url = new URL(route);
|
||||
else if (probe) { url = new URL('/', base); url.searchParams.set('route', route); }
|
||||
|
||||
Reference in New Issue
Block a user