Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ const config = {
'no-use-before-define': 0,
'require-await': 0,
'@typescript-eslint/require-array-sort-compare': [2, { ignoreStringArrays: true }],
'@typescript-eslint/no-duplicate-imports': 2,
'@typescript-eslint/adjacent-overload-signatures': 2,
'@typescript-eslint/await-thenable': 2,
'@typescript-eslint/consistent-type-assertions': 2,
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@docusaurus/module-type-aliases": "2.3.1",
"@emotion/babel-plugin": "^11.10.0",
"@tsconfig/docusaurus": "^1.0.6",
"@typescript-eslint/parser": "^5.30.7"
"@typescript-eslint/parser": "^6.16.0"
},
"browserslist": {
"production": [
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"@types/webpack": "4.41.27",
"@types/webpack-node-externals": "^2.5.3",
"@types/yup": "^0.29.14",
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"ava": "^5.0.0",
"c8": "^7.11.3",
"chalk": "^4.1.2",
Expand All @@ -59,7 +59,7 @@
"eslint-plugin-unicorn": "^45.0.0",
"extract-comments": "^1.1.0",
"fdir": "^5.2.0",
"graphql": "^16.0.0",
"graphql": "^16.8.1",
"html-webpack-plugin": "^5.5.0",
"husky": "^8.0.1",
"inquirer": "^9.0.1",
Expand Down Expand Up @@ -93,7 +93,7 @@
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.0.0",
"tslib": "^2.4.0",
"typescript": "~4.7.4",
"typescript": "~4.9.5",
"vite": "^3.0.2",
"wait-on": "^7.0.0",
"webpack": "^5.73.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/bundle-report/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"@ant-design/icons": "^5.0.0",
"@emotion/react": "^11.9.3",
"@emotion/styled": "^11.9.3",
"@fluentui/react": "^8.105.5",
"@fluentui/theme": "^2.6.22",
"@mdx-js/react": "^2.1.2",
"@fluentui/react": "^8.114.0",
"@fluentui/theme": "^2.6.39",
"@mdx-js/react": "^3.0.0",
"@perfsee/components": "workspace:*",
"@perfsee/dls": "workspace:*",
"@perfsee/schema": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/chrome-finder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"node": ">= 10.18.1"
},
"devDependencies": {
"puppeteer-core": "^21.5.0"
"puppeteer-core": "^21.6.1"
},
"peerDependencies": {
"puppeteer-core": ">= 13"
"puppeteer-core": ">= 20"
}
}
8 changes: 4 additions & 4 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"@ant-design/icons": "^5.0.0",
"@emotion/react": "^11.9.3",
"@emotion/styled": "^11.9.3",
"@fluentui/react": "^8.105.5",
"@fluentui/theme": "^2.6.22",
"@fluentui/react": "^8.114.0",
"@fluentui/theme": "^2.6.39",
"@mdx-js/react": "^2.1.2",
"@perfsee/dls": "workspace:*",
"@perfsee/schema": "workspace:*",
Expand All @@ -20,7 +20,7 @@
"@sigi/core": "^2.12.1",
"@sigi/react": "^2.12.2",
"dayjs": "^1.11.3",
"echarts": "^5.3.3",
"echarts": "^5.4.3",
"immer": "^9.0.15",
"lodash": "^4.17.21",
"query-string": "^7.1.1",
Expand All @@ -29,7 +29,7 @@
"react-helmet": "^6.1.0",
"react-router": "^5.2.1",
"react-router-dom": "^5.3.0",
"rxjs": "^7.5.6"
"rxjs": "^7.8.1"
},
"devDependencies": {
"@types/react-helmet": "^6.1.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/chart/format-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function formatChartData<T, S extends Record<string, any>>(
const xAxisData = new Set<S[typeof xKey]>()

rawData.forEach((data) => {
const formatted = formatter ? formatter(data) : (data as S)
const formatted = formatter ? formatter(data) : (data as any as S)
const groupKey = formatted[seriesKey]

const rawGroup = groupData[groupKey] ?? {}
Expand Down
4 changes: 2 additions & 2 deletions packages/dls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"dependencies": {
"@emotion/core": "^11.0.0",
"@emotion/react": "^11.9.3",
"@fluentui/react": "^8.105.5",
"@fluentui/theme": "^2.6.22",
"@fluentui/react": "^8.114.0",
"@fluentui/theme": "^2.6.39",
"color-converters": "^0.1.1",
"react": "^18.2.0"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/dls/src/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ export function copyTheme(theme: Theme, variables: DeepPartial<Theme> = {}): The
return mergeTheme<Theme>(theme, variables)
}

function mergeTheme<T>(target: T, data: DeepPartial<T>): T {
function mergeTheme<T extends { [s: string]: any }>(target: T, data: DeepPartial<T>): T {
const dest: T = Object.create(null)
for (const [key, value] of Object.entries(target)) {
const newProperty = data[key]
if (typeof newProperty === 'object') {
dest[key] = mergeTheme(value, newProperty)
dest[key as keyof T] = mergeTheme(value, newProperty)
} else {
dest[key] = data[key] ?? value
dest[key as keyof T] = data[key] ?? value
}
}
return dest
Expand Down
4 changes: 2 additions & 2 deletions packages/package-build-stats/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@babel/core": "^7.13.8",
"@babel/parser": "^7.13.9",
"@babel/plugin-proposal-export-default-from": "^7.12.13",
"@babel/traverse": "^7.13.0",
"@babel/traverse": "^7.23.6",
"autoprefixer": "^9.7.6",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.3.0",
Expand Down Expand Up @@ -91,7 +91,7 @@
"svelte-loader": "^2.13.6",
"terser": "^5.6.0",
"terser-webpack-plugin": "^4.2.3",
"vm2": "^3.9.7",
"vm2": "^3.9.19",
"webpack": "^4.44.2",
"webpack-merge": "^5.9.0",
"write-file-webpack-plugin": "^4.5.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/package-build-stats/src/utils/build.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ const BuildUtils = {
}

if (options.splitCustomImports) {
if (!options.customImports || !options.customImports.length) {
if (!options.customImports?.length) {
return { assets: [] }
}
options.customImports.forEach((importt) => {
Expand Down
6 changes: 3 additions & 3 deletions packages/package-report/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"@ant-design/icons": "^5.0.0",
"@emotion/react": "^11.9.3",
"@emotion/styled": "^11.9.3",
"@fluentui/react": "^8.105.5",
"@fluentui/theme": "^2.6.22",
"@mdx-js/react": "^2.1.2",
"@fluentui/react": "^8.114.0",
"@fluentui/theme": "^2.6.39",
"@mdx-js/react": "^3.0.0",
"@perfsee/components": "workspace:*",
"@perfsee/dls": "workspace:*",
"@perfsee/schema": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"glob": "^9.2.1",
"node-fetch": "^2.6.2",
"open": "^8.4.2",
"puppeteer-core": "^21.5.0",
"puppeteer-core": "^21.6.1",
"tar": "^6.1.13",
"ts-node": "^10.9.1",
"tslib": "^2.5.0"
Expand Down
39 changes: 19 additions & 20 deletions packages/platform-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,47 @@
"main": "./dist/index.js",
"dependencies": {
"@abraham/reflection": "^0.12.0",
"@apollo/server": "^4.6.0",
"@apollo/server": "^4.9.5",
"@aws-sdk/client-s3": "^3.449.0",
"@aws-sdk/lib-storage": "^3.449.0",
"@nestjs/apollo": "^11.0.5",
"@nestjs/common": "^9.4.0",
"@nestjs/core": "^9.4.0",
"@nestjs/event-emitter": "^1.4.1",
"@nestjs/graphql": "^11.0.5",
"@nestjs/platform-express": "^9.4.0",
"@nestjs/schedule": "^2.2.1",
"@nestjs/serve-static": "^3.0.1",
"@nestjs/terminus": "^9.2.2",
"@nestjs/testing": "^9.4.0",
"@nestjs/throttler": "^4.0.0",
"@nestjs/typeorm": "^9.0.1",
"@nestjs/apollo": "^12.0.11",
"@nestjs/common": "^10.3.0",
"@nestjs/core": "^10.3.0",
"@nestjs/event-emitter": "^2.0.3",
"@nestjs/graphql": "^12.0.11",
"@nestjs/platform-express": "^10.3.0",
"@nestjs/schedule": "^4.0.0",
"@nestjs/serve-static": "^4.0.0",
"@nestjs/terminus": "^10.2.0",
"@nestjs/testing": "^10.3.0",
"@nestjs/throttler": "^5.1.1",
"@nestjs/typeorm": "^10.0.1",
"body-parser": "^1.20.2",
"chalk": "^4.1.2",
"clipanion": "^3.1.0",
"dataloader": "^2.1.0",
"dayjs": "^1.11.3",
"dayjs": "^1.11.10",
"debug": "^4.3.4",
"dotenv": "^16.0.1",
"express": "^4.18.2",
"express-session": "^1.17.3",
"file-type": "^16.5.4",
"form-data": "^4.0.0",
"graphql": "^16.6.0",
"graphql": "^16.8.1",
"graphql-type-json": "^0.3.2",
"ioredis": "^5.3.2",
"json-bigint": "^1.0.0",
"lodash": "^4.17.21",
"mysql2": "^2.3.3",
"nest-router": "^1.0.9",
"node-abort-controller": "^3.0.1",
"mysql2": "^3.6.5",
"node-abort-controller": "^3.1.1",
"node-fetch": "^2.6.2",
"nodemailer": "^6.7.7",
"prom-client": "14.1.1",
"query-string": "^7.1.1",
"redlock": "^4.2.0",
"rxjs": "^7.5.6",
"rxjs": "^7.8.1",
"ts-morph": "^15.1.0",
"typeorm": "^0.3.15",
"typeorm": "^0.3.17",
"uuid": "^9.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-server/src/app.entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export async function createApp() {
app.useGlobalFilters(new AnyErrorFilter(app.getHttpAdapter()))
app.useGlobalFilters(new QueryErrorFilter())
app.useGlobalFilters(new UnauthorizedExceptionFilter())
app.useGlobalGuards(new RedisThrottleGuard({ limit: 120, ttl: 60 }, redis, metrics, app.get(Reflector)))
app.useGlobalGuards(new RedisThrottleGuard([{ limit: 120, ttl: 60 }], redis, metrics, app.get(Reflector)))
app.useGlobalGuards(new PreAuthGuard(app.get(AuthService)))

async function start() {
Expand Down
6 changes: 3 additions & 3 deletions packages/platform-server/src/cron/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ class CronService implements OnApplicationBootstrap {
}

const ret = rawFire.call(job)
if (ret instanceof Promise) {
await ret
if ((ret as any) instanceof Promise) {
await (ret as any as Promise<any>)
}

this.metrics.cronJobStatus(1, { name })
Expand Down Expand Up @@ -100,7 +100,7 @@ export const Cron = (cronTime: string | Date, options?: CronOptions) => {
}
EXCLUSIVE_CRONS.add(options.name)
}
return applyDecorators(RawCron(cronTime, options))
return applyDecorators(RawCron(cronTime, options as RawCronOptions))
}

export { CronExpression } from '@nestjs/schedule'
4 changes: 2 additions & 2 deletions packages/platform-server/src/db/service/mysql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

import { Injectable } from '@nestjs/common'
import { InjectDataSource, InjectEntityManager } from '@nestjs/typeorm'
import { DataSource, EntityManager, EntityTarget, QueryRunner } from 'typeorm'
import { DataSource, EntityManager, EntityTarget, ObjectLiteral, QueryRunner } from 'typeorm'
import { IsolationLevel } from 'typeorm/driver/types/IsolationLevel'

@Injectable()
Expand All @@ -30,7 +30,7 @@ export class DBService {
return this.connection.getMetadata(entity).findColumnWithPropertyName(propertyName as string)?.databasePath
}

repo<T>(entity: EntityTarget<T>) {
repo<T extends ObjectLiteral>(entity: EntityTarget<T>) {
return this.manager.getRepository(entity)
}

Expand Down
12 changes: 6 additions & 6 deletions packages/platform-server/src/modules/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class AuthController implements OnApplicationBootstrap {
return
}

if (!email || !email.trim()) {
if (!email?.trim()) {
throw new HttpException("Email can't be empty", HttpStatus.BAD_REQUEST)
}

Expand Down Expand Up @@ -160,11 +160,11 @@ export class AuthController implements OnApplicationBootstrap {

@Post('/reset-password')
async resetPassword(@Body() body: ResetPasswordBody, @Res() res: Response, @Query('returnUrl') returnUrl: string) {
if (!body.resetToken || !body.resetToken.trim()) {
if (!body.resetToken?.trim()) {
throw new HttpException("Reset token can't be empty", HttpStatus.BAD_REQUEST)
}

if (!body.password || !body.password.trim()) {
if (!body.password?.trim()) {
throw new HttpException("Password can't be empty", HttpStatus.BAD_REQUEST)
}

Expand Down Expand Up @@ -198,15 +198,15 @@ export class AuthController implements OnApplicationBootstrap {
throw new ForbiddenException('Signup is disabled')
}

if (!body.email || !body.email.trim()) {
if (!body.email?.trim()) {
throw new HttpException("Email can't be empty", HttpStatus.BAD_REQUEST)
}

if (!body.password || !body.password.trim()) {
if (!body.password?.trim()) {
throw new HttpException("Password can't be empty", HttpStatus.BAD_REQUEST)
}

if (!body.username || !body.username.trim()) {
if (!body.username?.trim()) {
throw new HttpException("Username can't be empty", HttpStatus.BAD_REQUEST)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class OAuth2Controller {
throw new HttpException('invalid callback state parameter', HttpStatus.BAD_REQUEST)
}

if (!state || !state.state) {
if (!state?.state) {
throw new HttpException('Invalid callback state parameter', HttpStatus.BAD_REQUEST)
}

Expand Down
6 changes: 3 additions & 3 deletions packages/platform-server/src/modules/github/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class GithubIntegrationResolver {
})
async getGithubInstallation(@CurrentUser() user: User) {
const githubAccount = await this.userService.getUserConnectedAccount(user, ExternalAccount.github)
if (!githubAccount || !githubAccount.accessToken) {
if (!githubAccount?.accessToken) {
throw new UserError('Please connect your github account first.')
}

Expand All @@ -111,7 +111,7 @@ export class GithubIntegrationResolver {
paginationInput: PaginationInput,
) {
const githubAccount = await this.userService.getUserConnectedAccount(user, ExternalAccount.github)
if (!githubAccount || !githubAccount.accessToken) {
if (!githubAccount?.accessToken) {
throw new UserError('Please connect your github account first.')
}

Expand Down Expand Up @@ -146,7 +146,7 @@ export class GithubIntegrationResolver {
paginationInput: PaginationInput,
) {
const githubAccount = await this.userService.getUserConnectedAccount(user, ExternalAccount.github)
if (!githubAccount || !githubAccount.accessToken) {
if (!githubAccount?.accessToken) {
throw new UserError('Please connect your github account first.')
}

Expand Down
2 changes: 1 addition & 1 deletion packages/platform-server/src/modules/github/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class GithubService {
repo: string,
): Promise<{ ok: false; error: string } | { ok: true; caseSensitiveRepo: string; caseSensitiveOwner: string }> {
const githubAccount = await this.userService.getUserConnectedAccount(user, ExternalAccount.github)
if (!githubAccount || !githubAccount.accessToken) {
if (!githubAccount?.accessToken) {
return {
ok: false,
error: `Please connect your github account first.`,
Expand Down
Loading