From 4de890ba77527738c470adbe3761c978f4627325 Mon Sep 17 00:00:00 2001 From: Toni Koskinen Date: Fri, 27 Mar 2026 10:37:42 +0200 Subject: [PATCH] Fixes and adjustments to demo --- .gitignore | 1 + .vscode/extensions.json | 3 +- apps/api-e2e/jest.config.cts | 2 +- apps/api/src/main.ts | 3 + .../controllers/posts/posts.controller.ts | 25 - .../api/src/modules/users/posts.controller.ts | 41 ++ apps/api/src/modules/users/posts.module.ts | 7 +- apps/api/src/modules/users/posts.service.ts | 40 ++ apps/web-app/src/app/app.config.ts | 3 +- apps/web-app/src/app/app.html | 1 - apps/web-app/src/app/app.routes.ts | 8 +- apps/web-app/src/app/app.spec.ts | 23 +- apps/web-app/src/app/app.ts | 5 +- apps/web-app/src/app/features/home/home.html | 32 ++ apps/web-app/src/app/features/home/home.scss | 56 ++ .../src/app/features/home/home.spec.ts | 34 ++ apps/web-app/src/app/features/home/home.ts | 39 ++ .../PostService/post-service.spec.ts | 16 + .../PostService/PostService/post-service.ts | 16 + apps/web-app/src/index.html | 6 +- apps/web-app/src/styles.scss | 40 ++ docker-compose.yml | 2 +- jest.config.ts | 6 + jest.preset.js | 3 + libs/shared-dto/README.md | 11 + libs/shared-dto/eslint.config.mjs | 19 + libs/shared-dto/jest.config.cts | 10 + libs/shared-dto/project.json | 9 + libs/shared-dto/src/index.ts | 1 + libs/shared-dto/src/lib/shared-dto.spec.ts | 7 + libs/shared-dto/src/lib/shared-dto.ts | 9 + libs/shared-dto/tsconfig.json | 23 + libs/shared-dto/tsconfig.lib.json | 15 + libs/shared-dto/tsconfig.spec.json | 16 + nx.json | 21 +- package.json | 12 +- pnpm-lock.yaml | 517 +++++++++++++++++- prisma.config.ts | 1 + .../20260326110513_init/migration.sql | 15 - prisma/migrations/migration_lock.toml | 3 - prisma/schema.prisma | 15 +- prisma/seed.sql | 5 - prisma/seedData.ts | 56 ++ tsconfig.base.json | 3 +- 44 files changed, 1076 insertions(+), 104 deletions(-) delete mode 100644 apps/api/src/modules/users/controllers/posts/posts.controller.ts create mode 100644 apps/api/src/modules/users/posts.controller.ts create mode 100644 apps/api/src/modules/users/posts.service.ts create mode 100644 apps/web-app/src/app/features/home/home.html create mode 100644 apps/web-app/src/app/features/home/home.scss create mode 100644 apps/web-app/src/app/features/home/home.spec.ts create mode 100644 apps/web-app/src/app/features/home/home.ts create mode 100644 apps/web-app/src/app/services/PostService/PostService/post-service.spec.ts create mode 100644 apps/web-app/src/app/services/PostService/PostService/post-service.ts create mode 100644 jest.config.ts create mode 100644 jest.preset.js create mode 100644 libs/shared-dto/README.md create mode 100644 libs/shared-dto/eslint.config.mjs create mode 100644 libs/shared-dto/jest.config.cts create mode 100644 libs/shared-dto/project.json create mode 100644 libs/shared-dto/src/index.ts create mode 100644 libs/shared-dto/src/lib/shared-dto.spec.ts create mode 100644 libs/shared-dto/src/lib/shared-dto.ts create mode 100644 libs/shared-dto/tsconfig.json create mode 100644 libs/shared-dto/tsconfig.lib.json create mode 100644 libs/shared-dto/tsconfig.spec.json delete mode 100644 prisma/migrations/20260326110513_init/migration.sql delete mode 100644 prisma/migrations/migration_lock.toml delete mode 100644 prisma/seed.sql create mode 100644 prisma/seedData.ts diff --git a/.gitignore b/.gitignore index d3a7e1b..3dbd31c 100644 --- a/.gitignore +++ b/.gitignore @@ -56,4 +56,5 @@ __screenshots__/ /prisma/libs/prisma-generated/src/lib/generated libs/prisma-generated/src/lib/generated/ +/prisma/migrations/ diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 462e29b..6a302fe 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,6 +2,7 @@ "recommendations": [ "nrwl.angular-console", "esbenp.prettier-vscode", - "dbaeumer.vscode-eslint" + "dbaeumer.vscode-eslint", + "firsttris.vscode-jest-runner" ] } diff --git a/apps/api-e2e/jest.config.cts b/apps/api-e2e/jest.config.cts index b2a9fd5..5535be7 100644 --- a/apps/api-e2e/jest.config.cts +++ b/apps/api-e2e/jest.config.cts @@ -1,4 +1,4 @@ -export default { +module.exports = { displayName: 'api-e2e', preset: '../../jest.preset.js', globalSetup: '/src/support/global-setup.ts', diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index 27cc058..21c2f10 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -9,6 +9,9 @@ import { AppModule } from './app/app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); + app.enableCors({ + origin: ['http://localhost:4200'], + }); const globalPrefix = 'api'; app.setGlobalPrefix(globalPrefix); const port = process.env.PORT || 3000; diff --git a/apps/api/src/modules/users/controllers/posts/posts.controller.ts b/apps/api/src/modules/users/controllers/posts/posts.controller.ts deleted file mode 100644 index 519eebd..0000000 --- a/apps/api/src/modules/users/controllers/posts/posts.controller.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Controller, Get, NotFoundException, Param } from '@nestjs/common'; -import { Post } from '@shared/prisma-generated/src/types'; -import { prisma } from '@shared/prisma-generated/src/prisma'; - -@Controller('posts') -export class PostsController { - @Get() - async findAll(): Promise { - const posts = await prisma.post.findMany(); - return posts; - } - - @Get(':id') - async findById(@Param('id') id: string): Promise { - const post = await prisma.post.findUnique({ - where: { id }, - }); - - if (!post) { - throw new NotFoundException(`Post with id ${id} not found`); - } - - return post; - } -} \ No newline at end of file diff --git a/apps/api/src/modules/users/posts.controller.ts b/apps/api/src/modules/users/posts.controller.ts new file mode 100644 index 0000000..30e9809 --- /dev/null +++ b/apps/api/src/modules/users/posts.controller.ts @@ -0,0 +1,41 @@ +import { Controller, Get, Param, Post, Body, Put, Delete, NotFoundException } from '@nestjs/common'; +import { PostsService } from './posts.service'; +import { Post as PostEntity } from '@shared/prisma-generated/src/types'; +import { PostDto } from '@shared/shared-dto'; +import { UpdatePostDto } from '@shared/shared-dto'; + +@Controller('posts') +export class PostsController { + constructor(private readonly postsService: PostsService) {} + + @Get() + async findAll(): Promise { + const posts = this.postsService.findAll(); + + if (!posts) { + throw new NotFoundException("No posts found") + } + + return posts + } + + @Get(':id') + async findById(@Param('id') id: string): Promise { + return this.postsService.findById(id); + } + + @Post() + async create(@Body() data: PostDto): Promise { + return this.postsService.create(data); + } + + @Put(':id') + async update(@Param('id') id: string, @Body() data: UpdatePostDto): Promise { + return this.postsService.update(id, data); + } + + @Delete(':id') + async delete(@Param('id') id: string): Promise { + return this.postsService.delete(id); + } +} \ No newline at end of file diff --git a/apps/api/src/modules/users/posts.module.ts b/apps/api/src/modules/users/posts.module.ts index 92e3d64..22f896f 100644 --- a/apps/api/src/modules/users/posts.module.ts +++ b/apps/api/src/modules/users/posts.module.ts @@ -1,7 +1,10 @@ import { Module } from '@nestjs/common'; -import { PostsController } from './controllers/posts/posts.controller'; +import { PostsController } from './posts.controller'; +import { PostsService } from './posts.service'; @Module({ controllers: [PostsController], + providers: [PostsService], + exports: [PostsService], }) -export class PostsModule {} +export class PostsModule {} \ No newline at end of file diff --git a/apps/api/src/modules/users/posts.service.ts b/apps/api/src/modules/users/posts.service.ts new file mode 100644 index 0000000..6c5ebac --- /dev/null +++ b/apps/api/src/modules/users/posts.service.ts @@ -0,0 +1,40 @@ +import { Injectable, NotFoundException } from '@nestjs/common'; +import { Post } from '@shared/prisma-generated/src/types'; +import { prisma } from '@shared/prisma-generated/src/prisma'; +import { PostDto } from '@shared/shared-dto'; +import { UpdatePostDto } from '@shared/shared-dto'; + +@Injectable() +export class PostsService { + async findAll(): Promise { + const posts = await prisma.post.findMany(); + return posts; + } + + async findById(id: string): Promise { + const post = await prisma.post.findUnique({ + where: { id }, + }); + + if (!post) { + throw new NotFoundException(`Post with id ${id} not found`); + } + + return post; + } + + async create(data: PostDto): Promise { + return prisma.post.create({ data }); + } + + async update(id: string, data: UpdatePostDto): Promise { + return prisma.post.update({ + where: { id }, + data, + }); + } + + async delete(id: string): Promise { + return prisma.post.delete({ where: { id } }); + } +} \ No newline at end of file diff --git a/apps/web-app/src/app/app.config.ts b/apps/web-app/src/app/app.config.ts index 9e7120f..5fe7d1a 100644 --- a/apps/web-app/src/app/app.config.ts +++ b/apps/web-app/src/app/app.config.ts @@ -4,7 +4,8 @@ import { } from '@angular/core'; import { provideRouter } from '@angular/router'; import { appRoutes } from './app.routes'; +import { provideHttpClient } from '@angular/common/http'; export const appConfig: ApplicationConfig = { - providers: [provideBrowserGlobalErrorListeners(), provideRouter(appRoutes)], + providers: [provideBrowserGlobalErrorListeners(), provideRouter(appRoutes), provideHttpClient()], }; diff --git a/apps/web-app/src/app/app.html b/apps/web-app/src/app/app.html index 2339c6a..0680b43 100644 --- a/apps/web-app/src/app/app.html +++ b/apps/web-app/src/app/app.html @@ -1,2 +1 @@ - diff --git a/apps/web-app/src/app/app.routes.ts b/apps/web-app/src/app/app.routes.ts index 8762dfe..cfdc631 100644 --- a/apps/web-app/src/app/app.routes.ts +++ b/apps/web-app/src/app/app.routes.ts @@ -1,3 +1,9 @@ import { Route } from '@angular/router'; +import { Home } from './features/home/home'; -export const appRoutes: Route[] = []; +export const appRoutes: Route[] = [ + { + path: '', + component: Home, + }, +]; diff --git a/apps/web-app/src/app/app.spec.ts b/apps/web-app/src/app/app.spec.ts index afe942e..5457c20 100644 --- a/apps/web-app/src/app/app.spec.ts +++ b/apps/web-app/src/app/app.spec.ts @@ -1,20 +1,31 @@ import { TestBed } from '@angular/core/testing'; +import { provideRouter, Router } from '@angular/router'; import { App } from './app'; -import { NxWelcome } from './nx-welcome'; +import { appRoutes } from './app.routes'; describe('App', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [App, NxWelcome], + imports: [App], + providers: [provideRouter(appRoutes)], }).compileComponents(); }); - it('should render title', async () => { + it('should create the app', () => { const fixture = TestBed.createComponent(App); + const app = fixture.componentInstance; + expect(app).toBeTruthy(); + }); + + it('should render Home page on default route', async () => { + const fixture = TestBed.createComponent(App); + const router = TestBed.inject(Router); + + await router.navigateByUrl('/'); + fixture.detectChanges(); await fixture.whenStable(); + const compiled = fixture.nativeElement as HTMLElement; - expect(compiled.querySelector('h1')?.textContent).toContain( - 'Welcome web-app', - ); + expect(compiled.textContent).toContain('Posts'); }); }); diff --git a/apps/web-app/src/app/app.ts b/apps/web-app/src/app/app.ts index 061a781..005cddb 100644 --- a/apps/web-app/src/app/app.ts +++ b/apps/web-app/src/app/app.ts @@ -1,15 +1,12 @@ import { Component } from '@angular/core'; import { RouterModule } from '@angular/router'; -import { NxWelcome } from './nx-welcome'; -import { Post } from '@shared/prisma-generated/src/types' @Component({ - imports: [NxWelcome, RouterModule], + imports: [RouterModule], selector: 'app-root', templateUrl: './app.html', styleUrl: './app.scss', }) export class App { protected title = 'web-app'; - protected posts: Post[] = []; } diff --git a/apps/web-app/src/app/features/home/home.html b/apps/web-app/src/app/features/home/home.html new file mode 100644 index 0000000..a4f4db6 --- /dev/null +++ b/apps/web-app/src/app/features/home/home.html @@ -0,0 +1,32 @@ +
+

Posts

+ +@if (isLoading) { +

Loading posts...

+} @else if (errorMessage) { +

{{ errorMessage }}

+} @else if (posts.length === 0) { +

No posts found.

+} @else { +
+ @for (post of posts; track post) { + + + {{ post.title }} + + +

{{ post.content || 'No content' }}

+

UserId: {{ post.userId }}

+
+
+ } +
+} + +
+ +
+ +
\ No newline at end of file diff --git a/apps/web-app/src/app/features/home/home.scss b/apps/web-app/src/app/features/home/home.scss new file mode 100644 index 0000000..178086b --- /dev/null +++ b/apps/web-app/src/app/features/home/home.scss @@ -0,0 +1,56 @@ +.button-container { + margin: 20px 0; + display: flex; + justify-content: center; + gap: 10px; +} + +.cards-container { + display: flex; + grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); + gap: 20px; + margin-top: 20px; + justify-items: center; + width: 100%; + place-items: center; +} + +.post-card { + height: 100%; + width: 100%; + max-width: 350px; + display: flex; + flex-direction: column; + text-align: center; + + mat-card-header { + padding-bottom: 16px; + } + + mat-card-content { + flex: 1; + overflow-y: auto; + max-height: 200px; + } +} + +.error-message { + color: #d32f2f; + font-weight: 500; + margin-top: 16px; +} + +.no-posts-message { + color: #666; + font-style: italic; + margin-top: 16px; +} + +.home { + display: flex; + flex-direction: column; + align-items: center; + width: 100%; + padding: 20px; +} + diff --git a/apps/web-app/src/app/features/home/home.spec.ts b/apps/web-app/src/app/features/home/home.spec.ts new file mode 100644 index 0000000..221643d --- /dev/null +++ b/apps/web-app/src/app/features/home/home.spec.ts @@ -0,0 +1,34 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { Home } from './home'; +import { By } from '@angular/platform-browser'; +import { DebugElement } from '@angular/core'; + +describe('Home', () => { + let component: Home; + let fixture: ComponentFixture; + let debugElement: DebugElement; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [Home], + }).compileComponents(); + + fixture = TestBed.createComponent(Home); + component = fixture.componentInstance; + await fixture.whenStable(); + + debugElement = fixture.debugElement; + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); + + it('should have button', () => { + const fetchButton = debugElement.query( + By.css('[data-testid="fetch-button"]') + ); + + expect(fetchButton).toBeDefined(); + }) +}); diff --git a/apps/web-app/src/app/features/home/home.ts b/apps/web-app/src/app/features/home/home.ts new file mode 100644 index 0000000..dff419b --- /dev/null +++ b/apps/web-app/src/app/features/home/home.ts @@ -0,0 +1,39 @@ +import { ChangeDetectorRef, Component, inject } from '@angular/core'; +import { PostDto } from '@shared/shared-dto' +import { PostService } from '../../services/PostService/PostService/post-service'; +import { timeout } from 'rxjs'; +import { MatButtonModule } from '@angular/material/button' +import {MatCardModule} from '@angular/material/card'; + +@Component({ + selector: 'app-home', + imports: [MatButtonModule, MatCardModule], + templateUrl: './home.html', + styleUrl: './home.scss', +}) +export class Home { + posts: PostDto[] = []; + isLoading = false; + errorMessage = ''; + + postService = inject(PostService); + cdr = inject(ChangeDetectorRef); + + fetchPosts(): void { + this.isLoading = true; + this.errorMessage = ''; + this.postService.getPosts().pipe(timeout(8000)).subscribe({ + next: (posts) => { + this.posts = posts; + this.isLoading = false; + this.cdr.detectChanges(); + }, + error: () => { + this.errorMessage = 'Failed to load posts.'; + this.isLoading = false; + this.cdr.detectChanges(); + }, + }); + } + +} diff --git a/apps/web-app/src/app/services/PostService/PostService/post-service.spec.ts b/apps/web-app/src/app/services/PostService/PostService/post-service.spec.ts new file mode 100644 index 0000000..2188411 --- /dev/null +++ b/apps/web-app/src/app/services/PostService/PostService/post-service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { PostService } from './post-service'; + +describe('PostService', () => { + let service: PostService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(PostService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/apps/web-app/src/app/services/PostService/PostService/post-service.ts b/apps/web-app/src/app/services/PostService/PostService/post-service.ts new file mode 100644 index 0000000..d408859 --- /dev/null +++ b/apps/web-app/src/app/services/PostService/PostService/post-service.ts @@ -0,0 +1,16 @@ +import { inject, Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http' +import { Observable } from 'rxjs'; +import { PostDto } from '@shared/shared-dto'; + +@Injectable({ + providedIn: 'root', +}) +export class PostService { + private httpClient = inject(HttpClient); + private baseUrl = 'http://localhost:3000/api'; + + getPosts(): Observable { + return this.httpClient.get(`${this.baseUrl}/posts`); + } +} diff --git a/apps/web-app/src/index.html b/apps/web-app/src/index.html index e3f8643..7e78ac8 100644 --- a/apps/web-app/src/index.html +++ b/apps/web-app/src/index.html @@ -6,7 +6,11 @@ - + + + + + diff --git a/apps/web-app/src/styles.scss b/apps/web-app/src/styles.scss index 90d4ee0..d4f9afe 100644 --- a/apps/web-app/src/styles.scss +++ b/apps/web-app/src/styles.scss @@ -1 +1,41 @@ + +// Include theming for Angular Material with `mat.theme()`. +// This Sass mixin will define CSS variables that are used for styling Angular Material +// components according to the Material 3 design spec. +// Learn more about theming and how to use it for your application's +// custom components at https://material.angular.dev/guide/theming +@use '@angular/material' as mat; + +html { + height: 100%; + @include mat.theme(( + color: ( + primary: mat.$azure-palette, + tertiary: mat.$blue-palette, + ), + typography: Roboto, + density: 0, + )); +} + +body { + display: flex; + align-items: center; + justify-content: center; + // Default the application to a light color theme. This can be changed to + // `dark` to enable the dark color theme, or to `light dark` to defer to the + // user's system settings. + color-scheme: light; + + // Set a default background, font and text colors for the application using + // Angular Material's system-level CSS variables. Learn more about these + // variables at https://material.angular.dev/guide/system-variables + background-color: var(--mat-sys-surface); + color: var(--mat-sys-on-surface); + font: var(--mat-sys-body-medium); + + // Reset the user agent margin. + margin: 0; + height: 100%; +} /* You can add global styles to this file, and also import other style files */ diff --git a/docker-compose.yml b/docker-compose.yml index 7138bb8..cc046d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,7 +20,7 @@ services: build: context: . dockerfile: ./apps/api/Dockerfile.dev - command: sh -c "pnpm install && pnpm prisma generate && pnpm prisma migrate deploy && pnpm nx serve api" + command: sh -c "pnpm install && pnpm prisma generate && pnpm prisma migrate dev && pnpm prisma db seed && pnpm nx serve api" ports: - "3000:3000" environment: diff --git a/jest.config.ts b/jest.config.ts new file mode 100644 index 0000000..c49c9a9 --- /dev/null +++ b/jest.config.ts @@ -0,0 +1,6 @@ +import type { Config } from 'jest'; +import { getJestProjectsAsync } from '@nx/jest'; + +export default async (): Promise => ({ + projects: await getJestProjectsAsync(), +}); diff --git a/jest.preset.js b/jest.preset.js new file mode 100644 index 0000000..f078ddc --- /dev/null +++ b/jest.preset.js @@ -0,0 +1,3 @@ +const nxPreset = require('@nx/jest/preset').default; + +module.exports = { ...nxPreset }; diff --git a/libs/shared-dto/README.md b/libs/shared-dto/README.md new file mode 100644 index 0000000..0105fb2 --- /dev/null +++ b/libs/shared-dto/README.md @@ -0,0 +1,11 @@ +# shared-dto + +This library was generated with [Nx](https://nx.dev). + +## Building + +Run `nx build shared-dto` to build the library. + +## Running unit tests + +Run `nx test shared-dto` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/shared-dto/eslint.config.mjs b/libs/shared-dto/eslint.config.mjs new file mode 100644 index 0000000..c334bc0 --- /dev/null +++ b/libs/shared-dto/eslint.config.mjs @@ -0,0 +1,19 @@ +import baseConfig from '../../eslint.config.mjs'; + +export default [ + ...baseConfig, + { + files: ['**/*.json'], + rules: { + '@nx/dependency-checks': [ + 'error', + { + ignoredFiles: ['{projectRoot}/eslint.config.{js,cjs,mjs,ts,cts,mts}'], + }, + ], + }, + languageOptions: { + parser: await import('jsonc-eslint-parser'), + }, + }, +]; diff --git a/libs/shared-dto/jest.config.cts b/libs/shared-dto/jest.config.cts new file mode 100644 index 0000000..7841694 --- /dev/null +++ b/libs/shared-dto/jest.config.cts @@ -0,0 +1,10 @@ +module.exports = { + displayName: 'shared-dto', + preset: '../../jest.preset.js', + testEnvironment: 'node', + transform: { + '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }] + }, + moduleFileExtensions: ['ts', 'js', 'html'], + coverageDirectory: '../../coverage/libs/shared-dto', +}; diff --git a/libs/shared-dto/project.json b/libs/shared-dto/project.json new file mode 100644 index 0000000..ba37a86 --- /dev/null +++ b/libs/shared-dto/project.json @@ -0,0 +1,9 @@ +{ + "name": "shared-dto", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/shared-dto/src", + "projectType": "library", + "tags": [], + "targets": { + } +} diff --git a/libs/shared-dto/src/index.ts b/libs/shared-dto/src/index.ts new file mode 100644 index 0000000..24e309b --- /dev/null +++ b/libs/shared-dto/src/index.ts @@ -0,0 +1 @@ +export * from './lib/shared-dto'; diff --git a/libs/shared-dto/src/lib/shared-dto.spec.ts b/libs/shared-dto/src/lib/shared-dto.spec.ts new file mode 100644 index 0000000..48398bb --- /dev/null +++ b/libs/shared-dto/src/lib/shared-dto.spec.ts @@ -0,0 +1,7 @@ +import { sharedDto } from './shared-dto'; + +describe('sharedDto', () => { + it('should work', () => { + expect(sharedDto()).toEqual('shared-dto'); + }); +}); diff --git a/libs/shared-dto/src/lib/shared-dto.ts b/libs/shared-dto/src/lib/shared-dto.ts new file mode 100644 index 0000000..452c359 --- /dev/null +++ b/libs/shared-dto/src/lib/shared-dto.ts @@ -0,0 +1,9 @@ +import { Post } from '@shared/prisma-generated/src/types'; + +export function sharedDto(): string { + return 'shared-dto'; +} + +export type PostDto = Omit; + +export type UpdatePostDto = Partial; \ No newline at end of file diff --git a/libs/shared-dto/tsconfig.json b/libs/shared-dto/tsconfig.json new file mode 100644 index 0000000..ea98558 --- /dev/null +++ b/libs/shared-dto/tsconfig.json @@ -0,0 +1,23 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "module": "commonjs", + "forceConsistentCasingInFileNames": true, + "strict": true, + "importHelpers": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "noPropertyAccessFromIndexSignature": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/libs/shared-dto/tsconfig.lib.json b/libs/shared-dto/tsconfig.lib.json new file mode 100644 index 0000000..6653d08 --- /dev/null +++ b/libs/shared-dto/tsconfig.lib.json @@ -0,0 +1,15 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "declaration": true, + "types": ["node"] + }, + "include": ["src/**/*.ts"], + "exclude": [ + "jest.config.ts", + "jest.config.cts", + "src/**/*.spec.ts", + "src/**/*.test.ts" + ] +} diff --git a/libs/shared-dto/tsconfig.spec.json b/libs/shared-dto/tsconfig.spec.json new file mode 100644 index 0000000..01c59b6 --- /dev/null +++ b/libs/shared-dto/tsconfig.spec.json @@ -0,0 +1,16 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "moduleResolution": "node10", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "jest.config.cts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/nx.json b/nx.json index 214814a..1a9228f 100644 --- a/nx.json +++ b/nx.json @@ -6,7 +6,12 @@ "production": [ "default", "!{projectRoot}/.eslintrc.json", - "!{projectRoot}/eslint.config.mjs" + "!{projectRoot}/eslint.config.mjs", + "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", + "!{projectRoot}/tsconfig.spec.json", + "!{projectRoot}/jest.config.[jt]s", + "!{projectRoot}/src/test-setup.[jt]s", + "!{projectRoot}/test-setup.[jt]s" ], "sharedGlobals": [] }, @@ -28,6 +33,11 @@ "@angular/build:unit-test": { "cache": true, "inputs": ["default", "^production"] + }, + "@nx/js:tsc": { + "cache": true, + "dependsOn": ["^build"], + "inputs": ["production", "^production"] } }, "generators": { @@ -36,6 +46,9 @@ "linter": "eslint", "style": "scss", "unitTestRunner": "vitest-angular" + }, + "@nx/angular:component": { + "style": "scss" } }, "neverConnectToCloud": true, @@ -56,6 +69,12 @@ "options": { "targetName": "eslint:lint" } + }, + { + "plugin": "@nx/jest/plugin", + "options": { + "targetName": "test" + } } ] } diff --git a/package.json b/package.json index 2216285..5c0b35d 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,12 @@ "scripts": {}, "private": true, "dependencies": { + "@angular/cdk": "^21.2.4", "@angular/common": "~21.2.0", "@angular/compiler": "~21.2.0", "@angular/core": "~21.2.0", "@angular/forms": "~21.2.0", + "@angular/material": "^21.2.4", "@angular/platform-browser": "~21.2.0", "@angular/router": "~21.2.0", "@nestjs/common": "^11.0.0", @@ -17,7 +19,6 @@ "@prisma/adapter-pg": "^7.5.0", "@prisma/client": "^7.5.0", "axios": "^1.6.0", - "pg": "^8.20.0", "reflect-metadata": "^0.1.13", "rxjs": "~7.8.0" }, @@ -34,6 +35,7 @@ "@nx/angular": "22.6.1", "@nx/eslint": "22.6.1", "@nx/eslint-plugin": "22.6.1", + "@nx/jest": "22.6.1", "@nx/js": "22.6.1", "@nx/nest": "^22.6.1", "@nx/node": "22.6.1", @@ -44,17 +46,25 @@ "@swc-node/register": "~1.11.1", "@swc/core": "~1.15.5", "@swc/helpers": "~0.5.18", + "@types/jest": "^30.0.0", "@types/node": "20.19.9", "@typescript-eslint/utils": "^8.40.0", "angular-eslint": "^21.2.0", "dotenv": "^17.3.1", "eslint": "^9.8.0", "eslint-config-prettier": "^10.0.0", + "jest": "^30.0.2", + "jest-environment-node": "^30.0.2", + "jest-util": "^30.0.2", "jsdom": "^27.1.0", + "jsonc-eslint-parser": "^2.1.0", "nx": "22.6.1", "prettier": "~3.6.2", "prisma": "^7.5.0", + "ts-jest": "^29.4.0", + "ts-node": "10.9.1", "tslib": "^2.3.0", + "tsx": "^4.21.0", "typescript": "~5.9.2", "typescript-eslint": "^8.40.0", "vitest": "^4.0.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 562142f..55bb1d2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + '@angular/cdk': + specifier: ^21.2.4 + version: 21.2.4(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(@angular/platform-browser@21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2)))(rxjs@7.8.2) '@angular/common': specifier: ~21.2.0 version: 21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2) @@ -20,6 +23,9 @@ importers: '@angular/forms': specifier: ~21.2.0 version: 21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(@angular/platform-browser@21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2)))(rxjs@7.8.2) + '@angular/material': + specifier: ^21.2.4 + version: 21.2.4(a6d05bbd93e6ca3996cf74920784d779) '@angular/platform-browser': specifier: ~21.2.0 version: 21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2)) @@ -44,9 +50,6 @@ importers: axios: specifier: ^1.6.0 version: 1.13.6 - pg: - specifier: ^8.20.0 - version: 8.20.0 reflect-metadata: specifier: ^0.1.13 version: 0.1.14 @@ -62,7 +65,7 @@ importers: version: 21.2.3 '@angular/build': specifier: ~21.2.0 - version: 21.2.3(@angular/compiler-cli@21.2.6(@angular/compiler@21.2.6)(typescript@5.9.3))(@angular/compiler@21.2.6)(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(@angular/platform-browser@21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2)))(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(postcss@8.5.8)(sass-embedded@1.98.0)(terser@5.46.1)(tslib@2.8.1)(typescript@5.9.3)(vitest@4.1.1(@types/node@20.19.9)(jsdom@27.4.0)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3)))(yaml@2.8.3) + version: 21.2.3(@angular/compiler-cli@21.2.6(@angular/compiler@21.2.6)(typescript@5.9.3))(@angular/compiler@21.2.6)(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(@angular/platform-browser@21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2)))(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(postcss@8.5.8)(sass-embedded@1.98.0)(terser@5.46.1)(tslib@2.8.1)(tsx@4.21.0)(typescript@5.9.3)(vitest@4.1.1(@types/node@20.19.9)(jsdom@27.4.0)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3)))(yaml@2.8.3) '@angular/cli': specifier: ~21.2.0 version: 21.2.3(@types/node@20.19.9) @@ -83,22 +86,25 @@ importers: version: 11.1.17(@nestjs/common@11.1.17(reflect-metadata@0.1.14)(rxjs@7.8.2))(@nestjs/core@11.1.17)(@nestjs/platform-express@11.1.17) '@nx/angular': specifier: 22.6.1 - version: 22.6.1(863991e6bb5da4baa21d6a3c05458546) + version: 22.6.1(94f4e10e778561d31173e9d98ca28e03) '@nx/eslint': specifier: 22.6.1 version: 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@zkochan/js-yaml@0.0.7)(eslint@9.39.4(jiti@2.6.1))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))) '@nx/eslint-plugin': specifier: 22.6.1 version: 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint-config-prettier@10.1.8(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(typescript@5.9.3) + '@nx/jest': + specifier: 22.6.1 + version: 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3))(typescript@5.9.3) '@nx/js': specifier: 22.6.1 version: 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))) '@nx/nest': specifier: ^22.6.1 - version: 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(@zkochan/js-yaml@0.0.7)(babel-plugin-macros@3.1.0)(eslint@9.39.4(jiti@2.6.1))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(typescript@5.9.3) + version: 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(@zkochan/js-yaml@0.0.7)(babel-plugin-macros@3.1.0)(eslint@9.39.4(jiti@2.6.1))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3))(typescript@5.9.3) '@nx/node': specifier: 22.6.1 - version: 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(@zkochan/js-yaml@0.0.7)(babel-plugin-macros@3.1.0)(eslint@9.39.4(jiti@2.6.1))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(typescript@5.9.3) + version: 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(@zkochan/js-yaml@0.0.7)(babel-plugin-macros@3.1.0)(eslint@9.39.4(jiti@2.6.1))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3))(typescript@5.9.3) '@nx/web': specifier: 22.6.1 version: 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))) @@ -120,6 +126,9 @@ importers: '@swc/helpers': specifier: ~0.5.18 version: 0.5.19 + '@types/jest': + specifier: ^30.0.0 + version: 30.0.0 '@types/node': specifier: 20.19.9 version: 20.19.9 @@ -138,9 +147,21 @@ importers: eslint-config-prettier: specifier: ^10.0.0 version: 10.1.8(eslint@9.39.4(jiti@2.6.1)) + jest: + specifier: ^30.0.2 + version: 30.3.0(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3)) + jest-environment-node: + specifier: ^30.0.2 + version: 30.3.0 + jest-util: + specifier: ^30.0.2 + version: 30.3.0 jsdom: specifier: ^27.1.0 version: 27.4.0 + jsonc-eslint-parser: + specifier: ^2.1.0 + version: 2.4.2 nx: specifier: 22.6.1 version: 22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)) @@ -150,9 +171,18 @@ importers: prisma: specifier: ^7.5.0 version: 7.5.0(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3) + ts-jest: + specifier: ^29.4.0 + version: 29.4.6(@babel/core@7.29.0)(@jest/transform@30.3.0)(@jest/types@30.3.0)(babel-jest@30.3.0(@babel/core@7.29.0))(jest-util@30.3.0)(jest@30.3.0(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3)))(typescript@5.9.3) + ts-node: + specifier: 10.9.1 + version: 10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3) tslib: specifier: ^2.3.0 version: 2.8.1 + tsx: + specifier: ^4.21.0 + version: 4.21.0 typescript: specifier: ~5.9.2 version: 5.9.3 @@ -161,7 +191,7 @@ importers: version: 8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) vitest: specifier: ^4.0.8 - version: 4.1.1(@types/node@20.19.9)(jsdom@27.4.0)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3)) + version: 4.1.1(@types/node@20.19.9)(jsdom@27.4.0)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3)) webpack-cli: specifier: ^5.1.4 version: 5.1.4(webpack@5.105.4) @@ -352,6 +382,14 @@ packages: vitest: optional: true + '@angular/cdk@21.2.4': + resolution: {integrity: sha512-Zv+q9Z/wVWTt0ckuO3gnU7PbpCLTr1tKPEsofLGGzDufA5/85aBLn2UiLcjlY6wQ+V3EMqANhGo/8XJgvBEYFA==} + peerDependencies: + '@angular/common': ^21.0.0 || ^22.0.0 + '@angular/core': ^21.0.0 || ^22.0.0 + '@angular/platform-browser': ^21.0.0 || ^22.0.0 + rxjs: ^6.5.3 || ^7.4.0 + '@angular/cli@21.2.3': resolution: {integrity: sha512-QzDxnSy8AUOz6ca92xfbNuEmRdWRDi1dfFkxDVr+4l6XUnA9X6VmOi7ioCO1I9oDR73LXHybOqkqHBYDlqt/Ag==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} @@ -405,6 +443,16 @@ packages: resolution: {integrity: sha512-ui2Zf/h736Kf/jwyXHN2OBQC9fEzGUCz5fJr72sEe4nqa6aTiCL0FfkTarHDLKEYPNr8M+ZX/icgo3j9yztJhQ==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} + '@angular/material@21.2.4': + resolution: {integrity: sha512-YzkPjgZezdsDeAhSm3zix2h+ohApwaRUMG8ea/75XR1eSkT1n3N7qZaHC8HDkhPYApk8a951RDxsTiiAidnGqg==} + peerDependencies: + '@angular/cdk': 21.2.4 + '@angular/common': ^21.0.0 || ^22.0.0 + '@angular/core': ^21.0.0 || ^22.0.0 + '@angular/forms': ^21.0.0 || ^22.0.0 + '@angular/platform-browser': ^21.0.0 || ^22.0.0 + rxjs: ^6.5.3 || ^7.4.0 + '@angular/platform-browser@21.2.6': resolution: {integrity: sha512-LW1vPXVHvy71LBahn+fSzPlWQl25kJIdcXq+ptG7HsMVgbPQ3/vvkKXAHYaRdppLGCFL+v+3dQGHYLNLiYL9qg==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} @@ -1069,6 +1117,10 @@ packages: '@chevrotain/utils@10.5.0': resolution: {integrity: sha512-hBzuU5+JjB2cqNZyszkDHZgOSrUUT8V3dhgRl8Q9Gp6dAj/H5+KILGjbhDpc3Iy9qmqlm/akuOI2ut9VUtzJxQ==} + '@cspotcode/source-map-support@0.8.1': + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + '@csstools/color-helpers@6.0.2': resolution: {integrity: sha512-LMGQLS9EuADloEFkcTBR3BwV/CGHV7zyDxVRtVDTwdI2Ca4it0CCVTT9wCkxSgokjE5Ho41hEPgb8OEUwoXr6Q==} engines: {node: '>=20.19.0'} @@ -1524,6 +1576,15 @@ packages: resolution: {integrity: sha512-PAwCvFJ4696XP2qZj+LAn1BWjZaJ6RjG6c7/lkMaUJnkyMS34ucuIsfqYvfskVNvUI27R/u4P1HMYFnlVXG/Ww==} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + '@jest/core@30.3.0': + resolution: {integrity: sha512-U5mVPsBxLSO6xYbf+tgkymLx+iAhvZX43/xI1+ej2ZOPnPdkdO1CzDmFKh2mZBn2s4XZixszHeQnzp1gm/DIxw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + '@jest/diff-sequences@30.3.0': resolution: {integrity: sha512-cG51MVnLq1ecVUaQ3fr6YuuAOitHK1S4WUJHnsPFE/quQr33ADUx1FfrTCpMCRxvy0Yr9BThKpDjSlcTi91tMA==} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} @@ -1612,6 +1673,9 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@jridgewell/trace-mapping@0.3.9': + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@jsonjoy.com/base64@1.1.2': resolution: {integrity: sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA==} engines: {node: '>=10.0'} @@ -3074,6 +3138,18 @@ packages: '@tokenizer/token@0.3.0': resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} + '@tsconfig/node10@1.0.12': + resolution: {integrity: sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==} + + '@tsconfig/node12@1.0.11': + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + + '@tsconfig/node14@1.0.3': + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + + '@tsconfig/node16@1.0.4': + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + '@tufjs/canonical-json@2.0.0': resolution: {integrity: sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==} engines: {node: ^16.14.0 || >=18.0.0} @@ -3154,6 +3230,9 @@ packages: '@types/istanbul-reports@3.0.4': resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} + '@types/jest@30.0.0': + resolution: {integrity: sha512-XTYugzhuwqWjws0CVz8QpM36+T+Dz5mTEBKhNs/esGLnCIlGdRy+Dq78NRjd7ls7r8BC8ZRMOrKlkO1hU0JOwA==} + '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -3524,6 +3603,10 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + acorn-walk@8.3.5: + resolution: {integrity: sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==} + engines: {node: '>=0.4.0'} + acorn@8.16.0: resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==} engines: {node: '>=0.4.0'} @@ -3632,6 +3715,9 @@ packages: append-field@1.0.0: resolution: {integrity: sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==} + arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -3826,6 +3912,10 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + bs-logger@0.2.6: + resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} + engines: {node: '>= 6'} + bser@2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} @@ -4149,6 +4239,9 @@ packages: typescript: optional: true + create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + cron-parser@4.9.0: resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==} engines: {node: '>=12.0.0'} @@ -4373,6 +4466,10 @@ packages: engines: {node: '>= 4.0.0'} hasBin: true + diff@4.0.4: + resolution: {integrity: sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==} + engines: {node: '>=0.3.1'} + dns-packet@5.6.1: resolution: {integrity: sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==} engines: {node: '>=6'} @@ -4645,6 +4742,10 @@ packages: resolution: {integrity: sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==} engines: {node: '>=18.0.0'} + execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} + exit-x@0.2.2: resolution: {integrity: sha512-+I6B/IkJc1o/2tiURyz/ivu/O0nKNEArIUB5O7zBrlDVJr22SCLH3xTeEry428LvFhRzIA1g8izguxJ/gbNcVQ==} engines: {node: '>= 0.8.0'} @@ -4887,9 +4988,16 @@ packages: resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} + get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + get-them-args@1.3.2: resolution: {integrity: sha512-LRn8Jlk+DwZE4GTlDbT3Hikd1wSHgLMme/+7ddlqKd7ldwR6LjJgTVWzBnR01wnYGe4KgrXjg287RaI22UHmAw==} + get-tsconfig@4.13.7: + resolution: {integrity: sha512-7tN6rFgBlMgpBML5j8typ92BKFi2sFQvIdpAqLA2beia5avZDrMs0FLZiM5etShWq5irVyGcGMEA1jcDaK7A/Q==} + giget@2.0.0: resolution: {integrity: sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==} hasBin: true @@ -4956,6 +5064,11 @@ packages: handle-thing@2.0.1: resolution: {integrity: sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==} + handlebars@4.7.9: + resolution: {integrity: sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==} + engines: {node: '>=0.4.7'} + hasBin: true + harmony-reflect@1.6.2: resolution: {integrity: sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g==} @@ -5065,6 +5178,10 @@ packages: resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} engines: {node: '>= 14'} + human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} + hyperdyperid@1.2.0: resolution: {integrity: sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==} engines: {node: '>=10.18'} @@ -5244,6 +5361,10 @@ packages: is-property@1.0.2: resolution: {integrity: sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==} + is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} @@ -5325,10 +5446,24 @@ packages: engines: {node: '>=10'} hasBin: true + jest-changed-files@30.3.0: + resolution: {integrity: sha512-B/7Cny6cV5At6M25EWDgf9S617lHivamL8vl6KEpJqkStauzcG4e+WPfDgMMF+H4FVH4A2PLRyvgDJan4441QA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + jest-circus@30.3.0: resolution: {integrity: sha512-PyXq5szeSfR/4f1lYqCmmQjh0vqDkURUYi9N6whnHjlRz4IUQfMcXkGLeEoiJtxtyPqgUaUUfyQlApXWBSN1RA==} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + jest-cli@30.3.0: + resolution: {integrity: sha512-l6Tqx+j1fDXJEW5bqYykDQQ7mQg+9mhWXtnj+tQZrTWYHyHoi6Be8HPumDSA+UiX2/2buEgjA58iJzdj146uCw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + jest-config@30.3.0: resolution: {integrity: sha512-WPMAkMAtNDY9P/oKObtsRG/6KTrhtgPJoBTmk20uDn4Uy6/3EJnnaZJre/FMT1KVRx8cve1r7/FlMIOfRVWL4w==} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} @@ -5393,6 +5528,10 @@ packages: resolution: {integrity: sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + jest-resolve-dependencies@30.3.0: + resolution: {integrity: sha512-9ev8s3YN6Hsyz9LV75XUwkCVFlwPbaFn6Wp75qnI0wzAINYWY8Fb3+6y59Rwd3QaS3kKXffHXsZMziMavfz/nw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + jest-resolve@30.3.0: resolution: {integrity: sha512-NRtTAHQlpd15F9rUR36jqwelbrDV/dY4vzNte3S2kxCKUJRYNd5/6nTSbYiak1VX5g8IoFF23Uj5TURkUW8O5g==} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} @@ -5429,6 +5568,16 @@ packages: resolution: {integrity: sha512-DrCKkaQwHexjRUFTmPzs7sHQe0TSj9nvDALKGdwmK5mW9v7j90BudWirKAJHt3QQ9Dhrg1F7DogPzhChppkJpQ==} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + jest@30.3.0: + resolution: {integrity: sha512-AkXIIFcaazymvey2i/+F94XRnM6TsVLZDhBMLsd1Sf/W0wzsvvpjeyUrCZD6HGG4SDYPgDJDBKeiJTBb10WzMg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + jiti@2.4.2: resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} hasBin: true @@ -5683,6 +5832,9 @@ packages: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} + make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + make-fetch-happen@15.0.5: resolution: {integrity: sha512-uCbIa8jWWmQZt4dSnEStkVC6gdakiinAm4PiGsywIkguF0eWMdcjDz0ECYhUolFU3pFLOev9VNPCEygydXnddg==} engines: {node: ^20.17.0 || >=22.9.0} @@ -6757,6 +6909,9 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + resolve.exports@2.0.3: resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==} engines: {node: '>=10'} @@ -7270,6 +7425,10 @@ packages: resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} engines: {node: '>=8'} + strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -7452,6 +7611,33 @@ packages: '@rspack/core': optional: true + ts-jest@29.4.6: + resolution: {integrity: sha512-fSpWtOO/1AjSNQguk43hb/JCo16oJDnMJf3CdEGNkqsEX3t0KX96xvyX1D7PfLCpVoKu4MfVrqUkFyblYoY4lA==} + engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@babel/core': '>=7.0.0-beta.0 <8' + '@jest/transform': ^29.0.0 || ^30.0.0 + '@jest/types': ^29.0.0 || ^30.0.0 + babel-jest: ^29.0.0 || ^30.0.0 + esbuild: '*' + jest: ^29.0.0 || ^30.0.0 + jest-util: ^29.0.0 || ^30.0.0 + typescript: '>=4.3 <6' + peerDependenciesMeta: + '@babel/core': + optional: true + '@jest/transform': + optional: true + '@jest/types': + optional: true + babel-jest: + optional: true + esbuild: + optional: true + jest-util: + optional: true + ts-loader@9.5.4: resolution: {integrity: sha512-nCz0rEwunlTZiy6rXFByQU1kVVpCIgUpc/psFiKVrUwrizdnIbRFu8w7bxhUF0X613DYwT4XzrZHpVyMe758hQ==} engines: {node: '>=12.0.0'} @@ -7459,6 +7645,20 @@ packages: typescript: '*' webpack: ^5.0.0 + ts-node@10.9.1: + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + tsconfig-paths-webpack-plugin@4.2.0: resolution: {integrity: sha512-zbem3rfRS8BgeNK50Zz5SIQgXzLafiHjOwUAvk/38/o1jHn/V5QAgVUcz884or7WYcPaH3N2CIfUc2u0ul7UcA==} engines: {node: '>=10.13.0'} @@ -7473,6 +7673,11 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tsx@4.21.0: + resolution: {integrity: sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==} + engines: {node: '>=18.0.0'} + hasBin: true + tsyringe@4.10.0: resolution: {integrity: sha512-axr3IdNuVIxnaK5XGEUFTu3YmAQ6lllgrvqfEoR16g/HGnYY/6We4oWENtAnzK6/LpJ2ur9PAb80RBt7/U4ugw==} engines: {node: '>= 6.0.0'} @@ -7493,6 +7698,10 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} + type-fest@4.41.0: + resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} + engines: {node: '>=16'} + type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} @@ -7519,6 +7728,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + uglify-js@3.19.3: + resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} + engines: {node: '>=0.8.0'} + hasBin: true + uid@2.0.2: resolution: {integrity: sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==} engines: {node: '>=8'} @@ -7596,6 +7810,9 @@ packages: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true + v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + v8-to-istanbul@9.3.0: resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} engines: {node: '>=10.12.0'} @@ -7846,6 +8063,9 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} + wordwrap@1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} @@ -7947,6 +8167,10 @@ packages: resolution: {integrity: sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==} engines: {node: ^20.19.0 || ^22.12.0 || >=23} + yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -8177,7 +8401,7 @@ snapshots: eslint: 9.39.4(jiti@2.6.1) typescript: 5.9.3 - '@angular/build@21.2.3(@angular/compiler-cli@21.2.6(@angular/compiler@21.2.6)(typescript@5.9.3))(@angular/compiler@21.2.6)(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(@angular/platform-browser@21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2)))(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(postcss@8.5.8)(sass-embedded@1.98.0)(terser@5.46.1)(tslib@2.8.1)(typescript@5.9.3)(vitest@4.1.1(@types/node@20.19.9)(jsdom@27.4.0)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3)))(yaml@2.8.3)': + '@angular/build@21.2.3(@angular/compiler-cli@21.2.6(@angular/compiler@21.2.6)(typescript@5.9.3))(@angular/compiler@21.2.6)(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(@angular/platform-browser@21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2)))(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(postcss@8.5.8)(sass-embedded@1.98.0)(terser@5.46.1)(tslib@2.8.1)(tsx@4.21.0)(typescript@5.9.3)(vitest@4.1.1(@types/node@20.19.9)(jsdom@27.4.0)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3)))(yaml@2.8.3)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.2102.3 @@ -8187,7 +8411,7 @@ snapshots: '@babel/helper-annotate-as-pure': 7.27.3 '@babel/helper-split-export-declaration': 7.24.7 '@inquirer/confirm': 5.1.21(@types/node@20.19.9) - '@vitejs/plugin-basic-ssl': 2.1.4(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3)) + '@vitejs/plugin-basic-ssl': 2.1.4(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3)) beasties: 0.4.1 browserslist: 4.28.1 esbuild: 0.27.3 @@ -8208,7 +8432,7 @@ snapshots: tslib: 2.8.1 typescript: 5.9.3 undici: 7.22.0 - vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.97.3)(terser@5.46.1)(yaml@2.8.3) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.97.3)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3) watchpack: 2.5.1 optionalDependencies: '@angular/core': 21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2) @@ -8216,7 +8440,7 @@ snapshots: less: 4.5.1 lmdb: 3.5.1 postcss: 8.5.8 - vitest: 4.1.1(@types/node@20.19.9)(jsdom@27.4.0)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3)) + vitest: 4.1.1(@types/node@20.19.9)(jsdom@27.4.0)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3)) transitivePeerDependencies: - '@types/node' - chokidar @@ -8230,6 +8454,15 @@ snapshots: - tsx - yaml + '@angular/cdk@21.2.4(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(@angular/platform-browser@21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2)))(rxjs@7.8.2)': + dependencies: + '@angular/common': 21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2) + '@angular/core': 21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2) + '@angular/platform-browser': 21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2)) + parse5: 8.0.0 + rxjs: 7.8.2 + tslib: 2.8.1 + '@angular/cli@21.2.3(@types/node@20.19.9)': dependencies: '@angular-devkit/architect': 0.2102.3 @@ -8300,6 +8533,16 @@ snapshots: '@angular/language-service@21.2.6': {} + '@angular/material@21.2.4(a6d05bbd93e6ca3996cf74920784d779)': + dependencies: + '@angular/cdk': 21.2.4(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(@angular/platform-browser@21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2)))(rxjs@7.8.2) + '@angular/common': 21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2) + '@angular/core': 21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2) + '@angular/forms': 21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(@angular/platform-browser@21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2)))(rxjs@7.8.2) + '@angular/platform-browser': 21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2)) + rxjs: 7.8.2 + tslib: 2.8.1 + '@angular/platform-browser@21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))': dependencies: '@angular/common': 21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2) @@ -9139,6 +9382,10 @@ snapshots: '@chevrotain/utils@10.5.0': {} + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + '@csstools/color-helpers@6.0.2': {} '@csstools/css-calc@3.1.1(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0)': @@ -9495,6 +9742,41 @@ snapshots: jest-util: 30.3.0 slash: 3.0.0 + '@jest/core@30.3.0(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3))': + dependencies: + '@jest/console': 30.3.0 + '@jest/pattern': 30.0.1 + '@jest/reporters': 30.3.0 + '@jest/test-result': 30.3.0 + '@jest/transform': 30.3.0 + '@jest/types': 30.3.0 + '@types/node': 20.19.9 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 4.4.0 + exit-x: 0.2.2 + graceful-fs: 4.2.11 + jest-changed-files: 30.3.0 + jest-config: 30.3.0(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3)) + jest-haste-map: 30.3.0 + jest-message-util: 30.3.0 + jest-regex-util: 30.0.1 + jest-resolve: 30.3.0 + jest-resolve-dependencies: 30.3.0 + jest-runner: 30.3.0 + jest-runtime: 30.3.0 + jest-snapshot: 30.3.0 + jest-util: 30.3.0 + jest-validate: 30.3.0 + jest-watcher: 30.3.0 + pretty-format: 30.3.0 + slash: 3.0.0 + transitivePeerDependencies: + - babel-plugin-macros + - esbuild-register + - supports-color + - ts-node + '@jest/diff-sequences@30.3.0': {} '@jest/environment@30.3.0': @@ -9652,6 +9934,11 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/trace-mapping@0.3.9': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 + '@jsonjoy.com/base64@1.1.2(tslib@2.8.1)': dependencies: tslib: 2.8.1 @@ -10306,7 +10593,7 @@ snapshots: dependencies: consola: 3.4.2 - '@nx/angular@22.6.1(863991e6bb5da4baa21d6a3c05458546)': + '@nx/angular@22.6.1(94f4e10e778561d31173e9d98ca28e03)': dependencies: '@angular-devkit/core': 21.2.3 '@angular-devkit/schematics': 21.2.3 @@ -10330,7 +10617,7 @@ snapshots: tslib: 2.8.1 webpack-merge: 5.10.0 optionalDependencies: - '@angular/build': 21.2.3(@angular/compiler-cli@21.2.6(@angular/compiler@21.2.6)(typescript@5.9.3))(@angular/compiler@21.2.6)(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(@angular/platform-browser@21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2)))(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(postcss@8.5.8)(sass-embedded@1.98.0)(terser@5.46.1)(tslib@2.8.1)(typescript@5.9.3)(vitest@4.1.1(@types/node@20.19.9)(jsdom@27.4.0)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3)))(yaml@2.8.3) + '@angular/build': 21.2.3(@angular/compiler-cli@21.2.6(@angular/compiler@21.2.6)(typescript@5.9.3))(@angular/compiler@21.2.6)(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(@angular/platform-browser@21.2.6(@angular/common@21.2.6(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@21.2.6(@angular/compiler@21.2.6)(rxjs@7.8.2)))(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(postcss@8.5.8)(sass-embedded@1.98.0)(terser@5.46.1)(tslib@2.8.1)(tsx@4.21.0)(typescript@5.9.3)(vitest@4.1.1(@types/node@20.19.9)(jsdom@27.4.0)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3)))(yaml@2.8.3) transitivePeerDependencies: - '@babel/traverse' - '@module-federation/enhanced' @@ -10431,7 +10718,7 @@ snapshots: - supports-color - verdaccio - '@nx/jest@22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(typescript@5.9.3)': + '@nx/jest@22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3))(typescript@5.9.3)': dependencies: '@jest/reporters': 30.3.0 '@jest/test-result': 30.3.0 @@ -10439,7 +10726,7 @@ snapshots: '@nx/js': 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))) '@phenomnomnominal/tsquery': 6.1.4(typescript@5.9.3) identity-obj-proxy: 3.0.0 - jest-config: 30.3.0(@types/node@20.19.9)(babel-plugin-macros@3.1.0) + jest-config: 30.3.0(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3)) jest-resolve: 30.3.0 jest-util: 30.3.0 minimatch: 10.2.4 @@ -10533,13 +10820,13 @@ snapshots: - vue-tsc - webpack-cli - '@nx/nest@22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(@zkochan/js-yaml@0.0.7)(babel-plugin-macros@3.1.0)(eslint@9.39.4(jiti@2.6.1))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(typescript@5.9.3)': + '@nx/nest@22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(@zkochan/js-yaml@0.0.7)(babel-plugin-macros@3.1.0)(eslint@9.39.4(jiti@2.6.1))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3))(typescript@5.9.3)': dependencies: '@nestjs/schematics': 11.0.9(typescript@5.9.3) '@nx/devkit': 22.6.1(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))) '@nx/eslint': 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@zkochan/js-yaml@0.0.7)(eslint@9.39.4(jiti@2.6.1))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))) '@nx/js': 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))) - '@nx/node': 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(@zkochan/js-yaml@0.0.7)(babel-plugin-macros@3.1.0)(eslint@9.39.4(jiti@2.6.1))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(typescript@5.9.3) + '@nx/node': 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(@zkochan/js-yaml@0.0.7)(babel-plugin-macros@3.1.0)(eslint@9.39.4(jiti@2.6.1))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3))(typescript@5.9.3) tslib: 2.8.1 transitivePeerDependencies: - '@babel/traverse' @@ -10559,12 +10846,12 @@ snapshots: - typescript - verdaccio - '@nx/node@22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(@zkochan/js-yaml@0.0.7)(babel-plugin-macros@3.1.0)(eslint@9.39.4(jiti@2.6.1))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(typescript@5.9.3)': + '@nx/node@22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(@zkochan/js-yaml@0.0.7)(babel-plugin-macros@3.1.0)(eslint@9.39.4(jiti@2.6.1))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3))(typescript@5.9.3)': dependencies: '@nx/devkit': 22.6.1(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))) '@nx/docker': 22.6.1(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))) '@nx/eslint': 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@zkochan/js-yaml@0.0.7)(eslint@9.39.4(jiti@2.6.1))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))) - '@nx/jest': 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(typescript@5.9.3) + '@nx/jest': 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19)))(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3))(typescript@5.9.3) '@nx/js': 22.6.1(@babel/traverse@7.29.0)(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))(nx@22.6.1(@swc-node/register@1.11.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@swc/types@0.1.26)(typescript@5.9.3))(@swc/core@1.15.21(@swc/helpers@0.5.19))) kill-port: 1.6.1 tcp-port-used: 1.0.2 @@ -11452,6 +11739,14 @@ snapshots: '@tokenizer/token@0.3.0': {} + '@tsconfig/node10@1.0.12': {} + + '@tsconfig/node12@1.0.11': {} + + '@tsconfig/node14@1.0.3': {} + + '@tsconfig/node16@1.0.4': {} + '@tufjs/canonical-json@2.0.0': {} '@tufjs/models@4.1.0': @@ -11562,6 +11857,11 @@ snapshots: dependencies: '@types/istanbul-lib-report': 3.0.3 + '@types/jest@30.0.0': + dependencies: + expect: 30.3.0 + pretty-format: 30.3.0 + '@types/json-schema@7.0.15': {} '@types/mime@1.3.5': {} @@ -11781,9 +12081,9 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.11.1': optional: true - '@vitejs/plugin-basic-ssl@2.1.4(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3))': + '@vitejs/plugin-basic-ssl@2.1.4(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3))': dependencies: - vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3) '@vitest/expect@4.1.1': dependencies: @@ -11794,13 +12094,13 @@ snapshots: chai: 6.2.2 tinyrainbow: 3.1.0 - '@vitest/mocker@4.1.1(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3))': + '@vitest/mocker@4.1.1(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3))': dependencies: '@vitest/spy': 4.1.1 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3) '@vitest/pretty-format@4.1.1': dependencies: @@ -11952,6 +12252,10 @@ snapshots: dependencies: acorn: 8.16.0 + acorn-walk@8.3.5: + dependencies: + acorn: 8.16.0 + acorn@8.16.0: {} address@1.2.2: {} @@ -12069,6 +12373,8 @@ snapshots: append-field@1.0.0: {} + arg@4.1.3: {} + argparse@1.0.10: dependencies: sprintf-js: 1.0.3 @@ -12332,6 +12638,10 @@ snapshots: node-releases: 2.0.36 update-browserslist-db: 1.2.3(browserslist@4.28.1) + bs-logger@0.2.6: + dependencies: + fast-json-stable-stringify: 2.1.0 + bser@2.1.1: dependencies: node-int64: 0.4.0 @@ -12654,6 +12964,8 @@ snapshots: optionalDependencies: typescript: 5.9.3 + create-require@1.1.1: {} + cron-parser@4.9.0: dependencies: luxon: 3.7.2 @@ -12855,6 +13167,8 @@ snapshots: transitivePeerDependencies: - supports-color + diff@4.0.4: {} + dns-packet@5.6.1: dependencies: '@leichtgewicht/ip-codec': 2.0.5 @@ -13136,6 +13450,18 @@ snapshots: dependencies: eventsource-parser: 3.0.6 + execa@5.1.1: + dependencies: + cross-spawn: 7.0.6 + get-stream: 6.0.1 + human-signals: 2.1.0 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 4.0.1 + onetime: 5.1.2 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + exit-x@0.2.2: {} expand-tilde@2.0.2: @@ -13460,8 +13786,14 @@ snapshots: dunder-proto: 1.0.1 es-object-atoms: 1.1.1 + get-stream@6.0.1: {} + get-them-args@1.3.2: {} + get-tsconfig@4.13.7: + dependencies: + resolve-pkg-maps: 1.0.0 + giget@2.0.0: dependencies: citty: 0.1.6 @@ -13537,6 +13869,15 @@ snapshots: handle-thing@2.0.1: {} + handlebars@4.7.9: + dependencies: + minimist: 1.2.8 + neo-async: 2.6.2 + source-map: 0.6.1 + wordwrap: 1.0.0 + optionalDependencies: + uglify-js: 3.19.3 + harmony-reflect@1.6.2: {} has-flag@4.0.0: {} @@ -13681,6 +14022,8 @@ snapshots: transitivePeerDependencies: - supports-color + human-signals@2.1.0: {} + hyperdyperid@1.2.0: {} iconv-lite@0.4.24: @@ -13805,6 +14148,8 @@ snapshots: is-property@1.0.2: {} + is-stream@2.0.1: {} + is-unicode-supported@0.1.0: {} is-unicode-supported@2.1.0: {} @@ -13886,6 +14231,12 @@ snapshots: filelist: 1.0.6 picocolors: 1.1.1 + jest-changed-files@30.3.0: + dependencies: + execa: 5.1.1 + jest-util: 30.3.0 + p-limit: 3.1.0 + jest-circus@30.3.0(babel-plugin-macros@3.1.0): dependencies: '@jest/environment': 30.3.0 @@ -13912,7 +14263,26 @@ snapshots: - babel-plugin-macros - supports-color - jest-config@30.3.0(@types/node@20.19.9)(babel-plugin-macros@3.1.0): + jest-cli@30.3.0(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3)): + dependencies: + '@jest/core': 30.3.0(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3)) + '@jest/test-result': 30.3.0 + '@jest/types': 30.3.0 + chalk: 4.1.2 + exit-x: 0.2.2 + import-local: 3.2.0 + jest-config: 30.3.0(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3)) + jest-util: 30.3.0 + jest-validate: 30.3.0 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - esbuild-register + - supports-color + - ts-node + + jest-config@30.3.0(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3)): dependencies: '@babel/core': 7.29.0 '@jest/get-type': 30.1.0 @@ -13939,6 +14309,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.19.9 + ts-node: 10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -14023,6 +14394,13 @@ snapshots: jest-regex-util@30.0.1: {} + jest-resolve-dependencies@30.3.0: + dependencies: + jest-regex-util: 30.0.1 + jest-snapshot: 30.3.0 + transitivePeerDependencies: + - supports-color + jest-resolve@30.3.0: dependencies: chalk: 4.1.2 @@ -14157,6 +14535,19 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 + jest@30.3.0(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3)): + dependencies: + '@jest/core': 30.3.0(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3)) + '@jest/types': 30.3.0 + import-local: 3.2.0 + jest-cli: 30.3.0(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3)) + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - esbuild-register + - supports-color + - ts-node + jiti@2.4.2: {} jiti@2.6.1: {} @@ -14426,6 +14817,8 @@ snapshots: dependencies: semver: 7.7.4 + make-error@1.3.6: {} + make-fetch-happen@15.0.5: dependencies: '@gar/promise-retry': 1.0.3 @@ -15567,6 +15960,8 @@ snapshots: resolve-from@5.0.0: {} + resolve-pkg-maps@1.0.0: {} + resolve.exports@2.0.3: {} resolve@1.22.11: @@ -16138,6 +16533,8 @@ snapshots: strip-bom@4.0.0: {} + strip-final-newline@2.0.0: {} + strip-json-comments@3.1.1: {} strtok3@10.3.5: @@ -16307,6 +16704,26 @@ snapshots: transitivePeerDependencies: - tslib + ts-jest@29.4.6(@babel/core@7.29.0)(@jest/transform@30.3.0)(@jest/types@30.3.0)(babel-jest@30.3.0(@babel/core@7.29.0))(jest-util@30.3.0)(jest@30.3.0(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3)))(typescript@5.9.3): + dependencies: + bs-logger: 0.2.6 + fast-json-stable-stringify: 2.1.0 + handlebars: 4.7.9 + jest: 30.3.0(@types/node@20.19.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3)) + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.7.4 + type-fest: 4.41.0 + typescript: 5.9.3 + yargs-parser: 21.1.1 + optionalDependencies: + '@babel/core': 7.29.0 + '@jest/transform': 30.3.0 + '@jest/types': 30.3.0 + babel-jest: 30.3.0(@babel/core@7.29.0) + jest-util: 30.3.0 + ts-loader@9.5.4(typescript@5.9.3)(webpack@5.105.4): dependencies: chalk: 4.1.2 @@ -16317,6 +16734,26 @@ snapshots: typescript: 5.9.3 webpack: 5.105.4(@swc/core@1.15.21(@swc/helpers@0.5.19))(webpack-cli@5.1.4) + ts-node@10.9.1(@swc/core@1.15.21(@swc/helpers@0.5.19))(@types/node@20.19.9)(typescript@5.9.3): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.12 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.19.9 + acorn: 8.16.0 + acorn-walk: 8.3.5 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.4 + make-error: 1.3.6 + typescript: 5.9.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.15.21(@swc/helpers@0.5.19) + tsconfig-paths-webpack-plugin@4.2.0: dependencies: chalk: 4.1.2 @@ -16334,6 +16771,13 @@ snapshots: tslib@2.8.1: {} + tsx@4.21.0: + dependencies: + esbuild: 0.27.3 + get-tsconfig: 4.13.7 + optionalDependencies: + fsevents: 2.3.3 + tsyringe@4.10.0: dependencies: tslib: 1.14.1 @@ -16354,6 +16798,8 @@ snapshots: type-fest@0.21.3: {} + type-fest@4.41.0: {} + type-is@1.6.18: dependencies: media-typer: 0.3.0 @@ -16382,6 +16828,9 @@ snapshots: typescript@5.9.3: {} + uglify-js@3.19.3: + optional: true + uid@2.0.2: dependencies: '@lukeed/csprng': 1.1.0 @@ -16457,6 +16906,8 @@ snapshots: uuid@8.3.2: {} + v8-compile-cache-lib@3.0.1: {} + v8-to-istanbul@9.3.0: dependencies: '@jridgewell/trace-mapping': 0.3.31 @@ -16473,7 +16924,7 @@ snapshots: vary@1.1.2: {} - vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.97.3)(terser@5.46.1)(yaml@2.8.3): + vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.97.3)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3): dependencies: esbuild: 0.27.3 fdir: 6.5.0(picomatch@4.0.3) @@ -16489,9 +16940,10 @@ snapshots: sass: 1.97.3 sass-embedded: 1.98.0 terser: 5.46.1 + tsx: 4.21.0 yaml: 2.8.3 - vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3): + vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3): dependencies: esbuild: 0.27.3 fdir: 6.5.0(picomatch@4.0.3) @@ -16507,12 +16959,13 @@ snapshots: sass: 1.98.0 sass-embedded: 1.98.0 terser: 5.46.1 + tsx: 4.21.0 yaml: 2.8.3 - vitest@4.1.1(@types/node@20.19.9)(jsdom@27.4.0)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3)): + vitest@4.1.1(@types/node@20.19.9)(jsdom@27.4.0)(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3)): dependencies: '@vitest/expect': 4.1.1 - '@vitest/mocker': 4.1.1(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3)) + '@vitest/mocker': 4.1.1(vite@7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3)) '@vitest/pretty-format': 4.1.1 '@vitest/runner': 4.1.1 '@vitest/snapshot': 4.1.1 @@ -16529,7 +16982,7 @@ snapshots: tinyexec: 1.0.4 tinyglobby: 0.2.15 tinyrainbow: 3.1.0 - vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3) + vite: 7.3.1(@types/node@20.19.9)(jiti@2.6.1)(less@4.5.1)(sass-embedded@1.98.0)(sass@1.98.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 20.19.9 @@ -16731,6 +17184,8 @@ snapshots: word-wrap@1.2.5: {} + wordwrap@1.0.0: {} + wrap-ansi@6.2.0: dependencies: ansi-styles: 4.3.0 @@ -16811,6 +17266,8 @@ snapshots: y18n: 5.0.8 yargs-parser: 22.0.0 + yn@3.1.1: {} + yocto-queue@0.1.0: {} yocto-queue@1.2.2: {} diff --git a/prisma.config.ts b/prisma.config.ts index 831a20f..221669e 100644 --- a/prisma.config.ts +++ b/prisma.config.ts @@ -7,6 +7,7 @@ export default defineConfig({ schema: "prisma/schema.prisma", migrations: { path: "prisma/migrations", + seed: "tsx prisma/seedData.ts" }, datasource: { url: process.env["DATABASE_URL"], diff --git a/prisma/migrations/20260326110513_init/migration.sql b/prisma/migrations/20260326110513_init/migration.sql deleted file mode 100644 index 9c01077..0000000 --- a/prisma/migrations/20260326110513_init/migration.sql +++ /dev/null @@ -1,15 +0,0 @@ --- CreateEnum -CREATE TYPE "PostStatus" AS ENUM ('DRAFT', 'PUBLISHED', 'ARCHIVED'); - --- CreateTable -CREATE TABLE "posts" ( - "id" TEXT NOT NULL, - "title" TEXT NOT NULL, - "content" TEXT, - "status" "PostStatus" NOT NULL DEFAULT 'DRAFT', - "authorName" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "posts_pkey" PRIMARY KEY ("id") -); diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml deleted file mode 100644 index 044d57c..0000000 --- a/prisma/migrations/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (e.g., Git) -provider = "postgresql" diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 9a2a0d2..950cbda 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -19,13 +19,20 @@ enum PostStatus { // Simple table for blog posts model Post { - id String @id @default(cuid()) + id String @id @unique @default(cuid()) title String content String? - status PostStatus @default(DRAFT) - authorName String + published Boolean createdAt DateTime @default(now()) updatedAt DateTime @updatedAt + user User @relation(fields: [userId], references: [id]) + userId String - @@map("posts") +} + +model User { + id String @id @unique @default(cuid()) + email String @unique + name String + posts Post[] } \ No newline at end of file diff --git a/prisma/seed.sql b/prisma/seed.sql deleted file mode 100644 index fe8c139..0000000 --- a/prisma/seed.sql +++ /dev/null @@ -1,5 +0,0 @@ -INSERT INTO "posts" ("id","title","content","status","authorName","createdAt","updatedAt") -VALUES - ('post_1','Hello Prisma','First seeded post','DRAFT','Alice',NOW(),NOW()), - ('post_2','Published post','Seeded and published','PUBLISHED','Bob',NOW(),NOW()) -ON CONFLICT ("id") DO NOTHING; \ No newline at end of file diff --git a/prisma/seedData.ts b/prisma/seedData.ts new file mode 100644 index 0000000..f776b89 --- /dev/null +++ b/prisma/seedData.ts @@ -0,0 +1,56 @@ +import "dotenv/config"; +import { PrismaPg } from "@prisma/adapter-pg"; +import { PrismaClient } from "../libs/prisma-generated/src/client"; + +const connectionString = `${process.env.DATABASE_URL}`; +const adapter = new PrismaPg({ connectionString }); +const prisma = new PrismaClient({ adapter }); +async function main() { + const alice = await prisma.user.upsert({ + where: { email: "alice@prisma.io" }, + update: {}, + create: { + email: "alice@prisma.io", + name: "Alice", + posts: { + create: { + title: "Check out Prisma with Next.js", + content: "https://www.prisma.io/nextjs", + published: true, + }, + }, + }, + }); + const bob = await prisma.user.upsert({ + where: { email: "bob@prisma.io" }, + update: {}, + create: { + email: "bob@prisma.io", + name: "Bob", + posts: { + create: [ + { + title: "Check out the code in gitea", + content: "https://gitea.tonssikas.ovh", + published: true, + }, + { + title: "A third example card", + content: "https://google.com", + published: true, + }, + ], + }, + }, + }); + console.log({ alice, bob }); +} +main() + .then(async () => { + await prisma.$disconnect(); + }) + .catch(async (e) => { + console.error(e); + await prisma.$disconnect(); + process.exit(1); + }); \ No newline at end of file diff --git a/tsconfig.base.json b/tsconfig.base.json index e199818..5924fa0 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -27,7 +27,8 @@ "@shared/prisma-generated/src/prisma": [ "libs/prisma-generated/src/prisma.ts" ], - }, + "@shared/shared-dto": ["libs/shared-dto/src/index.ts"] + } }, "exclude": ["node_modules", "tmp"] }