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.
Showing the changes to packages (25 of 37 files). Show all
Unified · Split
| @@ -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 { |