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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ Explore supported universities and campus data, or scaffold a new Gapwise integr

</div>

The official CLI uses the [Gapwise public API](https://api.gapwise.ca/v1) for campus discovery, buildings, places, residences, and routes. Its maintainer commands work with sibling [`gapwise`](https://github.com/GapwiseHQ/gapwise) and [`data`](https://github.com/GapwiseHQ/data) checkouts. Gapwise supports 11 Canadian universities and 13 campus models; routing and place coverage vary by campus. No university affiliation is implied.
The official CLI uses the [Gapwise public API](https://api.gapwise.ca/v1) for campus discovery, buildings, places, residences, and routes. Its maintainer commands work with sibling [`gapwise`](https://github.com/GapwiseHQ/gapwise) and [`data`](https://github.com/GapwiseHQ/data) checkouts. Gapwise supports 13 Canadian universities and 15 campus models; routing and place coverage vary by campus. No university affiliation is implied.

## Install

Requires **Node.js 22 or newer**. [npm package: `@gapwise/cli`](https://www.npmjs.com/package/@gapwise/cli) is the intended canonical registry identity. Until the first registry release is verified, install from the [public source repository](https://github.com/GapwiseHQ/cli):
Requires **Node.js 22 or newer**. Install the current verified [`@gapwise/cli` package from npm](https://www.npmjs.com/package/@gapwise/cli):

```sh
npm install -g github:GapwiseHQ/cli
npm install -g @gapwise/cli@0.2.1
gapwise --version
gapwise --help
```

After the registry release, install or upgrade from npm with `npm install -g @gapwise/cli`. To upgrade a GitHub installation, rerun `npm install -g github:GapwiseHQ/cli`. To uninstall either installation, run `npm uninstall -g @gapwise/cli`.
Upgrade with `npm install -g @gapwise/cli@latest`. To uninstall, run `npm uninstall -g @gapwise/cli`.

## Explore the public platform

Expand Down
13 changes: 9 additions & 4 deletions scripts/verify-package.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,17 @@ try {
assert.ok(!binContent.includes('\r\n'), 'CLI entrypoint must use LF line endings');
assert.ok(statSync(join(root, manifest.bin.gapwise)).mode & 0o111, 'CLI entrypoint must be executable');

// 3. Dry-run publish must emit zero normalization warnings
const dryRun = spawnSync('npm', ['publish', '--dry-run'], { cwd: root, encoding: 'utf8' });
assert.equal(dryRun.status, 0, `npm publish --dry-run failed:\n${dryRun.stdout}\n${dryRun.stderr}`);
// 3. Dry-run packing must emit zero normalization warnings. `npm publish --dry-run`
// consults the registry and fails after a version has shipped, so it is not a repeatable
// package-shape check for an already published release.
const dryRun = spawnSync('npm', ['pack', '--dry-run', '--json'], {
cwd: root,
encoding: 'utf8',
});
assert.equal(dryRun.status, 0, `npm pack --dry-run failed:\n${dryRun.stdout}\n${dryRun.stderr}`);
assert.ok(
!dryRun.stderr.includes('npm auto-corrected') && !dryRun.stderr.includes('was invalid and removed'),
`npm publish emitted bin normalization warning:\n${dryRun.stderr}`
`npm pack emitted bin normalization warning:\n${dryRun.stderr}`
);

// 4. Pack tarball and verify contents & metadata
Expand Down
Loading