diff --git a/.husky/post-checkout b/.husky/post-checkout new file mode 100755 index 00000000..c37815e2 --- /dev/null +++ b/.husky/post-checkout @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-checkout'.\n"; exit 2; } +git lfs post-checkout "$@" diff --git a/.husky/post-commit b/.husky/post-commit new file mode 100755 index 00000000..e5230c30 --- /dev/null +++ b/.husky/post-commit @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-commit'.\n"; exit 2; } +git lfs post-commit "$@" diff --git a/.husky/post-merge b/.husky/post-merge new file mode 100755 index 00000000..c99b752a --- /dev/null +++ b/.husky/post-merge @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-merge'.\n"; exit 2; } +git lfs post-merge "$@" diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 00000000..216e9152 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/pre-push'.\n"; exit 2; } +git lfs pre-push "$@" diff --git a/package.json b/package.json index 7c5b825d..e7dbb8ce 100644 --- a/package.json +++ b/package.json @@ -68,8 +68,7 @@ "@babel/plugin-transform-modules-commonjs": "7.17.7", "@babel/plugin-transform-typescript": "7.16.8", "@babel/types": "*", - "@innei/class-validator-jsonschema": "3.1.1", - "@innei/zx-cjs": "6.0.6", + "class-validator-jsonschema": "npm:@innei/class-validator-jsonschema@3.1.1", "@nestjs/common": "8.4.2", "@nestjs/core": "8.4.2", "@nestjs/event-emitter": "1.1.0", @@ -130,7 +129,7 @@ "ua-parser-js": "1.0.2", "vm2": "3.9.9", "xss": "1.0.11", - "zx-cjs": "link:./node_modules/@innei/zx-cjs" + "zx-cjs": "npm:@innei/zx-cjs@6.0.6" }, "devDependencies": { "@innei-util/eslint-config-ts": "0.5.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b1574aa6..18e46d1e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,8 +13,6 @@ specifiers: '@babel/types': '*' '@innei-util/eslint-config-ts': 0.5.1 '@innei-util/prettier': 0.4.1 - '@innei/class-validator-jsonschema': 3.1.1 - '@innei/zx-cjs': 6.0.6 '@nestjs/cli': 8.2.4 '@nestjs/common': 8.4.2 '@nestjs/core': 8.4.2 @@ -62,6 +60,7 @@ specifiers: camelcase-keys: 7.0.2 class-transformer: 0.5.1 class-validator: 0.13.2 + class-validator-jsonschema: npm:@innei/class-validator-jsonschema@3.1.1 consola: '*' cos-nodejs-sdk-v5: 2.11.6 cron: '*' @@ -119,7 +118,7 @@ specifiers: vm2: 3.9.9 webpack-node-externals: 3.0.0 xss: 1.0.11 - zx-cjs: link:./node_modules/@innei/zx-cjs + zx-cjs: npm:@innei/zx-cjs@6.0.6 dependencies: '@algolia/client-search': 4.12.1 @@ -127,8 +126,6 @@ dependencies: '@babel/plugin-transform-modules-commonjs': 7.17.7_@babel+core@7.17.8 '@babel/plugin-transform-typescript': 7.16.8_@babel+core@7.17.8 '@babel/types': 7.17.0 - '@innei/class-validator-jsonschema': 3.1.1_279461c9b8c03a205cdbc4878bc60cf8 - '@innei/zx-cjs': 6.0.6 '@nestjs/common': 8.4.2_add13df2cdecb4b62cd3f7664ea82e18 '@nestjs/core': 8.4.2_08b1f14f521ca613fa34036185d46615 '@nestjs/event-emitter': 1.1.0_fbb6b2cee8aa0e7ece50e03c9bcb013d @@ -153,6 +150,7 @@ dependencies: camelcase-keys: 7.0.2 class-transformer: 0.5.1 class-validator: 0.13.2 + class-validator-jsonschema: /@innei/class-validator-jsonschema/3.1.1_279461c9b8c03a205cdbc4878bc60cf8 consola: 2.15.3 cos-nodejs-sdk-v5: 2.11.6 dayjs: 1.11.0 @@ -189,7 +187,7 @@ dependencies: ua-parser-js: 1.0.2 vm2: 3.9.9 xss: 1.0.11 - zx-cjs: link:node_modules/@innei/zx-cjs + zx-cjs: /@innei/zx-cjs/6.0.6 optionalDependencies: mongodb-memory-server: 8.4.1 diff --git a/src/modules/configs/configs.dto.ts b/src/modules/configs/configs.dto.ts index 28068103..27fb4d7e 100644 --- a/src/modules/configs/configs.dto.ts +++ b/src/modules/configs/configs.dto.ts @@ -1,4 +1,4 @@ -import { JSONSchema } from '@innei/class-validator-jsonschema' +import { JSONSchema } from 'class-validator-jsonschema' import { ApiProperty } from '@nestjs/swagger' import { Exclude, Transform, Type } from 'class-transformer' import { diff --git a/src/modules/configs/configs.interface.ts b/src/modules/configs/configs.interface.ts index 5b0dc3bf..e9149b0e 100644 --- a/src/modules/configs/configs.interface.ts +++ b/src/modules/configs/configs.interface.ts @@ -1,4 +1,4 @@ -import { JSONSchema } from '@innei/class-validator-jsonschema' +import { JSONSchema } from 'class-validator-jsonschema' import { Type } from 'class-transformer' import { ValidateNested } from 'class-validator' import { diff --git a/src/modules/configs/configs.jsonschema.decorator.ts b/src/modules/configs/configs.jsonschema.decorator.ts index 706f2059..98ca01f1 100644 --- a/src/modules/configs/configs.jsonschema.decorator.ts +++ b/src/modules/configs/configs.jsonschema.decorator.ts @@ -1,5 +1,5 @@ -import { JSONSchema } from '@innei/class-validator-jsonschema' -import { DecoratorSchema } from '@innei/class-validator-jsonschema/build/decorators' +import { JSONSchema } from 'class-validator-jsonschema' +import { DecoratorSchema } from 'class-validator-jsonschema/build/decorators' export const JSONSchemaPasswordField = ( title: string, diff --git a/src/modules/serverless/serverless.service.ts b/src/modules/serverless/serverless.service.ts index 4398c2eb..5c63202a 100644 --- a/src/modules/serverless/serverless.service.ts +++ b/src/modules/serverless/serverless.service.ts @@ -337,7 +337,7 @@ export class ServerlessService { '@babel/core', '@babel/types', '@babel/plugin-transform-typescript', - '@innei/class-validator-jsonschema', + 'class-validator-jsonschema', '@nestjs/event-emitter', 'algoliasearch', 'axios-retry', diff --git a/src/utils/jsonschema.util.ts b/src/utils/jsonschema.util.ts index ca80e855..db93c934 100644 --- a/src/utils/jsonschema.util.ts +++ b/src/utils/jsonschema.util.ts @@ -1,12 +1,12 @@ // @ts-ignore -import { targetConstructorToSchema } from '@innei/class-validator-jsonschema' -import { ISchemaConverters } from '@innei/class-validator-jsonschema/build/defaultConverters' -import { IOptions } from '@innei/class-validator-jsonschema/build/options' +import { targetConstructorToSchema } from 'class-validator-jsonschema' +import { ISchemaConverters } from 'class-validator-jsonschema/build/defaultConverters' +import { IOptions } from 'class-validator-jsonschema/build/options' import { defaultMetadataStorage } from 'class-transformer/cjs/storage.js' import { ValidationTypes, getMetadataStorage } from 'class-validator' import { ValidationMetadata } from 'class-validator/types/metadata/ValidationMetadata' -export { JSONSchema as IsSchema } from '@innei/class-validator-jsonschema' +export { JSONSchema as IsSchema } from 'class-validator-jsonschema' /** * Build json-schema from `class-validator` & `class-tranformer` metadata.