diff --git a/apps/web-ui/app/root.tsx b/apps/web-ui/app/root.tsx index 1a151336..ca36f207 100644 --- a/apps/web-ui/app/root.tsx +++ b/apps/web-ui/app/root.tsx @@ -35,21 +35,25 @@ export const links: LinksFunction = () => [ }, { rel: 'stylesheet', href: styles }, { rel: 'stylesheet', href: 'https://rsms.me/inter/inter.css' }, - { rel: 'apple-touch-icon', href: '/apple-touch-icon.png', sizes: '180x180' }, + { + rel: 'apple-touch-icon', + href: '/ui/apple-touch-icon.png', + sizes: '180x180', + }, { rel: 'icon', type: 'image/png', - href: '/favicon-32x32.png', + href: '/ui/favicon-32x32.png', sizes: '32x32', }, { rel: 'icon', type: 'image/png', - href: '/favicon-16x16.png', + href: '/ui/favicon-16x16.png', sizes: '16x16', }, - { rel: 'manifest', href: '/site.webmanifest' }, - { rel: 'mask-icon', href: '/safari-pinned-tab.svg', color: '#222452' }, + { rel: 'manifest', href: '/ui/site.webmanifest' }, + { rel: 'mask-icon', href: '/ui/safari-pinned-tab.svg', color: '#222452' }, ]; export function Layout({ children }: { children: React.ReactNode }) { diff --git a/apps/web-ui/vite.config.ts b/apps/web-ui/vite.config.ts index 50a04a62..ee76bd5a 100644 --- a/apps/web-ui/vite.config.ts +++ b/apps/web-ui/vite.config.ts @@ -1,6 +1,8 @@ import { vitePlugin as remix } from '@remix-run/dev'; import { defineConfig, loadEnv } from 'vite'; import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin'; +import license from 'rollup-plugin-license'; +import path from 'path'; const BASE_URL = '/ui/'; @@ -16,6 +18,23 @@ export default defineConfig(({ mode }) => { root: __dirname, cacheDir: '../../node_modules/.vite/apps/web-ui', plugins: [ + { + ...license({ + cwd: path.join(__dirname, '../..'), + thirdParty: { + output: { + file: path.join( + __dirname, + '../../dist/apps/web-ui', + 'vendor.LICENSE.txt' + ), + }, + }, + }), + apply(config, env) { + return !env.isSsrBuild; + }, + }, !process.env.VITEST && remix({ ssr: false, diff --git a/package.json b/package.json index ca56b4b6..3f0cc4c1 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@babel/core": "7.24.7", "@babel/preset-react": "7.24.7", - "@eslint/eslintrc": "^2.1.1", + "@eslint/eslintrc": "2.1.1", "@eslint/js": "~8.57.0", "@faker-js/faker": "8.4.1", "@mswjs/data": "0.16.1", @@ -97,6 +97,7 @@ "openapi-typescript": "7.4.0", "postcss": "8.4.38", "prettier": "2.8.8", + "rollup-plugin-license": "3.5.3", "tailwindcss": "3.4.3", "tailwindcss-animate": "1.0.7", "tailwindcss-react-aria-components": "1.1.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f9a88aad..124f5acd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -97,8 +97,8 @@ importers: specifier: 7.24.7 version: 7.24.7(@babel/core@7.24.7) '@eslint/eslintrc': - specifier: ^2.1.1 - version: 2.1.4 + specifier: 2.1.1 + version: 2.1.1 '@eslint/js': specifier: ~8.57.0 version: 8.57.1 @@ -285,6 +285,9 @@ importers: prettier: specifier: 2.8.8 version: 2.8.8 + rollup-plugin-license: + specifier: 3.5.3 + version: 3.5.3(rollup@4.24.0) tailwindcss: specifier: 3.4.3 version: 3.4.3(ts-node@10.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@types/node@18.16.9)(typescript@5.5.4)) @@ -1659,8 +1662,8 @@ packages: resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + '@eslint/eslintrc@2.1.1': + resolution: {integrity: sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@eslint/eslintrc@3.1.0': @@ -4093,6 +4096,10 @@ packages: resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} engines: {node: '>= 0.4'} + array-find-index@1.0.2: + resolution: {integrity: sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==} + engines: {node: '>=0.10.0'} + array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} @@ -4590,6 +4597,9 @@ packages: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} + commenting@1.1.0: + resolution: {integrity: sha512-YeNK4tavZwtH7jEgK1ZINXzLKm6DZdEMfsaaieOsCAN0S8vsY7UeuO3Q7d/M018EFgE+IeUAuBOKkFccBZsUZA==} + common-path-prefix@3.0.0: resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} @@ -5530,6 +5540,14 @@ packages: fb-watchman@2.0.2: resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + fdir@6.3.0: + resolution: {integrity: sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + fflate@0.8.2: resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} @@ -7170,6 +7188,9 @@ packages: modern-ahocorasick@1.0.1: resolution: {integrity: sha512-yoe+JbhTClckZ67b2itRtistFKf8yPYelHLc7e5xAwtNAXxM6wJTUx2C7QeVSJFDzKT7bCIFyBVybPMKvmB9AA==} + moment@2.30.1: + resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==} + moo@0.5.2: resolution: {integrity: sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==} @@ -7557,6 +7578,10 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + package-name-regex@2.0.6: + resolution: {integrity: sha512-gFL35q7kbE/zBaPA3UKhp2vSzcPYx2ecbYuwv1ucE9Il6IIgBDweBlH8D68UFGZic2MkllKa2KHCfC1IQBQUYA==} + engines: {node: '>=12'} + pako@0.2.9: resolution: {integrity: sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==} @@ -8370,6 +8395,12 @@ packages: resolution: {integrity: sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==} deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject. + rollup-plugin-license@3.5.3: + resolution: {integrity: sha512-r3wImZSo2d6sEk9BRJtlzeI/upjyjnpthy06Fdl0EzqRrlg3ULb9KQR7xHJI0zuayW/8bchEXSF5dO6dha4OyA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 + rollup-plugin-node-polyfills@0.2.1: resolution: {integrity: sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==} @@ -8665,6 +8696,9 @@ packages: space-separated-tokens@2.0.2: resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} + spdx-compare@1.0.0: + resolution: {integrity: sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A==} + spdx-correct@3.2.0: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} @@ -8674,9 +8708,18 @@ packages: spdx-expression-parse@3.0.1: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + spdx-expression-validate@2.0.0: + resolution: {integrity: sha512-b3wydZLM+Tc6CFvaRDBOF9d76oGIHNCLYFeHbftFXUWjnfZWganmDmvtM5sm1cRwJc/VDBMLyGGrsLFd1vOxbg==} + spdx-license-ids@3.0.18: resolution: {integrity: sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==} + spdx-ranges@2.1.1: + resolution: {integrity: sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA==} + + spdx-satisfies@5.0.1: + resolution: {integrity: sha512-Nwor6W6gzFp8XX4neaKQ7ChV4wmpSh2sSDemMFSzHxpTw460jxFYeOn+jq4ybnSSw/5sc3pjka9MQPouksQNpw==} + spdy-transport@3.0.0: resolution: {integrity: sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==} @@ -11030,7 +11073,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/eslintrc@2.1.4': + '@eslint/eslintrc@2.1.1': dependencies: ajv: 6.12.6 debug: 4.3.7(supports-color@9.4.0) @@ -14888,6 +14931,8 @@ snapshots: call-bind: 1.0.7 is-array-buffer: 3.0.4 + array-find-index@1.0.2: {} + array-flatten@1.1.1: {} array-includes@3.1.8: @@ -15488,6 +15533,8 @@ snapshots: commander@8.3.0: {} + commenting@1.1.0: {} + common-path-prefix@3.0.0: {} compressible@2.0.18: @@ -16702,6 +16749,8 @@ snapshots: dependencies: bser: 2.1.1 + fdir@6.3.0: {} + fflate@0.8.2: {} figures@3.2.0: @@ -18787,6 +18836,8 @@ snapshots: modern-ahocorasick@1.0.1: {} + moment@2.30.1: {} + moo@0.5.2: {} morgan@1.10.0: @@ -19256,6 +19307,8 @@ snapshots: p-try@2.2.0: {} + package-name-regex@2.0.6: {} + pako@0.2.9: {} parent-module@1.0.1: @@ -20188,6 +20241,20 @@ snapshots: rollup-pluginutils: 2.8.2 optional: true + rollup-plugin-license@3.5.3(rollup@4.24.0): + dependencies: + commenting: 1.1.0 + fdir: 6.3.0 + lodash: 4.17.21 + magic-string: 0.30.10 + moment: 2.30.1 + package-name-regex: 2.0.6 + rollup: 4.24.0 + spdx-expression-validate: 2.0.0 + spdx-satisfies: 5.0.1 + transitivePeerDependencies: + - picomatch + rollup-plugin-node-polyfills@0.2.1: dependencies: rollup-plugin-inject: 3.0.2 @@ -20528,6 +20595,12 @@ snapshots: space-separated-tokens@2.0.2: {} + spdx-compare@1.0.0: + dependencies: + array-find-index: 1.0.2 + spdx-expression-parse: 3.0.1 + spdx-ranges: 2.1.1 + spdx-correct@3.2.0: dependencies: spdx-expression-parse: 3.0.1 @@ -20540,8 +20613,20 @@ snapshots: spdx-exceptions: 2.5.0 spdx-license-ids: 3.0.18 + spdx-expression-validate@2.0.0: + dependencies: + spdx-expression-parse: 3.0.1 + spdx-license-ids@3.0.18: {} + spdx-ranges@2.1.1: {} + + spdx-satisfies@5.0.1: + dependencies: + spdx-compare: 1.0.0 + spdx-expression-parse: 3.0.1 + spdx-ranges: 2.1.1 + spdy-transport@3.0.0: dependencies: debug: 4.3.7(supports-color@9.4.0)