INNER CODE UNIT · TypeScript
selectSteps
rit3zh/reacticx · cloudflare/cli/index.ts:191
async function selectSteps(flags: Flags) {
const chosen = steps.filter((step) => {
if (flags.only.length > 0) return flags.only.includes(step.id);
return !flags.skip.includes(step.id);
});
const runnable: Step[] = [];
const readOnly = flags.dry || flags.check;
for (const step of chosen) {
// `status` and `--dry` promise to change nothing. A step with no read-only
// mode of its own cannot keep that promise — the registry generators write
// their output file unconditionally — so it sits the run out rather than
// quietly rewriting something.
if (readOnly && !step.accepts.includes("dry") && !step.accepts.includes("check")) {
log.skip(`${step.id} — no read-only mode, skipped`);
continue;
}