@vivero/stoma-cli 0.1.0-rc.4 → 0.1.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +94 -0
- package/package.json +3 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# @vivero/stoma-cli
|
|
2
|
+
|
|
3
|
+
## 0.1.0-rc.6
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [`c6f0576`](https://github.com/vivero-dev/stoma/commit/c6f05763d6f2ba3e8a3c6845258d57e6f8c1d693) Thanks [@JonathanBennett](https://github.com/JonathanBennett)! - fix: resolve `workspace:*` protocols in published packages
|
|
9
|
+
|
|
10
|
+
Replaces `changeset publish` with a custom publish script (`scripts/publish.mjs`) that uses `yarn pack` to resolve `workspace:*` protocols and apply `publishConfig` overrides, then `npm publish <tarball>` for OIDC trusted publishing with provenance. The prepack/postpack workaround scripts have been removed.
|
|
11
|
+
- Updated dependencies [[`c6f0576`](https://github.com/vivero-dev/stoma/commit/c6f05763d6f2ba3e8a3c6845258d57e6f8c1d693)]:
|
|
12
|
+
- @vivero/stoma@0.1.0-rc.10
|
|
13
|
+
|
|
14
|
+
## 0.1.0-rc.5
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
- [`c6f0576`](https://github.com/vivero-dev/stoma/commit/c6f05763d6f2ba3e8a3c6845258d57e6f8c1d693) Thanks [@JonathanBennett](https://github.com/JonathanBennett)! - fix: publish via `yarn npm publish` to correctly resolve `workspace:*` protocols
|
|
20
|
+
|
|
21
|
+
Replaces `changeset publish` (which used `npm publish <dir>` and never resolved workspace protocols) with a custom publish script that runs `yarn npm publish` from each package directory. Yarn natively handles `workspace:*` resolution and `publishConfig` field overrides, so the prepack/postpack workaround scripts have been removed.
|
|
22
|
+
- Updated dependencies [[`c6f0576`](https://github.com/vivero-dev/stoma/commit/c6f05763d6f2ba3e8a3c6845258d57e6f8c1d693)]:
|
|
23
|
+
- @vivero/stoma@0.1.0-rc.9
|
|
24
|
+
|
|
25
|
+
## 0.1.0-rc.4
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
- [`cfa0a04`](https://github.com/vivero-dev/stoma/commit/cfa0a040eda481782cc34131b2e4b99015e74cea) Thanks [@JonathanBennett](https://github.com/JonathanBennett)! - Add CLI test coverage and split monorepo/package READMEs
|
|
31
|
+
|
|
32
|
+
### CLI tests
|
|
33
|
+
|
|
34
|
+
Add 26 tests across 3 files covering the playground wrapper, OAuth relay, gateway resolution security boundary, and TypeScript transpilation end-to-end:
|
|
35
|
+
|
|
36
|
+
- **Playground routing invariants**: `/__playground` returns HTML, `/registry` returns exact JSON, non-playground paths always pass through to the gateway
|
|
37
|
+
- **Send proxy contract**: response shape (`status`, `statusText`, `headers`, `body`, `elapsed`), header forwarding, error handling, body stripping for GET
|
|
38
|
+
- **OAuth relay**: interception only fires for navigation requests to callback routes with query params; XSS prevention via `<` escaping
|
|
39
|
+
- **Security boundary**: remote URLs without `--trust-remote` always reject with security warning
|
|
40
|
+
- **TS transpilation e2e**: loads real `.ts` fixture through esbuild, verifies the gateway's fetch handler produces correct responses
|
|
41
|
+
|
|
42
|
+
### README
|
|
43
|
+
|
|
44
|
+
- Root README is now a monorepo landing page with package table, quick start, and dev/release instructions
|
|
45
|
+
- Gateway package (`packages/gateway`) retains the full library README for npm
|
|
46
|
+
- Updated dependencies [[`cfa0a04`](https://github.com/vivero-dev/stoma/commit/cfa0a040eda481782cc34131b2e4b99015e74cea)]:
|
|
47
|
+
- @vivero/stoma@0.1.0-rc.8
|
|
48
|
+
|
|
49
|
+
## 0.1.0-rc.3
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
- [`a414008`](https://github.com/vivero-dev/stoma/commit/a41400882fbe51f9f5ac7f623dec52f0e2ca1dd6) Thanks [@JonathanBennett](https://github.com/JonathanBennett)! - Fix npm publish pipeline to correctly resolve workspace protocols and apply publishConfig overrides
|
|
55
|
+
|
|
56
|
+
Adds prepack/postpack lifecycle scripts that prepare package.json for `npm publish` by resolving `workspace:*` to real versions and applying `publishConfig` field overrides (main, types, exports, bin). This replaces the previous `@changesets/cli` yarn patch approach and restores compatibility with GitHub Actions OIDC tokens for npm authentication and provenance.
|
|
57
|
+
- Updated dependencies [[`a414008`](https://github.com/vivero-dev/stoma/commit/a41400882fbe51f9f5ac7f623dec52f0e2ca1dd6)]:
|
|
58
|
+
- @vivero/stoma@0.1.0-rc.7
|
|
59
|
+
|
|
60
|
+
## 0.1.0-rc.2
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
- [`ca21e7a`](https://github.com/vivero-dev/stoma/commit/ca21e7ad128b83c6f3398d30098644761e0e3501) Thanks [@JonathanBennett](https://github.com/JonathanBennett)! - Fix esbuild resolution of transitive dependencies when bundling gateway files
|
|
66
|
+
|
|
67
|
+
The CLI's TypeScript transpiler now includes the `node_modules` of `@vivero/stoma` itself in esbuild's resolve paths, so transitive dependencies like `@vivero/stoma-core` are found even when not hoisted to the top-level `node_modules`.
|
|
68
|
+
|
|
69
|
+
## 0.1.0-rc.1
|
|
70
|
+
### Minor Changes
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
- [`44f78e4`](https://github.com/vivero-dev/stoma/commit/44f78e462b92d6f719c6622e3e1126a6d343920f) Thanks [@JonathanBennett](https://github.com/JonathanBennett)! - Initial release of `@vivero/stoma-cli`
|
|
75
|
+
|
|
76
|
+
Local development server and interactive playground for Stoma API gateways.
|
|
77
|
+
|
|
78
|
+
### Features
|
|
79
|
+
|
|
80
|
+
- **`stoma run <file>`**: Load a gateway file (TypeScript or JS) and serve it on a local Node.js HTTP server via `@hono/node-server`. TypeScript files are automatically bundled with esbuild — no build step or `tsconfig` required.
|
|
81
|
+
- **Remote gateway files**: `stoma run https://... --trust-remote` fetches, transpiles, and serves a gateway from a URL.
|
|
82
|
+
- **Flexible export resolution**: Supports `export default createGateway(...)`, async factory functions, `createPlaygroundGateway` named exports, and bare Hono apps.
|
|
83
|
+
- **Interactive playground** (`--playground`): Serves a browser UI at `/__playground` with a two-pane layout — request builder on the left, response viewer on the right. Includes:
|
|
84
|
+
- Route chips for quick path selection (wildcard paths like `/api/*` display as `/api/` to avoid 404s)
|
|
85
|
+
- Structured header key-value table with add/remove per row
|
|
86
|
+
- Response tabs: Pretty (syntax-highlighted JSON), Raw, and Headers (with count badge)
|
|
87
|
+
- Token store: OAuth tokens persisted in localStorage, auto-detected from response bodies, and auto-applied as `Authorization: Bearer` headers
|
|
88
|
+
- OAuth popup flow: redirect detection, authorization popup, callback relay via `postMessage`, and a banner prompting the user to complete the exchange
|
|
89
|
+
- **CLI options**: `--port`, `--host`, `--debug` (gateway debug logging), `--verbose` (CLI output), graceful shutdown on SIGINT/SIGTERM.
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- Updated dependencies [[`c14161a`](https://github.com/vivero-dev/stoma/commit/c14161a0846ef1991bb0fa71337435e6366579a7)]:
|
|
94
|
+
- @vivero/stoma@0.1.0-rc.6
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vivero/stoma-cli",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.6",
|
|
4
4
|
"description": "CLI for running Stoma API gateways locally — load a gateway file and serve it on a Node.js HTTP server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -56,8 +56,6 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
|
-
"prepack": "node ../../scripts/resolve-workspace-deps.mjs",
|
|
60
|
-
"postpack": "node ../../scripts/resolve-workspace-deps.mjs --restore",
|
|
61
59
|
"dev": "tsx src/bin.ts",
|
|
62
60
|
"build": "tsup",
|
|
63
61
|
"typecheck": "tsc --noEmit",
|
|
@@ -68,7 +66,7 @@
|
|
|
68
66
|
},
|
|
69
67
|
"dependencies": {
|
|
70
68
|
"@hono/node-server": "^1.14.0",
|
|
71
|
-
"@vivero/stoma": "0.1.0-rc.
|
|
69
|
+
"@vivero/stoma": "0.1.0-rc.10",
|
|
72
70
|
"clipanion": "^4.0.0-rc.4",
|
|
73
71
|
"esbuild": "^0.25.0",
|
|
74
72
|
"hono": "^4.7.0"
|
|
@@ -81,4 +79,4 @@
|
|
|
81
79
|
"typescript": "^5.9.3",
|
|
82
80
|
"vitest": "3.2.4"
|
|
83
81
|
}
|
|
84
|
-
}
|
|
82
|
+
}
|