Skip to content

Commit 3cc68c6

Browse files
committed
Release v2.0.1
1 parent c4f6ef1 commit 3cc68c6

6 files changed

Lines changed: 16 additions & 15 deletions

File tree

‎.github/workflows/cli.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ jobs:
4949
- name: Create draft release
5050
env:
5151
GH_TOKEN: ${{ github.token }}
52-
run: gh release create "$GITHUB_REF_NAME" dist/releases/pgstack-* dist/releases/version dist/releases/LICENSE --verify-tag --draft --title "PgStack CLI $GITHUB_REF_NAME" --generate-notes
52+
run: gh release create "$GITHUB_REF_NAME" dist/releases/pgstack-* --verify-tag --draft --title "$GITHUB_REF_NAME" --generate-notes

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ make build
1313

1414
The CLI lives in `src/`. The API contract is in `src/api.ts`. Add regression coverage for behavior changes and keep fixtures synthetic. Keep the contract aligned with the supported PgStack API.
1515

16-
Release tags use `v<version>`, matching `package.json`. The release workflow builds standalone binaries, checksums, a version file, and the license, then creates a draft GitHub Release. Review and publish the draft to make it available to the installer. Build macOS binaries on macOS and sign/notarize them if distributing with an Apple Developer identity; regenerate checksums after signing.
16+
Release tags use `v<version>`, matching `package.json`. The release workflow builds standalone binaries and checksums, then creates a draft GitHub Release. The release title is the tag, such as `v2.0.0`. Review and publish the draft to make it available to the installer. Pushes to `main` run checks without creating a release. Build macOS binaries on macOS and sign/notarize them if distributing with an Apple Developer identity; regenerate checksums after signing.
1717

1818
Contributions are provided under MIT.

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pgstack access revoke <session-slug> --reason "Investigation complete"
5151
pgstack auth logout
5252
```
5353

54-
Sessions last up to one hour. Extensions add time but cannot leave more than one hour remaining. Expired or revoked sessions cannot be extended. Revocation ends access within one minute.
54+
Sessions last up to one hour. Extensions add time but cannot leave more than one hour remaining. Expired or revoked sessions cannot be extended. After revocation, open connections close within one minute.
5555

5656
Use `--organization <slug-or-id>` when you belong to multiple organizations, `--role <name>` to select a configured database role, and `--json` for scripts. `--reason` is required when your project requires a reason. See `pgstack --help` and `pgstack access --help` for all commands.
5757

@@ -73,12 +73,12 @@ make build
7373

7474
`make up` loads `.env`, which defaults to `https://api.pgstack.dev`. Pass flags after Make's `--`, for example `make up -- access start --env staging`. You can also use `make up ARGS="access start --env staging"`.
7575

76-
The public API contract is in `src/api.ts`. Match the backend's tRPC protocol version when updating dependencies. `bun run build:releases` creates platform binaries, SHA-256 files, and the version file in `dist/releases/`.
76+
The public API contract is in `src/api.ts`. Match the backend's tRPC protocol version when updating dependencies. `bun run build:releases` creates platform binaries and SHA-256 files in `dist/releases/`.
7777

7878
## Repository history
7979

8080
BemiDB history through `v1.8.0` remains available in Git. Version `2.0.0` starts the CLI distribution; it does not replace the old runtime or provide a self-hosted PgStack backend. PgStack's hosted backend and infrastructure are maintained separately.
8181

8282
## License
8383

84-
[MIT](LICENSE). Previous versions retain their original licenses. See [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md).
84+
[MIT](LICENSE). See [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md).

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pgstack/cli",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"private": true,
55
"type": "module",
66
"scripts": {

‎scripts/build-releases.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { mkdir, copyFile, writeFile, readFile } from 'node:fs/promises';
1+
import { mkdir, rm, writeFile, readFile } from 'node:fs/promises';
22
import { createHash } from 'node:crypto';
3-
import { version } from '../package.json';
43

54
const targets = [
65
'darwin-arm64',
@@ -11,6 +10,7 @@ const targets = [
1110
'linux-x64-musl',
1211
'windows-x64',
1312
] as const;
13+
await rm('dist/releases', { recursive: true, force: true });
1414
await mkdir('dist/releases', { recursive: true });
1515
for (const target of targets) {
1616
const filename = `pgstack-${target}${target.startsWith('windows') ? '.exe' : ''}`;
@@ -34,5 +34,3 @@ for (const target of targets) {
3434
.digest('hex');
3535
await writeFile(`dist/releases/${filename}.sha256`, `${checksum} ${filename}\n`);
3636
}
37-
await copyFile('LICENSE', 'dist/releases/LICENSE');
38-
await writeFile('dist/releases/version', `${version}\n`);

‎src/index.ts‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ const program = new Command()
1515
.description('Temporary PostgreSQL access through PgStack')
1616
.version(version, '-v, --version')
1717
.option('--organization <slug>', 'Organization slug or ID', process.env.PGSTACK_ORGANIZATION)
18-
.option('--json', 'Print machine-readable JSON');
18+
.option('--json', 'Print machine-readable JSON')
19+
.action(() => program.outputHelp());
1920

2021
const auth = program.command('auth').description('Sign in and manage CLI credentials');
2122
auth.action(() => auth.outputHelp());
@@ -35,7 +36,9 @@ auth
3536
console.log(
3637
`Signed in as ${status.user.email ?? status.user.githubUsername}\nLogin expires: ${status.expiresAt.toISOString()}`,
3738
);
38-
console.table(status.organizations);
39+
console.table(
40+
status.organizations.map((organization) => ({ organization: organization.slug, name: organization.name })),
41+
);
3942
});
4043

4144
auth
@@ -52,6 +55,7 @@ const access = program.command('access').description('Start and manage your Post
5255
access
5356
.command('start [slug]')
5457
.description('Start a session using a project slug or --env <environment>')
58+
.addHelpText('after', '\nUse the returned PostgreSQL URL to connect.')
5559
.option('--env <environment>', 'Environment to access', parseEnvironment)
5660
.option('--duration <duration>', 'Access duration, up to 1h', '1h')
5761
.option('--reason <reason>', 'Reason for access')
@@ -129,15 +133,14 @@ access
129133
access
130134
.command('revoke <session>')
131135
.description('End access and retain the session history')
136+
.addHelpText('after', '\nOpen connections close within one minute.')
132137
.option('--reason <reason>', 'Reason for revoking access')
133138
.action(async (value: string, options: { reason?: string }) => {
134139
const slug = parseSessionSlug(value);
135140
const { client, organizationId } = await sessionContext();
136141
const session = await client.accessSession.revoke.mutate({ organizationId, slug, reason: options.reason });
137142
if (program.opts().json) return printJson(session);
138-
console.log(
139-
`Session ${session.slug} revoked. Open connections close on the next proxy lease check (within one minute).`,
140-
);
143+
console.log(`Session ${session.slug} revoked.`);
141144
});
142145

143146
const printJson = (value: unknown) => console.log(JSON.stringify(value, null, 2));

0 commit comments

Comments
 (0)