diff --git a/packages/specs/schema/package.json b/packages/specs/schema/package.json index 8c3dc89ebfc..b82f920c494 100644 --- a/packages/specs/schema/package.json +++ b/packages/specs/schema/package.json @@ -55,7 +55,7 @@ "@tsed/core": "^6.105.4" }, "peerDependenciesMeta": { - "@tsed/code": { + "@tsed/core": { "optional": false } } diff --git a/packages/specs/swagger/package.json b/packages/specs/swagger/package.json index 2974dbe49f1..fede72d986b 100644 --- a/packages/specs/swagger/package.json +++ b/packages/specs/swagger/package.json @@ -14,15 +14,17 @@ "default": "./lib/esm/index.js" }, "scripts": { - "build": "yarn run build:esm && yarn run build:cjs && cp -r ./views ./lib/views", + "clean": "rm -rf lib", + "build": "yarn clean && yarn barrels && yarn run build:esm && yarn run build:cjs && cp -r ./views ./lib/views", "build:cjs": "tsc --build tsconfig.compile.json", "build:esm": "tsc --build tsconfig.compile.esm.json", + "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"", "start": "ts-node -r tsconfig-paths/register test/app/index.ts", "test": "cross-env NODE_ENV=test yarn jest --max-workers=2" }, "dependencies": { "@tsed/openspec": "6.105.4", - "fs-extra": "9.0.1", + "fs-extra": "10.0.1", "micromatch": "4.0.4", "swagger-ui-dist": "^4.5.2", "tslib": "2.2.0" diff --git a/packages/specs/swagger/src/SwaggerModule.ts b/packages/specs/swagger/src/SwaggerModule.ts index 46dccce831b..b557eef22ee 100644 --- a/packages/specs/swagger/src/SwaggerModule.ts +++ b/packages/specs/swagger/src/SwaggerModule.ts @@ -14,7 +14,7 @@ import { } from "@tsed/common"; import Fs from "fs"; import {join} from "path"; -import {SwaggerSettings} from "./interfaces"; +import {SwaggerSettings} from "./interfaces/SwaggerSettings"; import {cssMiddleware} from "./middlewares/cssMiddleware"; import {indexMiddleware} from "./middlewares/indexMiddleware"; import {jsMiddleware} from "./middlewares/jsMiddleware"; diff --git a/packages/specs/swagger/src/index.ts b/packages/specs/swagger/src/index.ts index 5bf504379a3..bf8d4c12f61 100644 --- a/packages/specs/swagger/src/index.ts +++ b/packages/specs/swagger/src/index.ts @@ -1,5 +1,16 @@ -export * from "./services/SwaggerService"; +/** + * @file Automatically generated by barrelsby. + */ + export * from "./SwaggerModule"; -export * from "./interfaces"; export * from "./decorators/docs"; export * from "./decorators/hidden"; +export * from "./interfaces/SwaggerSettings"; +export * from "./interfaces/interfaces"; +export * from "./middlewares/cssMiddleware"; +export * from "./middlewares/indexMiddleware"; +export * from "./middlewares/jsMiddleware"; +export * from "./middlewares/redirectMiddleware"; +export * from "./services/SwaggerService"; +export * from "./utils/includeRoute"; +export * from "./utils/matchPath"; diff --git a/packages/specs/swagger/src/interfaces/index.ts b/packages/specs/swagger/src/interfaces/interfaces.ts similarity index 82% rename from packages/specs/swagger/src/interfaces/index.ts rename to packages/specs/swagger/src/interfaces/interfaces.ts index 79489d10975..f80443598aa 100644 --- a/packages/specs/swagger/src/interfaces/index.ts +++ b/packages/specs/swagger/src/interfaces/interfaces.ts @@ -7,5 +7,3 @@ declare global { } } } - -export * from "./SwaggerSettings"; diff --git a/packages/specs/swagger/src/utils/includeRoute.ts b/packages/specs/swagger/src/utils/includeRoute.ts index 49fdb11ac60..e07606fad92 100644 --- a/packages/specs/swagger/src/utils/includeRoute.ts +++ b/packages/specs/swagger/src/utils/includeRoute.ts @@ -1,6 +1,6 @@ import {ControllerProvider} from "@tsed/common"; -import {matchPath} from "."; -import {SwaggerSettings} from ".."; +import {matchPath} from "./matchPath"; +import {SwaggerSettings} from "../interfaces/SwaggerSettings"; export function includeRoute(route: string, provider: ControllerProvider, conf: SwaggerSettings): boolean { const hidden = provider.store.get("hidden"); diff --git a/packages/specs/swagger/src/utils/index.ts b/packages/specs/swagger/src/utils/index.ts deleted file mode 100644 index 0636d468fee..00000000000 --- a/packages/specs/swagger/src/utils/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./matchPath"; -export * from "./includeRoute"; diff --git a/yarn.lock b/yarn.lock index 9267bed599f..1d360bf6607 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10602,16 +10602,6 @@ fs-extra@8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@9.0.1, fs-extra@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" - integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^1.0.0" - fs-extra@9.1.0, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" @@ -10631,6 +10621,16 @@ fs-extra@^7.0.1: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" + integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^1.0.0" + fs-jetpack@4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/fs-jetpack/-/fs-jetpack-4.3.1.tgz#cdfd4b64e6bfdec7c7dc55c76b39efaa7853bb20"