The vendored fumadb fork was published under the bare name "fumadb", which collides with the upstream npm package — so a published @executor-js/sdk would resolve the wrong dependency. Scope the package to @executor-js/fumadb and update every workspace dependency, import specifier, and the build filter to match.
Unified · Split
| @@ -35,6 +35,7 @@ · 34 unmodified lines | ||
| 35 | 35 | "@executor-js/api": "workspace:*", |
| 36 | 36 | "@executor-js/cloudflare": "workspace:*", |
| 37 | 37 | "@executor-js/execution": "workspace:*", |
| 38 | + "@executor-js/fumadb": "workspace:*", | |
| 38 | 39 | "@executor-js/host-mcp": "workspace:*", |
| 39 | 40 | "@executor-js/plugin-graphql": "workspace:*", |
| 40 | 41 | "@executor-js/plugin-mcp": "workspace:*", |
| @@ -63,7 +64,6 @@ · 22 unmodified lines | ||
| 63 | 64 | "autumn-js": "^1.2.8", |
| 64 | 65 | "drizzle-orm": "catalog:", |
| 65 | 66 | "effect": "catalog:", |
| 66 | − "fumadb": "workspace:*", | |
| 67 | 67 | "jose": "^5.6.3", |
| 68 | 68 | "postgres": "^3.4.9", |
| 69 | 69 | "posthog-js": "^1.372.5", |
| @@ -8,7 +8,7 @@ import { · 7 unmodified lines | ||
| 8 | 8 | uniqueIndex, |
| 9 | 9 | bigint, |
| 10 | 10 | } from "drizzle-orm/pg-core"; |
| 11 | −import { createId } from "fumadb/cuid"; | |
| 11 | +import { createId } from "@executor-js/fumadb/cuid"; | |
| 12 | 12 | |
| 13 | 13 | export const integration = pgTable( |
| 14 | 14 | "integration", |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | import { Effect, Layer } from "effect"; |
| 2 | −import { type FumaDB } from "fumadb"; | |
| 3 | −import { type DrizzleConfig } from "fumadb/adapters/drizzle"; | |
| 4 | −import { type schema as fumaSchema, type RelationsMap } from "fumadb/schema"; | |
| 2 | +import { type FumaDB } from "@executor-js/fumadb"; | |
| 3 | +import { type DrizzleConfig } from "@executor-js/fumadb/adapters/drizzle"; | |
| 4 | +import { type schema as fumaSchema, type RelationsMap } from "@executor-js/fumadb/schema"; | |
| 5 | 5 | |
| 6 | 6 | import { |
| 7 | 7 | createExecutorFumaDb, |
| @@ -20,6 +20,7 @@ · 19 unmodified lines | ||
| 20 | 20 | "@executor-js/app": "workspace:*", |
| 21 | 21 | "@executor-js/cloudflare": "workspace:*", |
| 22 | 22 | "@executor-js/execution": "workspace:*", |
| 23 | + "@executor-js/fumadb": "workspace:*", | |
| 23 | 24 | "@executor-js/host-mcp": "workspace:*", |
| 24 | 25 | "@executor-js/plugin-encrypted-secrets": "workspace:*", |
| 25 | 26 | "@executor-js/plugin-graphql": "workspace:*", |
| @@ -33,7 +34,6 @@ · 7 unmodified lines | ||
| 33 | 34 | "@tanstack/react-router": "catalog:", |
| 34 | 35 | "drizzle-orm": "catalog:", |
| 35 | 36 | "effect": "catalog:", |
| 36 | − "fumadb": "workspace:*", | |
| 37 | 37 | "jose": "^5.9.6", |
| 38 | 38 | "quickjs-emscripten-core": "0.31.0", |
| 39 | 39 | "react": "catalog:", |
| @@ -2,7 +2,7 @@ import { drizzle } from "drizzle-orm/d1"; · 1 unmodified line | ||
| 2 | 2 | import { |
| 3 | 3 | createDrizzleRuntimeSchemaFromTables, |
| 4 | 4 | ensureDrizzleRuntimeSchemaFromTables, |
| 5 | −} from "fumadb/adapters/drizzle"; | |
| 5 | +} from "@executor-js/fumadb/adapters/drizzle"; | |
| 6 | 6 | import type { D1Database, R2Bucket } from "@cloudflare/workers-types"; |
| 7 | 7 | |
| 8 | 8 | import { wrapD1WithR2Offload } from "./r2-blob-offload"; |
| @@ -23,6 +23,7 @@ · 22 unmodified lines | ||
| 23 | 23 | "@executor-js/api": "workspace:*", |
| 24 | 24 | "@executor-js/app": "workspace:*", |
| 25 | 25 | "@executor-js/execution": "workspace:*", |
| 26 | + "@executor-js/fumadb": "workspace:*", | |
| 26 | 27 | "@executor-js/host-mcp": "workspace:*", |
| 27 | 28 | "@executor-js/plugin-encrypted-secrets": "workspace:*", |
| 28 | 29 | "@executor-js/plugin-graphql": "workspace:*", |
| @@ -38,7 +39,6 @@ · 9 unmodified lines | ||
| 38 | 39 | "better-auth": "^1.6.11", |
| 39 | 40 | "drizzle-orm": "catalog:", |
| 40 | 41 | "effect": "catalog:", |
| 41 | − "fumadb": "workspace:*", | |
| 42 | 42 | "react": "catalog:", |
| 43 | 43 | "react-dom": "catalog:" |
| 44 | 44 | }, |
| @@ -3,12 +3,12 @@ import { dirname, resolve } from "node:path"; · 2 unmodified lines | ||
| 3 | 3 | |
| 4 | 4 | import { createClient, type Client } from "@libsql/client"; |
| 5 | 5 | import { drizzle, type LibSQLDatabase } from "drizzle-orm/libsql"; |
| 6 | −import { type FumaDB } from "fumadb"; | |
| 6 | +import { type FumaDB } from "@executor-js/fumadb"; | |
| 7 | 7 | import { |
| 8 | 8 | createDrizzleRuntimeSchemaFromTables, |
| 9 | 9 | ensureDrizzleRuntimeSchemaFromTables, |
| 10 | −} from "fumadb/adapters/drizzle"; | |
| 11 | −import { type schema as fumaSchema, type RelationsMap } from "fumadb/schema"; | |
| 10 | +} from "@executor-js/fumadb/adapters/drizzle"; | |
| 11 | +import { type schema as fumaSchema, type RelationsMap } from "@executor-js/fumadb/schema"; | |
| 12 | 12 | import { Context, Effect, Layer } from "effect"; |
| 13 | 13 | |
| 14 | 14 | import { |
| @@ -25,6 +25,7 @@ · 24 unmodified lines | ||
| 25 | 25 | "@executor-js/app": "workspace:*", |
| 26 | 26 | "@executor-js/config": "workspace:*", |
| 27 | 27 | "@executor-js/execution": "workspace:*", |
| 28 | + "@executor-js/fumadb": "workspace:*", | |
| 28 | 29 | "@executor-js/host-mcp": "workspace:*", |
| 29 | 30 | "@executor-js/integrations-registry": "workspace:*", |
| 30 | 31 | "@executor-js/plugin-desktop-settings": "workspace:*", |
| @@ -44,7 +45,6 @@ · 13 unmodified lines | ||
| 44 | 45 | "@tanstack/react-router": "catalog:", |
| 45 | 46 | "drizzle-orm": "catalog:", |
| 46 | 47 | "effect": "catalog:", |
| 47 | − "fumadb": "workspace:*", | |
| 48 | 48 | "jsonc-parser": "^3.3.1", |
| 49 | 49 | "react": "catalog:", |
| 50 | 50 | "react-dom": "catalog:" |
| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | import { type Client } from "@libsql/client"; |
| 2 | 2 | import { Layer } from "effect"; |
| 3 | 3 | import { drizzle, type LibSQLDatabase } from "drizzle-orm/libsql"; |
| 4 | −import { type FumaDB } from "fumadb"; | |
| 4 | +import { type FumaDB } from "@executor-js/fumadb"; | |
| 5 | 5 | import { |
| 6 | 6 | createDrizzleRuntimeSchemaFromTables, |
| 7 | 7 | createDrizzleRuntimeSchemaSqlFromTables, |
| 8 | −} from "fumadb/adapters/drizzle"; | |
| 9 | −import { type schema as fumaSchema, type RelationsMap } from "fumadb/schema"; | |
| 8 | +} from "@executor-js/fumadb/adapters/drizzle"; | |
| 9 | +import { type schema as fumaSchema, type RelationsMap } from "@executor-js/fumadb/schema"; | |
| 10 | 10 | |
| 11 | 11 | import { createExecutorFumaDb, DbProvider, type ExecutorDbHandle } from "@executor-js/api/server"; |
| 12 | 12 | import type { FumaDb, FumaTables } from "@executor-js/sdk"; |
| @@ -4,7 +4,7 @@ import type { Client } from "@libsql/client"; · 3 unmodified lines | ||
| 4 | 4 | import { drizzle } from "drizzle-orm/libsql"; |
| 5 | 5 | import { migrate } from "drizzle-orm/libsql/migrator"; |
| 6 | 6 | import { Effect } from "effect"; |
| 7 | −import { createId } from "fumadb/cuid"; | |
| 7 | +import { createId } from "@executor-js/fumadb/cuid"; | |
| 8 | 8 | import { createHash, randomBytes } from "node:crypto"; |
| 9 | 9 | import * as fs from "node:fs"; |
| 10 | 10 | import { homedir, tmpdir } from "node:os"; |
| @@ -62,6 +62,7 @@ · 61 unmodified lines | ||
| 62 | 62 | "@executor-js/api": "workspace:*", |
| 63 | 63 | "@executor-js/cloudflare": "workspace:*", |
| 64 | 64 | "@executor-js/execution": "workspace:*", |
| 65 | + "@executor-js/fumadb": "workspace:*", | |
| 65 | 66 | "@executor-js/host-mcp": "workspace:*", |
| 66 | 67 | "@executor-js/plugin-graphql": "workspace:*", |
| 67 | 68 | "@executor-js/plugin-mcp": "workspace:*", |
| @@ -90,7 +91,6 @@ · 22 unmodified lines | ||
| 90 | 91 | "autumn-js": "^1.2.8", |
| 91 | 92 | "drizzle-orm": "catalog:", |
| 92 | 93 | "effect": "catalog:", |
| 93 | − "fumadb": "workspace:*", | |
| 94 | 94 | "jose": "^5.6.3", |
| 95 | 95 | "postgres": "^3.4.9", |
| 96 | 96 | "posthog-js": "^1.372.5", |
| @@ -161,6 +161,7 @@ · 64 unmodified lines | ||
| 161 | 161 | "@executor-js/app": "workspace:*", |
| 162 | 162 | "@executor-js/cloudflare": "workspace:*", |
| 163 | 163 | "@executor-js/execution": "workspace:*", |
| 164 | + "@executor-js/fumadb": "workspace:*", | |
| 164 | 165 | "@executor-js/host-mcp": "workspace:*", |
| 165 | 166 | "@executor-js/plugin-encrypted-secrets": "workspace:*", |
| 166 | 167 | "@executor-js/plugin-graphql": "workspace:*", |
| @@ -174,7 +175,6 @@ · 7 unmodified lines | ||
| 174 | 175 | "@tanstack/react-router": "catalog:", |
| 175 | 176 | "drizzle-orm": "catalog:", |
| 176 | 177 | "effect": "catalog:", |
| 177 | − "fumadb": "workspace:*", | |
| 178 | 178 | "jose": "^5.9.6", |
| 179 | 179 | "quickjs-emscripten-core": "0.31.0", |
| 180 | 180 | "react": "catalog:", |
| @@ -206,6 +206,7 @@ · 25 unmodified lines | ||
| 206 | 206 | "@executor-js/api": "workspace:*", |
| 207 | 207 | "@executor-js/app": "workspace:*", |
| 208 | 208 | "@executor-js/execution": "workspace:*", |
| 209 | + "@executor-js/fumadb": "workspace:*", | |
| 209 | 210 | "@executor-js/host-mcp": "workspace:*", |
| 210 | 211 | "@executor-js/plugin-encrypted-secrets": "workspace:*", |
| 211 | 212 | "@executor-js/plugin-graphql": "workspace:*", |
| @@ -221,7 +222,6 @@ · 9 unmodified lines | ||
| 221 | 222 | "better-auth": "^1.6.11", |
| 222 | 223 | "drizzle-orm": "catalog:", |
| 223 | 224 | "effect": "catalog:", |
| 224 | − "fumadb": "workspace:*", | |
| 225 | 225 | "react": "catalog:", |
| 226 | 226 | "react-dom": "catalog:", |
| 227 | 227 | }, |
| @@ -250,6 +250,7 @@ · 22 unmodified lines | ||
| 250 | 250 | "@executor-js/app": "workspace:*", |
| 251 | 251 | "@executor-js/config": "workspace:*", |
| 252 | 252 | "@executor-js/execution": "workspace:*", |
| 253 | + "@executor-js/fumadb": "workspace:*", | |
| 253 | 254 | "@executor-js/host-mcp": "workspace:*", |
| 254 | 255 | "@executor-js/integrations-registry": "workspace:*", |
| 255 | 256 | "@executor-js/plugin-desktop-settings": "workspace:*", |
| @@ -269,7 +270,6 @@ · 13 unmodified lines | ||
| 269 | 270 | "@tanstack/react-router": "catalog:", |
| 270 | 271 | "drizzle-orm": "catalog:", |
| 271 | 272 | "effect": "catalog:", |
| 272 | − "fumadb": "workspace:*", | |
| 273 | 273 | "jsonc-parser": "^3.3.1", |
| 274 | 274 | "react": "catalog:", |
| 275 | 275 | "react-dom": "catalog:", |
| @@ -436,10 +436,10 @@ · 160 unmodified lines | ||
| 436 | 436 | "executor-sdk": "./dist/index.js", |
| 437 | 437 | }, |
| 438 | 438 | "dependencies": { |
| 439 | + "@executor-js/fumadb": "workspace:*", | |
| 439 | 440 | "@executor-js/sdk": "workspace:*", |
| 440 | 441 | "commander": "^12.1.0", |
| 441 | 442 | "effect": "catalog:", |
| 442 | − "fumadb": "workspace:*", | |
| 443 | 443 | "jiti": "^2.6.1", |
| 444 | 444 | }, |
| 445 | 445 | "devDependencies": { |
| @@ -493,7 +493,7 @@ · 47 unmodified lines | ||
| 493 | 493 | }, |
| 494 | 494 | }, |
| 495 | 495 | "packages/core/fumadb": { |
| 496 | − "name": "fumadb", | |
| 496 | + "name": "@executor-js/fumadb", | |
| 497 | 497 | "version": "0.3.0", |
| 498 | 498 | "dependencies": { |
| 499 | 499 | "@clack/prompts": "^1.3.0", |
| @@ -540,9 +540,9 @@ · 40 unmodified lines | ||
| 540 | 540 | "name": "@executor-js/sdk", |
| 541 | 541 | "version": "1.5.4", |
| 542 | 542 | "dependencies": { |
| 543 | + "@executor-js/fumadb": "workspace:*", | |
| 543 | 544 | "@standard-schema/spec": "^1.1.0", |
| 544 | 545 | "fractional-indexing": "^3.2.0", |
| 545 | − "fumadb": "workspace:*", | |
| 546 | 546 | "oauth4webapi": "^3.8.5", |
| 547 | 547 | }, |
| 548 | 548 | "devDependencies": { |
| @@ -709,11 +709,11 @@ · 160 unmodified lines | ||
| 709 | 709 | "@electric-sql/pglite": "^0.4.4", |
| 710 | 710 | "@electric-sql/pglite-socket": "^0.1.4", |
| 711 | 711 | "@executor-js/execution": "workspace:*", |
| 712 | + "@executor-js/fumadb": "workspace:*", | |
| 712 | 713 | "@executor-js/plugin-openapi": "workspace:*", |
| 713 | 714 | "@executor-js/sdk": "workspace:*", |
| 714 | 715 | "@types/node": "catalog:", |
| 715 | 716 | "drizzle-orm": "catalog:", |
| 716 | − "fumadb": "workspace:*", | |
| 717 | 717 | "postgres": "^3.4.9", |
| 718 | 718 | "vitest": "catalog:", |
| 719 | 719 | "wrangler": "^4.81.0", |
| @@ -1523,6 +1523,8 @@ · 803 unmodified lines | ||
| 1523 | 1523 | |
| 1524 | 1524 | "@executor-js/execution": ["@executor-js/execution@workspace:packages/core/execution"], |
| 1525 | 1525 | |
| 1526 | + "@executor-js/fumadb": ["@executor-js/fumadb@workspace:packages/core/fumadb"], | |
| 1527 | + | |
| 1526 | 1528 | "@executor-js/host-cloudflare": ["@executor-js/host-cloudflare@workspace:apps/host-cloudflare"], |
| 1527 | 1529 | |
| 1528 | 1530 | "@executor-js/host-mcp": ["@executor-js/host-mcp@workspace:packages/hosts/mcp"], |
| @@ -3453,8 +3455,6 @@ · 1924 unmodified lines | ||
| 3453 | 3455 | |
| 3454 | 3456 | "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], |
| 3455 | 3457 | |
| 3456 | − "fumadb": ["fumadb@workspace:packages/core/fumadb"], | |
| 3457 | − | |
| 3458 | 3458 | "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], |
| 3459 | 3459 | |
| 3460 | 3460 | "gensync": ["gensync@1.0.0-beta.2", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="], |
| @@ -5139,6 +5139,8 @@ · 1678 unmodified lines | ||
| 5139 | 5139 | |
| 5140 | 5140 | "@executor-js/example-promise-sdk/typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="], |
| 5141 | 5141 | |
| 5142 | + "@executor-js/fumadb/commander": ["commander@14.0.3", "", {}, "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw=="], | |
| 5143 | + | |
| 5142 | 5144 | "@graphql-tools/executor/@graphql-tools/utils": ["@graphql-tools/utils@11.1.0", "", { "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@whatwg-node/promise-helpers": "^1.0.0", "cross-inspect": "1.0.1", "tslib": "^2.4.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-PtFVG4r8Z2LEBSaPYQMusBiB3o6kjLVJyjCLbnWem/SpSuM21v6LTmgpkXfYU1qpBV2UGsFyuEnSJInl8fR1Ag=="], |
| 5143 | 5145 | |
| 5144 | 5146 | "@graphql-tools/merge/@graphql-tools/utils": ["@graphql-tools/utils@11.1.0", "", { "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@whatwg-node/promise-helpers": "^1.0.0", "cross-inspect": "1.0.1", "tslib": "^2.4.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-PtFVG4r8Z2LEBSaPYQMusBiB3o6kjLVJyjCLbnWem/SpSuM21v6LTmgpkXfYU1qpBV2UGsFyuEnSJInl8fR1Ag=="], |
| @@ -5451,8 +5453,6 @@ · 306 unmodified lines | ||
| 5451 | 5453 | |
| 5452 | 5454 | "form-data/mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="], |
| 5453 | 5455 | |
| 5454 | − "fumadb/commander": ["commander@14.0.3", "", {}, "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw=="], | |
| 5455 | − | |
| 5456 | 5456 | "glob/minimatch": ["minimatch@9.0.9", "", { "dependencies": { "brace-expansion": "^2.0.2" } }, "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg=="], |
| 5457 | 5457 | |
| 5458 | 5458 | "globby/ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="], |
| @@ -36,7 +36,7 @@ · 35 unmodified lines | ||
| 36 | 36 | "test": "turbo run test --filter=!@executor-js/e2e", |
| 37 | 37 | "test:e2e": "bun run --cwd e2e test", |
| 38 | 38 | "test:release:bootstrap": "vitest run tests/release-bootstrap-smoke.test.ts", |
| 39 | − "build:packages": "bun run --filter='fumadb' build && bun run --filter='@executor-js/codemode-core' build && bun run --filter='@executor-js/runtime-quickjs' build && bun run --filter='@executor-js/sdk' build && bun run --filter='@executor-js/config' build && bun run --filter='@executor-js/execution' build && bun run --filter='@executor-js/cli' build && bun run --filter='@executor-js/plugin-*' build", | |
| 39 | + "build:packages": "bun run --filter='@executor-js/fumadb' build && bun run --filter='@executor-js/codemode-core' build && bun run --filter='@executor-js/runtime-quickjs' build && bun run --filter='@executor-js/sdk' build && bun run --filter='@executor-js/config' build && bun run --filter='@executor-js/execution' build && bun run --filter='@executor-js/cli' build && bun run --filter='@executor-js/plugin-*' build", | |
| 40 | 40 | "typecheck": "turbo run typecheck", |
| 41 | 41 | "typecheck:slow": "turbo run typecheck:slow", |
| 42 | 42 | "ci": "bun run lint && bun run typecheck && bun run test", |
| @@ -40,10 +40,10 @@ · 39 unmodified lines | ||
| 40 | 40 | "typecheck": "tsc --noEmit" |
| 41 | 41 | }, |
| 42 | 42 | "dependencies": { |
| 43 | + "@executor-js/fumadb": "workspace:*", | |
| 43 | 44 | "@executor-js/sdk": "workspace:*", |
| 44 | 45 | "commander": "^12.1.0", |
| 45 | 46 | "effect": "catalog:", |
| 46 | − "fumadb": "workspace:*", | |
| 47 | 47 | "jiti": "^2.6.1" |
| 48 | 48 | }, |
| 49 | 49 | "devDependencies": { |
| @@ -36,9 +36,9 @@ const schemaGenerateAction = async (opts: SchemaGenerateOptions) => { · 35 unmodified lines | ||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | const [{ fumadb }, { drizzleAdapter }, { schema: fumaSchema }] = await Promise.all([ |
| 39 | − import("fumadb"), | |
| 40 | − import("fumadb/adapters/drizzle"), | |
| 41 | − import("fumadb/schema"), | |
| 39 | + import("@executor-js/fumadb"), | |
| 40 | + import("@executor-js/fumadb/adapters/drizzle"), | |
| 41 | + import("@executor-js/fumadb/schema"), | |
| 42 | 42 | ]); |
| 43 | 43 | |
| 44 | 44 | const schema = fumaSchema({ |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | { |
| 2 | − "name": "fumadb", | |
| 2 | + "name": "@executor-js/fumadb", | |
| 3 | 3 | "description": "A library for interacting with different databases for your package.", |
| 4 | 4 | "version": "0.3.0", |
| 5 | 5 | "repository": { |
| @@ -173,7 +173,7 @@ export function generateSchema( · 172 unmodified lines | ||
| 173 | 173 | const value = JSON.stringify(column.default.value); |
| 174 | 174 | col.push(`default(${value})`); |
| 175 | 175 | } else if (column.default.runtime === "auto") { |
| 176 | − imports.addImport("createId", "fumadb/cuid"); | |
| 176 | + imports.addImport("createId", "@executor-js/fumadb/cuid"); | |
| 177 | 177 | col.push("$defaultFn(() => createId())"); |
| 178 | 178 | } else if (column.default.runtime === "now") { |
| 179 | 179 | col.push("defaultNow()"); |
| @@ -231,7 +231,7 @@ export function execute( · 230 unmodified lines | ||
| 231 | 231 | const { |
| 232 | 232 | db, |
| 233 | 233 | provider, |
| 234 | − relationMode = provider === "mssql" ? "fumadb" : "foreign-keys", | |
| 234 | + relationMode = provider === "mssql" ? "@executor-js/fumadb" : "foreign-keys", | |
| 235 | 235 | } = config; |
| 236 | 236 | |
| 237 | 237 | function createTable( |
| @@ -254,7 +254,7 @@ export function execute( · 16 unmodified lines | ||
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | for (const foreignKey of table.foreignKeys) { |
| 257 | − if (relationMode === "fumadb") break; | |
| 257 | + if (relationMode === "@executor-js/fumadb") break; | |
| 258 | 258 | const compiled = compileForeignKey(foreignKey, "sql"); |
| 259 | 259 | |
| 260 | 260 | builder = builder.addForeignKeyConstraint( |
| @@ -166,7 +166,7 @@ export function fromKysely( · 165 unmodified lines | ||
| 166 | 166 | const { |
| 167 | 167 | db: kysely, |
| 168 | 168 | provider, |
| 169 | − relationMode = provider === "mssql" ? "fumadb" : "foreign-keys", | |
| 169 | + relationMode = provider === "mssql" ? "@executor-js/fumadb" : "foreign-keys", | |
| 170 | 170 | } = config; |
| 171 | 171 | |
| 172 | 172 | /** |
| @@ -520,7 +520,7 @@ export function fromKysely( · 347 unmodified lines | ||
| 520 | 520 | }, |
| 521 | 521 | }; |
| 522 | 522 | |
| 523 | − if (relationMode === "fumadb") | |
| 523 | + if (relationMode === "@executor-js/fumadb") | |
| 524 | 524 | adapter = createSoftForeignKey(schema, { |
| 525 | 525 | ...adapter, |
| 526 | 526 | generateInsertValuesDefault(table, values) { |
| @@ -38,7 +38,7 @@ export function generateMigrationFromSchema( · 37 unmodified lines | ||
| 38 | 38 | const { |
| 39 | 39 | provider, |
| 40 | 40 | relationMode = provider === "mssql" || provider === "mongodb" |
| 41 | − ? "fumadb" | |
| 41 | + ? "@executor-js/fumadb" | |
| 42 | 42 | : "foreign-keys", |
| 43 | 43 | dropUnusedTables = true, |
| 44 | 44 | dropUnusedColumns = true, |
| @@ -205,7 +205,7 @@ export function generateMigrationFromSchema( · 160 unmodified lines | ||
| 205 | 205 | ): Operation[] { |
| 206 | 206 | const tableName = getName(newTable.names); |
| 207 | 207 | const operations: Operation[] = []; |
| 208 | − if (relationMode === "fumadb") return operations; | |
| 208 | + if (relationMode === "@executor-js/fumadb") return operations; | |
| 209 | 209 | |
| 210 | 210 | for (const foreignKey of newTable.foreignKeys) { |
| 211 | 211 | const compiled = compileForeignKey(foreignKey, "sql"); |
| @@ -2,14 +2,14 @@ import Database from "better-sqlite3"; · 1 unmodified line | ||
| 2 | 2 | import { describe, expect, it } from "@effect/vitest"; |
| 3 | 3 | import { drizzle } from "drizzle-orm/better-sqlite3"; |
| 4 | 4 | import { Effect } from "effect"; |
| 5 | −import { fumadb } from "fumadb"; | |
| 5 | +import { fumadb } from "@executor-js/fumadb"; | |
| 6 | 6 | import { |
| 7 | 7 | createDrizzleRuntimeSchemaFromTables, |
| 8 | 8 | createDrizzleRuntimeSchemaSqlFromTables, |
| 9 | 9 | drizzleAdapter, |
| 10 | −} from "fumadb/adapters/drizzle"; | |
| 11 | −import { withQueryContext, type AbstractQuery } from "fumadb/query"; | |
| 12 | −import { column, idColumn, schema, table } from "fumadb/schema"; | |
| 10 | +} from "@executor-js/fumadb/adapters/drizzle"; | |
| 11 | +import { withQueryContext, type AbstractQuery } from "@executor-js/fumadb/query"; | |
| 12 | +import { column, idColumn, schema, table } from "@executor-js/fumadb/schema"; | |
| 13 | 13 | |
| 14 | 14 | interface TenantPolicyContext { |
| 15 | 15 | readonly allowedTenantIds: ReadonlySet<string>; |
| @@ -35,4 +35,4 @@ export interface KyselyConfig { · 34 unmodified lines | ||
| 35 | 35 | relationMode?: RelationMode; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | −export type RelationMode = "foreign-keys" | "fumadb"; | |
| 38 | +export type RelationMode = "foreign-keys" | "@executor-js/fumadb"; | |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import { mysqlTable, varchar, foreignKey, text, customType } from "drizzle-orm/mysql-core" |
| 2 | −import { createId } from "fumadb/cuid" | |
| 2 | +import { createId } from "@executor-js/fumadb/cuid" | |
| 3 | 3 | import { relations } from "drizzle-orm" |
| 4 | 4 | |
| 5 | 5 | export const users = mysqlTable("users", { |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import { pgTable, varchar, foreignKey, text, customType } from "drizzle-orm/pg-core" |
| 2 | −import { createId } from "fumadb/cuid" | |
| 2 | +import { createId } from "@executor-js/fumadb/cuid" | |
| 3 | 3 | import { relations } from "drizzle-orm" |
| 4 | 4 | |
| 5 | 5 | export const users = pgTable("users", { |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import { sqliteTable, text, foreignKey, customType } from "drizzle-orm/sqlite-core" |
| 2 | −import { createId } from "fumadb/cuid" | |
| 2 | +import { createId } from "@executor-js/fumadb/cuid" | |
| 3 | 3 | import { relations } from "drizzle-orm" |
| 4 | 4 | |
| 5 | 5 | export const users = sqliteTable("users", { |
| @@ -4,7 +4,7 @@ import path from "node:path"; · 3 unmodified lines | ||
| 4 | 4 | export default defineConfig({ |
| 5 | 5 | resolve: { |
| 6 | 6 | alias: { |
| 7 | − "fumadb/cuid": path.resolve(import.meta.dirname, "./src/cuid.ts"), | |
| 7 | + "@executor-js/fumadb/cuid": path.resolve(import.meta.dirname, "./src/cuid.ts"), | |
| 8 | 8 | }, |
| 9 | 9 | }, |
| 10 | 10 | test: { |
| @@ -86,9 +86,9 @@ · 85 unmodified lines | ||
| 86 | 86 | "typecheck:slow": "tsc --noEmit" |
| 87 | 87 | }, |
| 88 | 88 | "dependencies": { |
| 89 | + "@executor-js/fumadb": "workspace:*", | |
| 89 | 90 | "@standard-schema/spec": "^1.1.0", |
| 90 | 91 | "fractional-indexing": "^3.2.0", |
| 91 | − "fumadb": "workspace:*", | |
| 92 | 92 | "oauth4webapi": "^3.8.5" |
| 93 | 93 | }, |
| 94 | 94 | "devDependencies": { |
| @@ -1,5 +1,5 @@ | ||
| 1 | −import { column, idColumn, table, type AnyColumn, type AnyTable } from "fumadb/schema"; | |
| 2 | −import type { Condition, ConditionBuilder } from "fumadb/query"; | |
| 1 | +import { column, idColumn, table, type AnyColumn, type AnyTable } from "@executor-js/fumadb/schema"; | |
| 2 | +import type { Condition, ConditionBuilder } from "@executor-js/fumadb/query"; | |
| 3 | 3 | |
| 4 | 4 | import { StorageError, type FumaRow } from "./fuma-runtime"; |
| 5 | 5 | import { |
| @@ -18,10 +18,10 @@ · 17 unmodified lines | ||
| 18 | 18 | // root barrel — host code imports it from `@executor-js/sdk/host-internal`. |
| 19 | 19 | // --------------------------------------------------------------------------- |
| 20 | 20 | |
| 21 | −import { fumadb, type FumaDB } from "fumadb"; | |
| 22 | −import { type DrizzleRuntimeProvider } from "fumadb/adapters/drizzle"; | |
| 23 | −import { drizzleAdapter } from "fumadb/adapters/drizzle"; | |
| 24 | −import { schema as fumaSchema, type RelationsMap } from "fumadb/schema"; | |
| 21 | +import { fumadb, type FumaDB } from "@executor-js/fumadb"; | |
| 22 | +import { type DrizzleRuntimeProvider } from "@executor-js/fumadb/adapters/drizzle"; | |
| 23 | +import { drizzleAdapter } from "@executor-js/fumadb/adapters/drizzle"; | |
| 24 | +import { schema as fumaSchema, type RelationsMap } from "@executor-js/fumadb/schema"; | |
| 25 | 25 | |
| 26 | 26 | import type { FumaDb, FumaTables } from "./fuma-runtime"; |
| 27 | 27 | |
| @@ -1,10 +1,10 @@ | ||
| 1 | 1 | import { Effect, Layer, Option, Predicate, Schema } from "effect"; |
| 2 | 2 | import { FetchHttpClient, type HttpClient } from "effect/unstable/http"; |
| 3 | −import { fumadb } from "fumadb"; | |
| 4 | −import { memoryAdapter } from "fumadb/adapters/memory"; | |
| 5 | −import { withQueryContext, type Condition, type ConditionBuilder } from "fumadb/query"; | |
| 6 | −import { schema as fumaSchema, type RelationsMap } from "fumadb/schema"; | |
| 7 | −import type { AnyColumn } from "fumadb/schema"; | |
| 3 | +import { fumadb } from "@executor-js/fumadb"; | |
| 4 | +import { memoryAdapter } from "@executor-js/fumadb/adapters/memory"; | |
| 5 | +import { withQueryContext, type Condition, type ConditionBuilder } from "@executor-js/fumadb/query"; | |
| 6 | +import { schema as fumaSchema, type RelationsMap } from "@executor-js/fumadb/schema"; | |
| 7 | +import type { AnyColumn } from "@executor-js/fumadb/schema"; | |
| 8 | 8 | import { generateKeyBetween } from "fractional-indexing"; |
| 9 | 9 | |
| 10 | 10 | import { |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | import { Cause, Context, Data, Effect, Exit, Layer, Predicate } from "effect"; |
| 2 | −import type { AbstractQuery } from "fumadb/query"; | |
| 3 | −import type { AnySchema, AnyTable, Schema as FumaSchema } from "fumadb/schema"; | |
| 2 | +import type { AbstractQuery } from "@executor-js/fumadb/query"; | |
| 3 | +import type { AnySchema, AnyTable, Schema as FumaSchema } from "@executor-js/fumadb/schema"; | |
| 4 | 4 | |
| 5 | 5 | export class StorageError extends Data.TaggedError("StorageError")<{ |
| 6 | 6 | readonly message: string; |
| @@ -16,11 +16,17 @@ export { · 15 unmodified lines | ||
| 16 | 16 | } from "effect/unstable/httpapi"; |
| 17 | 17 | |
| 18 | 18 | // FumaDB integration. |
| 19 | −export { fumadb } from "fumadb"; | |
| 20 | −export type { FumaDB } from "fumadb"; | |
| 21 | −export type { AbstractQuery, Condition, ConditionBuilder } from "fumadb/query"; | |
| 22 | −export { column, idColumn, schema as fumaSchema, table } from "fumadb/schema"; | |
| 23 | −export type { AnyColumn, AnySchema, AnyTable, Column, Schema as FumaSchema } from "fumadb/schema"; | |
| 19 | +export { fumadb } from "@executor-js/fumadb"; | |
| 20 | +export type { FumaDB } from "@executor-js/fumadb"; | |
| 21 | +export type { AbstractQuery, Condition, ConditionBuilder } from "@executor-js/fumadb/query"; | |
| 22 | +export { column, idColumn, schema as fumaSchema, table } from "@executor-js/fumadb/schema"; | |
| 23 | +export type { | |
| 24 | + AnyColumn, | |
| 25 | + AnySchema, | |
| 26 | + AnyTable, | |
| 27 | + Column, | |
| 28 | + Schema as FumaSchema, | |
| 29 | +} from "@executor-js/fumadb/schema"; | |
| 24 | 30 | |
| 25 | 31 | export type { |
| 26 | 32 | FumaDb, |
| @@ -1,5 +1,5 @@ | ||
| 1 | −import { type Condition, type ConditionBuilder } from "fumadb/query"; | |
| 2 | −import type { AnyColumn, AnyTable } from "fumadb/schema"; | |
| 1 | +import { type Condition, type ConditionBuilder } from "@executor-js/fumadb/query"; | |
| 2 | +import type { AnyColumn, AnyTable } from "@executor-js/fumadb/schema"; | |
| 3 | 3 | |
| 4 | 4 | import { StorageError } from "./fuma-runtime"; |
| 5 | 5 | |
| @@ -2,12 +2,12 @@ import { createClient, type Client } from "@libsql/client"; · 1 unmodified line | ||
| 2 | 2 | import { drizzle, type LibSQLDatabase } from "drizzle-orm/libsql"; |
| 3 | 3 | import { mkdirSync } from "node:fs"; |
| 4 | 4 | import { dirname, resolve } from "node:path"; |
| 5 | −import { type FumaDB } from "fumadb"; | |
| 5 | +import { type FumaDB } from "@executor-js/fumadb"; | |
| 6 | 6 | import { |
| 7 | 7 | createDrizzleRuntimeSchemaFromTables, |
| 8 | 8 | createDrizzleRuntimeSchemaSqlFromTables, |
| 9 | −} from "fumadb/adapters/drizzle"; | |
| 10 | −import { type schema as fumaSchema, type RelationsMap } from "fumadb/schema"; | |
| 9 | +} from "@executor-js/fumadb/adapters/drizzle"; | |
| 10 | +import { type schema as fumaSchema, type RelationsMap } from "@executor-js/fumadb/schema"; | |
| 11 | 11 | |
| 12 | 12 | import { createExecutorFumaDb } from "./executor-fuma-db"; |
| 13 | 13 | import type { FumaDb, FumaTables } from "./fuma-runtime"; |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import { Context, Effect, Layer } from "effect"; |
| 2 | −import { withQueryContext } from "fumadb/query"; | |
| 2 | +import { withQueryContext } from "@executor-js/fumadb/query"; | |
| 3 | 3 | import { collectTables, createExecutor, type Executor, type ExecutorConfig } from "./executor"; |
| 4 | 4 | import type { FumaDb } from "./fuma-runtime"; |
| 5 | 5 | import { ProviderItemId, ProviderKey, Subject, Tenant } from "./ids"; |
| @@ -23,11 +23,11 @@ · 22 unmodified lines | ||
| 23 | 23 | "@electric-sql/pglite": "^0.4.4", |
| 24 | 24 | "@electric-sql/pglite-socket": "^0.1.4", |
| 25 | 25 | "@executor-js/execution": "workspace:*", |
| 26 | + "@executor-js/fumadb": "workspace:*", | |
| 26 | 27 | "@executor-js/plugin-openapi": "workspace:*", |
| 27 | 28 | "@executor-js/sdk": "workspace:*", |
| 28 | 29 | "@types/node": "catalog:", |
| 29 | 30 | "drizzle-orm": "catalog:", |
| 30 | − "fumadb": "workspace:*", | |
| 31 | 31 | "postgres": "^3.4.9", |
| 32 | 32 | "vitest": "catalog:", |
| 33 | 33 | "wrangler": "^4.81.0" |
| @@ -7,7 +7,7 @@ import { drizzle, type PgliteDatabase } from "drizzle-orm/pglite"; · 6 unmodified lines | ||
| 7 | 7 | import { |
| 8 | 8 | createDrizzleRuntimeSchemaFromTables, |
| 9 | 9 | ensureDrizzleRuntimeSchemaFromTables, |
| 10 | −} from "fumadb/adapters/drizzle"; | |
| 10 | +} from "@executor-js/fumadb/adapters/drizzle"; | |
| 11 | 11 | |
| 12 | 12 | import type { FumaTables } from "@executor-js/sdk"; |
| 13 | 13 | |
| @@ -21,9 +21,12 @@ import * as Effect from "effect/Effect"; · 20 unmodified lines | ||
| 21 | 21 | import * as Layer from "effect/Layer"; |
| 22 | 22 | import * as Predicate from "effect/Predicate"; |
| 23 | 23 | import { HttpClient, HttpClientResponse, type HttpClientRequest } from "effect/unstable/http"; |
| 24 | −import { fumadb } from "fumadb"; | |
| 25 | −import { createDrizzleRuntimeSchemaFromTables, drizzleAdapter } from "fumadb/adapters/drizzle"; | |
| 26 | −import { schema as fumaSchema } from "fumadb/schema"; | |
| 24 | +import { fumadb } from "@executor-js/fumadb"; | |
| 25 | +import { | |
| 26 | + createDrizzleRuntimeSchemaFromTables, | |
| 27 | + drizzleAdapter, | |
| 28 | +} from "@executor-js/fumadb/adapters/drizzle"; | |
| 29 | +import { schema as fumaSchema } from "@executor-js/fumadb/schema"; | |
| 27 | 30 | import postgres from "postgres"; |
| 28 | 31 | |
| 29 | 32 | import { |