refactor(store): replace migrations with schemas and sanitize router inputs

This commit is contained in:
d34dscene
2026-02-04 22:14:12 +01:00
parent 071c4e4f2b
commit 127dccffb4
19 changed files with 128 additions and 1546 deletions
+2 -2
View File
@@ -145,8 +145,8 @@ require (
golang.org/x/text v0.33.0 // indirect
golang.org/x/time v0.14.0 // indirect
golang.org/x/tools v0.41.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260202165425-ce8ad4cf556b // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260202165425-ce8ad4cf556b // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260203192932-546029d2fa20 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260203192932-546029d2fa20 // indirect
google.golang.org/grpc v1.78.0 // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
+4
View File
@@ -366,8 +366,12 @@ gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/genproto/googleapis/api v0.0.0-20260202165425-ce8ad4cf556b h1:SGYyueaEovpqmWmtTvwtVgo638V/QFE2zlTCnRrR3jg=
google.golang.org/genproto/googleapis/api v0.0.0-20260202165425-ce8ad4cf556b/go.mod h1:ZdbssH/1SOVnjnDlXzxDHK2MCidiqXtbYccJNzNYPEE=
google.golang.org/genproto/googleapis/api v0.0.0-20260203192932-546029d2fa20 h1:7ei4lp52gK1uSejlA8AZl5AJjeLUOHBQscRQZUgAcu0=
google.golang.org/genproto/googleapis/api v0.0.0-20260203192932-546029d2fa20/go.mod h1:ZdbssH/1SOVnjnDlXzxDHK2MCidiqXtbYccJNzNYPEE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260202165425-ce8ad4cf556b h1:GZxXGdFaHX27ZSMHudWc4FokdD+xl8BC2UJm1OVIEzs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260202165425-ce8ad4cf556b/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260203192932-546029d2fa20 h1:Jr5R2J6F6qWyzINc+4AM8t5pfUz6beZpHp678GNrMbE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260203192932-546029d2fa20/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ=
google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc=
google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
+6
View File
@@ -8,6 +8,7 @@ import (
"github.com/mizuchilabs/mantrae/internal/config"
mantraev1 "github.com/mizuchilabs/mantrae/internal/gen/mantrae/v1"
"github.com/mizuchilabs/mantrae/internal/store/db"
"github.com/mizuchilabs/mantrae/internal/util"
"github.com/traefik/traefik/v3/pkg/config/dynamic"
)
@@ -146,6 +147,8 @@ func (s *HTTPRouterOps) Update(
if params.Config.Data.Service == "" {
params.Config.Data.Service = params.Name
}
params.Config.Data.EntryPoints = util.CleanSliceStr(params.Config.Data.EntryPoints)
params.Config.Data.Middlewares = util.CleanSliceStr(params.Config.Data.Middlewares)
// Update DNS Providers
existing, err := s.app.Conn.Q.GetDnsProvidersByHttpRouter(ctx, params.ID)
@@ -381,6 +384,8 @@ func (s *TCPRouterOps) Update(
if params.Config.Data.Service == "" {
params.Config.Data.Service = params.Name
}
params.Config.Data.EntryPoints = util.CleanSliceStr(params.Config.Data.EntryPoints)
params.Config.Data.Middlewares = util.CleanSliceStr(params.Config.Data.Middlewares)
// Update DNS Providers
existing, err := s.app.Conn.Q.GetDnsProvidersByTcpRouter(ctx, params.ID)
@@ -608,6 +613,7 @@ func (s *UDPRouterOps) Update(
if params.Config.Data.Service == "" {
params.Config.Data.Service = params.Name
}
params.Config.Data.EntryPoints = util.CleanSliceStr(params.Config.Data.EntryPoints)
result, err := s.app.Conn.Q.UpdateUdpRouter(ctx, params)
if err != nil {
-323
View File
@@ -1,323 +0,0 @@
-- +goose Up
CREATE TABLE "settings" (
key VARCHAR(255) PRIMARY KEY,
value TEXT NOT NULL,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE "agents" (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
hostname TEXT,
public_ip TEXT,
containers TEXT,
active_ip TEXT,
private_ip TEXT,
token TEXT NOT NULL DEFAULT '',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE
);
CREATE TABLE errors (
id INTEGER PRIMARY KEY AUTOINCREMENT,
profile_id INTEGER NOT NULL,
category TEXT NOT NULL,
message TEXT NOT NULL,
details TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE
);
CREATE TABLE entry_points (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
name TEXT NOT NULL,
address TEXT,
is_default BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE http_routers (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE tcp_routers (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE udp_routers (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE http_services (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE tcp_services (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE udp_services (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE http_middlewares (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
is_default BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE tcp_middlewares (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
is_default BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE http_servers_transports (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE tcp_servers_transports (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE traefik_instances (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
name TEXT NOT NULL,
entrypoints TEXT,
overview TEXT,
config TEXT,
version TEXT,
url TEXT NOT NULL,
username TEXT,
password TEXT,
tls BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE audit_logs (
id INTEGER PRIMARY KEY,
profile_id INTEGER,
user_id TEXT,
agent_id TEXT,
event TEXT NOT NULL,
details TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE profiles (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
token TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (id) REFERENCES profiles (id) ON DELETE CASCADE
);
CREATE TABLE dns_providers (
id TEXT PRIMARY KEY,
name TEXT NOT NULL UNIQUE,
type INTEGER NOT NULL,
config TEXT NOT NULL,
is_default BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE users (
id TEXT PRIMARY KEY,
username TEXT NOT NULL UNIQUE,
password TEXT NOT NULL,
email TEXT,
otp VARCHAR(6),
otp_expiry TIMESTAMP,
last_login TIMESTAMP,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE http_router_dns_providers (
http_router_id TEXT NOT NULL,
dns_provider_id TEXT NOT NULL,
PRIMARY KEY (http_router_id, dns_provider_id),
FOREIGN KEY (http_router_id) REFERENCES http_routers (id) ON DELETE CASCADE,
FOREIGN KEY (dns_provider_id) REFERENCES dns_providers (id) ON DELETE CASCADE
);
CREATE TABLE tcp_router_dns_providers (
tcp_router_id TEXT NOT NULL,
dns_provider_id TEXT NOT NULL,
PRIMARY KEY (tcp_router_id, dns_provider_id),
FOREIGN KEY (tcp_router_id) REFERENCES tcp_routers (id) ON DELETE CASCADE,
FOREIGN KEY (dns_provider_id) REFERENCES dns_providers (id) ON DELETE CASCADE
);
CREATE INDEX idx_http_routers_profile_name ON http_routers (profile_id, name);
CREATE INDEX idx_tcp_routers_profile_name ON tcp_routers (profile_id, name);
CREATE INDEX idx_udp_routers_profile_name ON udp_routers (profile_id, name);
CREATE INDEX idx_http_services_profile_name ON http_services (profile_id, name);
CREATE INDEX idx_tcp_services_profile_name ON tcp_services (profile_id, name);
CREATE INDEX idx_udp_services_profile_name ON udp_services (profile_id, name);
CREATE INDEX idx_http_middlewares_profile_name ON http_middlewares (profile_id, name);
CREATE INDEX idx_tcp_middlewares_profile_name ON tcp_middlewares (profile_id, name);
CREATE INDEX idx_http_servers_transports_profile_name ON http_servers_transports (profile_id, name);
CREATE INDEX idx_tcp_servers_transports_profile_name ON tcp_servers_transports (profile_id, name);
-- +goose Down
DROP TABLE IF EXISTS settings;
DROP TABLE IF EXISTS agents;
DROP TABLE IF EXISTS errors;
DROP TABLE IF EXISTS entry_points;
DROP TABLE IF EXISTS http_routers;
DROP TABLE IF EXISTS tcp_routers;
DROP TABLE IF EXISTS udp_routers;
DROP TABLE IF EXISTS http_services;
DROP TABLE IF EXISTS tcp_services;
DROP TABLE IF EXISTS udp_services;
DROP TABLE IF EXISTS http_middlewares;
DROP TABLE IF EXISTS tcp_middlewares;
DROP TABLE IF EXISTS http_servers_transports;
DROP TABLE IF EXISTS tcp_servers_transports;
DROP TABLE IF EXISTS traefik_instances;
DROP TABLE IF EXISTS audit_logs;
DROP TABLE IF EXISTS profiles;
DROP TABLE IF EXISTS dns_providers;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS http_router_dns_providers;
DROP TABLE IF EXISTS tcp_router_dns_providers;
-160
View File
@@ -1,160 +0,0 @@
-- +goose Up
CREATE TABLE profiles (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(255) NOT NULL UNIQUE,
url TEXT NOT NULL,
username VARCHAR(255),
password TEXT,
tls BOOLEAN NOT NULL DEFAULT FALSE
);
CREATE TABLE entrypoints (
profile_id INTEGER NOT NULL,
name VARCHAR(255) NOT NULL,
address VARCHAR(255) NOT NULL,
as_default BOOLEAN DEFAULT FALSE,
http JSONB,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE routers (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
name TEXT NOT NULL,
provider VARCHAR(255) NOT NULL,
protocol VARCHAR(255) NOT NULL,
status VARCHAR(255),
agent_id TEXT,
entry_points JSONB,
middlewares JSONB,
rule TEXT NOT NULL,
rule_syntax VARCHAR(255),
service TEXT NOT NULL,
priority INTEGER,
tls JSONB,
dns_provider INTEGER,
errors JSONB,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (dns_provider) REFERENCES providers (id) ON DELETE SET NULL,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (name, profile_id)
);
CREATE TABLE services (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
name TEXT NOT NULL,
provider VARCHAR(255) NOT NULL,
type VARCHAR(255) NOT NULL,
protocol VARCHAR(255) NOT NULL,
agent_id TEXT,
status VARCHAR(255),
server_status JSONB,
load_balancer JSONB,
weighted JSONB,
mirroring JSONB,
failover JSONB,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (name, profile_id)
);
CREATE TABLE middlewares (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
name TEXT NOT NULL,
provider VARCHAR(255) NOT NULL,
type VARCHAR(255) NOT NULL,
protocol VARCHAR(255) NOT NULL,
agent_id TEXT,
content JSONB,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (name, profile_id)
);
CREATE TABLE providers (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(255) NOT NULL UNIQUE,
type VARCHAR(255) NOT NULL,
external_ip TEXT NOT NULL,
api_key TEXT NOT NULL,
api_url TEXT,
zone_type TEXT,
proxied BOOLEAN NOT NULL DEFAULT FALSE,
is_active BOOLEAN NOT NULL DEFAULT FALSE
);
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username VARCHAR(255) NOT NULL UNIQUE,
password TEXT NOT NULL,
email VARCHAR(255),
type VARCHAR(255) NOT NULL
);
CREATE TABLE settings (
id INTEGER PRIMARY KEY AUTOINCREMENT,
key VARCHAR(255) NOT NULL UNIQUE,
value TEXT NOT NULL
);
CREATE TABLE agents (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
hostname TEXT NOT NULL,
public_ip TEXT,
private_ips JSONB,
containers JSONB,
active_ip TEXT,
deleted BOOLEAN NOT NULL DEFAULT FALSE,
last_seen DATETIME,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE
);
-- +goose StatementBegin
CREATE TRIGGER ensure_single_active_insert BEFORE INSERT ON providers FOR EACH ROW WHEN NEW.is_active = 1 BEGIN
UPDATE providers
SET
is_active = 0
WHERE
is_active = 1;
END;
-- +goose StatementEnd
-- +goose StatementBegin
CREATE TRIGGER ensure_single_active_update BEFORE
UPDATE ON providers FOR EACH ROW WHEN NEW.is_active = 1 BEGIN
UPDATE providers
SET
is_active = 0
WHERE
is_active = 1;
END;
-- +goose StatementEnd
-- +goose Down
DROP TABLE IF EXISTS profiles;
DROP TABLE IF EXISTS entrypoints;
DROP TABLE IF EXISTS routers;
DROP TABLE IF EXISTS services;
DROP TABLE IF EXISTS middlewares;
DROP TABLE IF EXISTS providers;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS settings;
DROP TABLE IF EXISTS agents;
DROP TRIGGER IF EXISTS ensure_single_active_insert;
DROP TRIGGER IF EXISTS ensure_single_active_update;
@@ -1,22 +0,0 @@
-- +goose Up
-- +goose StatementBegin
DROP TABLE IF EXISTS config;
DROP TRIGGER IF EXISTS add_profile_config;
CREATE TABLE IF NOT EXISTS entrypoints (
profile_id INTEGER NOT NULL,
name VARCHAR(255) NOT NULL,
address VARCHAR(255) NOT NULL,
as_default BOOLEAN DEFAULT FALSE,
http JSONB,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS entrypoints;
-- +goose StatementEnd
-18
View File
@@ -1,18 +0,0 @@
-- +goose Up
-- +goose StatementBegin
ALTER TABLE users
DROP COLUMN type;
ALTER TABLE users
ADD COLUMN is_admin BOOLEAN NOT NULL DEFAULT FALSE;
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
ALTER TABLE users
DROP COLUMN is_admin;
ALTER TABLE users
ADD COLUMN type VARCHAR(255) NOT NULL;
-- +goose StatementEnd
-494
View File
@@ -1,494 +0,0 @@
-- +goose Up
-- +goose StatementBegin
-- Create new profiles table with timestamp columns
CREATE TABLE new_profiles (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(255) NOT NULL UNIQUE,
url TEXT NOT NULL,
username VARCHAR(255),
password TEXT,
tls BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Copy data from old profiles table
INSERT INTO
new_profiles (id, name, url, username, password, tls)
SELECT
id,
name,
url,
username,
password,
tls
FROM
profiles;
-- Drop old profiles table and rename new one
DROP TABLE profiles;
ALTER TABLE new_profiles
RENAME TO profiles;
-- Create new dns_providers table and migrate data from providers
CREATE TABLE dns_providers (
id INTEGER PRIMARY KEY,
name VARCHAR(255) NOT NULL UNIQUE,
type VARCHAR(255) NOT NULL,
config JSON NOT NULL,
is_active BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO
dns_providers (id, name, type, config, is_active)
SELECT
id,
name,
type,
json_object (
'traefikIp',
external_ip,
'apiKey',
api_key,
'apiUrl',
api_url,
'zoneType',
zone_type,
'proxied',
proxied
),
is_active
FROM
providers;
-- Create new traefik table
CREATE TABLE traefik (
id INTEGER PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
source TEXT NOT NULL,
entrypoints JSON,
overview JSON,
config JSON,
version TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
CONSTRAINT valid_source CHECK (source IN ('local', 'api', 'agent'))
);
-- Create router_dns_provider table
CREATE TABLE router_dns_provider (
traefik_id INTEGER NOT NULL,
provider_id INTEGER NOT NULL,
router_name TEXT NOT NULL,
FOREIGN KEY (traefik_id) REFERENCES traefik (id) ON DELETE CASCADE,
FOREIGN KEY (provider_id) REFERENCES dns_providers (id) ON DELETE CASCADE,
UNIQUE (traefik_id, router_name)
);
-- Create new users table with additional columns
CREATE TABLE new_users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username VARCHAR(255) NOT NULL UNIQUE,
password TEXT NOT NULL,
email VARCHAR(255),
is_admin BOOLEAN NOT NULL DEFAULT FALSE,
otp VARCHAR(6),
otp_expiry TIMESTAMP,
last_login TIMESTAMP,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Copy data from old users table
INSERT INTO
new_users (id, username, password, email, is_admin)
SELECT
id,
username,
password,
email,
is_admin
FROM
users;
-- Drop old users table and rename new one
DROP TABLE users;
ALTER TABLE new_users
RENAME TO users;
-- Update settings table
CREATE TABLE new_settings (
key VARCHAR(255) PRIMARY KEY,
value TEXT NOT NULL,
description TEXT,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO
new_settings (key, value)
SELECT
key,
value
FROM
settings;
DROP TABLE settings;
ALTER TABLE new_settings
RENAME TO settings;
-- Update agents table
-- Create new agents table with modified columns
CREATE TABLE new_agents (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
hostname TEXT,
public_ip TEXT,
private_ips JSONB,
containers JSONB,
active_ip TEXT,
token TEXT NOT NULL DEFAULT '',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE
);
-- Copy data from old agents table
INSERT INTO
new_agents (
id,
profile_id,
public_ip,
private_ips,
containers,
active_ip
)
SELECT
id,
profile_id,
public_ip,
private_ips,
containers,
active_ip
FROM
agents;
-- Drop old agents table and rename new one
DROP TABLE agents;
ALTER TABLE new_agents
RENAME TO agents;
-- Create indexes for traefik table
CREATE UNIQUE INDEX idx_traefik_profile_source ON traefik (profile_id, source)
WHERE
source IN ('local', 'api');
CREATE UNIQUE INDEX idx_traefik_agent ON traefik (profile_id, agent_id)
WHERE
agent_id IS NOT NULL
AND source = 'agent';
-- Drop old tables
DROP TABLE providers;
DROP TABLE middlewares;
DROP TABLE services;
DROP TABLE routers;
DROP TABLE entrypoints;
DROP TRIGGER IF EXISTS ensure_single_active_insert;
DROP TRIGGER IF EXISTS ensure_single_active_update;
-- +goose StatementEnd
-- +goose StatementBegin
-- Create trigger
CREATE TRIGGER ensure_single_active_insert BEFORE INSERT ON dns_providers FOR EACH ROW WHEN NEW.is_active = 1 BEGIN
UPDATE dns_providers
SET
is_active = 0
WHERE
is_active = 1;
END;
-- +goose StatementEnd
-- +goose StatementBegin
CREATE TRIGGER ensure_single_active_update BEFORE
UPDATE ON dns_providers FOR EACH ROW WHEN NEW.is_active = 1 BEGIN
UPDATE dns_providers
SET
is_active = 0
WHERE
is_active = 1;
END;
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TRIGGER IF EXISTS ensure_single_active_insert;
DROP TRIGGER IF EXISTS ensure_single_active_update;
-- Recreate the original tables
CREATE TABLE providers (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(255) NOT NULL UNIQUE,
type VARCHAR(255) NOT NULL,
external_ip TEXT NOT NULL,
api_key TEXT NOT NULL,
api_url TEXT,
zone_type TEXT,
proxied BOOLEAN NOT NULL DEFAULT FALSE,
is_active BOOLEAN NOT NULL DEFAULT FALSE
);
-- Restore providers data from dns_providers
INSERT INTO
providers (
id,
name,
type,
external_ip,
api_key,
api_url,
zone_type,
proxied,
is_active
)
SELECT
id,
name,
type,
json_extract (config, '$.traefikIp'),
json_extract (config, '$.apiKey'),
json_extract (config, '$.apiUrl'),
json_extract (config, '$.zoneType'),
json_extract (config, '$.proxied'),
is_active
FROM
dns_providers;
-- Recreate original tables
CREATE TABLE routers (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
name TEXT NOT NULL,
provider VARCHAR(255) NOT NULL,
protocol VARCHAR(255) NOT NULL,
status VARCHAR(255),
agent_id TEXT,
entry_points JSONB,
middlewares JSONB,
rule TEXT NOT NULL,
rule_syntax VARCHAR(255),
service TEXT NOT NULL,
priority INTEGER,
tls JSONB,
dns_provider INTEGER,
errors JSONB,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (dns_provider) REFERENCES providers (id) ON DELETE SET NULL,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (name, profile_id)
);
CREATE TABLE services (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
name TEXT NOT NULL,
provider VARCHAR(255) NOT NULL,
type VARCHAR(255) NOT NULL,
protocol VARCHAR(255) NOT NULL,
agent_id TEXT,
status VARCHAR(255),
server_status JSONB,
load_balancer JSONB,
weighted JSONB,
mirroring JSONB,
failover JSONB,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (name, profile_id)
);
CREATE TABLE middlewares (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
name TEXT NOT NULL,
provider VARCHAR(255) NOT NULL,
type VARCHAR(255) NOT NULL,
protocol VARCHAR(255) NOT NULL,
agent_id TEXT,
content JSONB,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (name, profile_id)
);
CREATE TABLE entrypoints (
profile_id INTEGER NOT NULL,
name VARCHAR(255) NOT NULL,
address VARCHAR(255) NOT NULL,
as_default BOOLEAN DEFAULT FALSE,
http JSONB,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
-- Restore original profiles table
CREATE TABLE new_profiles (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(255) NOT NULL UNIQUE,
url TEXT NOT NULL,
username VARCHAR(255),
password TEXT,
tls BOOLEAN NOT NULL DEFAULT FALSE
);
INSERT INTO
new_profiles (id, name, url, username, password, tls)
SELECT
id,
name,
url,
username,
password,
tls
FROM
profiles;
DROP TABLE profiles;
ALTER TABLE new_profiles
RENAME TO profiles;
-- Restore original users table
CREATE TABLE new_users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username VARCHAR(255) NOT NULL UNIQUE,
password TEXT NOT NULL,
email VARCHAR(255),
is_admin BOOLEAN NOT NULL DEFAULT FALSE
);
INSERT INTO
new_users (id, username, password, email, is_admin)
SELECT
id,
username,
password,
email,
is_admin
FROM
users;
DROP TABLE users;
ALTER TABLE new_users
RENAME TO users;
-- Restore original settings table
CREATE TABLE new_settings (
id INTEGER PRIMARY KEY AUTOINCREMENT,
key VARCHAR(255) NOT NULL UNIQUE,
value TEXT NOT NULL
);
INSERT INTO
new_settings (key, value)
SELECT
key,
value
FROM
settings;
DROP TABLE settings;
ALTER TABLE new_settings
RENAME TO settings;
-- Restore original agents table
CREATE TABLE new_agents (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
hostname TEXT NOT NULL,
public_ip TEXT,
private_ips JSONB,
containers JSONB,
active_ip TEXT,
deleted BOOLEAN NOT NULL DEFAULT FALSE,
last_seen DATETIME,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE
);
INSERT INTO
new_agents (
id,
profile_id,
hostname,
public_ip,
private_ips,
containers,
active_ip,
deleted,
last_seen
)
SELECT
id,
profile_id,
hostname,
public_ip,
private_ips,
containers,
active_ip,
false,
NULL
FROM
agents;
DROP TABLE agents;
ALTER TABLE new_agents
RENAME TO agents;
-- Recreate triggers
CREATE TRIGGER ensure_single_active_insert BEFORE INSERT ON providers FOR EACH ROW WHEN NEW.is_active = 1 BEGIN
UPDATE providers
SET
is_active = 0
WHERE
is_active = 1;
END;
CREATE TRIGGER ensure_single_active_update BEFORE
UPDATE ON providers FOR EACH ROW WHEN NEW.is_active = 1 BEGIN
UPDATE providers
SET
is_active = 0
WHERE
is_active = 1;
END;
-- Drop new tables
DROP TABLE IF EXISTS router_dns_provider;
DROP TABLE IF EXISTS traefik;
DROP TABLE IF EXISTS dns_providers;
-- +goose StatementEnd
@@ -1,52 +0,0 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE router_dns_provider_new (
traefik_id INTEGER NOT NULL,
provider_id INTEGER NOT NULL,
router_name TEXT NOT NULL,
FOREIGN KEY (traefik_id) REFERENCES traefik (id) ON DELETE CASCADE,
FOREIGN KEY (provider_id) REFERENCES dns_providers (id) ON DELETE CASCADE,
UNIQUE (traefik_id, router_name, provider_id)
);
INSERT INTO
router_dns_provider_new (traefik_id, provider_id, router_name)
SELECT
traefik_id,
provider_id,
router_name
FROM
router_dns_provider;
DROP TABLE router_dns_provider;
ALTER TABLE router_dns_provider_new
RENAME TO router_dns_provider;
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
CREATE TABLE router_dns_provider_old (
traefik_id INTEGER NOT NULL,
provider_id INTEGER NOT NULL,
router_name TEXT NOT NULL,
FOREIGN KEY (traefik_id) REFERENCES traefik (id) ON DELETE CASCADE,
FOREIGN KEY (provider_id) REFERENCES dns_providers (id) ON DELETE CASCADE,
UNIQUE (traefik_id, router_name)
);
INSERT
OR IGNORE INTO router_dns_provider_old (traefik_id, provider_id, router_name)
SELECT
traefik_id,
provider_id,
router_name
FROM
router_dns_provider;
DROP TABLE router_dns_provider;
ALTER TABLE router_dns_provider_old
RENAME TO router_dns_provider;
-- +goose StatementEnd
@@ -1,22 +0,0 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE errors (
id INTEGER PRIMARY KEY AUTOINCREMENT,
profile_id INTEGER NOT NULL,
category TEXT NOT NULL,
message TEXT NOT NULL,
details TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE
);
CREATE UNIQUE INDEX unique_dns_error ON errors (profile_id, category, details);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE errors;
DROP INDEX unique_dns_error;
-- +goose StatementEnd
-293
View File
@@ -1,293 +0,0 @@
-- +goose Up
-- Create new tables that don't exist in the old schema
CREATE TABLE entry_points (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
name TEXT NOT NULL,
address TEXT,
is_default BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE http_routers (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE tcp_routers (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE udp_routers (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE http_services (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE tcp_services (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE udp_services (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE http_middlewares (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
is_default BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE tcp_middlewares (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
is_default BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE http_servers_transports (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE tcp_servers_transports (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
agent_id TEXT,
name TEXT NOT NULL,
config TEXT NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
FOREIGN KEY (agent_id) REFERENCES agents (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE traefik_instances (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
name TEXT NOT NULL,
entrypoints TEXT,
overview TEXT,
config TEXT,
version TEXT,
url TEXT NOT NULL,
username TEXT,
password TEXT,
tls BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
UNIQUE (profile_id, name)
);
CREATE TABLE audit_logs (
id INTEGER PRIMARY KEY,
profile_id INTEGER,
user_id TEXT,
agent_id TEXT,
event TEXT NOT NULL,
details TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Update profiles table structure
DROP TABLE profiles;
CREATE TABLE profiles (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
token TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (id) REFERENCES profiles (id) ON DELETE CASCADE
);
-- Update agents table - change JSON columns to TEXT
UPDATE agents
SET
containers = CASE
WHEN containers IS NOT NULL THEN containers
ELSE NULL
END;
ALTER TABLE agents
DROP COLUMN private_ips;
ALTER TABLE agents
ADD COLUMN private_ip TEXT;
-- Update dns_providers table
-- Drop old triggers for DNS providers
DROP TRIGGER ensure_single_active_insert;
DROP TRIGGER ensure_single_active_update;
DROP TABLE IF EXISTS dns_providers;
CREATE TABLE dns_providers (
id TEXT PRIMARY KEY,
name TEXT NOT NULL UNIQUE,
type INTEGER NOT NULL,
config TEXT NOT NULL,
is_default BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- New users table
DROP TABLE users;
CREATE TABLE users (
id TEXT PRIMARY KEY,
username TEXT NOT NULL UNIQUE,
password TEXT NOT NULL,
email TEXT,
otp VARCHAR(6),
otp_expiry TIMESTAMP,
last_login TIMESTAMP,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Update settings table - remove description column
ALTER TABLE settings
DROP COLUMN description;
-- Create new DNS provider association tables
CREATE TABLE http_router_dns_providers (
http_router_id TEXT NOT NULL,
dns_provider_id TEXT NOT NULL,
PRIMARY KEY (http_router_id, dns_provider_id),
FOREIGN KEY (http_router_id) REFERENCES http_routers (id) ON DELETE CASCADE,
FOREIGN KEY (dns_provider_id) REFERENCES dns_providers (id) ON DELETE CASCADE
);
CREATE TABLE tcp_router_dns_providers (
tcp_router_id TEXT NOT NULL,
dns_provider_id TEXT NOT NULL,
PRIMARY KEY (tcp_router_id, dns_provider_id),
FOREIGN KEY (tcp_router_id) REFERENCES tcp_routers (id) ON DELETE CASCADE,
FOREIGN KEY (dns_provider_id) REFERENCES dns_providers (id) ON DELETE CASCADE
);
-- Create indexes
CREATE INDEX idx_http_routers_profile_name ON http_routers (profile_id, name);
CREATE INDEX idx_tcp_routers_profile_name ON tcp_routers (profile_id, name);
CREATE INDEX idx_udp_routers_profile_name ON udp_routers (profile_id, name);
CREATE INDEX idx_http_services_profile_name ON http_services (profile_id, name);
CREATE INDEX idx_tcp_services_profile_name ON tcp_services (profile_id, name);
CREATE INDEX idx_udp_services_profile_name ON udp_services (profile_id, name);
CREATE INDEX idx_http_middlewares_profile_name ON http_middlewares (profile_id, name);
CREATE INDEX idx_tcp_middlewares_profile_name ON tcp_middlewares (profile_id, name);
CREATE INDEX idx_http_servers_transports_profile_name ON http_servers_transports (profile_id, name);
CREATE INDEX idx_tcp_servers_transports_profile_name ON tcp_servers_transports (profile_id, name);
-- Drop old tables and constraints
DROP TABLE router_dns_provider;
DROP TABLE traefik;
-- Remove old unique index on errors table
DROP INDEX unique_dns_error;
@@ -1,62 +0,0 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE "agents_new" (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
hostname TEXT,
public_ip TEXT,
containers TEXT,
active_ip TEXT,
private_ip TEXT,
token TEXT NOT NULL DEFAULT '',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE
);
-- Copy data from old table to new table
INSERT INTO
agents_new
SELECT
*
FROM
agents;
-- Drop old table
DROP TABLE agents;
-- Rename new table to original name
ALTER TABLE agents_new
RENAME TO agents;
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
-- Revert back to original schema (this assumes TEXT can be converted back)
CREATE TABLE "agents_new" (
id TEXT PRIMARY KEY,
profile_id INTEGER NOT NULL,
hostname TEXT,
public_ip TEXT,
containers TEXT,
active_ip TEXT,
private_ip TEXT,
token TEXT NOT NULL DEFAULT '',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE
);
INSERT INTO
agents_new
SELECT
*
FROM
agents;
DROP TABLE agents;
ALTER TABLE agents_new
RENAME TO agents;
-- +goose StatementEnd
+13
View File
@@ -88,3 +88,16 @@ func CopyFile(src, dst string) error {
return dstFile.Sync()
}
func CleanSliceStr(in []string) []string {
out := in[:0]
for _, s := range in {
if s != "" {
out = append(out, s)
}
}
if len(out) == 0 {
return nil
}
return out
}
+6 -6
View File
@@ -106,8 +106,8 @@ packages:
resolution: {integrity: sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==}
engines: {node: '>=6.9.0'}
'@babel/generator@7.29.0':
resolution: {integrity: sha512-vSH118/wwM/pLR38g/Sgk05sNtro6TlTJKuiMXDaZqPUfjTFcudpCOt00IhOfj+1BFAX+UFAlzCU+6WXr3GLFQ==}
'@babel/generator@7.29.1':
resolution: {integrity: sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==}
engines: {node: '>=6.9.0'}
'@babel/helper-compilation-targets@7.28.6':
@@ -3415,7 +3415,7 @@ snapshots:
'@babel/core@7.29.0':
dependencies:
'@babel/code-frame': 7.29.0
'@babel/generator': 7.29.0
'@babel/generator': 7.29.1
'@babel/helper-compilation-targets': 7.28.6
'@babel/helper-module-transforms': 7.28.6(@babel/core@7.29.0)
'@babel/helpers': 7.28.6
@@ -3432,7 +3432,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@babel/generator@7.29.0':
'@babel/generator@7.29.1':
dependencies:
'@babel/parser': 7.29.0
'@babel/types': 7.29.0
@@ -3512,7 +3512,7 @@ snapshots:
'@babel/traverse@7.29.0':
dependencies:
'@babel/code-frame': 7.29.0
'@babel/generator': 7.29.0
'@babel/generator': 7.29.1
'@babel/helper-globals': 7.28.0
'@babel/parser': 7.29.0
'@babel/template': 7.28.6
@@ -4712,7 +4712,7 @@ snapshots:
'@tanstack/router-utils@1.158.0':
dependencies:
'@babel/core': 7.29.0
'@babel/generator': 7.29.0
'@babel/generator': 7.29.1
'@babel/parser': 7.29.0
'@babel/types': 7.29.0
ansis: 4.2.0
+2 -2
View File
@@ -20,7 +20,7 @@
"@connectrpc/connect": "^2.1.1",
"@connectrpc/connect-query-core": "^2.2.0",
"@connectrpc/connect-web": "^2.1.1",
"@internationalized/date": "^3.10.1",
"@internationalized/date": "^3.11.0",
"@lucide/svelte": "^0.563.1",
"@sveltejs/adapter-static": "^3.0.10",
"@sveltejs/kit": "^2.50.2",
@@ -43,7 +43,7 @@
"prettier-plugin-tailwindcss": "^0.7.2",
"runed": "^0.37.1",
"shiki": "^3.22.0",
"svelte": "^5.49.1",
"svelte": "^5.49.2",
"svelte-check": "^4.3.6",
"svelte-highlight": "^7.9.0",
"svelte-sonner": "^1.0.7",
+83 -83
View File
@@ -28,20 +28,20 @@ importers:
specifier: ^2.1.1
version: 2.1.1(@bufbuild/protobuf@2.11.0)(@connectrpc/connect@2.1.1(@bufbuild/protobuf@2.11.0))
'@internationalized/date':
specifier: ^3.10.1
specifier: ^3.11.0
version: 3.11.0
'@lucide/svelte':
specifier: ^0.563.1
version: 0.563.1(svelte@5.49.1)
version: 0.563.1(svelte@5.49.2)
'@sveltejs/adapter-static':
specifier: ^3.0.10
version: 3.0.10(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))
version: 3.0.10(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))
'@sveltejs/kit':
specifier: ^2.50.2
version: 2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
version: 2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
'@sveltejs/vite-plugin-svelte':
specifier: ^6.2.4
version: 6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
version: 6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
'@tailwindcss/typography':
specifier: ^0.5.19
version: 0.5.19(tailwindcss@4.1.18)
@@ -53,7 +53,7 @@ importers:
version: 8.19.4
'@tanstack/svelte-query':
specifier: ^6.0.18
version: 6.0.18(svelte@5.49.1)
version: 6.0.18(svelte@5.49.2)
'@tanstack/table-core':
specifier: ^8.21.3
version: 8.21.3
@@ -62,19 +62,19 @@ importers:
version: 25.2.0
bits-ui:
specifier: 2.15.5
version: 2.15.5(@internationalized/date@3.11.0)(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)
version: 2.15.5(@internationalized/date@3.11.0)(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)
clsx:
specifier: ^2.1.1
version: 2.1.1
formsnap:
specifier: ^2.0.1
version: 2.0.1(svelte@5.49.1)(sveltekit-superforms@2.29.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3))
version: 2.0.1(svelte@5.49.2)(sveltekit-superforms@2.29.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3))
globals:
specifier: ^17.3.0
version: 17.3.0
mode-watcher:
specifier: ^1.1.0
version: 1.1.0(svelte@5.49.1)
version: 1.1.0(svelte@5.49.2)
oxlint:
specifier: ^1.43.0
version: 1.43.0(oxlint-tsgolint@0.11.4)
@@ -86,31 +86,31 @@ importers:
version: 3.8.1
prettier-plugin-svelte:
specifier: ^3.4.1
version: 3.4.1(prettier@3.8.1)(svelte@5.49.1)
version: 3.4.1(prettier@3.8.1)(svelte@5.49.2)
prettier-plugin-tailwindcss:
specifier: ^0.7.2
version: 0.7.2(prettier-plugin-svelte@3.4.1(prettier@3.8.1)(svelte@5.49.1))(prettier@3.8.1)
version: 0.7.2(prettier-plugin-svelte@3.4.1(prettier@3.8.1)(svelte@5.49.2))(prettier@3.8.1)
runed:
specifier: ^0.37.1
version: 0.37.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(zod@4.3.6)
version: 0.37.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(zod@4.3.6)
shiki:
specifier: ^3.22.0
version: 3.22.0
svelte:
specifier: ^5.49.1
version: 5.49.1
specifier: ^5.49.2
version: 5.49.2
svelte-check:
specifier: ^4.3.6
version: 4.3.6(picomatch@4.0.3)(svelte@5.49.1)(typescript@5.9.3)
version: 4.3.6(picomatch@4.0.3)(svelte@5.49.2)(typescript@5.9.3)
svelte-highlight:
specifier: ^7.9.0
version: 7.9.0
svelte-sonner:
specifier: ^1.0.7
version: 1.0.7(svelte@5.49.1)
version: 1.0.7(svelte@5.49.2)
sveltekit-superforms:
specifier: ^2.29.1
version: 2.29.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)
version: 2.29.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)
tailwind-merge:
specifier: ^3.4.0
version: 3.4.0
@@ -934,8 +934,8 @@ packages:
dlv@1.1.3:
resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==}
effect@3.19.15:
resolution: {integrity: sha512-vzMmgfZKLcojmUjBdlQx+uaKryO7yULlRxjpDnHdnvcp1NPHxJyoM6IOXBLlzz2I/uPtZpGKavt5hBv7IvGZkA==}
effect@3.19.16:
resolution: {integrity: sha512-7+XC3vGrbAhCHd8LTFHvnZjRpZKZ8YHRZqJTkpNoxcJ2mCyNs2SwI+6VkV/ij8Y3YW7wfBN4EbU06/F5+m/wkQ==}
enhanced-resolve@5.19.0:
resolution: {integrity: sha512-phv3E1Xl4tQOShqSte26C7Fl84EwUdZsyOuSSk9qtAGyyQs2s3jJzComh+Abf4g187lUUAvH+H26omrqia2aGg==}
@@ -1386,8 +1386,8 @@ packages:
peerDependencies:
svelte: ^5.0.0
svelte@5.49.1:
resolution: {integrity: sha512-jj95WnbKbXsXXngYj28a4zx8jeZx50CN/J4r0CEeax2pbfdsETv/J1K8V9Hbu3DCXnpHz5qAikICuxEooi7eNQ==}
svelte@5.49.2:
resolution: {integrity: sha512-PYLwnngYzyhKzqDlGVlCH4z+NVI8mC0/bTv15vw25CcdOhxENsOHIbQ36oj5DIf3oBazM+STbCAvaskpxtBmWA==}
engines: {node: '>=18'}
sveltekit-superforms@2.29.1:
@@ -1733,9 +1733,9 @@ snapshots:
'@jridgewell/resolve-uri': 3.1.2
'@jridgewell/sourcemap-codec': 1.5.5
'@lucide/svelte@0.563.1(svelte@5.49.1)':
'@lucide/svelte@0.563.1(svelte@5.49.2)':
dependencies:
svelte: 5.49.1
svelte: 5.49.2
'@oxlint-tsgolint/darwin-arm64@0.11.4':
optional: true
@@ -1917,15 +1917,15 @@ snapshots:
dependencies:
acorn: 8.15.0
'@sveltejs/adapter-static@3.0.10(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))':
'@sveltejs/adapter-static@3.0.10(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))':
dependencies:
'@sveltejs/kit': 2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
'@sveltejs/kit': 2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
'@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))':
'@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))':
dependencies:
'@standard-schema/spec': 1.1.0
'@sveltejs/acorn-typescript': 1.0.8(acorn@8.15.0)
'@sveltejs/vite-plugin-svelte': 6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
'@sveltejs/vite-plugin-svelte': 6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
'@types/cookie': 0.6.0
acorn: 8.15.0
cookie: 0.6.0
@@ -1937,25 +1937,25 @@ snapshots:
sade: 1.8.1
set-cookie-parser: 3.0.1
sirv: 3.0.2
svelte: 5.49.1
svelte: 5.49.2
vite: 7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)
optionalDependencies:
typescript: 5.9.3
'@sveltejs/vite-plugin-svelte-inspector@5.0.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))':
'@sveltejs/vite-plugin-svelte-inspector@5.0.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))':
dependencies:
'@sveltejs/vite-plugin-svelte': 6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
'@sveltejs/vite-plugin-svelte': 6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
obug: 2.1.1
svelte: 5.49.1
svelte: 5.49.2
vite: 7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)
'@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))':
'@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))':
dependencies:
'@sveltejs/vite-plugin-svelte-inspector': 5.0.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
'@sveltejs/vite-plugin-svelte-inspector': 5.0.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
deepmerge: 4.3.1
magic-string: 0.30.21
obug: 2.1.1
svelte: 5.49.1
svelte: 5.49.2
vite: 7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)
vitefu: 1.1.1(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
@@ -2042,10 +2042,10 @@ snapshots:
'@tanstack/query-core@5.90.20': {}
'@tanstack/svelte-query@6.0.18(svelte@5.49.1)':
'@tanstack/svelte-query@6.0.18(svelte@5.49.2)':
dependencies:
'@tanstack/query-core': 5.90.20
svelte: 5.49.1
svelte: 5.49.2
'@tanstack/table-core@8.21.3': {}
@@ -2122,15 +2122,15 @@ snapshots:
axobject-query@4.1.0: {}
bits-ui@2.15.5(@internationalized/date@3.11.0)(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1):
bits-ui@2.15.5(@internationalized/date@3.11.0)(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2):
dependencies:
'@floating-ui/core': 1.7.4
'@floating-ui/dom': 1.7.5
'@internationalized/date': 3.11.0
esm-env: 1.2.2
runed: 0.35.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)
svelte: 5.49.1
svelte-toolbelt: 0.10.6(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)
runed: 0.35.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)
svelte: 5.49.2
svelte-toolbelt: 0.10.6(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)
tabbable: 6.4.0
transitivePeerDependencies:
- '@sveltejs/kit'
@@ -2181,7 +2181,7 @@ snapshots:
dlv@1.1.3:
optional: true
effect@3.19.15:
effect@3.19.16:
dependencies:
'@standard-schema/spec': 1.1.0
fast-check: 3.23.2
@@ -2238,11 +2238,11 @@ snapshots:
optionalDependencies:
picomatch: 4.0.3
formsnap@2.0.1(svelte@5.49.1)(sveltekit-superforms@2.29.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)):
formsnap@2.0.1(svelte@5.49.2)(sveltekit-superforms@2.29.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)):
dependencies:
svelte: 5.49.1
svelte-toolbelt: 0.5.0(svelte@5.49.1)
sveltekit-superforms: 2.29.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)
svelte: 5.49.2
svelte-toolbelt: 0.5.0(svelte@5.49.2)
sveltekit-superforms: 2.29.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)
fsevents@2.3.3:
optional: true
@@ -2389,11 +2389,11 @@ snapshots:
micromark-util-types@2.0.2: {}
mode-watcher@1.1.0(svelte@5.49.1):
mode-watcher@1.1.0(svelte@5.49.2):
dependencies:
runed: 0.25.0(svelte@5.49.1)
svelte: 5.49.1
svelte-toolbelt: 0.7.1(svelte@5.49.1)
runed: 0.25.0(svelte@5.49.2)
svelte: 5.49.2
svelte-toolbelt: 0.7.1(svelte@5.49.2)
mri@1.2.0: {}
@@ -2450,16 +2450,16 @@ snapshots:
picocolors: 1.1.1
source-map-js: 1.2.1
prettier-plugin-svelte@3.4.1(prettier@3.8.1)(svelte@5.49.1):
prettier-plugin-svelte@3.4.1(prettier@3.8.1)(svelte@5.49.2):
dependencies:
prettier: 3.8.1
svelte: 5.49.1
svelte: 5.49.2
prettier-plugin-tailwindcss@0.7.2(prettier-plugin-svelte@3.4.1(prettier@3.8.1)(svelte@5.49.1))(prettier@3.8.1):
prettier-plugin-tailwindcss@0.7.2(prettier-plugin-svelte@3.4.1(prettier@3.8.1)(svelte@5.49.2))(prettier@3.8.1):
dependencies:
prettier: 3.8.1
optionalDependencies:
prettier-plugin-svelte: 3.4.1(prettier@3.8.1)(svelte@5.49.1)
prettier-plugin-svelte: 3.4.1(prettier@3.8.1)(svelte@5.49.2)
prettier@3.8.1: {}
@@ -2516,38 +2516,38 @@ snapshots:
'@rollup/rollup-win32-x64-msvc': 4.57.1
fsevents: 2.3.3
runed@0.23.4(svelte@5.49.1):
runed@0.23.4(svelte@5.49.2):
dependencies:
esm-env: 1.2.2
svelte: 5.49.1
svelte: 5.49.2
runed@0.25.0(svelte@5.49.1):
runed@0.25.0(svelte@5.49.2):
dependencies:
esm-env: 1.2.2
svelte: 5.49.1
svelte: 5.49.2
runed@0.28.0(svelte@5.49.1):
runed@0.28.0(svelte@5.49.2):
dependencies:
esm-env: 1.2.2
svelte: 5.49.1
svelte: 5.49.2
runed@0.35.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1):
runed@0.35.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2):
dependencies:
dequal: 2.0.3
esm-env: 1.2.2
lz-string: 1.5.0
svelte: 5.49.1
svelte: 5.49.2
optionalDependencies:
'@sveltejs/kit': 2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
'@sveltejs/kit': 2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
runed@0.37.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(zod@4.3.6):
runed@0.37.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(zod@4.3.6):
dependencies:
dequal: 2.0.3
esm-env: 1.2.2
lz-string: 1.5.0
svelte: 5.49.1
svelte: 5.49.2
optionalDependencies:
'@sveltejs/kit': 2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
'@sveltejs/kit': 2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
zod: 4.3.6
sade@1.8.1:
@@ -2589,14 +2589,14 @@ snapshots:
superstruct@2.0.2:
optional: true
svelte-check@4.3.6(picomatch@4.0.3)(svelte@5.49.1)(typescript@5.9.3):
svelte-check@4.3.6(picomatch@4.0.3)(svelte@5.49.2)(typescript@5.9.3):
dependencies:
'@jridgewell/trace-mapping': 0.3.31
chokidar: 4.0.3
fdir: 6.5.0(picomatch@4.0.3)
picocolors: 1.1.1
sade: 1.8.1
svelte: 5.49.1
svelte: 5.49.2
typescript: 5.9.3
transitivePeerDependencies:
- picomatch
@@ -2605,34 +2605,34 @@ snapshots:
dependencies:
highlight.js: 11.11.1
svelte-sonner@1.0.7(svelte@5.49.1):
svelte-sonner@1.0.7(svelte@5.49.2):
dependencies:
runed: 0.28.0(svelte@5.49.1)
svelte: 5.49.1
runed: 0.28.0(svelte@5.49.2)
svelte: 5.49.2
svelte-toolbelt@0.10.6(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1):
svelte-toolbelt@0.10.6(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2):
dependencies:
clsx: 2.1.1
runed: 0.35.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)
runed: 0.35.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)
style-to-object: 1.0.14
svelte: 5.49.1
svelte: 5.49.2
transitivePeerDependencies:
- '@sveltejs/kit'
svelte-toolbelt@0.5.0(svelte@5.49.1):
svelte-toolbelt@0.5.0(svelte@5.49.2):
dependencies:
clsx: 2.1.1
style-to-object: 1.0.14
svelte: 5.49.1
svelte: 5.49.2
svelte-toolbelt@0.7.1(svelte@5.49.1):
svelte-toolbelt@0.7.1(svelte@5.49.2):
dependencies:
clsx: 2.1.1
runed: 0.23.4(svelte@5.49.1)
runed: 0.23.4(svelte@5.49.2)
style-to-object: 1.0.14
svelte: 5.49.1
svelte: 5.49.2
svelte@5.49.1:
svelte@5.49.2:
dependencies:
'@jridgewell/remapping': 2.3.5
'@jridgewell/sourcemap-codec': 1.5.5
@@ -2650,12 +2650,12 @@ snapshots:
magic-string: 0.30.21
zimmerframe: 1.1.4
sveltekit-superforms@2.29.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3):
sveltekit-superforms@2.29.1(@sveltejs/kit@2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3):
dependencies:
'@sveltejs/kit': 2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.1)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.1)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
'@sveltejs/kit': 2.50.2(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.49.2)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2)))(svelte@5.49.2)(typescript@5.9.3)(vite@7.3.1(@types/node@25.2.0)(jiti@2.6.1)(lightningcss@1.30.2)(yaml@2.8.2))
devalue: 5.6.2
memoize-weak: 1.0.2
svelte: 5.49.1
svelte: 5.49.2
ts-deepmerge: 7.0.3
optionalDependencies:
'@exodus/schemasafe': 1.3.0
@@ -2664,7 +2664,7 @@ snapshots:
'@vinejs/vine': 3.0.1
arktype: 2.1.29
class-validator: 0.14.3
effect: 3.19.15
effect: 3.19.16
joi: 17.13.3
json-schema-to-ts: 3.1.1
superstruct: 2.0.2
@@ -52,14 +52,18 @@
</script>
<Dialog.Root bind:open>
<Dialog.Content class="flex max-h-[85vh] w-full max-w-4xl flex-col gap-0 overflow-hidden p-0">
<Dialog.Content class="flex max-h-[80vh] flex-col gap-0 overflow-hidden p-0">
<Dialog.Header class="border-b px-6 py-4">
<Dialog.Title>Configuration</Dialog.Title>
<Dialog.Description>View the current dynamic configuration.</Dialog.Description>
</Dialog.Header>
<div class="flex min-h-0 flex-1 flex-col">
<Tabs.Root value={lang} onValueChange={(v) => (lang = v as 'json' | 'yaml')}>
<Tabs.Root
value={lang}
onValueChange={(v) => (lang = v as 'json' | 'yaml')}
class="flex min-h-0 flex-1 flex-col"
>
<div class="flex items-center justify-between border-b bg-muted/40 px-4 py-2">
<Tabs.List class="w-full">
<Tabs.Trigger value="json">JSON</Tabs.Trigger>
@@ -68,7 +72,7 @@
<CopyButton text={formatted} class="ml-2" />
</div>
<div class="relative min-h-0 flex-1 overflow-auto bg-card">
<div class="min-h-0 overflow-y-auto bg-card">
{#if codeHtml}
<div class="tab-size-2 p-4 font-mono text-sm leading-relaxed">
{@html codeHtml}
@@ -339,7 +339,11 @@
<Card.Root>
<Card.Header>
<Card.Title>Authentication</Card.Title>
<Card.Description>Manage OIDC and login methods.</Card.Description>
<Card.Description>
Manage OIDC and login methods. Callback endpoint is <span class="font-mono">
/oidc/callback
</span>.
</Card.Description>
</Card.Header>
<Card.Content class="space-y-6">
{@render settingsGroup('oauth')}
@@ -3,7 +3,6 @@
import { Input } from '$lib/components/ui/input/index.js';
import { Label } from '$lib/components/ui/label/index.js';
import PasswordInput from '$lib/components/ui/password-input/password-input.svelte';
import Separator from '$lib/components/ui/separator/separator.svelte';
import logo from '$lib/assets/logo.svg';
import { user } from '$lib/api/users.svelte';
import { BackendURL } from '$lib/config';
@@ -75,8 +74,6 @@
<span class="text-xs text-muted-foreground">Or continue With</span>
<hr class="border-dashed" />
</div>
<Separator class="my-5" />
{/if}
{#if oidcStatus.data.oidcEnabled}