Compare commits

...

2 commits

Author SHA1 Message Date
Benjamin Palko
0af62a9f3a format
Some checks failed
PR Gate / Checks (pull_request) Failing after 44s
2025-05-03 23:29:10 -04:00
Benjamin Palko
5a8213c196 add workspace 2025-05-03 23:28:58 -04:00
16 changed files with 269 additions and 266 deletions

View file

@ -5,6 +5,7 @@ yarn.lock
# Dont even try lol # Dont even try lol
.svelte-kit .svelte-kit
dist
build build
node_modules node_modules

View file

@ -3,7 +3,9 @@
"private": true, "private": true,
"version": "0.0.1", "version": "0.0.1",
"type": "module", "type": "module",
"workspaces": ["strapi"], "workspaces": [
"strapi"
],
"scripts": { "scripts": {
"dev": "vite dev", "dev": "vite dev",
"compose:up": "docker compose --env-file .env -p strapi -f devops/docker-compose.dev.yml up -d ", "compose:up": "docker compose --env-file .env -p strapi -f devops/docker-compose.dev.yml up -d ",

View file

@ -1,17 +1,17 @@
export default ({ env }) => ({ export default ({ env }) => ({
auth: { auth: {
secret: env('ADMIN_JWT_SECRET'), secret: env('ADMIN_JWT_SECRET')
}, },
apiToken: { apiToken: {
salt: env('API_TOKEN_SALT'), salt: env('API_TOKEN_SALT')
}, },
transfer: { transfer: {
token: { token: {
salt: env('TRANSFER_TOKEN_SALT'), salt: env('TRANSFER_TOKEN_SALT')
}, }
}, },
flags: { flags: {
nps: env.bool('FLAG_NPS', true), nps: env.bool('FLAG_NPS', true),
promoteEE: env.bool('FLAG_PROMOTE_EE', true), promoteEE: env.bool('FLAG_PROMOTE_EE', true)
}, }
}); });

View file

@ -1,7 +1,7 @@
export default { export default {
rest: { rest: {
defaultLimit: 25, defaultLimit: 25,
maxLimit: 100, maxLimit: 100,
withCount: true, withCount: true
}, }
}; };

View file

@ -1,60 +1,60 @@
import path from 'path'; import path from 'path';
export default ({ env }) => { export default ({ env }) => {
const client = env('DATABASE_CLIENT', 'sqlite'); const client = env('DATABASE_CLIENT', 'sqlite');
const connections = { const connections = {
mysql: { mysql: {
connection: { connection: {
host: env('DATABASE_HOST', 'localhost'), host: env('DATABASE_HOST', 'localhost'),
port: env.int('DATABASE_PORT', 3306), port: env.int('DATABASE_PORT', 3306),
database: env('DATABASE_NAME', 'strapi'), database: env('DATABASE_NAME', 'strapi'),
user: env('DATABASE_USERNAME', 'strapi'), user: env('DATABASE_USERNAME', 'strapi'),
password: env('DATABASE_PASSWORD', 'strapi'), password: env('DATABASE_PASSWORD', 'strapi'),
ssl: env.bool('DATABASE_SSL', false) && { ssl: env.bool('DATABASE_SSL', false) && {
key: env('DATABASE_SSL_KEY', undefined), key: env('DATABASE_SSL_KEY', undefined),
cert: env('DATABASE_SSL_CERT', undefined), cert: env('DATABASE_SSL_CERT', undefined),
ca: env('DATABASE_SSL_CA', undefined), ca: env('DATABASE_SSL_CA', undefined),
capath: env('DATABASE_SSL_CAPATH', undefined), capath: env('DATABASE_SSL_CAPATH', undefined),
cipher: env('DATABASE_SSL_CIPHER', undefined), cipher: env('DATABASE_SSL_CIPHER', undefined),
rejectUnauthorized: env.bool('DATABASE_SSL_REJECT_UNAUTHORIZED', true), rejectUnauthorized: env.bool('DATABASE_SSL_REJECT_UNAUTHORIZED', true)
}, }
}, },
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) }, pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) }
}, },
postgres: { postgres: {
connection: { connection: {
connectionString: env('DATABASE_URL'), connectionString: env('DATABASE_URL'),
host: env('DATABASE_HOST', 'localhost'), host: env('DATABASE_HOST', 'localhost'),
port: env.int('DATABASE_PORT', 5432), port: env.int('DATABASE_PORT', 5432),
database: env('DATABASE_NAME', 'strapi'), database: env('DATABASE_NAME', 'strapi'),
user: env('DATABASE_USERNAME', 'strapi'), user: env('DATABASE_USERNAME', 'strapi'),
password: env('DATABASE_PASSWORD', 'strapi'), password: env('DATABASE_PASSWORD', 'strapi'),
ssl: env.bool('DATABASE_SSL', false) && { ssl: env.bool('DATABASE_SSL', false) && {
key: env('DATABASE_SSL_KEY', undefined), key: env('DATABASE_SSL_KEY', undefined),
cert: env('DATABASE_SSL_CERT', undefined), cert: env('DATABASE_SSL_CERT', undefined),
ca: env('DATABASE_SSL_CA', undefined), ca: env('DATABASE_SSL_CA', undefined),
capath: env('DATABASE_SSL_CAPATH', undefined), capath: env('DATABASE_SSL_CAPATH', undefined),
cipher: env('DATABASE_SSL_CIPHER', undefined), cipher: env('DATABASE_SSL_CIPHER', undefined),
rejectUnauthorized: env.bool('DATABASE_SSL_REJECT_UNAUTHORIZED', true), rejectUnauthorized: env.bool('DATABASE_SSL_REJECT_UNAUTHORIZED', true)
}, },
schema: env('DATABASE_SCHEMA', 'public'), schema: env('DATABASE_SCHEMA', 'public')
}, },
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) }, pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) }
}, },
sqlite: { sqlite: {
connection: { connection: {
filename: path.join(__dirname, '..', '..', env('DATABASE_FILENAME', '.tmp/data.db')), filename: path.join(__dirname, '..', '..', env('DATABASE_FILENAME', '.tmp/data.db'))
}, },
useNullAsDefault: true, useNullAsDefault: true
}, }
}; };
return { return {
connection: { connection: {
client, client,
...connections[client], ...connections[client],
acquireConnectionTimeout: env.int('DATABASE_CONNECTION_TIMEOUT', 60000), acquireConnectionTimeout: env.int('DATABASE_CONNECTION_TIMEOUT', 60000)
}, }
}; };
}; };

View file

@ -1,12 +1,12 @@
export default [ export default [
'strapi::logger', 'strapi::logger',
'strapi::errors', 'strapi::errors',
'strapi::security', 'strapi::security',
'strapi::cors', 'strapi::cors',
'strapi::poweredBy', 'strapi::poweredBy',
'strapi::query', 'strapi::query',
'strapi::body', 'strapi::body',
'strapi::session', 'strapi::session',
'strapi::favicon', 'strapi::favicon',
'strapi::public', 'strapi::public'
]; ];

View file

@ -1,7 +1,7 @@
export default ({ env }) => ({ export default ({ env }) => ({
host: env('HOST', '0.0.0.0'), host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337), port: env.int('PORT', 1337),
app: { app: {
keys: env.array('APP_KEYS'), keys: env.array('APP_KEYS')
}, }
}); });

View file

@ -1,37 +1,37 @@
import type { StrapiApp } from '@strapi/strapi/admin'; import type { StrapiApp } from '@strapi/strapi/admin';
export default { export default {
config: { config: {
locales: [ locales: [
// 'ar', // 'ar',
// 'fr', // 'fr',
// 'cs', // 'cs',
// 'de', // 'de',
// 'dk', // 'dk',
// 'es', // 'es',
// 'he', // 'he',
// 'id', // 'id',
// 'it', // 'it',
// 'ja', // 'ja',
// 'ko', // 'ko',
// 'ms', // 'ms',
// 'nl', // 'nl',
// 'no', // 'no',
// 'pl', // 'pl',
// 'pt-BR', // 'pt-BR',
// 'pt', // 'pt',
// 'ru', // 'ru',
// 'sk', // 'sk',
// 'sv', // 'sv',
// 'th', // 'th',
// 'tr', // 'tr',
// 'uk', // 'uk',
// 'vi', // 'vi',
// 'zh-Hans', // 'zh-Hans',
// 'zh', // 'zh',
], ]
}, },
bootstrap(app: StrapiApp) { bootstrap(app: StrapiApp) {
console.log(app); console.log(app);
}, }
}; };

View file

@ -1,20 +1,20 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ESNext", "target": "ESNext",
"module": "ESNext", "module": "ESNext",
"moduleResolution": "Bundler", "moduleResolution": "Bundler",
"useDefineForClassFields": true, "useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"], "lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false, "allowJs": false,
"skipLibCheck": true, "skipLibCheck": true,
"esModuleInterop": true, "esModuleInterop": true,
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"strict": true, "strict": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"noEmit": true, "noEmit": true,
"jsx": "react-jsx" "jsx": "react-jsx"
}, },
"include": ["../plugins/**/admin/src/**/*", "./"], "include": ["../plugins/**/admin/src/**/*", "./"],
"exclude": ["node_modules/", "build/", "dist/", "**/*.test.ts"] "exclude": ["node_modules/", "build/", "dist/", "**/*.test.ts"]
} }

View file

@ -1,12 +1,12 @@
import { mergeConfig, type UserConfig } from 'vite'; import { mergeConfig, type UserConfig } from 'vite';
export default (config: UserConfig) => { export default (config: UserConfig) => {
// Important: always return the modified config // Important: always return the modified config
return mergeConfig(config, { return mergeConfig(config, {
resolve: { resolve: {
alias: { alias: {
'@': '/src', '@': '/src'
}, }
}, }
}); });
}; };

View file

@ -1,15 +1,15 @@
{ {
"collectionName": "components_shared_media", "collectionName": "components_shared_media",
"info": { "info": {
"displayName": "Media", "displayName": "Media",
"icon": "file-video" "icon": "file-video"
}, },
"options": {}, "options": {},
"attributes": { "attributes": {
"file": { "file": {
"allowedTypes": ["images", "files", "videos"], "allowedTypes": ["images", "files", "videos"],
"type": "media", "type": "media",
"multiple": false "multiple": false
} }
} }
} }

View file

@ -1,16 +1,16 @@
{ {
"collectionName": "components_shared_quotes", "collectionName": "components_shared_quotes",
"info": { "info": {
"displayName": "Quote", "displayName": "Quote",
"icon": "indent" "icon": "indent"
}, },
"options": {}, "options": {},
"attributes": { "attributes": {
"title": { "title": {
"type": "string" "type": "string"
}, },
"body": { "body": {
"type": "text" "type": "text"
} }
} }
} }

View file

@ -1,14 +1,14 @@
{ {
"collectionName": "components_shared_rich_texts", "collectionName": "components_shared_rich_texts",
"info": { "info": {
"displayName": "Rich text", "displayName": "Rich text",
"icon": "align-justify", "icon": "align-justify",
"description": "" "description": ""
}, },
"options": {}, "options": {},
"attributes": { "attributes": {
"body": { "body": {
"type": "richtext" "type": "richtext"
} }
} }
} }

View file

@ -1,26 +1,26 @@
{ {
"collectionName": "components_shared_seos", "collectionName": "components_shared_seos",
"info": { "info": {
"name": "Seo", "name": "Seo",
"icon": "allergies", "icon": "allergies",
"displayName": "Seo", "displayName": "Seo",
"description": "" "description": ""
}, },
"options": {}, "options": {},
"attributes": { "attributes": {
"metaTitle": { "metaTitle": {
"type": "string", "type": "string",
"required": true "required": true
}, },
"metaDescription": { "metaDescription": {
"type": "text", "type": "text",
"required": true "required": true
}, },
"shareImage": { "shareImage": {
"type": "media", "type": "media",
"multiple": false, "multiple": false,
"required": false, "required": false,
"allowedTypes": ["images"] "allowedTypes": ["images"]
} }
} }
} }

View file

@ -1,20 +1,20 @@
// import type { Core } from '@strapi/strapi'; // import type { Core } from '@strapi/strapi';
export default { export default {
/** /**
* An asynchronous register function that runs before * An asynchronous register function that runs before
* your application is initialized. * your application is initialized.
* *
* This gives you an opportunity to extend code. * This gives you an opportunity to extend code.
*/ */
register(/* { strapi }: { strapi: Core.Strapi } */) {}, register(/* { strapi }: { strapi: Core.Strapi } */) {},
/** /**
* An asynchronous bootstrap function that runs before * An asynchronous bootstrap function that runs before
* your application gets started. * your application gets started.
* *
* This gives you an opportunity to set up your data model, * This gives you an opportunity to set up your data model,
* run jobs, or perform some special logic. * run jobs, or perform some special logic.
*/ */
bootstrap(/* { strapi }: { strapi: Core.Strapi } */) {}, bootstrap(/* { strapi }: { strapi: Core.Strapi } */) {}
}; };

View file

@ -1,43 +1,43 @@
{ {
"compilerOptions": { "compilerOptions": {
"module": "CommonJS", "module": "CommonJS",
"moduleResolution": "Node", "moduleResolution": "Node",
"lib": ["ES2020"], "lib": ["ES2020"],
"target": "ES2019", "target": "ES2019",
"strict": false, "strict": false,
"skipLibCheck": true, "skipLibCheck": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"incremental": true, "incremental": true,
"esModuleInterop": true, "esModuleInterop": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"noEmitOnError": true, "noEmitOnError": true,
"noImplicitThis": true, "noImplicitThis": true,
"outDir": "dist", "outDir": "dist",
"rootDir": "." "rootDir": "."
}, },
"include": [ "include": [
// Include root files // Include root files
"./", "./",
// Include all ts files // Include all ts files
"./**/*.ts", "./**/*.ts",
// Include all js files // Include all js files
"./**/*.js", "./**/*.js",
// Force the JSON files in the src folder to be included // Force the JSON files in the src folder to be included
"src/**/*.json" "src/**/*.json"
], ],
"exclude": [ "exclude": [
"node_modules/", "node_modules/",
"build/", "build/",
"dist/", "dist/",
".cache/", ".cache/",
".tmp/", ".tmp/",
// Do not include admin files in the server compilation // Do not include admin files in the server compilation
"src/admin/", "src/admin/",
// Do not include test files // Do not include test files
"**/*.test.*", "**/*.test.*",
// Do not include plugins in the server compilation // Do not include plugins in the server compilation
"src/plugins/**" "src/plugins/**"
] ]
} }