@contractkit/plugin-typescript 0.26.0 → 0.27.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.
@@ -5,9 +5,9 @@ $ tsup src/index.ts --format esm --sourcemap --dts && tsc --emitDeclarationOnly
5
5
  CLI tsup v8.5.1
6
6
  CLI Target: esnext
7
7
  ESM Build start
8
- ESM dist/index.js 150.35 KB
9
- ESM dist/index.js.map 328.43 KB
10
- ESM ⚡️ Build success in 348ms
8
+ ESM dist/index.js 152.62 KB
9
+ ESM dist/index.js.map 335.05 KB
10
+ ESM ⚡️ Build success in 416ms
11
11
  DTS Build start
12
- DTS ⚡️ Build success in 7174ms
13
- DTS dist/index.d.ts 1.82 KB
12
+ DTS ⚡️ Build success in 5954ms
13
+ DTS dist/index.d.ts 2.35 KB
@@ -3,30 +3,30 @@ $ vitest run --coverage
3
3
   RUN  v4.1.5 /home/runner/work/ContractKit/ContractKit/packages/plugin-typescript
4
4
  Coverage enabled with v8
5
5
 
6
- ✓ tests/codegen-contract.test.ts (127 tests) 167ms
7
- ✓ tests/codegen-operation.test.ts (89 tests) 187ms
8
- ✓ tests/codegen-sdk.test.ts (132 tests) 186ms
9
- ✓ tests/codegen-plain-types.test.ts (61 tests) 51ms
10
- ✓ tests/codegen-server.test.ts (19 tests) 74ms
11
- ✓ tests/pipeline.test.ts (25 tests) 177ms
6
+ ✓ tests/codegen-contract.test.ts (127 tests) 150ms
7
+ ✓ tests/codegen-operation.test.ts (89 tests) 151ms
8
+ ✓ tests/codegen-sdk.test.ts (138 tests) 206ms
9
+ ✓ tests/codegen-plain-types.test.ts (61 tests) 34ms
10
+ ✓ tests/codegen-server.test.ts (22 tests) 103ms
11
+ ✓ tests/pipeline.test.ts (25 tests) 171ms
12
12
 
13
13
   Test Files  6 passed (6)
14
-  Tests  453 passed (453)
15
-  Start at  19:14:39
16
-  Duration  7.36s (transform 4.18s, setup 0ms, import 14.22s, tests 841ms, environment 12ms)
14
+  Tests  462 passed (462)
15
+  Start at  15:55:38
16
+  Duration  7.14s (transform 4.98s, setup 0ms, import 13.67s, tests 815ms, environment 1ms)
17
17
 
18
18
   % Coverage report from v8
19
19
  -------------------|---------|----------|---------|---------|-------------------
20
20
  File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
21
21
  -------------------|---------|----------|---------|---------|-------------------
22
- All files | 80.05 | 75.37 | 83.66 | 82.64 |
23
- src | 79.83 | 75.06 | 83.24 | 82.41 |
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.09 | 82.56 | 87.32 | 91.32 | ...1108-1109,1112
28
- index.ts | 60.23 | 47.91 | 63.04 | 65.37 | ...08-811,827-846
29
- path-utils.ts | 41.04 | 31.32 | 78.57 | 42.47 | ...64-168,179-219
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,16 @@
1
1
  # @contractkit/contractkit-plugin-typescript
2
2
 
3
+ ## 0.27.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 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.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [0d3b8e2]
12
+ - @contractkit/core@0.22.0
13
+
3
14
  ## 0.26.0
4
15
 
5
16
  ### Minor Changes