@contractspec/app.cli-contractspec 1.44.1 → 1.45.1
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 +49 -0
- package/dist/bun/cli.js +5520 -3639
- package/dist/node/cli.js +5219 -3339
- package/docs/ci-cd.md +19 -19
- package/package.json +13 -12
package/docs/ci-cd.md
CHANGED
|
@@ -109,8 +109,8 @@ jobs:
|
|
|
109
109
|
|
|
110
110
|
- name: Run ContractSpec CI
|
|
111
111
|
run: |
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
bunx contractspec ci --format sarif --output results.sarif
|
|
113
|
+
bunx contractspec ci --format text
|
|
114
114
|
|
|
115
115
|
- name: Upload SARIF to GitHub Code Scanning
|
|
116
116
|
uses: github/codeql-action/upload-sarif@v4
|
|
@@ -140,8 +140,8 @@ contractspec:
|
|
|
140
140
|
image: oven/bun:latest
|
|
141
141
|
script:
|
|
142
142
|
- bun install
|
|
143
|
-
-
|
|
144
|
-
-
|
|
143
|
+
- bunx contractspec ci --format json --output results.json
|
|
144
|
+
- bunx contractspec ci --format text
|
|
145
145
|
artifacts:
|
|
146
146
|
reports:
|
|
147
147
|
# GitLab doesn't natively support SARIF, but you can store as artifact
|
|
@@ -159,7 +159,7 @@ contractspec-sast:
|
|
|
159
159
|
image: oven/bun:latest
|
|
160
160
|
script:
|
|
161
161
|
- bun install
|
|
162
|
-
-
|
|
162
|
+
- bunx contractspec ci --format sarif --output gl-sast-report.json
|
|
163
163
|
artifacts:
|
|
164
164
|
reports:
|
|
165
165
|
sast: gl-sast-report.json
|
|
@@ -190,12 +190,12 @@ pipeline {
|
|
|
190
190
|
steps {
|
|
191
191
|
script {
|
|
192
192
|
def result = sh(
|
|
193
|
-
script: '
|
|
193
|
+
script: 'bunx contractspec ci --format json --output results.json',
|
|
194
194
|
returnStatus: true
|
|
195
195
|
)
|
|
196
196
|
|
|
197
197
|
// Also generate human-readable output
|
|
198
|
-
sh '
|
|
198
|
+
sh 'bunx contractspec ci --format text || true'
|
|
199
199
|
|
|
200
200
|
// Archive results
|
|
201
201
|
archiveArtifacts artifacts: 'results.json', allowEmptyArchive: true
|
|
@@ -239,11 +239,11 @@ node {
|
|
|
239
239
|
|
|
240
240
|
stage('Validate') {
|
|
241
241
|
def exitCode = sh(
|
|
242
|
-
script: '
|
|
242
|
+
script: 'bunx contractspec ci --format json --output results.json',
|
|
243
243
|
returnStatus: true
|
|
244
244
|
)
|
|
245
245
|
|
|
246
|
-
sh '
|
|
246
|
+
sh 'bunx contractspec ci --format text || true'
|
|
247
247
|
|
|
248
248
|
archiveArtifacts 'results.json'
|
|
249
249
|
|
|
@@ -274,8 +274,8 @@ phases:
|
|
|
274
274
|
|
|
275
275
|
build:
|
|
276
276
|
commands:
|
|
277
|
-
-
|
|
278
|
-
-
|
|
277
|
+
- bunx contractspec ci --format json --output results.json
|
|
278
|
+
- bunx contractspec ci --format text
|
|
279
279
|
|
|
280
280
|
post_build:
|
|
281
281
|
commands:
|
|
@@ -317,8 +317,8 @@ jobs:
|
|
|
317
317
|
- run:
|
|
318
318
|
name: Run ContractSpec CI
|
|
319
319
|
command: |
|
|
320
|
-
|
|
321
|
-
|
|
320
|
+
bunx contractspec ci --format json --output results.json
|
|
321
|
+
bunx contractspec ci --format text
|
|
322
322
|
- store_artifacts:
|
|
323
323
|
path: results.json
|
|
324
324
|
destination: contractspec-results
|
|
@@ -360,8 +360,8 @@ steps:
|
|
|
360
360
|
displayName: 'Install dependencies'
|
|
361
361
|
|
|
362
362
|
- script: |
|
|
363
|
-
|
|
364
|
-
|
|
363
|
+
bunx contractspec ci --format json --output $(Build.ArtifactStagingDirectory)/results.json
|
|
364
|
+
bunx contractspec ci --format text
|
|
365
365
|
displayName: 'Run ContractSpec CI'
|
|
366
366
|
continueOnError: true
|
|
367
367
|
|
|
@@ -393,8 +393,8 @@ pipelines:
|
|
|
393
393
|
name: Validate Contracts
|
|
394
394
|
script:
|
|
395
395
|
- bun install
|
|
396
|
-
-
|
|
397
|
-
-
|
|
396
|
+
- bunx contractspec ci --format json --output results.json
|
|
397
|
+
- bunx contractspec ci --format text
|
|
398
398
|
artifacts:
|
|
399
399
|
- results.json
|
|
400
400
|
|
|
@@ -404,8 +404,8 @@ pipelines:
|
|
|
404
404
|
name: Validate Contracts
|
|
405
405
|
script:
|
|
406
406
|
- bun install
|
|
407
|
-
-
|
|
408
|
-
-
|
|
407
|
+
- bunx contractspec ci --format json --output results.json
|
|
408
|
+
- bunx contractspec ci --format text
|
|
409
409
|
artifacts:
|
|
410
410
|
- results.json
|
|
411
411
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/app.cli-contractspec",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.1",
|
|
4
4
|
"description": "CLI tool for creating, building, and validating contract specifications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
17
17
|
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
18
|
-
"build": "bun run build:all
|
|
18
|
+
"build": "bun run build:all",
|
|
19
19
|
"build:bun": "bun build --outdir ./dist/bun/ --target bun --minify --sourcemap ./src/cli.ts",
|
|
20
20
|
"build:node": "bun build --outdir ./dist/node/ --target node --minify --sourcemap ./src/cli.ts",
|
|
21
21
|
"build:all": "bun run build:bun && bun run build:node",
|
|
@@ -34,14 +34,15 @@
|
|
|
34
34
|
"@ai-sdk/mistral": "3.0.1",
|
|
35
35
|
"@ai-sdk/openai": "3.0.1",
|
|
36
36
|
"ollama-ai-provider": "^1.2.0",
|
|
37
|
-
"@contractspec/bundle.workspace": "1.
|
|
38
|
-
"@contractspec/lib.ai-providers": "1.
|
|
39
|
-
"@contractspec/lib.contracts": "1.
|
|
40
|
-
"@contractspec/lib.contracts-transformers": "1.
|
|
41
|
-
"@contractspec/lib.testing": "1.
|
|
42
|
-
"@contractspec/lib.schema": "1.
|
|
43
|
-
"@contractspec/module.ai-chat": "1.
|
|
44
|
-
"@contractspec/module.examples": "1.
|
|
37
|
+
"@contractspec/bundle.workspace": "1.45.1",
|
|
38
|
+
"@contractspec/lib.ai-providers": "1.45.1",
|
|
39
|
+
"@contractspec/lib.contracts": "1.45.1",
|
|
40
|
+
"@contractspec/lib.contracts-transformers": "1.45.1",
|
|
41
|
+
"@contractspec/lib.testing": "1.45.1",
|
|
42
|
+
"@contractspec/lib.schema": "1.45.1",
|
|
43
|
+
"@contractspec/module.ai-chat": "1.45.1",
|
|
44
|
+
"@contractspec/module.examples": "1.45.1",
|
|
45
|
+
"@contractspec/module.workspace": "1.45.1",
|
|
45
46
|
"glob": "^13.0.0",
|
|
46
47
|
"commander": "^14.0.2",
|
|
47
48
|
"@inquirer/prompts": "^8.1.0",
|
|
@@ -51,8 +52,8 @@
|
|
|
51
52
|
"zod": "^4.1.13"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
|
-
"@contractspec/tool.tsdown": "1.
|
|
55
|
-
"@contractspec/tool.typescript": "1.
|
|
55
|
+
"@contractspec/tool.tsdown": "1.45.1",
|
|
56
|
+
"@contractspec/tool.typescript": "1.45.1",
|
|
56
57
|
"@types/node": "^22.10.2",
|
|
57
58
|
"rimraf": "^6.1.2",
|
|
58
59
|
"eslint": "^9.39.2"
|