preflight_checks.ts

view source

Declarations
#

3 declarations

PreflightResult
#

preflight_checks.ts view source

PreflightResult import type {PreflightResult} from '@fuzdev/fuz_repos/preflight_checks.js';

ok

type boolean

warnings

type string[]

errors

type string[]

run_preflight_checks
#

preflight_checks.ts view source

({ repos, version_changes, log, npm_ops, build_ops }: RunPreflightChecksOptions): Promise<PreflightResult> import {run_preflight_checks} from '@fuzdev/fuz_repos/preflight_checks.js';

Validates the publish-time requirements beyond repo git state:

  • every package the plan publishes builds (fail-fast to prevent broken state)
  • npm authentication
  • npm registry connectivity

What publishes is the plan's to decide, so preflight reads no changesets: it builds each package in version_changes. Git state — each repo on its registry branch, clean, idle, in sync with origin or ahead of it, and no live session in its checkout — is the readiness gate's, which `gitops_publish --wetrun runs before the plan's confirmation prompt (repo_readiness.ts`), so preflight reads no git.

Build validation runs BEFORE any publishing to prevent the scenario where version is bumped but build fails, leaving repo in broken state.

__0

returns

Promise<PreflightResult>

result with ok=false if any errors, plus warnings

RunPreflightChecksOptions
#

preflight_checks.ts view source

RunPreflightChecksOptions import type {RunPreflightChecksOptions} from '@fuzdev/fuz_repos/preflight_checks.js';

repos

type LocalRepo[]

version_changes

The plan's version changes — every package the run publishes, explicit, escalated, and auto-generated alike. Preflight builds exactly these.

type VersionChange[]

log?

type Logger

npm_ops?

type NpmOperations

build_ops?

type BuildOperations

Depends on
#

Imported by
#