refactor(agent): centralize sandbox allowedDomains default in prisma schema

This commit is contained in:
yiling
2026-05-20 14:07:34 +08:00
parent fb30e63b47
commit 712b9d4185
4 changed files with 7 additions and 11 deletions
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "sandboxes" ALTER COLUMN "allowedDomains" SET DEFAULT ARRAY['npmjs.org', '*.npmjs.org', 'registry.npmjs.org', 'registry.yarnpkg.com', 'pypi.org', '*.pypi.org', 'github.com', '*.github.com', 'api.github.com', 'raw.githubusercontent.com']::TEXT[];
+1 -1
View File
@@ -226,7 +226,7 @@ model Team {
model Sandbox {
id String @id @default(ulid())
allowedDomains String[] @default(["github.com", "api.github.com", "raw.githubusercontent.com"])
allowedDomains String[] @default(["npmjs.org", "*.npmjs.org", "registry.npmjs.org", "registry.yarnpkg.com", "pypi.org", "*.pypi.org", "github.com", "*.github.com", "api.github.com", "raw.githubusercontent.com"])
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")