diff --git a/.devcontainer/build/devcontainer.json b/.devcontainer/build/devcontainer.json index 510791a..717cb37 100755 --- a/.devcontainer/build/devcontainer.json +++ b/.devcontainer/build/devcontainer.json @@ -34,13 +34,10 @@ "source": "${devcontainerId}-bashhistory", "target": "/commandhistory" } - ], "customizations": { "vscode": { - "extensions": [ - "ms-azuretools.vscode-docker" - ] + "extensions": ["ms-azuretools.vscode-docker"] } } } diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1cfe5a0..99ea84b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,10 +1,10 @@ { - "name": "Kredens Dev Environment", - "dockerComposeFile": "./docker-compose.devcontainer.yml", - "service": "dev", - "workspaceFolder": "/workspaces/kredens", - "remoteEnv": { - "COMPOSE_PROJECT_NAME": "kredens_devcontainer", - "COMPOSE_FILE": "${containerWorkspaceFolder}/.devcontainer/docker-compose.devcontainer.yml" - } -} \ No newline at end of file + "name": "Kredens Dev Environment", + "dockerComposeFile": "./docker-compose.devcontainer.yml", + "service": "dev", + "workspaceFolder": "/workspaces/kredens", + "remoteEnv": { + "COMPOSE_PROJECT_NAME": "kredens_devcontainer", + "COMPOSE_FILE": "${containerWorkspaceFolder}/.devcontainer/docker-compose.devcontainer.yml" + } +} diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..d018c28 --- /dev/null +++ b/biome.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", + "vcs": { + "enabled": false, + "clientKind": "git", + "useIgnoreFile": false + }, + "files": { + "ignoreUnknown": false, + "ignore": [".pnpm-store", ".svelte-kit"] + }, + "formatter": { + "enabled": true + }, + "organizeImports": { + "enabled": true + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + }, + "javascript": { + "formatter": { + "quoteStyle": "double" + } + } +} diff --git a/package.json b/package.json index 846138b..bdf5666 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "test": "npm run test:unit -- --run" }, "devDependencies": { + "@biomejs/biome": "1.9.4", "@sveltejs/adapter-auto": "^4.0.0", "@sveltejs/kit": "^2.16.0", "@sveltejs/vite-plugin-svelte": "^5.0.0", @@ -29,6 +30,7 @@ "vitest": "^3.0.0" }, "dependencies": { - "@devcontainers/cli": "^0.72.0" + "@devcontainers/cli": "^0.72.0", + "postgres": "^3.4.5" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 40a9ccc..f654f73 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,7 +11,13 @@ importers: '@devcontainers/cli': specifier: ^0.72.0 version: 0.72.0 + postgres: + specifier: ^3.4.5 + version: 3.4.5 devDependencies: + '@biomejs/biome': + specifier: 1.9.4 + version: 1.9.4 '@sveltejs/adapter-auto': specifier: ^4.0.0 version: 4.0.0(@sveltejs/kit@2.16.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.3)(vite@6.0.11))(svelte@5.19.3)(vite@6.0.11)) @@ -43,6 +49,59 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@biomejs/biome@1.9.4': + resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} + engines: {node: '>=14.21.3'} + hasBin: true + + '@biomejs/cli-darwin-arm64@1.9.4': + resolution: {integrity: sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [darwin] + + '@biomejs/cli-darwin-x64@1.9.4': + resolution: {integrity: sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [darwin] + + '@biomejs/cli-linux-arm64-musl@1.9.4': + resolution: {integrity: sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-arm64@1.9.4': + resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-x64-musl@1.9.4': + resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-linux-x64@1.9.4': + resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-win32-arm64@1.9.4': + resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [win32] + + '@biomejs/cli-win32-x64@1.9.4': + resolution: {integrity: sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [win32] + '@devcontainers/cli@0.72.0': resolution: {integrity: sha512-vDv33/I5POw1wDJmcMbOCTWd3xTk4bbVruJ9Qgr5eiLSl1OsfufN5WfeTZqgK1HeqrNqtH/xPyCKB2LXDNIv3w==} engines: {node: ^16.13.0 || >=18.0.0} @@ -527,6 +586,10 @@ packages: resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} engines: {node: ^10 || ^12 || >=14} + postgres@3.4.5: + resolution: {integrity: sha512-cDWgoah1Gez9rN3H4165peY9qfpEo+SA61oQv65O3cRUE1pOEoJWwddwcqKE8XZYjbblOJlYDlLV4h67HrEVDg==} + engines: {node: '>=12'} + readdirp@4.1.1: resolution: {integrity: sha512-h80JrZu/MHUZCyHu5ciuoI0+WxsCxzxJTILn6Fs8rxSnFPh+UVHYfeIxK1nVGugMqkfC4vJcBOYbkfkwYK0+gw==} engines: {node: '>= 14.18.0'} @@ -695,6 +758,41 @@ snapshots: '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 + '@biomejs/biome@1.9.4': + optionalDependencies: + '@biomejs/cli-darwin-arm64': 1.9.4 + '@biomejs/cli-darwin-x64': 1.9.4 + '@biomejs/cli-linux-arm64': 1.9.4 + '@biomejs/cli-linux-arm64-musl': 1.9.4 + '@biomejs/cli-linux-x64': 1.9.4 + '@biomejs/cli-linux-x64-musl': 1.9.4 + '@biomejs/cli-win32-arm64': 1.9.4 + '@biomejs/cli-win32-x64': 1.9.4 + + '@biomejs/cli-darwin-arm64@1.9.4': + optional: true + + '@biomejs/cli-darwin-x64@1.9.4': + optional: true + + '@biomejs/cli-linux-arm64-musl@1.9.4': + optional: true + + '@biomejs/cli-linux-arm64@1.9.4': + optional: true + + '@biomejs/cli-linux-x64-musl@1.9.4': + optional: true + + '@biomejs/cli-linux-x64@1.9.4': + optional: true + + '@biomejs/cli-win32-arm64@1.9.4': + optional: true + + '@biomejs/cli-win32-x64@1.9.4': + optional: true + '@devcontainers/cli@0.72.0': {} '@esbuild/aix-ppc64@0.24.2': @@ -1061,6 +1159,8 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + postgres@3.4.5: {} + readdirp@4.1.1: {} rollup@4.32.0: diff --git a/src/demo.spec.ts b/src/demo.spec.ts index e07cbbd..3c40f2c 100644 --- a/src/demo.spec.ts +++ b/src/demo.spec.ts @@ -1,7 +1,7 @@ -import { describe, it, expect } from 'vitest'; +import { describe, expect, it } from "vitest"; -describe('sum test', () => { - it('adds 1 + 2 to equal 3', () => { +describe("sum test", () => { + it("adds 1 + 2 to equal 3", () => { expect(1 + 2).toBe(3); }); }); diff --git a/src/lib/server/db.ts b/src/lib/server/db.ts new file mode 100644 index 0000000..9ebd077 --- /dev/null +++ b/src/lib/server/db.ts @@ -0,0 +1,3 @@ +import postgres from "postgres"; + +const sql = postgres({}); diff --git a/svelte.config.js b/svelte.config.js index 1295460..aa0ebf0 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,5 +1,5 @@ -import adapter from '@sveltejs/adapter-auto'; -import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; +import adapter from "@sveltejs/adapter-auto"; +import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; /** @type {import('@sveltejs/kit').Config} */ const config = { @@ -11,8 +11,8 @@ const config = { // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list. // If your environment is not supported, or you settled on a specific environment, switch out the adapter. // See https://svelte.dev/docs/kit/adapters for more information about adapters. - adapter: adapter() - } + adapter: adapter(), + }, }; export default config; diff --git a/vite.config.ts b/vite.config.ts index ac4dba0..751f380 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,10 +1,10 @@ +import { sveltekit } from "@sveltejs/kit/vite"; import { defineConfig } from "vitest/config"; -import { sveltekit } from '@sveltejs/kit/vite'; export default defineConfig({ - plugins: [sveltekit()], + plugins: [sveltekit()], - test: { - include: ['src/**/*.{test,spec}.{js,ts}'] - } + test: { + include: ["src/**/*.{test,spec}.{js,ts}"], + }, });