From f2d65a3fc6821f7988b9b0e42de39929ea65b981 Mon Sep 17 00:00:00 2001 From: Gearonix Date: Sat, 14 Oct 2023 01:13:40 +0300 Subject: [PATCH] fix(ci): fixes --- .github/workflows/storybook.yml | 3 +++ apps/docs/.vitepress/config.mts | 1 + apps/docs/.vitepress/theme/index.ts | 4 +++- apps/docs/project.json | 9 +++++++-- apps/server/service-auth/project.json | 6 +++--- package.json | 3 +-- .../src/modules/env/types/enviroment.interfaces.ts | 2 -- packages/api/common/src/modules/env/types/index.ts | 1 - .../src/microservice/files/project.json.template | 6 +++--- 9 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index ce8c33fd..d42939b5 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -59,5 +59,8 @@ jobs: branch: storybook-build GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Initializing Playwright + run: npx playwright install + - name: Testing storybook in production run: yarn nx run web-ui:storybook:test:production diff --git a/apps/docs/.vitepress/config.mts b/apps/docs/.vitepress/config.mts index 1d2c4b71..0d3efd46 100644 --- a/apps/docs/.vitepress/config.mts +++ b/apps/docs/.vitepress/config.mts @@ -5,6 +5,7 @@ export default defineConfig({ description: 'Online code editor built on Preact, Nest and Nx', lastUpdated: true, cleanUrls: true, + ignoreDeadLinks: true, head: [['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }]], diff --git a/apps/docs/.vitepress/theme/index.ts b/apps/docs/.vitepress/theme/index.ts index 94105aaa..1d576dca 100644 --- a/apps/docs/.vitepress/theme/index.ts +++ b/apps/docs/.vitepress/theme/index.ts @@ -2,7 +2,9 @@ import { h } from 'vue' import Theme from 'vitepress/theme' import './style.css' -localStorage.setItem('vitepress-theme-appearance', 'dark') +if (typeof localStorage !== 'undefined') { + localStorage.setItem('vitepress-theme-appearance', 'dark') +} export default { extends: Theme, diff --git a/apps/docs/project.json b/apps/docs/project.json index 69e4483b..279f47f5 100644 --- a/apps/docs/project.json +++ b/apps/docs/project.json @@ -13,7 +13,11 @@ "build": { "executor": "nx:run-commands", "options": { - "command": "vitepress build", + "commands": [ + "vitepress build", + "mkdir -p ../../dist/docs", + "mv .vitepress/dist ../../dist/docs" + ], "cwd": "apps/docs" } }, @@ -22,7 +26,8 @@ "options": { "command": "vitepress preview", "cwd": "apps/docs" - } + }, + "dependsOn": ["build"] } } } diff --git a/apps/server/service-auth/project.json b/apps/server/service-auth/project.json index 491edcb2..89f3f977 100644 --- a/apps/server/service-auth/project.json +++ b/apps/server/service-auth/project.json @@ -14,10 +14,10 @@ "compiler": "tsc", "outputPath": "dist/apps/server/service-auth", "generatePackageJson": true, - "main": "apps/server/service-auth/src/main.ts.template", + "main": "apps/server/service-auth/src/main.ts", "tsConfig": "apps/server/service-auth/tsconfig.app.json", "isolatedConfig": true, - "webpackConfig": "apps/server/service-auth/.config/webpack.ts.template", + "webpackConfig": "apps/server/service-auth/.config/webpack.ts", "skipTypeCheck": true }, "configurations": { @@ -53,7 +53,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "apps/server/service-auth/.config/jest.ts.template", + "jestConfig": "apps/server/service-auth/.config/jest.ts", "passWithNoTests": true }, "configurations": { diff --git a/package.json b/package.json index 2e8a8ebd..edec776b 100644 --- a/package.json +++ b/package.json @@ -242,6 +242,5 @@ "workbox-routing": "^7.0.0", "workbox-strategies": "^7.0.0", "workbox-window": "^7.0.0" - }, - "generators": "./generators.json" + } } diff --git a/packages/api/common/src/modules/env/types/enviroment.interfaces.ts b/packages/api/common/src/modules/env/types/enviroment.interfaces.ts index 1acb30ca..f831bba0 100644 --- a/packages/api/common/src/modules/env/types/enviroment.interfaces.ts +++ b/packages/api/common/src/modules/env/types/enviroment.interfaces.ts @@ -1,5 +1,3 @@ -import { NodeEnv } from './node-env.enum' - export interface DatabaseConfig { url: string } diff --git a/packages/api/common/src/modules/env/types/index.ts b/packages/api/common/src/modules/env/types/index.ts index 74035df5..2589bf65 100644 --- a/packages/api/common/src/modules/env/types/index.ts +++ b/packages/api/common/src/modules/env/types/index.ts @@ -4,4 +4,3 @@ export { KafkaConfig, DatabaseConfig } from './enviroment.interfaces' -export { NodeEnv } from './node-env.enum' diff --git a/tools/generators/src/microservice/files/project.json.template b/tools/generators/src/microservice/files/project.json.template index 0cb45775..eee6c1e6 100644 --- a/tools/generators/src/microservice/files/project.json.template +++ b/tools/generators/src/microservice/files/project.json.template @@ -14,10 +14,10 @@ "compiler": "tsc", "outputPath": "dist/apps/server/service-<%= name %>", "generatePackageJson": true, - "main": "apps/server/service-<%= name %>/src/main.ts.template", + "main": "apps/server/service-<%= name %>/src/main.ts", "tsConfig": "apps/server/service-<%= name %>/tsconfig.app.json", "isolatedConfig": true, - "webpackConfig": "apps/server/service-<%= name %>/.config/webpack.ts.template", + "webpackConfig": "apps/server/service-<%= name %>/.config/webpack.ts", "skipTypeCheck": true }, "configurations": { @@ -53,7 +53,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "apps/server/service-<%= name %>/.config/jest.ts.template", + "jestConfig": "apps/server/service-<%= name %>/.config/jest.ts", "passWithNoTests": true }, "configurations": {