servicenow-preflight DEPARTURE CONTROL
node ≥ 20 · MIT · 0 deps Donate GITHUB
DEPARTURE CONTROL · SERVICENOW

Cleared for departure.

A pre-deployment checklist for ServiceNow. Point it at an instance and it flips through the twenty-three things that quietly break a deploy — then holds at the gate, or clears you for takeoff with a single exit code.

$
npx servicenow-preflight
SCENARIO:
PRE-DEPLOYMENT · DEPARTURES
snpf · default suite
GATE CHECK REMARK
EXIT 0

Watch the board flip — CLEARED passes · HOLD warns · DENIED fails.

Read the timetable →
DEPARTURES · GATES 01–23

The twenty-three checks

Gates 01–02, 05 and 06 board on credentials alone. The rest stay ON HOLD until you supply their inputs — they never depart unchecked. Select a gate for the full read-out.

GATECHECKSTATUS
BOARD KEY

Reading the board

THREE STATUSES
CLEARED The condition holds (pass). Never fails the run.
HOLD Advisory (warn) — not configured, unreachable, or a soft flag. Never fails the run.
DENIED A real problem (fail) that should block the deploy. Fails the run.
0CLEARED

Run completed, no check returned fail.

1BLOCKED

A fail, a zero-match selection, or an unexpected runtime error.

2REJECTED

A usage error — bad flags or config, caught before any check runs.

BOARDING PASS

Install & first run

BOARDING PASS CARRIER · snpf
$
npx servicenow-preflight

Two identical binaries — servicenow-preflight and alias snpf.

1 CREDENTIALS (ENV)
export SNPF_INSTANCE=https://…
export SNPF_USER=admin
export SNPF_PASS='***'
2 DEPART
$ snpf
✓ 4 cleared
! 11 on hold
EXIT 0 — CLEARED
GATE
CI / CD
SEAT
0 DEPS
RUNTIME
NODE 20+
CLASS
MIT
CLI · snpf [cmd] [options]
CONNECTING FLIGHTS

CI, config & the library

.github/workflows/preflight.yml
name: ServiceNow preflight
on: [workflow_dispatch, pull_request]
jobs:
  preflight:
    runs-on: ubuntu-latest
    permissions: { security-events: write }
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 22 }
      - env:            # repo secrets
          SNPF_INSTANCE: ${{ secrets.SNPF_INSTANCE }}
          SNPF_USER: ${{ secrets.SNPF_USER }}
          SNPF_PASS: ${{ secrets.SNPF_PASS }}
        run: npx servicenow-preflight --format sarif > pf.sarif
      - uses: github/codeql-action/upload-sarif@v3
        if: always()
        with: { sarif_file: pf.sarif }
preflight.config.json
{
  "instanceUrl": "https://dev12345.service-now.com",
  "scope": "x_acme_app",
  "updateSetId": "a1b2c3d4…",
  "select":  { "skip": ["atf-run"] },
  "options": { "languages": ["de","fr"],
    "requiredApps": [{ "id": "x_acme_lib" }],
    "atfSuites": ["<suite_sys_id>"] }
}
Auto-discovered: .json → .js → .mjs · never credentials.
CREDENTIALS · ENVIRONMENT ONLY
library api · runPreflight
import { runPreflight, createSnClient }
  from "servicenow-preflight";

const http = createSnClient({ instanceUrl, auth });
const report = await runPreflight({
  http, scope, updateSetId });
report.ok;      // false if any check failed
report.summary; // { pass, warn, fail }
TYPED ERRORS
Checks call ctx.http, never fetch — so createFakeSnClient unit-tests them with no network.
SUPPORT

Built & maintained in spare time

If it saves you or your team time, sponsorship directly funds new features, fixes and maintenance.