diff --git a/.woodpecker/.ci.yml b/.woodpecker/.ci.yml index 1d23337a..660f6b22 100644 --- a/.woodpecker/.ci.yml +++ b/.woodpecker/.ci.yml @@ -1,46 +1,56 @@ when: - event: [push, pull_request] +# Volume mounts for caching npm and TypeScript across builds +variables: + - &node_volumes + - npm-cache:/root/.npm + - tsc-cache:/tmp/tsc-cache + steps: # =========================================== # PR VALIDATION: Parallel type checks (PRs only) # =========================================== typecheck-backend: image: code.cannabrands.app/creationshop/node:20 + volumes: *node_volumes commands: - cd backend - - npm ci --prefer-offline - - npx tsc --noEmit + - npm ci --prefer-offline --cache /root/.npm + - npx tsc --incremental --tsBuildInfoFile /tmp/tsc-cache/backend.tsbuildinfo --noEmit depends_on: [] when: event: pull_request typecheck-cannaiq: image: code.cannabrands.app/creationshop/node:20 + volumes: *node_volumes commands: - cd cannaiq - - npm ci --prefer-offline - - npx tsc --noEmit + - npm ci --prefer-offline --cache /root/.npm + - npx tsc --incremental --tsBuildInfoFile /tmp/tsc-cache/cannaiq.tsbuildinfo --noEmit depends_on: [] when: event: pull_request typecheck-findadispo: image: code.cannabrands.app/creationshop/node:20 + volumes: *node_volumes commands: - cd findadispo/frontend - - npm ci --prefer-offline - - npx tsc --noEmit 2>/dev/null || true + - npm ci --prefer-offline --cache /root/.npm + - npx tsc --incremental --tsBuildInfoFile /tmp/tsc-cache/findadispo.tsbuildinfo --noEmit 2>/dev/null || true depends_on: [] when: event: pull_request typecheck-findagram: image: code.cannabrands.app/creationshop/node:20 + volumes: *node_volumes commands: - cd findagram/frontend - - npm ci --prefer-offline - - npx tsc --noEmit 2>/dev/null || true + - npm ci --prefer-offline --cache /root/.npm + - npx tsc --incremental --tsBuildInfoFile /tmp/tsc-cache/findagram.tsbuildinfo --noEmit 2>/dev/null || true depends_on: [] when: event: pull_request diff --git a/backend/src/index.ts b/backend/src/index.ts index 4be0011e..89198438 100755 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -129,7 +129,6 @@ import { createStatesRouter } from './routes/states'; import { createAnalyticsV2Router } from './routes/analytics-v2'; import { createDiscoveryRoutes } from './discovery'; import pipelineRoutes from './routes/pipeline'; -import { getPool } from './db/pool'; // Consumer API routes (findadispo.com, findagram.co) import consumerAuthRoutes from './routes/consumer-auth'; diff --git a/cannaiq/src/lib/api.ts b/cannaiq/src/lib/api.ts index b96f7fd9..c1df5b10 100755 --- a/cannaiq/src/lib/api.ts +++ b/cannaiq/src/lib/api.ts @@ -69,6 +69,13 @@ class ApiClient { return { data }; } + async delete(endpoint: string): Promise<{ data: T }> { + const data = await this.request(endpoint, { + method: 'DELETE', + }); + return { data }; + } + // Auth async login(email: string, password: string) { return this.request<{ token: string; user: any }>('/api/auth/login', {