mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-28 03:00:29 -04:00
* fix(deps): bump drizzle-orm to 0.45.2 (GHSA-gpj5-g38j-94v9) Resolves Dependabot alert #98. Drizzle ORM <0.45.2 improperly escaped quoted SQL identifiers, allowing SQL injection via untrusted input passed to APIs like sql.identifier() or .as(). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore(mcp): adopt native SDK types after @modelcontextprotocol/sdk 1.25.3 bump Replace hand-written schema/annotation shapes with the SDK's exported Tool, JSONRPCResultResponse, and Tool['annotations'] types so changes upstream flow through automatically. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(types): use drizzle $inferSelect for row types Replace hand-written interfaces that duplicated schema shape with typeof table.$inferSelect aliases for webhook, workflow, and workspaceFiles rows. Also simplify metadata insert/update to use .returning() instead of field-by-field copies. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(uploads): fall through to INSERT if restore-deleted row races a hard delete If a hard delete races between the initial SELECT and the restore UPDATE, .returning() yields no row. Previously the function would return undefined and silently violate the Promise<FileMetadataRecord> contract. Now the function falls through to the INSERT path, which already handles uniqueness races via the 23505 catch. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore(uploads): align metadata.ts with global standards Replace dynamic uuid import with generateId() per @sim/utils/id convention, narrow the error catch off `any`, and convert the inline comment to TSDoc. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
44 lines
1.0 KiB
JSON
44 lines
1.0 KiB
JSON
{
|
|
"name": "@sim/db",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"license": "Apache-2.0",
|
|
"engines": {
|
|
"bun": ">=1.2.13",
|
|
"node": ">=20.0.0"
|
|
},
|
|
"exports": {
|
|
".": {
|
|
"types": "./index.ts",
|
|
"default": "./index.ts"
|
|
},
|
|
"./schema": {
|
|
"types": "./schema.ts",
|
|
"default": "./schema.ts"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"db:push": "bunx drizzle-kit push --config=./drizzle.config.ts",
|
|
"db:migrate": "bun --env-file=.env run ./scripts/migrate.ts",
|
|
"db:studio": "bunx drizzle-kit studio --config=./drizzle.config.ts",
|
|
"type-check": "tsc --noEmit",
|
|
"lint": "biome check --write --unsafe .",
|
|
"lint:check": "biome check .",
|
|
"format": "biome format --write .",
|
|
"format:check": "biome format ."
|
|
},
|
|
"dependencies": {
|
|
"drizzle-orm": "^0.45.2",
|
|
"postgres": "^3.4.5",
|
|
"uuid": "^11.1.0",
|
|
"zod": "^3.24.2"
|
|
},
|
|
"devDependencies": {
|
|
"@sim/tsconfig": "workspace:*",
|
|
"drizzle-kit": "^0.31.4",
|
|
"@types/node": "^22.10.5",
|
|
"typescript": "^5.7.3"
|
|
}
|
|
}
|