diff --git a/.prettierignore b/.prettierignore index 1beb1dc..7566eee 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,7 +5,6 @@ yarn.lock # Dont even try lol .svelte-kit -dist build node_modules diff --git a/strapi/config/admin.ts b/strapi/config/admin.ts index a4f33ce..f1799fa 100644 --- a/strapi/config/admin.ts +++ b/strapi/config/admin.ts @@ -1,17 +1,17 @@ export default ({ env }) => ({ - auth: { - secret: env('ADMIN_JWT_SECRET') - }, - apiToken: { - salt: env('API_TOKEN_SALT') - }, - transfer: { - token: { - salt: env('TRANSFER_TOKEN_SALT') - } - }, - flags: { - nps: env.bool('FLAG_NPS', true), - promoteEE: env.bool('FLAG_PROMOTE_EE', true) - } + auth: { + secret: env('ADMIN_JWT_SECRET'), + }, + apiToken: { + salt: env('API_TOKEN_SALT'), + }, + transfer: { + token: { + salt: env('TRANSFER_TOKEN_SALT'), + }, + }, + flags: { + nps: env.bool('FLAG_NPS', true), + promoteEE: env.bool('FLAG_PROMOTE_EE', true), + }, }); diff --git a/strapi/config/api.ts b/strapi/config/api.ts index 9e9fe0b..37f7c14 100644 --- a/strapi/config/api.ts +++ b/strapi/config/api.ts @@ -1,7 +1,7 @@ export default { - rest: { - defaultLimit: 25, - maxLimit: 100, - withCount: true - } + rest: { + defaultLimit: 25, + maxLimit: 100, + withCount: true, + }, }; diff --git a/strapi/config/database.ts b/strapi/config/database.ts index 7987b3a..1853ca4 100644 --- a/strapi/config/database.ts +++ b/strapi/config/database.ts @@ -1,60 +1,60 @@ import path from 'path'; export default ({ env }) => { - const client = env('DATABASE_CLIENT', 'sqlite'); + const client = env('DATABASE_CLIENT', 'sqlite'); - const connections = { - mysql: { - connection: { - host: env('DATABASE_HOST', 'localhost'), - port: env.int('DATABASE_PORT', 3306), - database: env('DATABASE_NAME', 'strapi'), - user: env('DATABASE_USERNAME', 'strapi'), - password: env('DATABASE_PASSWORD', 'strapi'), - ssl: env.bool('DATABASE_SSL', false) && { - key: env('DATABASE_SSL_KEY', undefined), - cert: env('DATABASE_SSL_CERT', undefined), - ca: env('DATABASE_SSL_CA', undefined), - capath: env('DATABASE_SSL_CAPATH', undefined), - cipher: env('DATABASE_SSL_CIPHER', undefined), - rejectUnauthorized: env.bool('DATABASE_SSL_REJECT_UNAUTHORIZED', true) - } - }, - pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) } - }, - postgres: { - connection: { - connectionString: env('DATABASE_URL'), - host: env('DATABASE_HOST', 'localhost'), - port: env.int('DATABASE_PORT', 5432), - database: env('DATABASE_NAME', 'strapi'), - user: env('DATABASE_USERNAME', 'strapi'), - password: env('DATABASE_PASSWORD', 'strapi'), - ssl: env.bool('DATABASE_SSL', false) && { - key: env('DATABASE_SSL_KEY', undefined), - cert: env('DATABASE_SSL_CERT', undefined), - ca: env('DATABASE_SSL_CA', undefined), - capath: env('DATABASE_SSL_CAPATH', undefined), - cipher: env('DATABASE_SSL_CIPHER', undefined), - rejectUnauthorized: env.bool('DATABASE_SSL_REJECT_UNAUTHORIZED', true) - }, - schema: env('DATABASE_SCHEMA', 'public') - }, - pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) } - }, - sqlite: { - connection: { - filename: path.join(__dirname, '..', '..', env('DATABASE_FILENAME', '.tmp/data.db')) - }, - useNullAsDefault: true - } - }; + const connections = { + mysql: { + connection: { + host: env('DATABASE_HOST', 'localhost'), + port: env.int('DATABASE_PORT', 3306), + database: env('DATABASE_NAME', 'strapi'), + user: env('DATABASE_USERNAME', 'strapi'), + password: env('DATABASE_PASSWORD', 'strapi'), + ssl: env.bool('DATABASE_SSL', false) && { + key: env('DATABASE_SSL_KEY', undefined), + cert: env('DATABASE_SSL_CERT', undefined), + ca: env('DATABASE_SSL_CA', undefined), + capath: env('DATABASE_SSL_CAPATH', undefined), + cipher: env('DATABASE_SSL_CIPHER', undefined), + rejectUnauthorized: env.bool('DATABASE_SSL_REJECT_UNAUTHORIZED', true), + }, + }, + pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) }, + }, + postgres: { + connection: { + connectionString: env('DATABASE_URL'), + host: env('DATABASE_HOST', 'localhost'), + port: env.int('DATABASE_PORT', 5432), + database: env('DATABASE_NAME', 'strapi'), + user: env('DATABASE_USERNAME', 'strapi'), + password: env('DATABASE_PASSWORD', 'strapi'), + ssl: env.bool('DATABASE_SSL', false) && { + key: env('DATABASE_SSL_KEY', undefined), + cert: env('DATABASE_SSL_CERT', undefined), + ca: env('DATABASE_SSL_CA', undefined), + capath: env('DATABASE_SSL_CAPATH', undefined), + cipher: env('DATABASE_SSL_CIPHER', undefined), + rejectUnauthorized: env.bool('DATABASE_SSL_REJECT_UNAUTHORIZED', true), + }, + schema: env('DATABASE_SCHEMA', 'public'), + }, + pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) }, + }, + sqlite: { + connection: { + filename: path.join(__dirname, '..', '..', env('DATABASE_FILENAME', '.tmp/data.db')), + }, + useNullAsDefault: true, + }, + }; - return { - connection: { - client, - ...connections[client], - acquireConnectionTimeout: env.int('DATABASE_CONNECTION_TIMEOUT', 60000) - } - }; + return { + connection: { + client, + ...connections[client], + acquireConnectionTimeout: env.int('DATABASE_CONNECTION_TIMEOUT', 60000), + }, + }; }; diff --git a/strapi/config/middlewares.ts b/strapi/config/middlewares.ts index 6daac98..829f5c0 100644 --- a/strapi/config/middlewares.ts +++ b/strapi/config/middlewares.ts @@ -1,12 +1,12 @@ export default [ - 'strapi::logger', - 'strapi::errors', - 'strapi::security', - 'strapi::cors', - 'strapi::poweredBy', - 'strapi::query', - 'strapi::body', - 'strapi::session', - 'strapi::favicon', - 'strapi::public' + 'strapi::logger', + 'strapi::errors', + 'strapi::security', + 'strapi::cors', + 'strapi::poweredBy', + 'strapi::query', + 'strapi::body', + 'strapi::session', + 'strapi::favicon', + 'strapi::public', ]; diff --git a/strapi/config/server.ts b/strapi/config/server.ts index 1702e99..31c8997 100644 --- a/strapi/config/server.ts +++ b/strapi/config/server.ts @@ -1,7 +1,7 @@ export default ({ env }) => ({ - host: env('HOST', '0.0.0.0'), - port: env.int('PORT', 1337), - app: { - keys: env.array('APP_KEYS') - } + host: env('HOST', '0.0.0.0'), + port: env.int('PORT', 1337), + app: { + keys: env.array('APP_KEYS'), + }, }); diff --git a/strapi/src/admin/app.example.tsx b/strapi/src/admin/app.example.tsx index 42f7b8c..3ea4d91 100644 --- a/strapi/src/admin/app.example.tsx +++ b/strapi/src/admin/app.example.tsx @@ -1,37 +1,37 @@ import type { StrapiApp } from '@strapi/strapi/admin'; export default { - config: { - locales: [ - // 'ar', - // 'fr', - // 'cs', - // 'de', - // 'dk', - // 'es', - // 'he', - // 'id', - // 'it', - // 'ja', - // 'ko', - // 'ms', - // 'nl', - // 'no', - // 'pl', - // 'pt-BR', - // 'pt', - // 'ru', - // 'sk', - // 'sv', - // 'th', - // 'tr', - // 'uk', - // 'vi', - // 'zh-Hans', - // 'zh', - ] - }, - bootstrap(app: StrapiApp) { - console.log(app); - } + config: { + locales: [ + // 'ar', + // 'fr', + // 'cs', + // 'de', + // 'dk', + // 'es', + // 'he', + // 'id', + // 'it', + // 'ja', + // 'ko', + // 'ms', + // 'nl', + // 'no', + // 'pl', + // 'pt-BR', + // 'pt', + // 'ru', + // 'sk', + // 'sv', + // 'th', + // 'tr', + // 'uk', + // 'vi', + // 'zh-Hans', + // 'zh', + ], + }, + bootstrap(app: StrapiApp) { + console.log(app); + }, }; diff --git a/strapi/src/admin/tsconfig.json b/strapi/src/admin/tsconfig.json index 0b49864..083046e 100644 --- a/strapi/src/admin/tsconfig.json +++ b/strapi/src/admin/tsconfig.json @@ -1,20 +1,20 @@ { - "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "Bundler", - "useDefineForClassFields": true, - "lib": ["DOM", "DOM.Iterable", "ESNext"], - "allowJs": false, - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "noEmit": true, - "jsx": "react-jsx" - }, - "include": ["../plugins/**/admin/src/**/*", "./"], - "exclude": ["node_modules/", "build/", "dist/", "**/*.test.ts"] + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "Bundler", + "useDefineForClassFields": true, + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "allowJs": false, + "skipLibCheck": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "noEmit": true, + "jsx": "react-jsx" + }, + "include": ["../plugins/**/admin/src/**/*", "./"], + "exclude": ["node_modules/", "build/", "dist/", "**/*.test.ts"] } diff --git a/strapi/src/admin/vite.config.example.ts b/strapi/src/admin/vite.config.example.ts index 288d1fa..85f6982 100644 --- a/strapi/src/admin/vite.config.example.ts +++ b/strapi/src/admin/vite.config.example.ts @@ -1,12 +1,12 @@ import { mergeConfig, type UserConfig } from 'vite'; export default (config: UserConfig) => { - // Important: always return the modified config - return mergeConfig(config, { - resolve: { - alias: { - '@': '/src' - } - } - }); + // Important: always return the modified config + return mergeConfig(config, { + resolve: { + alias: { + '@': '/src', + }, + }, + }); }; diff --git a/strapi/src/components/shared/media.json b/strapi/src/components/shared/media.json index 887a2e9..f8e9454 100644 --- a/strapi/src/components/shared/media.json +++ b/strapi/src/components/shared/media.json @@ -1,15 +1,15 @@ { - "collectionName": "components_shared_media", - "info": { - "displayName": "Media", - "icon": "file-video" - }, - "options": {}, - "attributes": { - "file": { - "allowedTypes": ["images", "files", "videos"], - "type": "media", - "multiple": false - } - } + "collectionName": "components_shared_media", + "info": { + "displayName": "Media", + "icon": "file-video" + }, + "options": {}, + "attributes": { + "file": { + "allowedTypes": ["images", "files", "videos"], + "type": "media", + "multiple": false + } + } } diff --git a/strapi/src/components/shared/quote.json b/strapi/src/components/shared/quote.json index b2d3ba2..b9ae1ae 100644 --- a/strapi/src/components/shared/quote.json +++ b/strapi/src/components/shared/quote.json @@ -1,16 +1,16 @@ { - "collectionName": "components_shared_quotes", - "info": { - "displayName": "Quote", - "icon": "indent" - }, - "options": {}, - "attributes": { - "title": { - "type": "string" - }, - "body": { - "type": "text" - } - } + "collectionName": "components_shared_quotes", + "info": { + "displayName": "Quote", + "icon": "indent" + }, + "options": {}, + "attributes": { + "title": { + "type": "string" + }, + "body": { + "type": "text" + } + } } diff --git a/strapi/src/components/shared/rich-text.json b/strapi/src/components/shared/rich-text.json index 8cf8241..faa0ed9 100644 --- a/strapi/src/components/shared/rich-text.json +++ b/strapi/src/components/shared/rich-text.json @@ -1,14 +1,14 @@ { - "collectionName": "components_shared_rich_texts", - "info": { - "displayName": "Rich text", - "icon": "align-justify", - "description": "" - }, - "options": {}, - "attributes": { - "body": { - "type": "richtext" - } - } + "collectionName": "components_shared_rich_texts", + "info": { + "displayName": "Rich text", + "icon": "align-justify", + "description": "" + }, + "options": {}, + "attributes": { + "body": { + "type": "richtext" + } + } } diff --git a/strapi/src/components/shared/seo.json b/strapi/src/components/shared/seo.json index 8bd4306..ff2b353 100644 --- a/strapi/src/components/shared/seo.json +++ b/strapi/src/components/shared/seo.json @@ -1,26 +1,26 @@ { - "collectionName": "components_shared_seos", - "info": { - "name": "Seo", - "icon": "allergies", - "displayName": "Seo", - "description": "" - }, - "options": {}, - "attributes": { - "metaTitle": { - "type": "string", - "required": true - }, - "metaDescription": { - "type": "text", - "required": true - }, - "shareImage": { - "type": "media", - "multiple": false, - "required": false, - "allowedTypes": ["images"] - } - } + "collectionName": "components_shared_seos", + "info": { + "name": "Seo", + "icon": "allergies", + "displayName": "Seo", + "description": "" + }, + "options": {}, + "attributes": { + "metaTitle": { + "type": "string", + "required": true + }, + "metaDescription": { + "type": "text", + "required": true + }, + "shareImage": { + "type": "media", + "multiple": false, + "required": false, + "allowedTypes": ["images"] + } + } } diff --git a/strapi/src/index.ts b/strapi/src/index.ts index f73e5d8..58be268 100644 --- a/strapi/src/index.ts +++ b/strapi/src/index.ts @@ -1,20 +1,20 @@ // import type { Core } from '@strapi/strapi'; export default { - /** - * An asynchronous register function that runs before - * your application is initialized. - * - * This gives you an opportunity to extend code. - */ - register(/* { strapi }: { strapi: Core.Strapi } */) {}, + /** + * An asynchronous register function that runs before + * your application is initialized. + * + * This gives you an opportunity to extend code. + */ + register(/* { strapi }: { strapi: Core.Strapi } */) {}, - /** - * An asynchronous bootstrap function that runs before - * your application gets started. - * - * This gives you an opportunity to set up your data model, - * run jobs, or perform some special logic. - */ - bootstrap(/* { strapi }: { strapi: Core.Strapi } */) {} + /** + * An asynchronous bootstrap function that runs before + * your application gets started. + * + * This gives you an opportunity to set up your data model, + * run jobs, or perform some special logic. + */ + bootstrap(/* { strapi }: { strapi: Core.Strapi } */) {}, }; diff --git a/strapi/tsconfig.json b/strapi/tsconfig.json index b3b07fe..b9fa686 100644 --- a/strapi/tsconfig.json +++ b/strapi/tsconfig.json @@ -1,43 +1,43 @@ { - "compilerOptions": { - "module": "CommonJS", - "moduleResolution": "Node", - "lib": ["ES2020"], - "target": "ES2019", - "strict": false, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "incremental": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "noEmitOnError": true, - "noImplicitThis": true, - "outDir": "dist", - "rootDir": "." - }, - "include": [ - // Include root files - "./", - // Include all ts files - "./**/*.ts", - // Include all js files - "./**/*.js", - // Force the JSON files in the src folder to be included - "src/**/*.json" - ], + "compilerOptions": { + "module": "CommonJS", + "moduleResolution": "Node", + "lib": ["ES2020"], + "target": "ES2019", + "strict": false, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "incremental": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "noEmitOnError": true, + "noImplicitThis": true, + "outDir": "dist", + "rootDir": "." + }, + "include": [ + // Include root files + "./", + // Include all ts files + "./**/*.ts", + // Include all js files + "./**/*.js", + // Force the JSON files in the src folder to be included + "src/**/*.json" + ], - "exclude": [ - "node_modules/", - "build/", - "dist/", - ".cache/", - ".tmp/", + "exclude": [ + "node_modules/", + "build/", + "dist/", + ".cache/", + ".tmp/", - // Do not include admin files in the server compilation - "src/admin/", - // Do not include test files - "**/*.test.*", - // Do not include plugins in the server compilation - "src/plugins/**" - ] + // Do not include admin files in the server compilation + "src/admin/", + // Do not include test files + "**/*.test.*", + // Do not include plugins in the server compilation + "src/plugins/**" + ] }