@contractkit/plugin-typescript
Advanced tools
| > @contractkit/plugin-typescript@0.22.0 build:ci /home/runner/work/ContractKit/ContractKit/packages/plugin-typescript | ||
| > @contractkit/plugin-typescript@0.23.0 build:ci /home/runner/work/ContractKit/ContractKit/packages/plugin-typescript | ||
| > eslint --max-warnings=0 && pnpm run build | ||
| > @contractkit/plugin-typescript@0.22.0 build /home/runner/work/ContractKit/ContractKit/packages/plugin-typescript | ||
| > @contractkit/plugin-typescript@0.23.0 build /home/runner/work/ContractKit/ContractKit/packages/plugin-typescript | ||
| > tsup src/index.ts --format esm --sourcemap --dts && tsc --emitDeclarationOnly --declaration | ||
@@ -14,7 +14,7 @@ | ||
| [34mESM[39m Build start | ||
| [32mESM[39m [1mdist/index.js [22m[32m149.45 KB[39m | ||
| [32mESM[39m [1mdist/index.js.map [22m[32m326.03 KB[39m | ||
| [32mESM[39m ⚡️ Build success in 355ms | ||
| [32mESM[39m [1mdist/index.js [22m[32m149.58 KB[39m | ||
| [32mESM[39m [1mdist/index.js.map [22m[32m326.20 KB[39m | ||
| [32mESM[39m ⚡️ Build success in 341ms | ||
| [34mDTS[39m Build start | ||
| [32mDTS[39m ⚡️ Build success in 4808ms | ||
| [32mDTS[39m ⚡️ Build success in 4515ms | ||
| [32mDTS[39m [1mdist/index.d.ts [22m[32m1.82 KB[39m |
| > @contractkit/plugin-typescript@0.22.0 test:ci /home/runner/work/ContractKit/ContractKit/packages/plugin-typescript | ||
| > @contractkit/plugin-typescript@0.23.0 test:ci /home/runner/work/ContractKit/ContractKit/packages/plugin-typescript | ||
| > vitest run --coverage | ||
@@ -9,13 +9,13 @@ | ||
| [32m✓[39m tests/codegen-operation.test.ts [2m([22m[2m88 tests[22m[2m)[22m[32m 96[2mms[22m[39m | ||
| [32m✓[39m tests/codegen-contract.test.ts [2m([22m[2m124 tests[22m[2m)[22m[32m 143[2mms[22m[39m | ||
| [32m✓[39m tests/codegen-sdk.test.ts [2m([22m[2m132 tests[22m[2m)[22m[32m 162[2mms[22m[39m | ||
| [32m✓[39m tests/pipeline.test.ts [2m([22m[2m25 tests[22m[2m)[22m[32m 180[2mms[22m[39m | ||
| [32m✓[39m tests/codegen-contract.test.ts [2m([22m[2m124 tests[22m[2m)[22m[32m 100[2mms[22m[39m | ||
| [32m✓[39m tests/codegen-sdk.test.ts [2m([22m[2m132 tests[22m[2m)[22m[32m 143[2mms[22m[39m | ||
| [32m✓[39m tests/codegen-operation.test.ts [2m([22m[2m88 tests[22m[2m)[22m[32m 53[2mms[22m[39m | ||
| [32m✓[39m tests/codegen-plain-types.test.ts [2m([22m[2m61 tests[22m[2m)[22m[32m 32[2mms[22m[39m | ||
| [32m✓[39m tests/codegen-server.test.ts [2m([22m[2m19 tests[22m[2m)[22m[32m 27[2mms[22m[39m | ||
| [32m✓[39m tests/codegen-server.test.ts [2m([22m[2m19 tests[22m[2m)[22m[32m 36[2mms[22m[39m | ||
| [32m✓[39m tests/pipeline.test.ts [2m([22m[2m25 tests[22m[2m)[22m[32m 186[2mms[22m[39m | ||
| [2m Test Files [22m [1m[32m6 passed[39m[22m[90m (6)[39m | ||
| [2m Tests [22m [1m[32m449 passed[39m[22m[90m (449)[39m | ||
| [2m Start at [22m 13:02:53 | ||
| [2m Duration [22m 6.82s[2m (transform 4.81s, setup 0ms, import 13.71s, tests 640ms, environment 1ms)[22m | ||
| [2m Start at [22m 12:06:49 | ||
| [2m Duration [22m 6.12s[2m (transform 4.90s, setup 0ms, import 11.76s, tests 549ms, environment 20ms)[22m | ||
@@ -26,8 +26,8 @@ [34m % [39m[2mCoverage report from [22m[33mv8[39m | ||
| -------------------|---------|----------|---------|---------|------------------- | ||
| All files | 79.96 | 75.1 | 83.5 | 82.56 | | ||
| src | 79.74 | 74.78 | 83.06 | 82.32 | | ||
| All files | 79.96 | 75.1 | 83.5 | 82.57 | | ||
| src | 79.75 | 74.78 | 83.06 | 82.33 | | ||
| ...n-contract.ts | 87.83 | 82.12 | 90.08 | 88.96 | ...1069,1074-1075 | ||
| ...-operation.ts | 78.13 | 74.26 | 77.77 | 79.69 | ...69-680,685-686 | ||
| ...lain-types.ts | 89.08 | 78.37 | 96.66 | 92.3 | ...31,243,249,301 | ||
| codegen-sdk.ts | 88.07 | 82.56 | 87.32 | 91.3 | ...1106-1107,1110 | ||
| codegen-sdk.ts | 88.09 | 82.56 | 87.32 | 91.32 | ...1108-1109,1112 | ||
| index.ts | 60.23 | 47.91 | 63.04 | 65.37 | ...08-811,827-846 | ||
@@ -34,0 +34,0 @@ path-utils.ts | 41.04 | 31.32 | 78.57 | 42.47 | ...64-168,179-219 |
+6
-0
| # @contractkit/contractkit-plugin-typescript | ||
| ## 0.23.0 | ||
| ### Minor Changes | ||
| - ff6f8ea: Expose response headers on `SdkError`. The generated error now carries `headers: Headers` (the raw `Headers` instance from the failed response) alongside `status`, `statusText`, and `body`, so catchers can read things like `X-Request-ID`, `Retry-After`, or `WWW-Authenticate` for logging, retry logic, and rate-limit handling. | ||
| ## 0.22.0 | ||
@@ -4,0 +10,0 @@ |
@@ -28,3 +28,3 @@ | ||
| <span class="quiet">Statements</span> | ||
| <span class='fraction'>2027/2535</span> | ||
| <span class='fraction'>2028/2536</span> | ||
| </div> | ||
@@ -48,5 +48,5 @@ | ||
| <div class='fl pad1y space-right2'> | ||
| <span class="strong">82.56% </span> | ||
| <span class="strong">82.57% </span> | ||
| <span class="quiet">Lines</span> | ||
| <span class='fraction'>1776/2151</span> | ||
| <span class='fraction'>1777/2152</span> | ||
| </div> | ||
@@ -85,7 +85,7 @@ | ||
| <td class="file medium" data-value="src"><a href="src/index.html">src</a></td> | ||
| <td data-value="79.74" class="pic medium"> | ||
| <td data-value="79.75" class="pic medium"> | ||
| <div class="chart"><div class="cover-fill" style="width: 79%"></div><div class="cover-empty" style="width: 21%"></div></div> | ||
| </td> | ||
| <td data-value="79.74" class="pct medium">79.74%</td> | ||
| <td data-value="2483" class="abs medium">1980/2483</td> | ||
| <td data-value="79.75" class="pct medium">79.75%</td> | ||
| <td data-value="2484" class="abs medium">1981/2484</td> | ||
| <td data-value="74.78" class="pct medium">74.78%</td> | ||
@@ -95,4 +95,4 @@ <td data-value="1602" class="abs medium">1198/1602</td> | ||
| <td data-value="372" class="abs high">309/372</td> | ||
| <td data-value="82.32" class="pct high">82.32%</td> | ||
| <td data-value="2105" class="abs high">1733/2105</td> | ||
| <td data-value="82.33" class="pct high">82.33%</td> | ||
| <td data-value="2106" class="abs high">1734/2106</td> | ||
| </tr> | ||
@@ -123,3 +123,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-08T13:03:00.695Z | ||
| at 2026-05-12T12:06:55.452Z | ||
| </div> | ||
@@ -126,0 +126,0 @@ <script src="prettify.js"></script> |
@@ -985,3 +985,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-08T13:03:00.695Z | ||
| at 2026-05-12T12:06:55.452Z | ||
| </div> | ||
@@ -988,0 +988,0 @@ <script src="../prettify.js"></script> |
+10
-10
@@ -26,5 +26,5 @@ | ||
| <div class='fl pad1y space-right2'> | ||
| <span class="strong">79.74% </span> | ||
| <span class="strong">79.75% </span> | ||
| <span class="quiet">Statements</span> | ||
| <span class='fraction'>1980/2483</span> | ||
| <span class='fraction'>1981/2484</span> | ||
| </div> | ||
@@ -48,5 +48,5 @@ | ||
| <div class='fl pad1y space-right2'> | ||
| <span class="strong">82.32% </span> | ||
| <span class="strong">82.33% </span> | ||
| <span class="quiet">Lines</span> | ||
| <span class='fraction'>1733/2105</span> | ||
| <span class='fraction'>1734/2106</span> | ||
| </div> | ||
@@ -130,7 +130,7 @@ | ||
| <td class="file high" data-value="codegen-sdk.ts"><a href="codegen-sdk.ts.html">codegen-sdk.ts</a></td> | ||
| <td data-value="88.07" class="pic high"> | ||
| <td data-value="88.09" class="pic high"> | ||
| <div class="chart"><div class="cover-fill" style="width: 88%"></div><div class="cover-empty" style="width: 12%"></div></div> | ||
| </td> | ||
| <td data-value="88.07" class="pct high">88.07%</td> | ||
| <td data-value="629" class="abs high">554/629</td> | ||
| <td data-value="88.09" class="pct high">88.09%</td> | ||
| <td data-value="630" class="abs high">555/630</td> | ||
| <td data-value="82.56" class="pct high">82.56%</td> | ||
@@ -140,4 +140,4 @@ <td data-value="367" class="abs high">303/367</td> | ||
| <td data-value="71" class="abs high">62/71</td> | ||
| <td data-value="91.3" class="pct high">91.3%</td> | ||
| <td data-value="552" class="abs high">504/552</td> | ||
| <td data-value="91.32" class="pct high">91.32%</td> | ||
| <td data-value="553" class="abs high">505/553</td> | ||
| </tr> | ||
@@ -198,3 +198,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-08T13:03:00.695Z | ||
| at 2026-05-12T12:06:55.452Z | ||
| </div> | ||
@@ -201,0 +201,0 @@ <script src="../prettify.js"></script> |
@@ -733,3 +733,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-08T13:03:00.695Z | ||
| at 2026-05-12T12:06:55.452Z | ||
| </div> | ||
@@ -736,0 +736,0 @@ <script src="../prettify.js"></script> |
@@ -580,3 +580,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-08T13:03:00.695Z | ||
| at 2026-05-12T12:06:55.452Z | ||
| </div> | ||
@@ -583,0 +583,0 @@ <script src="../prettify.js"></script> |
@@ -814,3 +814,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-08T13:03:00.695Z | ||
| at 2026-05-12T12:06:55.452Z | ||
| </div> | ||
@@ -817,0 +817,0 @@ <script src="../prettify.js"></script> |
@@ -104,3 +104,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-08T13:03:00.695Z | ||
| at 2026-05-12T12:06:55.452Z | ||
| </div> | ||
@@ -107,0 +107,0 @@ <script src="../prettify.js"></script> |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"codegen-sdk.d.ts","sourceRoot":"","sources":["../src/codegen-sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAkF,MAAM,mBAAmB,CAAC;AA2DpI,+DAA+D;AAC/D,MAAM,WAAW,iBAAiB;IAC9B,6GAA6G;IAC7G,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,6FAA6F;IAC7F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sFAAsF;IACtF,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,8GAA8G;IAC9G,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qFAAqF;IACrF,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,eAAe,UAAQ,GAAG,OAAO,CAOtF;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,GAAE,iBAAsB,GAAG,MAAM,CAmHrF;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACjC,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,iBAAiB,GAC3B;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAE,CAe5C;AAsTD,gIAAgI;AAChI,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1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+EAA+E;IAC/E,YAAY,EAAE,MAAM,CAAC;IACrB,mFAAmF;IACnF,UAAU,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B,kBAAkB;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,mIAAmI;IACnI,cAAc,EAAE,iBAAiB,CAAC;CACrC;AAED,2DAA2D;AAC3D,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IAC/B,8FAA8F;IAC9F,eAAe,EAAE,aAAa,EAAE,CAAC;IACjC,iCAAiC;IACjC,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,kFAAkF;IAClF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,4CAA4C;AAC5C,MAAM,WAAW,eAAe;IAC5B,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,+HAA+H;IAC/H,OAAO,EAAE,MAAM,CAAC;IAChB,0GAA0G;IAC1G,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,2EAA2E;IAC3E,cAAc,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAE,EAAE,CAAC;IAClE,yEAAyE;IACzE,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CA8GjE;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAyCvE"} |
+3
-3
| { | ||
| "name": "@contractkit/plugin-typescript", | ||
| "version": "0.22.0", | ||
| "version": "0.23.0", | ||
| "description": "ContractKit built-in plugin: TypeScript codegen (SDK clients, Koa routers, Zod schemas, plain types)", | ||
@@ -32,4 +32,4 @@ "author": { | ||
| "devDependencies": { | ||
| "@repo/config-eslint": "0.3.1", | ||
| "@repo/config-typescript": "0.1.0" | ||
| "@repo/config-typescript": "0.1.0", | ||
| "@repo/config-eslint": "0.3.1" | ||
| }, | ||
@@ -36,0 +36,0 @@ "scripts": { |
+1
-1
@@ -146,3 +146,3 @@ # @contractkit/contractkit-plugin-typescript | ||
| - `SdkOptions` / `SdkFetch` / `SdkError` / `createSdkFetch` — base client primitives | ||
| - `SdkOptions` / `SdkFetch` / `SdkError` / `createSdkFetch` — base client primitives. `SdkError` is thrown on any non-2xx response and exposes `status`, `statusText`, `body`, and `headers` (the raw `Headers` instance) for downstream use. | ||
| - `buildQueryString(query)` — serialises a query params object to `?key=value` or `''` | ||
@@ -149,0 +149,0 @@ - `parseJson<T>(res)` — deserialises a `Response` body to `T` |
@@ -141,2 +141,3 @@ import type { OpRootNode, OpRouteNode, OpOperationNode, OpRequestBodyNode, ContractTypeNode, ParamSource } from '@contractkit/core'; | ||
| lines.push(' public readonly body: unknown,'); | ||
| lines.push(' public readonly headers: Headers,'); | ||
| lines.push(' ) {'); | ||
@@ -172,3 +173,3 @@ lines.push(' super(`${status} ${statusText}`);'); | ||
| lines.push(' try { body = JSON.parse(text); } catch { body = text; }'); | ||
| lines.push(' throw new SdkError(res.status, res.statusText, body);'); | ||
| lines.push(' throw new SdkError(res.status, res.statusText, body, res.headers);'); | ||
| lines.push(' }'); | ||
@@ -890,2 +891,3 @@ lines.push(' return res;'); | ||
| ' public readonly body: unknown,', | ||
| ' public readonly headers: Headers,', | ||
| ' ) {', | ||
@@ -937,3 +939,3 @@ ' super(`${status} ${statusText}`);', | ||
| ' try { body = JSON.parse(text); } catch { body = text; }', | ||
| ' throw new SdkError(res.status, res.statusText, body);', | ||
| ' throw new SdkError(res.status, res.statusText, body, res.headers);', | ||
| ' }', | ||
@@ -940,0 +942,0 @@ ' return res;', |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
2531521
0.07%16208
0.05%