Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Build connection package
run: npm -w connection run build
- name: Build connector-sdk + connection packages
run: npm -w connector-sdk run build && npm -w connection run build

- name: Type-check component
run: npm -w component exec tsc -- --noEmit
Expand Down Expand Up @@ -134,8 +134,8 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Build connection package
run: npm -w connection run build
- name: Build connector-sdk + connection packages
run: npm -w connector-sdk run build && npm -w connection run build

- name: Run all tests in parallel
run: |
Expand Down Expand Up @@ -238,8 +238,8 @@ jobs:
restore-keys: |
nextjs-${{ runner.os }}-

- name: Build connection package
run: npm -w connection run build
- name: Build connector-sdk + connection packages
run: npm -w connector-sdk run build && npm -w connection run build

- name: Build Next.js
working-directory: app
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ COPY package.json package-lock.json ./
# Copy child package manifests (npm needs these to resolve workspaces)
COPY app/package.json ./app/
COPY component/package.json ./component/
COPY connector-sdk/package.json ./connector-sdk/
COPY connection/package.json ./connection/
COPY cli/package.json ./cli/

Expand All @@ -35,7 +36,10 @@ COPY --from=deps /app/component/node_modules ./component/node_modules
# Copy all source
COPY . .

# Build connection package (TypeScript → JS+d.ts) before app
# Build connector-sdk → connection (TypeScript → JS+d.ts) before app.
# connection imports @neoboard/connector-sdk, which resolves to its built
# dist, so the SDK must be compiled first (mirrors the root build chain).
RUN npm -w connector-sdk run build
RUN npm -w connection run build
RUN cd app && npm run build

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CREATE TYPE "public"."connection_type" AS ENUM('neo4j', 'postgresql');--> statement-breakpoint
CREATE TYPE "public"."connection_visibility" AS ENUM('private', 'shared');--> statement-breakpoint
CREATE TYPE "public"."share_role" AS ENUM('viewer', 'editor');--> statement-breakpoint
CREATE TYPE "public"."sso_protocol" AS ENUM('oidc');--> statement-breakpoint
CREATE TYPE "public"."user_role" AS ENUM('admin', 'creator', 'reader');--> statement-breakpoint
CREATE TABLE "account" (
"userId" text NOT NULL,
Expand All @@ -20,20 +21,35 @@ CREATE TABLE "api_key" (
"userId" text NOT NULL,
"tenant_id" text DEFAULT 'default' NOT NULL,
"key_hash" text NOT NULL,
"key_prefix" text,
"name" text NOT NULL,
"last_used_at" timestamp,
"expires_at" timestamp,
"created_at" timestamp DEFAULT now(),
CONSTRAINT "api_key_key_hash_unique" UNIQUE("key_hash")
);
--> statement-breakpoint
CREATE TABLE "audit_log" (
"id" text PRIMARY KEY NOT NULL,
"tenant_id" text DEFAULT 'default' NOT NULL,
"user_id" text,
"action" text NOT NULL,
"resource_type" text,
"resource_id" text,
"details" jsonb,
"ip_address" text,
"created_at" timestamp DEFAULT now()
);
--> statement-breakpoint
CREATE TABLE "connection" (
"id" text PRIMARY KEY NOT NULL,
"userId" text NOT NULL,
"tenant_id" text DEFAULT 'default' NOT NULL,
"name" text NOT NULL,
"type" "connection_type" NOT NULL,
"type" text NOT NULL,
"configEncrypted" text NOT NULL,
"allow_per_card_db" boolean DEFAULT true NOT NULL,
"visibility" "connection_visibility" DEFAULT 'private' NOT NULL,
"createdAt" timestamp DEFAULT now(),
"updatedAt" timestamp DEFAULT now()
);
Expand All @@ -54,7 +70,7 @@ CREATE TABLE "dashboard" (
"name" text NOT NULL,
"description" text,
"layoutJson" jsonb DEFAULT '{"version":2,"pages":[{"id":"page-1","title":"Page 1","widgets":[],"gridLayout":[]}]}'::jsonb,
"thumbnailJson" jsonb,
"version" integer DEFAULT 1 NOT NULL,
"isPublic" boolean DEFAULT false,
"createdAt" timestamp DEFAULT now(),
"updatedAt" timestamp DEFAULT now(),
Expand All @@ -67,19 +83,41 @@ CREATE TABLE "session" (
"expires" timestamp NOT NULL
);
--> statement-breakpoint
CREATE TABLE "sso_provider" (
"id" text PRIMARY KEY NOT NULL,
"tenant_id" text DEFAULT 'default' NOT NULL,
"name" text NOT NULL,
"protocol" "sso_protocol" DEFAULT 'oidc' NOT NULL,
"issuer" text NOT NULL,
"client_id" text NOT NULL,
"client_secret_encrypted" text NOT NULL,
"scopes" text DEFAULT 'openid profile email' NOT NULL,
"claim_mappings" jsonb,
"auto_provision" boolean DEFAULT true NOT NULL,
"default_role" "user_role" DEFAULT 'creator' NOT NULL,
"enforce_sso" boolean DEFAULT false NOT NULL,
"enabled" boolean DEFAULT true NOT NULL,
"created_at" timestamp DEFAULT now(),
"updated_at" timestamp DEFAULT now(),
CONSTRAINT "sso_provider_tenant_issuer_unique" UNIQUE("tenant_id","issuer")
);
--> statement-breakpoint
CREATE TABLE "user" (
"id" text PRIMARY KEY NOT NULL,
"name" text,
"email" text,
"email" text NOT NULL,
"emailVerified" timestamp,
"image" text,
"passwordHash" text,
"role" "user_role" DEFAULT 'creator' NOT NULL,
"can_write" boolean DEFAULT true NOT NULL,
"force_password_change" boolean DEFAULT false NOT NULL,
"passwordChangedAt" timestamp,
"disabledAt" timestamp,
"lastLoginAt" timestamp,
"createdAt" timestamp DEFAULT now(),
CONSTRAINT "user_email_unique" UNIQUE("email")
"tenant_id" text DEFAULT 'default' NOT NULL,
CONSTRAINT "user_email_tenant_unique" UNIQUE("email","tenant_id")
);
--> statement-breakpoint
CREATE TABLE "verificationToken" (
Expand Down Expand Up @@ -108,6 +146,7 @@ CREATE TABLE "widget_template" (
--> statement-breakpoint
ALTER TABLE "account" ADD CONSTRAINT "account_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "api_key" ADD CONSTRAINT "api_key_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "audit_log" ADD CONSTRAINT "audit_log_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "connection" ADD CONSTRAINT "connection_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "dashboard_share" ADD CONSTRAINT "dashboard_share_dashboardId_dashboard_id_fk" FOREIGN KEY ("dashboardId") REFERENCES "public"."dashboard"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "dashboard_share" ADD CONSTRAINT "dashboard_share_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
Expand Down
1 change: 0 additions & 1 deletion app/drizzle/migrations/0001_rapid_iron_monger.sql

This file was deleted.

4 changes: 0 additions & 4 deletions app/drizzle/migrations/0002_redundant_night_nurse.sql

This file was deleted.

1 change: 0 additions & 1 deletion app/drizzle/migrations/0003_loving_centennial.sql

This file was deleted.

1 change: 0 additions & 1 deletion app/drizzle/migrations/0004_furry_scourge.sql

This file was deleted.

1 change: 0 additions & 1 deletion app/drizzle/migrations/0005_perfect_paibok.sql

This file was deleted.

19 changes: 0 additions & 19 deletions app/drizzle/migrations/0006_busy_champions.sql

This file was deleted.

13 changes: 0 additions & 13 deletions app/drizzle/migrations/0007_free_loners.sql

This file was deleted.

2 changes: 0 additions & 2 deletions app/drizzle/migrations/0008_lumpy_jubilee.sql

This file was deleted.

1 change: 0 additions & 1 deletion app/drizzle/migrations/0009_dazzling_stranger.sql

This file was deleted.

1 change: 0 additions & 1 deletion app/drizzle/migrations/0010_tiny_amphibian.sql

This file was deleted.

Loading
Loading