Compare commits
No commits in common. "5707d1bb1f5827520841ce48f567cd3960fb32c3" and "2f35648264f16f03a97c7afa01a6b523fc1e4ba9" have entirely different histories.
5707d1bb1f
...
2f35648264
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"type": "node",
|
"name": "ng serve",
|
||||||
"request": "attach",
|
"type": "chrome",
|
||||||
"name": "Attach to Nx Serve",
|
"request": "launch",
|
||||||
"port": 9229,
|
"preLaunchTask": "npm: start",
|
||||||
"sourceMaps": true,
|
"url": "http://localhost:4200/"
|
||||||
"outFiles": ["${workspaceFolder}/dist/api/**/*.js"],
|
|
||||||
"skipFiles": ["<node_internals>/**"]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,10 @@ import { Module } from '@nestjs/common';
|
||||||
import { DecksController } from './decks.controller';
|
import { DecksController } from './decks.controller';
|
||||||
import { DrizzleService } from './drizzle.service';
|
import { DrizzleService } from './drizzle.service';
|
||||||
import { ProxyController } from './proxy.controller';
|
import { ProxyController } from './proxy.controller';
|
||||||
import { SqlLoggerService } from './sql-logger.service';
|
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [],
|
imports: [],
|
||||||
controllers: [DecksController, ProxyController],
|
controllers: [DecksController,ProxyController],
|
||||||
providers: [DrizzleService, SqlLoggerService],
|
providers: [DrizzleService],
|
||||||
})
|
})
|
||||||
export class AppModule {}
|
export class AppModule {}
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,9 @@ export class DecksController {
|
||||||
if (entry.bildname && entry.bildid) {
|
if (entry.bildname && entry.bildid) {
|
||||||
decks[deckname].images.push({
|
decks[deckname].images.push({
|
||||||
name: entry.bildname,
|
name: entry.bildname,
|
||||||
bildid: entry.bildid,
|
id: entry.bildid,
|
||||||
id: entry.id,
|
iconindex: entry.iconindex,
|
||||||
|
boxid: entry.id,
|
||||||
x1: entry.x1,
|
x1: entry.x1,
|
||||||
x2: entry.x2,
|
x2: entry.x2,
|
||||||
y1: entry.y1,
|
y1: entry.y1,
|
||||||
|
|
@ -37,8 +38,6 @@ export class DecksController {
|
||||||
reps: entry.reps,
|
reps: entry.reps,
|
||||||
lapses: entry.lapses,
|
lapses: entry.lapses,
|
||||||
isGraduated: Boolean(entry.isGraduated),
|
isGraduated: Boolean(entry.isGraduated),
|
||||||
inserted: new Date(entry.inserted!!),
|
|
||||||
updated: new Date(entry.updated!!),
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -71,8 +70,9 @@ export class DecksController {
|
||||||
if (entry.bildname && entry.bildid) {
|
if (entry.bildname && entry.bildid) {
|
||||||
deck.images.push({
|
deck.images.push({
|
||||||
name: entry.bildname,
|
name: entry.bildname,
|
||||||
bildid: entry.bildid,
|
id: entry.bildid,
|
||||||
id: entry.id,
|
iconindex: entry.iconindex,
|
||||||
|
boxid: entry.id,
|
||||||
x1: entry.x1,
|
x1: entry.x1,
|
||||||
x2: entry.x2,
|
x2: entry.x2,
|
||||||
y1: entry.y1,
|
y1: entry.y1,
|
||||||
|
|
@ -83,8 +83,6 @@ export class DecksController {
|
||||||
reps: entry.reps,
|
reps: entry.reps,
|
||||||
lapses: entry.lapses,
|
lapses: entry.lapses,
|
||||||
isGraduated: Boolean(entry.isGraduated),
|
isGraduated: Boolean(entry.isGraduated),
|
||||||
inserted: new Date(entry.inserted!!),
|
|
||||||
updated: new Date(entry.updated!!),
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -139,10 +137,10 @@ export class DecksController {
|
||||||
return this.drizzleService.moveImage(bildid, data.targetDeckId, user);
|
return this.drizzleService.moveImage(bildid, data.targetDeckId, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Put('boxes/:id')
|
@Put('boxes/:boxId')
|
||||||
async updateBox(
|
async updateBox(
|
||||||
@Request() req,
|
@Request() req,
|
||||||
@Param('id') id: number,
|
@Param('boxId') boxId: number,
|
||||||
@Body()
|
@Body()
|
||||||
data: {
|
data: {
|
||||||
due?: number;
|
due?: number;
|
||||||
|
|
@ -154,6 +152,6 @@ export class DecksController {
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
const user: User = req['user'];
|
const user: User = req['user'];
|
||||||
return this.drizzleService.updateBox(id, data, user);
|
return this.drizzleService.updateBox(boxId, data, user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,22 @@
|
||||||
// drizzle.service.ts
|
// drizzle.service.ts
|
||||||
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
|
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
|
||||||
import { and, eq, sql } from 'drizzle-orm';
|
import { and, eq, isNull } from 'drizzle-orm';
|
||||||
import { drizzle } from 'drizzle-orm/libsql';
|
import { drizzle } from 'drizzle-orm/libsql';
|
||||||
import { Deck, SelectDeck, User } from '../db/schema';
|
import { Deck, User } from '../db/schema';
|
||||||
import { SqlLoggerService } from './sql-logger.service';
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DrizzleService {
|
export class DrizzleService {
|
||||||
// private readonly logger = new Logger(DrizzleService.name);
|
private db = drizzle('file:local.db');
|
||||||
private db: any;
|
|
||||||
constructor(private sqlLogger: SqlLoggerService) {
|
|
||||||
this.db = drizzle('file:local.db', {
|
|
||||||
logger: {
|
|
||||||
logQuery: (query: string, params: any[]) => {
|
|
||||||
this.sqlLogger.logQuery(query, params);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Methode zum Abrufen aller Decks eines Benutzers
|
|
||||||
*/
|
|
||||||
async getDecks(user: User) {
|
async getDecks(user: User) {
|
||||||
return this.db.select().from(Deck).where(eq(Deck.user, user.email));
|
return this.db.select().from(Deck).where(eq(Deck.user, user.email));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Methode zum Erstellen eines neuen Decks
|
|
||||||
*/
|
|
||||||
async createDeck(deckname: string, user: User) {
|
async createDeck(deckname: string, user: User) {
|
||||||
// 'inserted' und 'updated' werden automatisch von der Datenbank gesetzt
|
const result = await this.db.insert(Deck).values({ deckname, user: user.email }).returning();
|
||||||
const result = await this.db
|
|
||||||
.insert(Deck)
|
|
||||||
.values({
|
|
||||||
deckname,
|
|
||||||
user: user.email,
|
|
||||||
// 'inserted' und 'updated' werden von der DB automatisch gesetzt
|
|
||||||
})
|
|
||||||
.returning();
|
|
||||||
return { status: 'success', deck: result };
|
return { status: 'success', deck: result };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Methode zum Abrufen eines Decks nach Name
|
|
||||||
*/
|
|
||||||
async getDeckByName(deckname: string, user: User) {
|
async getDeckByName(deckname: string, user: User) {
|
||||||
return this.db
|
return this.db
|
||||||
.select()
|
.select()
|
||||||
|
|
@ -52,9 +24,6 @@ export class DrizzleService {
|
||||||
.where(and(eq(Deck.deckname, deckname), eq(Deck.user, user.email)));
|
.where(and(eq(Deck.deckname, deckname), eq(Deck.user, user.email)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Methode zum Löschen eines Decks
|
|
||||||
*/
|
|
||||||
async deleteDeck(deckname: string, user: User) {
|
async deleteDeck(deckname: string, user: User) {
|
||||||
const existingDeck = await this.getDeckByName(deckname, user);
|
const existingDeck = await this.getDeckByName(deckname, user);
|
||||||
if (existingDeck.length === 0) {
|
if (existingDeck.length === 0) {
|
||||||
|
|
@ -65,9 +34,6 @@ export class DrizzleService {
|
||||||
return { status: 'success' };
|
return { status: 'success' };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Methode zum Umbenennen eines Decks
|
|
||||||
*/
|
|
||||||
async renameDeck(oldDeckname: string, newDeckname: string, user: User) {
|
async renameDeck(oldDeckname: string, newDeckname: string, user: User) {
|
||||||
const existingDeck = await this.getDeckByName(oldDeckname, user);
|
const existingDeck = await this.getDeckByName(oldDeckname, user);
|
||||||
if (existingDeck.length === 0) {
|
if (existingDeck.length === 0) {
|
||||||
|
|
@ -81,98 +47,42 @@ export class DrizzleService {
|
||||||
|
|
||||||
await this.db
|
await this.db
|
||||||
.update(Deck)
|
.update(Deck)
|
||||||
.set({
|
.set({ deckname: newDeckname })
|
||||||
deckname: newDeckname,
|
|
||||||
updated: sql`CURRENT_TIMESTAMP`, // Setze 'updated' auf CURRENT_TIMESTAMP
|
|
||||||
})
|
|
||||||
.where(and(eq(Deck.deckname, oldDeckname), eq(Deck.user, user.email)));
|
.where(and(eq(Deck.deckname, oldDeckname), eq(Deck.user, user.email)));
|
||||||
return { status: 'success', message: 'Deck renamed successfully' };
|
return { status: 'success', message: 'Deck renamed successfully' };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
async updateImage(data: { deckname: string; bildname: string; bildid: string; boxes: Array<{ x1: number; x2: number; y1: number; y2: number }> }, user: User) {
|
||||||
* Methode zum Aktualisieren eines Bildes innerhalb eines Decks
|
const existingDeck = await this.getDeckByName(data.deckname, user);
|
||||||
*/
|
if (existingDeck.length === 0) {
|
||||||
async updateImage(
|
|
||||||
data: {
|
|
||||||
deckname: string;
|
|
||||||
bildname: string;
|
|
||||||
bildid: string;
|
|
||||||
boxes: Array<{ x1: number; x2: number; y1: number; y2: number; id?: number }>;
|
|
||||||
},
|
|
||||||
user: User,
|
|
||||||
) {
|
|
||||||
// Schritt 1: Überprüfen, ob das Deck existiert
|
|
||||||
const existingDecks: SelectDeck[] = await this.getDeckByName(data.deckname, user);
|
|
||||||
if (existingDecks.length === 0) {
|
|
||||||
throw new HttpException('Deck not found', HttpStatus.NOT_FOUND);
|
throw new HttpException('Deck not found', HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Schritt 2: Trennen der neuen und bestehenden Einträge
|
await this.db.delete(Deck).where(and(eq(Deck.deckname, data.deckname), eq(Deck.bildid, data.bildid), eq(Deck.user, user.email)));
|
||||||
const newEntries = data.boxes.filter(b => !b.id);
|
|
||||||
const existingEntries = data.boxes.filter(b => b.id);
|
|
||||||
|
|
||||||
// Schritt 3: Einfügen neuer Einträge
|
|
||||||
const insertedImages: any = [];
|
const insertedImages: any = [];
|
||||||
for (let index = 0; index < newEntries.length; index++) {
|
for (let index = 0; index < data.boxes.length; index++) {
|
||||||
const box = newEntries[index];
|
const box = data.boxes[index];
|
||||||
const result = await this.db
|
const result = await this.db
|
||||||
.insert(Deck)
|
.insert(Deck)
|
||||||
.values({
|
.values({
|
||||||
deckname: data.deckname,
|
deckname: data.deckname,
|
||||||
bildname: data.bildname,
|
bildname: data.bildname,
|
||||||
bildid: data.bildid,
|
bildid: data.bildid,
|
||||||
|
iconindex: index,
|
||||||
x1: box.x1,
|
x1: box.x1,
|
||||||
x2: box.x2,
|
x2: box.x2,
|
||||||
y1: box.y1,
|
y1: box.y1,
|
||||||
y2: box.y2,
|
y2: box.y2,
|
||||||
user: user.email,
|
user: user.email,
|
||||||
// 'inserted' und 'updated' werden automatisch von der DB gesetzt
|
|
||||||
})
|
})
|
||||||
.returning();
|
.returning();
|
||||||
insertedImages.push(result);
|
insertedImages.push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Schritt 4: Aktualisieren bestehender Einträge
|
|
||||||
for (let index = 0; index < existingEntries.length; index++) {
|
|
||||||
const box = existingEntries[index];
|
|
||||||
const existingDeck = existingDecks.find(d => d.id === box.id);
|
|
||||||
if (existingDeck && (existingDeck.x1 !== box.x1 || existingDeck.x2 !== box.x2 || existingDeck.y1 !== box.y1 || existingDeck.y2 !== box.y2)) {
|
|
||||||
const result = await this.db
|
|
||||||
.update(Deck)
|
|
||||||
.set({
|
|
||||||
x1: box.x1,
|
|
||||||
x2: box.x2,
|
|
||||||
y1: box.y1,
|
|
||||||
y2: box.y2,
|
|
||||||
updated: sql`CURRENT_TIMESTAMP`, // Setze 'updated' auf CURRENT_TIMESTAMP
|
|
||||||
})
|
|
||||||
.where(and(eq(Deck.user, user.email), eq(Deck.bildid, data.bildid), eq(Deck.deckname, data.deckname), eq(Deck.id, box.id!!)));
|
|
||||||
if (result.rowsAffected === 0) {
|
|
||||||
throw new HttpException(`Box with id ${box.id} not found`, HttpStatus.NOT_FOUND);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Schritt 5: Löschen von nicht mehr vorhandenen Einträgen
|
|
||||||
// Sammle alle bestehenden IDs aus der Datenbank für das gegebene deckname und bildid
|
|
||||||
const existingIdsInDb = existingDecks.filter(entry => entry.bildid === data.bildid && entry.deckname === data.deckname).map(entry => entry.id);
|
|
||||||
|
|
||||||
// Sammle alle eingehenden IDs aus den vorhandenen Einträgen
|
|
||||||
const incomingIds = existingEntries.map(entry => entry.id);
|
|
||||||
|
|
||||||
// Bestimme die IDs, die in der Datenbank existieren, aber nicht mehr in den eingehenden Daten vorhanden sind
|
|
||||||
const idsToDelete = existingIdsInDb.filter(id => !incomingIds.includes(id));
|
|
||||||
|
|
||||||
if (idsToDelete.length > 0) {
|
|
||||||
await this.db.delete(Deck).where(and(eq(Deck.deckname, data.deckname), eq(Deck.bildid, data.bildid), eq(Deck.user, user.email), sql`id in ${idsToDelete}`));
|
|
||||||
}
|
|
||||||
|
|
||||||
return { status: 'success', inserted_images: insertedImages };
|
return { status: 'success', inserted_images: insertedImages };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Methode zum Löschen von Bildern anhand der bildid
|
|
||||||
*/
|
|
||||||
async deleteImagesByBildId(bildid: string, user: User) {
|
async deleteImagesByBildId(bildid: string, user: User) {
|
||||||
const affectedDecks = await this.db
|
const affectedDecks = await this.db
|
||||||
.select({ deckname: Deck.deckname })
|
.select({ deckname: Deck.deckname })
|
||||||
|
|
@ -186,15 +96,32 @@ export class DrizzleService {
|
||||||
|
|
||||||
await this.db.delete(Deck).where(and(eq(Deck.bildid, bildid), eq(Deck.user, user.email)));
|
await this.db.delete(Deck).where(and(eq(Deck.bildid, bildid), eq(Deck.user, user.email)));
|
||||||
|
|
||||||
|
for (const deck of affectedDecks) {
|
||||||
|
const remainingImages = await this.db
|
||||||
|
.select()
|
||||||
|
.from(Deck)
|
||||||
|
.where(and(eq(Deck.deckname, deck.deckname), eq(Deck.bildid, bildid)))
|
||||||
|
.all();
|
||||||
|
|
||||||
|
if (remainingImages.length === 0) {
|
||||||
|
const emptyDeckEntry = await this.db
|
||||||
|
.select()
|
||||||
|
.from(Deck)
|
||||||
|
.where(and(eq(Deck.deckname, deck.deckname), isNull(Deck.bildid), eq(Deck.user, user.email)))
|
||||||
|
.all();
|
||||||
|
|
||||||
|
if (emptyDeckEntry.length === 0) {
|
||||||
|
await this.db.insert(Deck).values({ deckname: deck.deckname, user: user.email });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
message: `All entries for image ID "${bildid}" have been deleted.`,
|
message: `All entries for image ID "${bildid}" have been deleted.`,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Methode zum Verschieben eines Bildes in ein anderes Deck
|
|
||||||
*/
|
|
||||||
async moveImage(bildid: string, targetDeckId: string, user: User) {
|
async moveImage(bildid: string, targetDeckId: string, user: User) {
|
||||||
const existingImages = await this.db
|
const existingImages = await this.db
|
||||||
.select()
|
.select()
|
||||||
|
|
@ -208,20 +135,14 @@ export class DrizzleService {
|
||||||
|
|
||||||
await this.db
|
await this.db
|
||||||
.update(Deck)
|
.update(Deck)
|
||||||
.set({
|
.set({ deckname: targetDeckId })
|
||||||
deckname: targetDeckId,
|
|
||||||
updated: sql`CURRENT_TIMESTAMP`, // Setze 'updated' auf CURRENT_TIMESTAMP
|
|
||||||
})
|
|
||||||
.where(and(eq(Deck.bildid, bildid), eq(Deck.user, user.email)));
|
.where(and(eq(Deck.bildid, bildid), eq(Deck.user, user.email)));
|
||||||
|
|
||||||
return { status: 'success', moved_entries: existingImages.length };
|
return { status: 'success', moved_entries: existingImages.length };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Methode zum Aktualisieren einer Box
|
|
||||||
*/
|
|
||||||
async updateBox(
|
async updateBox(
|
||||||
id: number,
|
boxId: number,
|
||||||
data: {
|
data: {
|
||||||
due?: number;
|
due?: number;
|
||||||
ivl?: number;
|
ivl?: number;
|
||||||
|
|
@ -236,12 +157,11 @@ export class DrizzleService {
|
||||||
if (typeof data.isGraduated === 'boolean') {
|
if (typeof data.isGraduated === 'boolean') {
|
||||||
updateData.isGraduated = Number(data.isGraduated);
|
updateData.isGraduated = Number(data.isGraduated);
|
||||||
}
|
}
|
||||||
updateData.updated = sql`CURRENT_TIMESTAMP`; // Setze 'updated' auf CURRENT_TIMESTAMP
|
|
||||||
|
|
||||||
const result = await this.db
|
const result = await this.db
|
||||||
.update(Deck)
|
.update(Deck)
|
||||||
.set(updateData)
|
.set(updateData)
|
||||||
.where(and(eq(Deck.id, id), eq(Deck.user, user.email)));
|
.where(and(eq(Deck.id, boxId), eq(Deck.user, user.email)));
|
||||||
|
|
||||||
if (result.rowsAffected === 0) {
|
if (result.rowsAffected === 0) {
|
||||||
throw new HttpException('Box not found', HttpStatus.NOT_FOUND);
|
throw new HttpException('Box not found', HttpStatus.NOT_FOUND);
|
||||||
|
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
// sql-logger.service.ts
|
|
||||||
import { Injectable, Logger } from '@nestjs/common';
|
|
||||||
import type { ChalkInstance } from 'chalk';
|
|
||||||
import chalk from 'chalk';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class SqlLoggerService {
|
|
||||||
private readonly logger = new Logger(SqlLoggerService.name);
|
|
||||||
private chalkInstance: ChalkInstance;
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
this.chalkInstance = chalk;
|
|
||||||
}
|
|
||||||
|
|
||||||
logQuery(query: string, params: any[], sourceIp?: string) {
|
|
||||||
const timestamp = new Date().toISOString().replace('T', ' ').replace('Z', '');
|
|
||||||
|
|
||||||
let logMessage = `[DrizzleORM] Info\t${timestamp}`;
|
|
||||||
|
|
||||||
// Optional source IP
|
|
||||||
if (sourceIp) {
|
|
||||||
logMessage += ` IP: ${sourceIp}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Colored query and params using chalk directly
|
|
||||||
const coloredQuery = chalk.blueBright(`Query: ${query}`);
|
|
||||||
const coloredParams = chalk.yellow(`Params: ${JSON.stringify(params)}`);
|
|
||||||
|
|
||||||
logMessage += ` - ${coloredQuery} - ${coloredParams}`;
|
|
||||||
|
|
||||||
// Add timing indicator
|
|
||||||
logMessage += chalk.gray(' +2ms');
|
|
||||||
|
|
||||||
console.log(logMessage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import { sql } from 'drizzle-orm';
|
|
||||||
import * as t from 'drizzle-orm/sqlite-core';
|
import * as t from 'drizzle-orm/sqlite-core';
|
||||||
import { integer, real, sqliteTable as table, text } from 'drizzle-orm/sqlite-core';
|
import { integer, real, sqliteTable as table, text } from 'drizzle-orm/sqlite-core';
|
||||||
|
|
||||||
|
|
@ -9,6 +8,7 @@ export const Deck = table(
|
||||||
deckname: text('deckname').notNull(),
|
deckname: text('deckname').notNull(),
|
||||||
bildname: text('bildname'),
|
bildname: text('bildname'),
|
||||||
bildid: text('bildid'),
|
bildid: text('bildid'),
|
||||||
|
iconindex: integer('iconindex'),
|
||||||
x1: real('x1'),
|
x1: real('x1'),
|
||||||
x2: real('x2'),
|
x2: real('x2'),
|
||||||
y1: real('y1'),
|
y1: real('y1'),
|
||||||
|
|
@ -20,8 +20,6 @@ export const Deck = table(
|
||||||
lapses: integer('lapses'),
|
lapses: integer('lapses'),
|
||||||
isGraduated: integer('isGraduated'),
|
isGraduated: integer('isGraduated'),
|
||||||
user: text('user').notNull(),
|
user: text('user').notNull(),
|
||||||
inserted: text().default(sql`(CURRENT_TIMESTAMP)`), // Neue Spalte
|
|
||||||
updated: text().default(sql`(CURRENT_TIMESTAMP)`), // Neue Spalte
|
|
||||||
},
|
},
|
||||||
table => {
|
table => {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -5,20 +5,20 @@
|
||||||
|
|
||||||
import { Logger } from '@nestjs/common';
|
import { Logger } from '@nestjs/common';
|
||||||
import { NestFactory } from '@nestjs/core';
|
import { NestFactory } from '@nestjs/core';
|
||||||
import { json, urlencoded } from 'express';
|
|
||||||
import { AppModule } from './app/app.module';
|
import { AppModule } from './app/app.module';
|
||||||
|
import { json, urlencoded } from 'express';
|
||||||
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
const app = await NestFactory.create(AppModule, {
|
const app = await NestFactory.create(AppModule);
|
||||||
logger: ['log', 'error', 'warn', 'debug', 'verbose'], // Aktiviere alle Log-Level
|
|
||||||
});
|
|
||||||
app.use(json({ limit: '50mb' }));
|
app.use(json({ limit: '50mb' }));
|
||||||
app.use(urlencoded({ limit: '50mb', extended: true }));
|
app.use(urlencoded({ limit: '50mb', extended: true }));
|
||||||
const globalPrefix = 'api';
|
const globalPrefix = 'api';
|
||||||
app.setGlobalPrefix(globalPrefix);
|
app.setGlobalPrefix(globalPrefix);
|
||||||
const port = process.env['PORT'] || 3000;
|
const port = process.env['PORT'] || 3000;
|
||||||
await app.listen(port);
|
await app.listen(port);
|
||||||
Logger.log(`🚀 Application is running on: http://localhost:${port}/${globalPrefix}`);
|
Logger.log(
|
||||||
|
`🚀 Application is running on: http://localhost:${port}/${globalPrefix}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrap();
|
bootstrap();
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
ALTER TABLE `Deck` ADD `inserted` text DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
|
|
||||||
ALTER TABLE `Deck` ADD `updated` text DEFAULT (CURRENT_TIMESTAMP);
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
ALTER TABLE `Deck` DROP COLUMN `iconindex`;
|
|
||||||
|
|
@ -1,164 +0,0 @@
|
||||||
{
|
|
||||||
"version": "6",
|
|
||||||
"dialect": "sqlite",
|
|
||||||
"id": "1e5421d8-df58-434e-93c8-85dcbe6ec9ee",
|
|
||||||
"prevId": "a3cf5e86-4f1b-4cdc-9688-cf9063ba6936",
|
|
||||||
"tables": {
|
|
||||||
"Deck": {
|
|
||||||
"name": "Deck",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"deckname": {
|
|
||||||
"name": "deckname",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"bildname": {
|
|
||||||
"name": "bildname",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"bildid": {
|
|
||||||
"name": "bildid",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"iconindex": {
|
|
||||||
"name": "iconindex",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"x1": {
|
|
||||||
"name": "x1",
|
|
||||||
"type": "real",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"x2": {
|
|
||||||
"name": "x2",
|
|
||||||
"type": "real",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"y1": {
|
|
||||||
"name": "y1",
|
|
||||||
"type": "real",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"y2": {
|
|
||||||
"name": "y2",
|
|
||||||
"type": "real",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"due": {
|
|
||||||
"name": "due",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"ivl": {
|
|
||||||
"name": "ivl",
|
|
||||||
"type": "real",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"factor": {
|
|
||||||
"name": "factor",
|
|
||||||
"type": "real",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"reps": {
|
|
||||||
"name": "reps",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lapses": {
|
|
||||||
"name": "lapses",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"isGraduated": {
|
|
||||||
"name": "isGraduated",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"user": {
|
|
||||||
"name": "user",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"inserted": {
|
|
||||||
"name": "inserted",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(CURRENT_TIMESTAMP)"
|
|
||||||
},
|
|
||||||
"updated": {
|
|
||||||
"name": "updated",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(CURRENT_TIMESTAMP)"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"email_idx": {
|
|
||||||
"name": "email_idx",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraints": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"views": {},
|
|
||||||
"enums": {},
|
|
||||||
"_meta": {
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {},
|
|
||||||
"columns": {}
|
|
||||||
},
|
|
||||||
"internal": {
|
|
||||||
"indexes": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,157 +0,0 @@
|
||||||
{
|
|
||||||
"version": "6",
|
|
||||||
"dialect": "sqlite",
|
|
||||||
"id": "a0b561cf-8404-43ea-bc72-8b32671580bd",
|
|
||||||
"prevId": "1e5421d8-df58-434e-93c8-85dcbe6ec9ee",
|
|
||||||
"tables": {
|
|
||||||
"Deck": {
|
|
||||||
"name": "Deck",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"deckname": {
|
|
||||||
"name": "deckname",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"bildname": {
|
|
||||||
"name": "bildname",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"bildid": {
|
|
||||||
"name": "bildid",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"x1": {
|
|
||||||
"name": "x1",
|
|
||||||
"type": "real",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"x2": {
|
|
||||||
"name": "x2",
|
|
||||||
"type": "real",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"y1": {
|
|
||||||
"name": "y1",
|
|
||||||
"type": "real",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"y2": {
|
|
||||||
"name": "y2",
|
|
||||||
"type": "real",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"due": {
|
|
||||||
"name": "due",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"ivl": {
|
|
||||||
"name": "ivl",
|
|
||||||
"type": "real",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"factor": {
|
|
||||||
"name": "factor",
|
|
||||||
"type": "real",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"reps": {
|
|
||||||
"name": "reps",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lapses": {
|
|
||||||
"name": "lapses",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"isGraduated": {
|
|
||||||
"name": "isGraduated",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"user": {
|
|
||||||
"name": "user",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"inserted": {
|
|
||||||
"name": "inserted",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(CURRENT_TIMESTAMP)"
|
|
||||||
},
|
|
||||||
"updated": {
|
|
||||||
"name": "updated",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(CURRENT_TIMESTAMP)"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"email_idx": {
|
|
||||||
"name": "email_idx",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraints": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"views": {},
|
|
||||||
"enums": {},
|
|
||||||
"_meta": {
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {},
|
|
||||||
"columns": {}
|
|
||||||
},
|
|
||||||
"internal": {
|
|
||||||
"indexes": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -15,20 +15,6 @@
|
||||||
"when": 1737229845910,
|
"when": 1737229845910,
|
||||||
"tag": "0001_smooth_iron_lad",
|
"tag": "0001_smooth_iron_lad",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 2,
|
|
||||||
"version": "6",
|
|
||||||
"when": 1738103858394,
|
|
||||||
"tag": "0002_aromatic_zodiak",
|
|
||||||
"breakpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 3,
|
|
||||||
"version": "6",
|
|
||||||
"when": 1738235979220,
|
|
||||||
"tag": "0003_hard_cable",
|
|
||||||
"breakpoints": true
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -54,7 +54,6 @@
|
||||||
"@swc/helpers": "~0.5.11",
|
"@swc/helpers": "~0.5.11",
|
||||||
"@types/fabric": "^5.3.9",
|
"@types/fabric": "^5.3.9",
|
||||||
"@types/node": "~18.16.9",
|
"@types/node": "~18.16.9",
|
||||||
"chalk": "^5.4.1",
|
|
||||||
"concurrently": "^9.1.2",
|
"concurrently": "^9.1.2",
|
||||||
"drizzle-kit": "^0.30.2",
|
"drizzle-kit": "^0.30.2",
|
||||||
"drizzle-orm": "^0.38.4",
|
"drizzle-orm": "^0.38.4",
|
||||||
|
|
@ -5206,23 +5205,6 @@
|
||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jest/console/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@jest/console/node_modules/slash": {
|
"node_modules/@jest/console/node_modules/slash": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
||||||
|
|
@ -5365,36 +5347,6 @@
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jest/reporters/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@jest/reporters/node_modules/chalk/node_modules/supports-color": {
|
|
||||||
"version": "7.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
|
||||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"has-flag": "^4.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@jest/reporters/node_modules/glob": {
|
"node_modules/@jest/reporters/node_modules/glob": {
|
||||||
"version": "7.2.3",
|
"version": "7.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||||
|
|
@ -5569,23 +5521,6 @@
|
||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jest/transform/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@jest/transform/node_modules/convert-source-map": {
|
"node_modules/@jest/transform/node_modules/convert-source-map": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
|
||||||
|
|
@ -5621,23 +5556,6 @@
|
||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jest/types/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@jridgewell/gen-mapping": {
|
"node_modules/@jridgewell/gen-mapping": {
|
||||||
"version": "0.3.5",
|
"version": "0.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
|
||||||
|
|
@ -7475,22 +7393,6 @@
|
||||||
"npm": ">=5.0.0"
|
"npm": ">=5.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@nuxtjs/opencollective/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@nx/angular": {
|
"node_modules/@nx/angular": {
|
||||||
"version": "20.3.2",
|
"version": "20.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@nx/angular/-/angular-20.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/@nx/angular/-/angular-20.3.2.tgz",
|
||||||
|
|
@ -7724,23 +7626,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@nx/js/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@nx/js/node_modules/cli-cursor": {
|
"node_modules/@nx/js/node_modules/cli-cursor": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
|
||||||
|
|
@ -8231,108 +8116,6 @@
|
||||||
"tslib": "^2.3.0"
|
"tslib": "^2.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@nx/nx-darwin-arm64": {
|
|
||||||
"version": "20.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.3.2.tgz",
|
|
||||||
"integrity": "sha512-lQOXMIPmE9o36TuZ+SX6iq7PPWa3s1fjNRqCujlviExX69245NNCMxd754gXlLrsxC1onrx/zmJciKmmEWDIiw==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"darwin"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@nx/nx-darwin-x64": {
|
|
||||||
"version": "20.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.3.2.tgz",
|
|
||||||
"integrity": "sha512-RvvSz4QYVOYOfC8sUE63b6dy8iHk2AEI0r1FF5FCQuqE1DdTeTjPETY2sY35tRqF+mO/6oLGp2+m9ti/ysRoTg==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"darwin"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@nx/nx-freebsd-x64": {
|
|
||||||
"version": "20.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.3.2.tgz",
|
|
||||||
"integrity": "sha512-KBDTyGn1evlZ17pupwRUDh2wrCMuHhP2j8cOCdgF5cl7vRki8BOK9yyL6jD11d/d/6DgXzy1jmQEX4Xx+AGCug==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"freebsd"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@nx/nx-linux-arm-gnueabihf": {
|
|
||||||
"version": "20.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.3.2.tgz",
|
|
||||||
"integrity": "sha512-mW+OcOnJEMvs7zD3aSwEG3z5M9bI4CuUU5Q/ePmnNzWIucRHpoAMNt/Sd+yu6L4+QttvoUf967uwcMsX8l4nrw==",
|
|
||||||
"cpu": [
|
|
||||||
"arm"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@nx/nx-linux-arm64-gnu": {
|
|
||||||
"version": "20.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.3.2.tgz",
|
|
||||||
"integrity": "sha512-hbXpZqUvGY5aeEWvh0SNsiYjP1ytSM30XOT6qN6faLO2CL/7j9D2UB69SKOqF3TJOvuNU6cweFgZCxyGfXBYIQ==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@nx/nx-linux-arm64-musl": {
|
|
||||||
"version": "20.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.3.2.tgz",
|
|
||||||
"integrity": "sha512-HXthtN7adXCNVWs2F4wIqq2f7BcKTjsEnqg2LWV5lm4hRYvMfEvPftb0tECsEhcSQQYcvIJnLfv3vtu9HZSfVA==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@nx/nx-linux-x64-gnu": {
|
"node_modules/@nx/nx-linux-x64-gnu": {
|
||||||
"version": "20.3.2",
|
"version": "20.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.3.2.tgz",
|
||||||
|
|
@ -8350,57 +8133,6 @@
|
||||||
"node": ">= 10"
|
"node": ">= 10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@nx/nx-linux-x64-musl": {
|
|
||||||
"version": "20.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.3.2.tgz",
|
|
||||||
"integrity": "sha512-NrZ8L9of2GmYEM8GMJX6QRrLJlAwM+ds2rhdY1bxwpiyCNcD3IO/gzJlBs+kG4ly05F1u/X4k/FI5dXPpjUSgw==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@nx/nx-win32-arm64-msvc": {
|
|
||||||
"version": "20.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.3.2.tgz",
|
|
||||||
"integrity": "sha512-yLjacZND7C1XmsC0jfRLSgeLWZUw2Oz+u3nXNvj5JX6YHtYTVLFnRbTAcI+pG2Y6v0Otf2GKb3VT5d1mQb8JvA==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"win32"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@nx/nx-win32-x64-msvc": {
|
|
||||||
"version": "20.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.3.2.tgz",
|
|
||||||
"integrity": "sha512-oDhcctfk0UB1V+Otp1161VKNMobzkFQxGyiEIjp0CjCBa2eRHC1r35L695F1Hj0bvLQPSni9XIe9evh2taeAkg==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"win32"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@nx/web": {
|
"node_modules/@nx/web": {
|
||||||
"version": "20.3.2",
|
"version": "20.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@nx/web/-/web-20.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/@nx/web/-/web-20.3.2.tgz",
|
||||||
|
|
@ -8790,23 +8522,6 @@
|
||||||
"yargs-parser": "21.1.1"
|
"yargs-parser": "21.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@nx/workspace/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@opentelemetry/api": {
|
"node_modules/@opentelemetry/api": {
|
||||||
"version": "1.9.0",
|
"version": "1.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz",
|
||||||
|
|
@ -11415,23 +11130,6 @@
|
||||||
"@babel/core": "^7.8.0"
|
"@babel/core": "^7.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/babel-jest/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/babel-jest/node_modules/slash": {
|
"node_modules/babel-jest/node_modules/slash": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
||||||
|
|
@ -12263,13 +11961,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/chalk": {
|
"node_modules/chalk": {
|
||||||
"version": "5.4.1",
|
"version": "4.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||||
"integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==",
|
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-styles": "^4.1.0",
|
||||||
|
"supports-color": "^7.1.0"
|
||||||
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.17.0 || ^14.13 || >=16.0.0"
|
"node": ">=10"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||||
|
|
@ -12747,36 +12448,6 @@
|
||||||
"url": "https://github.com/open-cli-tools/concurrently?sponsor=1"
|
"url": "https://github.com/open-cli-tools/concurrently?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/concurrently/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/concurrently/node_modules/chalk/node_modules/supports-color": {
|
|
||||||
"version": "7.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
|
||||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"has-flag": "^4.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/concurrently/node_modules/supports-color": {
|
"node_modules/concurrently/node_modules/supports-color": {
|
||||||
"version": "8.1.1",
|
"version": "8.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
|
||||||
|
|
@ -15314,24 +14985,6 @@
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/eslint/node_modules/escape-string-regexp": {
|
"node_modules/eslint/node_modules/escape-string-regexp": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||||
|
|
@ -16380,23 +16033,6 @@
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/fork-ts-checker-webpack-plugin/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/fork-ts-checker-webpack-plugin/node_modules/chokidar": {
|
"node_modules/fork-ts-checker-webpack-plugin/node_modules/chokidar": {
|
||||||
"version": "3.6.0",
|
"version": "3.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
|
||||||
|
|
@ -17589,22 +17225,6 @@
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/http-server/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/https-proxy-agent": {
|
"node_modules/https-proxy-agent": {
|
||||||
"version": "7.0.6",
|
"version": "7.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
|
||||||
|
|
@ -18401,23 +18021,6 @@
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jake/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jake/node_modules/minimatch": {
|
"node_modules/jake/node_modules/minimatch": {
|
||||||
"version": "3.1.2",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||||
|
|
@ -18481,23 +18084,6 @@
|
||||||
"npm": ">=6"
|
"npm": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-circus/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jest-circus/node_modules/cosmiconfig": {
|
"node_modules/jest-circus/node_modules/cosmiconfig": {
|
||||||
"version": "7.1.0",
|
"version": "7.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",
|
||||||
|
|
@ -18652,23 +18238,6 @@
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-config/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jest-config/node_modules/glob": {
|
"node_modules/jest-config/node_modules/glob": {
|
||||||
"version": "7.2.3",
|
"version": "7.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||||
|
|
@ -18730,23 +18299,6 @@
|
||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-diff/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jest-docblock": {
|
"node_modules/jest-docblock": {
|
||||||
"version": "29.7.0",
|
"version": "29.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz",
|
||||||
|
|
@ -18777,23 +18329,6 @@
|
||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-each/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jest-environment-node": {
|
"node_modules/jest-environment-node": {
|
||||||
"version": "29.7.0",
|
"version": "29.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz",
|
||||||
|
|
@ -18910,23 +18445,6 @@
|
||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-matcher-utils/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jest-message-util": {
|
"node_modules/jest-message-util": {
|
||||||
"version": "29.7.0",
|
"version": "29.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz",
|
||||||
|
|
@ -18948,23 +18466,6 @@
|
||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-message-util/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jest-message-util/node_modules/slash": {
|
"node_modules/jest-message-util/node_modules/slash": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
||||||
|
|
@ -19039,23 +18540,6 @@
|
||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-resolve/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jest-resolve/node_modules/slash": {
|
"node_modules/jest-resolve/node_modules/slash": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
||||||
|
|
@ -19099,36 +18583,6 @@
|
||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-runner/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jest-runner/node_modules/chalk/node_modules/supports-color": {
|
|
||||||
"version": "7.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
|
||||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"has-flag": "^4.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jest-runner/node_modules/jest-worker": {
|
"node_modules/jest-runner/node_modules/jest-worker": {
|
||||||
"version": "29.7.0",
|
"version": "29.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz",
|
||||||
|
|
@ -19256,23 +18710,6 @@
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-runtime/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jest-runtime/node_modules/glob": {
|
"node_modules/jest-runtime/node_modules/glob": {
|
||||||
"version": "7.2.3",
|
"version": "7.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||||
|
|
@ -19360,23 +18797,6 @@
|
||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-snapshot/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jest-util": {
|
"node_modules/jest-util": {
|
||||||
"version": "29.7.0",
|
"version": "29.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz",
|
||||||
|
|
@ -19395,23 +18815,6 @@
|
||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-util/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jest-util/node_modules/picomatch": {
|
"node_modules/jest-util/node_modules/picomatch": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
||||||
|
|
@ -19456,23 +18859,6 @@
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-validate/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jest-watcher": {
|
"node_modules/jest-watcher": {
|
||||||
"version": "29.7.0",
|
"version": "29.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz",
|
||||||
|
|
@ -19493,23 +18879,6 @@
|
||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jest-watcher/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jest-worker": {
|
"node_modules/jest-worker": {
|
||||||
"version": "27.5.1",
|
"version": "27.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz",
|
||||||
|
|
@ -20478,22 +19847,6 @@
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/log-symbols/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/log-update": {
|
"node_modules/log-update": {
|
||||||
"version": "6.1.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz",
|
||||||
|
|
@ -22002,23 +21355,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/nx/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/nx/node_modules/cli-cursor": {
|
"node_modules/nx/node_modules/cli-cursor": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
|
||||||
|
|
@ -22399,22 +21735,6 @@
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ora/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ora/node_modules/cli-cursor": {
|
"node_modules/ora/node_modules/cli-cursor": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
|
||||||
|
|
@ -26420,23 +25740,6 @@
|
||||||
"webpack": "^5.0.0"
|
"webpack": "^5.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ts-loader/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ts-node": {
|
"node_modules/ts-node": {
|
||||||
"version": "10.9.1",
|
"version": "10.9.1",
|
||||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
|
||||||
|
|
@ -26531,23 +25834,6 @@
|
||||||
"node": ">=10.13.0"
|
"node": ">=10.13.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tsconfig-paths-webpack-plugin/node_modules/chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/tslib": {
|
"node_modules/tslib": {
|
||||||
"version": "2.8.1",
|
"version": "2.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,6 @@
|
||||||
"@swc/helpers": "~0.5.11",
|
"@swc/helpers": "~0.5.11",
|
||||||
"@types/fabric": "^5.3.9",
|
"@types/fabric": "^5.3.9",
|
||||||
"@types/node": "~18.16.9",
|
"@types/node": "~18.16.9",
|
||||||
"chalk": "^5.4.1",
|
|
||||||
"concurrently": "^9.1.2",
|
"concurrently": "^9.1.2",
|
||||||
"drizzle-kit": "^0.30.2",
|
"drizzle-kit": "^0.30.2",
|
||||||
"drizzle-orm": "^0.38.4",
|
"drizzle-orm": "^0.38.4",
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,8 @@ import { CommonModule } from '@angular/common';
|
||||||
import { Component, inject } from '@angular/core';
|
import { Component, inject } from '@angular/core';
|
||||||
import { Auth } from '@angular/fire/auth';
|
import { Auth } from '@angular/fire/auth';
|
||||||
import { GoogleAuthProvider, signInWithPopup } from 'firebase/auth';
|
import { GoogleAuthProvider, signInWithPopup } from 'firebase/auth';
|
||||||
import { PopoverComponent } from './components/popover.component';
|
|
||||||
import { DeckListComponent } from './deck-list.component';
|
import { DeckListComponent } from './deck-list.component';
|
||||||
import { ClickOutsideDirective } from './service/click-outside.directive';
|
import { ClickOutsideDirective } from './service/click-outside.directive';
|
||||||
import { PopoverService } from './services/popover.service';
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
template: `
|
template: `
|
||||||
|
|
@ -33,10 +31,11 @@ import { PopoverService } from './services/popover.service';
|
||||||
<h1 class="text-3xl font-bold mx-auto">Vocabulary Training</h1>
|
<h1 class="text-3xl font-bold mx-auto">Vocabulary Training</h1>
|
||||||
<div class="relative" appClickOutside (clickOutside)="showDropdown = false">
|
<div class="relative" appClickOutside (clickOutside)="showDropdown = false">
|
||||||
@if(photoURL){
|
@if(photoURL){
|
||||||
<img [src]="photoURL" alt="User Photo" class="w-10 h-10 rounded-full cursor-pointer" (click)="toggleDropdown()" referrerpolicy="no-referrer" crossorigin="anonymous" />
|
<img [src]="photoURL" alt="User Photo" class="w-10 h-10 rounded-full cursor-pointer" (click)="toggleDropdown()" referrerpolicy="no-referrer" crossorigin="anonymous"/>
|
||||||
} @else {
|
} @else {
|
||||||
<div class="image-placeholder w-10 h-10 rounded-full cursor-pointer">Image</div>
|
<div class="image-placeholder w-10 h-10 rounded-full cursor-pointer">Image</div>
|
||||||
} @if(showDropdown){
|
}
|
||||||
|
@if(showDropdown){
|
||||||
<div class="absolute right-0 mt-2 w-48 bg-white rounded-lg shadow-lg">
|
<div class="absolute right-0 mt-2 w-48 bg-white rounded-lg shadow-lg">
|
||||||
<button (click)="logout()" class="block w-full text-left px-4 py-2 text-gray-700 hover:bg-gray-100">Abmelden</button>
|
<button (click)="logout()" class="block w-full text-left px-4 py-2 text-gray-700 hover:bg-gray-100">Abmelden</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -45,17 +44,6 @@ import { PopoverService } from './services/popover.service';
|
||||||
</div>
|
</div>
|
||||||
<app-deck-list></app-deck-list>
|
<app-deck-list></app-deck-list>
|
||||||
</div>
|
</div>
|
||||||
<app-popover
|
|
||||||
[visible]="popoverVisible"
|
|
||||||
[title]="popoverTitle"
|
|
||||||
[message]="popoverMessage"
|
|
||||||
[showInput]="popoverShowInput"
|
|
||||||
[showCancel]="popoverShowCancel"
|
|
||||||
[inputValue]="popoverInputValue"
|
|
||||||
[confirmText]="popoverConfirmText"
|
|
||||||
(confirmed)="handleConfirm($event)"
|
|
||||||
(canceled)="handleCancel()"
|
|
||||||
></app-popover>
|
|
||||||
`,
|
`,
|
||||||
standalone: true,
|
standalone: true,
|
||||||
styles: `
|
styles: `
|
||||||
|
|
@ -92,7 +80,7 @@ img:hover {
|
||||||
}
|
}
|
||||||
|
|
||||||
`,
|
`,
|
||||||
imports: [CommonModule, DeckListComponent, ClickOutsideDirective, PopoverComponent],
|
imports: [CommonModule, DeckListComponent, ClickOutsideDirective],
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
isLoggedIn = false;
|
isLoggedIn = false;
|
||||||
|
|
@ -100,29 +88,7 @@ export class AppComponent {
|
||||||
showDropdown = false;
|
showDropdown = false;
|
||||||
photoURL: string = 'https://placehold.co/40';
|
photoURL: string = 'https://placehold.co/40';
|
||||||
// user: User | null = null;
|
// user: User | null = null;
|
||||||
popoverVisible = false;
|
|
||||||
popoverTitle = '';
|
|
||||||
popoverMessage = '';
|
|
||||||
popoverShowInput = false;
|
|
||||||
popoverShowCancel = true;
|
|
||||||
popoverInputValue = '';
|
|
||||||
popoverConfirmText = 'Confirm';
|
|
||||||
private confirmCallback?: (inputValue?: string) => void;
|
|
||||||
private cancelCallback?: () => void;
|
|
||||||
|
|
||||||
constructor(public popoverService: PopoverService) {
|
|
||||||
this.popoverService.popoverState$.subscribe(options => {
|
|
||||||
this.popoverVisible = true;
|
|
||||||
this.popoverTitle = options.title;
|
|
||||||
this.popoverMessage = options.message;
|
|
||||||
this.popoverShowInput = options.showInput;
|
|
||||||
this.popoverShowCancel = options.showCancel;
|
|
||||||
this.popoverInputValue = options.inputValue;
|
|
||||||
this.popoverConfirmText = options.confirmText;
|
|
||||||
this.confirmCallback = options.onConfirm;
|
|
||||||
this.cancelCallback = options.onCancel;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// Überprüfen des Login-Status beim Start der Anwendung
|
// Überprüfen des Login-Status beim Start der Anwendung
|
||||||
const isLoggedIn = localStorage.getItem('isLoggedIn') === 'true';
|
const isLoggedIn = localStorage.getItem('isLoggedIn') === 'true';
|
||||||
|
|
@ -167,17 +133,4 @@ export class AppComponent {
|
||||||
toggleDropdown() {
|
toggleDropdown() {
|
||||||
this.showDropdown = !this.showDropdown;
|
this.showDropdown = !this.showDropdown;
|
||||||
}
|
}
|
||||||
handleConfirm(inputValue?: string) {
|
|
||||||
this.popoverVisible = false;
|
|
||||||
if (this.confirmCallback) {
|
|
||||||
this.confirmCallback(inputValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handleCancel() {
|
|
||||||
this.popoverVisible = false;
|
|
||||||
if (this.cancelCallback) {
|
|
||||||
this.cancelCallback();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,7 @@ import { FormsModule } from '@angular/forms';
|
||||||
<input *ngIf="showInput" type="text" class="w-full p-2 border rounded mb-4 focus:ring-2 focus:ring-blue-500 focus:border-transparent" [(ngModel)]="inputValue" (keyup.enter)="onConfirm()" autofocus />
|
<input *ngIf="showInput" type="text" class="w-full p-2 border rounded mb-4 focus:ring-2 focus:ring-blue-500 focus:border-transparent" [(ngModel)]="inputValue" (keyup.enter)="onConfirm()" autofocus />
|
||||||
|
|
||||||
<div class="flex justify-end space-x-2">
|
<div class="flex justify-end space-x-2">
|
||||||
@if(showCancel){
|
|
||||||
<button (click)="onCancel()" class="px-4 py-2 rounded bg-gray-100 text-gray-700 hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-400">Cancel</button>
|
<button (click)="onCancel()" class="px-4 py-2 rounded bg-gray-100 text-gray-700 hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-400">Cancel</button>
|
||||||
}
|
|
||||||
<button (click)="onConfirm()" class="px-4 py-2 rounded bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
<button (click)="onConfirm()" class="px-4 py-2 rounded bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||||
{{ confirmText }}
|
{{ confirmText }}
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -32,7 +30,6 @@ export class PopoverComponent {
|
||||||
@Input() title: string = '';
|
@Input() title: string = '';
|
||||||
@Input() message: string = '';
|
@Input() message: string = '';
|
||||||
@Input() showInput: boolean = false;
|
@Input() showInput: boolean = false;
|
||||||
@Input() showCancel: boolean = false;
|
|
||||||
@Input() confirmText: string = 'Confirm';
|
@Input() confirmText: string = 'Confirm';
|
||||||
@Input() inputValue: string = '';
|
@Input() inputValue: string = '';
|
||||||
@Input() visible: boolean = false;
|
@Input() visible: boolean = false;
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
<div class="flex items-center space-x-2">
|
<div class="flex items-center space-x-2">
|
||||||
<div class="relative group">
|
<div class="relative group">
|
||||||
<div class="absolute left-0 bottom-full mb-2 w-48 bg-white border border-gray-300 rounded shadow-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 z-10 pointer-events-none">
|
<div class="absolute left-0 bottom-full mb-2 w-48 bg-white border border-gray-300 rounded shadow-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 z-10 pointer-events-none">
|
||||||
<img src="/debug_images/{{ image.bildid }}/thumbnail.jpg" alt="{{ image.name }}" class="w-full h-auto object-cover" />
|
<img src="/debug_images/{{ image.id }}/thumbnail.jpg" alt="{{ image.name }}" class="w-full h-auto object-cover" />
|
||||||
</div>
|
</div>
|
||||||
<span class="font-medium cursor-pointer">{{ image.name }}</span>
|
<span class="font-medium cursor-pointer">{{ image.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -98,7 +98,7 @@
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<label for="imageFile" class="flex justify-center items-center bg-green-500 text-white py-2 px-4 rounded hover:bg-green-600 cursor-pointer"> Add Image </label>
|
<label for="imageFile" class="flex justify-center items-center bg-green-500 text-white py-2 px-4 rounded hover:bg-green-600 cursor-pointer"> Add Image </label>
|
||||||
<input #imageFile type="file" id="imageFile" (change)="onFileChange($event)" accept="image/jpeg,image/png,image/gif,image/webp" required class="hidden" />
|
<input #imageFile type="file" id="imageFile" (change)="onFileChange($event)" accept="image/*" required class="hidden" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -144,19 +144,18 @@ export class DeckListComponent implements OnInit {
|
||||||
title: 'Delete Image',
|
title: 'Delete Image',
|
||||||
message: `Are you sure you want to delete the image ${image.name}?`,
|
message: `Are you sure you want to delete the image ${image.name}?`,
|
||||||
confirmText: 'Delete',
|
confirmText: 'Delete',
|
||||||
showCancel: true,
|
|
||||||
onConfirm: () => this.confirmImageDelete(deck, image),
|
onConfirm: () => this.confirmImageDelete(deck, image),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
confirmImageDelete(deck: Deck, image: DeckImage): void {
|
confirmImageDelete(deck: Deck, image: DeckImage): void {
|
||||||
const imageId = image.bildid;
|
const imageId = image.id;
|
||||||
|
|
||||||
this.deckService.deleteImage(imageId).subscribe({
|
this.deckService.deleteImage(imageId).subscribe({
|
||||||
next: () => {
|
next: () => {
|
||||||
this.loadDecks();
|
this.loadDecks();
|
||||||
if (this.activeDeck) {
|
if (this.activeDeck) {
|
||||||
this.activeDeck.images = this.activeDeck.images.filter(img => img.bildid !== imageId);
|
this.activeDeck.images = this.activeDeck.images.filter(img => img.id !== imageId);
|
||||||
this.cdr.detectChanges();
|
this.cdr.detectChanges();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -167,7 +166,7 @@ export class DeckListComponent implements OnInit {
|
||||||
// Method to edit an image in a deck
|
// Method to edit an image in a deck
|
||||||
editImage(deck: Deck, image: DeckImage): void {
|
editImage(deck: Deck, image: DeckImage): void {
|
||||||
let imageSrc = null;
|
let imageSrc = null;
|
||||||
fetch(`/debug_images/${image.bildid}/original_compressed.jpg`)
|
fetch(`/debug_images/${image.id}/original_compressed.jpg`)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error('Network response was not ok');
|
throw new Error('Network response was not ok');
|
||||||
|
|
@ -283,36 +282,11 @@ export class DeckListComponent implements OnInit {
|
||||||
onFileChange(event: any): void {
|
onFileChange(event: any): void {
|
||||||
const file: File = event.target.files[0];
|
const file: File = event.target.files[0];
|
||||||
if (!file) return;
|
if (!file) return;
|
||||||
|
|
||||||
// Erlaubte Dateitypen
|
|
||||||
const allowedTypes = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'];
|
|
||||||
|
|
||||||
// Prüfe den Dateityp
|
|
||||||
if (!allowedTypes.includes(file.type)) {
|
|
||||||
this.popoverService.show({
|
|
||||||
title: 'Information',
|
|
||||||
message: 'Only JPG, PNG, GIF and WebP images are allowed',
|
|
||||||
});
|
|
||||||
this.resetFileInput();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prüfe die Dateigröße (5MB = 5 * 1024 * 1024 Bytes)
|
|
||||||
const maxSize = 5 * 1024 * 1024; // 5MB in Bytes
|
|
||||||
if (file.size > maxSize) {
|
|
||||||
this.popoverService.show({
|
|
||||||
title: 'Information',
|
|
||||||
message: 'Image file size must not exceed 5MB',
|
|
||||||
});
|
|
||||||
this.resetFileInput();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const fileNameElement = document.getElementById('fileName');
|
const fileNameElement = document.getElementById('fileName');
|
||||||
if (fileNameElement) {
|
if (fileNameElement) {
|
||||||
fileNameElement.textContent = file.name;
|
fileNameElement.textContent = file.name;
|
||||||
}
|
}
|
||||||
|
// this.imageFile = file;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
|
|
@ -345,9 +319,10 @@ export class DeckListComponent implements OnInit {
|
||||||
const xMax = Math.max(...xs);
|
const xMax = Math.max(...xs);
|
||||||
const yMin = Math.min(...ys);
|
const yMin = Math.min(...ys);
|
||||||
const yMax = Math.max(...ys);
|
const yMax = Math.max(...ys);
|
||||||
boxes.push({ x1: xMin, x2: xMax, y1: yMin, y2: yMax, inserted: null, updated: null });
|
boxes.push({ x1: xMin, x2: xMax, y1: yMin, y2: yMax });
|
||||||
});
|
});
|
||||||
const deckImage: DeckImage = { name: imageName, bildid: imageId, boxes };
|
const deckImage: DeckImage = { name: imageName, id: imageId, boxes };
|
||||||
|
//this.imageUploaded.emit({ imageSrc, deckImage });
|
||||||
this.imageData = { imageSrc, deckImage };
|
this.imageData = { imageSrc, deckImage };
|
||||||
|
|
||||||
this.resetFileInput();
|
this.resetFileInput();
|
||||||
|
|
@ -358,7 +333,6 @@ export class DeckListComponent implements OnInit {
|
||||||
};
|
};
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the file input field so the same file can be selected again.
|
* Resets the file input field so the same file can be selected again.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { HttpClient } from '@angular/common/http';
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { map, Observable } from 'rxjs';
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
import { map, Observable, switchMap } from 'rxjs';
|
||||||
|
|
||||||
export interface Deck {
|
export interface Deck {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
@ -10,7 +10,7 @@ export interface Deck {
|
||||||
export interface DeckImage {
|
export interface DeckImage {
|
||||||
boxes: Box[];
|
boxes: Box[];
|
||||||
name: string;
|
name: string;
|
||||||
bildid: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Box {
|
export interface Box {
|
||||||
|
|
@ -25,13 +25,12 @@ export interface Box {
|
||||||
reps?: number;
|
reps?: number;
|
||||||
lapses?: number;
|
lapses?: number;
|
||||||
isGraduated?: boolean;
|
isGraduated?: boolean;
|
||||||
inserted: string;
|
|
||||||
updated: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BackendBox {
|
export interface BackendBox {
|
||||||
bildname: string;
|
bildname: string;
|
||||||
deckid: number;
|
deckid: number;
|
||||||
|
iconindex: number;
|
||||||
id: number;
|
id: number;
|
||||||
x1: number;
|
x1: number;
|
||||||
x2: number;
|
x2: number;
|
||||||
|
|
@ -54,21 +53,19 @@ export interface OcrResult {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DeckService {
|
export class DeckService {
|
||||||
private apiUrl = '/api/decks';
|
private apiUrl = '/api/decks';
|
||||||
|
|
||||||
constructor(private http: HttpClient) {}
|
constructor(private http: HttpClient) { }
|
||||||
|
|
||||||
getDecks(): Observable<Deck[]> {
|
getDecks(): Observable<Deck[]> {
|
||||||
return this.http.get<any[]>(this.apiUrl).pipe(
|
return this.http.get<any[]>(this.apiUrl).pipe(
|
||||||
map(decks =>
|
map(decks => decks.map(deck => ({
|
||||||
decks.map(deck => ({
|
|
||||||
name: deck.name,
|
name: deck.name,
|
||||||
images: this.groupImagesByName(deck.images),
|
images: this.groupImagesByName(deck.images)
|
||||||
})),
|
})))
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -76,15 +73,15 @@ export class DeckService {
|
||||||
const imageMap: { [key: string]: DeckImage } = {};
|
const imageMap: { [key: string]: DeckImage } = {};
|
||||||
|
|
||||||
images.forEach(image => {
|
images.forEach(image => {
|
||||||
if (!imageMap[image.bildid]) {
|
if (!imageMap[image.id]) {
|
||||||
imageMap[image.bildid] = {
|
imageMap[image.id] = {
|
||||||
name: image.name,
|
name: image.name,
|
||||||
bildid: image.bildid,
|
id: image.id,
|
||||||
boxes: [],
|
boxes: []
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
imageMap[image.bildid].boxes.push({
|
imageMap[image.id].boxes.push({
|
||||||
id: image.id,
|
id: image.boxid,
|
||||||
x1: image.x1,
|
x1: image.x1,
|
||||||
x2: image.x2,
|
x2: image.x2,
|
||||||
y1: image.y1,
|
y1: image.y1,
|
||||||
|
|
@ -94,9 +91,7 @@ export class DeckService {
|
||||||
factor: image.factor,
|
factor: image.factor,
|
||||||
reps: image.reps,
|
reps: image.reps,
|
||||||
lapses: image.lapses,
|
lapses: image.lapses,
|
||||||
isGraduated: image.isGraduated ? true : false,
|
isGraduated: image.isGraduated ? true : false
|
||||||
inserted: image.inserted,
|
|
||||||
updated: image.updated,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ export class EditImageModalComponent implements AfterViewInit, OnDestroy {
|
||||||
@ViewChild('canvas') canvasElement!: ElementRef<HTMLCanvasElement>;
|
@ViewChild('canvas') canvasElement!: ElementRef<HTMLCanvasElement>;
|
||||||
|
|
||||||
detectedText: string = '';
|
detectedText: string = '';
|
||||||
boxes: { x1: number; x2: number; y1: number; y2: number; id: number; inserted: string; updated: string }[] = [];
|
boxes: { x1: number; x2: number; y1: number; y2: number }[] = [];
|
||||||
canvas!: fabric.Canvas;
|
canvas!: fabric.Canvas;
|
||||||
|
|
||||||
maxCanvasWidth: number = 0;
|
maxCanvasWidth: number = 0;
|
||||||
|
|
@ -133,7 +133,6 @@ export class EditImageModalComponent implements AfterViewInit, OnDestroy {
|
||||||
hasControls: true,
|
hasControls: true,
|
||||||
hasBorders: true,
|
hasBorders: true,
|
||||||
objectCaching: false,
|
objectCaching: false,
|
||||||
data: { id: box.id, inserted: box.inserted, updated: box.updated },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
rect.on('modified', () => {
|
rect.on('modified', () => {
|
||||||
|
|
@ -156,6 +155,7 @@ export class EditImageModalComponent implements AfterViewInit, OnDestroy {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.updateBoxCoordinates();
|
this.updateBoxCoordinates();
|
||||||
|
|
||||||
// this.detectedText = ocrResults.map(result => result.text).join('\n');
|
// this.detectedText = ocrResults.map(result => result.text).join('\n');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error processing image:', error);
|
console.error('Error processing image:', error);
|
||||||
|
|
@ -198,9 +198,6 @@ export class EditImageModalComponent implements AfterViewInit, OnDestroy {
|
||||||
x2: Math.round(x2),
|
x2: Math.round(x2),
|
||||||
y1: Math.round(y1),
|
y1: Math.round(y1),
|
||||||
y2: Math.round(y2),
|
y2: Math.round(y2),
|
||||||
id: rect.data?.id,
|
|
||||||
inserted: rect.data?.inserted,
|
|
||||||
updated: rect.data?.updated,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -229,6 +226,7 @@ export class EditImageModalComponent implements AfterViewInit, OnDestroy {
|
||||||
hasBorders: true,
|
hasBorders: true,
|
||||||
objectCaching: false,
|
objectCaching: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
rect.on('modified', () => {
|
rect.on('modified', () => {
|
||||||
this.updateBoxCoordinates();
|
this.updateBoxCoordinates();
|
||||||
});
|
});
|
||||||
|
|
@ -258,7 +256,7 @@ export class EditImageModalComponent implements AfterViewInit, OnDestroy {
|
||||||
const data = {
|
const data = {
|
||||||
deckname: this.deckName,
|
deckname: this.deckName,
|
||||||
bildname: this.imageData.deckImage?.name, // this.imageFile?.name,
|
bildname: this.imageData.deckImage?.name, // this.imageFile?.name,
|
||||||
bildid: this.imageData.deckImage?.bildid,
|
bildid: this.imageData.deckImage?.id,
|
||||||
boxes: this.boxes,
|
boxes: this.boxes,
|
||||||
};
|
};
|
||||||
this.deckService.saveImageData(data).subscribe({
|
this.deckService.saveImageData(data).subscribe({
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ export class MoveImageModalComponent {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.deckService.moveImage(this.image.bildid, this.selectedDeckId).subscribe({
|
this.deckService.moveImage(this.image.id, this.selectedDeckId).subscribe({
|
||||||
next: () => {
|
next: () => {
|
||||||
this.moveCompleted.emit();
|
this.moveCompleted.emit();
|
||||||
this.close();
|
this.close();
|
||||||
|
|
|
||||||
|
|
@ -8,22 +8,19 @@ export class PopoverService {
|
||||||
title: string;
|
title: string;
|
||||||
message: string;
|
message: string;
|
||||||
showInput: boolean;
|
showInput: boolean;
|
||||||
showCancel: boolean;
|
|
||||||
inputValue: string;
|
inputValue: string;
|
||||||
confirmText: string;
|
confirmText: string;
|
||||||
|
|
||||||
onConfirm: () => void;
|
onConfirm: () => void;
|
||||||
onCancel?: () => void;
|
onCancel?: () => void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
popoverState$ = this.showPopoverSource.asObservable();
|
popoverState$ = this.showPopoverSource.asObservable();
|
||||||
|
|
||||||
show(options: { title: string; message: string; confirmText?: string; showCancel?: boolean; onConfirm?: (inputValue?: string) => void; onCancel?: () => void }) {
|
show(options: { title: string; message: string; confirmText?: string; onConfirm?: (inputValue?: string) => void; onCancel?: () => void }) {
|
||||||
this.showPopoverSource.next({
|
this.showPopoverSource.next({
|
||||||
showInput: false,
|
showInput: false,
|
||||||
inputValue: null,
|
inputValue: null,
|
||||||
confirmText: 'Ok',
|
confirmText: 'Ok',
|
||||||
showCancel: false,
|
|
||||||
onConfirm: (inputValue?: string) => {},
|
onConfirm: (inputValue?: string) => {},
|
||||||
...options,
|
...options,
|
||||||
});
|
});
|
||||||
|
|
@ -31,7 +28,6 @@ export class PopoverService {
|
||||||
showWithInput(options: { title: string; message: string; confirmText: string; inputValue: string; onConfirm: (inputValue?: string) => void; onCancel?: () => void }) {
|
showWithInput(options: { title: string; message: string; confirmText: string; inputValue: string; onConfirm: (inputValue?: string) => void; onCancel?: () => void }) {
|
||||||
this.showPopoverSource.next({
|
this.showPopoverSource.next({
|
||||||
showInput: true,
|
showInput: true,
|
||||||
showCancel: true,
|
|
||||||
...options,
|
...options,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ export class TrainingComponent implements OnInit {
|
||||||
if (!ctx || !this.currentImageData) return;
|
if (!ctx || !this.currentImageData) return;
|
||||||
|
|
||||||
const img = new Image();
|
const img = new Image();
|
||||||
img.src = `/debug_images/${this.currentImageData.bildid}/original_compressed.jpg`;
|
img.src = `/debug_images/${this.currentImageData.id}/original_compressed.jpg`;
|
||||||
img.onload = () => {
|
img.onload = () => {
|
||||||
// Set the canvas size to the image size
|
// Set the canvas size to the image size
|
||||||
canvas.width = img.width;
|
canvas.width = img.width;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,10 @@
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"module": "ES2022",
|
"module": "ES2022",
|
||||||
"lib": ["ES2022", "dom"]
|
"lib": [
|
||||||
|
"ES2022",
|
||||||
|
"dom"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"enableI18nLegacyMessageIdFormat": false,
|
"enableI18nLegacyMessageIdFormat": false,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue