@contractkit/plugin-typescript 0.26.0 → 0.28.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/.turbo/turbo-build$colon$ci.log +5 -5
- package/.turbo/turbo-test$colon$ci.log +14 -14
- package/CHANGELOG.md +17 -0
- package/coverage/clover.xml +855 -839
- package/coverage/coverage-final.json +7 -7
- package/coverage/index.html +20 -20
- package/coverage/src/codegen-contract.ts.html +150 -150
- package/coverage/src/codegen-operation.ts.html +6 -6
- package/coverage/src/codegen-plain-types.ts.html +58 -58
- package/coverage/src/codegen-sdk.ts.html +445 -211
- package/coverage/src/index.html +40 -40
- package/coverage/src/index.ts.html +295 -184
- package/coverage/src/path-utils.ts.html +105 -105
- package/coverage/src/ts-render.ts.html +9 -9
- package/coverage/tests/helpers.ts.html +19 -19
- package/coverage/tests/index.html +1 -1
- package/dist/codegen-sdk.d.ts +22 -0
- package/dist/codegen-sdk.d.ts.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +94 -7
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/codegen-operation.ts +5 -5
- package/src/codegen-sdk.ts +78 -0
- package/src/index.ts +40 -3
- package/tests/codegen-operation.test.ts +5 -5
- package/tests/codegen-sdk.test.ts +48 -0
- package/tests/codegen-server.test.ts +107 -0
|
@@ -5,9 +5,9 @@ $ tsup src/index.ts --format esm --sourcemap --dts && tsc --emitDeclarationOnly
|
|
|
5
5
|
[34mCLI[39m tsup v8.5.1
|
|
6
6
|
[34mCLI[39m Target: esnext
|
|
7
7
|
[34mESM[39m Build start
|
|
8
|
-
[32mESM[39m [1mdist/index.js [22m[
|
|
9
|
-
[32mESM[39m [1mdist/index.js.map [22m[
|
|
10
|
-
[32mESM[39m ⚡️ Build success in
|
|
8
|
+
[32mESM[39m [1mdist/index.js [22m[32m152.65 KB[39m
|
|
9
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m335.08 KB[39m
|
|
10
|
+
[32mESM[39m ⚡️ Build success in 388ms
|
|
11
11
|
[34mDTS[39m Build start
|
|
12
|
-
[32mDTS[39m ⚡️ Build success in
|
|
13
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
12
|
+
[32mDTS[39m ⚡️ Build success in 5659ms
|
|
13
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m2.35 KB[39m
|
|
@@ -3,30 +3,30 @@ $ vitest run --coverage
|
|
|
3
3
|
[1m[30m[46m RUN [49m[39m[22m [36mv4.1.5 [39m[90m/home/runner/work/ContractKit/ContractKit/packages/plugin-typescript[39m
|
|
4
4
|
[2mCoverage enabled with [22m[33mv8[39m
|
|
5
5
|
|
|
6
|
-
[32m✓[39m tests/codegen-contract.test.ts [2m([22m[2m127 tests[22m[2m)[22m[32m
|
|
7
|
-
[32m✓[39m tests/codegen-
|
|
8
|
-
[32m✓[39m tests/codegen-
|
|
9
|
-
[32m✓[39m tests/codegen-plain-types.test.ts [2m([22m[2m61 tests[22m[2m)[22m[32m
|
|
10
|
-
[32m✓[39m tests/codegen-server.test.ts [2m([22m[
|
|
11
|
-
[32m✓[39m tests/pipeline.test.ts [2m([22m[2m25 tests[22m[2m)[22m[32m
|
|
6
|
+
[32m✓[39m tests/codegen-contract.test.ts [2m([22m[2m127 tests[22m[2m)[22m[32m 87[2mms[22m[39m
|
|
7
|
+
[32m✓[39m tests/codegen-sdk.test.ts [2m([22m[2m138 tests[22m[2m)[22m[32m 167[2mms[22m[39m
|
|
8
|
+
[32m✓[39m tests/codegen-operation.test.ts [2m([22m[2m89 tests[22m[2m)[22m[32m 224[2mms[22m[39m
|
|
9
|
+
[32m✓[39m tests/codegen-plain-types.test.ts [2m([22m[2m61 tests[22m[2m)[22m[32m 69[2mms[22m[39m
|
|
10
|
+
[32m✓[39m tests/codegen-server.test.ts [2m([22m[2m22 tests[22m[2m)[22m[32m 60[2mms[22m[39m
|
|
11
|
+
[32m✓[39m tests/pipeline.test.ts [2m([22m[2m25 tests[22m[2m)[22m[32m 153[2mms[22m[39m
|
|
12
12
|
|
|
13
13
|
[2m Test Files [22m [1m[32m6 passed[39m[22m[90m (6)[39m
|
|
14
|
-
[2m Tests [22m [1m[
|
|
15
|
-
[2m Start at [22m
|
|
16
|
-
[2m Duration [22m
|
|
14
|
+
[2m Tests [22m [1m[32m462 passed[39m[22m[90m (462)[39m
|
|
15
|
+
[2m Start at [22m 16:24:02
|
|
16
|
+
[2m Duration [22m 8.54s[2m (transform 5.16s, setup 0ms, import 16.94s, tests 760ms, environment 16ms)[22m
|
|
17
17
|
|
|
18
18
|
[34m % [39m[2mCoverage report from [22m[33mv8[39m
|
|
19
19
|
-------------------|---------|----------|---------|---------|-------------------
|
|
20
20
|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
|
|
21
21
|
-------------------|---------|----------|---------|---------|-------------------
|
|
22
|
-
All files |
|
|
23
|
-
src |
|
|
22
|
+
All files | 82.85 | 77.33 | 85.78 | 85.48 |
|
|
23
|
+
src | 82.7 | 77.05 | 85.52 | 85.31 |
|
|
24
24
|
...n-contract.ts | 87.92 | 82.7 | 90.08 | 89.06 | ...1085,1090-1091
|
|
25
25
|
...-operation.ts | 78.41 | 74.7 | 78.94 | 79.9 | ...80-691,696-697
|
|
26
26
|
...lain-types.ts | 89.08 | 78.37 | 96.66 | 92.3 | ...31,243,249,301
|
|
27
|
-
codegen-sdk.ts | 88.
|
|
28
|
-
index.ts |
|
|
29
|
-
path-utils.ts |
|
|
27
|
+
codegen-sdk.ts | 88.33 | 83.2 | 87.67 | 91.47 | ...1186-1187,1190
|
|
28
|
+
index.ts | 70.05 | 60.38 | 75 | 74.74 | ...45-848,864-883
|
|
29
|
+
path-utils.ts | 68.65 | 46.98 | 100 | 72.56 | ...48-151,199-214
|
|
30
30
|
ts-render.ts | 82.19 | 85.39 | 72.22 | 87.09 | 56,90,126,157-165
|
|
31
31
|
tests | 90.38 | 90.9 | 89.28 | 93.47 |
|
|
32
32
|
helpers.ts | 90.38 | 90.9 | 89.28 | 93.47 | 110-118
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @contractkit/contractkit-plugin-typescript
|
|
2
2
|
|
|
3
|
+
## 0.28.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8ac8343: Generated Koa routers now read the incoming request body from `ctx.parsedBody` instead of `ctx.body`, matching serverkit's refactor. The response body is still assigned via `ctx.body`.
|
|
8
|
+
|
|
9
|
+
## 0.27.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 0d3b8e2: Add opt-in `sdk.scaffold` to the TypeScript plugin, which emits a starter `package.json` and `tsconfig.json` at the SDK `baseDir` so generated output is a buildable, publishable package. Dependencies are derived from the contracts (`zod` when `zod: true`; `luxon`/`@types/luxon` when a date/time scalar is used). Scaffold files are write-once: a new `ctx.emitFile(path, content, { ifAbsent: true })` option writes them only when absent and never overwrites or orphan-deletes them, so disabling `scaffold` or editing the files later is always safe.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [0d3b8e2]
|
|
18
|
+
- @contractkit/core@0.22.0
|
|
19
|
+
|
|
3
20
|
## 0.26.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|