style: normalize frontend formatting and line endings
Lint / Lint (push) Successful in 1m2s
Security / Secrets (gitleaks) (push) Successful in 1m15s
Security / Dependencies (Trivy) (push) Successful in 1m14s
Security / Code (Semgrep) (push) Successful in 2m6s
Tests / Dashboard checks (push) Failing after 1m10s
Tests / Go backend (push) Successful in 3m14s
Docker / Docker Build & Push (push) Successful in 9m55s
Lint / Lint (push) Successful in 1m2s
Security / Secrets (gitleaks) (push) Successful in 1m15s
Security / Dependencies (Trivy) (push) Successful in 1m14s
Security / Code (Semgrep) (push) Successful in 2m6s
Tests / Dashboard checks (push) Failing after 1m10s
Tests / Go backend (push) Successful in 3m14s
Docker / Docker Build & Push (push) Successful in 9m55s
This commit is contained in:
1 parent
cf468ed833
commit
a8b79ffd1b
5 files changed
+186
-194
No files matched your search
+47
-47
@@ -1,35 +1,35 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
import adapter from '@sveltejs/adapter-static';
|
||||
|
||||
// Real installed frontend dependency versions for the About page, resolved from
|
||||
// node_modules (not the package.json semver range) so it can't drift from what's bundled.
|
||||
const FRONTEND_TECH_STACK_PACKAGES = [
|
||||
{ name: 'Svelte', pkg: 'svelte' },
|
||||
{ name: 'SvelteKit', pkg: '@sveltejs/kit' },
|
||||
{ name: 'TanStack Query', pkg: '@tanstack/svelte-query' },
|
||||
{ name: 'Tailwind CSS', pkg: 'tailwindcss' },
|
||||
{ name: 'Vite', pkg: 'vite' },
|
||||
];
|
||||
|
||||
function readInstalledVersion(pkg) {
|
||||
try {
|
||||
const pkgJsonPath = path.resolve(import.meta.dirname, 'node_modules', pkg, 'package.json');
|
||||
return JSON.parse(fs.readFileSync(pkgJsonPath, 'utf-8')).version ?? null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
const frontendTechStack = FRONTEND_TECH_STACK_PACKAGES.flatMap(({ name, pkg }) => {
|
||||
const version = readInstalledVersion(pkg);
|
||||
return version ? [{ name, version }] : [];
|
||||
});
|
||||
|
||||
export default defineConfig({
|
||||
|
||||
// Real installed frontend dependency versions for the About page, resolved from
|
||||
// node_modules (not the package.json semver range) so it can't drift from what's bundled.
|
||||
const FRONTEND_TECH_STACK_PACKAGES = [
|
||||
{ name: 'Svelte', pkg: 'svelte' },
|
||||
{ name: 'SvelteKit', pkg: '@sveltejs/kit' },
|
||||
{ name: 'TanStack Query', pkg: '@tanstack/svelte-query' },
|
||||
{ name: 'Tailwind CSS', pkg: 'tailwindcss' },
|
||||
{ name: 'Vite', pkg: 'vite' },
|
||||
];
|
||||
|
||||
function readInstalledVersion(pkg) {
|
||||
try {
|
||||
const pkgJsonPath = path.resolve(import.meta.dirname, 'node_modules', pkg, 'package.json');
|
||||
return JSON.parse(fs.readFileSync(pkgJsonPath, 'utf-8')).version ?? null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
const frontendTechStack = FRONTEND_TECH_STACK_PACKAGES.flatMap(({ name, pkg }) => {
|
||||
const version = readInstalledVersion(pkg);
|
||||
return version ? [{ name, version }] : [];
|
||||
});
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
tailwindcss(),
|
||||
sveltekit({
|
||||
@@ -41,19 +41,19 @@ export default defineConfig({
|
||||
fallback: 'index.html',
|
||||
}),
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
preserveSymlinks: true,
|
||||
},
|
||||
define: {
|
||||
__FRONTEND_TECH_STACK__: JSON.stringify(frontendTechStack),
|
||||
},
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
'/web': 'http://localhost:8080',
|
||||
'/health': 'http://localhost:8080',
|
||||
'/api': 'http://localhost:8080',
|
||||
},
|
||||
},
|
||||
});
|
||||
],
|
||||
resolve: {
|
||||
preserveSymlinks: true,
|
||||
},
|
||||
define: {
|
||||
__FRONTEND_TECH_STACK__: JSON.stringify(frontendTechStack),
|
||||
},
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
'/web': 'http://localhost:8080',
|
||||
'/health': 'http://localhost:8080',
|
||||
'/api': 'http://localhost:8080',
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user