fix: Add generic delete method to ApiClient + CI speedups
- Add delete<T>() method to ApiClient for WorkersDashboard cleanup - Add npm cache volume for faster npm ci - Add TypeScript incremental builds with tsBuildInfoFile cache - Should significantly speed up repeated CI runs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,46 +1,56 @@
|
|||||||
when:
|
when:
|
||||||
- event: [push, pull_request]
|
- 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:
|
steps:
|
||||||
# ===========================================
|
# ===========================================
|
||||||
# PR VALIDATION: Parallel type checks (PRs only)
|
# PR VALIDATION: Parallel type checks (PRs only)
|
||||||
# ===========================================
|
# ===========================================
|
||||||
typecheck-backend:
|
typecheck-backend:
|
||||||
image: code.cannabrands.app/creationshop/node:20
|
image: code.cannabrands.app/creationshop/node:20
|
||||||
|
volumes: *node_volumes
|
||||||
commands:
|
commands:
|
||||||
- cd backend
|
- cd backend
|
||||||
- npm ci --prefer-offline
|
- npm ci --prefer-offline --cache /root/.npm
|
||||||
- npx tsc --noEmit
|
- npx tsc --incremental --tsBuildInfoFile /tmp/tsc-cache/backend.tsbuildinfo --noEmit
|
||||||
depends_on: []
|
depends_on: []
|
||||||
when:
|
when:
|
||||||
event: pull_request
|
event: pull_request
|
||||||
|
|
||||||
typecheck-cannaiq:
|
typecheck-cannaiq:
|
||||||
image: code.cannabrands.app/creationshop/node:20
|
image: code.cannabrands.app/creationshop/node:20
|
||||||
|
volumes: *node_volumes
|
||||||
commands:
|
commands:
|
||||||
- cd cannaiq
|
- cd cannaiq
|
||||||
- npm ci --prefer-offline
|
- npm ci --prefer-offline --cache /root/.npm
|
||||||
- npx tsc --noEmit
|
- npx tsc --incremental --tsBuildInfoFile /tmp/tsc-cache/cannaiq.tsbuildinfo --noEmit
|
||||||
depends_on: []
|
depends_on: []
|
||||||
when:
|
when:
|
||||||
event: pull_request
|
event: pull_request
|
||||||
|
|
||||||
typecheck-findadispo:
|
typecheck-findadispo:
|
||||||
image: code.cannabrands.app/creationshop/node:20
|
image: code.cannabrands.app/creationshop/node:20
|
||||||
|
volumes: *node_volumes
|
||||||
commands:
|
commands:
|
||||||
- cd findadispo/frontend
|
- cd findadispo/frontend
|
||||||
- npm ci --prefer-offline
|
- npm ci --prefer-offline --cache /root/.npm
|
||||||
- npx tsc --noEmit 2>/dev/null || true
|
- npx tsc --incremental --tsBuildInfoFile /tmp/tsc-cache/findadispo.tsbuildinfo --noEmit 2>/dev/null || true
|
||||||
depends_on: []
|
depends_on: []
|
||||||
when:
|
when:
|
||||||
event: pull_request
|
event: pull_request
|
||||||
|
|
||||||
typecheck-findagram:
|
typecheck-findagram:
|
||||||
image: code.cannabrands.app/creationshop/node:20
|
image: code.cannabrands.app/creationshop/node:20
|
||||||
|
volumes: *node_volumes
|
||||||
commands:
|
commands:
|
||||||
- cd findagram/frontend
|
- cd findagram/frontend
|
||||||
- npm ci --prefer-offline
|
- npm ci --prefer-offline --cache /root/.npm
|
||||||
- npx tsc --noEmit 2>/dev/null || true
|
- npx tsc --incremental --tsBuildInfoFile /tmp/tsc-cache/findagram.tsbuildinfo --noEmit 2>/dev/null || true
|
||||||
depends_on: []
|
depends_on: []
|
||||||
when:
|
when:
|
||||||
event: pull_request
|
event: pull_request
|
||||||
|
|||||||
@@ -129,7 +129,6 @@ import { createStatesRouter } from './routes/states';
|
|||||||
import { createAnalyticsV2Router } from './routes/analytics-v2';
|
import { createAnalyticsV2Router } from './routes/analytics-v2';
|
||||||
import { createDiscoveryRoutes } from './discovery';
|
import { createDiscoveryRoutes } from './discovery';
|
||||||
import pipelineRoutes from './routes/pipeline';
|
import pipelineRoutes from './routes/pipeline';
|
||||||
import { getPool } from './db/pool';
|
|
||||||
|
|
||||||
// Consumer API routes (findadispo.com, findagram.co)
|
// Consumer API routes (findadispo.com, findagram.co)
|
||||||
import consumerAuthRoutes from './routes/consumer-auth';
|
import consumerAuthRoutes from './routes/consumer-auth';
|
||||||
|
|||||||
@@ -69,6 +69,13 @@ class ApiClient {
|
|||||||
return { data };
|
return { data };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async delete<T = any>(endpoint: string): Promise<{ data: T }> {
|
||||||
|
const data = await this.request<T>(endpoint, {
|
||||||
|
method: 'DELETE',
|
||||||
|
});
|
||||||
|
return { data };
|
||||||
|
}
|
||||||
|
|
||||||
// Auth
|
// Auth
|
||||||
async login(email: string, password: string) {
|
async login(email: string, password: string) {
|
||||||
return this.request<{ token: string; user: any }>('/api/auth/login', {
|
return this.request<{ token: string; user: any }>('/api/auth/login', {
|
||||||
|
|||||||
Reference in New Issue
Block a user