carrick 0.3.85 → 0.3.86
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "carrick",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.86",
|
|
4
4
|
"description": "The API contract index for a TypeScript workspace: what the other services do with the routes and calls in the file you are editing, in your editor and in your agent's context",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
"zod": "^3.23.0"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
61
|
-
"@carrick-tools/cli-darwin-arm64": "0.3.
|
|
62
|
-
"@carrick-tools/cli-darwin-x64": "0.3.
|
|
63
|
-
"@carrick-tools/cli-linux-arm64": "0.3.
|
|
64
|
-
"@carrick-tools/cli-linux-x64": "0.3.
|
|
65
|
-
"@carrick-tools/cli-win32-x64": "0.3.
|
|
61
|
+
"@carrick-tools/cli-darwin-arm64": "0.3.86",
|
|
62
|
+
"@carrick-tools/cli-darwin-x64": "0.3.86",
|
|
63
|
+
"@carrick-tools/cli-linux-arm64": "0.3.86",
|
|
64
|
+
"@carrick-tools/cli-linux-x64": "0.3.86",
|
|
65
|
+
"@carrick-tools/cli-win32-x64": "0.3.86"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/node": "^24.13.3",
|
|
@@ -708,7 +708,16 @@ export declare class TypeInferrer {
|
|
|
708
708
|
* True when an object literal argument is response INIT rather than a body:
|
|
709
709
|
* every property it declares is one the standard `ResponseInit` declares
|
|
710
710
|
* (`status`, `statusText`, `headers`), and it states at least one of them as
|
|
711
|
-
* init really does — a
|
|
711
|
+
* init really does — a status in the HTTP range, or headers.
|
|
712
|
+
*
|
|
713
|
+
* The status does NOT have to be a literal code. A route that carries its
|
|
714
|
+
* outcome in a value writes `new Response(body, { status: result.status })`,
|
|
715
|
+
* where the source fixes no code and `statedStatusCodes` answers
|
|
716
|
+
* `'variable'` — status-shaped, just not pinned. Requiring a literal there
|
|
717
|
+
* left the whole init object reading as a body, so an endpoint whose payload
|
|
718
|
+
* this layer does not publish (a string body) published `{ status: number }`
|
|
719
|
+
* as its response contract instead: a wrong contract, served, where an
|
|
720
|
+
* abstention was the honest answer.
|
|
712
721
|
*
|
|
713
722
|
* A payload that merely has a `status` member of its own (`{ status: "ok",
|
|
714
723
|
* service: "ledger" }`) declares members init does not, or states `status` as
|
|
@@ -3029,7 +3029,16 @@ export class TypeInferrer {
|
|
|
3029
3029
|
* True when an object literal argument is response INIT rather than a body:
|
|
3030
3030
|
* every property it declares is one the standard `ResponseInit` declares
|
|
3031
3031
|
* (`status`, `statusText`, `headers`), and it states at least one of them as
|
|
3032
|
-
* init really does — a
|
|
3032
|
+
* init really does — a status in the HTTP range, or headers.
|
|
3033
|
+
*
|
|
3034
|
+
* The status does NOT have to be a literal code. A route that carries its
|
|
3035
|
+
* outcome in a value writes `new Response(body, { status: result.status })`,
|
|
3036
|
+
* where the source fixes no code and `statedStatusCodes` answers
|
|
3037
|
+
* `'variable'` — status-shaped, just not pinned. Requiring a literal there
|
|
3038
|
+
* left the whole init object reading as a body, so an endpoint whose payload
|
|
3039
|
+
* this layer does not publish (a string body) published `{ status: number }`
|
|
3040
|
+
* as its response contract instead: a wrong contract, served, where an
|
|
3041
|
+
* abstention was the honest answer.
|
|
3033
3042
|
*
|
|
3034
3043
|
* A payload that merely has a `status` member of its own (`{ status: "ok",
|
|
3035
3044
|
* service: "ledger" }`) declares members init does not, or states `status` as
|
|
@@ -3058,7 +3067,7 @@ export class TypeInferrer {
|
|
|
3058
3067
|
statesInit = true;
|
|
3059
3068
|
continue;
|
|
3060
3069
|
}
|
|
3061
|
-
if (name === 'status' &&
|
|
3070
|
+
if (name === 'status' && this.statedStatusCodes(value) !== undefined) {
|
|
3062
3071
|
statesInit = true;
|
|
3063
3072
|
}
|
|
3064
3073
|
}
|