Skip to content

Commit

Permalink
feat: add typecheck scripts
Browse files Browse the repository at this point in the history
squashme: copy openapi spec to sdk folder

squashme: build the sdk

fix: deleting tsbuildinfo

feat: run typecheck
  • Loading branch information
drew-harris authored and skeptrunedev committed Aug 30, 2024
1 parent d86946c commit 660a3ab
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 12 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/rust-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,11 @@ jobs:
run: cargo run --features runtime-env --manifest-path server/Cargo.toml --bin redoc_ci > openapi.json
- name: Vaccum lint
run: vacuum lint openapi.json -r '.github/rules.yaml' -d
- name: Copy OpenAPI spec to sdk folder
run: cp openapi.json ./clients/ts-sdk/openapi.json
- name: Build the TS SDK
working-directory: ./clients/ts-sdk
run: yarn && yarn build:clean
- name: Typecheck all frontends
run: yarn && yarn typecheck

2 changes: 1 addition & 1 deletion clients/ts-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "MIT",
"scripts": {
"lint": "eslint 'src/**/*.ts'",
"build:clean": "rm tsconfig.tsbuildinfo && rm -rf dist && yarn type:gen && yarn build",
"build:clean": "rm -f tsconfig.tsbuildinfo && rm -rf dist && yarn type:gen && yarn build",
"build": "yarn build:src && yarn type:dts",
"build:src": "node ./scripts/build.js",
"type:gen": "node ./scripts/genClient.js",
Expand Down
3 changes: 2 additions & 1 deletion frontends/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"preview": "vite preview",
"lint": "prettier --write \"**/*.{js,jsx,ts,tsx,md,mdx,}\" && eslint --fix \"src/**/*.{js,ts,jsx,tsx,astro}\"",
"lint:only": "eslint --fix \"src/**/*.{js,ts,jsx,tsx,}\"",
"lint:CI": "eslint --fix --output-file eslint_report.json --format json \"src/**/*.{js,ts,jsx,tsx,}\""
"lint:CI": "eslint --fix --output-file eslint_report.json --format json \"src/**/*.{js,ts,jsx,tsx,}\"",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@nozbe/microfuzz": "^1.0.0",
Expand Down
3 changes: 2 additions & 1 deletion frontends/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"preview": "vite preview",
"lint": "prettier --write \"**/*.{js,jsx,ts,tsx,md,mdx,}\" && eslint --fix \"src/**/*.{js,ts,jsx,tsx,astro}\"",
"lint:only": "eslint --fix \"src/**/*.{js,ts,jsx,tsx,}\"",
"lint:CI": "eslint --fix --output-file eslint_report.json --format json \"src/**/*.{js,ts,jsx,tsx,}\""
"lint:CI": "eslint --fix --output-file eslint_report.json --format json \"src/**/*.{js,ts,jsx,tsx,}\"",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@corvu/resizable": "^0.2.2",
Expand Down
3 changes: 2 additions & 1 deletion frontends/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"preview": "vite preview",
"lint": "prettier --write \"**/*.{js,jsx,ts,tsx,md,mdx,}\" && eslint --fix \"src/**/*.{js,ts,jsx,tsx,astro}\"",
"lint:only": "eslint --fix \"src/**/*.{js,ts,jsx,tsx,}\"",
"lint:CI": "eslint --fix --output-file eslint_report.json --format json \"src/**/*.{js,ts,jsx,tsx,}\""
"lint:CI": "eslint --fix --output-file eslint_report.json --format json \"src/**/*.{js,ts,jsx,tsx,}\"",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@nozbe/microfuzz": "^1.0.0",
Expand Down
3 changes: 2 additions & 1 deletion frontends/search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"preview": "vite preview",
"lint": "prettier --write \"**/*.{js,jsx,ts,tsx,md,mdx,}\" && eslint --fix \"src/**/*.{js,ts,jsx,tsx,}\"",
"lint:only": "eslint --fix \"src/**/*.{js,ts,jsx,tsx,}\"",
"lint:CI": "eslint --fix --output-file eslint_report.json --format json \"src/**/*.{js,ts,jsx,tsx,}\""
"lint:CI": "eslint --fix --output-file eslint_report.json --format json \"src/**/*.{js,ts,jsx,tsx,}\"",
"typecheck": "tsc --noEmit"
},
"description": "The admin client for Trieve Search (https://search.trieve.ai)",
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"build": "turbo build",
"build:clean-client": "./convenience.sh -c",
"lint": "turbo lint",
"lint:CI": "turbo lint:CI"
"lint:CI": "turbo lint:CI",
"typecheck": "turbo typecheck"
},
"repository": "[email protected]:devflowinc/trieve.git",
"author": "Drew Harris <[email protected]>",
Expand Down
29 changes: 23 additions & 6 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,41 @@
"ui": "tui",
"tasks": {
"build": {
"outputs": ["dist/**"],
"dependsOn": ["^build"]
"outputs": [
"dist/**"
],
"dependsOn": [
"^build"
]
},
"lint": {
"cache": false,
"dependsOn": ["^build"]
"dependsOn": [
"^build"
]
},
"lint:CI": {
"cache": false,
"dependsOn": ["^build"]
"dependsOn": [
"^build"
]
},
"typecheck": {
"dependsOn": [
"^build"
]
},
"dev": {
"persistent": true,
"cache": false,
"dependsOn": ["trieve-ts-sdk#build"]
"dependsOn": [
"trieve-ts-sdk#build"
]
},
"trieve-ts-sdk#build": {
"outputs": ["dist"]
"outputs": [
"dist"
]
}
}
}

0 comments on commit 660a3ab

Please sign in to comment.