{"id":430309,"date":"2024-08-26T15:01:10","date_gmt":"2024-08-26T15:01:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=430309"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=430309","title":{"rendered":"<span>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Swagger \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432 NestJS-mod \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f REST-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043b\u044f Angular-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f: <a href=\"https:\/\/habr.com\/ru\/articles\/837008\/\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 PrismaORM \u0432 NestJS-mod \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0447\u0435\u0440\u0435\u0437 REST<\/a><\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 Swagger \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u0431\u044d\u043a\u0435\u043d\u0434\u0443.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <a href=\"https:\/\/www.npmjs.com\/package\/prisma-class-generator\" rel=\"noopener noreferrer nofollow\">https:\/\/www.npmjs.com\/package\/prisma-class-generator<\/a> \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 DTO \u0438\u0437 Prisma &#8212; \u0441\u0445\u0435\u043c\u044b.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 nx \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <a href=\"https:\/\/www.npmjs.com\/package\/@openapitools\/openapi-generator-cli\" rel=\"noopener noreferrer nofollow\">https:\/\/www.npmjs.com\/package\/@openapitools\/openapi-generator-cli<\/a> \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SDK \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c.<\/p>\n<h4>1. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b<\/h4>\n<p><em>\u041a\u043e\u043c\u0430\u043d\u0434\u044b<\/em><\/p>\n<pre><code class=\"bash\"># Install all need dependencies npm i --save @nestjs\/swagger  # Install all need dev-dependencies npm i --save-dev prisma-class-generator @openapitools\/openapi-generator-cli  # Install all need peer-dependencies npm i --save class-transformer class-validator <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0441\u043e\u043b\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">$ npm i --save @nestjs\/swagger  added 5 packages, removed 1 package, and audited 2512 packages in 14s  300 packages are looking for funding   run `npm fund` for details  17 vulnerabilities (6 moderate, 11 high)  To address issues that do not require attention, run:   npm audit fix  To address all issues (including breaking changes), run:   npm audit fix --force  Run `npm audit` for details.  $ npm i --save-dev prisma-class-generator @openapitools\/openapi-generator-cli  added 50 packages, and audited 2562 packages in 15s  304 packages are looking for funding   run `npm fund` for details  18 vulnerabilities (6 moderate, 12 high)  To address issues that do not require attention, run:   npm audit fix  To address all issues (including breaking changes), run:   npm audit fix --force  Run `npm audit` for details.  $ npm i --save class-transformer class-validator  added 1 package, removed 1 package, and audited 2768 packages in 9s  331 packages are looking for funding   run `npm fund` for details  18 vulnerabilities (6 moderate, 12 high)  To address issues that do not require attention, run:   npm audit fix  To address all issues (including breaking changes), run:   npm audit fix --force  Run `npm audit` for details. <\/code><\/pre>\n<\/div>\n<\/details>\n<h4>2. \u0421\u043e\u0437\u0434\u0430\u0435\u043c Angular \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c<\/h4>\n<p>\u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c.<\/p>\n<p><em>\u041a\u043e\u043c\u0430\u043d\u0434\u044b<\/em><\/p>\n<pre><code class=\"bash\"># Create Angular library .\/node_modules\/.bin\/nx g @nx\/angular:library app-angular-rest-sdk --buildable --publishable --directory=libs\/sdk\/app-angular-rest-sdk --simpleName=true --projectNameAndRootFormat=as-provided --strict=true --prefix=app-angular-rest-sdk --standalone=true --selector=app-angular-rest-sdk --changeDetection=OnPush --importPath=@nestjs-mod-fullstack\/app-angular-rest-sdk  # Change file with test options rm -rf libs\/sdk\/app-angular-rest-sdk\/src\/test-setup.ts cp apps\/client\/src\/test-setup.ts libs\/sdk\/app-angular-rest-sdk\/src\/test-setup.ts <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0441\u043e\u043b\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">$ .\/node_modules\/.bin\/nx g @nx\/angular:library app-angular-rest-sdk --buildable --publishable --directory=libs\/sdk\/app-angular-rest-sdk --simpleName=true --projectNameAndRootFormat=as-provided --strict=true --prefix=app-angular-rest-sdk --standalone=true --selector=app-angular-rest-sdk --changeDetection=OnPush --importPath=@nestjs-mod-fullstack\/app-angular-rest-sdk   NX  Generating @nx\/angular:library  UPDATE nx.json CREATE libs\/sdk\/app-angular-rest-sdk\/project.json CREATE libs\/sdk\/app-angular-rest-sdk\/README.md CREATE libs\/sdk\/app-angular-rest-sdk\/ng-package.json CREATE libs\/sdk\/app-angular-rest-sdk\/package.json CREATE libs\/sdk\/app-angular-rest-sdk\/tsconfig.json CREATE libs\/sdk\/app-angular-rest-sdk\/tsconfig.lib.json CREATE libs\/sdk\/app-angular-rest-sdk\/tsconfig.lib.prod.json CREATE libs\/sdk\/app-angular-rest-sdk\/src\/index.ts CREATE libs\/sdk\/app-angular-rest-sdk\/jest.config.ts CREATE libs\/sdk\/app-angular-rest-sdk\/src\/test-setup.ts CREATE libs\/sdk\/app-angular-rest-sdk\/tsconfig.spec.json CREATE libs\/sdk\/app-angular-rest-sdk\/src\/lib\/app-angular-rest-sdk\/app-angular-rest-sdk.component.css CREATE libs\/sdk\/app-angular-rest-sdk\/src\/lib\/app-angular-rest-sdk\/app-angular-rest-sdk.component.html CREATE libs\/sdk\/app-angular-rest-sdk\/src\/lib\/app-angular-rest-sdk\/app-angular-rest-sdk.component.spec.ts CREATE libs\/sdk\/app-angular-rest-sdk\/src\/lib\/app-angular-rest-sdk\/app-angular-rest-sdk.component.ts CREATE libs\/sdk\/app-angular-rest-sdk\/.eslintrc.json UPDATE package.json UPDATE tsconfig.base.json  added 31 packages, removed 37 packages, and audited 2556 packages in 12s  304 packages are looking for funding   run `npm fund` for details  16 vulnerabilities (4 moderate, 12 high)  To address issues that do not require attention, run:   npm audit fix  To address all issues (including breaking changes), run:   npm audit fix --force  Run `npm audit` for details.   NX   ? View Details of app-angular-rest-sdk  Run \"nx show project app-angular-rest-sdk\" to view details about this project. <\/code><\/pre>\n<\/div>\n<\/details>\n<h4>3. \u0421\u043e\u0437\u0434\u0430\u0435\u043c NestJS \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c<\/h4>\n<p>\u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u0437 E2E-\u0442\u0435\u0441\u0442\u043e\u0432 \u0431\u044d\u043a\u0435\u043d\u0434\u0430.<\/p>\n<p><em>\u041a\u043e\u043c\u0430\u043d\u0434\u044b<\/em><\/p>\n<pre><code class=\"bash\"># Create NestJS library .\/node_modules\/.bin\/nx g @nestjs-mod\/schematics:library app-rest-sdk --buildable --publishable --directory=libs\/sdk\/app-rest-sdk --simpleName=true --projectNameAndRootFormat=as-provided --strict=true <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0441\u043e\u043b\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">$ .\/node_modules\/.bin\/nx g @nestjs-mod\/schematics:library app-rest-sdk --buildable --publishable --directory=libs\/sdk\/app-rest-sdk --simpleName=true --projectNameAndRootFormat=as-provided --strict=true   NX  Generating @nestjs-mod\/schematics:library  CREATE libs\/sdk\/app-rest-sdk\/tsconfig.json CREATE libs\/sdk\/app-rest-sdk\/src\/index.ts CREATE libs\/sdk\/app-rest-sdk\/tsconfig.lib.json CREATE libs\/sdk\/app-rest-sdk\/README.md CREATE libs\/sdk\/app-rest-sdk\/package.json CREATE libs\/sdk\/app-rest-sdk\/project.json CREATE libs\/sdk\/app-rest-sdk\/.eslintrc.json CREATE libs\/sdk\/app-rest-sdk\/jest.config.ts CREATE libs\/sdk\/app-rest-sdk\/tsconfig.spec.json UPDATE tsconfig.base.json CREATE libs\/sdk\/app-rest-sdk\/src\/lib\/app-rest-sdk.configuration.ts CREATE libs\/sdk\/app-rest-sdk\/src\/lib\/app-rest-sdk.environments.ts CREATE libs\/sdk\/app-rest-sdk\/src\/lib\/app-rest-sdk.module.ts <\/code><\/pre>\n<\/div>\n<\/details>\n<h4>4. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 DTO \u0432 Prisma-\u0441\u0445\u0435\u043c\u0443<\/h4>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>apps\/server\/src\/prisma\/app-schema.prisma<\/code><\/p>\n<pre><code>generator client {   provider   = \"prisma-client-js\"   output     = \"..\/..\/..\/..\/node_modules\/@prisma\/app-client\"   engineType = \"binary\" }  generator prismaClassGenerator {   provider               = \"prisma-class-generator\"   output                 = \"..\/app\/generated\/rest\/dto\"   dryRun                 = \"false\"   separateRelationFields = \"false\"   makeIndexFile          = \"file\" }  datasource db {   provider = \"postgres\"   url      = env(\"SERVER_APP_DATABASE_URL\") }  model AppDemo {   id        String   @id(map: \"PK_APP_DEMO\") @default(dbgenerated(\"uuid_generate_v4()\")) @db.Uuid   name      String   @unique(map: \"UQ_APP_DEMO\") @db.VarChar(128)   createdAt DateTime @default(now()) @db.Timestamp(6)   updatedAt DateTime @default(now()) @db.Timestamp(6) }  model migrations {   installed_rank Int      @id(map: \"__migrations_pk\")   version        String?  @db.VarChar(50)   description    String   @db.VarChar(200)   type           String   @db.VarChar(20)   script         String   @db.VarChar(1000)   checksum       Int?   installed_by   String   @db.VarChar(100)   installed_on   DateTime @default(now()) @db.Timestamp(6)   execution_time Int   success        Boolean    @@index([success], map: \"__migrations_s_idx\")   @@map(\"__migrations\") }  <\/code><\/pre>\n<h4>5. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 Swagger \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432 \u0431\u044d\u043a\u0435\u043d\u0434 \u043a\u043e\u0434\u0435<\/h4>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\u0430 <code>apps\/server\/src\/main.ts<\/code><\/p>\n<pre><code class=\"typescript\">import { DefaultNestApplicationInitializer, DefaultNestApplicationListener, InfrastructureMarkdownReportGenerator, PACKAGE_JSON_FILE, ProjectUtils, bootstrapNestApplication, isInfrastructureMode } from '@nestjs-mod\/common'; import { DOCKER_COMPOSE_FILE, DockerCompose, DockerComposePostgreSQL } from '@nestjs-mod\/docker-compose'; import { FLYWAY_JS_CONFIG_FILE, Flyway } from '@nestjs-mod\/flyway'; import { NestjsPinoLoggerModule } from '@nestjs-mod\/pino'; import { ECOSYSTEM_CONFIG_FILE, Pm2 } from '@nestjs-mod\/pm2'; import { FakePrismaClient, PRISMA_SCHEMA_FILE, PrismaModule } from '@nestjs-mod\/prisma'; import { TerminusHealthCheckModule } from '@nestjs-mod\/terminus'; import { DocumentBuilder, SwaggerModule } from '@nestjs\/swagger'; import { MemoryHealthIndicator } from '@nestjs\/terminus'; import { writeFileSync } from 'fs'; import { join, resolve } from 'path'; import { AppModule } from '.\/app\/app.module';  const appFeatureName = 'app'; const rootFolder = join(__dirname, '..', '..', '..'); const appFolder = join(rootFolder, 'apps', 'server');  bootstrapNestApplication({   modules: {     system: [       ProjectUtils.forRoot({         staticConfiguration: {           applicationPackageJsonFile: join(appFolder, PACKAGE_JSON_FILE),           packageJsonFile: join(rootFolder, PACKAGE_JSON_FILE),           envFile: join(rootFolder, '.env'),         },       }),       DefaultNestApplicationInitializer.forRoot({         staticConfiguration: { bufferLogs: true },       }),       NestjsPinoLoggerModule.forRoot(),       TerminusHealthCheckModule.forRootAsync({         configurationFactory: (memoryHealthIndicator: MemoryHealthIndicator) =&gt; ({           standardHealthIndicators: [             {               name: 'memory_heap',               check: () =&gt; memoryHealthIndicator.checkHeap('memory_heap', 150 * 1024 * 1024),             },           ],         }),         inject: [MemoryHealthIndicator],       }),       DefaultNestApplicationListener.forRoot({         staticConfiguration: {           \/\/ When running in infrastructure mode, the backend server does not start.           mode: isInfrastructureMode() ? 'silent' : 'listen',           async preListen(options) {             if (options.app) {               options.app.setGlobalPrefix('api');                const swaggerConf = new DocumentBuilder().addBearerAuth().build();                const document = SwaggerModule.createDocument(options.app, swaggerConf);                SwaggerModule.setup('swagger', options.app, document);                if (isInfrastructureMode()) {                 writeFileSync(resolve(__dirname, '..', '..', '..', 'app-swagger.json'), JSON.stringify(document));               }             }           },         },       }),     ],     core: [       PrismaModule.forRoot({         staticConfiguration: {           schemaFile: join(appFolder, 'src', 'prisma', `${appFeatureName}-${PRISMA_SCHEMA_FILE}`),           featureName: appFeatureName,           prismaModule: isInfrastructureMode() ? { PrismaClient: FakePrismaClient } : import(`@prisma\/app-client`),           addMigrationScripts: false,         },       }),     ],     feature: [AppModule.forRoot()],     infrastructure: [       InfrastructureMarkdownReportGenerator.forRoot({         staticConfiguration: {           markdownFile: join(appFolder, 'INFRASTRUCTURE.MD'),           skipEmptySettings: true,         },       }),       Pm2.forRoot({         configuration: {           ecosystemConfigFile: join(rootFolder, ECOSYSTEM_CONFIG_FILE),           applicationScriptFile: join('dist\/apps\/server\/main.js'),         },       }),       DockerCompose.forRoot({         configuration: {           dockerComposeFileVersion: '3',           dockerComposeFile: join(appFolder, DOCKER_COMPOSE_FILE),         },       }),       DockerComposePostgreSQL.forRoot(),       DockerComposePostgreSQL.forFeature({         featureModuleName: appFeatureName,       }),       Flyway.forRoot({         staticConfiguration: {           featureName: appFeatureName,           migrationsFolder: join(appFolder, 'src', 'migrations'),           configFile: join(rootFolder, FLYWAY_JS_CONFIG_FILE),         },       }),     ],   }, }); <\/code><\/pre>\n<h4>6. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SDK \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c<\/h4>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0444\u0430\u0439\u043b\u0430 <code>apps\/server\/project.json<\/code><\/p>\n<pre><code class=\"json\">{   \"generate\": {     \"executor\": \"nx:run-commands\",     \"options\": {       \"commands\": [\".\/node_modules\/.bin\/prisma generate --schema=.\/apps\/server\/src\/prisma\/app-schema.prisma\", \".\/node_modules\/.bin\/rucken make-ts-list\", \"export NESTJS_MODE=infrastructure &amp;&amp; .\/node_modules\/.bin\/nx serve server --host=0.0.0.0 --watch=false\", \"rm -rf .\/libs\/sdk\/app-angular-rest-sdk\/src\/lib &amp;&amp; mkdir .\/libs\/sdk\/app-angular-rest-sdk\/src\/lib &amp;&amp; .\/node_modules\/.bin\/openapi-generator-cli generate -i .\/app-swagger.json -g typescript-angular -o .\/libs\/sdk\/app-angular-rest-sdk\/src\/lib  --additional-properties=apiModulePrefix=RestClient,configurationPrefix=RestClient,fileNaming=kebab-case,modelFileSuffix=.interface,modelSuffix=Interface,enumNameSuffix=Type,enumPropertyNaming=original,serviceFileSuffix=-rest.service,serviceSuffix=RestService\", \"rm -rf .\/libs\/sdk\/app-rest-sdk\/src\/lib &amp;&amp; mkdir .\/libs\/sdk\/app-rest-sdk\/src\/lib &amp;&amp; .\/node_modules\/.bin\/openapi-generator-cli generate -i .\/app-swagger.json -g typescript-axios -o .\/libs\/sdk\/app-rest-sdk\/src\/lib\"],       \"parallel\": false,       \"envFile\": \".\/.env\",       \"color\": true     }   } } <\/code><\/pre>\n<h4>7. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b Swagger \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Java<\/h4>\n<p><em>\u041a\u043e\u043c\u0430\u043d\u0434\u044b<\/em><\/p>\n<pre><code class=\"bash\">sudo apt install default-jre <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0441\u043e\u043b\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">$ sudo apt install default-jre [sudo] password for endy: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed:   default-jre-headless openjdk-11-jre openjdk-11-jre-headless Suggested packages:   fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei | fonts-wqy-zenhei The following NEW packages will be installed:   default-jre default-jre-headless openjdk-11-jre openjdk-11-jre-headless 0 upgraded, 4 newly installed, 0 to remove and 9 not upgraded. Need to get 38,5 MB of archives. After this operation, 177 MB of additional disk space will be used. Do you want to continue? [Y\/n] Y Get:1 http:\/\/ru.archive.ubuntu.com\/ubuntu focal-updates\/main amd64 openjdk-11-jre-headless amd64 11.0.24+8-1ubuntu3~20.04 [38,3 MB] Get:2 http:\/\/ru.archive.ubuntu.com\/ubuntu focal\/main amd64 default-jre-headless amd64 2:1.11-72 [3\u202f192 B] Get:3 http:\/\/ru.archive.ubuntu.com\/ubuntu focal-updates\/main amd64 openjdk-11-jre amd64 11.0.24+8-1ubuntu3~20.04 [195 kB] Get:4 http:\/\/ru.archive.ubuntu.com\/ubuntu focal\/main amd64 default-jre amd64 2:1.11-72 [1\u202f084 B] Fetched 38,5 MB in 6s (6\u202f643 kB\/s) Selecting previously unselected package openjdk-11-jre-headless:amd64. (Reading database ... 224645 files and directories currently installed.) Preparing to unpack ...\/openjdk-11-jre-headless_11.0.24+8-1ubuntu3~20.04_amd64.deb ... Unpacking openjdk-11-jre-headless:amd64 (11.0.24+8-1ubuntu3~20.04) ... Selecting previously unselected package default-jre-headless. Preparing to unpack ...\/default-jre-headless_2%3a1.11-72_amd64.deb ... Unpacking default-jre-headless (2:1.11-72) ... Selecting previously unselected package openjdk-11-jre:amd64. Preparing to unpack ...\/openjdk-11-jre_11.0.24+8-1ubuntu3~20.04_amd64.deb ... Unpacking openjdk-11-jre:amd64 (11.0.24+8-1ubuntu3~20.04) ... Selecting previously unselected package default-jre. Preparing to unpack ...\/default-jre_2%3a1.11-72_amd64.deb ... Unpacking default-jre (2:1.11-72) ... Setting up openjdk-11-jre-headless:amd64 (11.0.24+8-1ubuntu3~20.04) ... update-alternatives: using \/usr\/lib\/jvm\/java-11-openjdk-amd64\/bin\/java to provide \/usr\/bin\/java (java) in auto mode update-alternatives: using \/usr\/lib\/jvm\/java-11-openjdk-amd64\/bin\/jjs to provide \/usr\/bin\/jjs (jjs) in auto mode update-alternatives: using \/usr\/lib\/jvm\/java-11-openjdk-amd64\/bin\/keytool to provide \/usr\/bin\/keytool (keytool) in auto mode update-alternatives: using \/usr\/lib\/jvm\/java-11-openjdk-amd64\/bin\/rmid to provide \/usr\/bin\/rmid (rmid) in auto mode update-alternatives: using \/usr\/lib\/jvm\/java-11-openjdk-amd64\/bin\/rmiregistry to provide \/usr\/bin\/rmiregistry (rmiregistry) in auto mode update-alternatives: using \/usr\/lib\/jvm\/java-11-openjdk-amd64\/bin\/pack200 to provide \/usr\/bin\/pack200 (pack200) in auto mode update-alternatives: using \/usr\/lib\/jvm\/java-11-openjdk-amd64\/bin\/unpack200 to provide \/usr\/bin\/unpack200 (unpack200) in auto mode update-alternatives: using \/usr\/lib\/jvm\/java-11-openjdk-amd64\/lib\/jexec to provide \/usr\/bin\/jexec (jexec) in auto mode Setting up openjdk-11-jre:amd64 (11.0.24+8-1ubuntu3~20.04) ... Setting up default-jre-headless (2:1.11-72) ... Setting up default-jre (2:1.11-72) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for desktop-file-utils (0.24-1ubuntu3) ... <\/code><\/pre>\n<\/div>\n<\/details>\n<h4>8. \u0422\u0430\u043a \u043a\u0430\u043a eslint \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0441 SDK \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u043f\u043a\u0438 \u0441 SDK \u0432 .eslintignore<\/h4>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\u0430 <code>.eslintignore<\/code><\/p>\n<pre><code>node_modules libs\/sdk\/app-rest-sdk\/src\/lib libs\/sdk\/app-angular-rest-sdk\/src\/lib <\/code><\/pre>\n<h4>9. \u0422\u0430\u043a \u043a\u0430\u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0442\u0430\u0439\u043f\u0441\u043a\u0440\u0438\u043f\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432, \u043e\u043d\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u043e\u0431\u0449\u0438\u0439 index.ts, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u0432 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 index.ts \u0444\u0430\u0439\u043b\u043e\u0432<\/h4>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\u0430 <code>rucken.json<\/code><\/p>\n<pre><code class=\"json\">{   \"makeTsList\": {     \"indexFileName\": \"index\",     \"excludes\": [       \"test-setup.ts\", \/\/ &lt;-- updates       \"*node_modules*\",       \"*public_api.ts*\",       \"*.spec*\",       \"environment*\",       \"*e2e*\",       \"*.stories.ts\",       \"*.d.ts\"     ]   } } <\/code><\/pre>\n<h4>10. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0441\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/h4>\n<p><em>\u041a\u043e\u043c\u0430\u043d\u0434\u044b<\/em><\/p>\n<pre><code class=\"bash\">npm run generate <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0441\u043e\u043b\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">$ npm run generate  &gt; @nestjs-mod-fullstack\/source@0.0.0 generate &gt; .\/node_modules\/.bin\/nx run-many --exclude=@nestjs-mod-fullstack\/source --all -t=generate --skip-nx-cache=true &amp;&amp; npm run make-ts-list &amp;&amp; npm run lint:fix      \u2714  nx run server:generate (14s)  \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014   NX   Successfully ran target generate for project server (14s)   &gt; @nestjs-mod-fullstack\/source@0.0.0 make-ts-list &gt; .\/node_modules\/.bin\/rucken make-ts-list   &gt; @nestjs-mod-fullstack\/source@0.0.0 lint:fix &gt; npm run tsc:lint &amp;&amp; .\/node_modules\/.bin\/nx run-many --exclude=@nestjs-mod-fullstack\/source --all -t=lint --fix   &gt; @nestjs-mod-fullstack\/source@0.0.0 tsc:lint &gt; .\/node_modules\/.bin\/tsc --noEmit -p tsconfig.base.json      \u2714  nx run client:lint  [existing outputs match the cache, left as is]    \u2714  nx run app-angular-rest-sdk:lint  [existing outputs match the cache, left as is]    \u2714  nx run server-e2e:lint (1s)    \u2714  nx run server:lint (1s)  \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014   NX   Successfully ran target lint for 4 projects (1s)        With additional flags:         --fix=true  Nx read the output from the cache instead of running the command for 2 out of 4 tasks.    NX   Nx detected  flaky tasks    client:lint   app-angular-rest-sdk:lint   server-e2e:lint  Flaky tasks can disrupt your CI pipeline. Automatically retry them with Nx Cloud. Learn more at https:\/\/nx.dev\/ci\/features\/flaky-tasks <\/code><\/pre>\n<\/div>\n<\/details>\n<h4>11. \u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 DTO \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 AppController \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 DTO<\/h4>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\u0430 <code>apps\/server\/src\/app\/app.controller.ts<\/code><\/p>\n<pre><code class=\"typescript\">import { Controller, Delete, Get, Param, Post } from '@nestjs\/common';  import { InjectPrismaClient } from '@nestjs-mod\/prisma'; import { ApiCreatedResponse, ApiProperty, ApiResponse } from '@nestjs\/swagger'; import { PrismaClient as AppPrismaClient } from '@prisma\/app-client'; import { randomUUID } from 'crypto'; import { AppService } from '.\/app.service'; import { AppDemo } from '.\/generated\/rest\/dto\/app_demo';  export class AppData {   \/\/ &lt;- updates   @ApiProperty({ type: String })   message: string; }  @Controller() export class AppController {   constructor(     @InjectPrismaClient()     private readonly appPrismaClient: AppPrismaClient,     private readonly appService: AppService   ) {}    @Get()   @ApiResponse({ type: AppData }) \/\/ &lt;- updates   getData() {     return this.appService.getData();   }    @Post('\/demo')   @ApiCreatedResponse({ type: AppDemo }) \/\/ &lt;- updates   async demoCreateOne() {     return await this.appPrismaClient.appDemo.create({ data: { name: 'demo name' + randomUUID() } });   }    @Get('\/demo\/:id')   @ApiResponse({ type: AppDemo }) \/\/ &lt;- updates   async demoFindOne(@Param('id') id: string) {     return await this.appPrismaClient.appDemo.findFirstOrThrow({ where: { id } });   }    @Delete('\/demo\/:id')   @ApiResponse({ type: AppDemo }) \/\/ &lt;- updates   async demoDeleteOne(@Param('id') id: string) {     return await this.appPrismaClient.appDemo.delete({ where: { id } });   }    @Get('\/demo')   @ApiResponse({ type: AppDemo, isArray: true }) \/\/ &lt;- updates   async demoFindMany() {     return await this.appPrismaClient.appDemo.findMany();   } } <\/code><\/pre>\n<h4>12. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c SDK \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c \u0432 Angular \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h4>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\u0430 <code>apps\/client\/src\/app\/app.config.ts<\/code><\/p>\n<pre><code class=\"typescript\">import { provideHttpClient } from '@angular\/common\/http'; import { ApplicationConfig, importProvidersFrom, provideZoneChangeDetection } from '@angular\/core'; import { provideClientHydration } from '@angular\/platform-browser'; import { provideRouter } from '@angular\/router'; import { RestClientApiModule, RestClientConfiguration } from '@nestjs-mod-fullstack\/app-angular-rest-sdk'; import { appRoutes } from '.\/app.routes';  export const appConfig: ApplicationConfig = {   providers: [     provideClientHydration(),     provideZoneChangeDetection({ eventCoalescing: true }),     provideRouter(appRoutes),     provideHttpClient(),     importProvidersFrom(       RestClientApiModule.forRoot(         () =&gt;           new RestClientConfiguration({             basePath: 'http:\/\/localhost:3000',           })       )     ),   ], }; <\/code><\/pre>\n<h4>13. \u041c\u0435\u043d\u044f\u0435\u043c HttpClient \u043d\u0430 DefaultRestService \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 Angular \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c<\/h4>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\u0430 <code>apps\/client\/src\/app\/app.component.ts<\/code><\/p>\n<pre><code class=\"typescript\">import { Component, OnInit, ViewEncapsulation } from '@angular\/core'; import { RouterModule } from '@angular\/router'; import { DefaultRestService } from '@nestjs-mod-fullstack\/app-angular-rest-sdk'; import { NxWelcomeComponent } from '.\/nx-welcome.component';  @Component({   standalone: true,   imports: [NxWelcomeComponent, RouterModule],   selector: 'app-root',   templateUrl: '.\/app.component.html',   styleUrl: '.\/app.component.scss',   encapsulation: ViewEncapsulation.None, }) export class AppComponent implements OnInit {   title = 'client';   serverMessage!: string;    constructor(private readonly defaultRestService: DefaultRestService) {}    ngOnInit() {     this.defaultRestService.appControllerGetData().subscribe((result) =&gt; (this.serverMessage = result.message));   } } <\/code><\/pre>\n<h4>14. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c SDK \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c \u0432 \u044e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u044b Angular \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\u0430 <code>apps\/client\/src\/app\/app.component.spec.ts<\/code><\/p>\n<pre><code class=\"typescript\">import { HttpClientModule } from '@angular\/common\/http'; import { TestBed } from '@angular\/core\/testing'; import { RouterModule } from '@angular\/router'; import { RestClientApiModule, RestClientConfiguration } from '@nestjs-mod-fullstack\/app-angular-rest-sdk'; import { AppComponent } from '.\/app.component'; import { NxWelcomeComponent } from '.\/nx-welcome.component';  describe('AppComponent', () =&gt; {   beforeEach(async () =&gt; {     await TestBed.configureTestingModule({       imports: [         AppComponent,         NxWelcomeComponent,         RouterModule.forRoot([]),         HttpClientModule, \/\/ &lt;- updates         RestClientApiModule.forRoot(           \/\/ &lt;- updates           () =&gt;             new RestClientConfiguration({               basePath: 'http:\/\/localhost:3000',             })         ),       ],     }).compileComponents();   });    it('should render title', () =&gt; {     const fixture = TestBed.createComponent(AppComponent);     fixture.detectChanges();     const compiled = fixture.nativeElement as HTMLElement;     expect(compiled.querySelector('h1')?.textContent).toContain('Welcome client');   });    it(`should have as title 'client'`, () =&gt; {     const fixture = TestBed.createComponent(AppComponent);     const app = fixture.componentInstance;     expect(app.title).toEqual('client');   }); }); <\/code><\/pre>\n<h4>15. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c SDK \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c \u0432 E2E-\u0442\u0435\u0441\u0442\u044b NestJS \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h4>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\u0430 <code>apps\/server-e2e\/src\/server\/server.spec.ts<\/code><\/p>\n<pre><code class=\"typescript\">import { Configuration, DefaultApi } from '@nestjs-mod-fullstack\/app-rest-sdk';  describe('GET \/api', () =&gt; {   const defaultApi = new DefaultApi(new Configuration({ basePath: '\/api' }));   let newDemoObject: { id: string };    it('should return a message', async () =&gt; {     const res = await defaultApi.appControllerGetData();      expect(res.status).toBe(200);     expect(res.data).toEqual({ message: 'Hello API' });   });    it('should create and return a demo object', async () =&gt; {     const res = await defaultApi.appControllerDemoCreateOne();      expect(res.status).toBe(201);     expect(res.data.name).toContain('demo name');      newDemoObject = res.data;   });    it('should get demo object by id', async () =&gt; {     const res = await defaultApi.appControllerDemoFindOne(newDemoObject.id);      expect(res.status).toBe(200);     expect(res.data).toMatchObject(newDemoObject);   });    it('should get all demo object', async () =&gt; {     const res = await defaultApi.appControllerDemoFindMany();      expect(res.status).toBe(200);     expect(res.data.filter((row) =&gt; row.id === newDemoObject.id)).toMatchObject([newDemoObject]);   });    it('should delete demo object by id', async () =&gt; {     const res = await defaultApi.appControllerDemoDeleteOne(newDemoObject.id);      expect(res.status).toBe(200);     expect(res.data).toMatchObject(newDemoObject);   });    it('should get all demo object', async () =&gt; {     const res = await defaultApi.appControllerDemoFindMany();      expect(res.status).toBe(200);     expect(res.data.filter((row) =&gt; row.id === newDemoObject.id)).toMatchObject([]);   }); }); <\/code><\/pre>\n<h4>16. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u044e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f NestJS \u0438 Angular \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/h4>\n<p><em>\u041a\u043e\u043c\u0430\u043d\u0434\u044b<\/em><\/p>\n<pre><code class=\"bash\">npm run test <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0441\u043e\u043b\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">$ npm run test  &gt; @nestjs-mod-fullstack\/source@0.0.0 test &gt; .\/node_modules\/.bin\/nx run-many --exclude=@nestjs-mod-fullstack\/source --all -t=test --skip-nx-cache=true --passWithNoTests --output-style=stream-without-prefixes    &gt; nx run app-angular-rest-sdk:test --passWithNoTests   &gt; nx run app-rest-sdk:test --passWithNoTests   &gt; nx run client:test --passWithNoTests   NX   Running target test for 4 projects     \u2714  nx run app-angular-rest-sdk:test (2s)  \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014     \u2714  nx run app-rest-sdk:test (2s)  \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014   NX   Running target test for 4 projects        With additional flags:         --passWithNoTests=true     \u2192  Executing 2\/2 remaining tasks in parallel...    \u2714  nx run client:test (5s)   \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014   NX   Running target test for 4 projects        With additional flags:    \u2714  nx run server:test (5s)  \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014   NX   Successfully ran target test for 4 projects (7s)        With additional flags:         --passWithNoTests=true <\/code><\/pre>\n<\/div>\n<\/details>\n<h4>17. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c E2E-\u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f NestJS \u0438 Angular \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/h4>\n<p><em>\u041a\u043e\u043c\u0430\u043d\u0434\u044b<\/em><\/p>\n<pre><code class=\"bash\">.\/node_modules\/.bin\/nx run-many --exclude=@nestjs-mod-fullstack\/source --all -t=e2e --skip-nx-cache=true --output-style=stream-without-prefixes <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0441\u043e\u043b\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">$ .\/node_modules\/.bin\/nx run-many --exclude=@nestjs-mod-fullstack\/source --all -t=e2e --skip-nx-cache=true --output-style=stream-without-prefixes   &gt; nx run client-e2e:e2e  &gt; playwright test   NX   Running target e2e for 2 projects and 1 task they depend on    NX   Running target e2e for 2 projects and 1 task they depend on     \u2192  Executing 1\/3 remaining tasks...     \u2834  nx run client-e2e:e2e    \u2714  nx run client-e2e:e2e (7s)  \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014   \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014    \u2714  nx run server:build:production (3s)  \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014    \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014   NX   Running target e2e for 2 projects and 1 task they depend on     \u2192  Executing 1\/1 remaining tasks...     \u2826  nx run server-e2e:e2e     \u2714  2\/2 succeeded [0 read from cache]   PASS   server-e2e  apps\/server-e2e\/src\/server\/server.spec.ts   GET \/api     \u2713 should return a message (27 ms)    \u2714  nx run server-e2e:e2e (2s)  \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014   NX   Successfully ran target e2e for 2 projects and 1 task they depend on (12s)    NX   Nx detected a flaky task    server-e2e:e2e  Flaky tasks can disrupt your CI pipeline. Automatically retry them with Nx Cloud. Learn more at https:\/\/nx.dev\/ci\/features\/flaky-tasks <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0432 \u043f\u043e\u0441\u0442\u0435 \u043d\u0435\u0442, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u0441\u0442\u044b, Swagger \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: <a href=\"http:\/\/localhost:3000\/swagger\" rel=\"noopener noreferrer nofollow\">http:\/\/localhost:3000\/swagger<\/a>.<\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0441\u043e\u0431\u0435\u0440\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 NestJS \u0438 Angular \u0438 \u0437\u0430\u043f\u0443\u0449\u0443 \u0438\u0445 \u0432 \u0434\u0432\u0443\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u0445: \u0447\u0435\u0440\u0435\u0437 PM2 \u0438 \u0447\u0435\u0440\u0435\u0437 Docker Compose&#8230;<\/p>\n<h4>\u0421\u0441\u044b\u043b\u043a\u0438<\/h4>\n<p><a href=\"https:\/\/nestjs.com\" rel=\"noopener noreferrer nofollow\">https:\/\/nestjs.com<\/a> &#8212; \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430<br \/> <a href=\"https:\/\/nestjs-mod.com\" rel=\"noopener noreferrer nofollow\">https:\/\/nestjs-mod.com<\/a> &#8212; \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442<br \/> <a href=\"https:\/\/github.com\/nestjs-mod\/nestjs-mod-fullstack\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/nestjs-mod\/nestjs-mod-fullstack<\/a> &#8212; \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437 \u043f\u043e\u0441\u0442\u0430<br \/> <a href=\"https:\/\/github.com\/nestjs-mod\/nestjs-mod-fullstack\/commit\/0353b23b1b65d1ff8e6e5f6185e235bbe05cf523\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/nestjs-mod\/nestjs-mod-fullstack\/commit\/0353b23b1b65d1ff8e6e5f6185e235bbe05cf523<\/a> &#8212; \u043a\u043e\u043c\u043c\u0438\u0442 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/838620\/\"> https:\/\/habr.com\/ru\/articles\/838620\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f: <a href=\"https:\/\/habr.com\/ru\/articles\/837008\/\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 PrismaORM \u0432 NestJS-mod \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0447\u0435\u0440\u0435\u0437 REST<\/a><\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 Swagger \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u0431\u044d\u043a\u0435\u043d\u0434\u0443.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <a href=\"https:\/\/www.npmjs.com\/package\/prisma-class-generator\" rel=\"noopener noreferrer nofollow\">https:\/\/www.npmjs.com\/package\/prisma-class-generator<\/a> \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 DTO \u0438\u0437 Prisma &#8212; \u0441\u0445\u0435\u043c\u044b.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 nx \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <a href=\"https:\/\/www.npmjs.com\/package\/@openapitools\/openapi-generator-cli\" rel=\"noopener noreferrer nofollow\">https:\/\/www.npmjs.com\/package\/@openapitools\/openapi-generator-cli<\/a> \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SDK \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c.<\/p>\n<h4>1. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b<\/h4>\n<p><em>\u041a\u043e\u043c\u0430\u043d\u0434\u044b<\/em><\/p>\n<pre><code class=\"bash\"># Install all need dependencies npm i --save @nestjs\/swagger  # Install all need dev-dependencies npm i --save-dev prisma-class-generator @openapitools\/openapi-generator-cli  # Install all need peer-dependencies npm i --save class-transformer class-validator <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0441\u043e\u043b\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">$ npm i --save @nestjs\/swagger  added 5 packages, removed 1 package, and audited 2512 packages in 14s  300 packages are looking for funding   run `npm fund` for details  17 vulnerabilities (6 moderate, 11 high)  To address issues that do not require attention, run:   npm audit fix  To address all issues (including breaking changes), run:   npm audit fix --force  Run `npm audit` for details.  $ npm i --save-dev prisma-class-generator @openapitools\/openapi-generator-cli  added 50 packages, and audited 2562 packages in 15s  304 packages are looking for funding   run `npm fund` for details  18 vulnerabilities (6 moderate, 12 high)  To address issues that do not require attention, run:   npm audit fix  To address all issues (including breaking changes), run:   npm audit fix --force  Run `npm audit` for details.  $ npm i --save class-transformer class-validator  added 1 package, removed 1 package, and audited 2768 packages in 9s  331 packages are looking for funding   run `npm fund` for details  18 vulnerabilities (6 moderate, 12 high)  To address issues that do not require attention, run:   npm audit fix  To address all issues (including breaking changes), run:   npm audit fix --force  Run `npm audit` for details. <\/code><\/pre>\n<\/div>\n<\/details>\n<h4>2. \u0421\u043e\u0437\u0434\u0430\u0435\u043c Angular \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c<\/h4>\n<p>\u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c.<\/p>\n<p><em>\u041a\u043e\u043c\u0430\u043d\u0434\u044b<\/em><\/p>\n<pre><code class=\"bash\"># Create Angular library .\/node_modules\/.bin\/nx g @nx\/angular:library app-angular-rest-sdk --buildable --publishable --directory=libs\/sdk\/app-angular-rest-sdk --simpleName=true --projectNameAndRootFormat=as-provided --strict=true --prefix=app-angular-rest-sdk --standalone=true --selector=app-angular-rest-sdk --changeDetection=OnPush --importPath=@nestjs-mod-fullstack\/app-angular-rest-sdk  # Change file with test options rm -rf libs\/sdk\/app-angular-rest-sdk\/src\/test-setup.ts cp apps\/client\/src\/test-setup.ts libs\/sdk\/app-angular-rest-sdk\/src\/test-setup.ts <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0441\u043e\u043b\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">$ .\/node_modules\/.bin\/nx g @nx\/angular:library app-angular-rest-sdk --buildable --publishable --directory=libs\/sdk\/app-angular-rest-sdk --simpleName=true --projectNameAndRootFormat=as-provided --strict=true --prefix=app-angular-rest-sdk --standalone=true --selector=app-angular-rest-sdk --changeDetection=OnPush --importPath=@nestjs-mod-fullstack\/app-angular-rest-sdk   NX  Generating @nx\/angular:library  UPDATE nx.json CREATE libs\/sdk\/app-angular-rest-sdk\/project.json CREATE libs\/sdk\/app-angular-rest-sdk\/README.md CREATE libs\/sdk\/app-angular-rest-sdk\/ng-package.json CREATE libs\/sdk\/app-angular-rest-sdk\/package.json CREATE libs\/sdk\/app-angular-rest-sdk\/tsconfig.json CREATE libs\/sdk\/app-angular-rest-sdk\/tsconfig.lib.json CREATE libs\/sdk\/app-angular-rest-sdk\/tsconfig.lib.prod.json CREATE libs\/sdk\/app-angular-rest-sdk\/src\/index.ts CREATE libs\/sdk\/app-angular-rest-sdk\/jest.config.ts CREATE libs\/sdk\/app-angular-rest-sdk\/src\/test-setup.ts CREATE libs\/sdk\/app-angular-rest-sdk\/tsconfig.spec.json CREATE libs\/sdk\/app-angular-rest-sdk\/src\/lib\/app-angular-rest-sdk\/app-angular-rest-sdk.component.css CREATE libs\/sdk\/app-angular-rest-sdk\/src\/lib\/app-angular-rest-sdk\/app-angular-rest-sdk.component.html CREATE libs\/sdk\/app-angular-rest-sdk\/src\/lib\/app-angular-rest-sdk\/app-angular-rest-sdk.component.spec.ts CREATE libs\/sdk\/app-angular-rest-sdk\/src\/lib\/app-angular-rest-sdk\/app-angular-rest-sdk.component.ts CREATE libs\/sdk\/app-angular-rest-sdk\/.eslintrc.json UPDATE package.json UPDATE tsconfig.base.json  added 31 packages, removed 37 packages, and audited 2556 packages in 12s  304 packages are looking for funding   run `npm fund` for details  16 vulnerabilities (4 moderate, 12 high)  To address issues that do not require attention, run:   npm audit fix  To address all issues (including breaking changes), run:   npm audit fix --force  Run `npm audit` for details.   NX   ? View Details of app-angular-rest-sdk  Run \"nx show project app-angular-rest-sdk\" to view details about this project. <\/code><\/pre>\n<\/div>\n<\/details>\n<h4>3. \u0421\u043e\u0437\u0434\u0430\u0435\u043c NestJS \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c<\/h4>\n<p>\u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u0437 E2E-\u0442\u0435\u0441\u0442\u043e\u0432 \u0431\u044d\u043a\u0435\u043d\u0434\u0430.<\/p>\n<p><em>\u041a\u043e\u043c\u0430\u043d\u0434\u044b<\/em><\/p>\n<pre><code class=\"bash\"># Create NestJS library .\/node_modules\/.bin\/nx g @nestjs-mod\/schematics:library app-rest-sdk --buildable --publishable --directory=libs\/sdk\/app-rest-sdk --simpleName=true --projectNameAndRootFormat=as-provided --strict=true <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0441\u043e\u043b\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">$ .\/node_modules\/.bin\/nx g @nestjs-mod\/schematics:library app-rest-sdk --buildable --publishable --directory=libs\/sdk\/app-rest-sdk --simpleName=true --projectNameAndRootFormat=as-provided --strict=true   NX  Generating @nestjs-mod\/schematics:library  CREATE libs\/sdk\/app-rest-sdk\/tsconfig.json CREATE libs\/sdk\/app-rest-sdk\/src\/index.ts CREATE libs\/sdk\/app-rest-sdk\/tsconfig.lib.json CREATE libs\/sdk\/app-rest-sdk\/README.md CREATE libs\/sdk\/app-rest-sdk\/package.json CREATE libs\/sdk\/app-rest-sdk\/project.json CREATE libs\/sdk\/app-rest-sdk\/.eslintrc.json CREATE libs\/sdk\/app-rest-sdk\/jest.config.ts CREATE libs\/sdk\/app-rest-sdk\/tsconfig.spec.json UPDATE tsconfig.base.json CREATE libs\/sdk\/app-rest-sdk\/src\/lib\/app-rest-sdk.configuration.ts CREATE libs\/sdk\/app-rest-sdk\/src\/lib\/app-rest-sdk.environments.ts CREATE libs\/sdk\/app-rest-sdk\/src\/lib\/app-rest-sdk.module.ts <\/code><\/pre>\n<\/div>\n<\/details>\n<h4>4. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 DTO \u0432 Prisma-\u0441\u0445\u0435\u043c\u0443<\/h4>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>apps\/server\/src\/prisma\/app-schema.prisma<\/code><\/p>\n<pre><code>generator client {   provider   = \"prisma-client-js\"   output     = \"..\/..\/..\/..\/node_modules\/@prisma\/app-client\"   engineType = \"binary\" }  generator prismaClassGenerator {   provider               = \"prisma-class-generator\"   output                 = \"..\/app\/generated\/rest\/dto\"   dryRun                 = \"false\"   separateRelationFields = \"false\"   makeIndexFile          = \"file\" }  datasource db {   provider = \"postgres\"   url      = env(\"SERVER_APP_DATABASE_URL\") }  model AppDemo {   id        String   @id(map: \"PK_APP_DEMO\") @default(dbgenerated(\"uuid_generate_v4()\")) @db.Uuid   name      String   @unique(map: \"UQ_APP_DEMO\") @db.VarChar(128)   createdAt DateTime @default(now()) @db.Timestamp(6)   updatedAt DateTime @default(now()) @db.Timestamp(6) }  model migrations {   installed_rank Int      @id(map: \"__migrations_pk\")   version        String?  @db.VarChar(50)   description    String   @db.VarChar(200)   type           String   @db.VarChar(20)   script         String   @db.VarChar(1000)   checksum       Int?   installed_by   String   @db.VarChar(100)   installed_on   DateTime @default(now()) @db.Timestamp(6)   execution_time Int   success        Boolean    @@index([success], map: \"__migrations_s_idx\")   @@map(\"__migrations\") }  <\/code><\/pre>\n<h4>5. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 Swagger \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432 \u0431\u044d\u043a\u0435\u043d\u0434 \u043a\u043e\u0434\u0435<\/h4>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\u0430 <code>apps\/server\/src\/main.ts<\/code><\/p>\n<pre><code class=\"typescript\">import { DefaultNestApplicationInitializer, DefaultNestApplicationListener, InfrastructureMarkdownReportGenerator, PACKAGE_JSON_FILE, ProjectUtils, bootstrapNestApplication, isInfrastructureMode } from '@nestjs-mod\/common'; import { DOCKER_COMPOSE_FILE, DockerCompose, DockerComposePostgreSQL } from '@nestjs-mod\/docker-compose'; import { FLYWAY_JS_CONFIG_FILE, Flyway } from '@nestjs-mod\/flyway'; import { NestjsPinoLoggerModule } from '@nestjs-mod\/pino'; import { ECOSYSTEM_CONFIG_FILE, Pm2 } from '@nestjs-mod\/pm2'; import { FakePrismaClient, PRISMA_SCHEMA_FILE, PrismaModule } from '@nestjs-mod\/prisma'; import { TerminusHealthCheckModule } from '@nestjs-mod\/terminus'; import { DocumentBuilder, SwaggerModule } from '@nestjs\/swagger'; import { MemoryHealthIndicator } from '@nestjs\/terminus'; import { writeFileSync } from 'fs'; import { join, resolve } from 'path'; import { AppModule } from '.\/app\/app.module';  const appFeatureName = 'app'; const rootFolder = join(__dirname, '..', '..', '..'); const appFolder = join(rootFolder, 'apps', 'server');  bootstrapNestApplication({   modules: {     system: [       ProjectUtils.forRoot({         staticConfiguration: {           applicationPackageJsonFile: join(appFolder, PACKAGE_JSON_FILE),           packageJsonFile: join(rootFolder, PACKAGE_JSON_FILE),           envFile: join(rootFolder, '.env'),         },       }),       DefaultNestApplicationInitializer.forRoot({         staticConfiguration: { bufferLogs: true },       }),       NestjsPinoLoggerModule.forRoot(),       TerminusHealthCheckModule.forRootAsync({         configurationFactory: (memoryHealthIndicator: MemoryHealthIndicator) =&gt; ({           standardHealthIndicators: [             {               name: 'memory_heap',               check: () =&gt; memoryHealthIndicator.checkHeap('memory_heap', 150 * 1024 * 1024),             },           ],         }),         inject: [MemoryHealthIndicator],       }),       DefaultNestApplicationListener.forRoot({         staticConfiguration: {           \/\/ When running in infrastructure mode, the backend server does not start.           mode: isInfrastructureMode() ? 'silent' : 'listen',           async preListen(options) {             if (options.app) {               options.app.setGlobalPrefix('api');                const swaggerConf = new DocumentBuilder().addBearerAuth().build();                const document = SwaggerModule.createDocument(options.app, swaggerConf);                SwaggerModule.setup('swagger', options.app, document);                if (isInfrastructureMode()) {                 writeFileSync(resolve(__dirname, '..', '..', '..', 'app-swagger.json'), <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-430309","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/430309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=430309"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/430309\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=430309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=430309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=430309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}