From c22a4a6ecfdcaa3931e7a66678da47c05f2d5e4b Mon Sep 17 00:00:00 2001 From: Artem Derevnjuk Date: Fri, 11 Feb 2022 21:27:21 +0300 Subject: [PATCH] style(*): fix formatting issues --- .github/ISSUE_TEMPLATE/01_bug-report.md | 6 +- .github/ISSUE_TEMPLATE/02_feature-request.md | 10 +- .github/ISSUE_TEMPLATE/04_say-thank-you.md | 5 +- .github/ISSUE_TEMPLATE/config.yml | 6 +- .github/workflows/build.yml | 28 +- .github/workflows/rebase.yml | 2 +- .github/workflows/website.yml | 4 +- .mocharc.js | 2 +- CODE_OF_CONDUCT.md | 30 +- CONTRIBUTING.md | 16 +- PULL_REQUEST_TEMPLATE.md | 8 +- docs-references/.vuepress/config.js | 12 +- docs-references/api.md | 11 +- docs-references/readme.md | 9 +- docs/.vuepress/config.base.js | 154 +- docs/.vuepress/config.js | 5 +- docs/.vuepress/enhanceApp.js | 16 +- docs/.vuepress/scripts/addWorkerScript.js | 113 +- docs/.vuepress/scripts/updateBuildScript.js | 232 +- docs/contributing.md | 42 +- docs/docs/authentication.md | 14 +- docs/docs/cache.md | 57 +- docs/docs/command.md | 36 +- docs/docs/configuration.md | 186 +- docs/docs/controllers.md | 105 +- docs/docs/converters.md | 118 +- docs/docs/custom-endpoint-decorators.md | 6 +- docs/docs/custom-providers.md | 27 +- docs/docs/exceptions.md | 26 +- docs/docs/factory.md | 4 +- docs/docs/hooks.md | 13 +- docs/docs/interceptors.md | 1 + docs/docs/logger.md | 64 +- docs/docs/middlewares.md | 53 +- docs/docs/migration.md | 1 - docs/docs/model.md | 159 +- docs/docs/not-found-page.md | 7 +- docs/docs/pipes.md | 63 +- docs/docs/platform-api.md | 115 +- docs/docs/providers-lazy-loading.md | 48 +- docs/docs/providers.md | 20 +- docs/docs/request-context.md | 59 +- docs/docs/response-filter.md | 42 +- docs/docs/serve-files.md | 65 +- docs/docs/services.md | 65 +- .../auth-custom-auth-example.ts | 7 +- .../auth-decorator-example-2.ts | 8 +- .../authentication/auth-decorator-example.ts | 7 +- .../snippets/authentication/auth-example.ts | 3 +- .../authentication/auth-middleware.ts | 3 +- .../authentication/auth-swagger-example.ts | 7 +- .../configuration/module-options-imports.ts | 11 +- .../configuration/module-resolvers.ts | 3 +- .../modulev0-endpoint-versionning.ts | 8 +- .../modulev1-endpoint-versionning.ts | 7 +- ...server-endpoint-versionning-with-module.ts | 8 +- .../server-endpoint-versionning.ts | 12 +- .../configuration/server-options-imports.ts | 7 +- .../configuration/server-resolvers.ts | 3 +- docs/docs/snippets/configuration/server.ts | 6 +- .../snippets/controllers/async-controller.ts | 5 +- .../controllers/child-controllers-calendar.ts | 3 +- .../controllers/child-controllers-event.ts | 3 +- .../controllers/child-controllers-rest.ts | 8 +- .../controllers/child-controllers-server.ts | 7 +- .../snippets/controllers/getting-started.ts | 8 +- .../inheritance-base-controller.ts | 3 +- docs/docs/snippets/controllers/inject-next.ts | 10 +- .../controllers/inject-req-res-node.ts | 5 +- .../controllers/inject-req-res-platform.ts | 9 +- .../controllers/inject-req-res-target.ts | 9 +- .../snippets/controllers/inject-router.ts | 3 +- .../snippets/controllers/merge-params-1.ts | 5 +- .../snippets/controllers/merge-params-2.ts | 5 +- .../controllers/params-advanced-usage.ts | 2 +- .../snippets/controllers/params-decorator.ts | 1 - .../snippets/controllers/params-post-any.ts | 9 +- .../snippets/controllers/params-post-enum.ts | 8 +- .../snippets/controllers/request-headers.ts | 1 - .../controllers/response-content-type.ts | 16 +- .../response-generics-controller.ts | 4 +- .../snippets/controllers/response-headers.ts | 12 +- .../snippets/controllers/response-status.ts | 2 +- .../controllers/response-throw-exceptions.ts | 2 +- .../controllers/routing-with-version.ts | 3 +- docs/docs/snippets/controllers/routing.ts | 7 +- .../controller-usage-with-return-type.ts | 6 +- .../snippets/converters/controller-usage.ts | 4 +- .../converters/model-ignore-props.jest.ts | 4 +- .../converters/model-ignore-props.mocha.ts | 4 +- .../model-missing-properties.jest.ts | 4 +- .../model-missing-properties.mocha.ts | 4 +- .../converters/server-moment-mapper-import.ts | 5 +- .../exceptions/http-exception-filter.ts | 5 +- .../snippets/exceptions/usage-controller.ts | 4 +- .../exceptions/usage-express-route.ts | 15 +- .../snippets/middlewares/accept-mime-usage.ts | 3 +- .../snippets/middlewares/call-sequences.ts | 1 - .../custom-endpoint-decorator-accept-mime.ts | 5 +- .../endpoint-middleware-decorator.ts | 2 +- .../endpoint-use-decorator-usage.ts | 3 +- .../global-middleware-configuration.ts | 6 +- .../middlewares/global-middleware-error.ts | 7 +- .../middlewares/server-configuration.ts | 9 +- docs/docs/snippets/model/annotations.json | 4 +- docs/docs/snippets/model/any-types.json | 21 +- .../snippets/model/circular-references.ts | 2 +- docs/docs/snippets/model/controller.ts | 1 - .../snippets/model/enumerated-values.json | 20 +- docs/docs/snippets/model/enumerated-values.ts | 1 - docs/docs/snippets/model/example.ts | 14 +- .../model/functional-schema-controller.ts | 8 +- docs/docs/snippets/model/generic-date-api.ts | 2 +- docs/docs/snippets/model/generic-date.ts | 4 +- docs/docs/snippets/model/generic-enum.ts | 4 +- .../docs/snippets/model/generic-string-api.ts | 4 +- docs/docs/snippets/model/generic-string.ts | 4 +- .../model/generics-controller1-os2.json | 6 +- .../model/generics-controller1-os3.json | 8 +- .../model/generics-controller2-os2.json | 10 +- .../model/generics-controller2-os3.json | 6 +- .../snippets/model/generics-pagination.ts | 2 +- docs/docs/snippets/model/generics-product.ts | 2 +- .../snippets/model/generics-submission.ts | 2 +- .../model/get-spec-generics-controller1.ts | 2 +- .../model/group-user-change-password.json | 2 +- .../snippets/model/group-user-creation.json | 2 +- .../snippets/model/group-user-update.json | 2 +- .../model/group-users-ctrl-on-class.ts | 3 +- docs/docs/snippets/model/group-users-ctrl.ts | 5 +- .../snippets/model/group-users-openspec.json | 20 +- docs/docs/snippets/model/jsonschema.json | 5 +- .../snippets/model/nullable-properties.json | 11 +- docs/docs/snippets/model/pageable-model.ts | 4 +- .../snippets/model/pageable-product-model.ts | 2 +- docs/docs/snippets/model/pagination-filter.ts | 3 +- docs/docs/snippets/model/pagination-model.ts | 4 +- docs/docs/snippets/model/pagination-spec.ts | 199 +- .../snippets/model/required-properties.json | 11 +- .../pipes/async-transformer-pipe-usage.ts | 8 +- docs/docs/snippets/pipes/body-params.ts | 17 +- docs/docs/snippets/pipes/pipes-decorator.ts | 5 +- .../snippets/pipes/transformer-pipe-usage.ts | 8 +- docs/docs/snippets/pipes/transformer-pipe.ts | 1 - docs/docs/snippets/pipes/use-params.ts | 8 +- .../custom-provider-use-class-declaration.ts | 8 +- .../custom-provider-use-value-usage.ts | 4 +- .../providers/getting-started-controller.ts | 3 +- .../providers/getting-started-serverloader.ts | 3 +- .../providers/override-injection-token.ts | 18 +- .../snippets/providers/scope-chain-fail.ts | 3 +- docs/docs/snippets/providers/scope-chain.ts | 3 +- .../snippets/providers/scope-singleton.ts | 2 +- .../request-context/context-example.ts | 2 +- .../docs/snippets/templating/configuration.ts | 10 +- .../templating/response-templating.ts | 2 +- .../templating/template-platform-api.ts | 2 +- .../testing/db-service-async-await.legacy.ts | 11 +- .../db-service-mock-dependencies.legacy.ts | 1 - .../testing/parse-service-legacy.spec.ts | 8 +- .../testing/parse-service.jest.spec.ts | 8 +- .../testing/parse-service.mocha.spec.ts | 8 +- .../docs/snippets/testing/supertest.legacy.ts | 8 +- .../validation/class-validator-pipe.ts | 3 +- .../snippets/validation/joi-pipe-usage.ts | 8 +- docs/docs/snippets/validation/joi-pipe.ts | 1 - docs/docs/templating.md | 72 +- docs/docs/testing.md | 86 +- docs/docs/throw-http-exceptions.md | 58 +- docs/docs/upload-files.md | 26 +- docs/docs/validation.md | 28 +- docs/getting-started/README.md | 168 +- .../create-your-first-controller.md | 17 +- docs/getting-started/migrate-from-express.md | 30 +- docs/getting-started/migration-from-v5.md | 127 +- .../snippets/base/package.json | 2 +- .../snippets/base/tsconfig.json | 21 +- .../snippets/migrate-from-express/server.js | 12 +- .../migrate-from-express/tsconfig.json | 21 +- docs/getting-started/start-from-scratch.md | 29 +- docs/getting-started/start-with-cli.md | 72 +- docs/license.md | 7 +- docs/readme.md | 316 +- docs/snippets/getting-started/server.ts | 8 +- docs/support.md | 12 +- docs/team.md | 3 +- docs/tutorials/README.md | 135 +- docs/tutorials/agenda.md | 26 +- docs/tutorials/ajv.md | 143 +- docs/tutorials/aws.md | 24 +- docs/tutorials/graphql.md | 44 +- docs/tutorials/keycloak.md | 221 +- docs/tutorials/mikroorm.md | 8 +- docs/tutorials/mongoose.md | 66 +- docs/tutorials/multer.md | 19 +- docs/tutorials/objection.md | 31 +- docs/tutorials/oidc.md | 61 +- docs/tutorials/passport.md | 53 +- docs/tutorials/prisma-client.md | 52 +- docs/tutorials/prisma.md | 67 +- docs/tutorials/seq.md | 28 +- docs/tutorials/serve-static-files.md | 2 +- docs/tutorials/serverless.md | 46 +- docs/tutorials/session.md | 40 +- .../snippets/aws/server-configuration.ts | 8 +- .../tutorials/snippets/graphql/recipe-args.ts | 4 +- .../tutorials/snippets/graphql/recipe-type.ts | 4 +- .../snippets/graphql/resolver-data-source.ts | 5 +- .../snippets/graphql/resolver-service.ts | 4 +- .../snippets/graphql/server-configuration.ts | 9 +- .../snippets/graphql/testing.jest.ts | 8 +- .../snippets/graphql/testing.mocha.ts | 8 +- .../snippets/mongoose/configuration.ts | 4 +- .../snippets/mongoose/discriminator.ts | 2 +- .../mongoose/example-model-mongoose.ts | 2 +- .../mongoose/extended-circular-reference.ts | 10 +- .../mongoose/extended-decimal-numbers.ts | 2 +- docs/tutorials/snippets/mongoose/plugin.ts | 9 +- .../snippets/mongoose/version-key.ts | 2 +- .../snippets/mongoose/virtual-references.ts | 4 +- .../snippets/multer/configuration.ts | 4 +- docs/tutorials/snippets/multer/controller.ts | 11 +- .../snippets/passport/AzureBearerProtocol.ts | 3 +- .../snippets/passport/BasicProtocol.ts | 3 +- .../snippets/passport/DiscordProtocol.ts | 3 +- .../snippets/passport/JwtProtocol.ts | 4 +- .../snippets/passport/LoginLocalProtocol.ts | 7 +- .../passport/OriginalDiscordProtocol.js | 9 +- .../snippets/passport/OriginalJwtPassport.js | 28 +- .../snippets/passport/PassportFacebookCtrl.ts | 2 +- .../snippets/passport/SignupLocalProtocol.ts | 3 +- .../snippets/passport/acceptRoles.ts | 5 +- .../snippets/passport/guard-basic-auth.ts | 8 +- .../tutorials/snippets/passport/guard-ctrl.ts | 6 +- .../snippets/passport/roles-usage.ts | 4 +- docs/tutorials/snippets/passport/server.ts | 34 +- .../session/configuration-middleware.ts | 26 +- .../snippets/session/configuration.ts | 22 +- .../snippets/session/example-session.ts | 1 - .../snippets/session/example-test.legacy.ts | 8 +- .../snippets/socketio/basicSocketService.ts | 77 +- .../snippets/socketio/configuration.ts | 3 +- .../snippets/socketio/socket-service-di.ts | 5 +- .../snippets/socketio/socket-service.ts | 17 +- .../snippets/socketio/socket-session.ts | 1 - .../socketio/socket-use-middleware.ts | 1 - .../socketio/socket-use-middleware2.ts | 2 - .../snippets/swagger/configuration-with-js.ts | 3 +- .../snippets/swagger/configuration.ts | 3 +- .../swagger/endpoint-documentation.ts | 7 +- .../swagger/multi-spec-controllers.ts | 9 +- docs/tutorials/snippets/swagger/multi-spec.ts | 3 +- .../typeorm/typeorm-async-provider.ts | 2 +- .../snippets/typeorm/typeorm-configuration.ts | 16 +- .../typeorm/typeorm-custom-configuration.ts | 16 +- .../typeorm/typeorm-entity-controller.ts | 3 +- .../typeorm/typeorm-entity-repository.ts | 2 +- .../typeorm-injection-async-provider.ts | 4 +- .../typeorm-injection-entity-repository.ts | 5 +- .../snippets/typeorm/typeorm-usage.ts | 5 +- docs/tutorials/socket-io.md | 73 +- docs/tutorials/stripe.md | 157 +- docs/tutorials/swagger.md | 76 +- docs/tutorials/templating.md | 2 +- docs/tutorials/terminus.md | 39 +- docs/tutorials/typeorm.md | 26 +- docs/warehouse/README.md | 11 +- lerna.json | 4 +- packages/core/package.json | 2 +- packages/core/readme.md | 3 +- packages/core/src/utils/objects/deepMerge.ts | 6 +- packages/core/tsconfig.compile.esm.json | 13 +- packages/core/tsconfig.compile.json | 9 +- packages/di/package.json | 2 +- packages/di/readme.md | 78 +- packages/di/src/services/InjectorService.ts | 18 +- packages/di/test/integration/di.spec.ts | 12 +- packages/di/test/integration/imports.spec.ts | 23 +- .../di/test/integration/resolvers.spec.ts | 10 +- packages/graphql/apollo/package.json | 2 +- packages/graphql/apollo/readme.md | 8 +- .../graphql/apollo/tsconfig.compile.esm.json | 13 +- packages/graphql/apollo/tsconfig.compile.json | 13 +- packages/graphql/graphql-legacy/package.json | 2 +- packages/graphql/graphql-legacy/readme.md | 36 +- .../graphql-legacy/tsconfig.compile.esm.json | 13 +- .../graphql-legacy/tsconfig.compile.json | 13 +- packages/graphql/typegraphql/.mocharc.js | 4 +- packages/graphql/typegraphql/package.json | 2 +- packages/graphql/typegraphql/readme.md | 42 +- .../graphql/typegraphql/test/app/Server.ts | 4 +- .../test/app/graphql/auth/AuthResolver.ts | 5 +- .../typegraphql/test/app/graphql/auth/User.ts | 6 +- .../test/app/services/UsersRepository.ts | 17 +- .../typegraphql/test/graphql-passport.spec.ts | 64 +- .../typegraphql/tsconfig.compile.esm.json | 13 +- .../graphql/typegraphql/tsconfig.compile.json | 13 +- packages/orm/adapters-redis/package.json | 2 +- packages/orm/adapters-redis/readme.md | 60 +- .../adapters-redis/tsconfig.compile.esm.json | 13 +- .../orm/adapters-redis/tsconfig.compile.json | 13 +- packages/orm/adapters/package.json | 2 +- packages/orm/adapters/readme.md | 60 +- .../orm/adapters/tsconfig.compile.esm.json | 13 +- packages/orm/adapters/tsconfig.compile.json | 13 +- packages/orm/mikro-orm/package.json | 2 +- .../orm/mikro-orm/src/MikroOrmModule.spec.ts | 2 +- .../interceptors/TransactionalInterceptor.ts | 7 +- .../mikro-orm/src/services/DBContent.spec.ts | 4 +- .../orm/mikro-orm/tsconfig.compile.esm.json | 13 +- packages/orm/mikro-orm/tsconfig.compile.json | 13 +- packages/orm/mongoose/package.json | 2 +- packages/orm/mongoose/readme.md | 258 +- .../orm/mongoose/src/utils/createSchema.ts | 2 +- .../test/circularRef.integration.spec.ts | 249 +- .../mongoose/test/helpers/models/Client.ts | 4 +- .../mongoose/test/helpers/models/Contract.ts | 2 +- .../orm/mongoose/test/helpers/models/User.ts | 9 +- .../test/helpers/models/UserWorkspace.ts | 2 +- .../orm/mongoose/test/ref.integration.spec.ts | 5 +- .../test/resources.integration.spec.ts | 77 +- .../test/subdocument.integration.spec.ts | 16 +- .../orm/mongoose/tsconfig.compile.esm.json | 13 +- packages/orm/mongoose/tsconfig.compile.json | 13 +- packages/orm/objection/package.json | 2 +- packages/orm/objection/readme.md | 12 +- .../orm/objection/test/helpers/knex/table.ts | 6 +- .../orm/objection/test/helpers/models/User.ts | 2 +- .../orm/objection/test/integration.spec.ts | 14 +- .../orm/objection/tsconfig.compile.esm.json | 13 +- packages/orm/objection/tsconfig.compile.json | 13 +- packages/orm/testing-mongoose/package.json | 2 +- packages/orm/testing-mongoose/readme.md | 4 +- .../tsconfig.compile.esm.json | 13 +- .../testing-mongoose/tsconfig.compile.json | 13 +- packages/orm/typeorm/package.json | 2 +- packages/orm/typeorm/readme.md | 66 +- .../orm/typeorm/tsconfig.compile.esm.json | 13 +- packages/orm/typeorm/tsconfig.compile.json | 13 +- packages/perf/package.json | 2 +- packages/perf/readme.md | 15 +- packages/perf/tsconfig.compile.esm.json | 13 +- packages/perf/tsconfig.compile.json | 9 +- packages/platform/common/package.json | 2 +- packages/platform/common/readme.md | 95 +- .../src/services/PlatformRequest.spec.ts | 17 +- .../src/utils/setResponseHeaders.spec.ts | 4 +- .../test/integration/configuration.spec.ts | 9 +- .../integration/returns.spec.integration.ts | 33 +- .../platform/common/tsconfig.compile.esm.json | 13 +- .../platform/common/tsconfig.compile.json | 13 +- packages/platform/platform-aws/package.json | 2 +- packages/platform/platform-aws/readme.md | 38 +- .../platform-aws/tsconfig.compile.esm.json | 13 +- .../platform-aws/tsconfig.compile.json | 13 +- packages/platform/platform-cache/package.json | 2 +- packages/platform/platform-cache/readme.md | 3 +- .../platform-cache/tsconfig.compile.esm.json | 13 +- .../platform-cache/tsconfig.compile.json | 13 +- .../platform/platform-exceptions/package.json | 2 +- .../platform/platform-exceptions/readme.md | 3 +- .../src/domain/ExceptionSchema.spec.ts | 4 +- .../tsconfig.compile.esm.json | 13 +- .../platform-exceptions/tsconfig.compile.json | 13 +- .../platform/platform-express/package.json | 2 +- packages/platform/platform-express/readme.md | 2 - .../platform-express/test/app/Server.ts | 3 +- .../platform-express/test/app/emulate.ts | 6 +- .../platform-express/test/app/index.ts | 2 +- .../platform-express/test/array-body.spec.ts | 282 +- .../test/data/largePayload.json | 7592 ++--------------- .../platform-express/test/fullpayload.spec.ts | 12 +- .../platform-express/test/groups.spec.ts | 230 +- .../platform-express/test/pageable.spec.ts | 42 +- .../platform-express/test/plain-text.spec.ts | 22 +- .../test/query-parser.spec.ts | 16 +- .../test/response-filter.spec.ts | 28 +- .../tsconfig.compile.esm.json | 13 +- .../platform-express/tsconfig.compile.json | 13 +- packages/platform/platform-koa/package.json | 2 +- packages/platform/platform-koa/readme.md | 2 - .../platform-koa/tsconfig.compile.esm.json | 13 +- .../platform-koa/tsconfig.compile.json | 13 +- .../platform-log-middleware/package.json | 2 +- .../platform-log-middleware/readme.md | 3 +- .../tsconfig.compile.esm.json | 13 +- .../tsconfig.compile.json | 13 +- .../platform-middlewares/package.json | 2 +- .../platform/platform-middlewares/readme.md | 3 +- .../tsconfig.compile.esm.json | 13 +- .../tsconfig.compile.json | 13 +- .../platform/platform-params/package.json | 2 +- packages/platform/platform-params/readme.md | 3 +- .../platform-params/tsconfig.compile.esm.json | 13 +- .../platform-params/tsconfig.compile.json | 13 +- .../platform-response-filter/package.json | 2 +- .../platform-response-filter/readme.md | 3 +- .../src/decorators/responseFilter.ts | 2 +- .../services/PlatformResponseFilter.spec.ts | 4 +- .../tsconfig.compile.esm.json | 13 +- .../tsconfig.compile.json | 13 +- .../platform-serverless-http/package.json | 2 +- .../platform-serverless-http/readme.md | 44 +- .../test/body.integration.spec.ts | 54 +- .../test/integration/aws-basic/README.md | 1 - .../test/integration/aws-basic/package.json | 2 +- .../test/integration/aws-basic/serverless.yml | 6 +- .../test/integration/aws-basic/src/Server.ts | 6 +- .../aws-basic/src/TimeslotsController.ts | 2 +- .../test/integration/aws-basic/src/index.ts | 2 +- .../aws-basic/tsconfig.compile.json | 11 +- .../integration/aws-basic/webpack.config.js | 39 +- .../serverlessContext.integration.spec.ts | 84 +- .../tsconfig.compile.esm.json | 13 +- .../tsconfig.compile.json | 13 +- .../platform-serverless-testing/package.json | 2 +- .../tsconfig.compile.esm.json | 13 +- .../tsconfig.compile.json | 13 +- .../platform/platform-serverless/package.json | 2 +- .../platform/platform-serverless/readme.md | 64 +- .../src/builder/PlatformServerless.spec.ts | 2 +- .../src/builder/PlatformServerlessHandler.ts | 2 +- .../src/utils/setResponseHeaders.spec.ts | 4 +- .../test/body.integration.spec.ts | 42 +- .../platform-serverless/test/data/event.json | 48 +- .../test/integration/aws-basic/README.md | 1 - .../test/integration/aws-basic/package.json | 2 +- .../test/integration/aws-basic/serverless.yml | 6 +- .../aws-basic/src/TimeslotsLambda.ts | 2 +- .../aws-basic/tsconfig.compile.json | 11 +- .../integration/aws-basic/webpack.config.js | 39 +- .../test/params.integration.spec.ts | 12 +- .../test/query.integration.spec.ts | 19 +- .../test/response.integration.spec.ts | 10 +- .../test/utils/createServerlessContext.ts | 2 +- .../tsconfig.compile.esm.json | 13 +- .../platform-serverless/tsconfig.compile.json | 13 +- .../platform/platform-test-utils/package.json | 2 +- .../src/tests/testErrors.ts | 12 +- .../src/tests/testHeaders.ts | 8 +- .../src/tests/testInheritanceController.ts | 2 +- .../src/tests/testRedirect.ts | 2 +- .../src/tests/testResponse.ts | 2 +- .../src/tests/testResponseFilter.ts | 4 +- packages/platform/platform-views/package.json | 2 +- packages/platform/platform-views/readme.md | 3 +- .../platform-views/tsconfig.compile.esm.json | 13 +- .../platform-views/tsconfig.compile.json | 13 +- packages/security/jwks/package.json | 2 +- packages/security/jwks/readme.md | 10 +- packages/security/jwks/src/getJwks.spec.ts | 6 +- .../security/jwks/tsconfig.compile.esm.json | 13 +- packages/security/jwks/tsconfig.compile.json | 13 +- packages/security/oidc-provider/.mocharc.js | 4 +- packages/security/oidc-provider/package.json | 2 +- packages/security/oidc-provider/readme.md | 58 +- .../security/oidc-provider/test/app/Server.ts | 4 +- .../app/controllers/oidc/InteractionsCtrl.ts | 8 +- .../test/app/controllers/pages/IndexCtrl.ts | 7 +- .../test/app/controllers/rest/VersionCtrl.ts | 6 +- .../app/interactions/ConsentInteraction.ts | 20 +- .../app/interactions/CustomInteraction.ts | 5 +- .../test/app/interactions/LoginInteraction.ts | 32 +- .../oidc-provider/test/app/models/Account.ts | 2 +- .../test/app/services/Accounts.ts | 15 +- .../test/oidc.integration.spec.ts | 200 +- .../oidc-provider/tsconfig.compile.esm.json | 13 +- .../oidc-provider/tsconfig.compile.json | 13 +- packages/security/passport/package.json | 2 +- packages/security/passport/readme.md | 30 +- .../passport/test/app/models/Account.ts | 2 +- .../passport/test/app/models/Credentials.ts | 2 +- .../test/app/services/UsersRepository.ts | 13 +- .../test/passport.integration.spec.ts | 21 +- .../passport/tsconfig.compile.esm.json | 13 +- .../security/passport/tsconfig.compile.json | 13 +- packages/specs/ajv/package.json | 2 +- packages/specs/ajv/readme.md | 69 +- .../integration/formats.integration.spec.ts | 15 +- .../integration/keywords.integration.spec.ts | 26 +- .../validation.integration.spec.ts | 71 +- packages/specs/ajv/tsconfig.compile.esm.json | 13 +- packages/specs/ajv/tsconfig.compile.json | 13 +- packages/specs/exceptions/package.json | 2 +- packages/specs/exceptions/readme.md | 3 +- .../exceptions/tsconfig.compile.esm.json | 13 +- .../specs/exceptions/tsconfig.compile.json | 13 +- packages/specs/json-mapper/package.json | 2 +- packages/specs/json-mapper/readme.md | 1 + .../after.deserialize.integration.spec.ts | 2 +- .../enum.serialiazation.integration.spec.ts | 10 +- .../integration/generics.integration.spec.ts | 175 +- .../integration/groups.integration.spec.ts | 102 +- .../integration/moment.integration.spec.ts | 6 +- .../nested-list.integration.spec.ts | 21 +- .../integration/nullable.integration.spec.ts | 38 +- .../json-mapper/tsconfig.compile.esm.json | 13 +- .../specs/json-mapper/tsconfig.compile.json | 13 +- packages/specs/openspec/package.json | 2 +- packages/specs/openspec/readme.md | 5 +- .../specs/openspec/tsconfig.compile.esm.json | 13 +- packages/specs/openspec/tsconfig.compile.json | 13 +- packages/specs/schema/package.json | 2 +- packages/specs/schema/readme.md | 1 + .../collections/collectionOf.spec.ts | 8 +- .../decorators/common/forwardGroups.spec.ts | 2 +- .../src/decorators/common/groups.spec.ts | 8 +- .../src/decorators/common/minLength.spec.ts | 2 +- .../src/decorators/generics/genericOf.spec.ts | 2 +- .../src/decorators/operations/in.spec.ts | 8 +- .../decorators/operations/location.spec.ts | 2 +- .../src/decorators/operations/partial.spec.ts | 2 +- .../src/decorators/operations/returns.spec.ts | 62 +- .../src/decorators/operations/route.spec.ts | 4 +- .../src/decorators/operations/status.spec.ts | 24 +- .../schema/src/domain/DecoratorContext.ts | 2 +- .../schema/src/domain/JsonMethodStore.spec.ts | 2 +- .../schema/src/domain/JsonOperation.spec.ts | 6 +- .../src/domain/JsonParameterStore.spec.ts | 8 +- .../specs/schema/src/utils/getSpec.spec.ts | 8 +- .../test/deep-object-query-params.spec.ts | 244 +- .../test/dynamicurl.integration.spec.ts | 36 +- .../schema/test/generics.integration.spec.ts | 288 +- .../specs/schema/test/helpers/validateSpec.ts | 5 +- .../test/inheritance.integration.spec.ts | 58 +- .../schema/test/lazyref.integration.spec.ts | 33 +- .../test/nested-list.integration.spec.ts | 36 +- .../schema/test/nullable.integration.spec.ts | 38 +- .../test/oneOf.groups.integration.spec.ts | 90 +- .../pageable-with-search.integration.spec.ts | 297 +- .../schema/test/pageable.integration.spec.ts | 46 +- .../schema/test/response.integration.spec.ts | 164 +- .../test/union-types.integration.spec.ts | 103 +- .../specs/schema/tsconfig.compile.esm.json | 13 +- packages/specs/schema/tsconfig.compile.json | 13 +- packages/specs/swagger/package.json | 2 +- packages/specs/swagger/readme.md | 154 +- .../src/services/data/spec.expected.json | 10 +- .../specs/swagger/src/services/data/spec.json | 2 +- packages/specs/swagger/test/app/index.ts | 1 - .../specs/swagger/test/swagger.anyof.spec.ts | 104 +- .../swagger/test/swagger.bodyparams.spec.ts | 112 +- .../swagger/test/swagger.integration.spec.ts | 4 +- .../swagger/test/swagger.operationId.spec.ts | 17 +- packages/specs/swagger/tsconfig.compile.json | 13 +- packages/third-parties/agenda/.mocharc.js | 4 +- packages/third-parties/agenda/package.json | 2 +- packages/third-parties/agenda/readme.md | 21 +- .../agenda/test/integration.spec.ts | 6 +- .../agenda/tsconfig.compile.esm.json | 13 +- .../agenda/tsconfig.compile.json | 13 +- .../async-hook-context/.mocharc.js | 4 +- .../async-hook-context/package.json | 2 +- .../async-hook-context/readme.md | 16 +- .../async-hook-context.integration.spec.ts | 6 +- .../tsconfig.compile.esm.json | 13 +- .../async-hook-context/tsconfig.compile.json | 13 +- .../third-parties/event-emitter/.mocharc.js | 4 +- .../third-parties/event-emitter/package.json | 2 +- .../third-parties/event-emitter/readme.md | 15 +- .../event-emitter/test/integration.spec.ts | 41 +- .../event-emitter/tsconfig.compile.esm.json | 13 +- .../event-emitter/tsconfig.compile.json | 13 +- .../third-parties/formio-types/package.json | 2 +- packages/third-parties/formio-types/readme.md | 1 + .../formio-types/tsconfig.compile.esm.json | 13 +- .../formio-types/tsconfig.compile.json | 13 +- packages/third-parties/formio/.mocharc.js | 4 +- packages/third-parties/formio/package.json | 2 +- packages/third-parties/formio/readme.md | 14 +- .../third-parties/formio/test/app/Server.ts | 8 +- .../test/app/controllers/pages/IndexCtrl.ts | 7 +- .../test/app/controllers/rest/VersionCtrl.ts | 6 +- .../formio/test/template/project.json | 174 +- .../formio/tsconfig.compile.esm.json | 13 +- .../formio/tsconfig.compile.json | 13 +- .../third-parties/schema-formio/package.json | 2 +- .../third-parties/schema-formio/readme.md | 10 +- .../src/utils/getFormioSchema.ts | 2 +- .../test/array.integration.spec.ts | 72 +- .../test/basic.integration.spec.ts | 2 +- .../test/datamap.integration.spec.ts | 89 +- .../test/date.integration.spec.ts | 128 +- .../test/email.integration.spec.ts | 6 +- .../test/nested-form.integration.spec.ts | 144 +- .../test/number.integration.spec.ts | 108 +- .../test/object.integration.spec.ts | 40 +- .../test/required.integration.spec.ts | 78 +- .../test/string.integration.spec.ts | 130 +- .../schema-formio/tsconfig.compile.esm.json | 13 +- .../schema-formio/tsconfig.compile.json | 13 +- packages/third-parties/seq/package.json | 2 +- packages/third-parties/seq/readme.md | 20 +- .../seq/tsconfig.compile.esm.json | 13 +- .../third-parties/seq/tsconfig.compile.json | 9 +- .../socketio-testing/package.json | 2 +- .../third-parties/socketio-testing/readme.md | 178 +- .../tsconfig.compile.esm.json | 13 +- .../socketio-testing/tsconfig.compile.json | 13 +- packages/third-parties/socketio/.mocharc.js | 4 +- packages/third-parties/socketio/package.json | 2 +- packages/third-parties/socketio/readme.md | 178 +- .../third-parties/socketio/test/app/Server.ts | 2 +- .../socketio/test/app/services/RoomWS.ts | 2 +- .../socketio/test/socket.integration.spec.ts | 52 +- .../socketio/test/socketio.spec.ts | 3 +- .../socketio/tsconfig.compile.esm.json | 13 +- .../socketio/tsconfig.compile.json | 13 +- packages/third-parties/stripe/.mocharc.js | 4 +- packages/third-parties/stripe/package.json | 2 +- packages/third-parties/stripe/readme.md | 133 +- .../test/app/controllers/pages/IndexCtrl.ts | 7 +- .../controllers/rest/StripeWebhooksCtrl.ts | 11 +- .../test/app/controllers/rest/VersionCtrl.ts | 6 +- .../stripe/test/stripe.integration.spec.ts | 49 +- .../stripe/tsconfig.compile.esm.json | 13 +- .../stripe/tsconfig.compile.json | 13 +- packages/third-parties/terminus/package.json | 2 +- packages/third-parties/terminus/readme.md | 48 +- .../third-parties/terminus/test/app/Server.ts | 9 +- .../terminus/tsconfig.compile.esm.json | 13 +- .../terminus/tsconfig.compile.json | 13 +- packages/utils/components-scan/package.json | 2 +- packages/utils/components-scan/readme.md | 2 - .../components-scan/tsconfig.compile.esm.json | 13 +- .../components-scan/tsconfig.compile.json | 13 +- readme.md | 95 +- test/helper/buildPlatformParams.ts | 5 +- test/helper/createFakeHandlerContext.ts | 2 +- tools/benchmarks-apps/package.json | 2 +- tools/benchmarks/package.json | 2 +- tools/benchmarks/templates/template.md | 6 +- tools/benchmarks/tsconfig.compile.json | 11 +- tools/github-sponsors/package.json | 2 +- tools/github-sponsors/src/utils/print.js | 22 +- tools/jest/package.json | 2 +- tools/mocha/package.json | 2 +- tools/mocha/sinon-chai.js | 35 +- yarn.lock | 241 +- 639 files changed, 7445 insertions(+), 15330 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/01_bug-report.md b/.github/ISSUE_TEMPLATE/01_bug-report.md index 79412aba5b2..4eff9a0d1d4 100644 --- a/.github/ISSUE_TEMPLATE/01_bug-report.md +++ b/.github/ISSUE_TEMPLATE/01_bug-report.md @@ -4,21 +4,19 @@ about: Create a report to help us improve title: "[BUG] Title" labels: bug assignees: Romakita - --- ## Information - **Version:** 5.x -- Packages: +- Packages: A few sentences describing the overall goals of the issue. ## Example -``` +```ts import {} from "@tsed/common"; - ``` ## Acceptance criteria diff --git a/.github/ISSUE_TEMPLATE/02_feature-request.md b/.github/ISSUE_TEMPLATE/02_feature-request.md index d65b763b117..8359b0b661c 100644 --- a/.github/ISSUE_TEMPLATE/02_feature-request.md +++ b/.github/ISSUE_TEMPLATE/02_feature-request.md @@ -1,25 +1,23 @@ --- name: "\U0001F680 Feature request" about: Suggest an idea for this project -title: '' +title: "" labels: enhancement assignees: Romakita - --- -## Informations +## Information + **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. -``` +```ts import {} from "@tsed/common"; - ``` - **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. diff --git a/.github/ISSUE_TEMPLATE/04_say-thank-you.md b/.github/ISSUE_TEMPLATE/04_say-thank-you.md index e7b8da85c8f..984ae1153a8 100644 --- a/.github/ISSUE_TEMPLATE/04_say-thank-you.md +++ b/.github/ISSUE_TEMPLATE/04_say-thank-you.md @@ -1,10 +1,9 @@ --- name: "❤️ Say thank you" about: Tell us how you use Ts.ED & support our efforts in maintaining it -title: '' -labels: '' +title: "" +labels: "" assignees: Romakita - --- # ❤️ I'm using Ts.ED diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 24cf579939a..6feed387f9f 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -5,9 +5,7 @@ contact_links: about: Open a discussion that can be followed by the whole community on Github! - name: 💬 Community channel (Slack) url: https://api.tsed.io/rest/slack/tsedio/tsed - about: Join our slack workspace to discuss directly wiht the team! + about: Join our slack workspace to discuss directly wiht the team! - name: 💬 Community group (Gitter deprecated) url: https://gitter.im/Tsed-io/Community - about: You want to ask a question or discuss with other community members - - + about: You want to ask a question or discuss with other community members diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d464554fd70..32ca3ed19d8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [ 16.x ] + node-version: [16.x] steps: - uses: actions/checkout@v2 @@ -29,14 +29,14 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - node-version: [ 14.x, 16.x ] + node-version: [14.x, 16.x] exclude: -# - os: macos-latest -# node-version: 12.x + # - os: macos-latest + # node-version: 12.x - os: macos-latest node-version: 14.x -# - os: windows-latest -# node-version: 12.x + # - os: windows-latest + # node-version: 12.x - os: windows-latest node-version: 14.x @@ -62,7 +62,7 @@ jobs: strategy: matrix: - node-version: [ 16.x ] + node-version: [16.x] steps: - uses: actions/checkout@v2 @@ -90,7 +90,7 @@ jobs: strategy: matrix: - node-version: [ 16.x ] + node-version: [16.x] steps: - uses: actions/checkout@v2 @@ -107,7 +107,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [ 16.x ] + node-version: [16.x] steps: - uses: actions/checkout@v2 @@ -147,7 +147,7 @@ jobs: strategy: matrix: - node-version: [ 16.x ] + node-version: [16.x] steps: - uses: actions/checkout@v2 @@ -171,12 +171,12 @@ jobs: strategy: matrix: - node-version: [ 16.x ] + node-version: [16.x] steps: - uses: actions/checkout@v2 with: - ref: 'production' + ref: "production" - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: @@ -200,12 +200,12 @@ jobs: strategy: matrix: - node-version: [ 16.x ] + node-version: [16.x] steps: - uses: actions/checkout@v2 with: - ref: 'production' + ref: "production" - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml index e5bae3c194a..68f9da0c582 100644 --- a/.github/workflows/rebase.yml +++ b/.github/workflows/rebase.yml @@ -15,4 +15,4 @@ jobs: - name: Automatic Rebase uses: cirrus-actions/rebase@1.3.1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 9fed935433f..08873582c0f 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [ 14.x ] + node-version: [14.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [ 14.x ] + node-version: [14.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} diff --git a/.mocharc.js b/.mocharc.js index 30098914431..a22885e94f4 100644 --- a/.mocharc.js +++ b/.mocharc.js @@ -1 +1 @@ -module.exports = require('@tsed/mocha-config')(); +module.exports = require("@tsed/mocha-config")(); diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 99807725e49..d390104646c 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -10,23 +10,23 @@ race, religion, or sexual identity and orientation. Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual - attention or advances -* Trolling, insulting/derogatory comments, and personal or political - attacks -* Public or private harassment -* Publishing others' private information, such as a physical or - electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate - in a professional setting +- The use of sexualized language or imagery and unwelcome sexual + attention or advances +- Trolling, insulting/derogatory comments, and personal or political + attacks +- Public or private harassment +- Publishing others' private information, such as a physical or + electronic address, without explicit permission +- Other conduct which could reasonably be considered inappropriate + in a professional setting Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair @@ -53,7 +53,7 @@ at https://gitter.im/Tsed-io/community. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of -an incident. Further details of specific enforcement policies may be +an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0e7dc738ce4..cadf378e319 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,5 @@ -# Contributing +# Contributing + ## Introduction First, thank you for considering contributing to Ts.ED! It is people like you that make the open source community such a great community! 😊 @@ -23,6 +24,7 @@ Code review process The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge. It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you? --- + ### WARNING Ts.ED project uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/) as format commit message. @@ -30,8 +32,7 @@ Ts.ED project uses [conventional commits](https://www.conventionalcommits.org/en Release note and tagging version are based on the message commits. If you don't follow the format, our CI won't be able to increment the version correctly and your feature won't be released on NPM. -To write your commit message, see [convention page here](https://www.conventionalcommits.org/en/v1.0.0-beta.4/) ---- +## To write your commit message, see [convention page here](https://www.conventionalcommits.org/en/v1.0.0-beta.4/) ## Financial contributions @@ -42,6 +43,7 @@ We also welcome financial contributions in full transparency on our open collect If you have any questions, create an [issue](https://github.com/tsedio/tsed/issues) (protip: do a quick search first to see if someone else didn't ask the same question before!). You can also reach us at https://gitter.im/Tsed-io/community. ## How to work on Ts.ED + ### Setup Clone your fork of the repository @@ -51,16 +53,18 @@ $ git clone https://github.com/YOUR_USERNAME/tsed.git ``` Install npm dependencies with yarn (not with NPM!): + ```bash yarn ``` + > After installing dependencies, yarn/npm run the `postinstall` hook and mounted all packages with `npm link` (e.g. `yarn run repo:bootstrap`). Compile TypeScript: ```bash yarn build -// or +// or npm run build ``` @@ -102,6 +106,7 @@ git commit -m "feat(domain): Your message" ``` Then: + ```bash npm run test git fetch @@ -143,18 +148,17 @@ yarn vuepress:serve - Feel free to ask for help from other members of the Ts.ED team. ## Credits + ### Contributors - ### Backers Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)] - ### Sponsors Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)] diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 242f8b44fa3..e9aaa4917d5 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -1,10 +1,10 @@ ## Information -Type | Breaking change ----|--- -Feature/Fix/Doc/Chore | Yes/No +| Type | Breaking change | +| --------------------- | --------------- | +| Feature/Fix/Doc/Chore | Yes/No | -**** +---