From f6968e34018ea1983937416a8f8ff29c4066f01e Mon Sep 17 00:00:00 2001 From: Codex Bot Date: Thu, 17 Sep 2026 22:35:27 +0800 Subject: [PATCH] chore: harden deployment dependencies --- lib/storage.ts | 2 +- package-lock.json | 28 ++++++---------------------- package.json | 2 +- tsconfig.json | 2 +- 4 files changed, 9 insertions(+), 25 deletions(-) diff --git a/lib/storage.ts b/lib/storage.ts index 5f6003f..4e6bbc7 100644 --- a/lib/storage.ts +++ b/lib/storage.ts @@ -53,7 +53,7 @@ export async function listProjects() { export async function createProject(input: { name?: string; template?: string }) { const template = input.template || "basic"; - const templateRoot = path.join(TEMPLATES_ROOT, template); + const templateRoot = path.join(/* turbopackIgnore: true */ TEMPLATES_ROOT, template); await fs.access(templateRoot); const slug = (input.name || "新小工具").toLowerCase().replace(/[^a-z0-9\u4e00-\u9fff]+/g, "-").replace(/^-|-$/g, "").slice(0, 28) || "tool"; const id = `${slug}-${crypto.randomBytes(3).toString("hex")}`; diff --git a/package-lock.json b/package-lock.json index 6cc36d5..3c14dc8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@types/node": "^24.0.0", "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", - "dockerode": "^4.0.8", + "dockerode": "^5.0.1", "tar-fs": "^3.1.1", "tsx": "^4.20.0", "typescript": "^5.9.0" @@ -672,9 +672,9 @@ } }, "node_modules/dockerode": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-4.0.12.tgz", - "integrity": "sha512-/bCZd6KlGcjZO8Buqmi/vXuqEGVEZ0PNjx/biBNqJD3MhK9DmdiAuKxqfNhflgDESDIiBz3qF+0e55+CpnrUcw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-5.0.1.tgz", + "integrity": "sha512-avsq/xk4YPIrn0CgleX5bjT9Y8IT1p9PxrNQ++RBQ2WEyFfHCTDsT9kmyxz+H/axnjAwg8wJWEIuPGOUuNupiA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -683,11 +683,10 @@ "@grpc/proto-loader": "^0.7.13", "docker-modem": "^5.0.7", "protobufjs": "^7.3.2", - "tar-fs": "^2.1.4", - "uuid": "^10.0.0" + "tar-fs": "^2.1.4" }, "engines": { - "node": ">= 8.0" + "node": ">= 14.17" } }, "node_modules/dockerode/node_modules/readable-stream": { @@ -2357,21 +2356,6 @@ "version": "1.0.2", "license": "MIT" }, - "node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", diff --git a/package.json b/package.json index e1ec99e..95cc588 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@types/node": "^24.0.0", "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", - "dockerode": "^4.0.8", + "dockerode": "^5.0.1", "tar-fs": "^3.1.1", "tsx": "^4.20.0", "typescript": "^5.9.0" diff --git a/tsconfig.json b/tsconfig.json index e527661..9d5ace3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,6 @@ "incremental": true, "plugins": [{ "name": "next" }] }, - "include": ["next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx"], + "include": ["next-env.d.ts", ".next/types/**/*.ts", ".next/dev/types/**/*.ts", "**/*.ts", "**/*.tsx"], "exclude": ["node_modules", "data", "templates"] }