From 50fa66739e91f365be25eb5b77c959325b308b8c Mon Sep 17 00:00:00 2001 From: Ani Ravi <5902976+aniravi24@users.noreply.github.com> Date: Sat, 28 Sep 2024 00:21:33 -0400 Subject: [PATCH 1/6] feat: support multiple databases per project --- README.md | 60 +++--- packages/typefusion/example/main.ts | 22 +-- .../mysql/typefusion_all_mysql_types.ts | 47 +++++ .../example/mysql/typefusion_mysql_result.ts | 25 +++ .../example/options/typefusion_data_only.ts | 19 -- .../example/options/typefusion_no_types.ts | 18 -- .../example/options/typefusion_pg_result.ts | 21 --- .../example/options/typefusion_result.ts | 17 -- .../typefusion_all_pg_types.ts | 22 +-- .../example/postgres/typefusion_data_only.ts | 19 ++ .../example/postgres/typefusion_no_types.ts | 20 ++ .../example/postgres/typefusion_pg_result.ts | 21 +++ .../example/postgres/typefusion_result.ts | 17 ++ packages/typefusion/package.json | 1 + packages/typefusion/src/db/common/layer.ts | 17 ++ packages/typefusion/src/db/common/service.ts | 32 ++++ packages/typefusion/src/db/common/types.ts | 54 ++++++ packages/typefusion/src/db/mysql/client.ts | 42 +++++ packages/typefusion/src/db/mysql/types.ts | 104 +++++++++++ packages/typefusion/src/db/postgres/client.ts | 27 +-- packages/typefusion/src/db/postgres/types.ts | 59 ++---- packages/typefusion/src/helpers.ts | 36 +++- packages/typefusion/src/index.ts | 6 +- packages/typefusion/src/lib.ts | 85 +++++---- packages/typefusion/src/store.ts | 173 +++++++++++------- packages/typefusion/src/typefusion.ts | 16 +- packages/typefusion/src/types.ts | 20 +- pnpm-lock.yaml | 102 +++++++++++ 28 files changed, 798 insertions(+), 304 deletions(-) create mode 100644 packages/typefusion/example/mysql/typefusion_all_mysql_types.ts create mode 100644 packages/typefusion/example/mysql/typefusion_mysql_result.ts delete mode 100644 packages/typefusion/example/options/typefusion_data_only.ts delete mode 100644 packages/typefusion/example/options/typefusion_no_types.ts delete mode 100644 packages/typefusion/example/options/typefusion_pg_result.ts delete mode 100644 packages/typefusion/example/options/typefusion_result.ts rename packages/typefusion/example/{options => postgres}/typefusion_all_pg_types.ts (89%) create mode 100644 packages/typefusion/example/postgres/typefusion_data_only.ts create mode 100644 packages/typefusion/example/postgres/typefusion_no_types.ts create mode 100644 packages/typefusion/example/postgres/typefusion_pg_result.ts create mode 100644 packages/typefusion/example/postgres/typefusion_result.ts create mode 100644 packages/typefusion/src/db/common/layer.ts create mode 100644 packages/typefusion/src/db/common/service.ts create mode 100644 packages/typefusion/src/db/common/types.ts create mode 100644 packages/typefusion/src/db/mysql/client.ts create mode 100644 packages/typefusion/src/db/mysql/types.ts diff --git a/README.md b/README.md index 56cc45a..4d74150 100644 --- a/README.md +++ b/README.md @@ -23,11 +23,11 @@ ## Introduction -Typefusion allows you to run TypeScript scripts and materialize the results into a database (currently PostgreSQL only). It enables you to create complex workflows by allowing scripts to reference each other's results. Inspired by [Data Build Tool (DBT)](https://www.getdbt.com/). +Typefusion allows you to run TypeScript scripts and materialize the results into a database. It enables you to create complex workflows by allowing scripts to reference each other's results. Inspired by [Data Build Tool (DBT)](https://www.getdbt.com/). ## Key Features -- Execute TypeScript scripts and store results in PostgreSQL +- Execute TypeScript scripts and store results in your database - Create complex workflows with script dependencies - Type-safe references between scripts - Flexible usage through CLI and library modes @@ -49,10 +49,10 @@ To begin using Typefusion, follow these steps: bun add typefusion ``` -2. Configure your database connection using one of these methods: +2. Configure your database connection using one of these methods (PostgreSQL and MySQL are supported): - - Set a full connection string in the `PG_DATABASE_URL` environment variable. - - Set individual environment variables: `PGDATABASE`, `PGHOST`, `PGPORT`, `PGPASSWORD`, and `PGUSER`. + - Set a full connection string in the `PG_DATABASE_URL` or `MYSQL_DATABASE_URL` environment variable. + - Set individual environment variables: `PG_DATABASE`, `PG_HOST`, `PG_PORT`, `PG_PASSWORD`, and `PG_USER` (for postgres) or `MYSQL_DATABASE`, `MYSQL_HOST`, `MYSQL_PORT`, `MYSQL_PASSWORD`, and `MYSQL_USER` (for mysql). 3. Create a directory for your scripts (e.g., `workflows`). @@ -65,9 +65,10 @@ To begin using Typefusion, follow these steps: After following the above instructions, create a script file in the directory, for example, `main.ts`: ```ts -import { pgType, TypefusionPgResult } from "typefusion"; +// or mySqlType for mysql +import { pgType, typefusionRef, TypefusionDbResult } from "typefusion"; -export const mainSchema = { +const mainSchema = { id: pgType.integer().notNull(), name: pgType.text().notNull(), age: pgType.integer().notNull(), @@ -75,13 +76,13 @@ export const mainSchema = { address: pgType.text().notNull(), }; -export default async function main(): Promise< - TypefusionPgResult -> { - console.log("running main"); - return { - types: mainSchema, - data: [ +export default { + name: "main", + schema: mainSchema, + resultDatabase: "postgresql", + run: async () => { + console.log("running main"); + return [ { id: 1, name: "John Doe", @@ -89,9 +90,9 @@ export default async function main(): Promise< email: "john.doe@example.com", address: "123 Main St", }, - ], - }; -} + ]; + }, +} satisfies TypefusionDbResult; ``` **Warning:** Typefusion is native [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) and does not provide a CommonJS export. @@ -143,27 +144,28 @@ This approach allows for more programmatic control and integration with your exi Typefusion Refs enable you to reference the results of one script in another, facilitating the creation of complex workflows. Here's an example: ```ts -import { pgType, typefusionRef, TypefusionPgResult } from "typefusion"; +// or mySqlType for mysql +import { pgType, typefusionRef, TypefusionDbResult } from "typefusion"; import main from "./main.js"; const smallSchema = { small: pgType.text().notNull(), }; -export default async function typefusion_ref(): Promise< - TypefusionPgResult -> { - const result = await typefusionRef(main); - console.log("typefusion ref main result", result); - return { - types: smallSchema, - data: [ +export default { + name: "typefusion_ref", + schema: smallSchema, + resultDatabase: "postgresql", + run: async () => { + const result = await typefusionRef(main); + console.log("typefusion ref main result", result); + return [ { small: "smallString" as const, }, - ], - }; -} + ]; + }, +} satisfies TypefusionDbResult; ``` For cases where you only need the table name without fetching the full data, use the `typefusionRefTableName` function: diff --git a/packages/typefusion/example/main.ts b/packages/typefusion/example/main.ts index a3d8916..804f17c 100644 --- a/packages/typefusion/example/main.ts +++ b/packages/typefusion/example/main.ts @@ -1,5 +1,5 @@ import { pgType } from "../src/db/postgres/types.js"; -import { TypefusionPgResult } from "../src/index.js"; +import { TypefusionDbResult } from "../src/index.js"; export const mainSchema = { id: pgType.integer().notNull(), @@ -9,13 +9,13 @@ export const mainSchema = { address: pgType.text().notNull(), }; -export default async function main(): Promise< - TypefusionPgResult -> { - console.log("MAIN IS RUN"); - return { - types: mainSchema, - data: [ +export default { + name: "main", + schema: mainSchema, + resultDatabase: "postgresql", + run: async () => { + console.log("MAIN IS RUN"); + return [ { id: 1, name: "John Doe", @@ -23,6 +23,6 @@ export default async function main(): Promise< email: "john.doe@example.com", address: "123 Main St", }, - ], - }; -} + ]; + }, +} satisfies TypefusionDbResult; diff --git a/packages/typefusion/example/mysql/typefusion_all_mysql_types.ts b/packages/typefusion/example/mysql/typefusion_all_mysql_types.ts new file mode 100644 index 0000000..d04db0d --- /dev/null +++ b/packages/typefusion/example/mysql/typefusion_all_mysql_types.ts @@ -0,0 +1,47 @@ +import { mySqlType, TypefusionDbResult } from "../../src/index.js"; + +const allMySqlTypes = { + text: mySqlType.text().notNull(), + int: mySqlType.int().notNull(), + boolean: mySqlType.boolean().notNull(), + date: mySqlType.date().notNull(), + dateTime: mySqlType.dateTime().notNull(), + bigint: mySqlType.bigint().notNull(), + smallint: mySqlType.smallint().notNull(), + float: mySqlType.float().notNull(), + double: mySqlType.double().notNull(), + decimal: mySqlType.decimal().notNull(), + char: mySqlType.char(10).notNull(), + varchar: mySqlType.varchar(50).notNull(), + time: mySqlType.time().notNull(), + json: mySqlType.json().notNull(), + binary: mySqlType.binary().notNull(), +}; + +export default { + name: "typefusion_all_mysql_types", + schema: allMySqlTypes, + resultDatabase: "mysql", + run: async () => { + console.log("TYPEFUSION ALL MYSQL TYPES IS RUN"); + return [ + { + text: "Sample text", + int: 42, + boolean: true, + date: new Date("2023-05-17"), + dateTime: new Date("2023-05-17T12:34:56"), + bigint: BigInt("9007199254740991"), + smallint: 32767, + float: 3.14, + double: 3.141592653589793, + decimal: 123.45, + char: "Fixed ", + varchar: "Variable length text", + time: "12:34:56", + json: { key: "value" }, + binary: new Uint8Array([0x12, 0x34, 0x56, 0x78]), + }, + ]; + }, +} satisfies TypefusionDbResult; diff --git a/packages/typefusion/example/mysql/typefusion_mysql_result.ts b/packages/typefusion/example/mysql/typefusion_mysql_result.ts new file mode 100644 index 0000000..25ffbea --- /dev/null +++ b/packages/typefusion/example/mysql/typefusion_mysql_result.ts @@ -0,0 +1,25 @@ +import { + typefusionRef, + TypefusionDbResult, + mySqlType, +} from "../../src/index.js"; +import main from "../main.js"; + +const smallSchema = { + small: mySqlType.text().notNull(), +}; + +export default { + name: "typefusion_mysql_result", + resultDatabase: "mysql", + schema: smallSchema, + run: async () => { + const result = await typefusionRef(main); + console.log("TYPEFUSION PG RESULT IS RUN", result); + return [ + { + small: "smallString" as const, + }, + ]; + }, +} satisfies TypefusionDbResult; diff --git a/packages/typefusion/example/options/typefusion_data_only.ts b/packages/typefusion/example/options/typefusion_data_only.ts deleted file mode 100644 index 4d2f482..0000000 --- a/packages/typefusion/example/options/typefusion_data_only.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { typefusionRef, TypefusionResultDataOnly } from "../../src/index.js"; -import main from "../main.js"; -import typefusionResult from "./typefusion_result.js"; - -export default async function typefusion_data_only(): Promise< - TypefusionResultDataOnly<{ dataOnly: string }> -> { - const mainResult = await typefusionRef(main); - const leafResult = await typefusionRef(typefusionResult); - - console.log("TYPEFUSION DATA ONLY IS RUN", mainResult, leafResult); - return { - data: [ - { - dataOnly: "dataOnlyString" as const, - }, - ], - }; -} diff --git a/packages/typefusion/example/options/typefusion_no_types.ts b/packages/typefusion/example/options/typefusion_no_types.ts deleted file mode 100644 index bd08f7c..0000000 --- a/packages/typefusion/example/options/typefusion_no_types.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { pgType } from "../../src/index.js"; -import { typefusionRef } from "../../src/lib.js"; -import main from "../main.js"; - -export default async function typefusion_no_types() { - const result = await typefusionRef(main); - console.log("TYPEFUSION NO TYPES IS RUN", result); - return { - types: { - noTypes: pgType.text(), - }, - data: [ - { - noTypes: "noTypesString" as const, - }, - ], - }; -} diff --git a/packages/typefusion/example/options/typefusion_pg_result.ts b/packages/typefusion/example/options/typefusion_pg_result.ts deleted file mode 100644 index a73cb22..0000000 --- a/packages/typefusion/example/options/typefusion_pg_result.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { pgType, typefusionRef, TypefusionPgResult } from "../../src/index.js"; -import typefusionDataOnly from "./typefusion_data_only.js"; - -const smallSchema = { - small: pgType.text().notNull(), -}; - -export default async function typefusion_pg_result(): Promise< - TypefusionPgResult -> { - const result = await typefusionRef(typefusionDataOnly); - console.log("TYPEFUSION PG RESULT IS RUN", result); - return { - types: smallSchema, - data: [ - { - small: "smallString" as const, - }, - ], - }; -} diff --git a/packages/typefusion/example/options/typefusion_result.ts b/packages/typefusion/example/options/typefusion_result.ts deleted file mode 100644 index 7190d96..0000000 --- a/packages/typefusion/example/options/typefusion_result.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { pgType, TypefusionResult } from "../../src/index.js"; - -export default async function typefusion_result(): Promise< - TypefusionResult<{ leaf: string }> -> { - console.log("TYPEFUSION RESULT IS RUN"); - return { - types: { - leaf: pgType.text().notNull(), - }, - data: [ - { - leaf: "leafString", - }, - ], - }; -} diff --git a/packages/typefusion/example/options/typefusion_all_pg_types.ts b/packages/typefusion/example/postgres/typefusion_all_pg_types.ts similarity index 89% rename from packages/typefusion/example/options/typefusion_all_pg_types.ts rename to packages/typefusion/example/postgres/typefusion_all_pg_types.ts index a72402a..c4918db 100644 --- a/packages/typefusion/example/options/typefusion_all_pg_types.ts +++ b/packages/typefusion/example/postgres/typefusion_all_pg_types.ts @@ -1,4 +1,4 @@ -import { pgType, TypefusionPgResult } from "../../src/index.js"; +import { pgType, TypefusionDbResult } from "../../src/index.js"; const allPgTypes = { text: pgType.text().notNull(), @@ -38,13 +38,13 @@ const allPgTypes = { bytea: pgType.bytea().notNull(), }; -export default async function typefusion_all_pg_types(): Promise< - TypefusionPgResult -> { - console.log("TYPEFUSION ALL PG TYPES IS RUN"); - return { - types: allPgTypes, - data: [ +export default { + name: "typefusion_all_pg_types", + schema: allPgTypes, + resultDatabase: "postgresql", + run: async () => { + console.log("TYPEFUSION ALL PG TYPES IS RUN"); + return [ { text: "Sample text", integer: 42, @@ -82,6 +82,6 @@ export default async function typefusion_all_pg_types(): Promise< xml: "content", bytea: new Uint8Array([0x12, 0x34, 0x56, 0x78]), }, - ], - }; -} + ]; + }, +} satisfies TypefusionDbResult; diff --git a/packages/typefusion/example/postgres/typefusion_data_only.ts b/packages/typefusion/example/postgres/typefusion_data_only.ts new file mode 100644 index 0000000..96392b4 --- /dev/null +++ b/packages/typefusion/example/postgres/typefusion_data_only.ts @@ -0,0 +1,19 @@ +import { typefusionRef, TypefusionResultDataOnly } from "../../src/index.js"; +import main from "../main.js"; +import typefusionResult from "./typefusion_result.js"; + +export default { + name: "typefusion_data_only", + resultDatabase: "postgresql", + run: async () => { + const mainResult = await typefusionRef(main); + const leafResult = await typefusionRef(typefusionResult); + + console.log("TYPEFUSION DATA ONLY IS RUN", mainResult, leafResult); + return [ + { + dataOnly: "dataOnlyString", + }, + ]; + }, +} satisfies TypefusionResultDataOnly<{ dataOnly: string }>; diff --git a/packages/typefusion/example/postgres/typefusion_no_types.ts b/packages/typefusion/example/postgres/typefusion_no_types.ts new file mode 100644 index 0000000..860858f --- /dev/null +++ b/packages/typefusion/example/postgres/typefusion_no_types.ts @@ -0,0 +1,20 @@ +import { pgType } from "../../src/index.js"; +import { typefusionRef } from "../../src/lib.js"; +import main from "../main.js"; + +export default { + name: "typefusion_no_types", + schema: { + noTypes: pgType.text(), + }, + resultDatabase: "postgresql", + run: async () => { + const result = await typefusionRef(main); + console.log("TYPEFUSION NO TYPES IS RUN", result); + return [ + { + noTypes: "noTypesString" as const, + }, + ]; + }, +}; diff --git a/packages/typefusion/example/postgres/typefusion_pg_result.ts b/packages/typefusion/example/postgres/typefusion_pg_result.ts new file mode 100644 index 0000000..325291c --- /dev/null +++ b/packages/typefusion/example/postgres/typefusion_pg_result.ts @@ -0,0 +1,21 @@ +import { pgType, typefusionRef, TypefusionDbResult } from "../../src/index.js"; +import typefusionDataOnly from "./typefusion_data_only.js"; + +const smallSchema = { + small: pgType.text().notNull(), +}; + +export default { + name: "typefusion_pg_result", + schema: smallSchema, + resultDatabase: "postgresql", + run: async () => { + const result = await typefusionRef(typefusionDataOnly); + console.log("TYPEFUSION PG RESULT IS RUN", result); + return [ + { + small: "smallString" as const, + }, + ]; + }, +} satisfies TypefusionDbResult; diff --git a/packages/typefusion/example/postgres/typefusion_result.ts b/packages/typefusion/example/postgres/typefusion_result.ts new file mode 100644 index 0000000..f90d103 --- /dev/null +++ b/packages/typefusion/example/postgres/typefusion_result.ts @@ -0,0 +1,17 @@ +import { pgType, TypefusionResult } from "../../src/index.js"; + +export default { + name: "typefusion_result", + resultDatabase: "postgresql", + schema: { + leaf: pgType.text().notNull(), + }, + run: async () => { + console.log("TYPEFUSION RESULT IS RUN"); + return [ + { + leaf: "leafString", + }, + ]; + }, +} satisfies TypefusionResult<{ leaf: string }>; diff --git a/packages/typefusion/package.json b/packages/typefusion/package.json index 46db1d3..7a38d18 100644 --- a/packages/typefusion/package.json +++ b/packages/typefusion/package.json @@ -47,6 +47,7 @@ "@effect/platform-node": "0.58.0", "@effect/schema": "0.72.0", "@effect/sql": "0.10.0", + "@effect/sql-mysql2": "0.10.0", "@effect/sql-pg": "0.10.0", "effect": "3.7.0", "postgres": "3.4.4", diff --git a/packages/typefusion/src/db/common/layer.ts b/packages/typefusion/src/db/common/layer.ts new file mode 100644 index 0000000..227485b --- /dev/null +++ b/packages/typefusion/src/db/common/layer.ts @@ -0,0 +1,17 @@ +import { Effect } from "effect"; +import { DatabaseHelper } from "./service.js"; +import { valueToMySqlType, mySqlIdColumn } from "../mysql/types.js"; +import { postgresIdColumn, valueToPostgresType } from "../postgres/types.js"; + +export const MySqlDatabaseHelperService = Effect.provideService( + DatabaseHelper, + { + valueToDbType: valueToMySqlType, + idColumn: mySqlIdColumn, + }, +); + +export const PgDatabaseHelperService = Effect.provideService(DatabaseHelper, { + valueToDbType: valueToPostgresType, + idColumn: postgresIdColumn, +}); diff --git a/packages/typefusion/src/db/common/service.ts b/packages/typefusion/src/db/common/service.ts new file mode 100644 index 0000000..b8bea83 --- /dev/null +++ b/packages/typefusion/src/db/common/service.ts @@ -0,0 +1,32 @@ +import { Context, Data, Effect } from "effect"; +import { PgType } from "../postgres/types.js"; +import { MySqlType } from "../mysql/types.js"; + +export class UnsupportedJSTypeDbConversionError extends Data.TaggedError( + "UnsupportedJSTypeDbConversionError", +)<{ + cause: unknown; + message: string; +}> {} + +export class DatabaseHelper extends Context.Tag("DatabaseHelper")< + DatabaseHelper, + { + /** + * @internal + * @param value Any input + * @returns A string representing the closest DB type to that value. + */ + readonly valueToDbType: ( + value: unknown, + ) => Effect.Effect; + /** + * @internal + * @param type a {@link MySqlType} or {@link PgType} + * @returns a string representing the id column DDL + */ + readonly idColumn: | MySqlType>( + type?: T, + ) => string; + } +>() {} diff --git a/packages/typefusion/src/db/common/types.ts b/packages/typefusion/src/db/common/types.ts new file mode 100644 index 0000000..a7ea118 --- /dev/null +++ b/packages/typefusion/src/db/common/types.ts @@ -0,0 +1,54 @@ +import { Data } from "effect"; + +/** + * @internal + */ +export type Nullable = T | null; + +/** + * This is a simple wrapper class to represent a DB type that will be used to define a table. + * It also provides a fluent API to set properties of the column (e.g. nullability). + * You can easily create your own custom types by instantiating this class. + * + * @example + * ```ts + * const myCustomType = new PgType>("myCustomType"); + * ``` + */ +export class DbType extends Data.Class<{ + dbType: string; +}> { + public _tag = "DbType"; + public _nullable: boolean; + constructor(dbType: string) { + super({ dbType }); + this._nullable = true; + } + + notNull(): DbType> { + this._nullable = false; + return this as DbType>; + } + + nullable(): DbType> { + this._nullable = true; + return this as DbType>; + } + + getNullable(): boolean { + return this._nullable; + } + + getDbType(): string { + return this.dbType; + } + + // This is a bit of a hack to get the type of the underlying type + getType(): Type { + return undefined as Type; + } + + override toString(): string { + return `${this.dbType}${this._nullable ? " " : " NOT NULL"}`; + } +} diff --git a/packages/typefusion/src/db/mysql/client.ts b/packages/typefusion/src/db/mysql/client.ts new file mode 100644 index 0000000..91a2669 --- /dev/null +++ b/packages/typefusion/src/db/mysql/client.ts @@ -0,0 +1,42 @@ +// TODO +import { MysqlClient } from "@effect/sql-mysql2"; +import { Config, Effect, Redacted } from "effect"; + +/** + * @internal + */ +export const MySqlDatabaseConfig = Config.orElse( + Config.redacted("MYSQL_DATABASE_URL"), + () => + Config.map( + Config.all({ + MYSQL_DATABASE: Config.string("MYSQL_DATABASE"), + MYSQL_HOST: Config.string("MYSQL_HOST"), + MYSQL_PASSWORD: Config.string("MYSQL_PASSWORD"), + MYSQL_PORT: Config.integer("MYSQL_PORT"), + MYSQL_USER: Config.string("MYSQL_USER"), + }), + ({ + MYSQL_USER, + MYSQL_PASSWORD, + MYSQL_HOST, + MYSQL_PORT, + MYSQL_DATABASE, + }) => + Redacted.make( + `mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DATABASE}`, + ), + ), +); + +/** + * @internal + */ +export const MySqlLive = MysqlClient.layer({ + url: MySqlDatabaseConfig, +}); + +/** + * @internal + */ +export const MySqlLiveEffect = Effect.provide(MySqlLive); diff --git a/packages/typefusion/src/db/mysql/types.ts b/packages/typefusion/src/db/mysql/types.ts new file mode 100644 index 0000000..fd3620f --- /dev/null +++ b/packages/typefusion/src/db/mysql/types.ts @@ -0,0 +1,104 @@ +import { Effect } from "effect"; +import { DbType, Nullable } from "../common/types.js"; +import { UnsupportedJSTypeDbConversionError } from "../common/service.js"; + +/** + * This is a simple wrapper class to represent a MySQL type that will be used to define a table. + * It also provides a fluent API to set properties of the column (e.g. nullability). + * You can easily create your own custom types by instantiating this class. + * + * @example + * ```ts + * const myCustomType = new MySqlType>("myCustomType"); + * ``` + */ +export class MySqlType extends DbType { + public override _tag = "MySqlType"; + constructor(dbType: string) { + super(dbType); + this._nullable = true; + } + + override notNull(): MySqlType> { + this._nullable = false; + return this as MySqlType>; + } + + override nullable(): MySqlType> { + this._nullable = true; + return this as MySqlType>; + } +} + +export const mySqlType = { + text: () => new MySqlType>("TEXT"), + int: () => new MySqlType>("INT"), + boolean: () => new MySqlType>("BOOLEAN"), + date: () => new MySqlType>("DATE"), + dateTime: () => new MySqlType>("DATETIME"), + bigint: () => new MySqlType>("BIGINT"), + smallint: () => new MySqlType>("SMALLINT"), + float: () => new MySqlType>("FLOAT"), + double: () => new MySqlType>("DOUBLE"), + decimal: () => new MySqlType>("DECIMAL"), + char: (n: number) => new MySqlType>(`CHAR(${n})`), + varchar: (n: number) => new MySqlType>(`VARCHAR(${n})`), + time: () => new MySqlType>("TIME"), + json: () => new MySqlType>("JSON"), + binary: () => new MySqlType>("BINARY"), +}; + +/** + * @internal + * @param value Any input + * @returns A string representing the closest DB type to that value. + */ +export const valueToMySqlType = ( + value: unknown, +): Effect.Effect => + Effect.gen(function* () { + if (value === null || value === undefined) { + return "TEXT"; + } + if (value instanceof Date) { + return "DATETIME"; + } + switch (typeof value) { + case "object": + return "JSON"; + case "string": + return "TEXT"; + case "bigint": + return "BIGINT"; + case "number": + if (Number.isInteger(value)) { + // MySQL INT range: -2,147,483,648 to 2,147,483,647 + const MIN_INTEGER = -2147483648; + const MAX_INTEGER = 2147483647; + if (value >= MIN_INTEGER && value <= MAX_INTEGER) { + return "INT"; + } + return "BIGINT"; + } + return "DOUBLE"; + case "boolean": + return "BOOLEAN"; + default: + return yield* Effect.fail( + new UnsupportedJSTypeDbConversionError({ + cause: null, + message: `Unsupported JS type in mysql for provided value: ${typeof value}`, + }), + ); + } + }); + +/** + * @internal + * @param type a {@link MySqlType} + * @returns a string representing the id column DDL + */ +export const mySqlIdColumn = (type?: MySqlType) => { + const idType = type?.getDbType() || "BIGINT AUTO_INCREMENT"; + return `id ${idType} PRIMARY KEY`; +}; diff --git a/packages/typefusion/src/db/postgres/client.ts b/packages/typefusion/src/db/postgres/client.ts index 688911a..01d810a 100644 --- a/packages/typefusion/src/db/postgres/client.ts +++ b/packages/typefusion/src/db/postgres/client.ts @@ -1,24 +1,24 @@ import { PgClient } from "@effect/sql-pg"; -import { Config, Redacted } from "effect"; +import { Config, Effect, Redacted } from "effect"; import postgres from "postgres"; /** * @internal */ -export const DatabaseConfig = Config.orElse( +export const PgDatabaseConfig = Config.orElse( Config.redacted("PG_DATABASE_URL"), () => Config.map( Config.all({ - PGDATABASE: Config.string("PGDATABASE"), - PGHOST: Config.string("PGHOST"), - PGPASSWORD: Config.string("PGPASSWORD"), - PGPORT: Config.integer("PGPORT"), - PGUSER: Config.string("PGUSER"), + PG_DATABASE: Config.string("PG_DATABASE"), + PG_HOST: Config.string("PG_HOST"), + PG_PASSWORD: Config.string("PG_PASSWORD"), + PG_PORT: Config.integer("PG_PORT"), + PG_USER: Config.string("PG_USER"), }), - ({ PGUSER, PGPASSWORD, PGHOST, PGPORT, PGDATABASE }) => + ({ PG_USER, PG_PASSWORD, PG_HOST, PG_PORT, PG_DATABASE }) => Redacted.make( - `postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:${PGPORT}/${PGDATABASE}?ssl=true`, + `postgres://${PG_USER}:${PG_PASSWORD}@${PG_HOST}:${PG_PORT}/${PG_DATABASE}?ssl=true`, ), ), ); @@ -26,9 +26,14 @@ export const DatabaseConfig = Config.orElse( /** * @internal */ -export const SqlLive = PgClient.layer({ - url: DatabaseConfig, +export const PgLive = PgClient.layer({ + url: PgDatabaseConfig, types: Config.succeed({ bigint: postgres.BigInt, }), }); + +/** + * @internal + */ +export const PgLiveEffect = Effect.provide(PgLive); diff --git a/packages/typefusion/src/db/postgres/types.ts b/packages/typefusion/src/db/postgres/types.ts index 4c70072..f0d862a 100644 --- a/packages/typefusion/src/db/postgres/types.ts +++ b/packages/typefusion/src/db/postgres/types.ts @@ -1,6 +1,6 @@ -import { Data, Effect } from "effect"; - -export type Nullable = T | null; +import { Effect } from "effect"; +import { DbType, Nullable } from "../common/types.js"; +import { UnsupportedJSTypeDbConversionError } from "../common/service.js"; /** * This is a simple wrapper class to represent a Postgres type that will be used to define a table. @@ -12,41 +12,22 @@ export type Nullable = T | null; * const myCustomType = new PgType>("myCustomType"); * ``` */ -export class PgType extends Data.TaggedClass("PgType")<{ - postgresType: string; -}> { - private _nullable: boolean; - constructor(postgresType: string) { - super({ postgresType }); +export class PgType extends DbType { + public override _tag = "PgType"; + constructor(dbType: string) { + super(dbType); this._nullable = true; } - notNull(): PgType> { + override notNull(): PgType> { this._nullable = false; return this as PgType>; } - nullable(): PgType> { + override nullable(): PgType> { this._nullable = true; return this as PgType>; } - - getNullable(): boolean { - return this._nullable; - } - - getPostgresType(): string { - return this.postgresType; - } - - // This is a bit of a hack to get the type of the underlying type - getType(): Type { - return undefined as Type; - } - - override toString(): string { - return `${this.postgresType}${this._nullable ? " " : " NOT NULL"}`; - } } export const pgType = { @@ -87,19 +68,14 @@ export const pgType = { bytea: () => new PgType>("bytea"), }; -export class UnsupportedJSTypePostgresConversionError extends Data.TaggedError( - "UnsupportedJSTypePostgresConversionError", -)<{ - cause: unknown; - message: string; -}> {} - /** * @internal * @param value Any input - * @returns A string representing the closest postgres type to that value. This function isn't meant to be used. + * @returns A string representing the closest postgres type to that value. */ -export const valueToPostgresType = (value: unknown) => +export const valueToPostgresType = ( + value: unknown, +): Effect.Effect => Effect.gen(function* () { if (value === null || value === undefined) { return "TEXT"; @@ -129,9 +105,9 @@ export const valueToPostgresType = (value: unknown) => return "BOOLEAN"; default: return yield* Effect.fail( - new UnsupportedJSTypePostgresConversionError({ + new UnsupportedJSTypeDbConversionError({ cause: null, - message: `Unsupported type for value provided in script result: ${typeof value}`, + message: `Unsupported JS type in postgres for provided value: ${typeof value}`, }), ); } @@ -143,7 +119,6 @@ export const valueToPostgresType = (value: unknown) => * @returns a string representing the id column DDL */ export const postgresIdColumn = (type?: PgType) => { - const idType = - type?.getPostgresType() || "BIGINT GENERATED ALWAYS AS IDENTITY"; - return `id ${idType} PRIMARY KEY` as const; + const idType = type?.getDbType() || "BIGINT GENERATED ALWAYS AS IDENTITY"; + return `id ${idType} PRIMARY KEY`; }; diff --git a/packages/typefusion/src/helpers.ts b/packages/typefusion/src/helpers.ts index 39259ac..62ab6ea 100644 --- a/packages/typefusion/src/helpers.ts +++ b/packages/typefusion/src/helpers.ts @@ -1,6 +1,13 @@ import { Data, Effect, LogLevel } from "effect"; import { SkottNode } from "skott/graph/node"; import { dbInsert } from "./store.js"; +import { PgLiveEffect } from "./db/postgres/client.js"; +import { MySqlLiveEffect } from "./db/mysql/client.js"; +import { + MySqlDatabaseHelperService, + PgDatabaseHelperService, +} from "./db/common/layer.js"; +import { TypefusionScriptExport } from "./types.js"; /** * Traverses a dependency graph and returns an array of execution levels. @@ -51,31 +58,50 @@ export class ModuleExecutionError extends Data.TaggedError( }> {} /** - * Runs a module and inserts the result into the database. + * Runs a typefusion script and inserts the result into the database. * @param leaf - The relative path of the module to run. * @returns void */ -export function runModule(leaf: string) { + +export function runTypefusionScript(leaf: string) { return Effect.gen(function* () { const path = `../${leaf}`; + console.log("RUN TYPEFUSION SCRIPT", path); const moduleDefault = yield* Effect.tryPromise({ - try: async () => import(path).then((module) => module.default), + try: async () => + import(path).then((module) => module.default as TypefusionScriptExport), catch: (error) => new ModuleImportError({ cause: error, message: `Error importing module '${leaf}' using path '${path}'`, }), }); + const result = yield* Effect.tryPromise({ - try: async () => moduleDefault(), + try: async () => moduleDefault.run(), catch: (error) => new ModuleExecutionError({ cause: error, message: `Error executing module '${leaf}'`, }), }); - return yield* dbInsert(moduleDefault, result); + console.log(moduleDefault.name); + + if (moduleDefault.resultDatabase === "postgresql") { + return yield* dbInsert(moduleDefault, result) + .pipe(PgLiveEffect) + .pipe(PgDatabaseHelperService); + } + if (moduleDefault.resultDatabase === "mysql") { + return yield* dbInsert(moduleDefault, result) + .pipe(MySqlLiveEffect) + .pipe(MySqlDatabaseHelperService); + } else { + return yield* Effect.dieMessage( + `Database ${moduleDefault.resultDatabase} not supported, make sure the 'resultDatabase' property is set in your typefusion script default export.`, + ); + } }); } diff --git a/packages/typefusion/src/index.ts b/packages/typefusion/src/index.ts index f97f124..33582bc 100644 --- a/packages/typefusion/src/index.ts +++ b/packages/typefusion/src/index.ts @@ -11,10 +11,10 @@ export { export { typefusionRef, typefusionRefTableName } from "./lib.js"; -export { UnsupportedJSTypePostgresConversionError } from "./db/postgres/types.js"; +export { UnsupportedJSTypeDbConversionError } from "./db/common/service.js"; export { - TypefusionPgResult, + TypefusionDbResult as TypefusionDbResult, TypefusionResult, TypefusionResultDataOnly, TypefusionResultUnknown, @@ -27,6 +27,8 @@ export { ModuleExecutionError, ModuleImportError } from "./helpers.js"; export * from "./db/postgres/types.js"; +export * from "./db/mysql/types.js"; + export const typefusion = (config: TypefusionConfig) => typefusionEffect(config).pipe(Effect.runPromise); diff --git a/packages/typefusion/src/lib.ts b/packages/typefusion/src/lib.ts index 3ab1d02..6115723 100644 --- a/packages/typefusion/src/lib.ts +++ b/packages/typefusion/src/lib.ts @@ -1,62 +1,72 @@ import { Effect } from "effect"; -import { - DatabaseSelectError, - dbSelect, - TypefusionScriptResult, -} from "./store.js"; -import { SqlLive } from "./db/postgres/client.js"; +import { DatabaseSelectError, dbSelect } from "./store.js"; import { ConfigError } from "effect/ConfigError"; - +import { TypefusionScriptExport } from "./types.js"; +import { PgLive } from "./db/postgres/client.js"; +import { MySqlLive } from "./db/mysql/client.js"; /** * Get the data from a module (i.e. the result of one of your Typefusion scripts). * @param module - The module to get the data from. * @returns The data from the associated table for that module. */ -export const typefusionRef = async < - T extends (...args: any[]) => PromiseLike, ->( +export const typefusionRef = async ( module: T, ): Promise< - "types" extends keyof Awaited> + "schema" extends keyof T ? { - [K in keyof Awaited>["types"]]: Awaited< - ReturnType - >["types"][K] extends { getType: () => infer R } + [K in keyof T["schema"]]: T["schema"][K] extends { + getType: () => infer R; + } ? R : never; - } - : Awaited>["data"] extends Array - ? U - : never + }[] + : Awaited> > => { - return dbSelect(module).pipe( - Effect.provide(SqlLive), - Effect.runPromise, - ) as any; + if (module.resultDatabase === "postgresql") { + return dbSelect(module).pipe( + Effect.provide(PgLive), + Effect.runPromise, + ) as any; + } + if (module.resultDatabase === "mysql") { + return dbSelect(module).pipe( + Effect.provide(MySqlLive), + Effect.runPromise, + ) as any; + } else { + throw new Error( + `Unsupported database type provided for module ${module.name}: ${module.resultDatabase}`, + ); + } }; /** * Analogous to {@link typefusionRef} but for use in Effect. */ -export const typefusionRefEffect = < - T extends (...args: any[]) => PromiseLike, ->( +export const typefusionRefEffect = ( module: T, ): Effect.Effect< - "types" extends keyof Awaited> + "schema" extends keyof T ? { - [K in keyof Awaited>["types"]]: Awaited< - ReturnType - >["types"][K] extends { getType: () => infer R } + [K in keyof T["schema"]]: T["schema"][K] extends { + getType: () => infer R; + } ? R : never; } - : Awaited>["data"] extends Array - ? U - : never, + : Awaited>, DatabaseSelectError | ConfigError > => { - return dbSelect(module).pipe(Effect.provide(SqlLive)) as any; + if (module.resultDatabase === "postgresql") { + return dbSelect(module).pipe(Effect.provide(PgLive)) as any; + } + if (module.resultDatabase === "mysql") { + return dbSelect(module).pipe(Effect.provide(MySqlLive)) as any; + } else { + return Effect.dieMessage( + `Unsupported database type provided for module ${module.name}: ${module.resultDatabase}`, + ); + } }; /** @@ -64,21 +74,16 @@ export const typefusionRefEffect = < * @param module - The module to get the table name from. * @returns The table name. */ -export const typefusionRefTableName = async < - T extends (...args: any[]) => PromiseLike, ->( +export const typefusionRefTableName = async ( module: T, ): Promise => { - // Currently the function name is the table name return module.name; }; /** * Analogous to {@link typefusionRefTableName} but for use in Effect. */ -export const typefusionRefTableNameEffect = < - T extends (...args: any[]) => PromiseLike, ->( +export const typefusionRefTableNameEffect = ( module: T, ): Effect.Effect => { return Effect.succeed(module.name); diff --git a/packages/typefusion/src/store.ts b/packages/typefusion/src/store.ts index 612b84b..8a51caf 100644 --- a/packages/typefusion/src/store.ts +++ b/packages/typefusion/src/store.ts @@ -1,12 +1,11 @@ import { Schema } from "@effect/schema"; import { Effect, Data } from "effect"; -import { TypefusionModule, TypefusionModuleDefault } from "./types.js"; +import { TypefusionScriptExport } from "./types.js"; import { SqlClient } from "@effect/sql"; -import { - PgType, - postgresIdColumn, - valueToPostgresType, -} from "./db/postgres/types.js"; +import { PgType } from "./db/postgres/types.js"; +import { MySqlType } from "./db/mysql/types.js"; +import { DbType } from "./db/common/types.js"; +import { DatabaseHelper } from "./db/common/service.js"; // TODO this file needs to be generalized so we can support other databases @@ -18,74 +17,97 @@ const PgTypeSchema = Schema.declare((input: unknown): input is PgType => { return false; }); -/** - * The schema for the return type of a Typefusion script. - */ -const ScriptResultSchema = Schema.Struct({ - types: Schema.Record({ - key: Schema.String, - value: PgTypeSchema, - }).pipe(Schema.optional), - data: Schema.Record({ key: Schema.String, value: Schema.Unknown }).pipe( - Schema.Array, +const MySqlTypeSchema = Schema.declare( + (input: unknown): input is MySqlType => { + if (typeof input === "object" && input !== null) { + return "_tag" in input && input["_tag"] === "MySqlType"; + } + return false; + }, +); + +const ScriptExportSchema = Schema.Struct({ + name: Schema.String, + resultDatabase: Schema.Union( + Schema.Literal("postgresql"), + Schema.Literal("mysql"), ), + schema: Schema.Union( + Schema.Record({ + key: Schema.String, + value: PgTypeSchema, + }), + Schema.Record({ + key: Schema.String, + value: MySqlTypeSchema, + }), + ).pipe(Schema.optional), + + run: Schema.Any, }); /** - * The return type of a Typefusion script. + * The schema for the return type of a Typefusion script. */ -export type TypefusionScriptResult = Schema.Schema.Type< - typeof ScriptResultSchema ->; +const ScriptResultSchema = Schema.Array( + Schema.Record({ + key: Schema.String, + value: Schema.Unknown, + }), +); /** - * The return type of a Typefusion script ({@link TypefusionScriptResult}) when the result contains only the 'data' field. + * The return type of a Typefusion script ({@link TypefusionScriptExport}) when the result contains only the 'data' field. */ export interface TypefusionResultDataOnly< DataElement extends Record, -> extends TypefusionScriptResult { - types?: { - [key in keyof DataElement]: PgType; +> extends TypefusionScriptExport { + schema?: { + [key in keyof DataElement]: DbType; }; - data: DataElement[]; + run: () => PromiseLike; } /** - * The return type of a Typefusion script ({@link TypefusionScriptResult}) when the result contains both the 'types' and 'data' fields, and you want to use your existing {@link PgType} schema. + * The return type of a Typefusion script ({@link TypefusionScriptExport}) when the result contains both the 'types' and 'data' fields + * you want to use your existing {@link PgType} or {@link MySqlType} schema. */ -export interface TypefusionPgResult>> - extends TypefusionScriptResult { - types: T; - data: { - [key in keyof T]: T[key] extends PgType ? U : never; - }[]; +export interface TypefusionDbResult>> + extends TypefusionScriptExport { + schema: T; + run: () => PromiseLike< + { + [key in keyof T]: T[key] extends DbType ? U : never; + }[] + >; } /** - * The return type of a Typefusion script ({@link TypefusionScriptResult}) when the result contains both the 'types' and 'data' fields, and you want to use your existing {@link PgType} schema. + * The return type of a Typefusion script ({@link TypefusionScriptExport}) when the result contains both the 'types' and 'data' fields + * you want to use your existing {@link PgType} or {@link MySqlType} schema. * However, the data is unknown, so you can pass in any data array and it will type check. */ -export interface TypefusionPgResultDataUnknown< - T extends Record>, -> extends TypefusionScriptResult { - types: T; - data: Record[]; +export interface TypefusionDbResultDataUnknown< + T extends Record>, +> extends TypefusionScriptExport { + schema: T; + run: () => PromiseLike[]>; } /** - * The return type of a Typefusion script ({@link TypefusionScriptResult}) when the result contains both the 'types' and 'data' fields. - * This will check that your `pgType` schema matches the data you are returning, but it's more verbose than using {@link TypefusionPgResult}. + * The return type of a Typefusion script ({@link TypefusionScriptExport}) when the result contains both the 'types' and 'data' fields. + * This will check that your `pgType` schema matches the data you are returning, but it's more verbose than using {@link TypefusionDbResult}. */ export interface TypefusionResult> - extends TypefusionScriptResult { - types: { - [key in keyof DataElement]: PgType; + extends TypefusionScriptExport { + schema: { + [key in keyof DataElement]: DbType; }; - data: DataElement[]; + run: () => PromiseLike; } /** - * The return type of a Typefusion script ({@link TypefusionScriptResult}) when the result contains potentially only the 'data' field. + * The return type of a Typefusion script ({@link TypefusionScriptExport}) when the result contains potentially only the 'data' field. * However, the data is unknown, so you can pass in any data array and it will type check. */ export interface TypefusionResultUnknown @@ -100,12 +122,13 @@ export class ConvertDataToSQLDDLError extends Data.TaggedError( // TODO support multiple casings? (camelCase, snake_case) const convertTypefusionScriptResultToSQLDDL = ( - module: TypefusionModule, - result: TypefusionScriptResult, + module: TypefusionScriptExport, + result: Schema.Schema.Type, ) => Effect.gen(function* () { - if (!result.types || Object.keys(result.types).length === 0) { - if (result.data.length === 0) { + const dbHelper = yield* DatabaseHelper; + if (!module.schema || Object.keys(module.schema).length === 0) { + if (result.length === 0) { yield* Effect.fail( new ConvertDataToSQLDDLError({ cause: null, @@ -118,24 +141,24 @@ const convertTypefusionScriptResultToSQLDDL = ( ); // If an ID column is not explicitly provided, we will assume you don't want a primary key return yield* Effect.forEach( - Object.entries(result.data[0]), + Object.entries(result[0]), ([key, value]) => Effect.if(key === "id", { - onTrue: () => Effect.succeed(postgresIdColumn()), + onTrue: () => Effect.succeed(dbHelper.idColumn()), onFalse: () => Effect.map( - valueToPostgresType(value), - (pgType) => `"${key}" ${pgType}`, + dbHelper.valueToDbType(value), + (dbType) => `"${key}" ${dbType}`, ), }), { concurrency: "inherit" }, ).pipe(Effect.map((col) => col.join(", "))); } // If an ID column is not explicitly provided, we will assume you don't want a primary key - return Object.entries(result.types) + return Object.entries(module.schema) .map(([key, value]) => { if (key === "id") { - return postgresIdColumn(value); + return dbHelper.idColumn(value); } return `"${key}" ${value}`; }) @@ -149,10 +172,12 @@ export class DatabaseInsertError extends Data.TaggedError( message: string; }> {} -export const dbInsert = (module: TypefusionModule, result: unknown) => +export const dbInsert = (module: TypefusionScriptExport, result: unknown) => Effect.gen(function* () { const resultIsValidSchema = Schema.is(ScriptResultSchema)(result); - if (resultIsValidSchema) { + const moduleIsValidSchema = Schema.is(ScriptExportSchema)(module); + + if (resultIsValidSchema && moduleIsValidSchema) { const sql = yield* SqlClient.SqlClient; yield* sql`DROP TABLE IF EXISTS "${sql.unsafe(module.name)}"`.pipe( @@ -185,7 +210,7 @@ export const dbInsert = (module: TypefusionModule, result: unknown) => ); // Note: We cast here because we are going to avoid validating each value in the result as the proper type, we'll let the database fail if the types are incorrect - yield* sql`INSERT INTO "${sql.unsafe(module.name)}" ${sql.insert(result.data as Parameters[0][])}`.pipe( + yield* sql`INSERT INTO "${sql.unsafe(module.name)}" ${sql.insert(result as Parameters[0][])}`.pipe( Effect.mapError( (error) => new DatabaseInsertError({ @@ -195,13 +220,29 @@ export const dbInsert = (module: TypefusionModule, result: unknown) => ), ); } else { - yield* Effect.logError("Invalid script result: ", result); - yield* Effect.fail( - new DatabaseInsertError({ - cause: null, - message: `Module '${module.name}' does not match expected schema, make sure your function returns an object with the following shape: ${ScriptResultSchema.toString()}`, - }), - ); + if (!resultIsValidSchema) { + yield* Effect.logError("Invalid script result: ", result); + yield* Effect.fail( + new DatabaseInsertError({ + cause: null, + message: `Module '${module.name}' does not match expected schema, make sure your function returns an object with the following shape: ${ScriptResultSchema.toString()}`, + }), + ); + } + if (!moduleIsValidSchema) { + yield* Effect.logError( + "Invalid module export: ", + // We are going to assume that people at least provided a name + (module as TypefusionScriptExport).name, + ); + yield* Effect.fail( + new DatabaseInsertError({ + cause: null, + // We are going to assume that people at least provided a name + message: `Module '${(module as TypefusionScriptExport).name}' does not match expected schema, make sure your function returns an object with the following shape: ${ScriptExportSchema.toString()}`, + }), + ); + } } }); @@ -212,7 +253,7 @@ export class DatabaseSelectError extends Data.TaggedError( message: string; }> {} -export const dbSelect = (module: TypefusionModuleDefault) => +export const dbSelect = (module: TypefusionScriptExport) => Effect.gen(function* () { const sql = yield* SqlClient.SqlClient; return yield* sql`SELECT * FROM "${sql.unsafe(module.name)}"`.pipe( diff --git a/packages/typefusion/src/typefusion.ts b/packages/typefusion/src/typefusion.ts index c9ea6f1..f64aaf3 100644 --- a/packages/typefusion/src/typefusion.ts +++ b/packages/typefusion/src/typefusion.ts @@ -2,8 +2,11 @@ import { Data, Effect } from "effect"; import { FileSystem } from "@effect/platform"; import { NodeFileSystem } from "@effect/platform-node"; import skott from "skott"; -import { traverseGraph, printExecutionGraph, runModule } from "./helpers.js"; -import { SqlLive } from "./db/postgres/client.js"; +import { + traverseGraph, + printExecutionGraph, + runTypefusionScript, +} from "./helpers.js"; export const DependencyGraphGenerationError = Data.TaggedError( "DependencyGraphGenerationError", @@ -27,8 +30,8 @@ export interface TypefusionConfig { * @param config - The configuration for Typefusion, see {@link TypefusionConfig}. * @returns An Effect that, when run, will execute the Typefusion script. */ -export function typefusion(config: TypefusionConfig) { - return Effect.gen(function* () { +export const typefusion = (config: TypefusionConfig) => + Effect.gen(function* () { if (config.dryRun) { yield* Effect.log("Dry run enabled. No changes will be made."); } @@ -76,12 +79,11 @@ export function typefusion(config: TypefusionConfig) { if (!config.dryRun) { for (const level of executionLevels) { - yield* Effect.forEach(level, (file) => runModule(file), { + yield* Effect.forEach(level, (file) => runTypefusionScript(file), { concurrency: "inherit", }); } } return executionLevels; - }).pipe(Effect.provide(SqlLive), Effect.provide(NodeFileSystem.layer)); -} + }).pipe(Effect.provide(NodeFileSystem.layer)); diff --git a/packages/typefusion/src/types.ts b/packages/typefusion/src/types.ts index df68e09..7d0557a 100644 --- a/packages/typefusion/src/types.ts +++ b/packages/typefusion/src/types.ts @@ -1,12 +1,22 @@ +import { MySqlType } from "./db/mysql/types.js"; +import { PgType } from "./db/postgres/types.js"; + +export type TypefusionSupportedDatabases = "postgresql" | "mysql"; + /** - * This is a partial type for the ES Module when importing a Typefusion script. + * This is a partial type for the 'default' export of an ES Module when importing a Typefusion script. */ -export interface TypefusionModule { +export interface TypefusionScriptExport { name: string; - default: Function; + schema?: Record> | Record>; + resultDatabase: TypefusionSupportedDatabases; + run: () => PromiseLike; } /** - * This is a partial type for the 'default' export of an ES Module when importing a Typefusion script. + * This is a partial type for the ES Module when importing a Typefusion script. */ -export type TypefusionModuleDefault = (...args: any[]) => PromiseLike; +export interface TypefusionScript { + name: string; + default: TypefusionScriptExport; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 43b82f5..9408b64 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,6 +95,9 @@ importers: '@effect/sql': specifier: 0.10.0 version: 0.10.0(@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(effect@3.7.0))(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0)(ws@8.18.0))(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0) + '@effect/sql-mysql2': + specifier: 0.10.0 + version: 0.10.0(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/sql@0.10.0(@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(effect@3.7.0))(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0)(ws@8.18.0))(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(effect@3.7.0) '@effect/sql-pg': specifier: 0.10.0 version: 0.10.0(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/sql@0.10.0(@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(effect@3.7.0))(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0)(ws@8.18.0))(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(effect@3.7.0) @@ -417,6 +420,13 @@ packages: peerDependencies: effect: ^3.7.0 + '@effect/sql-mysql2@0.10.0': + resolution: {integrity: sha512-3b8zj+11gYXB7ZOcxTqM6HUesCJj9cNFzST5x0QBQtDBIKhmZSWhdUeTNqbloEeRGy+rx9bsPW2W81zkrYNCRA==} + peerDependencies: + '@effect/platform': ^0.63.0 + '@effect/sql': ^0.10.0 + effect: ^3.7.0 + '@effect/sql-pg@0.10.0': resolution: {integrity: sha512-9Yxv76PYqiQqq2+ph8+lRIBGYhUAEwjBHmILxXPibd5vXODKJoKCaaMzPLFf9xdA8Yh2LgjIoFhAjZH7gcQgQw==} peerDependencies: @@ -1423,6 +1433,10 @@ packages: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} + aws-ssl-profiles@1.1.2: + resolution: {integrity: sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==} + engines: {node: '>= 6.0.0'} + balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -1742,6 +1756,10 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} + denque@2.1.0: + resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==} + engines: {node: '>=0.10'} + depcheck@1.4.7: resolution: {integrity: sha512-1lklS/bV5chOxwNKA/2XUUk/hPORp8zihZsXflr8x0kLwmcZ9Y9BsS6Hs3ssvA+2wUVbG0U2Ciqvm1SokNjPkA==} engines: {node: '>=10'} @@ -2119,6 +2137,9 @@ packages: functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + generate-function@2.3.1: + resolution: {integrity: sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==} + get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} @@ -2280,6 +2301,10 @@ packages: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} + iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -2411,6 +2436,9 @@ packages: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} + is-property@1.0.2: + resolution: {integrity: sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==} + is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -2658,6 +2686,9 @@ packages: resolution: {integrity: sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==} engines: {node: '>=12'} + long@5.2.3: + resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==} + longest@2.0.1: resolution: {integrity: sha512-Ajzxb8CM6WAnFjgiloPsI3bF+WCxcvhdIG3KNA2KN962+tdBsHcuQ4k4qX/EcS/2CRkcc0iAkR956Nib6aXU/Q==} engines: {node: '>=0.10.0'} @@ -2679,6 +2710,14 @@ packages: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} + lru-cache@7.18.3: + resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} + engines: {node: '>=12'} + + lru-cache@8.0.5: + resolution: {integrity: sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==} + engines: {node: '>=16.14'} + lunr@2.3.9: resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} @@ -2813,9 +2852,17 @@ packages: mute-stream@0.0.8: resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + mysql2@3.11.0: + resolution: {integrity: sha512-J9phbsXGvTOcRVPR95YedzVSxJecpW5A5+cQ57rhHIFXteTP10HCs+VBjS7DHIKfEaI1zQ5tlVrquCd64A6YvA==} + engines: {node: '>= 8.0'} + mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + named-placeholders@1.1.3: + resolution: {integrity: sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==} + engines: {node: '>=12.0.0'} + nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -3269,6 +3316,9 @@ packages: engines: {node: '>=10'} hasBin: true + seq-queue@0.0.5: + resolution: {integrity: sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==} + set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} @@ -3338,6 +3388,10 @@ packages: sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + sqlstring@2.3.3: + resolution: {integrity: sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==} + engines: {node: '>= 0.6'} + stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} @@ -4308,6 +4362,14 @@ snapshots: effect: 3.7.0 fast-check: 3.22.0 + '@effect/sql-mysql2@0.10.0(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/sql@0.10.0(@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(effect@3.7.0))(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0)(ws@8.18.0))(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(effect@3.7.0)': + dependencies: + '@effect/platform': 0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0) + '@effect/sql': 0.10.0(@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(effect@3.7.0))(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0)(ws@8.18.0))(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0) + '@opentelemetry/semantic-conventions': 1.27.0 + effect: 3.7.0 + mysql2: 3.11.0 + '@effect/sql-pg@0.10.0(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/sql@0.10.0(@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(effect@3.7.0))(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0)(ws@8.18.0))(@effect/platform@0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0))(effect@3.7.0)': dependencies: '@effect/platform': 0.63.0(@effect/schema@0.72.0(effect@3.7.0))(effect@3.7.0) @@ -5191,6 +5253,8 @@ snapshots: available-typed-arrays@1.0.5: {} + aws-ssl-profiles@1.1.2: {} + balanced-match@1.0.2: {} base64-js@1.5.1: {} @@ -5526,6 +5590,8 @@ snapshots: has-property-descriptors: 1.0.0 object-keys: 1.1.1 + denque@2.1.0: {} + depcheck@1.4.7: dependencies: '@babel/parser': 7.24.4 @@ -6066,6 +6132,10 @@ snapshots: functions-have-names@1.2.3: {} + generate-function@2.3.1: + dependencies: + is-property: 1.0.2 + get-caller-file@2.0.5: {} get-func-name@2.0.2: {} @@ -6236,6 +6306,10 @@ snapshots: dependencies: safer-buffer: 2.1.2 + iconv-lite@0.6.3: + dependencies: + safer-buffer: 2.1.2 + ieee754@1.2.1: {} ignore-walk@6.0.5: @@ -6355,6 +6429,8 @@ snapshots: is-path-inside@3.0.3: {} + is-property@1.0.2: {} + is-regex@1.1.4: dependencies: call-bind: 1.0.2 @@ -6571,6 +6647,8 @@ snapshots: chalk: 5.3.0 is-unicode-supported: 1.3.0 + long@5.2.3: {} + longest@2.0.1: {} loupe@3.1.1: @@ -6590,6 +6668,10 @@ snapshots: dependencies: yallist: 4.0.0 + lru-cache@7.18.3: {} + + lru-cache@8.0.5: {} + lunr@2.3.9: {} magic-string@0.30.10: @@ -6710,12 +6792,28 @@ snapshots: mute-stream@0.0.8: {} + mysql2@3.11.0: + dependencies: + aws-ssl-profiles: 1.1.2 + denque: 2.1.0 + generate-function: 2.3.1 + iconv-lite: 0.6.3 + long: 5.2.3 + lru-cache: 8.0.5 + named-placeholders: 1.1.3 + seq-queue: 0.0.5 + sqlstring: 2.3.3 + mz@2.7.0: dependencies: any-promise: 1.3.0 object-assign: 4.1.1 thenify-all: 1.6.0 + named-placeholders@1.1.3: + dependencies: + lru-cache: 7.18.3 + nanoid@3.3.7: {} natural-compare-lite@1.4.0: {} @@ -7155,6 +7253,8 @@ snapshots: semver@7.6.3: {} + seq-queue@0.0.5: {} + set-function-name@2.0.1: dependencies: define-data-property: 1.1.0 @@ -7246,6 +7346,8 @@ snapshots: sprintf-js@1.0.3: {} + sqlstring@2.3.3: {} + stackback@0.0.2: {} std-env@3.7.0: {} From 941c86b3f35a7c46ec937a4b44b3c0326651d9dd Mon Sep 17 00:00:00 2001 From: Ani Ravi <5902976+aniravi24@users.noreply.github.com> Date: Sat, 28 Sep 2024 01:13:46 -0400 Subject: [PATCH 2/6] fix: move queries into helpers so that multiple SQL dialects can be properly supported --- .github/workflows/pr.yml | 3 +- package.json | 8 +- .../mysql/typefusion_all_mysql_types.ts | 2 +- packages/typefusion/package.json | 20 +- packages/typefusion/src/db/common/layer.ts | 30 + packages/typefusion/src/db/common/service.ts | 53 + packages/typefusion/src/db/mysql/helpers.ts | 38 + packages/typefusion/src/db/postgres/client.ts | 1 + .../typefusion/src/db/postgres/helpers.ts | 38 + packages/typefusion/src/helpers.ts | 2 - packages/typefusion/src/lib.ts | 21 +- packages/typefusion/src/store.ts | 60 +- pnpm-lock.yaml | 1124 ++++++++++------- 13 files changed, 867 insertions(+), 533 deletions(-) create mode 100644 packages/typefusion/src/db/mysql/helpers.ts create mode 100644 packages/typefusion/src/db/postgres/helpers.ts diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4bec937..da33629 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -18,7 +18,8 @@ jobs: - name: "Start setting up postgres container" run: | # start preparing the postgres container, if you run tests too soon, it will fail - docker run -d -p 5432:5432 -e POSTGRES_DB=typefusion -e POSTGRES_PASSWORD=password postgres:14-alpine + docker run -d -p 5432:5432 -e POSTGRES_DB=typefusion -e POSTGRES_PASSWORD=password postgres:alpine + docker run -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=typefusion mysql:alpine - name: Checkout repo uses: actions/checkout@v4 diff --git a/package.json b/package.json index 5b4579c..675bd69 100644 --- a/package.json +++ b/package.json @@ -26,11 +26,11 @@ "@commitlint/cli": "19.5.0", "@commitlint/config-conventional": "19.5.0", "@manypkg/cli": "0.21.4", - "@typescript-eslint/eslint-plugin": "7.18.0", - "@typescript-eslint/parser": "7.18.0", - "commitizen": "4.3.0", + "@typescript-eslint/eslint-plugin": "8.7.0", + "@typescript-eslint/parser": "8.7.0", + "commitizen": "4.3.1", "cz-git": "1.9.4", - "eslint": "8.57.1", + "eslint": "9.11.1", "eslint-config-prettier": "9.1.0", "eslint-plugin-import": "2.30.0", "eslint-plugin-simple-import-sort": "12.1.1", diff --git a/packages/typefusion/example/mysql/typefusion_all_mysql_types.ts b/packages/typefusion/example/mysql/typefusion_all_mysql_types.ts index d04db0d..a23912b 100644 --- a/packages/typefusion/example/mysql/typefusion_all_mysql_types.ts +++ b/packages/typefusion/example/mysql/typefusion_all_mysql_types.ts @@ -40,7 +40,7 @@ export default { varchar: "Variable length text", time: "12:34:56", json: { key: "value" }, - binary: new Uint8Array([0x12, 0x34, 0x56, 0x78]), + binary: new Uint8Array([0x12]), }, ]; }, diff --git a/packages/typefusion/package.json b/packages/typefusion/package.json index 9e2fb26..ef54437 100644 --- a/packages/typefusion/package.json +++ b/packages/typefusion/package.json @@ -42,25 +42,25 @@ "example-debug": "dotenv -- tsx src/cli.ts --log-level debug --ignore \"**/src/**\" ./test/examplejs" }, "dependencies": { - "@effect/cli": "0.42.0", - "@effect/platform": "0.63.0", - "@effect/platform-node": "0.58.0", - "@effect/schema": "0.72.3", - "@effect/sql": "0.10.0", - "@effect/sql-mysql2": "0.10.0", - "@effect/sql-pg": "0.10.0", - "effect": "3.7.2", + "@effect/cli": "0.45.2", + "@effect/platform": "0.66.2", + "@effect/platform-node": "0.61.3", + "@effect/schema": "0.74.1", + "@effect/sql": "0.14.0", + "@effect/sql-mysql2": "0.14.0", + "@effect/sql-pg": "0.14.0", + "effect": "3.8.4", "postgres": "3.4.4", "skott": "0.35.3", "tslib": "2.7.0" }, "devDependencies": { - "@effect/vitest": "0.9.2", + "@effect/vitest": "0.10.5", "@vitest/coverage-v8": "2.1.1", "dotenv-cli": "7.4.2", "tsx": "4.19.1", "type-fest": "4.26.1", - "vite": "5.4.7", + "vite": "5.4.8", "vite-tsconfig-paths": "5.0.1", "vitest": "2.1.1" } diff --git a/packages/typefusion/src/db/common/layer.ts b/packages/typefusion/src/db/common/layer.ts index 227485b..5ba9fa5 100644 --- a/packages/typefusion/src/db/common/layer.ts +++ b/packages/typefusion/src/db/common/layer.ts @@ -2,16 +2,46 @@ import { Effect } from "effect"; import { DatabaseHelper } from "./service.js"; import { valueToMySqlType, mySqlIdColumn } from "../mysql/types.js"; import { postgresIdColumn, valueToPostgresType } from "../postgres/types.js"; +import { + mySqlDropTableIfExists, + mySqlCreateTableIfNotExists, + mySqlInsertIntoTable, + mySqlSelectAllFromTable, + mySqlColumnDDL, +} from "../mysql/helpers.js"; +import { + pgDropTableIfExists, + pgCreateTableIfNotExists, + pgInsertIntoTable, + pgSelectAllFromTable, + pgColumnDDL, +} from "../postgres/helpers.js"; +/** + * @internal + */ export const MySqlDatabaseHelperService = Effect.provideService( DatabaseHelper, { valueToDbType: valueToMySqlType, idColumn: mySqlIdColumn, + dropTableIfExists: mySqlDropTableIfExists, + createTableIfNotExists: mySqlCreateTableIfNotExists, + insertIntoTable: mySqlInsertIntoTable, + selectAllFromTable: mySqlSelectAllFromTable, + columnDDL: mySqlColumnDDL, }, ); +/** + * @internal + */ export const PgDatabaseHelperService = Effect.provideService(DatabaseHelper, { valueToDbType: valueToPostgresType, idColumn: postgresIdColumn, + dropTableIfExists: pgDropTableIfExists, + createTableIfNotExists: pgCreateTableIfNotExists, + insertIntoTable: pgInsertIntoTable, + selectAllFromTable: pgSelectAllFromTable, + columnDDL: pgColumnDDL, }); diff --git a/packages/typefusion/src/db/common/service.ts b/packages/typefusion/src/db/common/service.ts index b8bea83..2d74144 100644 --- a/packages/typefusion/src/db/common/service.ts +++ b/packages/typefusion/src/db/common/service.ts @@ -1,6 +1,8 @@ import { Context, Data, Effect } from "effect"; import { PgType } from "../postgres/types.js"; import { MySqlType } from "../mysql/types.js"; +import { SqlClient } from "@effect/sql/SqlClient"; +import { Row } from "@effect/sql/SqlConnection"; export class UnsupportedJSTypeDbConversionError extends Data.TaggedError( "UnsupportedJSTypeDbConversionError", @@ -28,5 +30,56 @@ export class DatabaseHelper extends Context.Tag("DatabaseHelper")< readonly idColumn: | MySqlType>( type?: T, ) => string; + /** + * @internal + * @param columnName The name of the column + * @param columnType The type of the column + * @returns A string representing the column DDL + */ + readonly columnDDL: (columnName: string, columnType: string) => string; + /** + * @internal + * @param sql The SQL client + * @param tableName The name of the table + * @returns An effect that will drop the table if it exists + */ + readonly dropTableIfExists: ( + sql: SqlClient, + tableName: string, + ) => Effect.Effect; + /** + * @internal + * @param sql The SQL client + * @param tableName The name of the table + * @param columnDefinitions The column definitions + * @returns An effect that will create the table if it does not exist + */ + readonly createTableIfNotExists: ( + sql: SqlClient, + tableName: string, + columnDefinitions: string, + ) => Effect.Effect; + /** + * @internal + * @param sql The SQL client + * @param tableName The name of the table + * @param data The data to insert + * @returns An effect that will insert the data into the table + */ + readonly insertIntoTable: ( + sql: SqlClient, + tableName: string, + data: unknown[], + ) => Effect.Effect; + /** + * @internal + * @param sql The SQL client + * @param tableName The name of the table + * @returns An effect that will select all from the table + */ + readonly selectAllFromTable: ( + sql: SqlClient, + tableName: string, + ) => Effect.Effect; } >() {} diff --git a/packages/typefusion/src/db/mysql/helpers.ts b/packages/typefusion/src/db/mysql/helpers.ts new file mode 100644 index 0000000..f45411b --- /dev/null +++ b/packages/typefusion/src/db/mysql/helpers.ts @@ -0,0 +1,38 @@ +import { SqlClient } from "@effect/sql/SqlClient"; + +/** + * @internal + */ +export const mySqlDropTableIfExists = (sql: SqlClient, tableName: string) => + sql`DROP TABLE IF EXISTS \`${sql.unsafe(tableName)}\``; + +/** + * @internal + */ +export const mySqlCreateTableIfNotExists = ( + sql: SqlClient, + tableName: string, + columnDefinitions: string, +) => + sql`CREATE TABLE IF NOT EXISTS \`${sql.unsafe(tableName)}\` (${sql.unsafe(columnDefinitions)})`; + +/** + * @internal + */ +export const mySqlInsertIntoTable = ( + sql: SqlClient, + tableName: string, + data: unknown[], +) => sql`INSERT INTO \`${sql.unsafe(tableName)}\` ${sql.insert(data as any)}`; + +/** + * @internal + */ +export const mySqlSelectAllFromTable = (sql: SqlClient, tableName: string) => + sql`SELECT * FROM \`${sql.unsafe(tableName)}\``; + +/** + * @internal + */ +export const mySqlColumnDDL = (columnName: string, columnType: string) => + `\`${columnName}\` ${columnType}`; diff --git a/packages/typefusion/src/db/postgres/client.ts b/packages/typefusion/src/db/postgres/client.ts index 01d810a..06d66f3 100644 --- a/packages/typefusion/src/db/postgres/client.ts +++ b/packages/typefusion/src/db/postgres/client.ts @@ -31,6 +31,7 @@ export const PgLive = PgClient.layer({ types: Config.succeed({ bigint: postgres.BigInt, }), + onnotice: Config.succeed(() => {}), }); /** diff --git a/packages/typefusion/src/db/postgres/helpers.ts b/packages/typefusion/src/db/postgres/helpers.ts new file mode 100644 index 0000000..e857709 --- /dev/null +++ b/packages/typefusion/src/db/postgres/helpers.ts @@ -0,0 +1,38 @@ +import { SqlClient } from "@effect/sql/SqlClient"; + +/** + * @internal + */ +export const pgDropTableIfExists = (sql: SqlClient, tableName: string) => + sql`DROP TABLE IF EXISTS "${sql.unsafe(tableName)}"`; + +/** + * @internal + */ +export const pgCreateTableIfNotExists = ( + sql: SqlClient, + tableName: string, + columnDefinitions: string, +) => + sql`CREATE TABLE IF NOT EXISTS "${sql.unsafe(tableName)}" (${sql.unsafe(columnDefinitions)})`; + +/** + * @internal + */ +export const pgInsertIntoTable = ( + sql: SqlClient, + tableName: string, + data: unknown[], +) => sql`INSERT INTO "${sql.unsafe(tableName)}" ${sql.insert(data as any)}`; + +/** + * @internal + */ +export const pgSelectAllFromTable = (sql: SqlClient, tableName: string) => + sql`SELECT * FROM "${sql.unsafe(tableName)}"`; + +/** + * @internal + */ +export const pgColumnDDL = (columnName: string, columnType: string) => + `"${columnName}" ${columnType}`; diff --git a/packages/typefusion/src/helpers.ts b/packages/typefusion/src/helpers.ts index 62ab6ea..0134f14 100644 --- a/packages/typefusion/src/helpers.ts +++ b/packages/typefusion/src/helpers.ts @@ -66,7 +66,6 @@ export class ModuleExecutionError extends Data.TaggedError( export function runTypefusionScript(leaf: string) { return Effect.gen(function* () { const path = `../${leaf}`; - console.log("RUN TYPEFUSION SCRIPT", path); const moduleDefault = yield* Effect.tryPromise({ try: async () => @@ -86,7 +85,6 @@ export function runTypefusionScript(leaf: string) { message: `Error executing module '${leaf}'`, }), }); - console.log(moduleDefault.name); if (moduleDefault.resultDatabase === "postgresql") { return yield* dbInsert(moduleDefault, result) diff --git a/packages/typefusion/src/lib.ts b/packages/typefusion/src/lib.ts index 6115723..1179126 100644 --- a/packages/typefusion/src/lib.ts +++ b/packages/typefusion/src/lib.ts @@ -2,8 +2,12 @@ import { Effect } from "effect"; import { DatabaseSelectError, dbSelect } from "./store.js"; import { ConfigError } from "effect/ConfigError"; import { TypefusionScriptExport } from "./types.js"; -import { PgLive } from "./db/postgres/client.js"; -import { MySqlLive } from "./db/mysql/client.js"; +import { PgLiveEffect } from "./db/postgres/client.js"; +import { MySqlLiveEffect } from "./db/mysql/client.js"; +import { + MySqlDatabaseHelperService, + PgDatabaseHelperService, +} from "./db/common/layer.js"; /** * Get the data from a module (i.e. the result of one of your Typefusion scripts). * @param module - The module to get the data from. @@ -24,13 +28,15 @@ export const typefusionRef = async ( > => { if (module.resultDatabase === "postgresql") { return dbSelect(module).pipe( - Effect.provide(PgLive), + PgLiveEffect, + PgDatabaseHelperService, Effect.runPromise, ) as any; } if (module.resultDatabase === "mysql") { return dbSelect(module).pipe( - Effect.provide(MySqlLive), + MySqlLiveEffect, + MySqlDatabaseHelperService, Effect.runPromise, ) as any; } else { @@ -58,10 +64,13 @@ export const typefusionRefEffect = ( DatabaseSelectError | ConfigError > => { if (module.resultDatabase === "postgresql") { - return dbSelect(module).pipe(Effect.provide(PgLive)) as any; + return dbSelect(module).pipe(PgLiveEffect, PgDatabaseHelperService) as any; } if (module.resultDatabase === "mysql") { - return dbSelect(module).pipe(Effect.provide(MySqlLive)) as any; + return dbSelect(module).pipe( + MySqlLiveEffect, + MySqlDatabaseHelperService, + ) as any; } else { return Effect.dieMessage( `Unsupported database type provided for module ${module.name}: ${module.resultDatabase}`, diff --git a/packages/typefusion/src/store.ts b/packages/typefusion/src/store.ts index 8a51caf..b15cbeb 100644 --- a/packages/typefusion/src/store.ts +++ b/packages/typefusion/src/store.ts @@ -127,6 +127,7 @@ const convertTypefusionScriptResultToSQLDDL = ( ) => Effect.gen(function* () { const dbHelper = yield* DatabaseHelper; + // If no database types are provided, we will infer them from the result data if (!module.schema || Object.keys(module.schema).length === 0) { if (result.length === 0) { yield* Effect.fail( @@ -146,9 +147,8 @@ const convertTypefusionScriptResultToSQLDDL = ( Effect.if(key === "id", { onTrue: () => Effect.succeed(dbHelper.idColumn()), onFalse: () => - Effect.map( - dbHelper.valueToDbType(value), - (dbType) => `"${key}" ${dbType}`, + Effect.map(dbHelper.valueToDbType(value), (dbType) => + dbHelper.columnDDL(key, dbType), ), }), { concurrency: "inherit" }, @@ -160,7 +160,7 @@ const convertTypefusionScriptResultToSQLDDL = ( if (key === "id") { return dbHelper.idColumn(value); } - return `"${key}" ${value}`; + return dbHelper.columnDDL(key, value.toString()); }) .join(", "); }); @@ -179,8 +179,9 @@ export const dbInsert = (module: TypefusionScriptExport, result: unknown) => if (resultIsValidSchema && moduleIsValidSchema) { const sql = yield* SqlClient.SqlClient; + const dbHelper = yield* DatabaseHelper; - yield* sql`DROP TABLE IF EXISTS "${sql.unsafe(module.name)}"`.pipe( + yield* dbHelper.dropTableIfExists(sql, module.name).pipe( Effect.mapError( (error) => new DatabaseInsertError({ @@ -197,28 +198,34 @@ export const dbInsert = (module: TypefusionScriptExport, result: unknown) => yield* Effect.logDebug("columnDefinitions\n", columnDefinitions); - yield* sql`CREATE TABLE IF NOT EXISTS "${sql.unsafe(module.name)}" ( - ${sql.unsafe(columnDefinitions)} - )`.pipe( - Effect.mapError( - (error) => - new DatabaseInsertError({ - cause: error, - message: `Error creating table '${module.name}'`, - }), - ), - ); + yield* dbHelper + .createTableIfNotExists(sql, module.name, columnDefinitions) + .pipe( + Effect.mapError( + (error) => + new DatabaseInsertError({ + cause: error, + message: `Error creating table '${module.name}'`, + }), + ), + ); // Note: We cast here because we are going to avoid validating each value in the result as the proper type, we'll let the database fail if the types are incorrect - yield* sql`INSERT INTO "${sql.unsafe(module.name)}" ${sql.insert(result as Parameters[0][])}`.pipe( - Effect.mapError( - (error) => - new DatabaseInsertError({ - cause: error, - message: `Error inserting data into '${module.name}'`, - }), - ), - ); + yield* dbHelper + .insertIntoTable( + sql, + module.name, + result as Parameters[0][], + ) + .pipe( + Effect.mapError( + (error) => + new DatabaseInsertError({ + cause: error, + message: `Error inserting data into '${module.name}'`, + }), + ), + ); } else { if (!resultIsValidSchema) { yield* Effect.logError("Invalid script result: ", result); @@ -256,7 +263,8 @@ export class DatabaseSelectError extends Data.TaggedError( export const dbSelect = (module: TypefusionScriptExport) => Effect.gen(function* () { const sql = yield* SqlClient.SqlClient; - return yield* sql`SELECT * FROM "${sql.unsafe(module.name)}"`.pipe( + const dbHelper = yield* DatabaseHelper; + return yield* dbHelper.selectAllFromTable(sql, module.name).pipe( Effect.mapError( (error) => new DatabaseSelectError({ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 27b0f45..cc5ad9a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ importers: version: 2.27.8 '@commitlint/cli': specifier: 19.5.0 - version: 19.5.0(@types/node@22.5.2)(typescript@5.6.2) + version: 19.5.0(@types/node@22.7.4)(typescript@5.6.2) '@commitlint/config-conventional': specifier: 19.5.0 version: 19.5.0 @@ -24,35 +24,35 @@ importers: specifier: 0.21.4 version: 0.21.4 '@typescript-eslint/eslint-plugin': - specifier: 7.18.0 - version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2) + specifier: 8.7.0 + version: 8.7.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2))(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2) '@typescript-eslint/parser': - specifier: 7.18.0 - version: 7.18.0(eslint@8.57.1)(typescript@5.6.2) + specifier: 8.7.0 + version: 8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2) commitizen: - specifier: 4.3.0 - version: 4.3.0(@types/node@22.5.2)(typescript@5.6.2) + specifier: 4.3.1 + version: 4.3.1(@types/node@22.7.4)(typescript@5.6.2) cz-git: specifier: 1.9.4 version: 1.9.4 eslint: - specifier: 8.57.1 - version: 8.57.1 + specifier: 9.11.1 + version: 9.11.1(jiti@2.0.0) eslint-config-prettier: specifier: 9.1.0 - version: 9.1.0(eslint@8.57.1) + version: 9.1.0(eslint@9.11.1(jiti@2.0.0)) eslint-plugin-import: specifier: 2.30.0 - version: 2.30.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1) + version: 2.30.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2))(eslint@9.11.1(jiti@2.0.0)) eslint-plugin-simple-import-sort: specifier: 12.1.1 - version: 12.1.1(eslint@8.57.1) + version: 12.1.1(eslint@9.11.1(jiti@2.0.0)) eslint-plugin-sort-keys: specifier: 2.3.5 version: 2.3.5 eslint-plugin-typescript-sort-keys: specifier: 3.2.0 - version: 3.2.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2) + version: 3.2.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2))(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2) husky: specifier: 9.1.6 version: 9.1.6 @@ -64,7 +64,7 @@ importers: version: 4.0.0(prettier@3.3.3) tsup: specifier: 8.3.0 - version: 8.3.0(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) + version: 8.3.0(jiti@2.0.0)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) turbo: specifier: 2.1.2 version: 2.1.2 @@ -81,29 +81,29 @@ importers: packages/typefusion: dependencies: '@effect/cli': - specifier: 0.42.0 - version: 0.42.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/printer-ansi@0.35.0(@effect/typeclass@0.26.0(effect@3.7.2))(effect@3.7.2))(@effect/printer@0.35.0(@effect/typeclass@0.26.0(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2) + specifier: 0.45.2 + version: 0.45.2(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/printer-ansi@0.36.4(@effect/typeclass@0.27.4(effect@3.8.4))(effect@3.8.4))(@effect/printer@0.36.4(@effect/typeclass@0.27.4(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4) '@effect/platform': - specifier: 0.63.0 - version: 0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2) + specifier: 0.66.2 + version: 0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4) '@effect/platform-node': - specifier: 0.58.0 - version: 0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2) + specifier: 0.61.3 + version: 0.61.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4) '@effect/schema': - specifier: 0.72.3 - version: 0.72.3(effect@3.7.2) + specifier: 0.74.1 + version: 0.74.1(effect@3.8.4) '@effect/sql': - specifier: 0.10.0 - version: 0.10.0(@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2)(ws@8.18.0))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2) + specifier: 0.14.0 + version: 0.14.0(@effect/experimental@0.27.3(@effect/platform-node@0.61.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4)(ws@8.18.0))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4) '@effect/sql-mysql2': - specifier: 0.10.0 - version: 0.10.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/sql@0.10.0(@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2)(ws@8.18.0))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2) + specifier: 0.14.0 + version: 0.14.0(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/sql@0.14.0(@effect/experimental@0.27.3(@effect/platform-node@0.61.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4)(ws@8.18.0))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4) '@effect/sql-pg': - specifier: 0.10.0 - version: 0.10.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/sql@0.10.0(@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2)(ws@8.18.0))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2) + specifier: 0.14.0 + version: 0.14.0(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/sql@0.14.0(@effect/experimental@0.27.3(@effect/platform-node@0.61.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4)(ws@8.18.0))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4) effect: - specifier: 3.7.2 - version: 3.7.2 + specifier: 3.8.4 + version: 3.8.4 postgres: specifier: 3.4.4 version: 3.4.4 @@ -115,11 +115,11 @@ importers: version: 2.7.0 devDependencies: '@effect/vitest': - specifier: 0.9.2 - version: 0.9.2(effect@3.7.2)(vitest@2.1.1(@types/node@22.5.2)) + specifier: 0.10.5 + version: 0.10.5(effect@3.8.4)(vitest@2.1.1(@types/node@22.7.4)) '@vitest/coverage-v8': specifier: 2.1.1 - version: 2.1.1(vitest@2.1.1(@types/node@22.5.2)) + version: 2.1.1(vitest@2.1.1(@types/node@22.7.4)) dotenv-cli: specifier: 7.4.2 version: 7.4.2 @@ -130,21 +130,17 @@ importers: specifier: 4.26.1 version: 4.26.1 vite: - specifier: 5.4.7 - version: 5.4.7(@types/node@22.5.2) + specifier: 5.4.8 + version: 5.4.8(@types/node@22.7.4) vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.4.5)(vite@5.4.7(@types/node@22.5.2)) + version: 5.0.1(typescript@5.4.5)(vite@5.4.8(@types/node@22.7.4)) vitest: specifier: 2.1.1 - version: 2.1.1(@types/node@22.5.2) + version: 2.1.1(@types/node@22.7.4) packages: - '@aashutoshrathi/word-wrap@1.2.6': - resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} - engines: {node: '>=0.10.0'} - '@ampproject/remapping@2.3.0': resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} @@ -267,10 +263,6 @@ packages: resolution: {integrity: sha512-OBhdtJyHNPryZKg0fFpZNOBM1ZDbntMvqMuSmpfyP86XSfwzGw4CaoYRG4RutUPg0BTK07VMRIkNJT6wi2zthg==} engines: {node: '>=v18'} - '@commitlint/config-validator@19.0.3': - resolution: {integrity: sha512-2D3r4PKjoo59zBc2auodrSCaUnCSALCx54yveOFwwP/i2kfEAQrygwOleFWswLqK0UL/F9r07MFi5ev2ohyM4Q==} - engines: {node: '>=v18'} - '@commitlint/config-validator@19.5.0': resolution: {integrity: sha512-CHtj92H5rdhKt17RmgALhfQt95VayrUo2tSqY9g2w+laAXyk7K/Ef6uPm9tn5qSIwSmrLjKaXK9eiNuxmQrDBw==} engines: {node: '>=v18'} @@ -279,10 +271,6 @@ packages: resolution: {integrity: sha512-Kv0pYZeMrdg48bHFEU5KKcccRfKmISSm9MvgIgkpI6m+ohFTB55qZlBW6eYqh/XDfRuIO0x4zSmvBjmOwWTwkg==} engines: {node: '>=v18'} - '@commitlint/execute-rule@19.0.0': - resolution: {integrity: sha512-mtsdpY1qyWgAO/iOK0L6gSGeR7GFcdW7tIjcNFxcWkfLDF5qVbPHKuGATFqRMsxcO8OUKNj0+3WOHB7EHm4Jdw==} - engines: {node: '>=v18'} - '@commitlint/execute-rule@19.5.0': resolution: {integrity: sha512-aqyGgytXhl2ejlk+/rfgtwpPexYyri4t8/n4ku6rRJoRhGZpLFMqrZ+YaubeGysCP6oz4mMA34YSTaSOKEeNrg==} engines: {node: '>=v18'} @@ -299,10 +287,6 @@ packages: resolution: {integrity: sha512-cAAQwJcRtiBxQWO0eprrAbOurtJz8U6MgYqLz+p9kLElirzSCc0vGMcyCaA1O7AqBuxo11l1XsY3FhOFowLAAg==} engines: {node: '>=v18'} - '@commitlint/load@19.2.0': - resolution: {integrity: sha512-XvxxLJTKqZojCxaBQ7u92qQLFMMZc4+p9qrIq/9kJDy8DOrEa7P1yx7Tjdc2u2JxIalqT4KOGraVgCE7eCYJyQ==} - engines: {node: '>=v18'} - '@commitlint/load@19.5.0': resolution: {integrity: sha512-INOUhkL/qaKqwcTUvCE8iIUf5XHsEPCLY9looJ/ipzi7jtGhgmtH7OOFiNvwYgH7mA8osUWOUDV8t4E2HAi4xA==} engines: {node: '>=v18'} @@ -319,10 +303,6 @@ packages: resolution: {integrity: sha512-TjS3HLPsLsxFPQj6jou8/CZFAmOP2y+6V4PGYt3ihbQKTY1Jnv0QG28WRKl/d1ha6zLODPZqsxLEov52dhR9BQ==} engines: {node: '>=v18'} - '@commitlint/resolve-extends@19.1.0': - resolution: {integrity: sha512-z2riI+8G3CET5CPgXJPlzftH+RiWYLMYv4C9tSLdLXdr6pBNimSKukYP9MS27ejmscqCTVA4almdLh0ODD2KYg==} - engines: {node: '>=v18'} - '@commitlint/resolve-extends@19.5.0': resolution: {integrity: sha512-CU/GscZhCUsJwcKTJS9Ndh3AKGZTNFIOoQB2n8CmFnizE0VnEuJoum+COW+C1lNABEeqk6ssfc1Kkalm4bDklA==} engines: {node: '>=v18'} @@ -339,30 +319,26 @@ packages: resolution: {integrity: sha512-IP1YLmGAk0yWrImPRRc578I3dDUI5A2UBJx9FbSOjxe9sTlzFiwVJ+zeMLgAtHMtGZsC8LUnzmW1qRemkFU4ng==} engines: {node: '>=v18'} - '@commitlint/types@19.0.3': - resolution: {integrity: sha512-tpyc+7i6bPG9mvaBbtKUeghfyZSDgWquIDfMgqYtTbmZ9Y9VzEm2je9EYcQ0aoz5o7NvGS+rcDec93yO08MHYA==} - engines: {node: '>=v18'} - '@commitlint/types@19.5.0': resolution: {integrity: sha512-DSHae2obMSMkAtTBSOulg5X7/z+rGLxcXQIkg3OmWvY6wifojge5uVMydfhUvs7yQj+V7jNmRZ2Xzl8GJyqRgg==} engines: {node: '>=v18'} - '@effect/cli@0.42.0': - resolution: {integrity: sha512-BCHCRVrwXDdBuK1I0Lx7C0idmiTD+GNDAOpdspw2C0YtaZD0Xkrz/YqMs5Gq4vynGE0VcFHsCzZK32x/gIHyVA==} + '@effect/cli@0.45.2': + resolution: {integrity: sha512-C0rFVPCp4Gj47mB+E2tuXrbwMWuz/5UUjvpTcNG7pFAZwu+YbEYekoXNhIV1QQg+64zSXVlIvAe1kU5i+IjQHQ==} peerDependencies: - '@effect/platform': ^0.63.0 - '@effect/printer': ^0.35.0 - '@effect/printer-ansi': ^0.35.0 - '@effect/schema': ^0.72.0 - effect: ^3.7.0 - - '@effect/experimental@0.24.0': - resolution: {integrity: sha512-LiZhzOOXm4/I3nmNJ/tD3hUcl8Dm0iHexFaKIbmoLksz2pbKMfIvC/vy+bDRzW/ktXOIYiq/kK/8xsK6dJrMjA==} + '@effect/platform': ^0.66.2 + '@effect/printer': ^0.36.4 + '@effect/printer-ansi': ^0.36.4 + '@effect/schema': ^0.74.1 + effect: ^3.8.4 + + '@effect/experimental@0.27.3': + resolution: {integrity: sha512-Fk+WEuGV0MItxoy2npQax0uOab46vZPa9pZrFdoQ9UB0OxhFzW7N5KG2beUm+3QkJ60jqmW797jH3oBfgXSp2w==} peerDependencies: - '@effect/platform': ^0.63.0 - '@effect/platform-node': ^0.58.0 - '@effect/schema': ^0.72.0 - effect: ^3.7.0 + '@effect/platform': ^0.66.2 + '@effect/platform-node': ^0.61.3 + '@effect/schema': ^0.74.1 + effect: ^3.8.4 ioredis: ^5 lmdb: ^3 ws: ^8 @@ -376,73 +352,73 @@ packages: ws: optional: true - '@effect/platform-node-shared@0.13.0': - resolution: {integrity: sha512-AQ/kOJmie/0BMMHcCdjWkdC7yHh42my+tHqkOgJse71fwotxl1r2zXi4dADQu++iFH/fhaWQrpuUqlWvGPyz6w==} + '@effect/platform-node-shared@0.16.3': + resolution: {integrity: sha512-RuOZsFe++CkrUXn63/vGG2ZOmvDam+5Czq/Nf86Wbn1Bby3rDrrAHGTEe63sMlJ0+mXGhd0KwMRAdPz1+gKvQA==} peerDependencies: - '@effect/platform': ^0.63.0 - effect: ^3.7.0 + '@effect/platform': ^0.66.2 + effect: ^3.8.4 - '@effect/platform-node@0.58.0': - resolution: {integrity: sha512-HW7BmtemCUCaNhrXfC+qIF1T8BxUc7KBHSrvlIE6sTiWlw54h7bIld1lyksAIXeSJMoRKP9vEAroEmLigGJf9A==} + '@effect/platform-node@0.61.3': + resolution: {integrity: sha512-bgI8OVllrX58pAZOUqxzjZxm6ZB4AA7j6/kvHnRDIeTUW0Bk1JLyEnsyVmvm2GkTsMyn5fXRDdlnINP35MmIiw==} peerDependencies: - '@effect/platform': ^0.63.0 - effect: ^3.7.0 + '@effect/platform': ^0.66.2 + effect: ^3.8.4 - '@effect/platform@0.63.0': - resolution: {integrity: sha512-24AtBGkTNzkYU4XOH3SLo9M4PyeHtW81PFwqovKPSm9+yxTLYR2lAVqFftIfaGfBqgsNVuNrh0SaELDWGdSP6Q==} + '@effect/platform@0.66.2': + resolution: {integrity: sha512-Gqr+C8GhjC9Ix1JdakDVaWbJcy9qISN8wNz6OdLjiWL1aR3glAscEgICTuB3TOH7F6e3M/PK3RYhsuwVgo63QA==} peerDependencies: - '@effect/schema': ^0.72.0 - effect: ^3.7.0 + '@effect/schema': ^0.74.1 + effect: ^3.8.4 - '@effect/printer-ansi@0.35.0': - resolution: {integrity: sha512-4VJpGXRWDk2W9HtT1OX2OYTl/Gm4kZ2k0k0U409D/FiHfD/KSsaHuFCI4/cHnuPx+vS6AQHulVTVbKWPRlRw2w==} + '@effect/printer-ansi@0.36.4': + resolution: {integrity: sha512-6vpp9M/yA3qZGtboudMh92fZy4gzi3TXpEqJ5Y93qlF5aKD0XKPFp4FJZOO8+/w5PbMR/s1AXp03rmsQPi7puA==} peerDependencies: - '@effect/typeclass': ^0.26.0 - effect: ^3.7.0 + '@effect/typeclass': ^0.27.4 + effect: ^3.8.4 - '@effect/printer@0.35.0': - resolution: {integrity: sha512-e0FY9RvTfiH20oUPIutvqXr62ycWHCVn4oZaVa63y7QbzrX1PdhqGysf+O1qq4sEZHj/1WCJ6VCCDnnys7RZnQ==} + '@effect/printer@0.36.4': + resolution: {integrity: sha512-ENo1CMDiV7lD+Z5aydDL2mv2oAgr7Vpi+FuxR/yBoPPSoYd0PcqcVn6PEmMnJj0S1pxLGL1TaSqKHLmGQDeVVQ==} peerDependencies: - '@effect/typeclass': ^0.26.0 - effect: ^3.7.0 + '@effect/typeclass': ^0.27.4 + effect: ^3.8.4 - '@effect/schema@0.72.3': - resolution: {integrity: sha512-T1TV/8TMnEm5RSYQXOPmkqEWt8NfRd8E6FSJh9+eZ+jDc8bhAmh3K4J0BQZZcdqaftH21GdflAUbYScy8DZ71Q==} + '@effect/schema@0.74.1': + resolution: {integrity: sha512-koTi0M1MYUjEDawLmksXBROROLx0BEG2ErwVGLVawmwuBwVbw1MTEd0QlG2+jds5avYXCJp67rHS7cuIxmnBwg==} peerDependencies: - effect: ^3.7.2 + effect: ^3.8.4 - '@effect/sql-mysql2@0.10.0': - resolution: {integrity: sha512-3b8zj+11gYXB7ZOcxTqM6HUesCJj9cNFzST5x0QBQtDBIKhmZSWhdUeTNqbloEeRGy+rx9bsPW2W81zkrYNCRA==} + '@effect/sql-mysql2@0.14.0': + resolution: {integrity: sha512-M9UOWyxBah7FvSgBZK+YXsPONtM7mxax1VwkzsNFH7c3QeKRmvOoS2ysXUKXsX9olL5R3P6gkV3ji2o8zCMs9w==} peerDependencies: - '@effect/platform': ^0.63.0 - '@effect/sql': ^0.10.0 - effect: ^3.7.0 + '@effect/platform': ^0.66.2 + '@effect/sql': ^0.14.0 + effect: ^3.8.4 - '@effect/sql-pg@0.10.0': - resolution: {integrity: sha512-9Yxv76PYqiQqq2+ph8+lRIBGYhUAEwjBHmILxXPibd5vXODKJoKCaaMzPLFf9xdA8Yh2LgjIoFhAjZH7gcQgQw==} + '@effect/sql-pg@0.14.0': + resolution: {integrity: sha512-hYAo6NVIve+sjJWBJ2WqyRH8C1gScvlkuWRcj48MX+66CSfQD8qJBMyarqyum24Rptn/dwVoHlNv4eLNZ5U64A==} peerDependencies: - '@effect/platform': ^0.63.0 - '@effect/sql': ^0.10.0 - effect: ^3.7.0 + '@effect/platform': ^0.66.2 + '@effect/sql': ^0.14.0 + effect: ^3.8.4 - '@effect/sql@0.10.0': - resolution: {integrity: sha512-4/bb21G/ZlrE7Nw8AatWiR4QUC8o1DXFXayX3uipx1/MxKQv9F8g67Nzc9LhpqPiOav9a54FvpgDG91gdLoykw==} + '@effect/sql@0.14.0': + resolution: {integrity: sha512-hV837PdMchhmLWcUjrNssYldfgLcz5mSu2wUzEs4YKgyUR6dyBNq5VLKw2pUGSpHRWYBW6tYflIKiDCMtrbCsQ==} peerDependencies: - '@effect/experimental': ^0.24.0 - '@effect/platform': ^0.63.0 - '@effect/schema': ^0.72.0 - effect: ^3.7.0 + '@effect/experimental': ^0.27.3 + '@effect/platform': ^0.66.2 + '@effect/schema': ^0.74.1 + effect: ^3.8.4 - '@effect/typeclass@0.26.0': - resolution: {integrity: sha512-rAbeESXVIm3quIWOjNSGi6p+KAtbVpzByOfj8fbBrnTHHbjhAQ9G7lG2YBtLsjUtQysW3JVWkDD+bb6i6tftFQ==} + '@effect/typeclass@0.27.4': + resolution: {integrity: sha512-Gz66af3E70t9zQI2oVUAyuqLRwUomo8VTyajiysdGKIu2wYT/9Rx8LWTuuYZMJwL5ML01JQJAxtrMI/bkiDA2w==} peerDependencies: - effect: ^3.7.0 + effect: ^3.8.4 - '@effect/vitest@0.9.2': - resolution: {integrity: sha512-bzoW6v2jIkl68jEIkTbfFJL8n85mldHvQjjHmMVrb2ym7jt4eBI9U4P/TLoBA/3pAXEGhGkovq1jqET3LBmvFw==} + '@effect/vitest@0.10.5': + resolution: {integrity: sha512-rIzYdFRwF/caf3pjbnsdtEjG0HfZSWH8jFsmkDVkQBkTPVYtk41PEMNQCdotK8Gynv7YKpI2fybjDO3LVBPk5A==} peerDependencies: - effect: ^3.7.2 - vitest: ^2.0.4 + effect: ^3.8.4 + vitest: ^2.0.5 '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} @@ -732,30 +708,41 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.10.0': - resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} + '@eslint-community/regexpp@4.11.1': + resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/config-array@0.18.0': + resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@8.57.1': - resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/core@0.6.0': + resolution: {integrity: sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.1.0': + resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.11.1': + resolution: {integrity: sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@humanwhocodes/config-array@0.13.0': - resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead + '@eslint/object-schema@2.1.4': + resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.2.0': + resolution: {integrity: sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead + '@humanwhocodes/retry@0.3.0': + resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} + engines: {node: '>=18.18'} '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} @@ -958,81 +945,161 @@ packages: cpu: [arm] os: [android] + '@rollup/rollup-android-arm-eabi@4.22.5': + resolution: {integrity: sha512-SU5cvamg0Eyu/F+kLeMXS7GoahL+OoizlclVFX3l5Ql6yNlywJJ0OuqTzUx0v+aHhPHEB/56CT06GQrRrGNYww==} + cpu: [arm] + os: [android] + '@rollup/rollup-android-arm64@4.21.2': resolution: {integrity: sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==} cpu: [arm64] os: [android] + '@rollup/rollup-android-arm64@4.22.5': + resolution: {integrity: sha512-S4pit5BP6E5R5C8S6tgU/drvgjtYW76FBuG6+ibG3tMvlD1h9LHVF9KmlmaUBQ8Obou7hEyS+0w+IR/VtxwNMQ==} + cpu: [arm64] + os: [android] + '@rollup/rollup-darwin-arm64@4.21.2': resolution: {integrity: sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==} cpu: [arm64] os: [darwin] + '@rollup/rollup-darwin-arm64@4.22.5': + resolution: {integrity: sha512-250ZGg4ipTL0TGvLlfACkIxS9+KLtIbn7BCZjsZj88zSg2Lvu3Xdw6dhAhfe/FjjXPVNCtcSp+WZjVsD3a/Zlw==} + cpu: [arm64] + os: [darwin] + '@rollup/rollup-darwin-x64@4.21.2': resolution: {integrity: sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==} cpu: [x64] os: [darwin] + '@rollup/rollup-darwin-x64@4.22.5': + resolution: {integrity: sha512-D8brJEFg5D+QxFcW6jYANu+Rr9SlKtTenmsX5hOSzNYVrK5oLAEMTUgKWYJP+wdKyCdeSwnapLsn+OVRFycuQg==} + cpu: [x64] + os: [darwin] + '@rollup/rollup-linux-arm-gnueabihf@4.21.2': resolution: {integrity: sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==} cpu: [arm] os: [linux] + '@rollup/rollup-linux-arm-gnueabihf@4.22.5': + resolution: {integrity: sha512-PNqXYmdNFyWNg0ma5LdY8wP+eQfdvyaBAojAXgO7/gs0Q/6TQJVXAXe8gwW9URjbS0YAammur0fynYGiWsKlXw==} + cpu: [arm] + os: [linux] + '@rollup/rollup-linux-arm-musleabihf@4.21.2': resolution: {integrity: sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==} cpu: [arm] os: [linux] + '@rollup/rollup-linux-arm-musleabihf@4.22.5': + resolution: {integrity: sha512-kSSCZOKz3HqlrEuwKd9TYv7vxPYD77vHSUvM2y0YaTGnFc8AdI5TTQRrM1yIp3tXCKrSL9A7JLoILjtad5t8pQ==} + cpu: [arm] + os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.21.2': resolution: {integrity: sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==} cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.22.5': + resolution: {integrity: sha512-oTXQeJHRbOnwRnRffb6bmqmUugz0glXaPyspp4gbQOPVApdpRrY/j7KP3lr7M8kTfQTyrBUzFjj5EuHAhqH4/w==} + cpu: [arm64] + os: [linux] + '@rollup/rollup-linux-arm64-musl@4.21.2': resolution: {integrity: sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==} cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-musl@4.22.5': + resolution: {integrity: sha512-qnOTIIs6tIGFKCHdhYitgC2XQ2X25InIbZFor5wh+mALH84qnFHvc+vmWUpyX97B0hNvwNUL4B+MB8vJvH65Fw==} + cpu: [arm64] + os: [linux] + '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': resolution: {integrity: sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==} cpu: [ppc64] os: [linux] + '@rollup/rollup-linux-powerpc64le-gnu@4.22.5': + resolution: {integrity: sha512-TMYu+DUdNlgBXING13rHSfUc3Ky5nLPbWs4bFnT+R6Vu3OvXkTkixvvBKk8uO4MT5Ab6lC3U7x8S8El2q5o56w==} + cpu: [ppc64] + os: [linux] + '@rollup/rollup-linux-riscv64-gnu@4.21.2': resolution: {integrity: sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==} cpu: [riscv64] os: [linux] + '@rollup/rollup-linux-riscv64-gnu@4.22.5': + resolution: {integrity: sha512-PTQq1Kz22ZRvuhr3uURH+U/Q/a0pbxJoICGSprNLAoBEkyD3Sh9qP5I0Asn0y0wejXQBbsVMRZRxlbGFD9OK4A==} + cpu: [riscv64] + os: [linux] + '@rollup/rollup-linux-s390x-gnu@4.21.2': resolution: {integrity: sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==} cpu: [s390x] os: [linux] + '@rollup/rollup-linux-s390x-gnu@4.22.5': + resolution: {integrity: sha512-bR5nCojtpuMss6TDEmf/jnBnzlo+6n1UhgwqUvRoe4VIotC7FG1IKkyJbwsT7JDsF2jxR+NTnuOwiGv0hLyDoQ==} + cpu: [s390x] + os: [linux] + '@rollup/rollup-linux-x64-gnu@4.21.2': resolution: {integrity: sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==} cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-gnu@4.22.5': + resolution: {integrity: sha512-N0jPPhHjGShcB9/XXZQWuWBKZQnC1F36Ce3sDqWpujsGjDz/CQtOL9LgTrJ+rJC8MJeesMWrMWVLKKNR/tMOCA==} + cpu: [x64] + os: [linux] + '@rollup/rollup-linux-x64-musl@4.21.2': resolution: {integrity: sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==} cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-musl@4.22.5': + resolution: {integrity: sha512-uBa2e28ohzNNwjr6Uxm4XyaA1M/8aTgfF2T7UIlElLaeXkgpmIJ2EitVNQxjO9xLLLy60YqAgKn/AqSpCUkE9g==} + cpu: [x64] + os: [linux] + '@rollup/rollup-win32-arm64-msvc@4.21.2': resolution: {integrity: sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==} cpu: [arm64] os: [win32] + '@rollup/rollup-win32-arm64-msvc@4.22.5': + resolution: {integrity: sha512-RXT8S1HP8AFN/Kr3tg4fuYrNxZ/pZf1HemC5Tsddc6HzgGnJm0+Lh5rAHJkDuW3StI0ynNXukidROMXYl6ew8w==} + cpu: [arm64] + os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.21.2': resolution: {integrity: sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==} cpu: [ia32] os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.22.5': + resolution: {integrity: sha512-ElTYOh50InL8kzyUD6XsnPit7jYCKrphmddKAe1/Ytt74apOxDq5YEcbsiKs0fR3vff3jEneMM+3I7jbqaMyBg==} + cpu: [ia32] + os: [win32] + '@rollup/rollup-win32-x64-msvc@4.21.2': resolution: {integrity: sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==} cpu: [x64] os: [win32] + '@rollup/rollup-win32-x64-msvc@4.22.5': + resolution: {integrity: sha512-+lvL/4mQxSV8MukpkKyyvfwhH266COcWlXE/1qxwN08ajovta3459zrjLghYMgDerlzNwLAcFpvU+WWE5y6nAQ==} + cpu: [x64] + os: [win32] + '@rtsao/scc@1.1.0': resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} @@ -1065,6 +1132,9 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} @@ -1089,6 +1159,9 @@ packages: '@types/node@22.5.2': resolution: {integrity: sha512-acJsPTEqYqulZS/Yp/S3GgeE6GZ0qYODUR8aVr/DkhHQ8l9nd4j5x1/ZJy9/gHrRlFMqkO6i0I3E27Alu4jjPg==} + '@types/node@22.7.4': + resolution: {integrity: sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==} + '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} @@ -1101,12 +1174,12 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@typescript-eslint/eslint-plugin@7.18.0': - resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/eslint-plugin@8.7.0': + resolution: {integrity: sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: @@ -1118,11 +1191,11 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - '@typescript-eslint/parser@7.18.0': - resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/parser@8.7.0': + resolution: {integrity: sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: @@ -1132,15 +1205,14 @@ packages: resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@typescript-eslint/scope-manager@7.18.0': - resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@8.7.0': + resolution: {integrity: sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@7.18.0': - resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/type-utils@8.7.0': + resolution: {integrity: sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: @@ -1154,9 +1226,9 @@ packages: resolution: {integrity: sha512-7K7HMcSQIAND6RBL4kDl24sG/xKM13cA85dc7JnmQXw2cBDngg7c19B++JzvJHRG3zG36n9j1i451GBzRuHchw==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/types@7.18.0': - resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@8.7.0': + resolution: {integrity: sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@5.62.0': resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} @@ -1176,9 +1248,9 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@7.18.0': - resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/typescript-estree@8.7.0': + resolution: {integrity: sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -1191,11 +1263,11 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - '@typescript-eslint/utils@7.18.0': - resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/utils@8.7.0': + resolution: {integrity: sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 '@typescript-eslint/visitor-keys@5.62.0': resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} @@ -1205,9 +1277,9 @@ packages: resolution: {integrity: sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/visitor-keys@7.18.0': - resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@8.7.0': + resolution: {integrity: sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -1279,8 +1351,8 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn@8.11.3: - resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} engines: {node: '>=0.4.0'} hasBin: true @@ -1427,6 +1499,10 @@ packages: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} @@ -1532,6 +1608,10 @@ packages: resolution: {integrity: sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==} engines: {node: '>=6'} + cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + cli-width@3.0.0: resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} engines: {node: '>= 10'} @@ -1571,8 +1651,8 @@ packages: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} - commitizen@4.3.0: - resolution: {integrity: sha512-H0iNtClNEhT0fotHvGV3E9tDejDeS04sN1veIebsKYGMuGscFaswRoYJKmT3eW85eIJAs0F28bG2+a/9wCOfPw==} + commitizen@4.3.1: + resolution: {integrity: sha512-gwAPAVTy/j5YcOOebcCRIijn+mSjWJC+IYKivTu6aG8Ei/scoXgfsMRnuAk6b0GRste2J4NGxVdMN3ZpfNaVaw==} engines: {node: '>= 12'} hasBin: true @@ -1702,6 +1782,15 @@ packages: supports-color: optional: true + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} @@ -1787,10 +1876,6 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - dot-prop@5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -1817,8 +1902,8 @@ packages: effect@3.3.2: resolution: {integrity: sha512-695XQBtp+UUYG50oREG9ujnRoeQU7xhwHDhT6ZAexm3Q+umdml1kjxcPoYRrS65crmaLlhVpjZHePJNzWOODnA==} - effect@3.7.2: - resolution: {integrity: sha512-pV7l1+LSZFvVObj4zuy4nYiBaC7qZOfrKV6s/Ef4p3KueiQwZFgamazklwyZ+x7Nyj2etRDFvHE/xkThTfQD1w==} + effect@3.8.4: + resolution: {integrity: sha512-rOZ1XAi+Fb+fAHoUJ5FnJPSPZEBxVbCl5QWtOWFTgOeFHx0QpbK3pezWvq9OIxQPdwvSkPOw926qrs4xdD9dLA==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -1961,30 +2046,39 @@ packages: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-scope@8.1.0: + resolution: {integrity: sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint@8.57.1: - resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-visitor-keys@4.1.0: + resolution: {integrity: sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.11.1: + resolution: {integrity: sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true - espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + espree@10.2.0: + resolution: {integrity: sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true - esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} esrecurse@4.3.0: @@ -2035,6 +2129,10 @@ packages: resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} engines: {node: '>=8.6.0'} + fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} @@ -2056,14 +2154,18 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + find-my-way-ts@0.1.5: resolution: {integrity: sha512-4GOTMrpGQVzsCH2ruUn2vmwzV/02zF4q+ybhCIrw/Rkt3L8KWcycdC6aJMctJzwN4fXD4SD5F/4B9Sksh5rE0A==} @@ -2093,9 +2195,9 @@ packages: resolution: {integrity: sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==} engines: {node: '>= 10.13.0'} - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -2216,9 +2318,9 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} @@ -2350,6 +2452,10 @@ packages: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -2583,8 +2689,8 @@ packages: resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} hasBin: true - jiti@1.21.6: - resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} + jiti@2.0.0: + resolution: {integrity: sha512-CJ7e7Abb779OTRv3lomfp7Mns/Sy1+U4pcAx5VbjxCZD5ZM/VJaXPpPjNKjtSvWQy/H86E49REXR34dl1JEz9w==} hasBin: true jju@1.4.0: @@ -2768,9 +2874,9 @@ packages: resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} engines: {node: '>=12'} - lru-cache@8.0.5: - resolution: {integrity: sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==} - engines: {node: '>=16.14'} + lru.min@1.1.1: + resolution: {integrity: sha512-FbAj6lXil6t8z4z3j0E5mfRlPzxkySotzUHwRXjlpRh10vc6AI6WN62ehZj82VG7M20rqogJ0GLwar2Xa05a8Q==} + engines: {bun: '>=1.0.0', deno: '>=1.30.0', node: '>=8.0.0'} lunr@2.3.9: resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} @@ -2839,6 +2945,10 @@ packages: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -2923,8 +3033,8 @@ packages: mute-stream@0.0.8: resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} - mysql2@3.11.0: - resolution: {integrity: sha512-J9phbsXGvTOcRVPR95YedzVSxJecpW5A5+cQ57rhHIFXteTP10HCs+VBjS7DHIKfEaI1zQ5tlVrquCd64A6YvA==} + mysql2@3.11.3: + resolution: {integrity: sha512-Qpu2ADfbKzyLdwC/5d4W7+5Yz7yBzCU05YWt5npWzACST37wJsB23wgOSo00qi043urkiRwXtEvJc9UnuLX/MQ==} engines: {node: '>= 8.0'} mz@2.7.0: @@ -3026,8 +3136,8 @@ packages: oniguruma-to-js@0.4.3: resolution: {integrity: sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==} - optionator@0.9.3: - resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} ora@5.4.1: @@ -3346,16 +3456,16 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - rollup@4.21.2: resolution: {integrity: sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rollup@4.22.5: + resolution: {integrity: sha512-WoinX7GeQOFMGznEcWA1WrTQCd/tpEbMkc3nuMs9BT0CPjMdSjPMTVClwWd4pgSQwJdP65SK9mTCNvItlr5o7w==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} @@ -3766,10 +3876,6 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} @@ -3868,8 +3974,8 @@ packages: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} - universalify@2.0.0: - resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} uri-js@4.4.1: @@ -3904,8 +4010,8 @@ packages: vite: optional: true - vite@5.4.7: - resolution: {integrity: sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ==} + vite@5.4.8: + resolution: {integrity: sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -4041,11 +4147,6 @@ packages: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} - yaml@2.5.0: - resolution: {integrity: sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==} - engines: {node: '>= 14'} - hasBin: true - yaml@2.5.1: resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} engines: {node: '>= 14'} @@ -4080,8 +4181,6 @@ packages: snapshots: - '@aashutoshrathi/word-wrap@1.2.6': {} - '@ampproject/remapping@2.3.0': dependencies: '@jridgewell/gen-mapping': 0.3.5 @@ -4305,11 +4404,11 @@ snapshots: human-id: 1.0.2 prettier: 2.8.8 - '@commitlint/cli@19.5.0(@types/node@22.5.2)(typescript@5.6.2)': + '@commitlint/cli@19.5.0(@types/node@22.7.4)(typescript@5.6.2)': dependencies: '@commitlint/format': 19.5.0 '@commitlint/lint': 19.5.0 - '@commitlint/load': 19.5.0(@types/node@22.5.2)(typescript@5.6.2) + '@commitlint/load': 19.5.0(@types/node@22.7.4)(typescript@5.6.2) '@commitlint/read': 19.5.0 '@commitlint/types': 19.5.0 tinyexec: 0.3.0 @@ -4323,12 +4422,6 @@ snapshots: '@commitlint/types': 19.5.0 conventional-changelog-conventionalcommits: 7.0.2 - '@commitlint/config-validator@19.0.3': - dependencies: - '@commitlint/types': 19.0.3 - ajv: 8.12.0 - optional: true - '@commitlint/config-validator@19.5.0': dependencies: '@commitlint/types': 19.5.0 @@ -4343,9 +4436,6 @@ snapshots: lodash.startcase: 4.4.0 lodash.upperfirst: 4.3.1 - '@commitlint/execute-rule@19.0.0': - optional: true - '@commitlint/execute-rule@19.5.0': {} '@commitlint/format@19.5.0': @@ -4365,24 +4455,7 @@ snapshots: '@commitlint/rules': 19.5.0 '@commitlint/types': 19.5.0 - '@commitlint/load@19.2.0(@types/node@22.5.2)(typescript@5.6.2)': - dependencies: - '@commitlint/config-validator': 19.0.3 - '@commitlint/execute-rule': 19.0.0 - '@commitlint/resolve-extends': 19.1.0 - '@commitlint/types': 19.0.3 - chalk: 5.3.0 - cosmiconfig: 9.0.0(typescript@5.6.2) - cosmiconfig-typescript-loader: 5.0.0(@types/node@22.5.2)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2) - lodash.isplainobject: 4.0.6 - lodash.merge: 4.6.2 - lodash.uniq: 4.5.0 - transitivePeerDependencies: - - '@types/node' - - typescript - optional: true - - '@commitlint/load@19.5.0(@types/node@22.5.2)(typescript@5.6.2)': + '@commitlint/load@19.5.0(@types/node@22.7.4)(typescript@5.6.2)': dependencies: '@commitlint/config-validator': 19.5.0 '@commitlint/execute-rule': 19.5.0 @@ -4390,7 +4463,7 @@ snapshots: '@commitlint/types': 19.5.0 chalk: 5.3.0 cosmiconfig: 9.0.0(typescript@5.6.2) - cosmiconfig-typescript-loader: 5.0.0(@types/node@22.5.2)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2) + cosmiconfig-typescript-loader: 5.0.0(@types/node@22.7.4)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -4414,16 +4487,6 @@ snapshots: minimist: 1.2.8 tinyexec: 0.3.0 - '@commitlint/resolve-extends@19.1.0': - dependencies: - '@commitlint/config-validator': 19.0.3 - '@commitlint/types': 19.0.3 - global-directory: 4.0.1 - import-meta-resolve: 4.0.0 - lodash.mergewith: 4.6.2 - resolve-from: 5.0.0 - optional: true - '@commitlint/resolve-extends@19.5.0': dependencies: '@commitlint/config-validator': 19.5.0 @@ -4446,50 +4509,44 @@ snapshots: dependencies: find-up: 7.0.0 - '@commitlint/types@19.0.3': - dependencies: - '@types/conventional-commits-parser': 5.0.0 - chalk: 5.3.0 - optional: true - '@commitlint/types@19.5.0': dependencies: '@types/conventional-commits-parser': 5.0.0 chalk: 5.3.0 - '@effect/cli@0.42.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/printer-ansi@0.35.0(@effect/typeclass@0.26.0(effect@3.7.2))(effect@3.7.2))(@effect/printer@0.35.0(@effect/typeclass@0.26.0(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2)': + '@effect/cli@0.45.2(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/printer-ansi@0.36.4(@effect/typeclass@0.27.4(effect@3.8.4))(effect@3.8.4))(@effect/printer@0.36.4(@effect/typeclass@0.27.4(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4)': dependencies: - '@effect/platform': 0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2) - '@effect/printer': 0.35.0(@effect/typeclass@0.26.0(effect@3.7.2))(effect@3.7.2) - '@effect/printer-ansi': 0.35.0(@effect/typeclass@0.26.0(effect@3.7.2))(effect@3.7.2) - '@effect/schema': 0.72.3(effect@3.7.2) - effect: 3.7.2 + '@effect/platform': 0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4) + '@effect/printer': 0.36.4(@effect/typeclass@0.27.4(effect@3.8.4))(effect@3.8.4) + '@effect/printer-ansi': 0.36.4(@effect/typeclass@0.27.4(effect@3.8.4))(effect@3.8.4) + '@effect/schema': 0.74.1(effect@3.8.4) + effect: 3.8.4 ini: 4.1.3 toml: 3.0.0 - yaml: 2.5.0 + yaml: 2.5.1 - '@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2)(ws@8.18.0)': + '@effect/experimental@0.27.3(@effect/platform-node@0.61.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4)(ws@8.18.0)': dependencies: - '@effect/platform': 0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2) - '@effect/schema': 0.72.3(effect@3.7.2) - effect: 3.7.2 + '@effect/platform': 0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4) + '@effect/schema': 0.74.1(effect@3.8.4) + effect: 3.8.4 msgpackr: 1.11.0 optionalDependencies: - '@effect/platform-node': 0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2) + '@effect/platform-node': 0.61.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4) ws: 8.18.0 - '@effect/platform-node-shared@0.13.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2)': + '@effect/platform-node-shared@0.16.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4)': dependencies: - '@effect/platform': 0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2) + '@effect/platform': 0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4) '@parcel/watcher': 2.4.1 - effect: 3.7.2 + effect: 3.8.4 multipasta: 0.2.5 - '@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2)': + '@effect/platform-node@0.61.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4)': dependencies: - '@effect/platform': 0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2) - '@effect/platform-node-shared': 0.13.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2) - effect: 3.7.2 + '@effect/platform': 0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4) + '@effect/platform-node-shared': 0.16.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4) + effect: 3.8.4 mime: 3.0.0 undici: 6.19.8 ws: 8.18.0 @@ -4497,61 +4554,61 @@ snapshots: - bufferutil - utf-8-validate - '@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2)': + '@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4)': dependencies: - '@effect/schema': 0.72.3(effect@3.7.2) - effect: 3.7.2 + '@effect/schema': 0.74.1(effect@3.8.4) + effect: 3.8.4 find-my-way-ts: 0.1.5 multipasta: 0.2.5 - '@effect/printer-ansi@0.35.0(@effect/typeclass@0.26.0(effect@3.7.2))(effect@3.7.2)': + '@effect/printer-ansi@0.36.4(@effect/typeclass@0.27.4(effect@3.8.4))(effect@3.8.4)': dependencies: - '@effect/printer': 0.35.0(@effect/typeclass@0.26.0(effect@3.7.2))(effect@3.7.2) - '@effect/typeclass': 0.26.0(effect@3.7.2) - effect: 3.7.2 + '@effect/printer': 0.36.4(@effect/typeclass@0.27.4(effect@3.8.4))(effect@3.8.4) + '@effect/typeclass': 0.27.4(effect@3.8.4) + effect: 3.8.4 - '@effect/printer@0.35.0(@effect/typeclass@0.26.0(effect@3.7.2))(effect@3.7.2)': + '@effect/printer@0.36.4(@effect/typeclass@0.27.4(effect@3.8.4))(effect@3.8.4)': dependencies: - '@effect/typeclass': 0.26.0(effect@3.7.2) - effect: 3.7.2 + '@effect/typeclass': 0.27.4(effect@3.8.4) + effect: 3.8.4 - '@effect/schema@0.72.3(effect@3.7.2)': + '@effect/schema@0.74.1(effect@3.8.4)': dependencies: - effect: 3.7.2 + effect: 3.8.4 fast-check: 3.22.0 - '@effect/sql-mysql2@0.10.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/sql@0.10.0(@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2)(ws@8.18.0))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2)': + '@effect/sql-mysql2@0.14.0(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/sql@0.14.0(@effect/experimental@0.27.3(@effect/platform-node@0.61.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4)(ws@8.18.0))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4)': dependencies: - '@effect/platform': 0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2) - '@effect/sql': 0.10.0(@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2)(ws@8.18.0))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2) + '@effect/platform': 0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4) + '@effect/sql': 0.14.0(@effect/experimental@0.27.3(@effect/platform-node@0.61.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4)(ws@8.18.0))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4) '@opentelemetry/semantic-conventions': 1.27.0 - effect: 3.7.2 - mysql2: 3.11.0 + effect: 3.8.4 + mysql2: 3.11.3 - '@effect/sql-pg@0.10.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/sql@0.10.0(@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2)(ws@8.18.0))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2)': + '@effect/sql-pg@0.14.0(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/sql@0.14.0(@effect/experimental@0.27.3(@effect/platform-node@0.61.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4)(ws@8.18.0))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4)': dependencies: - '@effect/platform': 0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2) - '@effect/sql': 0.10.0(@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2)(ws@8.18.0))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2) + '@effect/platform': 0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4) + '@effect/sql': 0.14.0(@effect/experimental@0.27.3(@effect/platform-node@0.61.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4)(ws@8.18.0))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4) '@opentelemetry/semantic-conventions': 1.27.0 - effect: 3.7.2 + effect: 3.8.4 postgres: 3.4.4 - '@effect/sql@0.10.0(@effect/experimental@0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2)(ws@8.18.0))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2)': + '@effect/sql@0.14.0(@effect/experimental@0.27.3(@effect/platform-node@0.61.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4)(ws@8.18.0))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4)': dependencies: - '@effect/experimental': 0.24.0(@effect/platform-node@0.58.0(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(effect@3.7.2))(@effect/platform@0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2))(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2)(ws@8.18.0) - '@effect/platform': 0.63.0(@effect/schema@0.72.3(effect@3.7.2))(effect@3.7.2) - '@effect/schema': 0.72.3(effect@3.7.2) + '@effect/experimental': 0.27.3(@effect/platform-node@0.61.3(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(effect@3.8.4))(@effect/platform@0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4))(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4)(ws@8.18.0) + '@effect/platform': 0.66.2(@effect/schema@0.74.1(effect@3.8.4))(effect@3.8.4) + '@effect/schema': 0.74.1(effect@3.8.4) '@opentelemetry/semantic-conventions': 1.27.0 - effect: 3.7.2 + effect: 3.8.4 - '@effect/typeclass@0.26.0(effect@3.7.2)': + '@effect/typeclass@0.27.4(effect@3.8.4)': dependencies: - effect: 3.7.2 + effect: 3.8.4 - '@effect/vitest@0.9.2(effect@3.7.2)(vitest@2.1.1(@types/node@22.5.2))': + '@effect/vitest@0.10.5(effect@3.8.4)(vitest@2.1.1(@types/node@22.7.4))': dependencies: - effect: 3.7.2 - vitest: 2.1.1(@types/node@22.5.2) + effect: 3.8.4 + vitest: 2.1.1(@types/node@22.7.4) '@esbuild/aix-ppc64@0.21.5': optional: true @@ -4694,20 +4751,30 @@ snapshots: '@esbuild/win32-x64@0.23.0': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.11.1(jiti@2.0.0))': dependencies: - eslint: 8.57.1 + eslint: 9.11.1(jiti@2.0.0) eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.10.0': {} + '@eslint-community/regexpp@4.11.1': {} + + '@eslint/config-array@0.18.0': + dependencies: + '@eslint/object-schema': 2.1.4 + debug: 4.3.7 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@eslint/core@0.6.0': {} - '@eslint/eslintrc@2.1.4': + '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 - debug: 4.3.6 - espree: 9.6.1 - globals: 13.24.0 - ignore: 5.3.1 + debug: 4.3.7 + espree: 10.2.0 + globals: 14.0.0 + ignore: 5.3.2 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -4715,19 +4782,17 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.1': {} + '@eslint/js@9.11.1': {} + + '@eslint/object-schema@2.1.4': {} - '@humanwhocodes/config-array@0.13.0': + '@eslint/plugin-kit@0.2.0': dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.6 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color + levn: 0.4.1 '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/object-schema@2.0.3': {} + '@humanwhocodes/retry@0.3.0': {} '@isaacs/cliui@8.0.2': dependencies: @@ -4919,51 +4984,99 @@ snapshots: '@rollup/rollup-android-arm-eabi@4.21.2': optional: true + '@rollup/rollup-android-arm-eabi@4.22.5': + optional: true + '@rollup/rollup-android-arm64@4.21.2': optional: true + '@rollup/rollup-android-arm64@4.22.5': + optional: true + '@rollup/rollup-darwin-arm64@4.21.2': optional: true + '@rollup/rollup-darwin-arm64@4.22.5': + optional: true + '@rollup/rollup-darwin-x64@4.21.2': optional: true + '@rollup/rollup-darwin-x64@4.22.5': + optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.21.2': optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.22.5': + optional: true + '@rollup/rollup-linux-arm-musleabihf@4.21.2': optional: true + '@rollup/rollup-linux-arm-musleabihf@4.22.5': + optional: true + '@rollup/rollup-linux-arm64-gnu@4.21.2': optional: true + '@rollup/rollup-linux-arm64-gnu@4.22.5': + optional: true + '@rollup/rollup-linux-arm64-musl@4.21.2': optional: true + '@rollup/rollup-linux-arm64-musl@4.22.5': + optional: true + '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': optional: true + '@rollup/rollup-linux-powerpc64le-gnu@4.22.5': + optional: true + '@rollup/rollup-linux-riscv64-gnu@4.21.2': optional: true + '@rollup/rollup-linux-riscv64-gnu@4.22.5': + optional: true + '@rollup/rollup-linux-s390x-gnu@4.21.2': optional: true + '@rollup/rollup-linux-s390x-gnu@4.22.5': + optional: true + '@rollup/rollup-linux-x64-gnu@4.21.2': optional: true + '@rollup/rollup-linux-x64-gnu@4.22.5': + optional: true + '@rollup/rollup-linux-x64-musl@4.21.2': optional: true + '@rollup/rollup-linux-x64-musl@4.22.5': + optional: true + '@rollup/rollup-win32-arm64-msvc@4.21.2': optional: true + '@rollup/rollup-win32-arm64-msvc@4.22.5': + optional: true + '@rollup/rollup-win32-ia32-msvc@4.21.2': optional: true + '@rollup/rollup-win32-ia32-msvc@4.22.5': + optional: true + '@rollup/rollup-win32-x64-msvc@4.21.2': optional: true + '@rollup/rollup-win32-x64-msvc@4.22.5': + optional: true + '@rtsao/scc@1.1.0': {} '@shikijs/core@1.20.0': @@ -5005,6 +5118,8 @@ snapshots: '@types/estree@1.0.5': {} + '@types/estree@1.0.6': {} + '@types/hast@3.0.4': dependencies: '@types/unist': 3.0.3 @@ -5027,6 +5142,10 @@ snapshots: dependencies: undici-types: 6.19.8 + '@types/node@22.7.4': + dependencies: + undici-types: 6.19.8 + '@types/parse-json@4.0.2': {} '@types/semver@6.2.3': {} @@ -5035,17 +5154,17 @@ snapshots: '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@8.7.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2))(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2)': dependencies: - '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 7.18.0 - eslint: 8.57.1 + '@eslint-community/regexpp': 4.11.1 + '@typescript-eslint/parser': 8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2) + '@typescript-eslint/scope-manager': 8.7.0 + '@typescript-eslint/type-utils': 8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2) + '@typescript-eslint/utils': 8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.7.0 + eslint: 9.11.1(jiti@2.0.0) graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 natural-compare: 1.4.0 ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: @@ -5053,22 +5172,22 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/experimental-utils@5.62.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/experimental-utils@5.62.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2)': dependencies: - '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 + '@typescript-eslint/utils': 5.62.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2) + eslint: 9.11.1(jiti@2.0.0) transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2)': dependencies: - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.3.5 - eslint: 8.57.1 + '@typescript-eslint/scope-manager': 8.7.0 + '@typescript-eslint/types': 8.7.0 + '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.7.0 + debug: 4.3.7 + eslint: 9.11.1(jiti@2.0.0) optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: @@ -5079,28 +5198,28 @@ snapshots: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 - '@typescript-eslint/scope-manager@7.18.0': + '@typescript-eslint/scope-manager@8.7.0': dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 + '@typescript-eslint/types': 8.7.0 + '@typescript-eslint/visitor-keys': 8.7.0 - '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/type-utils@8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2)': dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.2) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.6.2) - debug: 4.3.5 - eslint: 8.57.1 + '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.6.2) + '@typescript-eslint/utils': 8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2) + debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: + - eslint - supports-color '@typescript-eslint/types@5.62.0': {} '@typescript-eslint/types@7.13.1': {} - '@typescript-eslint/types@7.18.0': {} + '@typescript-eslint/types@8.7.0': {} '@typescript-eslint/typescript-estree@5.62.0(typescript@5.6.2)': dependencies: @@ -5131,43 +5250,43 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.6.2)': + '@typescript-eslint/typescript-estree@8.7.0(typescript@5.6.2)': dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.3.5 - globby: 11.1.0 + '@typescript-eslint/types': 8.7.0 + '@typescript-eslint/visitor-keys': 8.7.0 + debug: 4.3.7 + fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 - semver: 7.6.0 + semver: 7.6.3 ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@5.62.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/utils@5.62.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1(jiti@2.0.0)) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.6.2) - eslint: 8.57.1 + eslint: 9.11.1(jiti@2.0.0) eslint-scope: 5.1.1 semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/utils@8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.2) - eslint: 8.57.1 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1(jiti@2.0.0)) + '@typescript-eslint/scope-manager': 8.7.0 + '@typescript-eslint/types': 8.7.0 + '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.6.2) + eslint: 9.11.1(jiti@2.0.0) transitivePeerDependencies: - supports-color - typescript @@ -5182,14 +5301,14 @@ snapshots: '@typescript-eslint/types': 7.13.1 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@7.18.0': + '@typescript-eslint/visitor-keys@8.7.0': dependencies: - '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/types': 8.7.0 eslint-visitor-keys: 3.4.3 '@ungap/structured-clone@1.2.0': {} - '@vitest/coverage-v8@2.1.1(vitest@2.1.1(@types/node@22.5.2))': + '@vitest/coverage-v8@2.1.1(vitest@2.1.1(@types/node@22.7.4))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -5203,7 +5322,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.1(@types/node@22.5.2) + vitest: 2.1.1(@types/node@22.7.4) transitivePeerDependencies: - supports-color @@ -5214,13 +5333,13 @@ snapshots: chai: 5.1.1 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.7(@types/node@22.5.2))': + '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.8(@types/node@22.7.4))': dependencies: '@vitest/spy': 2.1.1 estree-walker: 3.0.3 magic-string: 0.30.11 optionalDependencies: - vite: 5.4.7(@types/node@22.5.2) + vite: 5.4.8(@types/node@22.7.4) '@vitest/pretty-format@2.1.1': dependencies: @@ -5289,11 +5408,11 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 - acorn-jsx@5.3.2(acorn@8.11.3): + acorn-jsx@5.3.2(acorn@8.12.1): dependencies: - acorn: 8.11.3 + acorn: 8.12.1 - acorn@8.11.3: {} + acorn@8.12.1: {} ajv@6.12.6: dependencies: @@ -5460,6 +5579,10 @@ snapshots: dependencies: fill-range: 7.0.1 + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + buffer@5.7.1: dependencies: base64-js: 1.5.1 @@ -5569,6 +5692,8 @@ snapshots: cli-spinners@2.9.0: {} + cli-spinners@2.9.2: {} + cli-width@3.0.0: {} cliui@7.0.4: @@ -5603,10 +5728,10 @@ snapshots: commander@4.1.1: {} - commitizen@4.3.0(@types/node@22.5.2)(typescript@5.6.2): + commitizen@4.3.1(@types/node@22.7.4)(typescript@5.6.2): dependencies: cachedir: 2.3.0 - cz-conventional-changelog: 3.3.0(@types/node@22.5.2)(typescript@5.6.2) + cz-conventional-changelog: 3.3.0(@types/node@22.7.4)(typescript@5.6.2) dedent: 0.7.0 detect-indent: 6.1.0 find-node-modules: 2.1.3 @@ -5670,9 +5795,9 @@ snapshots: meow: 12.1.1 split2: 4.2.0 - cosmiconfig-typescript-loader@5.0.0(@types/node@22.5.2)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2): + cosmiconfig-typescript-loader@5.0.0(@types/node@22.7.4)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2): dependencies: - '@types/node': 22.5.2 + '@types/node': 22.7.4 cosmiconfig: 9.0.0(typescript@5.6.2) jiti: 1.21.0 typescript: 5.6.2 @@ -5706,16 +5831,16 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - cz-conventional-changelog@3.3.0(@types/node@22.5.2)(typescript@5.6.2): + cz-conventional-changelog@3.3.0(@types/node@22.7.4)(typescript@5.6.2): dependencies: chalk: 2.4.2 - commitizen: 4.3.0(@types/node@22.5.2)(typescript@5.6.2) + commitizen: 4.3.1(@types/node@22.7.4)(typescript@5.6.2) conventional-commit-types: 3.0.0 lodash.map: 4.6.0 longest: 2.0.1 word-wrap: 1.2.5 optionalDependencies: - '@commitlint/load': 19.2.0(@types/node@22.5.2)(typescript@5.6.2) + '@commitlint/load': 19.5.0(@types/node@22.7.4)(typescript@5.6.2) transitivePeerDependencies: - '@types/node' - typescript @@ -5760,6 +5885,10 @@ snapshots: dependencies: ms: 2.1.2 + debug@4.3.7: + dependencies: + ms: 2.1.3 + decompress-response@6.0.0: dependencies: mimic-response: 3.1.0 @@ -5856,10 +5985,6 @@ snapshots: dependencies: esutils: 2.0.3 - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - dot-prop@5.3.0: dependencies: is-obj: 2.0.0 @@ -5881,7 +6006,7 @@ snapshots: effect@3.3.2: {} - effect@3.7.2: {} + effect@3.8.4: {} emoji-regex@8.0.0: {} @@ -6086,9 +6211,9 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-prettier@9.1.0(eslint@8.57.1): + eslint-config-prettier@9.1.0(eslint@9.11.1(jiti@2.0.0)): dependencies: - eslint: 8.57.1 + eslint: 9.11.1(jiti@2.0.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -6098,17 +6223,17 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): + eslint-module-utils@2.12.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.11.1(jiti@2.0.0)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 + '@typescript-eslint/parser': 8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2) + eslint: 9.11.1(jiti@2.0.0) eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-import@2.30.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1): + eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2))(eslint@9.11.1(jiti@2.0.0)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -6117,9 +6242,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.57.1 + eslint: 9.11.1(jiti@2.0.0) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.11.1(jiti@2.0.0)) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -6130,25 +6255,25 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/parser': 8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-simple-import-sort@12.1.1(eslint@8.57.1): + eslint-plugin-simple-import-sort@12.1.1(eslint@9.11.1(jiti@2.0.0)): dependencies: - eslint: 8.57.1 + eslint: 9.11.1(jiti@2.0.0) eslint-plugin-sort-keys@2.3.5: dependencies: natural-compare: 1.4.0 - eslint-plugin-typescript-sort-keys@3.2.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2): + eslint-plugin-typescript-sort-keys@3.2.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2))(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2): dependencies: - '@typescript-eslint/experimental-utils': 5.62.0(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 + '@typescript-eslint/experimental-utils': 5.62.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2) + '@typescript-eslint/parser': 8.7.0(eslint@9.11.1(jiti@2.0.0))(typescript@5.6.2) + eslint: 9.11.1(jiti@2.0.0) json-schema: 0.4.0 natural-compare-lite: 1.4.0 typescript: 5.6.2 @@ -6160,65 +6285,68 @@ snapshots: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@7.2.2: + eslint-scope@8.1.0: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint@8.57.1: + eslint-visitor-keys@4.1.0: {} + + eslint@9.11.1(jiti@2.0.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@eslint-community/regexpp': 4.10.0 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.1 - '@humanwhocodes/config-array': 0.13.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1(jiti@2.0.0)) + '@eslint-community/regexpp': 4.11.1 + '@eslint/config-array': 0.18.0 + '@eslint/core': 0.6.0 + '@eslint/eslintrc': 3.1.0 + '@eslint/js': 9.11.1 + '@eslint/plugin-kit': 0.2.0 '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.6 - doctrine: 3.0.0 + debug: 4.3.7 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.5.0 + eslint-scope: 8.1.0 + eslint-visitor-keys: 4.1.0 + espree: 10.2.0 + esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 + file-entry-cache: 8.0.0 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 - optionator: 0.9.3 + optionator: 0.9.4 strip-ansi: 6.0.1 text-table: 0.2.0 + optionalDependencies: + jiti: 2.0.0 transitivePeerDependencies: - supports-color - espree@9.6.1: + espree@10.2.0: dependencies: - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) - eslint-visitor-keys: 3.4.3 + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) + eslint-visitor-keys: 4.1.0 esprima@4.0.1: {} - esquery@1.5.0: + esquery@1.6.0: dependencies: estraverse: 5.3.0 @@ -6276,6 +6404,14 @@ snapshots: merge2: 1.4.1 micromatch: 4.0.5 + fast-glob@3.3.2: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + fast-json-stable-stringify@2.1.0: {} fast-levenshtein@2.0.6: {} @@ -6292,14 +6428,18 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@6.0.1: + file-entry-cache@8.0.0: dependencies: - flat-cache: 3.2.0 + flat-cache: 4.0.1 fill-range@7.0.1: dependencies: to-regex-range: 5.0.1 + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + find-my-way-ts@0.1.5: {} find-node-modules@2.1.3: @@ -6329,7 +6469,7 @@ snapshots: dependencies: detect-file: 1.0.0 is-glob: 4.0.3 - micromatch: 4.0.5 + micromatch: 4.0.8 resolve-dir: 1.0.1 findup-sync@5.0.0: @@ -6339,11 +6479,10 @@ snapshots: micromatch: 4.0.5 resolve-dir: 1.0.1 - flat-cache@3.2.0: + flat-cache@4.0.1: dependencies: flatted: 3.3.1 keyv: 4.5.4 - rimraf: 3.0.2 flatted@3.3.1: {} @@ -6377,7 +6516,7 @@ snapshots: at-least-node: 1.0.0 graceful-fs: 4.2.11 jsonfile: 6.1.0 - universalify: 2.0.0 + universalify: 2.0.1 fs-tree-structure@0.0.5: dependencies: @@ -6491,9 +6630,7 @@ snapshots: globals@11.12.0: {} - globals@13.24.0: - dependencies: - type-fest: 0.20.2 + globals@14.0.0: {} globalthis@1.0.3: dependencies: @@ -6629,6 +6766,8 @@ snapshots: ignore@5.3.1: {} + ignore@5.3.2: {} + import-fresh@3.3.0: dependencies: parent-module: 1.0.1 @@ -6851,7 +6990,7 @@ snapshots: jiti@1.21.0: {} - jiti@1.21.6: + jiti@2.0.0: optional: true jju@1.4.0: {} @@ -6895,7 +7034,7 @@ snapshots: jsonfile@6.1.0: dependencies: - universalify: 2.0.0 + universalify: 2.0.1 optionalDependencies: graceful-fs: 4.2.11 @@ -7001,7 +7140,7 @@ snapshots: lru-cache@7.18.3: {} - lru-cache@8.0.5: {} + lru.min@1.1.1: {} lunr@2.3.9: {} @@ -7082,6 +7221,11 @@ snapshots: braces: 3.0.2 picomatch: 2.3.1 + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + mime-db@1.52.0: {} mime-db@1.53.0: {} @@ -7154,14 +7298,14 @@ snapshots: mute-stream@0.0.8: {} - mysql2@3.11.0: + mysql2@3.11.3: dependencies: aws-ssl-profiles: 1.1.2 denque: 2.1.0 generate-function: 2.3.1 iconv-lite: 0.6.3 long: 5.2.3 - lru-cache: 8.0.5 + lru.min: 1.1.1 named-placeholders: 1.1.3 seq-queue: 0.0.5 sqlstring: 2.3.3 @@ -7258,21 +7402,21 @@ snapshots: dependencies: regex: 4.3.2 - optionator@0.9.3: + optionator@0.9.4: dependencies: - '@aashutoshrathi/word-wrap': 1.2.6 deep-is: 0.1.4 fast-levenshtein: 2.0.6 levn: 0.4.1 prelude-ls: 1.2.1 type-check: 0.4.0 + word-wrap: 1.2.5 ora@5.4.1: dependencies: bl: 4.1.0 chalk: 4.1.2 cli-cursor: 3.1.0 - cli-spinners: 2.9.0 + cli-spinners: 2.9.2 is-interactive: 1.0.0 is-unicode-supported: 0.1.0 log-symbols: 4.1.0 @@ -7401,11 +7545,11 @@ snapshots: possible-typed-array-names@1.0.0: {} - postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1): + postcss-load-config@6.0.1(jiti@2.0.0)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1): dependencies: lilconfig: 3.1.2 optionalDependencies: - jiti: 1.21.6 + jiti: 2.0.0 postcss: 8.4.47 tsx: 4.19.1 yaml: 2.5.1 @@ -7540,10 +7684,6 @@ snapshots: reusify@1.0.4: {} - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - rollup@4.21.2: dependencies: '@types/estree': 1.0.5 @@ -7566,6 +7706,28 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.21.2 fsevents: 2.3.3 + rollup@4.22.5: + dependencies: + '@types/estree': 1.0.6 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.22.5 + '@rollup/rollup-android-arm64': 4.22.5 + '@rollup/rollup-darwin-arm64': 4.22.5 + '@rollup/rollup-darwin-x64': 4.22.5 + '@rollup/rollup-linux-arm-gnueabihf': 4.22.5 + '@rollup/rollup-linux-arm-musleabihf': 4.22.5 + '@rollup/rollup-linux-arm64-gnu': 4.22.5 + '@rollup/rollup-linux-arm64-musl': 4.22.5 + '@rollup/rollup-linux-powerpc64le-gnu': 4.22.5 + '@rollup/rollup-linux-riscv64-gnu': 4.22.5 + '@rollup/rollup-linux-s390x-gnu': 4.22.5 + '@rollup/rollup-linux-x64-gnu': 4.22.5 + '@rollup/rollup-linux-x64-musl': 4.22.5 + '@rollup/rollup-win32-arm64-msvc': 4.22.5 + '@rollup/rollup-win32-ia32-msvc': 4.22.5 + '@rollup/rollup-win32-x64-msvc': 4.22.5 + fsevents: 2.3.3 + run-async@2.4.1: {} run-parallel@1.2.0: @@ -7929,7 +8091,7 @@ snapshots: tslib@2.7.0: {} - tsup@8.3.0(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1): + tsup@8.3.0(jiti@2.0.0)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1): dependencies: bundle-require: 5.0.0(esbuild@0.23.0) cac: 6.7.14 @@ -7940,7 +8102,7 @@ snapshots: execa: 5.1.1 joycon: 3.1.1 picocolors: 1.0.1 - postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1) + postcss-load-config: 6.0.1(jiti@2.0.0)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1) resolve-from: 5.0.0 rollup: 4.21.2 source-map: 0.8.0-beta.0 @@ -7999,8 +8161,6 @@ snapshots: dependencies: prelude-ls: 1.2.1 - type-fest@0.20.2: {} - type-fest@0.21.3: {} type-fest@4.26.1: {} @@ -8121,7 +8281,7 @@ snapshots: universalify@0.1.2: {} - universalify@2.0.0: {} + universalify@2.0.1: {} uri-js@4.4.1: dependencies: @@ -8145,12 +8305,12 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.1(@types/node@22.5.2): + vite-node@2.1.1(@types/node@22.7.4): dependencies: cac: 6.7.14 debug: 4.3.6 pathe: 1.1.2 - vite: 5.4.7(@types/node@22.5.2) + vite: 5.4.8(@types/node@22.7.4) transitivePeerDependencies: - '@types/node' - less @@ -8162,30 +8322,30 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.4.5)(vite@5.4.7(@types/node@22.5.2)): + vite-tsconfig-paths@5.0.1(typescript@5.4.5)(vite@5.4.8(@types/node@22.7.4)): dependencies: debug: 4.3.6 globrex: 0.1.2 tsconfck: 3.1.3(typescript@5.4.5) optionalDependencies: - vite: 5.4.7(@types/node@22.5.2) + vite: 5.4.8(@types/node@22.7.4) transitivePeerDependencies: - supports-color - typescript - vite@5.4.7(@types/node@22.5.2): + vite@5.4.8(@types/node@22.7.4): dependencies: esbuild: 0.21.5 postcss: 8.4.47 - rollup: 4.21.2 + rollup: 4.22.5 optionalDependencies: - '@types/node': 22.5.2 + '@types/node': 22.7.4 fsevents: 2.3.3 - vitest@2.1.1(@types/node@22.5.2): + vitest@2.1.1(@types/node@22.7.4): dependencies: '@vitest/expect': 2.1.1 - '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.7(@types/node@22.5.2)) + '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.8(@types/node@22.7.4)) '@vitest/pretty-format': 2.1.1 '@vitest/runner': 2.1.1 '@vitest/snapshot': 2.1.1 @@ -8200,11 +8360,11 @@ snapshots: tinyexec: 0.3.0 tinypool: 1.0.0 tinyrainbow: 1.2.0 - vite: 5.4.7(@types/node@22.5.2) - vite-node: 2.1.1(@types/node@22.5.2) + vite: 5.4.8(@types/node@22.7.4) + vite-node: 2.1.1(@types/node@22.7.4) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.5.2 + '@types/node': 22.7.4 transitivePeerDependencies: - less - lightningcss @@ -8298,8 +8458,6 @@ snapshots: yaml@1.10.2: {} - yaml@2.5.0: {} - yaml@2.5.1: {} yargs-parser@20.2.9: {} From a417bf5911557d5fb7febcc3a1f419f223202b8e Mon Sep 17 00:00:00 2001 From: Ani Ravi <5902976+aniravi24@users.noreply.github.com> Date: Sat, 28 Sep 2024 01:29:45 -0400 Subject: [PATCH 3/6] refactor: move service into layer for re-use --- packages/typefusion/src/db/common/layer.ts | 25 ++++++++----------- packages/typefusion/src/db/common/service.ts | 3 +++ packages/typefusion/src/db/mysql/client.ts | 7 ++++-- packages/typefusion/src/db/postgres/client.ts | 7 ++++-- packages/typefusion/src/helpers.ts | 12 ++------- packages/typefusion/src/lib.ts | 23 +++-------------- packages/typefusion/src/store.ts | 6 ++--- 7 files changed, 33 insertions(+), 50 deletions(-) diff --git a/packages/typefusion/src/db/common/layer.ts b/packages/typefusion/src/db/common/layer.ts index 5ba9fa5..19fdd75 100644 --- a/packages/typefusion/src/db/common/layer.ts +++ b/packages/typefusion/src/db/common/layer.ts @@ -1,4 +1,4 @@ -import { Effect } from "effect"; +import { Context } from "effect"; import { DatabaseHelper } from "./service.js"; import { valueToMySqlType, mySqlIdColumn } from "../mysql/types.js"; import { postgresIdColumn, valueToPostgresType } from "../postgres/types.js"; @@ -20,23 +20,20 @@ import { /** * @internal */ -export const MySqlDatabaseHelperService = Effect.provideService( - DatabaseHelper, - { - valueToDbType: valueToMySqlType, - idColumn: mySqlIdColumn, - dropTableIfExists: mySqlDropTableIfExists, - createTableIfNotExists: mySqlCreateTableIfNotExists, - insertIntoTable: mySqlInsertIntoTable, - selectAllFromTable: mySqlSelectAllFromTable, - columnDDL: mySqlColumnDDL, - }, -); +export const MySqlDatabaseHelperContext = Context.make(DatabaseHelper, { + valueToDbType: valueToMySqlType, + idColumn: mySqlIdColumn, + dropTableIfExists: mySqlDropTableIfExists, + createTableIfNotExists: mySqlCreateTableIfNotExists, + insertIntoTable: mySqlInsertIntoTable, + selectAllFromTable: mySqlSelectAllFromTable, + columnDDL: mySqlColumnDDL, +}); /** * @internal */ -export const PgDatabaseHelperService = Effect.provideService(DatabaseHelper, { +export const PgDatabaseHelperContext = Context.make(DatabaseHelper, { valueToDbType: valueToPostgresType, idColumn: postgresIdColumn, dropTableIfExists: pgDropTableIfExists, diff --git a/packages/typefusion/src/db/common/service.ts b/packages/typefusion/src/db/common/service.ts index 2d74144..1f0461e 100644 --- a/packages/typefusion/src/db/common/service.ts +++ b/packages/typefusion/src/db/common/service.ts @@ -11,6 +11,9 @@ export class UnsupportedJSTypeDbConversionError extends Data.TaggedError( message: string; }> {} +/** + * @internal + */ export class DatabaseHelper extends Context.Tag("DatabaseHelper")< DatabaseHelper, { diff --git a/packages/typefusion/src/db/mysql/client.ts b/packages/typefusion/src/db/mysql/client.ts index 91a2669..0b89413 100644 --- a/packages/typefusion/src/db/mysql/client.ts +++ b/packages/typefusion/src/db/mysql/client.ts @@ -1,6 +1,7 @@ // TODO import { MysqlClient } from "@effect/sql-mysql2"; -import { Config, Effect, Redacted } from "effect"; +import { Config, Effect, Layer, Redacted } from "effect"; +import { MySqlDatabaseHelperContext } from "../common/layer.js"; /** * @internal @@ -39,4 +40,6 @@ export const MySqlLive = MysqlClient.layer({ /** * @internal */ -export const MySqlLiveEffect = Effect.provide(MySqlLive); +export const MySqlLiveEffect = Effect.provide( + Layer.mergeAll(MySqlLive, Layer.succeedContext(MySqlDatabaseHelperContext)), +); diff --git a/packages/typefusion/src/db/postgres/client.ts b/packages/typefusion/src/db/postgres/client.ts index 06d66f3..45cb5bf 100644 --- a/packages/typefusion/src/db/postgres/client.ts +++ b/packages/typefusion/src/db/postgres/client.ts @@ -1,6 +1,7 @@ import { PgClient } from "@effect/sql-pg"; -import { Config, Effect, Redacted } from "effect"; +import { Config, Effect, Layer, Redacted } from "effect"; import postgres from "postgres"; +import { PgDatabaseHelperContext } from "../common/layer.js"; /** * @internal @@ -37,4 +38,6 @@ export const PgLive = PgClient.layer({ /** * @internal */ -export const PgLiveEffect = Effect.provide(PgLive); +export const PgLiveEffect = Effect.provide( + Layer.mergeAll(PgLive, Layer.succeedContext(PgDatabaseHelperContext)), +); diff --git a/packages/typefusion/src/helpers.ts b/packages/typefusion/src/helpers.ts index 0134f14..81f0835 100644 --- a/packages/typefusion/src/helpers.ts +++ b/packages/typefusion/src/helpers.ts @@ -3,10 +3,6 @@ import { SkottNode } from "skott/graph/node"; import { dbInsert } from "./store.js"; import { PgLiveEffect } from "./db/postgres/client.js"; import { MySqlLiveEffect } from "./db/mysql/client.js"; -import { - MySqlDatabaseHelperService, - PgDatabaseHelperService, -} from "./db/common/layer.js"; import { TypefusionScriptExport } from "./types.js"; /** @@ -87,14 +83,10 @@ export function runTypefusionScript(leaf: string) { }); if (moduleDefault.resultDatabase === "postgresql") { - return yield* dbInsert(moduleDefault, result) - .pipe(PgLiveEffect) - .pipe(PgDatabaseHelperService); + return yield* dbInsert(moduleDefault, result).pipe(PgLiveEffect); } if (moduleDefault.resultDatabase === "mysql") { - return yield* dbInsert(moduleDefault, result) - .pipe(MySqlLiveEffect) - .pipe(MySqlDatabaseHelperService); + return yield* dbInsert(moduleDefault, result).pipe(MySqlLiveEffect); } else { return yield* Effect.dieMessage( `Database ${moduleDefault.resultDatabase} not supported, make sure the 'resultDatabase' property is set in your typefusion script default export.`, diff --git a/packages/typefusion/src/lib.ts b/packages/typefusion/src/lib.ts index 1179126..64df006 100644 --- a/packages/typefusion/src/lib.ts +++ b/packages/typefusion/src/lib.ts @@ -4,10 +4,6 @@ import { ConfigError } from "effect/ConfigError"; import { TypefusionScriptExport } from "./types.js"; import { PgLiveEffect } from "./db/postgres/client.js"; import { MySqlLiveEffect } from "./db/mysql/client.js"; -import { - MySqlDatabaseHelperService, - PgDatabaseHelperService, -} from "./db/common/layer.js"; /** * Get the data from a module (i.e. the result of one of your Typefusion scripts). * @param module - The module to get the data from. @@ -27,18 +23,10 @@ export const typefusionRef = async ( : Awaited> > => { if (module.resultDatabase === "postgresql") { - return dbSelect(module).pipe( - PgLiveEffect, - PgDatabaseHelperService, - Effect.runPromise, - ) as any; + return dbSelect(module).pipe(PgLiveEffect, Effect.runPromise) as any; } if (module.resultDatabase === "mysql") { - return dbSelect(module).pipe( - MySqlLiveEffect, - MySqlDatabaseHelperService, - Effect.runPromise, - ) as any; + return dbSelect(module).pipe(MySqlLiveEffect, Effect.runPromise) as any; } else { throw new Error( `Unsupported database type provided for module ${module.name}: ${module.resultDatabase}`, @@ -64,13 +52,10 @@ export const typefusionRefEffect = ( DatabaseSelectError | ConfigError > => { if (module.resultDatabase === "postgresql") { - return dbSelect(module).pipe(PgLiveEffect, PgDatabaseHelperService) as any; + return dbSelect(module).pipe(PgLiveEffect) as any; } if (module.resultDatabase === "mysql") { - return dbSelect(module).pipe( - MySqlLiveEffect, - MySqlDatabaseHelperService, - ) as any; + return dbSelect(module).pipe(MySqlLiveEffect) as any; } else { return Effect.dieMessage( `Unsupported database type provided for module ${module.name}: ${module.resultDatabase}`, diff --git a/packages/typefusion/src/store.ts b/packages/typefusion/src/store.ts index b15cbeb..f276bcb 100644 --- a/packages/typefusion/src/store.ts +++ b/packages/typefusion/src/store.ts @@ -228,11 +228,11 @@ export const dbInsert = (module: TypefusionScriptExport, result: unknown) => ); } else { if (!resultIsValidSchema) { - yield* Effect.logError("Invalid script result: ", result); + yield* Effect.logError("Invalid script run result: ", result); yield* Effect.fail( new DatabaseInsertError({ cause: null, - message: `Module '${module.name}' does not match expected schema, make sure your function returns an object with the following shape: ${ScriptResultSchema.toString()}`, + message: `Module '${module.name}' does not match expected schema, make sure your run function returns an object with the following shape: ${ScriptResultSchema.toString()}`, }), ); } @@ -246,7 +246,7 @@ export const dbInsert = (module: TypefusionScriptExport, result: unknown) => new DatabaseInsertError({ cause: null, // We are going to assume that people at least provided a name - message: `Module '${(module as TypefusionScriptExport).name}' does not match expected schema, make sure your function returns an object with the following shape: ${ScriptExportSchema.toString()}`, + message: `Module '${(module as TypefusionScriptExport).name}' does not match expected schema, make sure your script returns an object with the following shape: ${ScriptExportSchema.toString()}`, }), ); } From 910a9a27b5a0a1ceea79e1b54eca0312a4875ae6 Mon Sep 17 00:00:00 2001 From: Ani Ravi <5902976+aniravi24@users.noreply.github.com> Date: Sat, 28 Sep 2024 01:31:18 -0400 Subject: [PATCH 4/6] ci: use mysql:latest --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index da33629..6c0500f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -19,7 +19,7 @@ jobs: run: | # start preparing the postgres container, if you run tests too soon, it will fail docker run -d -p 5432:5432 -e POSTGRES_DB=typefusion -e POSTGRES_PASSWORD=password postgres:alpine - docker run -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=typefusion mysql:alpine + docker run -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=typefusion mysql:latest - name: Checkout repo uses: actions/checkout@v4 From 66a3c2b6e72ac80dca8caa2a1a250ef3b00b7a7d Mon Sep 17 00:00:00 2001 From: Ani Ravi <5902976+aniravi24@users.noreply.github.com> Date: Sat, 28 Sep 2024 01:32:57 -0400 Subject: [PATCH 5/6] ci: update description of workflow step and add env --- .github/workflows/pr.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6c0500f..983c4c2 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -15,9 +15,9 @@ jobs: runs-on: ubuntu-latest steps: - - name: "Start setting up postgres container" + - name: "Start setting up database containers" run: | - # start preparing the postgres container, if you run tests too soon, it will fail + # start preparing the database containers, if you run tests before these start up, you may get an error docker run -d -p 5432:5432 -e POSTGRES_DB=typefusion -e POSTGRES_PASSWORD=password postgres:alpine docker run -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=typefusion mysql:latest @@ -40,6 +40,7 @@ jobs: run: pnpm build && pnpm turbo --env-mode=loose lint test-ci typecheck env: PG_DATABASE_URL: postgres://postgres:password@localhost:5432/typefusion?sslmode=disable + MYSQL_DATABASE_URL: mysql://root:password@localhost:3306/typefusion - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 From 7a24bb53af8cda4ce81bbdfea853c34d7fd768a4 Mon Sep 17 00:00:00 2001 From: Ani Ravi <5902976+aniravi24@users.noreply.github.com> Date: Sat, 28 Sep 2024 01:40:28 -0400 Subject: [PATCH 6/6] test: cleanup first --- .changeset/sweet-hotels-push.md | 5 +++++ packages/typefusion/package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/sweet-hotels-push.md diff --git a/.changeset/sweet-hotels-push.md b/.changeset/sweet-hotels-push.md new file mode 100644 index 0000000..8b664b0 --- /dev/null +++ b/.changeset/sweet-hotels-push.md @@ -0,0 +1,5 @@ +--- +"typefusion": patch +--- + +Support multiple databases and change script configuration diff --git a/packages/typefusion/package.json b/packages/typefusion/package.json index ef54437..c71ff4a 100644 --- a/packages/typefusion/package.json +++ b/packages/typefusion/package.json @@ -33,7 +33,7 @@ "scripts": { "build": "tsup", "coverage": "vitest --config ./vitest.config.ts --coverage", - "test": "tsc -p tsconfig.example.json && dotenv -- vitest", + "test": "pnpm clean && tsc -p tsconfig.example.json && dotenv -- vitest", "test-ci": "tsc -p tsconfig.example.json && dotenv -- vitest run --coverage", "typecheck": "tsc --noEmit", "build-example-watch": "tsc -w -p tsconfig.example.json",