@gate-forge/cli 0.21.1 → 0.22.0
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 +8 -0
- package/guides/QUICKSTART.md +5 -5
- package/guides/REFERENCE.md +23 -0
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.22.0
|
|
4
|
+
|
|
5
|
+
- **Added: wrapper verb from a call-site `method` option.**
|
|
6
|
+
`scan.httpClients.wrapperFunctions[].methodOption` names the wrapper
|
|
7
|
+
parameter whose `method` property carries the verb. A literal is the
|
|
8
|
+
verb, a missing option is the entry's `method`, and anything else is
|
|
9
|
+
`HTTP_METHOD_DYNAMIC`. Existing entries are unaffected.
|
|
10
|
+
|
|
3
11
|
## 0.21.1
|
|
4
12
|
|
|
5
13
|
- **Fixed: pack-sqlalchemy discover waits up to 10 minutes before the plugin is killed.**
|
package/guides/QUICKSTART.md
CHANGED
|
@@ -24,11 +24,11 @@ Example for a React frontend, FastAPI backend, and SQLAlchemy data layer:
|
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
26
|
npm i -D \
|
|
27
|
-
@gate-forge/cli@0.
|
|
28
|
-
@gate-forge/pack-playwright@0.
|
|
29
|
-
@gate-forge/pack-http@0.
|
|
30
|
-
@gate-forge/pack-fastapi@0.
|
|
31
|
-
@gate-forge/pack-sqlalchemy@0.
|
|
27
|
+
@gate-forge/cli@0.22.0 \
|
|
28
|
+
@gate-forge/pack-playwright@0.22.0 \
|
|
29
|
+
@gate-forge/pack-http@0.22.0 \
|
|
30
|
+
@gate-forge/pack-fastapi@0.22.0 \
|
|
31
|
+
@gate-forge/pack-sqlalchemy@0.22.0
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
Use the project-local `gateforge` binary from your npm script or add `node_modules/.bin` to your shell `PATH`. If the scan recommends other packs, add only the ones your code uses, at the same version. A mismatched Gateforge package contract can stop the CLI with exit code 2 and `GATEFORGE_PACKAGE_INCOMPATIBLE`.
|
package/guides/REFERENCE.md
CHANGED
|
@@ -2161,6 +2161,29 @@ direct call sites:
|
|
|
2161
2161
|
exactly as before them. A JSX wrapper usage
|
|
2162
2162
|
binds the wrapper's first parameter when no `parameter` is
|
|
2163
2163
|
configured, the same contract the direct call path applies.
|
|
2164
|
+
- **Wrapper verb from a call-site option.** A `wrapperFunctions` entry
|
|
2165
|
+
with `methodOption: <parameter>` takes its verb from the `method`
|
|
2166
|
+
property of the object its caller passes for that parameter. A literal
|
|
2167
|
+
verb (or a constant the scan resolves to one, spreads following
|
|
2168
|
+
JavaScript's last-writer-wins order) is the call's verb. A call site
|
|
2169
|
+
that passes no such object, or one provably without `method`, gets the
|
|
2170
|
+
entry's `method`, which is required with `methodOption`. Anything
|
|
2171
|
+
else, such as a prop, a parameter or a computed value, is
|
|
2172
|
+
`HTTP_METHOD_DYNAMIC` with no call record. The wrapper body's own verb
|
|
2173
|
+
branches (`x === 'delete' ? client.delete(...) : client[x](...)`) are
|
|
2174
|
+
not read for the verb. A JSX usage, or a call from inside another
|
|
2175
|
+
declared wrapper, has no modeled call-site option and fails closed.
|
|
2176
|
+
`methodOption` and `methodFromBody` exclude each other:
|
|
2177
|
+
|
|
2178
|
+
```yaml
|
|
2179
|
+
scan:
|
|
2180
|
+
httpClients:
|
|
2181
|
+
wrapperFunctions:
|
|
2182
|
+
- name: useSend
|
|
2183
|
+
parameter: endpoint
|
|
2184
|
+
method: POST
|
|
2185
|
+
methodOption: options
|
|
2186
|
+
```
|
|
2164
2187
|
|
|
2165
2188
|
## Migrating to 0.11
|
|
2166
2189
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gate-forge/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"gateforgeCompatibility": {
|
|
5
5
|
"supervisedFixtureProtocol": "gateforge.supervised-playwright.v1"
|
|
6
6
|
},
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
"test": "vitest run"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@gate-forge/core": "^0.
|
|
37
|
-
"@gate-forge/http-contract": "^0.
|
|
38
|
-
"@gate-forge/pack-alembic": "^0.
|
|
39
|
-
"@gate-forge/pack-fastapi": "^0.
|
|
40
|
-
"@gate-forge/pack-http": "^0.
|
|
41
|
-
"@gate-forge/pack-playwright": "^0.
|
|
42
|
-
"@gate-forge/pack-react-router": "^0.
|
|
43
|
-
"@gate-forge/pack-sqlalchemy": "^0.
|
|
44
|
-
"@gate-forge/pack-task": "^0.
|
|
45
|
-
"@gate-forge/plugin-protocol": "^0.
|
|
36
|
+
"@gate-forge/core": "^0.22.0",
|
|
37
|
+
"@gate-forge/http-contract": "^0.22.0",
|
|
38
|
+
"@gate-forge/pack-alembic": "^0.22.0",
|
|
39
|
+
"@gate-forge/pack-fastapi": "^0.22.0",
|
|
40
|
+
"@gate-forge/pack-http": "^0.22.0",
|
|
41
|
+
"@gate-forge/pack-playwright": "^0.22.0",
|
|
42
|
+
"@gate-forge/pack-react-router": "^0.22.0",
|
|
43
|
+
"@gate-forge/pack-sqlalchemy": "^0.22.0",
|
|
44
|
+
"@gate-forge/pack-task": "^0.22.0",
|
|
45
|
+
"@gate-forge/plugin-protocol": "^0.22.0",
|
|
46
46
|
"picomatch": "^4.0.7",
|
|
47
47
|
"yaml": "^2.8.1"
|
|
48
48
|
},
|