mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:01:08 +02:00
improve code quality
This commit is contained in:
parent
ec23630755
commit
16cb8e753b
213 changed files with 2409 additions and 2644 deletions
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"startTime": 1764606551673,
|
"startTime": 1764801237027,
|
||||||
"sessionId": "session-1764606551673",
|
"sessionId": "session-1764801237027",
|
||||||
"lastActivity": 1764606551673,
|
"lastActivity": 1764801237027,
|
||||||
"sessionDuration": 0,
|
"sessionDuration": 0,
|
||||||
"totalTasks": 2,
|
"totalTasks": 1,
|
||||||
"successfulTasks": 2,
|
"successfulTasks": 1,
|
||||||
"failedTasks": 0,
|
"failedTasks": 0,
|
||||||
"totalAgents": 0,
|
"totalAgents": 0,
|
||||||
"activeAgents": 0,
|
"activeAgents": 0,
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,10 +1,10 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"id": "cmd-swarm-1764606576686",
|
"id": "cmd-swarm-1764801237142",
|
||||||
"type": "swarm",
|
"type": "swarm",
|
||||||
"success": true,
|
"success": true,
|
||||||
"duration": 4.44541700000002,
|
"duration": 5.236916000000008,
|
||||||
"timestamp": 1764606576691,
|
"timestamp": 1764801237147,
|
||||||
"metadata": {}
|
"metadata": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
17
apps-archived/maerchenzauber/apps/web/eslint.config.js
Normal file
17
apps-archived/maerchenzauber/apps/web/eslint.config.js
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
svelteConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...svelteConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
17
apps-archived/memoro/apps/web/eslint.config.js
Normal file
17
apps-archived/memoro/apps/web/eslint.config.js
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
svelteConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...svelteConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
17
apps-archived/news/apps/web/eslint.config.js
Normal file
17
apps-archived/news/apps/web/eslint.config.js
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
svelteConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...svelteConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
17
apps-archived/nutriphi/apps/web/eslint.config.js
Normal file
17
apps-archived/nutriphi/apps/web/eslint.config.js
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
svelteConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...svelteConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
17
apps-archived/wisekeep/apps/web/eslint.config.js
Normal file
17
apps-archived/wisekeep/apps/web/eslint.config.js
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
svelteConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...svelteConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
11
apps/bauntown/apps/landing/eslint.config.js
Normal file
11
apps/bauntown/apps/landing/eslint.config.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
17
apps/calendar/apps/backend/eslint.config.mjs
Normal file
17
apps/calendar/apps/backend/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
nestjsConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...nestjsConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
11
apps/calendar/apps/landing/eslint.config.js
Normal file
11
apps/calendar/apps/landing/eslint.config.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
17
apps/calendar/apps/web/eslint.config.js
Normal file
17
apps/calendar/apps/web/eslint.config.js
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
svelteConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...svelteConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
"dev:landing": "pnpm --filter @calendar/landing dev",
|
"dev:landing": "pnpm --filter @calendar/landing dev",
|
||||||
"dev:mobile": "pnpm --filter @calendar/mobile dev",
|
"dev:mobile": "pnpm --filter @calendar/mobile dev",
|
||||||
"build": "turbo run build",
|
"build": "turbo run build",
|
||||||
"lint": "turbo run lint",
|
|
||||||
"clean": "turbo run clean",
|
"clean": "turbo run clean",
|
||||||
"db:push": "pnpm --filter @calendar/backend db:push",
|
"db:push": "pnpm --filter @calendar/backend db:push",
|
||||||
"db:studio": "pnpm --filter @calendar/backend db:studio",
|
"db:studio": "pnpm --filter @calendar/backend db:studio",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import type { RecurrencePattern, RecurrenceFrequency, Weekday } from '../types/recurrence';
|
import type { RecurrencePattern, RecurrenceFrequency, Weekday } from '../types/recurrence';
|
||||||
import { addDays, addWeeks, addMonths, addYears } from './date';
|
import { addDays, addMonths, addYears } from './date';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse an RFC 5545 RRULE string to a RecurrencePattern object
|
* Parse an RFC 5545 RRULE string to a RecurrencePattern object
|
||||||
|
|
@ -46,13 +46,14 @@ export function parseRRule(rrule: string): RecurrencePattern | null {
|
||||||
pattern.count = parseInt(value, 10);
|
pattern.count = parseInt(value, 10);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'UNTIL':
|
case 'UNTIL': {
|
||||||
// Parse UNTIL date (format: YYYYMMDD or YYYYMMDDTHHMMSSZ)
|
// Parse UNTIL date (format: YYYYMMDD or YYYYMMDDTHHMMSSZ)
|
||||||
const year = parseInt(value.substring(0, 4), 10);
|
const year = parseInt(value.substring(0, 4), 10);
|
||||||
const month = parseInt(value.substring(4, 6), 10) - 1;
|
const month = parseInt(value.substring(4, 6), 10) - 1;
|
||||||
const day = parseInt(value.substring(6, 8), 10);
|
const day = parseInt(value.substring(6, 8), 10);
|
||||||
pattern.until = new Date(year, month, day, 23, 59, 59);
|
pattern.until = new Date(year, month, day, 23, 59, 59);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -188,7 +189,7 @@ export function generateOccurrences(
|
||||||
rangeStart: Date,
|
rangeStart: Date,
|
||||||
rangeEnd: Date,
|
rangeEnd: Date,
|
||||||
exceptions: string[] = [],
|
exceptions: string[] = [],
|
||||||
maxOccurrences: number = 365
|
maxOccurrences = 365
|
||||||
): Date[] {
|
): Date[] {
|
||||||
const occurrences: Date[] = [];
|
const occurrences: Date[] = [];
|
||||||
const exceptionsSet = new Set(exceptions);
|
const exceptionsSet = new Set(exceptions);
|
||||||
|
|
|
||||||
17
apps/chat/apps/backend/eslint.config.mjs
Normal file
17
apps/chat/apps/backend/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
nestjsConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...nestjsConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { Body, Controller, Get, Post, UseGuards } from '@nestjs/common';
|
import { Body, Controller, Get, Post, UseGuards } from '@nestjs/common';
|
||||||
import { isOk } from '@manacore/shared-errors';
|
import { isOk } from '@manacore/shared-errors';
|
||||||
import { ChatService } from './chat.service';
|
import { type ChatService } from './chat.service';
|
||||||
import { ChatCompletionDto, ChatCompletionResponseDto } from './dto/chat-completion.dto';
|
import { type ChatCompletionDto, type ChatCompletionResponseDto } from './dto/chat-completion.dto';
|
||||||
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
|
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
|
||||||
|
|
||||||
@Controller('chat')
|
@Controller('chat')
|
||||||
@UseGuards(JwtAuthGuard)
|
@UseGuards(JwtAuthGuard)
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import { Injectable, Inject, Logger } from '@nestjs/common';
|
import { Injectable, Inject, Logger } from '@nestjs/common';
|
||||||
import { ConfigService } from '@nestjs/config';
|
import { type ConfigService } from '@nestjs/config';
|
||||||
import { eq } from 'drizzle-orm';
|
import { eq } from 'drizzle-orm';
|
||||||
import { type AsyncResult, ok, err, ValidationError, ServiceError } from '@manacore/shared-errors';
|
import { type AsyncResult, ok, err, ValidationError, ServiceError } from '@manacore/shared-errors';
|
||||||
import { GoogleGenerativeAI } from '@google/generative-ai';
|
import { GoogleGenerativeAI } from '@google/generative-ai';
|
||||||
import { DATABASE_CONNECTION } from '../db/database.module';
|
import { DATABASE_CONNECTION } from '../db/database.module';
|
||||||
import { type Database } from '../db/connection';
|
import { type Database } from '../db/connection';
|
||||||
import { models, type Model } from '../db/schema/models.schema';
|
import { models, type Model } from '../db/schema/models.schema';
|
||||||
import { ChatCompletionDto, ChatCompletionResponseDto } from './dto/chat-completion.dto';
|
import { type ChatCompletionDto, type ChatCompletionResponseDto } from './dto/chat-completion.dto';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ChatService {
|
export class ChatService {
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,10 @@ import {
|
||||||
UseGuards,
|
UseGuards,
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { isOk } from '@manacore/shared-errors';
|
import { isOk } from '@manacore/shared-errors';
|
||||||
import { ConversationService } from './conversation.service';
|
import { type ConversationService } from './conversation.service';
|
||||||
import { type Conversation } from '../db/schema/conversations.schema';
|
import { type Conversation } from '../db/schema/conversations.schema';
|
||||||
import { type Message } from '../db/schema/messages.schema';
|
import { type Message } from '../db/schema/messages.schema';
|
||||||
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
|
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
|
||||||
|
|
||||||
@Controller('conversations')
|
@Controller('conversations')
|
||||||
@UseGuards(JwtAuthGuard)
|
@UseGuards(JwtAuthGuard)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { drizzle } from 'drizzle-orm/postgres-js';
|
||||||
import * as schema from './schema';
|
import * as schema from './schema';
|
||||||
|
|
||||||
// Use require for postgres to avoid ESM/CommonJS interop issues
|
// Use require for postgres to avoid ESM/CommonJS interop issues
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
||||||
const postgres = require('postgres');
|
const postgres = require('postgres');
|
||||||
|
|
||||||
let connection: ReturnType<typeof postgres> | null = null;
|
let connection: ReturnType<typeof postgres> | null = null;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Module, Global, OnModuleDestroy } from '@nestjs/common';
|
import { Module, Global, type OnModuleDestroy } from '@nestjs/common';
|
||||||
import { ConfigService } from '@nestjs/config';
|
import { ConfigService } from '@nestjs/config';
|
||||||
import { getDb, closeConnection, type Database } from './connection';
|
import { getDb, closeConnection, type Database } from './connection';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { Body, Controller, Delete, Get, Param, Post, UseGuards } from '@nestjs/common';
|
import { Body, Controller, Delete, Get, Param, Post, UseGuards } from '@nestjs/common';
|
||||||
import { isOk } from '@manacore/shared-errors';
|
import { isOk } from '@manacore/shared-errors';
|
||||||
import { DocumentService } from './document.service';
|
import { type DocumentService } from './document.service';
|
||||||
import { type Document } from '../db/schema/documents.schema';
|
import { type Document } from '../db/schema/documents.schema';
|
||||||
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
|
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
|
||||||
|
|
||||||
@Controller('documents')
|
@Controller('documents')
|
||||||
@UseGuards(JwtAuthGuard)
|
@UseGuards(JwtAuthGuard)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Controller, Get, Param } from '@nestjs/common';
|
import { Controller, Get, Param } from '@nestjs/common';
|
||||||
import { isOk } from '@manacore/shared-errors';
|
import { isOk } from '@manacore/shared-errors';
|
||||||
import { ModelService } from './model.service';
|
import { type ModelService } from './model.service';
|
||||||
import { type Model } from '../db/schema/models.schema';
|
import { type Model } from '../db/schema/models.schema';
|
||||||
|
|
||||||
// Models are publicly accessible - no auth required to list available models
|
// Models are publicly accessible - no auth required to list available models
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { Body, Controller, Delete, Get, Param, Patch, Post, UseGuards } from '@nestjs/common';
|
import { Body, Controller, Delete, Get, Param, Patch, Post, UseGuards } from '@nestjs/common';
|
||||||
import { isOk } from '@manacore/shared-errors';
|
import { isOk } from '@manacore/shared-errors';
|
||||||
import { SpaceService } from './space.service';
|
import { type SpaceService } from './space.service';
|
||||||
import { type Space, type SpaceMember } from '../db/schema/spaces.schema';
|
import { type Space, type SpaceMember } from '../db/schema/spaces.schema';
|
||||||
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
|
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
|
||||||
|
|
||||||
@Controller('spaces')
|
@Controller('spaces')
|
||||||
@UseGuards(JwtAuthGuard)
|
@UseGuards(JwtAuthGuard)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { Body, Controller, Delete, Get, Param, Patch, Post, UseGuards } from '@nestjs/common';
|
import { Body, Controller, Delete, Get, Param, Patch, Post, UseGuards } from '@nestjs/common';
|
||||||
import { isOk } from '@manacore/shared-errors';
|
import { isOk } from '@manacore/shared-errors';
|
||||||
import { TemplateService } from './template.service';
|
import { type TemplateService } from './template.service';
|
||||||
import { type Template } from '../db/schema/templates.schema';
|
import { type Template } from '../db/schema/templates.schema';
|
||||||
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
|
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
|
||||||
|
|
||||||
@Controller('templates')
|
@Controller('templates')
|
||||||
@UseGuards(JwtAuthGuard)
|
@UseGuards(JwtAuthGuard)
|
||||||
|
|
|
||||||
11
apps/chat/apps/landing/eslint.config.js
Normal file
11
apps/chat/apps/landing/eslint.config.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -9,7 +9,8 @@
|
||||||
"build": "astro check && astro build",
|
"build": "astro check && astro build",
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
"astro": "astro",
|
"astro": "astro",
|
||||||
"type-check": "astro check"
|
"type-check": "astro check",
|
||||||
|
"lint": "eslint ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/check": "^0.9.0",
|
"@astrojs/check": "^0.9.0",
|
||||||
|
|
|
||||||
12
apps/chat/apps/mobile/eslint.config.mjs
Normal file
12
apps/chat/apps/mobile/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.expo/**', 'node_modules/**', 'android/**', 'ios/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...reactConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -12,8 +12,8 @@
|
||||||
"build:preview": "eas build --profile preview",
|
"build:preview": "eas build --profile preview",
|
||||||
"build:prod": "eas build --profile production",
|
"build:prod": "eas build --profile production",
|
||||||
"prebuild": "expo prebuild",
|
"prebuild": "expo prebuild",
|
||||||
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\" && prettier -c \"**/*.{js,jsx,ts,tsx,json}\"",
|
"lint": "eslint .",
|
||||||
"format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
|
"format": "eslint . --fix",
|
||||||
"web": "expo start --web"
|
"web": "expo start --web"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
||||||
"@typescript-eslint/parser": "^7.7.0",
|
"@typescript-eslint/parser": "^7.7.0",
|
||||||
"dotenv": "^16.4.7",
|
"dotenv": "^16.4.7",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^9.39.1",
|
||||||
"eslint-config-universe": "^12.0.1",
|
"eslint-config-universe": "^12.0.1",
|
||||||
"prettier": "^3.2.5",
|
"prettier": "^3.2.5",
|
||||||
"prettier-plugin-tailwindcss": "^0.5.11",
|
"prettier-plugin-tailwindcss": "^0.5.11",
|
||||||
|
|
|
||||||
17
apps/chat/apps/web/eslint.config.js
Normal file
17
apps/chat/apps/web/eslint.config.js
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
svelteConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...svelteConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -10,7 +10,8 @@
|
||||||
"prepare": "svelte-kit sync || echo ''",
|
"prepare": "svelte-kit sync || echo ''",
|
||||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||||
"type-check": "echo 'Skipping type-check: @chat/web needs shared-ui component fixes'"
|
"type-check": "echo 'Skipping type-check: @chat/web needs shared-ui component fixes'",
|
||||||
|
"lint": "eslint ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/adapter-auto": "^6.0.0",
|
"@sveltejs/adapter-auto": "^6.0.0",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Chat project - AI chat application with mobile, web and landing",
|
"description": "Chat project - AI chat application with mobile, web and landing",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "turbo run dev",
|
"dev": "turbo run dev"
|
||||||
"lint": "turbo run lint"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,8 @@
|
||||||
"types": "./src/index.ts",
|
"types": "./src/index.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"lint": "eslint ."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
17
apps/contacts/apps/backend/eslint.config.mjs
Normal file
17
apps/contacts/apps/backend/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
nestjsConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...nestjsConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
17
apps/contacts/apps/web/eslint.config.js
Normal file
17
apps/contacts/apps/web/eslint.config.js
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
svelteConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...svelteConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
"dev:landing": "pnpm --filter @contacts/landing dev",
|
"dev:landing": "pnpm --filter @contacts/landing dev",
|
||||||
"dev:mobile": "pnpm --filter @contacts/mobile dev",
|
"dev:mobile": "pnpm --filter @contacts/mobile dev",
|
||||||
"build": "turbo run build",
|
"build": "turbo run build",
|
||||||
"lint": "turbo run lint",
|
|
||||||
"clean": "turbo run clean",
|
"clean": "turbo run clean",
|
||||||
"db:push": "pnpm --filter @contacts/backend db:push",
|
"db:push": "pnpm --filter @contacts/backend db:push",
|
||||||
"db:studio": "pnpm --filter @contacts/backend db:studio",
|
"db:studio": "pnpm --filter @contacts/backend db:studio",
|
||||||
|
|
|
||||||
17
apps/maerchenzauber/apps/backend/eslint.config.mjs
Normal file
17
apps/maerchenzauber/apps/backend/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
nestjsConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...nestjsConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
11
apps/maerchenzauber/apps/landing/eslint.config.js
Normal file
11
apps/maerchenzauber/apps/landing/eslint.config.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
12
apps/maerchenzauber/apps/mobile/eslint.config.mjs
Normal file
12
apps/maerchenzauber/apps/mobile/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.expo/**', 'node_modules/**', 'android/**', 'ios/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...reactConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
11
apps/manacore/apps/landing/eslint.config.js
Normal file
11
apps/manacore/apps/landing/eslint.config.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -5,7 +5,8 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"build": "astro build",
|
"build": "astro build",
|
||||||
"preview": "astro preview"
|
"preview": "astro preview",
|
||||||
|
"lint": "eslint ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/react": "^3.6.0",
|
"@astrojs/react": "^3.6.0",
|
||||||
|
|
|
||||||
2
apps/manacore/apps/mobile/app-env.d.ts
vendored
2
apps/manacore/apps/mobile/app-env.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
||||||
// @ts-ignore
|
// @ts-expect-error nativewind types
|
||||||
/// <reference types="nativewind/types" />
|
/// <reference types="nativewind/types" />
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { Stack } from 'expo-router';
|
import { Stack } from 'expo-router';
|
||||||
import { ScrollView, Text, View, TouchableOpacity, Image, Alert } from 'react-native';
|
import { ScrollView, Text, View, TouchableOpacity, Alert } from 'react-native';
|
||||||
import { FontAwesome5 } from '@expo/vector-icons';
|
import { FontAwesome5 } from '@expo/vector-icons';
|
||||||
|
|
||||||
import { Container } from '~/components/Container';
|
import { Container } from '~/components/Container';
|
||||||
import { useTheme } from '../../utils/themeContext';
|
import { useTheme } from '../../utils/themeContext';
|
||||||
import { supabase } from '../../utils/supabase';
|
|
||||||
|
|
||||||
// Definiere die Mana-Pakete
|
// Definiere die Mana-Pakete
|
||||||
const manaPacks = [
|
const manaPacks = [
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
import { Stack, useRouter } from 'expo-router';
|
import { Stack, useRouter } from 'expo-router';
|
||||||
import { ScrollView, Text, View, TouchableOpacity, Pressable } from 'react-native';
|
import { ScrollView, Text, View, TouchableOpacity } from 'react-native';
|
||||||
import { FontAwesome5 } from '@expo/vector-icons';
|
import { FontAwesome5 } from '@expo/vector-icons';
|
||||||
|
|
||||||
import { Container } from '~/components/Container';
|
|
||||||
import DashboardStats from '../../components/DashboardStats';
|
import DashboardStats from '../../components/DashboardStats';
|
||||||
import { useTheme } from '../../utils/themeContext';
|
import { useTheme } from '../../utils/themeContext';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ export default function OrganizationDetails() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchOrganizationDetails();
|
fetchOrganizationDetails();
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [initialOrgName, orgId]);
|
}, [initialOrgName, orgId]);
|
||||||
|
|
||||||
const fetchOrganizationDetails = async () => {
|
const fetchOrganizationDetails = async () => {
|
||||||
|
|
@ -94,14 +95,6 @@ export default function OrganizationDetails() {
|
||||||
.eq('user_id', session.user.id)
|
.eq('user_id', session.user.id)
|
||||||
.eq('organization_id', orgId);
|
.eq('organization_id', orgId);
|
||||||
|
|
||||||
// Supabase gibt die Daten in einem anderen Format zurück als erwartet
|
|
||||||
// Definiere den korrekten Typ für die Benutzerrolle
|
|
||||||
interface UserRoleWithRoles {
|
|
||||||
roles: {
|
|
||||||
name: string;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentUserRolesError) throw currentUserRolesError;
|
if (currentUserRolesError) throw currentUserRolesError;
|
||||||
|
|
||||||
// Finde die höchste Rolle
|
// Finde die höchste Rolle
|
||||||
|
|
@ -314,7 +307,7 @@ export default function OrganizationDetails() {
|
||||||
{/* Lösch-Bestätigungsmodal */}
|
{/* Lösch-Bestätigungsmodal */}
|
||||||
<Modal
|
<Modal
|
||||||
animationType="fade"
|
animationType="fade"
|
||||||
transparent={true}
|
transparent
|
||||||
visible={showDeleteModal}
|
visible={showDeleteModal}
|
||||||
onRequestClose={cancelDelete}
|
onRequestClose={cancelDelete}
|
||||||
>
|
>
|
||||||
|
|
@ -339,8 +332,7 @@ export default function OrganizationDetails() {
|
||||||
<Text
|
<Text
|
||||||
className={`mb-6 text-center text-base ${isDarkMode ? 'text-gray-300' : 'text-gray-600'}`}
|
className={`mb-6 text-center text-base ${isDarkMode ? 'text-gray-300' : 'text-gray-600'}`}
|
||||||
>
|
>
|
||||||
Möchtest du die Organisation "{orgName}" wirklich löschen? Diese Aktion kann nicht
|
{`Möchtest du die Organisation "${orgName}" wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.`}
|
||||||
rückgängig gemacht werden.
|
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<View className="flex-row justify-between">
|
<View className="flex-row justify-between">
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ export default function Organizations() {
|
||||||
<Text className="text-sm font-semibold text-white">Neue Organisation</Text>
|
<Text className="text-sm font-semibold text-white">Neue Organisation</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
<OrganizationList hideTitle={true} ref={organizationListRef} />
|
<OrganizationList hideTitle ref={organizationListRef} />
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,13 @@ import {
|
||||||
ScrollView,
|
ScrollView,
|
||||||
TextInput,
|
TextInput,
|
||||||
Alert,
|
Alert,
|
||||||
ActivityIndicator,
|
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { Stack } from 'expo-router';
|
import { Stack } from 'expo-router';
|
||||||
import { FontAwesome5 } from '@expo/vector-icons';
|
import { FontAwesome5 } from '@expo/vector-icons';
|
||||||
import { Container } from '~/components/Container';
|
import { Container } from '~/components/Container';
|
||||||
import { useTheme, ThemeMode } from '~/utils/themeContext';
|
import { useTheme, type ThemeMode } from '~/utils/themeContext';
|
||||||
import { supabase } from '../../utils/supabase';
|
import { supabase } from '../../utils/supabase';
|
||||||
import { Session } from '@supabase/supabase-js';
|
import { type Session } from '@supabase/supabase-js';
|
||||||
|
|
||||||
interface Profile {
|
interface Profile {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,9 @@ import {
|
||||||
Text,
|
Text,
|
||||||
View,
|
View,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
TextInput,
|
|
||||||
Alert,
|
Alert,
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
Modal,
|
Modal,
|
||||||
Pressable,
|
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { FontAwesome5 } from '@expo/vector-icons';
|
import { FontAwesome5 } from '@expo/vector-icons';
|
||||||
|
|
||||||
|
|
@ -27,16 +25,12 @@ export default function TeamDetails() {
|
||||||
}>();
|
}>();
|
||||||
const { isDarkMode } = useTheme();
|
const { isDarkMode } = useTheme();
|
||||||
const [teamName, setTeamName] = useState(initialTeamName || '');
|
const [teamName, setTeamName] = useState(initialTeamName || '');
|
||||||
const [isEditing, setIsEditing] = useState(false);
|
|
||||||
const [newTeamName, setNewTeamName] = useState('');
|
|
||||||
const [loading, setLoading] = useState(false);
|
|
||||||
const [deletingTeam, setDeletingTeam] = useState(false);
|
const [deletingTeam, setDeletingTeam] = useState(false);
|
||||||
const [showDeleteModal, setShowDeleteModal] = useState(false);
|
const [showDeleteModal, setShowDeleteModal] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (initialTeamName) {
|
if (initialTeamName) {
|
||||||
setTeamName(initialTeamName);
|
setTeamName(initialTeamName);
|
||||||
setNewTeamName(initialTeamName);
|
|
||||||
}
|
}
|
||||||
}, [initialTeamName]);
|
}, [initialTeamName]);
|
||||||
|
|
||||||
|
|
@ -44,47 +38,6 @@ export default function TeamDetails() {
|
||||||
router.push('/teams');
|
router.push('/teams');
|
||||||
};
|
};
|
||||||
|
|
||||||
const startEditing = () => {
|
|
||||||
setIsEditing(true);
|
|
||||||
setNewTeamName(teamName);
|
|
||||||
};
|
|
||||||
|
|
||||||
const cancelEditing = () => {
|
|
||||||
setIsEditing(false);
|
|
||||||
};
|
|
||||||
|
|
||||||
const updateTeamName = async () => {
|
|
||||||
if (!newTeamName.trim()) {
|
|
||||||
Alert.alert('Fehler', 'Der Teamname darf nicht leer sein.');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newTeamName.trim() === teamName) {
|
|
||||||
setIsEditing(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setLoading(true);
|
|
||||||
|
|
||||||
try {
|
|
||||||
const { error } = await supabase
|
|
||||||
.from('teams')
|
|
||||||
.update({ name: newTeamName.trim() })
|
|
||||||
.eq('id', teamId);
|
|
||||||
|
|
||||||
if (error) throw error;
|
|
||||||
|
|
||||||
setTeamName(newTeamName.trim());
|
|
||||||
setIsEditing(false);
|
|
||||||
Alert.alert('Erfolg', 'Der Teamname wurde erfolgreich aktualisiert.');
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Fehler beim Aktualisieren des Teamnamens:', error);
|
|
||||||
Alert.alert('Fehler', 'Es ist ein Fehler beim Aktualisieren des Teamnamens aufgetreten.');
|
|
||||||
} finally {
|
|
||||||
setLoading(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const deleteTeam = () => {
|
const deleteTeam = () => {
|
||||||
console.log('Delete team button clicked, teamId:', teamId);
|
console.log('Delete team button clicked, teamId:', teamId);
|
||||||
// Modal öffnen statt Alert anzeigen
|
// Modal öffnen statt Alert anzeigen
|
||||||
|
|
@ -111,7 +64,7 @@ export default function TeamDetails() {
|
||||||
console.log('Checking for dependencies...');
|
console.log('Checking for dependencies...');
|
||||||
|
|
||||||
// 1. Prüfe auf credit_transactions
|
// 1. Prüfe auf credit_transactions
|
||||||
const { data: txData, error: txCheckError } = await supabase
|
const { data: txData } = await supabase
|
||||||
.from('credit_transactions')
|
.from('credit_transactions')
|
||||||
.select('id')
|
.select('id')
|
||||||
.eq('team_id', teamId);
|
.eq('team_id', teamId);
|
||||||
|
|
@ -119,7 +72,7 @@ export default function TeamDetails() {
|
||||||
console.log('Credit transactions:', txData);
|
console.log('Credit transactions:', txData);
|
||||||
|
|
||||||
// 2. Prüfe auf team_members
|
// 2. Prüfe auf team_members
|
||||||
const { data: memberData, error: memberCheckError } = await supabase
|
const { data: memberData } = await supabase
|
||||||
.from('team_members')
|
.from('team_members')
|
||||||
.select('user_id')
|
.select('user_id')
|
||||||
.eq('team_id', teamId);
|
.eq('team_id', teamId);
|
||||||
|
|
@ -127,7 +80,7 @@ export default function TeamDetails() {
|
||||||
console.log('Team members:', memberData);
|
console.log('Team members:', memberData);
|
||||||
|
|
||||||
// 3. Prüfe auf user_roles
|
// 3. Prüfe auf user_roles
|
||||||
const { data: roleData, error: roleCheckError } = await supabase
|
const { data: roleData } = await supabase
|
||||||
.from('user_roles')
|
.from('user_roles')
|
||||||
.select('id')
|
.select('id')
|
||||||
.eq('team_id', teamId);
|
.eq('team_id', teamId);
|
||||||
|
|
@ -240,7 +193,7 @@ export default function TeamDetails() {
|
||||||
{/* Lösch-Bestätigungsmodal */}
|
{/* Lösch-Bestätigungsmodal */}
|
||||||
<Modal
|
<Modal
|
||||||
animationType="fade"
|
animationType="fade"
|
||||||
transparent={true}
|
transparent
|
||||||
visible={showDeleteModal}
|
visible={showDeleteModal}
|
||||||
onRequestClose={cancelDelete}
|
onRequestClose={cancelDelete}
|
||||||
>
|
>
|
||||||
|
|
@ -265,8 +218,7 @@ export default function TeamDetails() {
|
||||||
<Text
|
<Text
|
||||||
className={`mb-6 text-center text-base ${isDarkMode ? 'text-gray-300' : 'text-gray-600'}`}
|
className={`mb-6 text-center text-base ${isDarkMode ? 'text-gray-300' : 'text-gray-600'}`}
|
||||||
>
|
>
|
||||||
Möchtest du das Team "{teamName}" wirklich löschen? Diese Aktion kann nicht rückgängig
|
{`Möchtest du das Team "${teamName}" wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.`}
|
||||||
gemacht werden.
|
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<View className="flex-row justify-between">
|
<View className="flex-row justify-between">
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ export default function Teams() {
|
||||||
<Text className="text-sm font-semibold text-white">Neues Team</Text>
|
<Text className="text-sm font-semibold text-white">Neues Team</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
<TeamList hideTitle={true} />
|
<TeamList hideTitle />
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ export default function NotFoundScreen() {
|
||||||
<>
|
<>
|
||||||
<Stack.Screen options={{ title: 'Oops!' }} />
|
<Stack.Screen options={{ title: 'Oops!' }} />
|
||||||
<Container>
|
<Container>
|
||||||
<Text className={styles.title}>This screen doesn't exist.</Text>
|
<Text className={styles.title}>This screen does not exist.</Text>
|
||||||
<Link href="/" className={styles.link}>
|
<Link href="/" className={styles.link}>
|
||||||
<Text className={styles.linkText}>Go to home screen!</Text>
|
<Text className={styles.linkText}>Go to home screen!</Text>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { Stack, useRouter, useSegments } from 'expo-router';
|
||||||
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
||||||
import { ThemeProvider } from '~/utils/themeContext';
|
import { ThemeProvider } from '~/utils/themeContext';
|
||||||
import { supabase } from '../utils/supabase';
|
import { supabase } from '../utils/supabase';
|
||||||
import { Session } from '@supabase/supabase-js';
|
import { type Session } from '@supabase/supabase-js';
|
||||||
|
|
||||||
export const unstable_settings = {
|
export const unstable_settings = {
|
||||||
// Ensure that reloading on `/modal` keeps a back button present.
|
// Ensure that reloading on `/modal` keeps a back button present.
|
||||||
|
|
@ -54,6 +54,7 @@ function AuthProvider({ children }: { children: React.ReactNode }) {
|
||||||
// leite ihn zur Hauptseite um
|
// leite ihn zur Hauptseite um
|
||||||
router.replace('/');
|
router.replace('/');
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [session, segments, isLoading]);
|
}, [session, segments, isLoading]);
|
||||||
|
|
||||||
// Zeige nichts während des Ladens
|
// Zeige nichts während des Ladens
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import {
|
||||||
Platform,
|
Platform,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { Stack, useRouter, useLocalSearchParams } from 'expo-router';
|
import { Stack, useRouter, useLocalSearchParams } from 'expo-router';
|
||||||
import { supabase } from '../../utils/supabase';
|
|
||||||
import { useTheme } from '../../utils/themeContext';
|
import { useTheme } from '../../utils/themeContext';
|
||||||
|
|
||||||
export default function ResetPasswordScreen() {
|
export default function ResetPasswordScreen() {
|
||||||
|
|
@ -32,6 +31,7 @@ export default function ResetPasswordScreen() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
verifyToken();
|
verifyToken();
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const verifyToken = async () => {
|
const verifyToken = async () => {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { View, Text, TextInput, TouchableOpacity, StyleSheet, Alert } from 'react-native';
|
import { View, Text, TextInput, TouchableOpacity, StyleSheet, Alert } from 'react-native';
|
||||||
import { supabase } from '../utils/supabase';
|
import { supabase } from '../utils/supabase';
|
||||||
import { Session } from '@supabase/supabase-js';
|
import { type Session } from '@supabase/supabase-js';
|
||||||
|
|
||||||
interface Profile {
|
interface Profile {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
@ -21,6 +21,7 @@ export default function Account({ session }: { session: Session }) {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (session) getProfile();
|
if (session) getProfile();
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [session]);
|
}, [session]);
|
||||||
|
|
||||||
async function getProfile() {
|
async function getProfile() {
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,8 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import {
|
import { Alert, StyleSheet, View, TextInput, TouchableOpacity, Text, Platform } from 'react-native';
|
||||||
Alert,
|
|
||||||
StyleSheet,
|
|
||||||
View,
|
|
||||||
TextInput,
|
|
||||||
TouchableOpacity,
|
|
||||||
Text,
|
|
||||||
Image,
|
|
||||||
Platform,
|
|
||||||
} from 'react-native';
|
|
||||||
import { FontAwesome5 } from '@expo/vector-icons';
|
import { FontAwesome5 } from '@expo/vector-icons';
|
||||||
import { supabase } from '../utils/supabase';
|
import { supabase } from '../utils/supabase';
|
||||||
import { useTheme, useThemeColors, lightColors, darkColors } from '../utils/themeContext';
|
import { useTheme, useThemeColors } from '../utils/themeContext';
|
||||||
|
|
||||||
export default function Auth() {
|
export default function Auth() {
|
||||||
const { isDarkMode } = useTheme();
|
const { isDarkMode } = useTheme();
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { forwardRef } from 'react';
|
import { forwardRef } from 'react';
|
||||||
import { Text, TouchableOpacity, TouchableOpacityProps, View } from 'react-native';
|
import { Text, TouchableOpacity, type TouchableOpacityProps, type View } from 'react-native';
|
||||||
|
|
||||||
type ButtonProps = {
|
type ButtonProps = {
|
||||||
title: string;
|
title: string;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import {
|
||||||
ScrollView,
|
ScrollView,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { supabase } from '../utils/supabase';
|
import { supabase } from '../utils/supabase';
|
||||||
import { Session } from '@supabase/supabase-js';
|
import { type Session } from '@supabase/supabase-js';
|
||||||
import { useTheme } from '../utils/themeContext';
|
import { useTheme } from '../utils/themeContext';
|
||||||
|
|
||||||
interface UserRole {
|
interface UserRole {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import {
|
||||||
ScrollView,
|
ScrollView,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { supabase } from '../utils/supabase';
|
import { supabase } from '../utils/supabase';
|
||||||
import { Session } from '@supabase/supabase-js';
|
import { type Session } from '@supabase/supabase-js';
|
||||||
import { useTheme } from '../utils/themeContext';
|
import { useTheme } from '../utils/themeContext';
|
||||||
import { useRouter } from 'expo-router';
|
import { useRouter } from 'expo-router';
|
||||||
|
|
||||||
|
|
@ -30,7 +30,7 @@ interface CreateTeamProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function CreateTeam({ onTeamCreated }: CreateTeamProps) {
|
export default function CreateTeam({ onTeamCreated }: CreateTeamProps) {
|
||||||
const router = useRouter();
|
const _router = useRouter();
|
||||||
const [session, setSession] = useState<Session | null>(null);
|
const [session, setSession] = useState<Session | null>(null);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [organizations, setOrganizations] = useState<Organization[]>([]);
|
const [organizations, setOrganizations] = useState<Organization[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { View, Text, TouchableOpacity, ActivityIndicator } from 'react-native';
|
||||||
import { FontAwesome5 } from '@expo/vector-icons';
|
import { FontAwesome5 } from '@expo/vector-icons';
|
||||||
import { useRouter } from 'expo-router';
|
import { useRouter } from 'expo-router';
|
||||||
import { supabase } from '../utils/supabase';
|
import { supabase } from '../utils/supabase';
|
||||||
import { Session } from '@supabase/supabase-js';
|
import { type Session } from '@supabase/supabase-js';
|
||||||
import { useTheme, lightColors, darkColors } from '../utils/themeContext';
|
import { useTheme, lightColors, darkColors } from '../utils/themeContext';
|
||||||
|
|
||||||
export default function DashboardStats() {
|
export default function DashboardStats() {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { forwardRef } from 'react';
|
||||||
import { Pressable, StyleSheet } from 'react-native';
|
import { Pressable, StyleSheet } from 'react-native';
|
||||||
|
|
||||||
export const HeaderButton = forwardRef<typeof Pressable, { onPress?: () => void }>(
|
export const HeaderButton = forwardRef<typeof Pressable, { onPress?: () => void }>(
|
||||||
({ onPress }, ref) => {
|
({ onPress }, _ref) => {
|
||||||
return (
|
return (
|
||||||
<Pressable onPress={onPress}>
|
<Pressable onPress={onPress}>
|
||||||
{({ pressed }) => (
|
{({ pressed }) => (
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { useState, useEffect, forwardRef, useImperativeHandle } from 'rea
|
||||||
import { View, Text, FlatList, TouchableOpacity, ActivityIndicator, Alert } from 'react-native';
|
import { View, Text, FlatList, TouchableOpacity, ActivityIndicator, Alert } from 'react-native';
|
||||||
import { FontAwesome5 } from '@expo/vector-icons';
|
import { FontAwesome5 } from '@expo/vector-icons';
|
||||||
import { supabase } from '../utils/supabase';
|
import { supabase } from '../utils/supabase';
|
||||||
import { Session } from '@supabase/supabase-js';
|
import { type Session } from '@supabase/supabase-js';
|
||||||
import { useTheme } from '../utils/themeContext';
|
import { useTheme } from '../utils/themeContext';
|
||||||
import { useRouter } from 'expo-router';
|
import { useRouter } from 'expo-router';
|
||||||
|
|
||||||
|
|
@ -67,6 +67,7 @@ const OrganizationList = forwardRef<OrganizationListRef, OrganizationListProps>(
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => subscription.unsubscribe();
|
return () => subscription.unsubscribe();
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
async function fetchUserOrganizations(userId: string) {
|
async function fetchUserOrganizations(userId: string) {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { supabase } from '../utils/supabase';
|
import { supabase } from '../utils/supabase';
|
||||||
import { Session } from '@supabase/supabase-js';
|
import { type Session } from '@supabase/supabase-js';
|
||||||
import { useTheme } from '../utils/themeContext';
|
import { useTheme } from '../utils/themeContext';
|
||||||
|
|
||||||
interface User {
|
interface User {
|
||||||
|
|
@ -464,133 +464,3 @@ export default function SendMana() {
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
container: {
|
|
||||||
backgroundColor: 'white',
|
|
||||||
borderRadius: 10,
|
|
||||||
padding: 20,
|
|
||||||
marginBottom: 20,
|
|
||||||
shadowColor: '#000',
|
|
||||||
shadowOffset: { width: 0, height: 2 },
|
|
||||||
shadowOpacity: 0.1,
|
|
||||||
shadowRadius: 4,
|
|
||||||
elevation: 3,
|
|
||||||
},
|
|
||||||
header: {
|
|
||||||
fontSize: 22,
|
|
||||||
fontWeight: 'bold',
|
|
||||||
marginBottom: 20,
|
|
||||||
color: '#333',
|
|
||||||
},
|
|
||||||
creditInfo: {
|
|
||||||
flexDirection: 'row',
|
|
||||||
alignItems: 'center',
|
|
||||||
backgroundColor: '#f0f8ff',
|
|
||||||
padding: 15,
|
|
||||||
borderRadius: 8,
|
|
||||||
marginBottom: 20,
|
|
||||||
},
|
|
||||||
creditLabel: {
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: '500',
|
|
||||||
color: '#333',
|
|
||||||
},
|
|
||||||
creditAmount: {
|
|
||||||
fontSize: 18,
|
|
||||||
fontWeight: 'bold',
|
|
||||||
color: '#0055FF',
|
|
||||||
marginLeft: 10,
|
|
||||||
},
|
|
||||||
formGroup: {
|
|
||||||
marginBottom: 15,
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
fontSize: 16,
|
|
||||||
marginBottom: 8,
|
|
||||||
fontWeight: '500',
|
|
||||||
color: '#333',
|
|
||||||
},
|
|
||||||
input: {
|
|
||||||
height: 50,
|
|
||||||
borderWidth: 1,
|
|
||||||
borderColor: '#ddd',
|
|
||||||
borderRadius: 8,
|
|
||||||
paddingHorizontal: 15,
|
|
||||||
backgroundColor: '#f9f9f9',
|
|
||||||
fontSize: 16,
|
|
||||||
},
|
|
||||||
searchContainer: {
|
|
||||||
flexDirection: 'row',
|
|
||||||
alignItems: 'center',
|
|
||||||
},
|
|
||||||
searchInput: {
|
|
||||||
flex: 1,
|
|
||||||
height: 50,
|
|
||||||
borderWidth: 1,
|
|
||||||
borderColor: '#ddd',
|
|
||||||
borderRadius: 8,
|
|
||||||
paddingHorizontal: 15,
|
|
||||||
backgroundColor: '#f9f9f9',
|
|
||||||
fontSize: 16,
|
|
||||||
},
|
|
||||||
searchButton: {
|
|
||||||
backgroundColor: '#0055FF',
|
|
||||||
height: 50,
|
|
||||||
paddingHorizontal: 15,
|
|
||||||
borderRadius: 8,
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
|
||||||
marginLeft: 10,
|
|
||||||
},
|
|
||||||
searchButtonText: {
|
|
||||||
color: 'white',
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: 'bold',
|
|
||||||
},
|
|
||||||
userCard: {
|
|
||||||
backgroundColor: '#f0f8ff',
|
|
||||||
padding: 15,
|
|
||||||
borderRadius: 8,
|
|
||||||
marginBottom: 20,
|
|
||||||
borderLeftWidth: 4,
|
|
||||||
borderLeftColor: '#0055FF',
|
|
||||||
},
|
|
||||||
userCardTitle: {
|
|
||||||
fontSize: 14,
|
|
||||||
color: '#666',
|
|
||||||
marginBottom: 5,
|
|
||||||
},
|
|
||||||
userCardEmail: {
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: 'bold',
|
|
||||||
color: '#333',
|
|
||||||
},
|
|
||||||
userCardName: {
|
|
||||||
fontSize: 14,
|
|
||||||
color: '#666',
|
|
||||||
marginTop: 5,
|
|
||||||
},
|
|
||||||
sendButton: {
|
|
||||||
backgroundColor: '#0055FF',
|
|
||||||
height: 50,
|
|
||||||
borderRadius: 8,
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
|
||||||
marginTop: 10,
|
|
||||||
},
|
|
||||||
sendButtonText: {
|
|
||||||
color: 'white',
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: 'bold',
|
|
||||||
},
|
|
||||||
disabledButton: {
|
|
||||||
backgroundColor: '#ccc',
|
|
||||||
},
|
|
||||||
notLoggedIn: {
|
|
||||||
fontSize: 16,
|
|
||||||
color: '#666',
|
|
||||||
textAlign: 'center',
|
|
||||||
padding: 20,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import {
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { FontAwesome5 } from '@expo/vector-icons';
|
import { FontAwesome5 } from '@expo/vector-icons';
|
||||||
import { supabase } from '../utils/supabase';
|
import { supabase } from '../utils/supabase';
|
||||||
import { Session } from '@supabase/supabase-js';
|
import { type Session } from '@supabase/supabase-js';
|
||||||
import { useRouter } from 'expo-router';
|
import { useRouter } from 'expo-router';
|
||||||
import { useTheme } from '../utils/themeContext';
|
import { useTheme } from '../utils/themeContext';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,7 @@ import {
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { FontAwesome5 } from '@expo/vector-icons';
|
import { FontAwesome5 } from '@expo/vector-icons';
|
||||||
import { supabase } from '../utils/supabase';
|
import { supabase } from '../utils/supabase';
|
||||||
import { Session } from '@supabase/supabase-js';
|
import { type Session } from '@supabase/supabase-js';
|
||||||
import { useLocalSearchParams } from 'expo-router';
|
|
||||||
import { useTheme } from '../utils/themeContext';
|
import { useTheme } from '../utils/themeContext';
|
||||||
|
|
||||||
interface TeamMember {
|
interface TeamMember {
|
||||||
|
|
@ -45,7 +44,7 @@ export default function TeamMembers({ teamId }: TeamMembersProps) {
|
||||||
const [members, setMembers] = useState<TeamMember[]>([]);
|
const [members, setMembers] = useState<TeamMember[]>([]);
|
||||||
const [newMemberEmail, setNewMemberEmail] = useState('');
|
const [newMemberEmail, setNewMemberEmail] = useState('');
|
||||||
const [inviting, setInviting] = useState(false);
|
const [inviting, setInviting] = useState(false);
|
||||||
const [userRole, setUserRole] = useState<string | null>(null);
|
const [_userRole, setUserRole] = useState<string | null>(null);
|
||||||
const [isAdmin, setIsAdmin] = useState(false);
|
const [isAdmin, setIsAdmin] = useState(false);
|
||||||
const { isDarkMode } = useTheme();
|
const { isDarkMode } = useTheme();
|
||||||
const [isEditing, setIsEditing] = useState(false);
|
const [isEditing, setIsEditing] = useState(false);
|
||||||
|
|
@ -95,6 +94,7 @@ export default function TeamMembers({ teamId }: TeamMembersProps) {
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => subscription.unsubscribe();
|
return () => subscription.unsubscribe();
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [teamId]);
|
}, [teamId]);
|
||||||
|
|
||||||
async function checkUserRole(userId: string, teamId: string) {
|
async function checkUserRole(userId: string, teamId: string) {
|
||||||
|
|
|
||||||
20
apps/manacore/apps/mobile/eslint.config.mjs
Normal file
20
apps/manacore/apps/mobile/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: [
|
||||||
|
'dist/**',
|
||||||
|
'.expo/**',
|
||||||
|
'node_modules/**',
|
||||||
|
'android/**',
|
||||||
|
'ios/**',
|
||||||
|
'metro.config.js',
|
||||||
|
'tailwind.config.js',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...reactConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -10,8 +10,8 @@
|
||||||
"build:preview": "eas build --profile preview",
|
"build:preview": "eas build --profile preview",
|
||||||
"build:prod": "eas build --profile production",
|
"build:prod": "eas build --profile production",
|
||||||
"prebuild": "expo prebuild",
|
"prebuild": "expo prebuild",
|
||||||
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\" && prettier -c \"**/*.{js,jsx,ts,tsx,json}\"",
|
"lint": "eslint .",
|
||||||
"format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
|
"format": "eslint . --fix",
|
||||||
"web": "expo start --web --port 19006",
|
"web": "expo start --web --port 19006",
|
||||||
"web:dev": "expo start --web --port 19006"
|
"web:dev": "expo start --web --port 19006"
|
||||||
},
|
},
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
"@types/react-dom": "^19.2.3",
|
"@types/react-dom": "^19.2.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
||||||
"@typescript-eslint/parser": "^7.7.0",
|
"@typescript-eslint/parser": "^7.7.0",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^9.39.1",
|
||||||
"eslint-config-universe": "^12.0.1",
|
"eslint-config-universe": "^12.0.1",
|
||||||
"prettier": "^3.2.5",
|
"prettier": "^3.2.5",
|
||||||
"prettier-plugin-tailwindcss": "^0.5.11",
|
"prettier-plugin-tailwindcss": "^0.5.11",
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ interface StorageData {
|
||||||
|
|
||||||
class HybridStorageService {
|
class HybridStorageService {
|
||||||
private memoryStorage: StorageData = {};
|
private memoryStorage: StorageData = {};
|
||||||
private isAsyncStorageAvailable: boolean = false;
|
private isAsyncStorageAvailable = false;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
// Check if we're in an environment where AsyncStorage is available
|
// Check if we're in an environment where AsyncStorage is available
|
||||||
|
|
@ -34,7 +34,7 @@ class HybridStorageService {
|
||||||
if (this.isAsyncStorageAvailable) {
|
if (this.isAsyncStorageAvailable) {
|
||||||
await this.syncFromAsyncStorage();
|
await this.syncFromAsyncStorage();
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
console.warn('AsyncStorage not available, falling back to memory storage');
|
console.warn('AsyncStorage not available, falling back to memory storage');
|
||||||
this.isAsyncStorageAvailable = false;
|
this.isAsyncStorageAvailable = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
17
apps/manacore/apps/web/eslint.config.js
Normal file
17
apps/manacore/apps/web/eslint.config.js
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
svelteConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...svelteConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -1,34 +1,17 @@
|
||||||
// @ts-check
|
// @ts-check
|
||||||
import eslint from '@eslint/js';
|
import {
|
||||||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
baseConfig,
|
||||||
import globals from 'globals';
|
typescriptConfig,
|
||||||
import tseslint from 'typescript-eslint';
|
nestjsConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
export default tseslint.config(
|
export default [
|
||||||
{
|
{
|
||||||
ignores: ['eslint.config.mjs'],
|
ignores: ['dist/**', 'node_modules/**'],
|
||||||
},
|
},
|
||||||
eslint.configs.recommended,
|
...baseConfig,
|
||||||
...tseslint.configs.recommendedTypeChecked,
|
...typescriptConfig,
|
||||||
eslintPluginPrettierRecommended,
|
...nestjsConfig,
|
||||||
{
|
...prettierConfig,
|
||||||
languageOptions: {
|
];
|
||||||
globals: {
|
|
||||||
...globals.node,
|
|
||||||
...globals.jest,
|
|
||||||
},
|
|
||||||
sourceType: 'commonjs',
|
|
||||||
parserOptions: {
|
|
||||||
projectService: true,
|
|
||||||
tsconfigRootDir: import.meta.dirname,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rules: {
|
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
|
||||||
'@typescript-eslint/no-floating-promises': 'warn',
|
|
||||||
'@typescript-eslint/no-unsafe-argument': 'warn'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
|
||||||
11
apps/manadeck/apps/landing/eslint.config.js
Normal file
11
apps/manadeck/apps/landing/eslint.config.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -9,7 +9,8 @@
|
||||||
"build": "astro check && astro build",
|
"build": "astro check && astro build",
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
"astro": "astro",
|
"astro": "astro",
|
||||||
"type-check": "astro check"
|
"type-check": "astro check",
|
||||||
|
"lint": "eslint ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/check": "^0.9.0",
|
"@astrojs/check": "^0.9.0",
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
/* eslint-env node */
|
|
||||||
const { defineConfig } = require('eslint/config');
|
|
||||||
const expoConfig = require('eslint-config-expo/flat');
|
|
||||||
|
|
||||||
module.exports = defineConfig([
|
|
||||||
expoConfig,
|
|
||||||
{
|
|
||||||
ignores: ['dist/*'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rules: {
|
|
||||||
'react/display-name': 'off',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
12
apps/manadeck/apps/mobile/eslint.config.mjs
Normal file
12
apps/manadeck/apps/mobile/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.expo/**', 'node_modules/**', 'android/**', 'ios/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...reactConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -12,8 +12,8 @@
|
||||||
"build:preview": "eas build --profile preview",
|
"build:preview": "eas build --profile preview",
|
||||||
"build:prod": "eas build --profile production",
|
"build:prod": "eas build --profile production",
|
||||||
"prebuild": "expo prebuild",
|
"prebuild": "expo prebuild",
|
||||||
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\" && prettier -c \"**/*.{js,jsx,ts,tsx,json}\"",
|
"lint": "eslint .",
|
||||||
"format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
|
"format": "eslint . --fix",
|
||||||
"web": "expo start --web"
|
"web": "expo start --web"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
17
apps/manadeck/apps/web/eslint.config.js
Normal file
17
apps/manadeck/apps/web/eslint.config.js
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
svelteConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...svelteConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -9,7 +9,8 @@
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"prepare": "svelte-kit sync || echo ''",
|
"prepare": "svelte-kit sync || echo ''",
|
||||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||||
|
"lint": "eslint ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/adapter-auto": "^7.0.0",
|
"@sveltejs/adapter-auto": "^7.0.0",
|
||||||
|
|
|
||||||
11
apps/memoro/apps/landing/eslint.config.js
Normal file
11
apps/memoro/apps/landing/eslint.config.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
12
apps/memoro/apps/mobile/eslint.config.mjs
Normal file
12
apps/memoro/apps/mobile/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.expo/**', 'node_modules/**', 'android/**', 'ios/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...reactConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
11
apps/news/apps/landing/eslint.config.js
Normal file
11
apps/news/apps/landing/eslint.config.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
17
apps/nutriphi/apps/backend/eslint.config.mjs
Normal file
17
apps/nutriphi/apps/backend/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
nestjsConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...nestjsConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
11
apps/nutriphi/apps/landing/eslint.config.js
Normal file
11
apps/nutriphi/apps/landing/eslint.config.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
12
apps/nutriphi/apps/mobile/eslint.config.mjs
Normal file
12
apps/nutriphi/apps/mobile/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.expo/**', 'node_modules/**', 'android/**', 'ios/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...reactConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
17
apps/picture/apps/backend/eslint.config.mjs
Normal file
17
apps/picture/apps/backend/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
nestjsConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...nestjsConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
11
apps/picture/apps/landing/eslint.config.js
Normal file
11
apps/picture/apps/landing/eslint.config.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
/* eslint-env node */
|
|
||||||
const { defineConfig } = require('eslint/config');
|
|
||||||
const expoConfig = require('eslint-config-expo/flat');
|
|
||||||
|
|
||||||
module.exports = defineConfig([
|
|
||||||
expoConfig,
|
|
||||||
{
|
|
||||||
ignores: ['dist/*'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rules: {
|
|
||||||
'react/display-name': 'off',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
12
apps/picture/apps/mobile/eslint.config.mjs
Normal file
12
apps/picture/apps/mobile/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.expo/**', 'node_modules/**', 'android/**', 'ios/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...reactConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -11,8 +11,8 @@
|
||||||
"build:preview": "eas build --profile preview",
|
"build:preview": "eas build --profile preview",
|
||||||
"build:prod": "eas build --profile production",
|
"build:prod": "eas build --profile production",
|
||||||
"prebuild": "expo prebuild",
|
"prebuild": "expo prebuild",
|
||||||
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\" && prettier -c \"**/*.{js,jsx,ts,tsx,json}\"",
|
"lint": "eslint .",
|
||||||
"format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
|
"format": "eslint . --fix",
|
||||||
"type-check": "echo 'Skipping type-check: @picture/mobile needs theme system migration'",
|
"type-check": "echo 'Skipping type-check: @picture/mobile needs theme system migration'",
|
||||||
"postinstall": "patch-package && ./scripts/build-workspace-deps.sh"
|
"postinstall": "patch-package && ./scripts/build-workspace-deps.sh"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1,17 @@
|
||||||
import prettier from 'eslint-config-prettier';
|
// @ts-check
|
||||||
import { fileURLToPath } from 'node:url';
|
import {
|
||||||
import { includeIgnoreFile } from '@eslint/compat';
|
baseConfig,
|
||||||
import js from '@eslint/js';
|
typescriptConfig,
|
||||||
import svelte from 'eslint-plugin-svelte';
|
svelteConfig,
|
||||||
import { defineConfig } from 'eslint/config';
|
prettierConfig,
|
||||||
import globals from 'globals';
|
} from '@manacore/eslint-config';
|
||||||
import ts from 'typescript-eslint';
|
|
||||||
import svelteConfig from './svelte.config.js';
|
|
||||||
|
|
||||||
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
|
export default [
|
||||||
|
|
||||||
export default defineConfig(
|
|
||||||
includeIgnoreFile(gitignorePath),
|
|
||||||
js.configs.recommended,
|
|
||||||
...ts.configs.recommended,
|
|
||||||
...svelte.configs.recommended,
|
|
||||||
prettier,
|
|
||||||
...svelte.configs.prettier,
|
|
||||||
{
|
{
|
||||||
languageOptions: {
|
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
|
||||||
globals: { ...globals.browser, ...globals.node },
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
|
|
||||||
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
|
|
||||||
'no-undef': 'off',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
...baseConfig,
|
||||||
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
...typescriptConfig,
|
||||||
languageOptions: {
|
...svelteConfig,
|
||||||
parserOptions: {
|
...prettierConfig,
|
||||||
projectService: true,
|
];
|
||||||
extraFileExtensions: ['.svelte'],
|
|
||||||
parser: ts.parser,
|
|
||||||
svelteConfig,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,6 @@
|
||||||
"build:mobile": "pnpm --filter @picture/mobile build:prod",
|
"build:mobile": "pnpm --filter @picture/mobile build:prod",
|
||||||
"build:web": "pnpm --filter @picture/web build",
|
"build:web": "pnpm --filter @picture/web build",
|
||||||
"build:landing": "pnpm --filter @picture/landing build",
|
"build:landing": "pnpm --filter @picture/landing build",
|
||||||
"lint": "pnpm run --recursive lint",
|
|
||||||
"type-check": "pnpm run --recursive type-check",
|
|
||||||
"clean": "pnpm run --recursive clean && rm -rf node_modules",
|
"clean": "pnpm run --recursive clean && rm -rf node_modules",
|
||||||
"android": "expo run:android",
|
"android": "expo run:android",
|
||||||
"ios": "expo run:ios"
|
"ios": "expo run:ios"
|
||||||
|
|
|
||||||
17
apps/presi/apps/backend/eslint.config.mjs
Normal file
17
apps/presi/apps/backend/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// @ts-check
|
||||||
|
import {
|
||||||
|
baseConfig,
|
||||||
|
typescriptConfig,
|
||||||
|
nestjsConfig,
|
||||||
|
prettierConfig,
|
||||||
|
} from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...nestjsConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -2,7 +2,7 @@ import { drizzle, type PostgresJsDatabase } from 'drizzle-orm/postgres-js';
|
||||||
import * as schema from './schema';
|
import * as schema from './schema';
|
||||||
|
|
||||||
// Use require for postgres to avoid ESM/CommonJS interop issues
|
// Use require for postgres to avoid ESM/CommonJS interop issues
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
||||||
const postgres = require('postgres');
|
const postgres = require('postgres');
|
||||||
|
|
||||||
let connection: ReturnType<typeof postgres> | null = null;
|
let connection: ReturnType<typeof postgres> | null = null;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Module, Global, OnModuleDestroy } from '@nestjs/common';
|
import { Module, Global, type OnModuleDestroy } from '@nestjs/common';
|
||||||
import { ConfigService } from '@nestjs/config';
|
import { ConfigService } from '@nestjs/config';
|
||||||
import { getDb, closeConnection, type Database } from './connection';
|
import { getDb, closeConnection, type Database } from './connection';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Controller, Get, Post, Put, Delete, Body, Param, UseGuards } from '@nestjs/common';
|
import { Controller, Get, Post, Put, Delete, Body, Param, UseGuards } from '@nestjs/common';
|
||||||
import { DeckService } from './deck.service';
|
import { type DeckService } from './deck.service';
|
||||||
import { CreateDeckDto, UpdateDeckDto } from './deck.dto';
|
import { type CreateDeckDto, type UpdateDeckDto } from './deck.dto';
|
||||||
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
|
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
|
||||||
|
|
||||||
@Controller('decks')
|
@Controller('decks')
|
||||||
@UseGuards(JwtAuthGuard)
|
@UseGuards(JwtAuthGuard)
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import { Injectable, Inject, NotFoundException, ForbiddenException } from '@nestjs/common';
|
import { Injectable, Inject, NotFoundException } from '@nestjs/common';
|
||||||
import { eq, and, desc } from 'drizzle-orm';
|
import { eq, and, desc } from 'drizzle-orm';
|
||||||
import { DATABASE_CONNECTION } from '../db/database.module';
|
import { DATABASE_CONNECTION } from '../db/database.module';
|
||||||
import { type Database } from '../db/connection';
|
import { type Database } from '../db/connection';
|
||||||
import { decks, slides } from '../db/schema';
|
import { decks, slides } from '../db/schema';
|
||||||
import { CreateDeckDto, UpdateDeckDto } from './deck.dto';
|
import { type CreateDeckDto, type UpdateDeckDto } from './deck.dto';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DeckService {
|
export class DeckService {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Controller, Get, Post, Delete, Body, Param, UseGuards } from '@nestjs/common';
|
import { Controller, Get, Post, Delete, Body, Param, UseGuards } from '@nestjs/common';
|
||||||
import { ShareService } from './share.service';
|
import { type ShareService } from './share.service';
|
||||||
import { CreateShareDto } from './share.dto';
|
import { type CreateShareDto } from './share.dto';
|
||||||
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
|
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
|
||||||
|
|
||||||
@Controller('share')
|
@Controller('share')
|
||||||
export class ShareController {
|
export class ShareController {
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ import { Injectable, Inject, NotFoundException, ForbiddenException } from '@nest
|
||||||
import { eq, and, gt, or, isNull } from 'drizzle-orm';
|
import { eq, and, gt, or, isNull } from 'drizzle-orm';
|
||||||
import { DATABASE_CONNECTION } from '../db/database.module';
|
import { DATABASE_CONNECTION } from '../db/database.module';
|
||||||
import { type Database } from '../db/connection';
|
import { type Database } from '../db/connection';
|
||||||
import { sharedDecks, decks, slides } from '../db/schema';
|
import { sharedDecks, slides } from '../db/schema';
|
||||||
import { DeckService } from '../deck/deck.service';
|
import { type DeckService } from '../deck/deck.service';
|
||||||
import { randomBytes } from 'crypto';
|
import { randomBytes } from 'crypto';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Controller, Post, Put, Delete, Body, Param, UseGuards } from '@nestjs/common';
|
import { Controller, Post, Put, Delete, Body, Param, UseGuards } from '@nestjs/common';
|
||||||
import { SlideService } from './slide.service';
|
import { type SlideService } from './slide.service';
|
||||||
import { CreateSlideDto, UpdateSlideDto, ReorderSlidesDto } from './slide.dto';
|
import { type CreateSlideDto, type UpdateSlideDto, type ReorderSlidesDto } from './slide.dto';
|
||||||
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
|
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
|
||||||
|
|
||||||
@Controller()
|
@Controller()
|
||||||
@UseGuards(JwtAuthGuard)
|
@UseGuards(JwtAuthGuard)
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import { Injectable, Inject, NotFoundException, ForbiddenException } from '@nestjs/common';
|
import { Injectable, Inject, NotFoundException, ForbiddenException } from '@nestjs/common';
|
||||||
import { eq, and, max } from 'drizzle-orm';
|
import { eq, max } from 'drizzle-orm';
|
||||||
import { DATABASE_CONNECTION } from '../db/database.module';
|
import { DATABASE_CONNECTION } from '../db/database.module';
|
||||||
import { type Database } from '../db/connection';
|
import { type Database } from '../db/connection';
|
||||||
import { slides, decks } from '../db/schema';
|
import { slides, decks } from '../db/schema';
|
||||||
import { DeckService } from '../deck/deck.service';
|
import { type DeckService } from '../deck/deck.service';
|
||||||
import { CreateSlideDto, UpdateSlideDto, ReorderSlidesDto } from './slide.dto';
|
import { type CreateSlideDto, type UpdateSlideDto, type ReorderSlidesDto } from './slide.dto';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SlideService {
|
export class SlideService {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { Controller, Get, Param } from '@nestjs/common';
|
import { Controller, Get, Param } from '@nestjs/common';
|
||||||
import { ThemeService } from './theme.service';
|
import { type ThemeService } from './theme.service';
|
||||||
|
|
||||||
@Controller('themes')
|
@Controller('themes')
|
||||||
export class ThemeController {
|
export class ThemeController {
|
||||||
|
|
|
||||||
11
apps/presi/apps/landing/eslint.config.js
Normal file
11
apps/presi/apps/landing/eslint.config.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
|
|
@ -9,7 +9,8 @@
|
||||||
"build": "astro check && astro build",
|
"build": "astro check && astro build",
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
"astro": "astro",
|
"astro": "astro",
|
||||||
"type-check": "astro check"
|
"type-check": "astro check",
|
||||||
|
"lint": "eslint ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/check": "^0.9.0",
|
"@astrojs/check": "^0.9.0",
|
||||||
|
|
|
||||||
12
apps/presi/apps/mobile/eslint.config.mjs
Normal file
12
apps/presi/apps/mobile/eslint.config.mjs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
// @ts-check
|
||||||
|
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', '.expo/**', 'node_modules/**', 'android/**', 'ios/**'],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...typescriptConfig,
|
||||||
|
...reactConfig,
|
||||||
|
...prettierConfig,
|
||||||
|
];
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue