-```
-
-Example
+ ```
+ [Pg-kit] Add PostGIS extension support
+ ```
-```
-[Pg-kit] Add PostGIS extension support
-```
+2. PRs should contain a detailed description of everything that was changed.
-2. PR should contain detailed description with everything, that was changed
+3. Commit messages should follow the [message style guidelines](#commit-message-guidelines).
-3. Each PR should contain
- - Tests on feature, that was created;
- - Tests on bugs, that was fixed;
+4. PRs should implement:
+ - Tests for features that were added.
+ - Tests for bugs that were fixed.
-To understand how test should be created and run - please check [Run tests](#run-tests) section
+> [!NOTE]
+> To understand how tests should be created and run, please check the [Running tests](#running-tests-kit) section.
diff --git a/README.md b/README.md
index ac509ab0d..4342d8afe 100644
--- a/README.md
+++ b/README.md
@@ -17,24 +17,24 @@
### What's Drizzle?
Drizzle is a modern TypeScript ORM developers [wanna use in their next project](https://stateofdb.com/tools/drizzle).
-It is [lightweight](https://bundlephobia.com/package/drizzle-orm) at only ~7.4kb minified+gzipped, it's tree shakeable with exactly 0 dependencies.
+It is [lightweight](https://bundlephobia.com/package/drizzle-orm) at only ~7.4kb minified+gzipped, and it's tree shakeable with exactly 0 dependencies.
-**Drizzle supports every PostgreSQL, MySQL and SQLite databases**, including serverless ones like [Turso](https://orm.drizzle.team/docs/get-started-sqlite#turso), [Neon](https://orm.drizzle.team/docs/get-started-postgresql#neon), [Xata](xata.io), [PlanetScale](https://orm.drizzle.team/docs/get-started-mysql#planetscale), [Cloudflare D1](https://orm.drizzle.team/docs/get-started-sqlite#cloudflare-d1), [FlyIO LiteFS](https://fly.io/docs/litefs/), [Vercel Postgres](https://orm.drizzle.team/docs/get-started-postgresql#vercel-postgres), [Supabase](https://orm.drizzle.team/docs/get-started-postgresql#supabase) and [AWS Data API](https://orm.drizzle.team/docs/get-started-postgresql#aws-data-api). No bells and whistles, no rust binaries, no serverless adapters, everything just works out of the box.
+**Drizzle supports every PostgreSQL, MySQL and SQLite database**, including serverless ones like [Turso](https://orm.drizzle.team/docs/get-started-sqlite#turso), [Neon](https://orm.drizzle.team/docs/get-started-postgresql#neon), [Xata](xata.io), [PlanetScale](https://orm.drizzle.team/docs/get-started-mysql#planetscale), [Cloudflare D1](https://orm.drizzle.team/docs/get-started-sqlite#cloudflare-d1), [FlyIO LiteFS](https://fly.io/docs/litefs/), [Vercel Postgres](https://orm.drizzle.team/docs/get-started-postgresql#vercel-postgres), [Supabase](https://orm.drizzle.team/docs/get-started-postgresql#supabase) and [AWS Data API](https://orm.drizzle.team/docs/get-started-postgresql#aws-data-api). No bells and whistles, no Rust binaries, no serverless adapters, everything just works out of the box.
-**Drizzle is serverless-ready by design**, it works in every major JavaScript runtime like NodeJS, Bun, Deno, Cloudflare Workers, Supabase functions, any Edge runtime and even in Browsers.
-With Drizzle you can be [**fast out of the box**](https://orm.drizzle.team/benchmarks), save time and costs while never introducing any data proxies into your infrastructure.
+**Drizzle is serverless-ready by design**. It works in every major JavaScript runtime like NodeJS, Bun, Deno, Cloudflare Workers, Supabase functions, any Edge runtime, and even in browsers.
+With Drizzle you can be [**fast out of the box**](https://orm.drizzle.team/benchmarks) and save time and costs while never introducing any data proxies into your infrastructure.
-While you can use Drizzle as a JavaScript library, it shines in the TypeScript. It lets you [**declare SQL schema**](https://orm.drizzle.team/docs/sql-schema-declaration) and build both [**relational**](https://orm.drizzle.team/docs/rqb) and [**SQL-like queries**](https://orm.drizzle.team/docs/select), while keeping the balance between type-safety and extensibility for toolmakers to build on top.
+While you can use Drizzle as a JavaScript library, it shines with TypeScript. It lets you [**declare SQL schemas**](https://orm.drizzle.team/docs/sql-schema-declaration) and build both [**relational**](https://orm.drizzle.team/docs/rqb) and [**SQL-like queries**](https://orm.drizzle.team/docs/select), while keeping the balance between type-safety and extensibility for toolmakers to build on top.
### Ecosystem
While Drizzle ORM remains a thin typed layer on top of SQL, we made a set of tools for people to have best possible developer experience.
-Drizzle comes with a powerful [**Drizzle Kit**](https://orm.drizzle.team/kit-docs/overview) CLI companion for you to have hasstle-free migrations. It can generate SQL migration files for you or apply schema changes directly to the database.
+Drizzle comes with a powerful [**Drizzle Kit**](https://orm.drizzle.team/kit-docs/overview) CLI companion for you to have hassle-free migrations. It can generate SQL migration files for you or apply schema changes directly to the database.
-And we have a [**Drizzle Studio**](https://orm.drizzle.team/drizzle-studio/overview) for you to effortlessly browse and manipulate data in your database of choice.
+We also have [**Drizzle Studio**](https://orm.drizzle.team/drizzle-studio/overview) for you to effortlessly browse and manipulate data in your database of choice.
### Documentation
-Check out the full documentation on [the website](https://orm.drizzle.team/docs/overview)
+Check out the full documentation on [the website](https://orm.drizzle.team/docs/overview).
### Our sponsors ❤️
diff --git a/changelogs/drizzle-kit/0.24.0.md b/changelogs/drizzle-kit/0.24.0.md
new file mode 100644
index 000000000..b766e018b
--- /dev/null
+++ b/changelogs/drizzle-kit/0.24.0.md
@@ -0,0 +1,24 @@
+## Breaking changes (for SQLite users)
+
+#### Fixed [Composite primary key order is not consistent](https://github.com/drizzle-team/drizzle-kit-mirror/issues/342) by removing `sort` in SQLite and to be consistant with the same logic in PostgreSQL and MySQL
+
+The issue that may arise for SQLite users with any driver using composite primary keys is that the order in the database may differ from the Drizzle schema.
+
+- If you are using `push`, you **MAY** be prompted to update your table with a new order of columns in the composite primary key. You will need to either change it manually in the database or push the changes, but this may lead to data loss, etc.
+
+- If you are using `generate`, you **MAY** also be prompted to update your table with a new order of columns in the composite primary key. You can either keep that migration or skip it by emptying the SQL migration file.
+
+If nothing works for you and you are blocked, please reach out to me @AndriiSherman. I will try to help you!
+
+
+## Bug fixes
+
+- [[BUG] When using double type columns, import is not inserted](https://github.com/drizzle-team/drizzle-kit-mirror/issues/403) - thanks @Karibash
+- [[BUG] A number value is specified as the default for a column of type char](https://github.com/drizzle-team/drizzle-kit-mirror/issues/404) - thanks @Karibash
+- [[BUG]: Array default in migrations are wrong](https://github.com/drizzle-team/drizzle-orm/issues/2621) - thanks @L-Mario564
+- [[FEATURE]: Simpler default array fields](https://github.com/drizzle-team/drizzle-orm/issues/2709) - thanks @L-Mario564
+- [[BUG]: drizzle-kit generate succeeds but generates invalid SQL for default([]) - Postgres](https://github.com/drizzle-team/drizzle-orm/issues/2432) - thanks @L-Mario564
+- [[BUG]: Incorrect type for array column default value](https://github.com/drizzle-team/drizzle-orm/issues/2334) - thanks @L-Mario564
+- [[BUG]: error: column is of type integer[] but default expression is of type integer](https://github.com/drizzle-team/drizzle-orm/issues/2224) - thanks @L-Mario564
+- [[BUG]: Default value in array generating wrong migration file](https://github.com/drizzle-team/drizzle-orm/issues/1003) - thanks @L-Mario564
+- [[BUG]: enum as array, not possible?](https://github.com/drizzle-team/drizzle-orm/issues/1564) - thanks @L-Mario564
\ No newline at end of file
diff --git a/changelogs/drizzle-kit/0.24.1.md b/changelogs/drizzle-kit/0.24.1.md
new file mode 100644
index 000000000..d70f6ebbe
--- /dev/null
+++ b/changelogs/drizzle-kit/0.24.1.md
@@ -0,0 +1,32 @@
+## Bug fixes
+
+> Big thanks to @L-Mario564 for his [PR](https://github.com/drizzle-team/drizzle-orm/pull/2804). It conflicted in most cases with a PR that was merged, but we incorporated some of his logic. Merging it would have caused more problems and taken more time to resolve, so we just took a few things from his PR, like removing "::" mappings in introspect and some array type default handlers
+
+### What was fixed
+
+1. The Drizzle Kit CLI was not working properly for the `introspect` command.
+2. Added the ability to use column names with special characters for all dialects.
+3. Included PostgreSQL sequences in the introspection process.
+4. Reworked array type introspection and added all test cases.
+5. Fixed all (we hope) default issues in PostgreSQL, where `::` was included in the introspected output.
+6. `preserve` casing option was broken
+
+### Tickets that were closed
+
+- [[BUG]: invalid schema generation with drizzle-kit introspect:pg](https://github.com/drizzle-team/drizzle-orm/issues/1210)
+- [[BUG][mysql introspection]: TS error when introspect column including colon](https://github.com/drizzle-team/drizzle-orm/issues/1928)
+- [[BUG]: Unhandled defaults when introspecting postgres db](https://github.com/drizzle-team/drizzle-orm/issues/1625)
+- [[BUG]: PostgreSQL Enum Naming and Schema Typing Issue](https://github.com/drizzle-team/drizzle-orm/issues/2315)
+- [[BUG]: drizzle-kit instrospect command generates syntax error on varchar column types](https://github.com/drizzle-team/drizzle-orm/issues/2714)
+- [[BUG]: Introspecting varchar[] type produces syntactically invalid schema.ts](https://github.com/drizzle-team/drizzle-orm/issues/1633)
+- [[BUG]: introspect:pg column not using generated enum name](https://github.com/drizzle-team/drizzle-orm/issues/1648)
+- [[BUG]: drizzle-kit introspect casing "preserve" config not working](https://github.com/drizzle-team/drizzle-orm/issues/2773)
+- [[BUG]: drizzle-kit introspect fails on required param that is defined](https://github.com/drizzle-team/drizzle-orm/issues/2719)
+- [[BUG]: Error when running npx drizzle-kit introspect: "Expected object, received string"](https://github.com/drizzle-team/drizzle-orm/issues/2657)
+- [[BUG]: Missing index names when running introspect command [MYSQL]](https://github.com/drizzle-team/drizzle-orm/issues/2525)
+- [[BUG]: drizzle-kit introspect TypeError: Cannot read properties of undefined (reading 'toLowerCase')](https://github.com/drizzle-team/drizzle-orm/issues/2338)
+- [[BUG]: Wrong column name when using PgEnum.array()](https://github.com/drizzle-team/drizzle-orm/issues/2100)
+- [[BUG]: Incorrect Schema Generated when introspecting extisting pg database](https://github.com/drizzle-team/drizzle-orm/issues/1985)
+- [[⚠️🐞BUG]: index() missing argument after introspection, causes tsc error that fails the build](https://github.com/drizzle-team/drizzle-orm/issues/1870)
+- [[BUG]: drizzle-kit introspect small errors](https://github.com/drizzle-team/drizzle-orm/issues/1738)
+- [[BUG]: Missing bigint import in drizzle-kit introspect](https://github.com/drizzle-team/drizzle-orm/issues/1020)
\ No newline at end of file
diff --git a/changelogs/drizzle-kit/0.24.2.md b/changelogs/drizzle-kit/0.24.2.md
new file mode 100644
index 000000000..962a29acc
--- /dev/null
+++ b/changelogs/drizzle-kit/0.24.2.md
@@ -0,0 +1,24 @@
+## New Features
+
+### 🎉 Support for `pglite` driver
+
+You can now use pglite with all drizzle-kit commands, including Drizzle Studio!
+
+```ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ dialect: "postgresql",
+ driver: "pglite",
+ schema: "./schema.ts",
+ dbCredentials: {
+ url: "local-pg.db",
+ },
+ verbose: true,
+ strict: true,
+});
+```
+
+## Bug fixes
+
+- mysql-kit: fix GENERATED ALWAYS AS ... NOT NULL - [#2824](https://github.com/drizzle-team/drizzle-orm/pull/2824)
\ No newline at end of file
diff --git a/changelogs/drizzle-kit/0.25.0.md b/changelogs/drizzle-kit/0.25.0.md
new file mode 100644
index 000000000..e33879d97
--- /dev/null
+++ b/changelogs/drizzle-kit/0.25.0.md
@@ -0,0 +1,180 @@
+## Breaking changes and migrate guide for Turso users
+
+If you are using Turso and libsql, you will need to upgrade your `drizzle.config` and `@libsql/client` package.
+
+1. This version of drizzle-orm will only work with `@libsql/client@0.10.0` or higher if you are using the `migrate` function. For other use cases, you can continue using previous versions(But the suggestion is to upgrade)
+To install the latest version, use the command:
+
+```bash
+npm i @libsql/client@latest
+```
+
+2. Previously, we had a common `drizzle.config` for SQLite and Turso users, which allowed a shared strategy for both dialects. Starting with this release, we are introducing the turso dialect in drizzle-kit. We will evolve and improve Turso as a separate dialect with its own migration strategies.
+
+**Before**
+
+```ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ dialect: "sqlite",
+ schema: "./schema.ts",
+ out: "./drizzle",
+ dbCredentials: {
+ url: "database.db",
+ },
+ breakpoints: true,
+ verbose: true,
+ strict: true,
+});
+```
+
+**After**
+
+```ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ dialect: "turso",
+ schema: "./schema.ts",
+ out: "./drizzle",
+ dbCredentials: {
+ url: "database.db",
+ },
+ breakpoints: true,
+ verbose: true,
+ strict: true,
+});
+```
+
+If you are using only SQLite, you can use `dialect: "sqlite"`
+
+## LibSQL/Turso and Sqlite migration updates
+
+### SQLite "generate" and "push" statements updates
+
+Starting from this release, we will no longer generate comments like this:
+
+```sql
+ '/*\n SQLite does not support "Changing existing column type" out of the box, we do not generate automatic migration for that, so it has to be done manually'
+ + '\n Please refer to: https://www.techonthenet.com/sqlite/tables/alter_table.php'
+ + '\n https://www.sqlite.org/lang_altertable.html'
+ + '\n https://stackoverflow.com/questions/2083543/modify-a-columns-type-in-sqlite3'
+ + "\n\n Due to that we don't generate migration automatically and it has to be done manually"
+ + '\n*/'
+```
+
+We will generate a set of statements, and you can decide if it's appropriate to create data-moving statements instead. Here is an example of the SQL file you'll receive now:
+
+```sql
+PRAGMA foreign_keys=OFF;
+--> statement-breakpoint
+CREATE TABLE `__new_worker` (
+ `id` integer PRIMARY KEY NOT NULL,
+ `name` text NOT NULL,
+ `salary` text NOT NULL,
+ `job_id` integer,
+ FOREIGN KEY (`job_id`) REFERENCES `job`(`id`) ON UPDATE no action ON DELETE no action
+);
+--> statement-breakpoint
+INSERT INTO `__new_worker`("id", "name", "salary", "job_id") SELECT "id", "name", "salary", "job_id" FROM `worker`;
+--> statement-breakpoint
+DROP TABLE `worker`;
+--> statement-breakpoint
+ALTER TABLE `__new_worker` RENAME TO `worker`;
+--> statement-breakpoint
+PRAGMA foreign_keys=ON;
+```
+
+### LibSQL/Turso "generate" and "push" statements updates
+
+Since LibSQL supports more ALTER statements than SQLite, we can generate more statements without recreating your schema and moving all the data, which can be potentially dangerous for production environments.
+
+LibSQL and Turso will now have a separate dialect in the Drizzle config file, meaning that we will evolve Turso and LibSQL independently from SQLite and will aim to support as many features as Turso/LibSQL offer.
+
+With the updated LibSQL migration strategy, you will have the ability to:
+
+- **Change Data Type**: Set a new data type for existing columns.
+- **Set and Drop Default Values**: Add or remove default values for existing columns.
+- **Set and Drop NOT NULL**: Add or remove the NOT NULL constraint on existing columns.
+- **Add References to Existing Columns**: Add foreign key references to existing columns
+
+You can find more information in the [LibSQL documentation](https://github.com/tursodatabase/libsql/blob/main/libsql-sqlite3/doc/libsql_extensions.md#altering-columns)
+
+### LIMITATIONS
+
+- Dropping or altering an index will cause table recreation.
+
+This is because LibSQL/Turso does not support dropping this type of index.
+
+```sql
+CREATE TABLE `users` (
+ `id` integer NOT NULL,
+ `name` integer,
+ `age` integer PRIMARY KEY NOT NULL
+ FOREIGN KEY (`name`) REFERENCES `users1`("id") ON UPDATE no action ON DELETE no action
+);
+```
+
+- If the table has indexes, altering columns will cause table recreation.
+- Drizzle-Kit will drop the indexes, modify the columns, and then recreate the indexes.
+- Adding or dropping composite foreign keys is not supported and will cause table recreation
+
+### NOTES
+
+- You can create a reference on any column type, but if you want to insert values, the referenced column must have a unique index or primary key.
+
+```sql
+CREATE TABLE parent(a PRIMARY KEY, b UNIQUE, c, d, e, f);
+CREATE UNIQUE INDEX i1 ON parent(c, d);
+CREATE INDEX i2 ON parent(e);
+CREATE UNIQUE INDEX i3 ON parent(f COLLATE nocase);
+
+CREATE TABLE child1(f, g REFERENCES parent(a)); -- Ok
+CREATE TABLE child2(h, i REFERENCES parent(b)); -- Ok
+CREATE TABLE child3(j, k, FOREIGN KEY(j, k) REFERENCES parent(c, d)); -- Ok
+CREATE TABLE child4(l, m REFERENCES parent(e)); -- Error!
+CREATE TABLE child5(n, o REFERENCES parent(f)); -- Error!
+CREATE TABLE child6(p, q, FOREIGN KEY(p, q) REFERENCES parent(b, c)); -- Error!
+CREATE TABLE child7(r REFERENCES parent(c)); -- Error!
+```
+
+> **NOTE**: The foreign key for the table child5 is an error because, although the parent key column has a unique index, the index uses a different collating sequence.
+
+See more: https://www.sqlite.org/foreignkeys.html
+
+## New `casing` param in `drizzle-orm` and `drizzle-kit`
+
+There are more improvements you can make to your schema definition. The most common way to name your variables in a database and in TypeScript code is usually `snake_case` in the database and `camelCase` in the code. For this case, in Drizzle, you can now define a naming strategy in your database to help Drizzle map column keys automatically. Let's take a table from the previous example and make it work with the new casing API in Drizzle
+
+Table can now become:
+```ts
+import { pgTable } from "drizzle-orm/pg-core";
+
+export const ingredients = pgTable("ingredients", (t) => ({
+ id: t.uuid().defaultRandom().primaryKey(),
+ name: t.text().notNull(),
+ description: t.text(),
+ inStock: t.boolean().default(true),
+}));
+```
+As you can see, `inStock` doesn't have a database name alias, but by defining the casing configuration at the connection level, all queries will automatically map it to `snake_case`
+
+```ts
+const db = await drizzle('node-postgres', { connection: '', casing: 'snake_case' })
+```
+
+For `drizzle-kit` migrations generation you should also specify `casing` param in drizzle config, so you can be sure you casing strategy will be applied to drizzle-kit as well
+
+```ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ dialect: "postgresql",
+ schema: "./schema.ts",
+ dbCredentials: {
+ url: "postgresql://postgres:password@localhost:5432/db",
+ },
+ casing: "snake_case",
+});
+```
\ No newline at end of file
diff --git a/changelogs/drizzle-kit/0.26.0.md b/changelogs/drizzle-kit/0.26.0.md
new file mode 100644
index 000000000..8e054812b
--- /dev/null
+++ b/changelogs/drizzle-kit/0.26.0.md
@@ -0,0 +1,122 @@
+# New Features
+
+## Checks support in `drizzle-kit`
+
+You can use drizzle-kit to manage your `check` constraint defined in drizzle-orm schema definition
+
+For example current drizzle table:
+
+```ts
+import { sql } from "drizzle-orm";
+import { check, pgTable } from "drizzle-orm/pg-core";
+
+export const users = pgTable(
+ "users",
+ (c) => ({
+ id: c.uuid().defaultRandom().primaryKey(),
+ username: c.text().notNull(),
+ age: c.integer(),
+ }),
+ (table) => ({
+ checkConstraint: check("age_check", sql`${table.age} > 21`),
+ })
+);
+```
+
+will be generated into
+
+```sql
+CREATE TABLE IF NOT EXISTS "users" (
+ "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
+ "username" text NOT NULL,
+ "age" integer,
+ CONSTRAINT "age_check" CHECK ("users"."age" > 21)
+);
+```
+
+The same is supported in all dialects
+
+### Limitations
+
+- `generate` will work as expected for all check constraint changes.
+- `push` will detect only check renames and will recreate the constraint. All other changes to SQL won't be detected and will be ignored.
+
+So, if you want to change the constraint's SQL definition using only `push`, you would need to manually comment out the constraint, `push`, then put it back with the new SQL definition and `push` one more time.
+
+## Views support in `drizzle-kit`
+
+You can use drizzle-kit to manage your `views` defined in drizzle-orm schema definition. It will work with all existing dialects and view options
+
+### PostgreSQL
+
+For example current drizzle table:
+
+```ts
+import { sql } from "drizzle-orm";
+import {
+ check,
+ pgMaterializedView,
+ pgTable,
+ pgView,
+} from "drizzle-orm/pg-core";
+
+export const users = pgTable(
+ "users",
+ (c) => ({
+ id: c.uuid().defaultRandom().primaryKey(),
+ username: c.text().notNull(),
+ age: c.integer(),
+ }),
+ (table) => ({
+ checkConstraint: check("age_check", sql`${table.age} > 21`),
+ })
+);
+
+export const simpleView = pgView("simple_users_view").as((qb) =>
+ qb.select().from(users)
+);
+
+export const materializedView = pgMaterializedView(
+ "materialized_users_view"
+).as((qb) => qb.select().from(users));
+```
+
+will be generated into
+
+```sql
+CREATE TABLE IF NOT EXISTS "users" (
+ "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
+ "username" text NOT NULL,
+ "age" integer,
+ CONSTRAINT "age_check" CHECK ("users"."age" > 21)
+);
+
+CREATE VIEW "public"."simple_users_view" AS (select "id", "username", "age" from "users");
+
+CREATE MATERIALIZED VIEW "public"."materialized_users_view" AS (select "id", "username", "age" from "users");
+```
+
+Views supported in all dialects, but materialized views are supported only in PostgreSQL
+
+#### Limitations
+
+- `generate` will work as expected for all view changes
+- `push` limitations:
+
+1. If you want to change the view's SQL definition using only `push`, you would need to manually comment out the view, `push`, then put it back with the new SQL definition and `push` one more time.
+
+## Updates for PostgreSQL enums behavior
+
+We've updated enum behavior in Drizzle with PostgreSQL:
+
+- Add value after or before in enum: With this change, Drizzle will now respect the order of values in the enum and allow adding new values after or before a specific one.
+
+- Support for dropping a value from an enum: In this case, Drizzle will attempt to alter all columns using the enum to text, then drop the existing enum and create a new one with the updated set of values. After that, all columns previously using the enum will be altered back to the new enum.
+
+> If the deleted enum value was used by a column, this process will result in a database error.
+
+- Support for dropping an enum
+
+- Support for moving enums between schemas
+
+- Support for renaming enums
diff --git a/changelogs/drizzle-kit/0.26.1.md b/changelogs/drizzle-kit/0.26.1.md
new file mode 100644
index 000000000..da488ede8
--- /dev/null
+++ b/changelogs/drizzle-kit/0.26.1.md
@@ -0,0 +1 @@
+- Fix `data is malformed` for views
\ No newline at end of file
diff --git a/changelogs/drizzle-kit/0.26.2.md b/changelogs/drizzle-kit/0.26.2.md
new file mode 100644
index 000000000..59e29de14
--- /dev/null
+++ b/changelogs/drizzle-kit/0.26.2.md
@@ -0,0 +1 @@
+- Updated internal versions for the drizzle-kit and drizzle-orm packages. Changes were introduced in the last minor release, and you are required to upgrade both packages to ensure they work as expected
\ No newline at end of file
diff --git a/changelogs/drizzle-kit/0.27.0.md b/changelogs/drizzle-kit/0.27.0.md
new file mode 100644
index 000000000..e4f51fdb3
--- /dev/null
+++ b/changelogs/drizzle-kit/0.27.0.md
@@ -0,0 +1,421 @@
+> This version of `drizzle-jit` requires `drizzle-orm@0.36.0` to enable all new features
+
+# New Features
+
+## Row-Level Security (RLS)
+
+With Drizzle, you can enable Row-Level Security (RLS) for any Postgres table, create policies with various options, and define and manage the roles those policies apply to.
+
+Drizzle supports a raw representation of Postgres policies and roles that can be used in any way you want. This works with popular Postgres database providers such as `Neon` and `Supabase`.
+
+In Drizzle, we have specific predefined RLS roles and functions for RLS with both database providers, but you can also define your own logic.
+
+### Enable RLS
+
+If you just want to enable RLS on a table without adding policies, you can use `.enableRLS()`
+
+As mentioned in the PostgreSQL documentation:
+
+> If no policy exists for the table, a default-deny policy is used, meaning that no rows are visible or can be modified.
+Operations that apply to the whole table, such as TRUNCATE and REFERENCES, are not subject to row security.
+
+```ts
+import { integer, pgTable } from 'drizzle-orm/pg-core';
+
+export const users = pgTable('users', {
+ id: integer(),
+}).enableRLS();
+```
+
+> If you add a policy to a table, RLS will be enabled automatically. So, there’s no need to explicitly enable RLS when adding policies to a table.
+
+### Roles
+
+Currently, Drizzle supports defining roles with a few different options, as shown below. Support for more options will be added in a future release.
+
+```ts
+import { pgRole } from 'drizzle-orm/pg-core';
+
+export const admin = pgRole('admin', { createRole: true, createDb: true, inherit: true });
+```
+
+If a role already exists in your database, and you don’t want drizzle-kit to ‘see’ it or include it in migrations, you can mark the role as existing.
+
+```ts
+import { pgRole } from 'drizzle-orm/pg-core';
+
+export const admin = pgRole('admin').existing();
+```
+
+### Policies
+
+To fully leverage RLS, you can define policies within a Drizzle table.
+
+> In PostgreSQL, policies should be linked to an existing table. Since policies are always associated with a specific table, we decided that policy definitions should be defined as a parameter of `pgTable`
+
+**Example of pgPolicy with all available properties**
+```ts
+import { sql } from 'drizzle-orm';
+import { integer, pgPolicy, pgRole, pgTable } from 'drizzle-orm/pg-core';
+
+export const admin = pgRole('admin');
+
+export const users = pgTable('users', {
+ id: integer(),
+}, (t) => [
+ pgPolicy('policy', {
+ as: 'permissive',
+ to: admin,
+ for: 'delete',
+ using: sql``,
+ withCheck: sql``,
+ }),
+]);
+```
+
+**Link Policy to an existing table**
+
+There are situations where you need to link a policy to an existing table in your database.
+The most common use case is with database providers like `Neon` or `Supabase`, where you need to add a policy
+to their existing tables. In this case, you can use the `.link()` API
+
+```ts
+import { sql } from "drizzle-orm";
+import { pgPolicy } from "drizzle-orm/pg-core";
+import { authenticatedRole, realtimeMessages } from "drizzle-orm/supabase";
+
+export const policy = pgPolicy("authenticated role insert policy", {
+ for: "insert",
+ to: authenticatedRole,
+ using: sql``,
+}).link(realtimeMessages);
+```
+
+### Migrations
+
+If you are using drizzle-kit to manage your schema and roles, there may be situations where you want to refer to roles that are not defined in your Drizzle schema. In such cases, you may want drizzle-kit to skip managing these roles without having to define each role in your drizzle schema and marking it with `.existing()`.
+
+In these cases, you can use `entities.roles` in `drizzle.config.ts`. For a complete reference, refer to the the [`drizzle.config.ts`](https://orm.drizzle.team/docs/drizzle-config-file) documentation.
+
+By default, `drizzle-kit` does not manage roles for you, so you will need to enable this feature in `drizzle.config.ts`.
+
+```ts {12-14}
+// drizzle.config.ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ dialect: 'postgresql',
+ schema: "./drizzle/schema.ts",
+ dbCredentials: {
+ url: process.env.DATABASE_URL!
+ },
+ verbose: true,
+ strict: true,
+ entities: {
+ roles: true
+ }
+});
+```
+
+In case you need additional configuration options, let's take a look at a few more examples.
+
+**You have an `admin` role and want to exclude it from the list of manageable roles**
+
+```ts
+// drizzle.config.ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ ...
+ entities: {
+ roles: {
+ exclude: ['admin']
+ }
+ }
+});
+```
+
+**You have an `admin` role and want to include it in the list of manageable roles**
+
+```ts
+// drizzle.config.ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ ...
+ entities: {
+ roles: {
+ include: ['admin']
+ }
+ }
+});
+```
+
+**If you are using `Neon` and want to exclude Neon-defined roles, you can use the provider option**
+
+```ts
+// drizzle.config.ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ ...
+ entities: {
+ roles: {
+ provider: 'neon'
+ }
+ }
+});
+```
+
+**If you are using `Supabase` and want to exclude Supabase-defined roles, you can use the provider option**
+
+```ts
+// drizzle.config.ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ ...
+ entities: {
+ roles: {
+ provider: 'supabase'
+ }
+ }
+});
+```
+
+> You may encounter situations where Drizzle is slightly outdated compared to new roles specified by your database provider.
+In such cases, you can use the `provider` option and `exclude` additional roles:
+
+```ts
+// drizzle.config.ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ ...
+ entities: {
+ roles: {
+ provider: 'supabase',
+ exclude: ['new_supabase_role']
+ }
+ }
+});
+```
+
+### RLS on views
+
+With Drizzle, you can also specify RLS policies on views. For this, you need to use `security_invoker` in the view's WITH options. Here is a small example:
+
+```ts {5}
+...
+
+export const roomsUsersProfiles = pgView("rooms_users_profiles")
+ .with({
+ securityInvoker: true,
+ })
+ .as((qb) =>
+ qb
+ .select({
+ ...getTableColumns(roomsUsers),
+ email: profiles.email,
+ })
+ .from(roomsUsers)
+ .innerJoin(profiles, eq(roomsUsers.userId, profiles.id))
+ );
+```
+
+### Using with Neon
+
+The Neon Team helped us implement their vision of a wrapper on top of our raw policies API. We defined a specific
+`/neon` import with the `crudPolicy` function that includes predefined functions and Neon's default roles.
+
+Here's an example of how to use the `crudPolicy` function:
+
+```ts
+import { crudPolicy } from 'drizzle-orm/neon';
+import { integer, pgRole, pgTable } from 'drizzle-orm/pg-core';
+
+export const admin = pgRole('admin');
+
+export const users = pgTable('users', {
+ id: integer(),
+}, (t) => [
+ crudPolicy({ role: admin, read: true, modify: false }),
+]);
+```
+
+This policy is equivalent to:
+
+```ts
+import { sql } from 'drizzle-orm';
+import { integer, pgPolicy, pgRole, pgTable } from 'drizzle-orm/pg-core';
+
+export const admin = pgRole('admin');
+
+export const users = pgTable('users', {
+ id: integer(),
+}, (t) => [
+ pgPolicy(`crud-${admin.name}-policy-insert`, {
+ for: 'insert',
+ to: admin,
+ withCheck: sql`false`,
+ }),
+ pgPolicy(`crud-${admin.name}-policy-update`, {
+ for: 'update',
+ to: admin,
+ using: sql`false`,
+ withCheck: sql`false`,
+ }),
+ pgPolicy(`crud-${admin.name}-policy-delete`, {
+ for: 'delete',
+ to: admin,
+ using: sql`false`,
+ }),
+ pgPolicy(`crud-${admin.name}-policy-select`, {
+ for: 'select',
+ to: admin,
+ using: sql`true`,
+ }),
+]);
+```
+
+`Neon` exposes predefined `authenticated` and `anaonymous` roles and related functions. If you are using `Neon` for RLS, you can use these roles, which are marked as existing, and the related functions in your RLS queries.
+
+```ts
+// drizzle-orm/neon
+export const authenticatedRole = pgRole('authenticated').existing();
+export const anonymousRole = pgRole('anonymous').existing();
+
+export const authUid = (userIdColumn: AnyPgColumn) => sql`(select auth.user_id() = ${userIdColumn})`;
+```
+
+For example, you can use the `Neon` predefined roles and functions like this:
+
+
+```ts
+import { sql } from 'drizzle-orm';
+import { authenticatedRole } from 'drizzle-orm/neon';
+import { integer, pgPolicy, pgRole, pgTable } from 'drizzle-orm/pg-core';
+
+export const admin = pgRole('admin');
+
+export const users = pgTable('users', {
+ id: integer(),
+}, (t) => [
+ pgPolicy(`policy-insert`, {
+ for: 'insert',
+ to: authenticatedRole,
+ withCheck: sql`false`,
+ }),
+]);
+```
+
+### Using with Supabase
+
+We also have a `/supabase` import with a set of predefined roles marked as existing, which you can use in your schema.
+This import will be extended in a future release with more functions and helpers to make using RLS and `Supabase` simpler.
+
+```ts
+// drizzle-orm/supabase
+export const anonRole = pgRole('anon').existing();
+export const authenticatedRole = pgRole('authenticated').existing();
+export const serviceRole = pgRole('service_role').existing();
+export const postgresRole = pgRole('postgres_role').existing();
+export const supabaseAuthAdminRole = pgRole('supabase_auth_admin').existing();
+```
+
+For example, you can use the `Supabase` predefined roles like this:
+
+```ts
+import { sql } from 'drizzle-orm';
+import { serviceRole } from 'drizzle-orm/supabase';
+import { integer, pgPolicy, pgRole, pgTable } from 'drizzle-orm/pg-core';
+
+export const admin = pgRole('admin');
+
+export const users = pgTable('users', {
+ id: integer(),
+}, (t) => [
+ pgPolicy(`policy-insert`, {
+ for: 'insert',
+ to: serviceRole,
+ withCheck: sql`false`,
+ }),
+]);
+```
+
+The `/supabase` import also includes predefined tables and functions that you can use in your application
+
+```ts
+// drizzle-orm/supabase
+
+const auth = pgSchema('auth');
+export const authUsers = auth.table('users', {
+ id: uuid().primaryKey().notNull(),
+});
+
+const realtime = pgSchema('realtime');
+export const realtimeMessages = realtime.table(
+ 'messages',
+ {
+ id: bigserial({ mode: 'bigint' }).primaryKey(),
+ topic: text().notNull(),
+ extension: text({
+ enum: ['presence', 'broadcast', 'postgres_changes'],
+ }).notNull(),
+ },
+);
+
+export const authUid = sql`(select auth.uid())`;
+export const realtimeTopic = sql`realtime.topic()`;
+```
+
+This allows you to use it in your code, and Drizzle Kit will treat them as existing databases,
+using them only as information to connect to other entities
+
+```ts
+import { foreignKey, pgPolicy, pgTable, text, uuid } from "drizzle-orm/pg-core";
+import { sql } from "drizzle-orm/sql";
+import { authenticatedRole, authUsers } from "drizzle-orm/supabase";
+
+export const profiles = pgTable(
+ "profiles",
+ {
+ id: uuid().primaryKey().notNull(),
+ email: text().notNull(),
+ },
+ (table) => [
+ foreignKey({
+ columns: [table.id],
+ // reference to the auth table from Supabase
+ foreignColumns: [authUsers.id],
+ name: "profiles_id_fk",
+ }).onDelete("cascade"),
+ pgPolicy("authenticated can view all profiles", {
+ for: "select",
+ // using predefined role from Supabase
+ to: authenticatedRole,
+ using: sql`true`,
+ }),
+ ]
+);
+```
+
+Let's check an example of adding a policy to a table that exists in `Supabase`
+
+```ts
+import { sql } from "drizzle-orm";
+import { pgPolicy } from "drizzle-orm/pg-core";
+import { authenticatedRole, realtimeMessages } from "drizzle-orm/supabase";
+
+export const policy = pgPolicy("authenticated role insert policy", {
+ for: "insert",
+ to: authenticatedRole,
+ using: sql``,
+}).link(realtimeMessages);
+```
+
+# Bug fixes
+
+- [[BUG]: Studio + mysql default mode, wrong format related timezone](https://github.com/drizzle-team/drizzle-orm/issues/2747)
+- [[BUG]: Drizzle Studio CORS error](https://github.com/drizzle-team/drizzle-orm/issues/1857)
+- [[BUG]: TIMESTAMPS showing up incorrectly on drizzle studio](https://github.com/drizzle-team/drizzle-orm/issues/2549)
\ No newline at end of file
diff --git a/changelogs/drizzle-kit/0.27.1.md b/changelogs/drizzle-kit/0.27.1.md
new file mode 100644
index 000000000..d7a63a723
--- /dev/null
+++ b/changelogs/drizzle-kit/0.27.1.md
@@ -0,0 +1 @@
+- Fix: [[BUG]: When using RLS policies and Views, the view is the last clause generated](https://github.com/drizzle-team/drizzle-orm/issues/3378)
\ No newline at end of file
diff --git a/changelogs/drizzle-kit/0.27.2.md b/changelogs/drizzle-kit/0.27.2.md
new file mode 100644
index 000000000..bafd17222
--- /dev/null
+++ b/changelogs/drizzle-kit/0.27.2.md
@@ -0,0 +1,3 @@
+- Fix [[BUG]: Undefined properties when using drizzle-kit push](https://github.com/drizzle-team/drizzle-orm/issues/3391)
+- Fix TypeError: Cannot read properties of undefined (reading 'isRLSEnabled')
+- Fix push bugs, when pushing a schema with linked policy to a table from `drizzle-orm/supabase`
diff --git a/changelogs/drizzle-kit/0.28.0.md b/changelogs/drizzle-kit/0.28.0.md
new file mode 100644
index 000000000..6881c677e
--- /dev/null
+++ b/changelogs/drizzle-kit/0.28.0.md
@@ -0,0 +1,28 @@
+# Improvements
+
+- Added an OHM static imports checker to identify unexpected imports within a chain of imports in the drizzle-kit repo. For example, it checks if drizzle-orm is imported before drizzle-kit and verifies if the drizzle-orm import is available in your project.
+- [Adding more columns to Supabase auth.users table schema](https://github.com/drizzle-team/drizzle-orm/issues/3327) - thanks @nicholasdly
+
+# Bug Fixes
+
+- [[BUG]: [drizzle-kit]: Fix breakpoints option cannot be disabled](https://github.com/drizzle-team/drizzle-orm/issues/2828) - thanks @klotztech
+- [[BUG]: drizzle-kit introspect: SMALLINT import missing and incorrect DECIMAL UNSIGNED handling](https://github.com/drizzle-team/drizzle-orm/issues/2950) - thanks @L-Mario564
+- [Unsigned tinyints preventing migrations](https://github.com/drizzle-team/drizzle-orm/issues/1571) - thanks @L-Mario564
+- [[BUG]: Can't parse float(8,2) from database (precision and scale and/or unsigned breaks float types)](https://github.com/drizzle-team/drizzle-orm/issues/3285) - thanks @L-Mario564
+- [[BUG]: PgEnum generated migration doesn't escape single quotes](https://github.com/drizzle-team/drizzle-orm/issues/1272) - thanks @L-Mario564
+- [[BUG]: single quote not escaped correctly in migration file](https://github.com/drizzle-team/drizzle-orm/issues/2184) - thanks @L-Mario564
+- [[BUG]: Migrations does not escape single quotes](https://github.com/drizzle-team/drizzle-orm/issues/1765) - thanks @L-Mario564
+- [[BUG]: Issue with quoted default string values](https://github.com/drizzle-team/drizzle-orm/issues/2122) - thanks @L-Mario564
+- [[BUG]: SQl commands in wrong roder](https://github.com/drizzle-team/drizzle-orm/issues/2390) - thanks @L-Mario564
+- [[BUG]: Time with precision in drizzle-orm/pg-core adds double-quotes around type](https://github.com/drizzle-team/drizzle-orm/issues/1804) - thanks @L-Mario564
+- [[BUG]: Postgres push fails due to lack of quotes](https://github.com/drizzle-team/drizzle-orm/issues/2396) - thanks @L-Mario564
+- [[BUG]: TypeError: Cannot read properties of undefined (reading 'compositePrimaryKeys')](https://github.com/drizzle-team/drizzle-orm/issues/2344) - thanks @L-Mario564
+- [[BUG]: drizzle-kit introspect generates CURRENT_TIMESTAMP without sql operator on date column](https://github.com/drizzle-team/drizzle-orm/issues/2899) - thanks @L-Mario564
+- [[BUG]: Drizzle-kit introspect doesn't pull correct defautl statement](https://github.com/drizzle-team/drizzle-orm/issues/2905) - thanks @L-Mario564
+- [[BUG]: Problem on MacBook - This statement does not return data. Use run() instead](https://github.com/drizzle-team/drizzle-orm/issues/2623) - thanks @L-Mario564
+- [[BUG]: Enum column names that are used as arrays are not quoted](https://github.com/drizzle-team/drizzle-orm/issues/2598) - thanks @L-Mario564
+- [[BUG]: drizzle-kit generate ignores index operators](https://github.com/drizzle-team/drizzle-orm/issues/2935) - thanks @L-Mario564
+- [dialect param config error message is wrong](https://github.com/drizzle-team/drizzle-orm/issues/3427) - thanks @L-Mario564
+- [[BUG]: Error setting default enum field values](https://github.com/drizzle-team/drizzle-orm/issues/2299) - thanks @L-Mario564
+- [[BUG]: drizzle-kit does not respect the order of columns configured in primaryKey()](https://github.com/drizzle-team/drizzle-orm/issues/2326) - thanks @L-Mario564
+- [[BUG]: Cannot drop Unique Constraint MySQL](https://github.com/drizzle-team/drizzle-orm/issues/998) - thanks @L-Mario564
diff --git a/changelogs/drizzle-kit/0.28.1.md b/changelogs/drizzle-kit/0.28.1.md
new file mode 100644
index 000000000..194b4bd57
--- /dev/null
+++ b/changelogs/drizzle-kit/0.28.1.md
@@ -0,0 +1,4 @@
+# Bug fixes
+
+- Fixed typos in repository: thanks @armandsalle, @masto, @wackbyte, @Asher-JH, @MaxLeiter
+- [fix: wrong dialect set in mysql/sqlite introspect](https://github.com/drizzle-team/drizzle-orm/pull/2865)
\ No newline at end of file
diff --git a/changelogs/drizzle-kit/0.29.0.md b/changelogs/drizzle-kit/0.29.0.md
new file mode 100644
index 000000000..b68b33085
--- /dev/null
+++ b/changelogs/drizzle-kit/0.29.0.md
@@ -0,0 +1,40 @@
+# New Dialects
+
+### 🎉 `SingleStore` dialect is now available in Drizzle
+
+Thanks to the SingleStore team for creating a PR with all the necessary changes to support the MySQL-compatible part of SingleStore. You can already start using it with Drizzle. The SingleStore team will also help us iterate through updates and make more SingleStore-specific features available in Drizzle
+
+```ts
+import 'dotenv/config';
+import { defineConfig } from 'drizzle-kit';
+
+export default defineConfig({
+ dialect: 'singlestore',
+ out: './drizzle',
+ schema: './src/db/schema.ts',
+ dbCredentials: {
+ url: process.env.DATABASE_URL!,
+ },
+});
+```
+
+You can check out our [Getting started guides](https://orm.drizzle.team/docs/get-started/singlestore-new) to try SingleStore!
+
+# New Drivers
+
+### 🎉 `SQLite Durable Objects` driver is now available in Drizzle
+
+You can now query SQLite Durable Objects in Drizzle!
+
+For the full example, please check our [Get Started](https://orm.drizzle.team/docs/get-started/do-new) Section
+
+```ts
+import 'dotenv/config';
+import { defineConfig } from 'drizzle-kit';
+export default defineConfig({
+ out: './drizzle',
+ schema: './src/db/schema.ts',
+ dialect: 'sqlite',
+ driver: 'durable-sqlite',
+});
+```
\ No newline at end of file
diff --git a/changelogs/drizzle-kit/0.29.1.md b/changelogs/drizzle-kit/0.29.1.md
new file mode 100644
index 000000000..8e8c6d3d3
--- /dev/null
+++ b/changelogs/drizzle-kit/0.29.1.md
@@ -0,0 +1 @@
+- Fix SingleStore generate migrations command
\ No newline at end of file
diff --git a/changelogs/drizzle-kit/0.30.0.md b/changelogs/drizzle-kit/0.30.0.md
new file mode 100644
index 000000000..7accf9c9c
--- /dev/null
+++ b/changelogs/drizzle-kit/0.30.0.md
@@ -0,0 +1,7 @@
+Starting from this update, the PostgreSQL dialect will align with the behavior of all other dialects. It will no longer include `IF NOT EXISTS`, `$DO`, or similar statements, which could cause incorrect DDL statements to not fail when an object already exists in the database and should actually fail.
+
+This change marks our first step toward several major upgrades we are preparing:
+
+- An updated and improved migration workflow featuring commutative migrations, a revised folder structure, and enhanced collaboration capabilities for migrations.
+- Better support for Xata migrations.
+- Compatibility with CockroachDB (achieving full compatibility will only require removing serial fields from the migration folder).
\ No newline at end of file
diff --git a/changelogs/drizzle-kit/0.30.1.md b/changelogs/drizzle-kit/0.30.1.md
new file mode 100644
index 000000000..1b671312d
--- /dev/null
+++ b/changelogs/drizzle-kit/0.30.1.md
@@ -0,0 +1,35 @@
+# New Features
+
+### `drizzle-kit export`
+
+To make drizzle-kit integration with other migration tools, like Atlas much easier, we've prepared a new command called `export`. It will translate your drizzle schema in SQL representation(DDL) statements and outputs to the console
+
+```ts
+// schema.ts
+import { pgTable, serial, text } from 'drizzle-orm/pg-core'
+
+export const users = pgTable('users', {
+ id: serial('id').primaryKey(),
+ email: text('email').notNull(),
+ name: text('name')
+});
+```
+Running
+```bash
+npx drizzle-kit export
+```
+
+will output this string to console
+```bash
+CREATE TABLE "users" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "email" text NOT NULL,
+ "name" text
+);
+```
+
+By default, the only option for now is `--sql`, so the output format will be SQL DDL statements. In the future, we will support additional output formats to accommodate more migration tools
+
+```bash
+npx drizzle-kit export --sql
+```
\ No newline at end of file
diff --git a/changelogs/drizzle-kit/0.30.2.md b/changelogs/drizzle-kit/0.30.2.md
new file mode 100644
index 000000000..8db1c961a
--- /dev/null
+++ b/changelogs/drizzle-kit/0.30.2.md
@@ -0,0 +1 @@
+- Fix certificates generation utility for Drizzle Studio; [[BUG]: [drizzle-kit]: drizzle-kit dependency on drizzle-studio perms error](https://github.com/drizzle-team/drizzle-orm/issues/3729)
\ No newline at end of file
diff --git a/changelogs/drizzle-orm/0.29.5.md b/changelogs/drizzle-orm/0.29.5.md
index 9ef656b57..74748caad 100644
--- a/changelogs/drizzle-orm/0.29.5.md
+++ b/changelogs/drizzle-orm/0.29.5.md
@@ -67,7 +67,7 @@ await migrate(db, {
});
```
-### 🎉 SQLite Proxy bacth and Relational Queries support
+### 🎉 SQLite Proxy batch and Relational Queries support
- You can now use `.query.findFirst` and `.query.findMany` syntax with sqlite proxy driver
diff --git a/changelogs/drizzle-orm/0.32.2.md b/changelogs/drizzle-orm/0.32.2.md
new file mode 100644
index 000000000..9ce68473c
--- /dev/null
+++ b/changelogs/drizzle-orm/0.32.2.md
@@ -0,0 +1,4 @@
+- Fix AWS Data API type hints bugs in RQB
+- Fix set transactions in MySQL bug - thanks @roguesherlock
+- Add forwaring dependencies within useLiveQuery, fixes [#2651](https://github.com/drizzle-team/drizzle-orm/issues/2651) - thanks @anstapol
+- Export additional types from SQLite package, like `AnySQLiteUpdate` - thanks @veloii
\ No newline at end of file
diff --git a/changelogs/drizzle-orm/0.33.0.md b/changelogs/drizzle-orm/0.33.0.md
new file mode 100644
index 000000000..0093c9d05
--- /dev/null
+++ b/changelogs/drizzle-orm/0.33.0.md
@@ -0,0 +1,64 @@
+## Breaking changes (for some of postgres.js users)
+
+#### Bugs fixed for this breaking change
+
+- [Open
+[BUG]: jsonb always inserted as a json string when using postgres-js](https://github.com/drizzle-team/drizzle-orm/issues/724)
+- [[BUG]: jsonb type on postgres implement incorrectly](https://github.com/drizzle-team/drizzle-orm/issues/1511)
+
+> As we are doing with other drivers, we've changed the behavior of PostgreSQL-JS to pass raw JSON values, the same as you see them in the database. So if you are using the PostgreSQL-JS driver and passing data to Drizzle elsewhere, please check the new behavior of the client after it is passed to Drizzle.
+
+> We will update it to ensure it does not override driver behaviors, but this will be done as a complex task for everything in Drizzle in other releases
+
+If you were using `postgres-js` with `jsonb` fields, you might have seen stringified objects in your database, while drizzle insert and select operations were working as expected.
+
+You need to convert those fields from strings to actual JSON objects. To do this, you can use the following query to update your database:
+
+**if you are using jsonb:**
+```sql
+update table_name
+set jsonb_column = (jsonb_column #>> '{}')::jsonb;
+```
+
+**if you are using json:**
+```sql
+update table_name
+set json_column = (json_column #>> '{}')::json;
+```
+
+We've tested it in several cases, and it worked well, but only if all stringified objects are arrays or objects. If you have primitives like strings, numbers, booleans, etc., you can use this query to update all the fields
+
+**if you are using jsonb:**
+```sql
+UPDATE table_name
+SET jsonb_column = CASE
+ -- Convert to JSONB if it is a valid JSON object or array
+ WHEN jsonb_column #>> '{}' LIKE '{%' OR jsonb_column #>> '{}' LIKE '[%' THEN
+ (jsonb_column #>> '{}')::jsonb
+ ELSE
+ jsonb_column
+END
+WHERE
+ jsonb_column IS NOT NULL;
+```
+
+**if you are using json:**
+```sql
+UPDATE table_name
+SET json_column = CASE
+ -- Convert to JSON if it is a valid JSON object or array
+ WHEN json_column #>> '{}' LIKE '{%' OR json_column #>> '{}' LIKE '[%' THEN
+ (json_column #>> '{}')::json
+ ELSE
+ json_column
+END
+WHERE json_column IS NOT NULL;
+```
+
+If nothing works for you and you are blocked, please reach out to me @AndriiSherman. I will try to help you!
+
+## Bug Fixes
+
+- [[BUG]: boolean mode not working with prepared statements (bettersqlite)](https://github.com/drizzle-team/drizzle-orm/issues/2568) - thanks @veloii
+- [[BUG]: isTable helper function is not working](https://github.com/drizzle-team/drizzle-orm/issues/2672) - thanks @hajek-raven
+- [[BUG]: Documentation is outdated on inArray and notInArray Methods](https://github.com/drizzle-team/drizzle-orm/issues/2690) - thanks @RemiPeruto
\ No newline at end of file
diff --git a/changelogs/drizzle-orm/0.34.0.md b/changelogs/drizzle-orm/0.34.0.md
new file mode 100644
index 000000000..cfc3e4e38
--- /dev/null
+++ b/changelogs/drizzle-orm/0.34.0.md
@@ -0,0 +1,345 @@
+## Breaking changes and migrate guide for Turso users
+
+If you are using Turso and libsql, you will need to upgrade your `drizzle.config` and `@libsql/client` package.
+
+1. This version of drizzle-orm will only work with `@libsql/client@0.10.0` or higher if you are using the `migrate` function. For other use cases, you can continue using previous versions(But the suggestion is to upgrade)
+To install the latest version, use the command:
+
+```bash
+npm i @libsql/client@latest
+```
+
+2. Previously, we had a common `drizzle.config` for SQLite and Turso users, which allowed a shared strategy for both dialects. Starting with this release, we are introducing the turso dialect in drizzle-kit. We will evolve and improve Turso as a separate dialect with its own migration strategies.
+
+**Before**
+
+```ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ dialect: "sqlite",
+ schema: "./schema.ts",
+ out: "./drizzle",
+ dbCredentials: {
+ url: "database.db",
+ },
+ breakpoints: true,
+ verbose: true,
+ strict: true,
+});
+```
+
+**After**
+
+```ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ dialect: "turso",
+ schema: "./schema.ts",
+ out: "./drizzle",
+ dbCredentials: {
+ url: "database.db",
+ },
+ breakpoints: true,
+ verbose: true,
+ strict: true,
+});
+```
+
+If you are using only SQLite, you can use `dialect: "sqlite"`
+
+## LibSQL/Turso and Sqlite migration updates
+
+### SQLite "generate" and "push" statements updates
+
+Starting from this release, we will no longer generate comments like this:
+
+```sql
+ '/*\n SQLite does not support "Changing existing column type" out of the box, we do not generate automatic migration for that, so it has to be done manually'
+ + '\n Please refer to: https://www.techonthenet.com/sqlite/tables/alter_table.php'
+ + '\n https://www.sqlite.org/lang_altertable.html'
+ + '\n https://stackoverflow.com/questions/2083543/modify-a-columns-type-in-sqlite3'
+ + "\n\n Due to that we don't generate migration automatically and it has to be done manually"
+ + '\n*/'
+```
+
+We will generate a set of statements, and you can decide if it's appropriate to create data-moving statements instead. Here is an example of the SQL file you'll receive now:
+
+```sql
+PRAGMA foreign_keys=OFF;
+--> statement-breakpoint
+CREATE TABLE `__new_worker` (
+ `id` integer PRIMARY KEY NOT NULL,
+ `name` text NOT NULL,
+ `salary` text NOT NULL,
+ `job_id` integer,
+ FOREIGN KEY (`job_id`) REFERENCES `job`(`id`) ON UPDATE no action ON DELETE no action
+);
+--> statement-breakpoint
+INSERT INTO `__new_worker`("id", "name", "salary", "job_id") SELECT "id", "name", "salary", "job_id" FROM `worker`;
+--> statement-breakpoint
+DROP TABLE `worker`;
+--> statement-breakpoint
+ALTER TABLE `__new_worker` RENAME TO `worker`;
+--> statement-breakpoint
+PRAGMA foreign_keys=ON;
+```
+
+### LibSQL/Turso "generate" and "push" statements updates
+
+Since LibSQL supports more ALTER statements than SQLite, we can generate more statements without recreating your schema and moving all the data, which can be potentially dangerous for production environments.
+
+LibSQL and Turso will now have a separate dialect in the Drizzle config file, meaning that we will evolve Turso and LibSQL independently from SQLite and will aim to support as many features as Turso/LibSQL offer.
+
+With the updated LibSQL migration strategy, you will have the ability to:
+
+- **Change Data Type**: Set a new data type for existing columns.
+- **Set and Drop Default Values**: Add or remove default values for existing columns.
+- **Set and Drop NOT NULL**: Add or remove the NOT NULL constraint on existing columns.
+- **Add References to Existing Columns**: Add foreign key references to existing columns
+
+You can find more information in the [LibSQL documentation](https://github.com/tursodatabase/libsql/blob/main/libsql-sqlite3/doc/libsql_extensions.md#altering-columns)
+
+### LIMITATIONS
+
+- Dropping or altering an index will cause table recreation.
+
+This is because LibSQL/Turso does not support dropping this type of index.
+
+```sql
+CREATE TABLE `users` (
+ `id` integer NOT NULL,
+ `name` integer,
+ `age` integer PRIMARY KEY NOT NULL
+ FOREIGN KEY (`name`) REFERENCES `users1`("id") ON UPDATE no action ON DELETE no action
+);
+```
+
+- If the table has indexes, altering columns will cause table recreation.
+- Drizzle-Kit will drop the indexes, modify the columns, and then recreate the indexes.
+- Adding or dropping composite foreign keys is not supported and will cause table recreation
+
+### NOTES
+
+- You can create a reference on any column type, but if you want to insert values, the referenced column must have a unique index or primary key.
+
+```sql
+CREATE TABLE parent(a PRIMARY KEY, b UNIQUE, c, d, e, f);
+CREATE UNIQUE INDEX i1 ON parent(c, d);
+CREATE INDEX i2 ON parent(e);
+CREATE UNIQUE INDEX i3 ON parent(f COLLATE nocase);
+
+CREATE TABLE child1(f, g REFERENCES parent(a)); -- Ok
+CREATE TABLE child2(h, i REFERENCES parent(b)); -- Ok
+CREATE TABLE child3(j, k, FOREIGN KEY(j, k) REFERENCES parent(c, d)); -- Ok
+CREATE TABLE child4(l, m REFERENCES parent(e)); -- Error!
+CREATE TABLE child5(n, o REFERENCES parent(f)); -- Error!
+CREATE TABLE child6(p, q, FOREIGN KEY(p, q) REFERENCES parent(b, c)); -- Error!
+CREATE TABLE child7(r REFERENCES parent(c)); -- Error!
+```
+
+> **NOTE**: The foreign key for the table child5 is an error because, although the parent key column has a unique index, the index uses a different collating sequence.
+
+See more: https://www.sqlite.org/foreignkeys.html
+
+## A new and easy way to start using drizzle
+
+Current and the only way to do, is to define client yourself and pass it to drizzle
+
+```ts
+const client = new Pool({ url: '' });
+drizzle(client, { logger: true });
+```
+
+But we want to introduce you to a new API, which is a simplified method in addition to the existing one.
+
+Most clients will have a few options to connect, starting with the easiest and most common one, and allowing you to control your client connection as needed.
+
+Let's use `node-postgres` as an example, but the same pattern can be applied to all other clients
+
+```ts
+// Finally, one import for all available clients and dialects!
+import { drizzle } from 'drizzle-orm'
+
+// Choose a client and use a connection URL — nothing else is needed!
+const db1 = await drizzle("node-postgres", process.env.POSTGRES_URL);
+
+// If you need to pass a logger, schema, or other configurations, you can use an object and specify the client-specific URL in the connection
+const db2 = await drizzle("node-postgres", {
+ connection: process.env.POSTGRES_URL,
+ logger: true
+});
+
+// And finally, if you need to use full client/driver-specific types in connections, you can use a URL or host/port/etc. as an object inferred from the underlying client connection types
+const db3 = await drizzle("node-postgres", {
+ connection: {
+ connectionString: process.env.POSTGRES_URL,
+ },
+});
+
+const db4 = await drizzle("node-postgres", {
+ connection: {
+ user: process.env.DB_USER,
+ password: process.env.DB_PASSWORD,
+ host: process.env.DB_HOST,
+ port: process.env.DB_PORT,
+ database: process.env.DB_NAME,
+ ssl: true,
+ },
+});
+```
+
+A few clients will have a slightly different API due to their specific behavior. Let's take a look at them:
+
+For `aws-data-api-pg`, Drizzle will require `resourceArn`, `database`, and `secretArn`, along with any other AWS Data API client types for the connection, such as credentials, region, etc.
+
+```ts
+drizzle("aws-data-api-pg", {
+ connection: {
+ resourceArn: "",
+ database: "",
+ secretArn: "",
+ },
+});
+```
+
+For `d1`, the CloudFlare Worker types as described in the [documentation](https://developers.cloudflare.com/d1/get-started/) here will be required.
+
+```ts
+drizzle("d1", {
+ connection: env.DB // CloudFlare Worker Types
+})
+```
+
+For `vercel-postgres`, nothing is needed since Vercel automatically retrieves the `POSTGRES_URL` from the `.env` file. You can check this [documentation](https://vercel.com/docs/storage/vercel-postgres/quickstart) for more info
+
+```ts
+drizzle("vercel-postgres")
+```
+
+> Note that the first example with the client is still available and not deprecated. You can use it if you don't want to await the drizzle object. The new way of defining drizzle is designed to make it easier to import from one place and get autocomplete for all the available clients
+
+## Optional names for columns and callback in drizzle table
+
+We believe that schema definition in Drizzle is extremely powerful and aims to be as close to SQL as possible while adding more helper functions for JS runtime values.
+
+However, there are a few areas that could be improved, which we addressed in this release. These include:
+
+- Unnecessary database column names when TypeScript keys are essentially just copies of them
+- A callback that provides all column types available for a specific table.
+
+Let's look at an example with PostgreSQL (this applies to all the dialects supported by Drizzle)
+
+**Previously**
+```ts
+import { boolean, pgTable, text, uuid } from "drizzle-orm/pg-core";
+
+export const ingredients = pgTable("ingredients", {
+ id: uuid("id").defaultRandom().primaryKey(),
+ name: text("name").notNull(),
+ description: text("description"),
+ inStock: boolean("in_stock").default(true),
+});
+```
+
+The previous table definition will still be valid in the new release, but it can be replaced with this instead
+
+```ts
+import { pgTable } from "drizzle-orm/pg-core";
+
+export const ingredients = pgTable("ingredients", (t) => ({
+ id: t.uuid().defaultRandom().primaryKey(),
+ name: t.text().notNull(),
+ description: t.text(),
+ inStock: t.boolean("in_stock").default(true),
+}));
+```
+
+## New `casing` param in `drizzle-orm` and `drizzle-kit`
+
+There are more improvements you can make to your schema definition. The most common way to name your variables in a database and in TypeScript code is usually `snake_case` in the database and `camelCase` in the code. For this case, in Drizzle, you can now define a naming strategy in your database to help Drizzle map column keys automatically. Let's take a table from the previous example and make it work with the new casing API in Drizzle
+
+Table can now become:
+```ts
+import { pgTable } from "drizzle-orm/pg-core";
+
+export const ingredients = pgTable("ingredients", (t) => ({
+ id: t.uuid().defaultRandom().primaryKey(),
+ name: t.text().notNull(),
+ description: t.text(),
+ inStock: t.boolean().default(true),
+}));
+```
+As you can see, `inStock` doesn't have a database name alias, but by defining the casing configuration at the connection level, all queries will automatically map it to `snake_case`
+
+```ts
+const db = await drizzle('node-postgres', { connection: '', casing: 'snake_case' })
+```
+
+For `drizzle-kit` migrations generation you should also specify `casing` param in drizzle config, so you can be sure you casing strategy will be applied to drizzle-kit as well
+
+```ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ dialect: "postgresql",
+ schema: "./schema.ts",
+ dbCredentials: {
+ url: "postgresql://postgres:password@localhost:5432/db",
+ },
+ casing: "snake_case",
+});
+```
+
+## New "count" API
+
+Before this release to count entities in a table, you would need to do this:
+
+```ts
+const res = await db.select({ count: sql`count(*)` }).from(users);
+const count = res[0].count;
+```
+
+The new API will look like this:
+
+```ts
+// how many users are in the database
+const count: number = await db.$count(users);
+
+// how many users with the name "Dan" are in the database
+const count: number = await db.$count(users, eq(name, "Dan"));
+```
+
+This can also work as a subquery and within relational queries
+
+```ts
+const users = await db.select({
+ ...users,
+ postsCount: db.$count(posts, eq(posts.authorId, users.id))
+});
+
+const users = await db.query.users.findMany({
+ extras: {
+ postsCount: db.$count(posts, eq(posts.authorId, users.id))
+ }
+})
+```
+
+## Ability to execute raw strings instead of using SQL templates for raw queries
+
+Previously, you would have needed to do this to execute a raw query with Drizzle
+
+```ts
+import { sql } from 'drizzle-orm'
+
+db.execute(sql`select * from ${users}`);
+// or
+db.execute(sql.raw(`select * from ${users}`));
+```
+
+You can now do this as well
+
+```ts
+db.execute('select * from users')
+```
diff --git a/changelogs/drizzle-orm/0.34.1.md b/changelogs/drizzle-orm/0.34.1.md
new file mode 100644
index 000000000..e314b5fd2
--- /dev/null
+++ b/changelogs/drizzle-orm/0.34.1.md
@@ -0,0 +1 @@
+- Fixed dynamic imports for CJS and MJS in the `/connect` module
\ No newline at end of file
diff --git a/changelogs/drizzle-orm/0.35.0.md b/changelogs/drizzle-orm/0.35.0.md
new file mode 100644
index 000000000..92bafdff1
--- /dev/null
+++ b/changelogs/drizzle-orm/0.35.0.md
@@ -0,0 +1,85 @@
+# Important change after 0.34.0 release
+
+## Updated the init Drizzle database API
+
+The API from version 0.34.0 turned out to be unusable and needs to be changed. You can read more about our decisions in [this discussion](https://github.com/drizzle-team/drizzle-orm/discussions/3097)
+
+If you still want to use the new API introduced in 0.34.0, which can create driver clients for you under the hood, you can now do so
+```ts
+import { drizzle } from "drizzle-orm/node-postgres";
+
+const db = drizzle(process.env.DATABASE_URL);
+// or
+const db = drizzle({
+ connection: process.env.DATABASE_URL
+});
+const db = drizzle({
+ connection: {
+ user: "...",
+ password: "...",
+ host: "...",
+ port: 4321,
+ db: "...",
+ },
+});
+
+// if you need to pass logger or schema
+const db = drizzle({
+ connection: process.env.DATABASE_URL,
+ logger: true,
+ schema: schema,
+});
+```
+
+in order to not introduce breaking change - we will still leave support for deprecated API until V1 release.
+It will degrade autocomplete performance in connection params due to `DatabaseDriver` | `ConnectionParams` types collision,
+but that's a decent compromise against breaking changes
+
+```ts
+import { drizzle } from "drizzle-orm/node-postgres";
+import { Pool } from "pg";
+
+const client = new Pool({ connectionString: process.env.DATABASE_URL });
+const db = drizzle(client); // deprecated but available
+
+// new version
+const db = drizzle({
+ client: client,
+});
+```
+
+# New Features
+
+## New .orderBy() and .limit() functions in update and delete statements SQLite and MySQL
+
+You now have more options for the `update` and `delete` query builders in MySQL and SQLite
+
+**Example**
+
+```ts
+await db.update(usersTable).set({ verified: true }).limit(2).orderBy(asc(usersTable.name));
+
+await db.delete(usersTable).where(eq(usersTable.verified, false)).limit(1).orderBy(asc(usersTable.name));
+```
+
+## New `drizzle.mock()` function
+
+There were cases where you didn't need to provide a driver to the Drizzle object, and this served as a workaround
+```ts
+const db = drizzle({} as any)
+```
+
+Now you can do this using a mock function
+```ts
+const db = drizzle.mock()
+```
+
+There is no valid production use case for this, but we used it in situations where we needed to check types, etc., without making actual database calls or dealing with driver creation. If anyone was using it, please switch to using mocks now
+
+# Internal updates
+
+- Upgraded TS in codebase to the version 5.6.3
+
+# Bug fixes
+
+- [[BUG]: New $count API error with @neondatabase/serverless](https://github.com/drizzle-team/drizzle-orm/issues/3081)
\ No newline at end of file
diff --git a/changelogs/drizzle-orm/0.35.1.md b/changelogs/drizzle-orm/0.35.1.md
new file mode 100644
index 000000000..59e29de14
--- /dev/null
+++ b/changelogs/drizzle-orm/0.35.1.md
@@ -0,0 +1 @@
+- Updated internal versions for the drizzle-kit and drizzle-orm packages. Changes were introduced in the last minor release, and you are required to upgrade both packages to ensure they work as expected
\ No newline at end of file
diff --git a/changelogs/drizzle-orm/0.35.2.md b/changelogs/drizzle-orm/0.35.2.md
new file mode 100644
index 000000000..1df586618
--- /dev/null
+++ b/changelogs/drizzle-orm/0.35.2.md
@@ -0,0 +1,6 @@
+- Fix issues with importing in several environments after updating the Drizzle driver implementation
+
+We've added approximately 240 tests to check the ESM and CJS builds for all the drivers we have. You can check them [here](https://github.com/drizzle-team/drizzle-orm/tree/main/integration-tests/js-tests/driver-init)
+
+- Fixed [[BUG]: Type Error in PgTransaction Missing $client Property After Upgrading to drizzle-orm@0.35.1](https://github.com/drizzle-team/drizzle-orm/issues/3140)
+- Fixed [[BUG]: New critical Build error drizzle 0.35.0 deploying on Cloudflare ](https://github.com/drizzle-team/drizzle-orm/issues/3137)
\ No newline at end of file
diff --git a/changelogs/drizzle-orm/0.35.3.md b/changelogs/drizzle-orm/0.35.3.md
new file mode 100644
index 000000000..b25658e93
--- /dev/null
+++ b/changelogs/drizzle-orm/0.35.3.md
@@ -0,0 +1,80 @@
+# New LibSQL driver modules
+
+Drizzle now has native support for all `@libsql/client` driver variations:
+
+1. `@libsql/client` - defaults to node import, automatically changes to web if target or platform is set for bundler, e.g. `esbuild --platform=browser`
+
+```ts
+import { drizzle } from 'drizzle-orm/libsql';
+
+const db = drizzle({ connection: {
+ url: process.env.DATABASE_URL,
+ authToken: process.env.DATABASE_AUTH_TOKEN
+}});
+```
+
+2. `@libsql/client/node` node compatible module, supports :memory:, file, wss, http and turso connection protocols
+
+```ts
+import { drizzle } from 'drizzle-orm/libsql/node';
+
+const db = drizzle({ connection: {
+ url: process.env.DATABASE_URL,
+ authToken: process.env.DATABASE_AUTH_TOKEN
+}});
+```
+
+3. `@libsql/client/web` module for fullstack web frameworks like next, nuxt, astro, etc.
+
+```ts
+import { drizzle } from 'drizzle-orm/libsql/web';
+
+const db = drizzle({ connection: {
+ url: process.env.DATABASE_URL,
+ authToken: process.env.DATABASE_AUTH_TOKEN
+}});
+```
+
+4. `@libsql/client/http` module for http and https connection protocols
+
+```ts
+import { drizzle } from 'drizzle-orm/libsql/http';
+
+const db = drizzle({ connection: {
+ url: process.env.DATABASE_URL,
+ authToken: process.env.DATABASE_AUTH_TOKEN
+}});
+```
+
+5. `@libsql/client/ws` module for ws and wss connection protocols
+
+```ts
+import { drizzle } from 'drizzle-orm/libsql/ws';
+
+const db = drizzle({ connection: {
+ url: process.env.DATABASE_URL,
+ authToken: process.env.DATABASE_AUTH_TOKEN
+}});
+```
+
+6. `@libsql/client/sqlite3` module for :memory: and file connection protocols
+
+```ts
+import { drizzle } from 'drizzle-orm/libsql/wasm';
+
+const db = drizzle({ connection: {
+ url: process.env.DATABASE_URL,
+ authToken: process.env.DATABASE_AUTH_TOKEN
+}});
+```
+
+7. `@libsql/client-wasm` Separate experimental package for WASM
+
+```ts
+import { drizzle } from 'drizzle-orm/libsql';
+
+const db = drizzle({ connection: {
+ url: process.env.DATABASE_URL,
+ authToken: process.env.DATABASE_AUTH_TOKEN
+}});
+```
diff --git a/changelogs/drizzle-orm/0.36.0.md b/changelogs/drizzle-orm/0.36.0.md
new file mode 100644
index 000000000..0f01b6e91
--- /dev/null
+++ b/changelogs/drizzle-orm/0.36.0.md
@@ -0,0 +1,419 @@
+> This version of `drizzle-orm` requires `drizzle-kit@0.27.0` to enable all new features
+
+# New Features
+
+## Row-Level Security (RLS)
+
+With Drizzle, you can enable Row-Level Security (RLS) for any Postgres table, create policies with various options, and define and manage the roles those policies apply to.
+
+Drizzle supports a raw representation of Postgres policies and roles that can be used in any way you want. This works with popular Postgres database providers such as `Neon` and `Supabase`.
+
+In Drizzle, we have specific predefined RLS roles and functions for RLS with both database providers, but you can also define your own logic.
+
+### Enable RLS
+
+If you just want to enable RLS on a table without adding policies, you can use `.enableRLS()`
+
+As mentioned in the PostgreSQL documentation:
+
+> If no policy exists for the table, a default-deny policy is used, meaning that no rows are visible or can be modified.
+Operations that apply to the whole table, such as TRUNCATE and REFERENCES, are not subject to row security.
+
+```ts
+import { integer, pgTable } from 'drizzle-orm/pg-core';
+
+export const users = pgTable('users', {
+ id: integer(),
+}).enableRLS();
+```
+
+> If you add a policy to a table, RLS will be enabled automatically. So, there’s no need to explicitly enable RLS when adding policies to a table.
+
+### Roles
+
+Currently, Drizzle supports defining roles with a few different options, as shown below. Support for more options will be added in a future release.
+
+```ts
+import { pgRole } from 'drizzle-orm/pg-core';
+
+export const admin = pgRole('admin', { createRole: true, createDb: true, inherit: true });
+```
+
+If a role already exists in your database, and you don’t want drizzle-kit to ‘see’ it or include it in migrations, you can mark the role as existing.
+
+```ts
+import { pgRole } from 'drizzle-orm/pg-core';
+
+export const admin = pgRole('admin').existing();
+```
+
+### Policies
+
+To fully leverage RLS, you can define policies within a Drizzle table.
+
+> In PostgreSQL, policies should be linked to an existing table. Since policies are always associated with a specific table, we decided that policy definitions should be defined as a parameter of `pgTable`
+
+**Example of pgPolicy with all available properties**
+```ts
+import { sql } from 'drizzle-orm';
+import { integer, pgPolicy, pgRole, pgTable } from 'drizzle-orm/pg-core';
+
+export const admin = pgRole('admin');
+
+export const users = pgTable('users', {
+ id: integer(),
+}, (t) => [
+ pgPolicy('policy', {
+ as: 'permissive',
+ to: admin,
+ for: 'delete',
+ using: sql``,
+ withCheck: sql``,
+ }),
+]);
+```
+
+**Link Policy to an existing table**
+
+There are situations where you need to link a policy to an existing table in your database.
+The most common use case is with database providers like `Neon` or `Supabase`, where you need to add a policy
+to their existing tables. In this case, you can use the `.link()` API
+
+```ts
+import { sql } from "drizzle-orm";
+import { pgPolicy } from "drizzle-orm/pg-core";
+import { authenticatedRole, realtimeMessages } from "drizzle-orm/supabase";
+
+export const policy = pgPolicy("authenticated role insert policy", {
+ for: "insert",
+ to: authenticatedRole,
+ using: sql``,
+}).link(realtimeMessages);
+```
+
+### Migrations
+
+If you are using drizzle-kit to manage your schema and roles, there may be situations where you want to refer to roles that are not defined in your Drizzle schema. In such cases, you may want drizzle-kit to skip managing these roles without having to define each role in your drizzle schema and marking it with `.existing()`.
+
+In these cases, you can use `entities.roles` in `drizzle.config.ts`. For a complete reference, refer to the the [`drizzle.config.ts`](https://orm.drizzle.team/docs/drizzle-config-file) documentation.
+
+By default, `drizzle-kit` does not manage roles for you, so you will need to enable this feature in `drizzle.config.ts`.
+
+```ts {12-14}
+// drizzle.config.ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ dialect: 'postgresql',
+ schema: "./drizzle/schema.ts",
+ dbCredentials: {
+ url: process.env.DATABASE_URL!
+ },
+ verbose: true,
+ strict: true,
+ entities: {
+ roles: true
+ }
+});
+```
+
+In case you need additional configuration options, let's take a look at a few more examples.
+
+**You have an `admin` role and want to exclude it from the list of manageable roles**
+
+```ts
+// drizzle.config.ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ ...
+ entities: {
+ roles: {
+ exclude: ['admin']
+ }
+ }
+});
+```
+
+**You have an `admin` role and want to include it in the list of manageable roles**
+
+```ts
+// drizzle.config.ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ ...
+ entities: {
+ roles: {
+ include: ['admin']
+ }
+ }
+});
+```
+
+**If you are using `Neon` and want to exclude Neon-defined roles, you can use the provider option**
+
+```ts
+// drizzle.config.ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ ...
+ entities: {
+ roles: {
+ provider: 'neon'
+ }
+ }
+});
+```
+
+**If you are using `Supabase` and want to exclude Supabase-defined roles, you can use the provider option**
+
+```ts
+// drizzle.config.ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ ...
+ entities: {
+ roles: {
+ provider: 'supabase'
+ }
+ }
+});
+```
+
+> You may encounter situations where Drizzle is slightly outdated compared to new roles specified by your database provider.
+In such cases, you can use the `provider` option and `exclude` additional roles:
+
+```ts
+// drizzle.config.ts
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ ...
+ entities: {
+ roles: {
+ provider: 'supabase',
+ exclude: ['new_supabase_role']
+ }
+ }
+});
+```
+
+### RLS on views
+
+With Drizzle, you can also specify RLS policies on views. For this, you need to use `security_invoker` in the view's WITH options. Here is a small example:
+
+```ts {5}
+...
+
+export const roomsUsersProfiles = pgView("rooms_users_profiles")
+ .with({
+ securityInvoker: true,
+ })
+ .as((qb) =>
+ qb
+ .select({
+ ...getTableColumns(roomsUsers),
+ email: profiles.email,
+ })
+ .from(roomsUsers)
+ .innerJoin(profiles, eq(roomsUsers.userId, profiles.id))
+ );
+```
+
+### Using with Neon
+
+The Neon Team helped us implement their vision of a wrapper on top of our raw policies API. We defined a specific
+`/neon` import with the `crudPolicy` function that includes predefined functions and Neon's default roles.
+
+Here's an example of how to use the `crudPolicy` function:
+
+```ts
+import { crudPolicy } from 'drizzle-orm/neon';
+import { integer, pgRole, pgTable } from 'drizzle-orm/pg-core';
+
+export const admin = pgRole('admin');
+
+export const users = pgTable('users', {
+ id: integer(),
+}, (t) => [
+ crudPolicy({ role: admin, read: true, modify: false }),
+]);
+```
+
+This policy is equivalent to:
+
+```ts
+import { sql } from 'drizzle-orm';
+import { integer, pgPolicy, pgRole, pgTable } from 'drizzle-orm/pg-core';
+
+export const admin = pgRole('admin');
+
+export const users = pgTable('users', {
+ id: integer(),
+}, (t) => [
+ pgPolicy(`crud-${admin.name}-policy-insert`, {
+ for: 'insert',
+ to: admin,
+ withCheck: sql`false`,
+ }),
+ pgPolicy(`crud-${admin.name}-policy-update`, {
+ for: 'update',
+ to: admin,
+ using: sql`false`,
+ withCheck: sql`false`,
+ }),
+ pgPolicy(`crud-${admin.name}-policy-delete`, {
+ for: 'delete',
+ to: admin,
+ using: sql`false`,
+ }),
+ pgPolicy(`crud-${admin.name}-policy-select`, {
+ for: 'select',
+ to: admin,
+ using: sql`true`,
+ }),
+]);
+```
+
+`Neon` exposes predefined `authenticated` and `anaonymous` roles and related functions. If you are using `Neon` for RLS, you can use these roles, which are marked as existing, and the related functions in your RLS queries.
+
+```ts
+// drizzle-orm/neon
+export const authenticatedRole = pgRole('authenticated').existing();
+export const anonymousRole = pgRole('anonymous').existing();
+
+export const authUid = (userIdColumn: AnyPgColumn) => sql`(select auth.user_id() = ${userIdColumn})`;
+```
+
+For example, you can use the `Neon` predefined roles and functions like this:
+
+
+```ts
+import { sql } from 'drizzle-orm';
+import { authenticatedRole } from 'drizzle-orm/neon';
+import { integer, pgPolicy, pgRole, pgTable } from 'drizzle-orm/pg-core';
+
+export const admin = pgRole('admin');
+
+export const users = pgTable('users', {
+ id: integer(),
+}, (t) => [
+ pgPolicy(`policy-insert`, {
+ for: 'insert',
+ to: authenticatedRole,
+ withCheck: sql`false`,
+ }),
+]);
+```
+
+### Using with Supabase
+
+We also have a `/supabase` import with a set of predefined roles marked as existing, which you can use in your schema.
+This import will be extended in a future release with more functions and helpers to make using RLS and `Supabase` simpler.
+
+```ts
+// drizzle-orm/supabase
+export const anonRole = pgRole('anon').existing();
+export const authenticatedRole = pgRole('authenticated').existing();
+export const serviceRole = pgRole('service_role').existing();
+export const postgresRole = pgRole('postgres_role').existing();
+export const supabaseAuthAdminRole = pgRole('supabase_auth_admin').existing();
+```
+
+For example, you can use the `Supabase` predefined roles like this:
+
+```ts
+import { sql } from 'drizzle-orm';
+import { serviceRole } from 'drizzle-orm/supabase';
+import { integer, pgPolicy, pgRole, pgTable } from 'drizzle-orm/pg-core';
+
+export const admin = pgRole('admin');
+
+export const users = pgTable('users', {
+ id: integer(),
+}, (t) => [
+ pgPolicy(`policy-insert`, {
+ for: 'insert',
+ to: serviceRole,
+ withCheck: sql`false`,
+ }),
+]);
+```
+
+The `/supabase` import also includes predefined tables and functions that you can use in your application
+
+```ts
+// drizzle-orm/supabase
+
+const auth = pgSchema('auth');
+export const authUsers = auth.table('users', {
+ id: uuid().primaryKey().notNull(),
+});
+
+const realtime = pgSchema('realtime');
+export const realtimeMessages = realtime.table(
+ 'messages',
+ {
+ id: bigserial({ mode: 'bigint' }).primaryKey(),
+ topic: text().notNull(),
+ extension: text({
+ enum: ['presence', 'broadcast', 'postgres_changes'],
+ }).notNull(),
+ },
+);
+
+export const authUid = sql`(select auth.uid())`;
+export const realtimeTopic = sql`realtime.topic()`;
+```
+
+This allows you to use it in your code, and Drizzle Kit will treat them as existing databases,
+using them only as information to connect to other entities
+
+```ts
+import { foreignKey, pgPolicy, pgTable, text, uuid } from "drizzle-orm/pg-core";
+import { sql } from "drizzle-orm/sql";
+import { authenticatedRole, authUsers } from "drizzle-orm/supabase";
+
+export const profiles = pgTable(
+ "profiles",
+ {
+ id: uuid().primaryKey().notNull(),
+ email: text().notNull(),
+ },
+ (table) => [
+ foreignKey({
+ columns: [table.id],
+ // reference to the auth table from Supabase
+ foreignColumns: [authUsers.id],
+ name: "profiles_id_fk",
+ }).onDelete("cascade"),
+ pgPolicy("authenticated can view all profiles", {
+ for: "select",
+ // using predefined role from Supabase
+ to: authenticatedRole,
+ using: sql`true`,
+ }),
+ ]
+);
+```
+
+Let's check an example of adding a policy to a table that exists in `Supabase`
+
+```ts
+import { sql } from "drizzle-orm";
+import { pgPolicy } from "drizzle-orm/pg-core";
+import { authenticatedRole, realtimeMessages } from "drizzle-orm/supabase";
+
+export const policy = pgPolicy("authenticated role insert policy", {
+ for: "insert",
+ to: authenticatedRole,
+ using: sql``,
+}).link(realtimeMessages);
+```
+
+# Bug fixes
+
+- [[BUG]: postgres-js driver throws error when using new { client } constructor arguments ](https://github.com/drizzle-team/drizzle-orm/issues/3176)
\ No newline at end of file
diff --git a/changelogs/drizzle-orm/0.36.1.md b/changelogs/drizzle-orm/0.36.1.md
new file mode 100644
index 000000000..74d256a13
--- /dev/null
+++ b/changelogs/drizzle-orm/0.36.1.md
@@ -0,0 +1,6 @@
+# Bug Fixes
+
+- [[BUG]: Using sql.placeholder with limit and/or offset for a prepared statement produces TS error](https://github.com/drizzle-team/drizzle-orm/issues/2146) - thanks @L-Mario564
+- [[BUG] If a query I am trying to modify with a dynamic query (....$dynamic()) contains any placeholders, I'm getting an error that says No value for placeholder.... provided](https://github.com/drizzle-team/drizzle-orm/issues/2272) - thanks @L-Mario564
+- [[BUG]: Error thrown when trying to insert an array of new rows using generatedAlwaysAsIdentity() for the id column](https://github.com/drizzle-team/drizzle-orm/issues/2849) - thanks @L-Mario564
+- [[BUG]: Unable to Use BigInt Types with Bun and Drizzle](https://github.com/drizzle-team/drizzle-orm/issues/2603) - thanks @L-Mario564
diff --git a/changelogs/drizzle-orm/0.36.2.md b/changelogs/drizzle-orm/0.36.2.md
new file mode 100644
index 000000000..3790e0944
--- /dev/null
+++ b/changelogs/drizzle-orm/0.36.2.md
@@ -0,0 +1,15 @@
+# New Features
+
+- [Support more types in like, notLike, ilike and notIlike expressions](https://github.com/drizzle-team/drizzle-orm/pull/2805)
+
+
+# Bug and typo fixes
+
+- Fixed typos in repository: thanks @armandsalle, @masto, @wackbyte, @Asher-JH, @MaxLeiter
+
+- [Fixed .generated behavior with non-strict tsconfig](https://github.com/drizzle-team/drizzle-orm/pull/3542)
+- [Fix Drizzle ORM for expo-sqlite](https://github.com/drizzle-team/drizzle-orm/pull/3197)
+- [Fixed lack of schema name on columns in sql](https://github.com/drizzle-team/drizzle-orm/pull/3531)
+- [fix: Adjust neon http driver entity kind](https://github.com/drizzle-team/drizzle-orm/pull/3424)
+- [Export PgIntegerBuilderInitial type](https://github.com/drizzle-team/drizzle-orm/pull/2846)
+- [[MySQL] Correct $returningId() implementation to correctly store selected fields](https://github.com/drizzle-team/drizzle-orm/pull/2975)
\ No newline at end of file
diff --git a/changelogs/drizzle-orm/0.36.3.md b/changelogs/drizzle-orm/0.36.3.md
new file mode 100644
index 000000000..4602f348e
--- /dev/null
+++ b/changelogs/drizzle-orm/0.36.3.md
@@ -0,0 +1,154 @@
+# New Features
+
+## Support for `UPDATE ... FROM` in PostgreSQL and SQLite
+
+As the SQLite documentation mentions:
+
+> [!NOTE]
+> The UPDATE-FROM idea is an extension to SQL that allows an UPDATE statement to be driven by other tables in the database.
+The "target" table is the specific table that is being updated. With UPDATE-FROM you can join the target table
+against other tables in the database in order to help compute which rows need updating and what
+the new values should be on those rows
+
+Similarly, the PostgreSQL documentation states:
+
+> [!NOTE]
+> A table expression allowing columns from other tables to appear in the WHERE condition and update expressions
+
+Drizzle also supports this feature starting from this version
+
+For example, current query:
+
+```ts
+await db
+ .update(users)
+ .set({ cityId: cities.id })
+ .from(cities)
+ .where(and(eq(cities.name, 'Seattle'), eq(users.name, 'John')))
+```
+
+Will generate this sql
+
+```sql
+update "users" set "city_id" = "cities"."id"
+from "cities"
+where ("cities"."name" = $1 and "users"."name" = $2)
+
+-- params: [ 'Seattle', 'John' ]
+```
+
+You can also alias tables that are joined (in PG, you can also alias the updating table too).
+
+```ts
+const c = alias(cities, 'c');
+await db
+ .update(users)
+ .set({ cityId: c.id })
+ .from(c);
+```
+
+Will generate this sql
+
+```sql
+update "users" set "city_id" = "c"."id"
+from "cities" "c"
+```
+
+In PostgreSQL, you can also return columns from the joined tables.
+
+```ts
+const updatedUsers = await db
+ .update(users)
+ .set({ cityId: cities.id })
+ .from(cities)
+ .returning({ id: users.id, cityName: cities.name });
+```
+
+Will generate this sql
+
+```sql
+update "users" set "city_id" = "cities"."id"
+from "cities"
+returning "users"."id", "cities"."name"
+```
+
+## Support for `INSERT INTO ... SELECT` in all dialects
+
+As the SQLite documentation mentions:
+
+> [!NOTE]
+> The second form of the INSERT statement contains a SELECT statement instead of a VALUES clause.
+A new entry is inserted into the table for each row of data returned by executing the SELECT statement.
+If a column-list is specified, the number of columns in the result of the SELECT must be the same as
+the number of items in the column-list. Otherwise, if no column-list is specified, the number of
+columns in the result of the SELECT must be the same as the number of columns in the table.
+Any SELECT statement, including compound SELECTs and SELECT statements with ORDER BY and/or LIMIT clauses,
+may be used in an INSERT statement of this form.
+
+> [!CAUTION]
+> To avoid a parsing ambiguity, the SELECT statement should always contain a WHERE clause, even if that clause is simply "WHERE true", if the upsert-clause is present. Without the WHERE clause, the parser does not know if the token "ON" is part of a join constraint on the SELECT, or the beginning of the upsert-clause.
+
+As the PostgreSQL documentation mentions:
+> [!NOTE]
+> A query (SELECT statement) that supplies the rows to be inserted
+
+And as the MySQL documentation mentions:
+
+> [!NOTE]
+> With INSERT ... SELECT, you can quickly insert many rows into a table from the result of a SELECT statement, which can select from one or many tables
+
+Drizzle supports the current syntax for all dialects, and all of them share the same syntax. Let's review some common scenarios and API usage.
+There are several ways to use select inside insert statements, allowing you to choose your preferred approach:
+
+- You can pass a query builder inside the select function.
+- You can use a query builder inside a callback.
+- You can pass an SQL template tag with any custom select query you want to use
+
+**Query Builder**
+
+```ts
+const insertedEmployees = await db
+ .insert(employees)
+ .select(
+ db.select({ name: users.name }).from(users).where(eq(users.role, 'employee'))
+ )
+ .returning({
+ id: employees.id,
+ name: employees.name
+ });
+```
+
+```ts
+const qb = new QueryBuilder();
+await db.insert(employees).select(
+ qb.select({ name: users.name }).from(users).where(eq(users.role, 'employee'))
+);
+```
+
+**Callback**
+
+```ts
+await db.insert(employees).select(
+ () => db.select({ name: users.name }).from(users).where(eq(users.role, 'employee'))
+);
+```
+
+```ts
+await db.insert(employees).select(
+ (qb) => qb.select({ name: users.name }).from(users).where(eq(users.role, 'employee'))
+);
+```
+
+**SQL template tag**
+
+```ts
+await db.insert(employees).select(
+ sql`select "users"."name" as "name" from "users" where "users"."role" = 'employee'`
+);
+```
+
+```ts
+await db.insert(employees).select(
+ () => sql`select "users"."name" as "name" from "users" where "users"."role" = 'employee'`
+);
+```
diff --git a/changelogs/drizzle-orm/0.36.4.md b/changelogs/drizzle-orm/0.36.4.md
new file mode 100644
index 000000000..056c5a01e
--- /dev/null
+++ b/changelogs/drizzle-orm/0.36.4.md
@@ -0,0 +1,84 @@
+# New Package: `drizzle-seed`
+
+> [!NOTE]
+> `drizzle-seed` can only be used with `drizzle-orm@0.36.4` or higher. Versions lower than this may work at runtime but could have type issues and identity column issues, as this patch was introduced in `drizzle-orm@0.36.4`
+
+## Full Reference
+
+The full API reference and package overview can be found in our [official documentation](https://orm.drizzle.team/docs/seed-overview)
+
+## Basic Usage
+
+In this example we will create 10 users with random names and ids
+
+```ts {12}
+import { pgTable, integer, text } from "drizzle-orm/pg-core";
+import { drizzle } from "drizzle-orm/node-postgres";
+import { seed } from "drizzle-seed";
+
+const users = pgTable("users", {
+ id: integer().primaryKey(),
+ name: text().notNull(),
+});
+
+async function main() {
+ const db = drizzle(process.env.DATABASE_URL!);
+ await seed(db, { users });
+}
+
+main();
+```
+
+## Options
+
+**`count`**
+
+By default, the `seed` function will create 10 entities.
+However, if you need more for your tests, you can specify this in the seed options object
+
+```ts
+await seed(db, schema, { count: 1000 });
+```
+
+**`seed`**
+
+If you need a seed to generate a different set of values for all subsequent runs, you can define a different number
+in the `seed` option. Any new number will generate a unique set of values
+
+```ts
+await seed(db, schema, { seed: 12345 });
+```
+
+The full API reference and package overview can be found in our [official documentation](https://orm.drizzle.team/docs/seed-overview)
+
+# Features
+
+## Added `OVERRIDING SYSTEM VALUE` api to db.insert()
+
+If you want to force you own values for `GENERATED ALWAYS AS IDENTITY` columns, you can use `OVERRIDING SYSTEM VALUE`
+
+As PostgreSQL docs mentions
+> In an INSERT command, if ALWAYS is selected, a user-specified value is only accepted if the INSERT statement specifies OVERRIDING SYSTEM VALUE. If BY DEFAULT is selected, then the user-specified value takes precedence
+
+```ts
+await db.insert(identityColumnsTable).overridingSystemValue().values([
+ { alwaysAsIdentity: 2 },
+]);
+```
+
+## Added `.$withAuth()` API for Neon HTTP driver
+
+Using this API, Drizzle will send you an auth token to authorize your query. It can be used with any query available in Drizzle by simply adding `.$withAuth()` before it. This token will be used for a specific query
+
+Examples
+
+```ts
+const token = 'HdncFj1Nm'
+
+await db.$withAuth(token).select().from(usersTable);
+await db.$withAuth(token).update(usersTable).set({ name: 'CHANGED' }).where(eq(usersTable.name, 'TARGET'))
+```
+
+# Bug Fixes
+
+- [[BUG]: TypeScript error Please install '@neondatabase/serverless' to allow Drizzle ORM to connect to the database](https://github.com/drizzle-team/drizzle-orm/issues/3521)
diff --git a/changelogs/drizzle-orm/0.37.0.md b/changelogs/drizzle-orm/0.37.0.md
new file mode 100644
index 000000000..f54fa4a27
--- /dev/null
+++ b/changelogs/drizzle-orm/0.37.0.md
@@ -0,0 +1,98 @@
+# New Dialects
+
+### 🎉 `SingleStore` dialect is now available in Drizzle
+
+Thanks to the SingleStore team for creating a PR with all the necessary changes to support the MySQL-compatible part of SingleStore. You can already start using it with Drizzle. The SingleStore team will also help us iterate through updates and make more SingleStore-specific features available in Drizzle
+
+```ts
+import { int, singlestoreTable, varchar } from 'drizzle-orm/singlestore-core';
+import { drizzle } from 'drizzle-orm/singlestore';
+
+export const usersTable = singlestoreTable('users_table', {
+ id: int().primaryKey(),
+ name: varchar({ length: 255 }).notNull(),
+ age: int().notNull(),
+ email: varchar({ length: 255 }).notNull().unique(),
+});
+
+...
+
+const db = drizzle(process.env.DATABASE_URL!);
+
+db.select()...
+```
+
+You can check out our [Getting started guides](https://orm.drizzle.team/docs/get-started/singlestore-new) to try SingleStore!
+
+# New Drivers
+
+### 🎉 `SQLite Durable Objects` driver is now available in Drizzle
+
+You can now query SQLite Durable Objects in Drizzle!
+
+For the full example, please check our [Get Started](https://orm.drizzle.team/docs/get-started/do-new) Section
+
+```ts
+///
+import { drizzle, DrizzleSqliteDODatabase } from 'drizzle-orm/durable-sqlite';
+import { DurableObject } from 'cloudflare:workers'
+import { migrate } from 'drizzle-orm/durable-sqlite/migrator';
+import migrations from '../drizzle/migrations';
+import { usersTable } from './db/schema';
+
+export class MyDurableObject1 extends DurableObject {
+ storage: DurableObjectStorage;
+ db: DrizzleSqliteDODatabase;
+
+ constructor(ctx: DurableObjectState, env: Env) {
+ super(ctx, env);
+ this.storage = ctx.storage;
+ this.db = drizzle(this.storage, { logger: false });
+ }
+
+ async migrate() {
+ migrate(this.db, migrations);
+ }
+
+ async insert(user: typeof usersTable.$inferInsert) {
+ await this.db.insert(usersTable).values(user);
+ }
+
+ async select() {
+ return this.db.select().from(usersTable);
+ }
+}
+
+export default {
+ /**
+ * This is the standard fetch handler for a Cloudflare Worker
+ *
+ * @param request - The request submitted to the Worker from the client
+ * @param env - The interface to reference bindings declared in wrangler.toml
+ * @param ctx - The execution context of the Worker
+ * @returns The response to be sent back to the client
+ */
+ async fetch(request: Request, env: Env): Promise {
+ const id: DurableObjectId = env.MY_DURABLE_OBJECT1.idFromName('durable-object');
+ const stub = env.MY_DURABLE_OBJECT1.get(id);
+ await stub.migrate();
+
+ await stub.insert({
+ name: 'John',
+ age: 30,
+ email: 'john@example.com',
+ })
+ console.log('New user created!')
+
+ const users = await stub.select();
+ console.log('Getting all users from the database: ', users)
+
+ return new Response();
+ }
+}
+```
+
+# Bug fixes
+
+- [[BUG]: $with is undefined on withReplicas](https://github.com/drizzle-team/drizzle-orm/issues/1834)
+- [[BUG]: Neon serverless driver accepts authToken as a promise, but the $withAuth does not](https://github.com/drizzle-team/drizzle-orm/issues/3597)
\ No newline at end of file
diff --git a/changelogs/drizzle-orm/0.38.0.md b/changelogs/drizzle-orm/0.38.0.md
new file mode 100644
index 000000000..863fe5182
--- /dev/null
+++ b/changelogs/drizzle-orm/0.38.0.md
@@ -0,0 +1,75 @@
+# Types breaking changes
+
+A few internal types were changed and extra generic types for length of column types were added in this release. It won't affect anyone, unless you are using those internal types for some custom wrappers, logic, etc. Here is a list of all types that were changed, so if you are relying on those, please review them before upgrading
+
+- `MySqlCharBuilderInitial`
+- `MySqlVarCharBuilderInitial`
+- `PgCharBuilderInitial`
+- `PgArrayBuilder`
+- `PgArray`
+- `PgVarcharBuilderInitial`
+- `PgBinaryVectorBuilderInitial`
+- `PgBinaryVectorBuilder`
+- `PgBinaryVector`
+- `PgHalfVectorBuilderInitial`
+- `PgHalfVectorBuilder`
+- `PgHalfVector`
+- `PgVectorBuilderInitial`
+- `PgVectorBuilder`
+- `PgVector`
+- `SQLiteTextBuilderInitial`
+
+# New Features
+
+- Added new function `getViewSelectedFields`
+- Added `$inferSelect` function to views
+- Added `InferSelectViewModel` type for views
+- Added `isView` function
+
+# Validator packages updates
+
+- `drizzle-zod` has been completely rewritten. You can find detailed information about it [here](https://github.com/drizzle-team/drizzle-orm/blob/main/changelogs/drizzle-zod/0.6.0.md)
+- `drizzle-valibot` has been completely rewritten. You can find detailed information about it [here](https://github.com/drizzle-team/drizzle-orm/blob/main/changelogs/drizzle-valibot/0.3.0.md)
+- `drizzle-typebox` has been completely rewritten. You can find detailed information about it [here](https://github.com/drizzle-team/drizzle-orm/blob/main/changelogs/drizzle-typebox/0.2.0.md)
+
+Thanks to @L-Mario564 for making more updates than we expected to be shipped in this release. We'll copy his message from a PR regarding improvements made in this release:
+
+- Output for all packages are now unminified, makes exploring the compiled code easier when published to npm.
+- Smaller footprint. Previously, we imported the column types at runtime for each dialect, meaning that for example, if you're just using Postgres then you'd likely only have drizzle-orm and drizzle-orm/pg-core in the build output of your app; however, these packages imported all dialects which could lead to mysql-core and sqlite-core being bundled as well even if they're unused in your app. This is now fixed.
+- Slight performance gain. To determine the column data type we used the is function which performs a few checks to ensure the column data type matches. This was slow, as these checks would pile up every quickly when comparing all data types for many fields in a table/view. The easier and faster alternative is to simply go off of the column's columnType property.
+- Some changes had to be made at the type level in the ORM package for better compatibility with drizzle-valibot.
+
+And a set of new features
+
+- `createSelectSchema` function now also accepts views and enums.
+- New function: `createUpdateSchema`, for use in updating queries.
+- New function: `createSchemaFactory`, to provide more advanced options and to avoid bloating the parameters of the other schema functions
+
+# Bug fixes
+
+- [[FEATURE]: publish packages un-minified](https://github.com/drizzle-team/drizzle-orm/issues/2247)
+- [Don't allow unknown keys in drizzle-zod refinement](https://github.com/drizzle-team/drizzle-orm/issues/573)
+- [[BUG]:drizzle-zod not working with pgSchema](https://github.com/drizzle-team/drizzle-orm/issues/1458)
+- [Add createUpdateSchema to drizzle-zod](https://github.com/drizzle-team/drizzle-orm/issues/503)
+- [[BUG]:drizzle-zod produces wrong type](https://github.com/drizzle-team/drizzle-orm/issues/1110)
+- [[BUG]:Drizzle-zod:Boolean and Serial types from Schema are defined as enum when using CreateInsertSchema and CreateSelectSchema](https://github.com/drizzle-team/drizzle-orm/issues/1327)
+- [[BUG]: Drizzle typebox enum array wrong schema and type](https://github.com/drizzle-team/drizzle-orm/issues/1345)
+- [[BUG]:drizzle-zod not working with pgSchema](https://github.com/drizzle-team/drizzle-orm/issues/1458)
+- [[BUG]: drizzle-zod not parsing arrays correctly](https://github.com/drizzle-team/drizzle-orm/issues/1609)
+- [[BUG]: Drizzle typebox not supporting array](https://github.com/drizzle-team/drizzle-orm/issues/1810)
+- [[FEATURE]: Export factory functions from drizzle-zod to allow usage with extended Zod classes](https://github.com/drizzle-team/drizzle-orm/issues/2245)
+- [[FEATURE]: Add support for new pipe syntax for drizzle-valibot](https://github.com/drizzle-team/drizzle-orm/issues/2358)
+- [[BUG]: drizzle-zod's createInsertSchema() can't handle column of type vector](https://github.com/drizzle-team/drizzle-orm/issues/2424)
+- [[BUG]: drizzle-typebox fails to map geometry column to type-box schema](https://github.com/drizzle-team/drizzle-orm/issues/2516)
+- [[BUG]: drizzle-valibot does not provide types for returned schemas](https://github.com/drizzle-team/drizzle-orm/issues/2521)
+- [[BUG]: Drizzle-typebox types SQLite real field to string](https://github.com/drizzle-team/drizzle-orm/issues/2524)
+- [[BUG]: drizzle-zod: documented usage generates type error with exactOptionalPropertyTypes](https://github.com/drizzle-team/drizzle-orm/issues/2550)
+- [[BUG]: drizzle-zod does not respect/count db type range](https://github.com/drizzle-team/drizzle-orm/issues/2737)
+- [[BUG]: drizzle-zod not overriding optional](https://github.com/drizzle-team/drizzle-orm/issues/2755)
+- [[BUG]:drizzle-zod doesn't accept custom id value](https://github.com/drizzle-team/drizzle-orm/issues/2957)
+- [[FEATURE]: Support for Database Views in Drizzle Zod](https://github.com/drizzle-team/drizzle-orm/issues/3398)
+- [[BUG]: drizzle-valibot return type any](https://github.com/drizzle-team/drizzle-orm/issues/3621)
+- [[BUG]: drizzle-zod Type generation results in undefined types](https://github.com/drizzle-team/drizzle-orm/issues/3645)
+- [[BUG]: GeneratedAlwaysAs](https://github.com/drizzle-team/drizzle-orm/issues/3511)
+- [[FEATURE]: $inferSelect on a view](https://github.com/drizzle-team/drizzle-orm/issues/2610)
+- [[BUG]:Can't infer props from view in schema](https://github.com/drizzle-team/drizzle-orm/issues/3392)
diff --git a/changelogs/drizzle-orm/0.38.1.md b/changelogs/drizzle-orm/0.38.1.md
new file mode 100644
index 000000000..1ee83b233
--- /dev/null
+++ b/changelogs/drizzle-orm/0.38.1.md
@@ -0,0 +1 @@
+- Closed [[FEATURE]: Add more flexible typing for usage with exactOptionalPropertyTypes](https://github.com/drizzle-team/drizzle-orm/issues/2742)
\ No newline at end of file
diff --git a/changelogs/drizzle-orm/0.38.2.md b/changelogs/drizzle-orm/0.38.2.md
new file mode 100644
index 000000000..50fb31429
--- /dev/null
+++ b/changelogs/drizzle-orm/0.38.2.md
@@ -0,0 +1,58 @@
+# New features
+
+## `USE INDEX`, `FORCE INDEX` and `IGNORE INDEX` for MySQL
+
+In MySQL, the statements USE INDEX, FORCE INDEX, and IGNORE INDEX are hints used in SQL queries to influence how the query optimizer selects indexes. These hints provide fine-grained control over index usage, helping optimize performance when the default behavior of the optimizer is not ideal.
+
+### Use Index
+
+The `USE INDEX` hint suggests to the optimizer which indexes to consider when processing the query. The optimizer is not forced to use these indexes but will prioritize them if they are suitable.
+
+```ts
+export const users = mysqlTable('users', {
+ id: int('id').primaryKey(),
+ name: varchar('name', { length: 100 }).notNull(),
+}, () => [usersTableNameIndex]);
+
+const usersTableNameIndex = index('users_name_index').on(users.name);
+
+await db.select()
+ .from(users, { useIndex: usersTableNameIndex })
+ .where(eq(users.name, 'David'));
+```
+
+### Ignore Index
+
+The `IGNORE INDEX` hint tells the optimizer to avoid using specific indexes for the query. MySQL will consider all other indexes (if any) or perform a full table scan if necessary.
+
+```ts
+export const users = mysqlTable('users', {
+ id: int('id').primaryKey(),
+ name: varchar('name', { length: 100 }).notNull(),
+}, () => [usersTableNameIndex]);
+
+const usersTableNameIndex = index('users_name_index').on(users.name);
+
+await db.select()
+ .from(users, { ignoreIndex: usersTableNameIndex })
+ .where(eq(users.name, 'David'));
+```
+
+### Force Index
+
+The `FORCE INDEX` hint forces the optimizer to use the specified index(es) for the query. If the specified index cannot be used, MySQL will not fall back to other indexes; it might resort to a full table scan instead.
+
+```ts copy
+export const users = mysqlTable('users', {
+ id: int('id').primaryKey(),
+ name: varchar('name', { length: 100 }).notNull(),
+}, () => [usersTableNameIndex]);
+
+const usersTableNameIndex = index('users_name_index').on(users.name);
+
+await db.select()
+ .from(users, { forceIndex: usersTableNameIndex })
+ .where(eq(users.name, 'David'));
+```
+
+You can also combine those hints and use multiple indexes in a query if you need
\ No newline at end of file
diff --git a/changelogs/drizzle-orm/0.38.3.md b/changelogs/drizzle-orm/0.38.3.md
new file mode 100644
index 000000000..3f94386b6
--- /dev/null
+++ b/changelogs/drizzle-orm/0.38.3.md
@@ -0,0 +1 @@
+- Fix incorrect deprecation detection for table declarations
\ No newline at end of file
diff --git a/changelogs/drizzle-orm/0.38.4.md b/changelogs/drizzle-orm/0.38.4.md
new file mode 100644
index 000000000..037d7809d
--- /dev/null
+++ b/changelogs/drizzle-orm/0.38.4.md
@@ -0,0 +1,3 @@
+- New SingleStore type `vector` - thanks @mitchwadair
+- Fix wrong DROP INDEX statement generation, [#3866](https://github.com/drizzle-team/drizzle-orm/pull/3866) - thanks @WaciX
+- Typo fixes - thanks @stephan281094
\ No newline at end of file
diff --git a/changelogs/drizzle-seed/0.1.1.md b/changelogs/drizzle-seed/0.1.1.md
new file mode 100644
index 000000000..34dca67b6
--- /dev/null
+++ b/changelogs/drizzle-seed/0.1.1.md
@@ -0,0 +1,52 @@
+# Initial Release
+
+> [!NOTE]
+> `drizzle-seed` can only be used with `drizzle-orm@0.36.4` or higher. Versions lower than this may work at runtime but could have type issues and identity column issues, as this patch was introduced in `drizzle-orm@0.36.4`
+
+## Full Reference
+
+The full API reference and package overview can be found in our [official documentation](https://orm.drizzle.team/docs/seed-overview)
+
+## Basic Usage
+
+In this example we will create 10 users with random names and ids
+
+```ts {12}
+import { pgTable, integer, text } from "drizzle-orm/pg-core";
+import { drizzle } from "drizzle-orm/node-postgres";
+import { seed } from "drizzle-seed";
+
+const users = pgTable("users", {
+ id: integer().primaryKey(),
+ name: text().notNull(),
+});
+
+async function main() {
+ const db = drizzle(process.env.DATABASE_URL!);
+ await seed(db, { users });
+}
+
+main();
+```
+
+## Options
+
+**`count`**
+
+By default, the `seed` function will create 10 entities.
+However, if you need more for your tests, you can specify this in the seed options object
+
+```ts
+await seed(db, schema, { count: 1000 });
+```
+
+**`seed`**
+
+If you need a seed to generate a different set of values for all subsequent runs, you can define a different number
+in the `seed` option. Any new number will generate a unique set of values
+
+```ts
+await seed(db, schema, { seed: 12345 });
+```
+
+The full API reference and package overview can be found in our [official documentation](https://orm.drizzle.team/docs/seed-overview)
\ No newline at end of file
diff --git a/changelogs/drizzle-seed/0.1.2.md b/changelogs/drizzle-seed/0.1.2.md
new file mode 100644
index 000000000..4df3c89f4
--- /dev/null
+++ b/changelogs/drizzle-seed/0.1.2.md
@@ -0,0 +1,2 @@
+- Fixed: [[BUG]: drizzle-seed reset fails without @electric-sql/pglite installed](https://github.com/drizzle-team/drizzle-orm/issues/3603)
+- Fixed: [[BUG]: TypeScript type error in drizzle-seed with schema passed to drizzle in IDE](https://github.com/drizzle-team/drizzle-orm/issues/3599)
\ No newline at end of file
diff --git a/changelogs/drizzle-seed/0.1.3.md b/changelogs/drizzle-seed/0.1.3.md
new file mode 100644
index 000000000..d7bb7ac72
--- /dev/null
+++ b/changelogs/drizzle-seed/0.1.3.md
@@ -0,0 +1,131 @@
+## Bug fixes
+
+- https://github.com/drizzle-team/drizzle-orm/issues/3644
+- seeding a table with columns that have .default(sql``) will result in an error
+
+## Features
+
+- added support for postgres uuid columns
+
+Example
+
+```ts
+import { pgTable, uuid } from "drizzle-orm/pg-core";
+import { drizzle } from "drizzle-orm/node-postgres";
+import { seed } from "drizzle-seed";
+
+const users = pgTable("users", {
+ uuid: uuid("uuid"),
+});
+
+async function main() {
+ const db = drizzle(process.env.DATABASE_URL!);
+ // You can let it seed automatically
+ // await seed(db, { users });
+
+ // Alternatively, you can manually specify the generator in refine.
+ await seed(db, { users }, { count: 1000 }).refine((funcs) => ({
+ users: {
+ columns: {
+ uuid: funcs.uuid(),
+ },
+ },
+ }));
+}
+
+main();
+```
+
+##
+
+- added support for postgres array columns
+
+Example
+
+```ts
+import { pgTable, integer, text, varchar } from "drizzle-orm/pg-core";
+import { drizzle } from "drizzle-orm/node-postgres";
+import { seed } from "drizzle-seed";
+
+const users = pgTable("users", {
+ id: integer().primaryKey(),
+ name: text().notNull(),
+ phone_numbers: varchar({ length: 256 }).array(),
+});
+```
+
+You can specify the `arraySize` parameter in generator options, like `funcs.phoneNumber({ arraySize: 3 })`, to generate 1D arrays.
+
+```ts
+async function main() {
+ const db = drizzle(process.env.DATABASE_URL!);
+ await seed(db, { users }, { count: 1000 }).refine((funcs) => ({
+ users: {
+ columns: {
+ phone_numbers: funcs.phoneNumber({ arraySize: 3 }),
+ },
+ },
+ }));
+}
+
+main();
+```
+
+Alternatively, you can let it seed automatically, and it will handle arrays of any dimension.
+
+```ts
+async function main() {
+ const db = drizzle(process.env.DATABASE_URL!);
+ await seed(db, { users });
+}
+
+main();
+```
+
+##
+
+- added support for cyclic tables
+
+You can now seed tables with cyclic relations.
+
+```ts
+import type { AnyPgColumn } from "drizzle-orm/pg-core";
+import {
+ foreignKey,
+ integer,
+ pgTable,
+ serial,
+ varchar,
+} from "drizzle-orm/pg-core";
+
+export const modelTable = pgTable(
+ "model",
+ {
+ id: serial().primaryKey(),
+ name: varchar().notNull(),
+ defaultImageId: integer(),
+ },
+ (t) => [
+ foreignKey({
+ columns: [t.defaultImageId],
+ foreignColumns: [modelImageTable.id],
+ }),
+ ]
+);
+
+export const modelImageTable = pgTable("model_image", {
+ id: serial().primaryKey(),
+ url: varchar().notNull(),
+ caption: varchar(),
+ modelId: integer()
+ .notNull()
+ .references((): AnyPgColumn => modelTable.id),
+});
+
+async function main() {
+ const db = drizzle(process.env.DATABASE_URL!);
+ await seed(db, { modelTable, modelImageTable });
+}
+
+main();
+```
diff --git a/changelogs/drizzle-seed/0.2.1.md b/changelogs/drizzle-seed/0.2.1.md
new file mode 100644
index 000000000..0978c7a98
--- /dev/null
+++ b/changelogs/drizzle-seed/0.2.1.md
@@ -0,0 +1,165 @@
+## API updates
+
+We are introducing a new parameter, `version`, to the `seed` function options. This parameter, which controls generator versioning, has been added to make it easier to update deterministic generators in the future. Since values should remain consistent after each regeneration, it is crucial to provide a well-designed API for gradual updates
+
+```ts
+await seed(db, schema, { version: '2' });
+```
+
+#### Example:
+
+> This is not an actual API change; it is just an example of how we will proceed with `drizzle-seed` versioning
+
+For example, `lastName` generator was changed, and new version, `V2`, of this generator became available.
+
+Later, `firstName` generator was changed, making `V3` version of this generator available.
+
+| | `V1` | `V2` | `V3(latest)` |
+| :--------------: | :--------------: | :-------------: | :--------------: |
+| **LastNameGen** | `LastNameGenV1` | `LastNameGenV2` | |
+| **FirstNameGen** | `FirstNameGenV1` | | `FirstNameGenV3` |
+
+
+##### Use the `firstName` generator of version 3 and the `lastName` generator of version 2
+```ts
+await seed(db, schema);
+```
+
+If you are not ready to use latest generator version right away, you can specify max version to use
+
+##### Use the `firstName` generator of version 1 and the `lastName` generator of version 2
+```ts
+await seed(db, schema, { version: '2' });
+```
+
+##### Use the `firstName` generator of version 1 and the `lastName` generator of version 1.
+```ts
+await seed(db, schema, { version: '1' });
+```
+
+Each update with breaking changes for generators will be documented on our docs and in release notes, explaining which version you should use, if you are not ready to upgrade the way generators works
+
+## Breaking changes
+
+### `interval` unique generator was changed and upgraded to v2
+
+```ts
+await seed(db, { table }).refine((f) => ({
+ table: {
+ columns: {
+ // this function usage will output different values with the same `seed` number from previous version
+ column1: f.interval({ isUnique: true }),
+ }
+ }
+}))
+```
+
+**Reason for upgrade**
+An older version of the generator could produce intervals like `1 minute 60 seconds` and `2 minutes 0 seconds`, treating them as distinct intervals.
+However, when the `1 minute 60 seconds` interval is inserted into a PostgreSQL database, it is automatically converted to `2 minutes 0 seconds`. As a result, attempting to insert the `2 minutes 0 seconds` interval into a unique column afterwards will cause an error
+
+**Usage**
+```ts
+await seed(db, schema);
+// or explicit
+await seed(db, schema, { version: '2' });
+```
+
+**Switch to the old version**
+```ts
+await seed(db, schema, { version: '1' });
+```
+
+### `string` generators were changed and upgraded to v2
+
+```ts
+await seed(db, { table }).refine((f) => ({
+ table: {
+ columns: {
+ // this function will output different values with the same `seed` number from previous version
+ column1: f.string(),
+ }
+ }
+}))
+```
+
+**Reason to upgrade**
+
+Ability to generate a unique string based on the length of the text column (e.g., `varchar(20)`)
+
+#### PostgreSQL changes
+
+Default generators for `text`, `varchar`, `char` will output different values with the same `seed` number from previous version.
+
+```ts
+// schema.ts
+import * as p from 'drizzle-orm/pg-core'
+
+export const table = p.pgTable('table', {
+ column1: p.text(),
+ column2: p.varchar(),
+ column3: p.char()
+});
+
+// index.ts
+...
+// this will be affected with new changes
+await seed(db, { table });
+```
+
+**Switch to the old version**
+```ts
+await seed(db, schema, { version: '' });
+```
+
+#### MySQL changes
+
+Default generators for `text`, `char`, `varchar`, `binary`, `varbinary` will output different values with the same `seed` number.
+
+```ts
+// schema.ts
+import * as p from 'drizzle-orm/mysql-core'
+
+export const table = p.mysqlTable('table', {
+ column1: p.text(),
+ column2: p.char(),
+ column3: p.varchar({ length: 256 }),
+ column4: p.binary(),
+ column5: p.varbinary({ length: 256 }),
+});
+
+// index.ts
+...
+// this will be affected with new changes
+await seed(db, {table})
+```
+
+**Switch to the old version**
+```ts
+await seed(db, schema, { version: '1' });
+```
+
+#### SQLite changes
+
+Default generators for `text`, `numeric`, `blob`, `blobbuffer` will output different values with the same `seed` number.
+```ts
+// schema.ts
+import * as p from 'drizzle-orm/sqlite-core'
+
+export const table = p.sqliteTable('table', {
+ column1: p.text(),
+ column2: p.numeric(),
+ column3: p.blob({ mode:'buffer' }),
+ column4: p.blob(),
+});
+
+// index.ts
+...
+// this will be affected with new changes
+await seed(db, { table })
+```
+
+
+## Bug fixes
+- Seeding a table with a foreign key referencing another table, without including the second table in the schema, will cause the seeding process to get stuck
+- [[BUG]: seeding postgresql char column doesn't respect length option](https://github.com/drizzle-team/drizzle-orm/issues/3774)
diff --git a/changelogs/drizzle-seed/0.3.0.md b/changelogs/drizzle-seed/0.3.0.md
new file mode 100644
index 000000000..b2f61882c
--- /dev/null
+++ b/changelogs/drizzle-seed/0.3.0.md
@@ -0,0 +1,40 @@
+# New features
+
+## Drizzle Relations support
+
+The `seed` function can now accept Drizzle Relations objects and treat them as foreign key constraints
+
+
+```ts
+// schema.ts
+import { integer, serial, text, pgTable } from 'drizzle-orm/pg-core';
+import { relations } from 'drizzle-orm';
+export const users = pgTable('users', {
+ id: serial('id').primaryKey(),
+ name: text('name').notNull(),
+});
+export const usersRelations = relations(users, ({ many }) => ({
+ posts: many(posts),
+}));
+export const posts = pgTable('posts', {
+ id: serial('id').primaryKey(),
+ content: text('content').notNull(),
+ authorId: integer('author_id').notNull(),
+});
+export const postsRelations = relations(posts, ({ one }) => ({
+ author: one(users, { fields: [posts.authorId], references: [users.id] }),
+}));
+```
+
+```ts
+// index.ts
+import { seed } from "drizzle-seed";
+import * as schema from './schema.ts'
+
+async function main() {
+ const db = drizzle(process.env.DATABASE_URL!);
+ await seed(db, schema);
+}
+
+main();
+```
\ No newline at end of file
diff --git a/changelogs/drizzle-typebox/0.2.0.md b/changelogs/drizzle-typebox/0.2.0.md
new file mode 100644
index 000000000..aad630f7a
--- /dev/null
+++ b/changelogs/drizzle-typebox/0.2.0.md
@@ -0,0 +1,87 @@
+This version fully updates `drizzle-typebox` integration and makes sure it's compatible with newer typebox versions
+
+# Breaking Changes
+
+> You must also have Drizzle ORM v0.38.0 or greater and Typebox v0.34.8 or greater installed.
+
+- When refining a field, if a schema is provided instead of a callback function, it will ignore the field's nullability and optional status.
+- Some data types have more specific schemas for improved validation
+
+# Improvements
+
+Thanks to @L-Mario564 for making more updates than we expected to be shipped in this release. We'll copy his message from a PR regarding improvements made in this release:
+
+- Output for all packages are now unminified, makes exploring the compiled code easier when published to npm.
+- Smaller footprint. Previously, we imported the column types at runtime for each dialect, meaning that for example, if you're just using Postgres then you'd likely only have drizzle-orm and drizzle-orm/pg-core in the build output of your app; however, these packages imported all dialects which could lead to mysql-core and sqlite-core being bundled as well even if they're unused in your app. This is now fixed.
+- Slight performance gain. To determine the column data type we used the is function which performs a few checks to ensure the column data type matches. This was slow, as these checks would pile up every quickly when comparing all data types for many fields in a table/view. The easier and faster alternative is to simply go off of the column's columnType property.
+
+# New features
+
+- `createSelectSchema` function now also accepts views and enums.
+
+```ts
+import { pgEnum } from 'drizzle-orm/pg-core';
+import { createSelectSchema } from 'drizzle-typebox';
+import { Value } from '@sinclair/typebox/value';
+
+const roles = pgEnum('roles', ['admin', 'basic']);
+const rolesSchema = createSelectSchema(roles);
+const parsed: 'admin' | 'basic' = Value.Parse(rolesSchema, ...);
+
+const usersView = pgView('users_view').as((qb) => qb.select().from(users).where(gt(users.age, 18)));
+const usersViewSchema = createSelectSchema(usersView);
+const parsed: { id: number; name: string; age: number } = Value.Parse(usersViewSchema, ...);
+```
+
+- New function: `createUpdateSchema`, for use in updating queries.
+
+```ts copy
+import { pgTable, text, integer } from 'drizzle-orm/pg-core';
+import { createUpdateSchema } from 'drizzle-typebox';
+import { Value } from '@sinclair/typebox/value';
+
+const users = pgTable('users', {
+ id: integer().generatedAlwaysAsIdentity().primaryKey(),
+ name: text().notNull(),
+ age: integer().notNull()
+});
+
+const userUpdateSchema = createUpdateSchema(users);
+
+const user = { id: 5, name: 'John' };
+const parsed: { name?: string | undefined, age?: number | undefined } = Value.Parse(userUpdateSchema, user); // Error: `id` is a generated column, it can't be updated
+
+const user = { age: 35 };
+const parsed: { name?: string | undefined, age?: number | undefined } = Value.Parse(userUpdateSchema, user); // Will parse successfully
+await db.update(users).set(parsed).where(eq(users.name, 'Jane'));
+```
+
+- New function: `createSchemaFactory`, to provide more advanced options and to avoid bloating the parameters of the other schema functions
+
+```ts copy
+import { pgTable, text, integer } from 'drizzle-orm/pg-core';
+import { createSchemaFactory } from 'drizzle-typebox';
+import { t } from 'elysia'; // Extended Typebox instance
+
+const users = pgTable('users', {
+ id: integer().generatedAlwaysAsIdentity().primaryKey(),
+ name: text().notNull(),
+ age: integer().notNull()
+});
+
+const { createInsertSchema } = createSchemaFactory({ typeboxInstance: t });
+
+const userInsertSchema = createInsertSchema(users, {
+ // We can now use the extended instance
+ name: (schema) => t.Number({ ...schema }, { error: '`name` must be a string' })
+});
+```
+
+- Full support for PG arrays
+
+```ts
+pg.dataType().array(...);
+
+// Schema
+Type.Array(baseDataTypeSchema, { minItems: size, maxItems: size });
+```
\ No newline at end of file
diff --git a/changelogs/drizzle-typebox/0.2.1.md b/changelogs/drizzle-typebox/0.2.1.md
new file mode 100644
index 000000000..2d9e762c3
--- /dev/null
+++ b/changelogs/drizzle-typebox/0.2.1.md
@@ -0,0 +1,25 @@
+# Added support for SingleStore dialect
+
+```ts
+import { singlestoreTable, text, int } from 'drizzle-orm/singlestore-core';
+import { createSelectSchema } from 'drizzle-typebox';
+import { Value } from '@sinclair/typebox/value';
+
+const users = singlestoreTable('users', {
+ id: int().primaryKey(),
+ name: text().notNull(),
+ age: int().notNull()
+});
+
+const userSelectSchema = createSelectSchema(users);
+
+const rows = await db.select({ id: users.id, name: users.name }).from(users).limit(1);
+const parsed: { id: number; name: string; age: number } = Value.Parse(userSelectSchema, rows[0]); // Error: `age` is not returned in the above query
+
+const rows = await db.select().from(users).limit(1);
+const parsed: { id: number; name: string; age: number } = Value.Parse(userSelectSchema, rows[0]); // Will parse successfully
+```
+
+# Bug fixes
+
+- [[BUG]: drizzle-typebox infers integer() as TString](https://github.com/drizzle-team/drizzle-orm/issues/3756)
\ No newline at end of file
diff --git a/changelogs/drizzle-valibot/0.3.0.md b/changelogs/drizzle-valibot/0.3.0.md
new file mode 100644
index 000000000..de8ec63b4
--- /dev/null
+++ b/changelogs/drizzle-valibot/0.3.0.md
@@ -0,0 +1,67 @@
+This version fully updates `drizzle-valibot` integration and makes sure it's compatible with newer valibot versions
+
+# Breaking Changes
+
+> You must also have Drizzle ORM v0.38.0 or greater and Valibot v1.0.0-beta.7 or greater installed.
+
+- When refining a field, if a schema is provided instead of a callback function, it will ignore the field's nullability and optional status.
+- Some data types have more specific schemas for improved validation
+
+# Improvements
+
+Thanks to @L-Mario564 for making more updates than we expected to be shipped in this release. We'll copy his message from a PR regarding improvements made in this release:
+
+- Output for all packages are now unminified, makes exploring the compiled code easier when published to npm.
+- Smaller footprint. Previously, we imported the column types at runtime for each dialect, meaning that for example, if you're just using Postgres then you'd likely only have drizzle-orm and drizzle-orm/pg-core in the build output of your app; however, these packages imported all dialects which could lead to mysql-core and sqlite-core being bundled as well even if they're unused in your app. This is now fixed.
+- Slight performance gain. To determine the column data type we used the is function which performs a few checks to ensure the column data type matches. This was slow, as these checks would pile up every quickly when comparing all data types for many fields in a table/view. The easier and faster alternative is to simply go off of the column's columnType property.
+- Some changes had to be made at the type level in the ORM package for better compatibility with drizzle-valibot.
+
+# New features
+
+- `createSelectSchema` function now also accepts views and enums.
+
+```ts copy
+import { pgEnum } from 'drizzle-orm/pg-core';
+import { createSelectSchema } from 'drizzle-valibot';
+import { parse } from 'valibot';
+
+const roles = pgEnum('roles', ['admin', 'basic']);
+const rolesSchema = createSelectSchema(roles);
+const parsed: 'admin' | 'basic' = parse(rolesSchema, ...);
+
+const usersView = pgView('users_view').as((qb) => qb.select().from(users).where(gt(users.age, 18)));
+const usersViewSchema = createSelectSchema(usersView);
+const parsed: { id: number; name: string; age: number } = parse(usersViewSchema, ...);
+```
+
+- New function: `createUpdateSchema`, for use in updating queries.
+
+```ts copy
+import { pgTable, text, integer } from 'drizzle-orm/pg-core';
+import { createUpdateSchema } from 'drizzle-valibot';
+import { parse } from 'valibot';
+
+const users = pgTable('users', {
+ id: integer().generatedAlwaysAsIdentity().primaryKey(),
+ name: text().notNull(),
+ age: integer().notNull()
+});
+
+const userUpdateSchema = createUpdateSchema(users);
+
+const user = { id: 5, name: 'John' };
+const parsed: { name?: string | undefined, age?: number | undefined } = parse(userUpdateSchema, user); // Error: `id` is a generated column, it can't be updated
+
+const user = { age: 35 };
+const parsed: { name?: string | undefined, age?: number | undefined } = parse(userUpdateSchema, user); // Will parse successfully
+await db.update(users).set(parsed).where(eq(users.name, 'Jane'));
+```
+
+- Full support for PG arrays
+
+```ts
+pg.dataType().array(...);
+
+// Schema
+z.array(baseDataTypeSchema).length(size);
+```
\ No newline at end of file
diff --git a/changelogs/drizzle-valibot/0.3.1.md b/changelogs/drizzle-valibot/0.3.1.md
new file mode 100644
index 000000000..21f05270b
--- /dev/null
+++ b/changelogs/drizzle-valibot/0.3.1.md
@@ -0,0 +1,23 @@
+# Added support for SingleStore dialect
+
+```ts
+import { singlestoreTable, text, int } from 'drizzle-orm/singlestore-core';
+import { createSelectSchema } from 'drizzle-valibot';
+import { parse } from 'valibot';
+
+const users = singlestoreTable('users', {
+ id: int().primaryKey(),
+ name: text().notNull(),
+ age: int().notNull()
+});
+
+const userSelectSchema = createSelectSchema(users);
+const rows = await db.select({ id: users.id, name: users.name }).from(users).limit(1);
+const parsed: { id: number; name: string; age: number } = parse(userSelectSchema, rows[0]); // Error: `age` is not returned in the above query
+const rows = await db.select().from(users).limit(1);
+const parsed: { id: number; name: string; age: number } = parse(userSelectSchema, rows[0]); // Will parse successfully
+```
+
+# Bug fixes
+
+- [[BUG]: drizzle-valibot throws Type instantiation is excessively deep and possibly infinite. for refinements](https://github.com/drizzle-team/drizzle-orm/issues/3751)
diff --git a/changelogs/drizzle-zod/0.6.0.md b/changelogs/drizzle-zod/0.6.0.md
new file mode 100644
index 000000000..31ffd4fdb
--- /dev/null
+++ b/changelogs/drizzle-zod/0.6.0.md
@@ -0,0 +1,85 @@
+This version fully updates `drizzle-zod` integration and makes sure it's compatible with newer zod versions
+
+# Breaking Changes
+
+> You must also have Drizzle ORM v0.38.0 or greater and Zod v3.0.0 or greater installed.
+
+- When refining a field, if a schema is provided instead of a callback function, it will ignore the field's nullability and optional status.
+- Some data types have more specific schemas for improved validation
+
+# Improvements
+
+Thanks to @L-Mario564 for making more updates than we expected to be shipped in this release. We'll copy his message from a PR regarding improvements made in this release:
+
+- Output for all packages are now unminified, makes exploring the compiled code easier when published to npm.
+- Smaller footprint. Previously, we imported the column types at runtime for each dialect, meaning that for example, if you're just using Postgres then you'd likely only have drizzle-orm and drizzle-orm/pg-core in the build output of your app; however, these packages imported all dialects which could lead to mysql-core and sqlite-core being bundled as well even if they're unused in your app. This is now fixed.
+- Slight performance gain. To determine the column data type we used the is function which performs a few checks to ensure the column data type matches. This was slow, as these checks would pile up every quickly when comparing all data types for many fields in a table/view. The easier and faster alternative is to simply go off of the column's columnType property.
+
+# New features
+
+- `createSelectSchema` function now also accepts views and enums.
+
+```ts copy
+import { pgEnum } from 'drizzle-orm/pg-core';
+import { createSelectSchema } from 'drizzle-zod';
+
+const roles = pgEnum('roles', ['admin', 'basic']);
+const rolesSchema = createSelectSchema(roles);
+const parsed: 'admin' | 'basic' = rolesSchema.parse(...);
+
+const usersView = pgView('users_view').as((qb) => qb.select().from(users).where(gt(users.age, 18)));
+const usersViewSchema = createSelectSchema(usersView);
+const parsed: { id: number; name: string; age: number } = usersViewSchema.parse(...);
+```
+
+- New function: `createUpdateSchema`, for use in updating queries.
+
+```ts copy
+import { pgTable, text, integer } from 'drizzle-orm/pg-core';
+import { createUpdateSchema } from 'drizzle-zod';
+
+const users = pgTable('users', {
+ id: integer().generatedAlwaysAsIdentity().primaryKey(),
+ name: text().notNull(),
+ age: integer().notNull()
+});
+
+const userUpdateSchema = createUpdateSchema(users);
+
+const user = { id: 5, name: 'John' };
+const parsed: { name?: string | undefined, age?: number | undefined } = userUpdateSchema.parse(user); // Error: `id` is a generated column, it can't be updated
+
+const user = { age: 35 };
+const parsed: { name?: string | undefined, age?: number | undefined } = userUpdateSchema.parse(user); // Will parse successfully
+await db.update(users).set(parsed).where(eq(users.name, 'Jane'));
+```
+
+- New function: `createSchemaFactory`, to provide more advanced options and to avoid bloating the parameters of the other schema functions
+
+```ts copy
+import { pgTable, text, integer } from 'drizzle-orm/pg-core';
+import { createSchemaFactory } from 'drizzle-zod';
+import { z } from '@hono/zod-openapi'; // Extended Zod instance
+
+const users = pgTable('users', {
+ id: integer().generatedAlwaysAsIdentity().primaryKey(),
+ name: text().notNull(),
+ age: integer().notNull()
+});
+
+const { createInsertSchema } = createSchemaFactory({ zodInstance: z });
+
+const userInsertSchema = createInsertSchema(users, {
+ // We can now use the extended instance
+ name: (schema) => schema.openapi({ example: 'John' })
+});
+```
+
+- Full support for PG arrays
+
+```ts
+pg.dataType().array(...);
+
+// Schema
+z.array(baseDataTypeSchema).length(size);
+```
\ No newline at end of file
diff --git a/changelogs/drizzle-zod/0.6.1.md b/changelogs/drizzle-zod/0.6.1.md
new file mode 100644
index 000000000..dd6740660
--- /dev/null
+++ b/changelogs/drizzle-zod/0.6.1.md
@@ -0,0 +1,26 @@
+# New Features
+
+## Added support for SingleStore dialect
+
+```ts
+import { singlestoreTable, text, int } from 'drizzle-orm/singlestore-core';
+import { createSelectSchema } from 'drizzle-zod';
+
+const users = singlestoreTable('users', {
+ id: int().primaryKey(),
+ name: text().notNull(),
+ age: int().notNull()
+});
+
+const userSelectSchema = createSelectSchema(users);
+const rows = await db.select({ id: users.id, name: users.name }).from(users).limit(1);
+const parsed: { id: number; name: string; age: number } = userSelectSchema.parse(rows[0]); // Error: `age` is not returned in the above query
+
+const rows = await db.select().from(users).limit(1);
+const parsed: { id: number; name: string; age: number } = userSelectSchema.parse(rows[0]); // Will parse successfully
+```
+
+# Bug fixes
+
+- [[BUG]: refining schema using createSelectSchema is not working with drizzle-kit 0.6.0](https://github.com/drizzle-team/drizzle-orm/issues/3735)
+- [[BUG]: drizzle-zod inferring types incorrectly](https://github.com/drizzle-team/drizzle-orm/issues/3734)
\ No newline at end of file
diff --git a/docs/custom-types.lite.md b/docs/custom-types.lite.md
index 627aba1a4..af1371461 100644
--- a/docs/custom-types.lite.md
+++ b/docs/custom-types.lite.md
@@ -1,6 +1,7 @@
# Common way of defining custom types
-> **Info**: For more advanced documentation about defining custom data types in PostgreSQL and MySQL please check [custom-types.md](https://github.com/drizzle-team/drizzle-orm/blob/main/docs/custom-types.md)
+> [!NOTE]
+> For more advanced documentation about defining custom data types in PostgreSQL and MySQL, please check [`custom-types.md`](custom-types.md).
## Examples
diff --git a/docs/custom-types.md b/docs/custom-types.md
index 1dffe6ce0..2a9f1a1da 100644
--- a/docs/custom-types.md
+++ b/docs/custom-types.md
@@ -1,7 +1,6 @@
# How to define custom types
Drizzle ORM has a big set of predefined column types for different SQL databases. But still there are additional types that are not supported by Drizzle ORM (yet). That could be native pg types or extension types
-
Here are some instructions on how to create and use your own types with Drizzle ORM
@@ -13,14 +12,11 @@ Each type creation should use 2 classes:
- `ColumnBuilder` - class, that is responsible for generating whole set of needed fields for column creation
- `Column` - class, that is representing Columns itself, that is used in query generation, migration mapping, etc.
-
-
+
Each module has it's own class, representing `ColumnBuilder` or `Column`:
- For `pg` -> `PgColumnBuilder` and `PgColumn`
- For `mysql` -> `MySqlColumnBuilder` and `MySqlColumn`
- For `sqlite` -> `SQLiteColumnBuilder` and `SQLiteColumn`
-
-
### Builder class explanation - (postgresql text data type example)
@@ -44,7 +40,7 @@ export class PgTextBuilder
}
```
-> **Warning**
+> [!WARNING]
> `$pgColumnBuilderBrand` should be changed and be equal to class name for new data type builder
### Column class explanation - (postgresql text data type example)
@@ -104,11 +100,8 @@ export class PgText
}
```
-> **Warning**
+> [!WARNING]
> `$pgColumnBrand` should be changed and be equal to class name for new data type
----
-
-
### Full text data type for PostgreSQL example
@@ -162,19 +155,13 @@ export function text(
## Custom data type example
----
-
-> **Note**
+> [!NOTE]
> We will check example on pg module, but current pattern applies to all dialects, that are currently supported by Drizzle ORM
-
-
### Setting up CITEXT datatype
----
-> **Note**
- This type is available only with extensions and used for example, just to show how you could setup any data type you want. Extension support will come soon
-
+> [!NOTE]
+> This type is available only with extensions and used for example, just to show how you could setup any data type you want. Extension support will come soon
### CITEXT data type example
@@ -224,4 +211,4 @@ You could add your created custom data types to Drizzle ORM, so everyone can use
Each data type should be placed in separate file in `columns` folder and PR open with tag `new-data-type:pg` | `new-data-type:sqlite` | `new-data-type:mysql`
-For more Contribution information - please check [CONTRIBUTING.md](https://github.com/drizzle-team/drizzle-orm/blob/main/CONTRIBUTING.md)
+For more Contribution information - please check [CONTRIBUTING.md](../CONTRIBUTING.md)
diff --git a/docs/joins.md b/docs/joins.md
index e0579e3e2..2b5829aa9 100644
--- a/docs/joins.md
+++ b/docs/joins.md
@@ -1,7 +1,7 @@
# Drizzle ORM - Joins
As with other parts of Drizzle ORM, the joins syntax is a balance between the SQL-likeness and type safety.
-Here's an example of how a common `1-to-many` relationship can be modelled.
+Here's an example of how a common "one-to-many" relationship can be modelled.
```typescript
const users = pgTable('users', {
@@ -96,7 +96,7 @@ In that case, the ORM will use dark TypeScript magic (as if it wasn't already) a
This is much more convenient! Now, you can just do a single check for `row.user !== null`, and all the user fields will become available.
-
+---
Note that you can group any fields in a nested object however you like, but the single check optimization will only be applied to a certain nested object if all its fields belong to the same table.
So, for example, you can group the city fields, too:
@@ -131,7 +131,7 @@ And the result type will look like this:
}
```
-
+---
If you just need all the fields from all the tables you're selecting and joining, you can simply omit the argument of the `.select()` method altogether:
@@ -139,7 +139,8 @@ If you just need all the fields from all the tables you're selecting and joining
const rows = await db.select().from(cities).leftJoin(users, eq(users.cityId, cities.id));
```
-> **Note**: in this case, the Drizzle table/column names will be used as the keys in the result object.
+> [!NOTE]
+> In this case, the Drizzle table/column names will be used as the keys in the result object.
```typescript
{
@@ -156,7 +157,7 @@ const rows = await db.select().from(cities).leftJoin(users, eq(users.cityId, cit
}[]
```
-
+---
There are cases where you'd want to select all the fields from one table, but pick fields from others. In that case, instead of listing all the table fields, you can just pass a table:
@@ -181,7 +182,7 @@ There are cases where you'd want to select all the fields from one table, but pi
}
```
-
+---
But what happens if you group columns from multiple tables in the same nested object? Nothing, really - they will still be all individually nullable, just grouped under the same object (as you might expect!):
diff --git a/drizzle-kit/.gitignore b/drizzle-kit/.gitignore
index 8d2cf5a81..4916f095a 100644
--- a/drizzle-kit/.gitignore
+++ b/drizzle-kit/.gitignore
@@ -2,6 +2,7 @@
**/.DS_Store
!src
+!imports-checker
!tests
!vitest.config.ts
!README.md
@@ -13,6 +14,7 @@
!package.json
!tsconfig.json
!tsconfig.cli-types.json
+!tsconfig.build.json
!pnpm-lock.yaml
!.github
!build.ts
diff --git a/drizzle-kit/README.md b/drizzle-kit/README.md
index d2a4191b7..bd69a4d3d 100644
--- a/drizzle-kit/README.md
+++ b/drizzle-kit/README.md
@@ -1,21 +1,21 @@
## Drizzle Kit
-DrizzleKit - is a CLI migrator tool for DrizzleORM. It is probably one and only tool that lets you completely automatically generate SQL migrations and covers ~95% of the common cases like deletions and renames by prompting user input.
+Drizzle Kit is a CLI migrator tool for Drizzle ORM. It is probably the one and only tool that lets you completely automatically generate SQL migrations and covers ~95% of the common cases like deletions and renames by prompting user input.
- is a mirror repository for issues.
## Documentation
-Check the full documenation on [the website](https://orm.drizzle.team/kit-docs/overview)
+Check the full documentation on [the website](https://orm.drizzle.team/kit-docs/overview).
### How it works
-`drizzle-kit` will traverse `schema folder` or `schema file`, generate schema snapshot and compare it to the previous version, if there's one.
- Based on the difference it will generate all needed SQL migrations and if there are any `automatically unresolvable` cases like `renames` it will prompt user for input.
+Drizzle Kit traverses a schema module and generates a snapshot to compare with the previous version, if there is one.
+Based on the difference, it will generate all needed SQL migrations. If there are any cases that can't be resolved automatically, such as renames, it will prompt the user for input.
-For schema file:
+For example, for this schema module:
```typescript
-// ./src/db/schema.ts
+// src/db/schema.ts
import { integer, pgTable, serial, text, varchar } from "drizzle-orm/pg-core";
@@ -63,7 +63,7 @@ CREATE INDEX IF NOT EXISTS users_full_name_index ON users (full_name);
npm install -D drizzle-kit
```
-Running with CLI options
+Running with CLI options:
```jsonc
// package.json
diff --git a/drizzle-kit/build.ts b/drizzle-kit/build.ts
index 8616112fd..ec7fc76c0 100644
--- a/drizzle-kit/build.ts
+++ b/drizzle-kit/build.ts
@@ -1,3 +1,4 @@
+///
import * as esbuild from 'esbuild';
import { readFileSync, writeFileSync } from 'node:fs';
import * as tsup from 'tsup';
@@ -9,12 +10,14 @@ const driversPackages = [
'postgres',
'@vercel/postgres',
'@neondatabase/serverless',
+ '@electric-sql/pglite',
// mysql drivers
'mysql2',
'@planetscale/database',
// sqlite drivers
'@libsql/client',
'better-sqlite3',
+ 'bun:sqlite',
];
esbuild.buildSync({
@@ -81,6 +84,7 @@ const main = async () => {
await tsup.build({
entryPoints: ['./src/index.ts', './src/api.ts'],
outDir: './dist',
+ external: ['bun:sqlite'],
splitting: false,
dts: true,
format: ['cjs', 'esm'],
diff --git a/drizzle-kit/imports-checker/analyze.ts b/drizzle-kit/imports-checker/analyze.ts
new file mode 100644
index 000000000..b31686e16
--- /dev/null
+++ b/drizzle-kit/imports-checker/analyze.ts
@@ -0,0 +1,78 @@
+import { readFileSync } from 'fs';
+import type { Node } from 'ohm-js';
+import JSImports from './grammar/grammar.ohm-bundle';
+
+export type CollectionItem = {
+ type: 'data' | 'types';
+ source: string;
+};
+
+function recursiveRun(...args: Node[]): boolean {
+ for (const arg of args) {
+ if (
+ arg.ctorName === 'Rest'
+ || arg.ctorName === 'comment'
+ || arg.ctorName === 'stringLiteral'
+ ) {
+ continue;
+ }
+
+ if (
+ arg.ctorName === 'ImportExpr_From'
+ || arg.ctorName === 'ImportExpr_NoFrom'
+ ) {
+ arg['analyze']();
+
+ continue;
+ }
+
+ if (arg.isTerminal()) continue;
+
+ for (const c of arg.children) {
+ if (!recursiveRun(c)) return false;
+ }
+ }
+
+ return true;
+}
+function init(collection: CollectionItem[]) {
+ const semantics = JSImports.createSemantics();
+
+ semantics.addOperation('analyze', {
+ JSImports(arg0, arg1) {
+ recursiveRun(arg0, arg1);
+ },
+
+ ImportExpr_From(kImport, importInner, kFrom, importSource) {
+ const ruleName = importInner.children[0]!.ctorName;
+ const importType = ruleName === 'ImportInner_Type' || ruleName === 'ImportInner_Types'
+ ? 'types'
+ : 'data';
+
+ collection.push({
+ source: importSource.children[1]!.sourceString!,
+ type: importType,
+ });
+ },
+
+ ImportExpr_NoFrom(kImport, importSource) {
+ collection.push({
+ source: importSource.children[1]!.sourceString!,
+ type: 'data',
+ });
+ },
+ });
+
+ return semantics;
+}
+
+export function analyze(path: string) {
+ const file = readFileSync(path).toString();
+ const match = JSImports.match(file, 'JSImports');
+
+ if (match.failed()) throw new Error(`Failed to parse file: ${path}`);
+ const collection: CollectionItem[] = [];
+
+ init(collection)(match)['analyze']();
+ return collection;
+}
diff --git a/drizzle-kit/imports-checker/checker.ts b/drizzle-kit/imports-checker/checker.ts
new file mode 100644
index 000000000..d8fc4b219
--- /dev/null
+++ b/drizzle-kit/imports-checker/checker.ts
@@ -0,0 +1,296 @@
+import fs from 'fs';
+import m from 'micromatch';
+import { dirname, join as joinPath, relative, resolve as resolvePath } from 'path';
+import { analyze } from './analyze';
+
+type External = {
+ file: string;
+ import: string;
+ type: 'data' | 'types';
+};
+
+export type Issue = {
+ file: string;
+ imports: IssueImport[];
+ accessChains: ChainLink[][];
+};
+
+export type IssueImport = {
+ name: string;
+ type: 'data' | 'types';
+};
+
+export type ChainLink = {
+ file: string;
+ import: string;
+};
+
+type ListMode = 'whitelist' | 'blacklist';
+
+class ImportAnalyzer {
+ private localImportRegex = /^(\.?\.?\/|\.\.?$)/;
+ private importedFileFormatRegex = /^.*\.(ts|tsx|mts|cts|js|jsx|mjs|cjs|json)$/i;
+
+ private visited: Set = new Set();
+
+ private externals: External[] = [];
+ private accessChains: Record = {};
+
+ constructor(
+ private basePath: string,
+ private entry: string,
+ private listMode: ListMode,
+ private readonly wantedList: string[],
+ private localPaths: string[],
+ private logger?: boolean,
+ private ignoreTypes?: boolean,
+ ) {}
+
+ private isDirectory = (path: string) => {
+ try {
+ return fs.lstatSync(path).isDirectory();
+ } catch (e) {
+ return false;
+ }
+ };
+
+ private isFile = (path: string) => {
+ try {
+ return fs.lstatSync(path).isFile();
+ } catch (e) {
+ return false;
+ }
+ };
+
+ private localizePath = (path: string) => relative(resolvePath(this.basePath), resolvePath(path));
+
+ private isCustomLocal = (importTarget: string) =>
+ !!this.localPaths.find(
+ (l) =>
+ importTarget === l
+ || importTarget.startsWith(l.endsWith('/') ? l : `${l}/`),
+ );
+ private isLocal = (importTarget: string) =>
+ this.localImportRegex.test(importTarget)
+ || this.isCustomLocal(importTarget);
+ private isTsFormat = (path: string) => this.importedFileFormatRegex.test(path);
+
+ private resolveCustomLocalPath = (
+ absoluteBase: string,
+ base: string,
+ target: string,
+ ): string => {
+ return joinPath(absoluteBase, target);
+ };
+
+ private resolveTargetFile = (path: string): string => {
+ if (this.isFile(path)) return path;
+
+ const formats = [
+ '.ts',
+ '.mts',
+ '.cts',
+ '.tsx',
+ '.js',
+ '.mjs',
+ '.cjs',
+ '.jsx',
+ ];
+
+ for (const format of formats) {
+ const indexPath = joinPath(path, `/index${format}`);
+ if (this.isFile(indexPath)) return indexPath;
+
+ const formatFilePath = `${path}${format}`;
+ if (this.isFile(formatFilePath)) return formatFilePath;
+ }
+
+ return path;
+ };
+
+ private resolveTargetPath = (
+ absoluteBase: string,
+ base: string,
+ target: string,
+ ): string => {
+ if (this.isCustomLocal(target)) {
+ return this.resolveTargetFile(
+ this.resolveCustomLocalPath(absoluteBase, base, target),
+ );
+ }
+
+ const dir = this.isDirectory(base) ? base : dirname(base);
+ const joined = joinPath(dir, target);
+
+ return this.resolveTargetFile(joined);
+ };
+
+ private _analyzeImports = (
+ target: string = this.entry,
+ basePath: string = this.basePath,
+ accessChain: ChainLink[] = [],
+ ) => {
+ if (this.visited.has(target)) return;
+
+ const locals: string[] = [];
+
+ try {
+ if (this.logger) console.log(`${this.localizePath(target)}`);
+
+ const imports = analyze(target);
+
+ for (const { source: i, type } of imports) {
+ if (this.ignoreTypes && type === 'types') continue;
+
+ if (this.isLocal(i)) {
+ locals.push(i);
+
+ continue;
+ }
+
+ this.externals.push({
+ file: this.localizePath(target),
+ import: i,
+ type: type,
+ });
+ }
+ } catch (e) {
+ throw e;
+ } finally {
+ this.visited.add(target);
+ }
+
+ for (const local of locals) {
+ const transformedTarget = this.resolveTargetPath(basePath, target, local);
+
+ const localChain = [
+ ...accessChain,
+ {
+ file: this.localizePath(target),
+ import: local,
+ },
+ ];
+
+ const localized = this.localizePath(transformedTarget);
+
+ if (this.accessChains[localized]) {
+ this.accessChains[localized].push(localChain);
+ } else this.accessChains[localized] = [localChain];
+
+ if (this.isTsFormat(transformedTarget)) {
+ this._analyzeImports(transformedTarget, basePath, localChain);
+ } else {
+ throw new Error(`unrecognized: ${localized}`);
+ }
+ }
+ };
+
+ public analyzeImports = () => {
+ const entryLocalized = this.localizePath(this.entry);
+ if (!this.accessChains[entryLocalized]) {
+ this.accessChains[entryLocalized] = [[]];
+ }
+
+ this._analyzeImports();
+
+ const rawIssues = this.listMode === 'whitelist'
+ ? this.externals.filter((e) => !m([e.import], this.wantedList).length)
+ : this.externals.filter((e) => m([e.import], this.wantedList).length);
+
+ const issueMap: Record = {};
+ for (const { file, import: i, type } of rawIssues) {
+ if (issueMap[file]) {
+ issueMap[file].imports.push({
+ name: i,
+ type,
+ });
+
+ continue;
+ }
+
+ issueMap[file] = {
+ file,
+ imports: [
+ {
+ name: i,
+ type,
+ },
+ ],
+ accessChains: this.accessChains[file]!,
+ };
+ }
+
+ return {
+ issues: Object.entries(issueMap).map(([file, data]) => {
+ for (const chain of data.accessChains) {
+ chain.push({
+ file,
+ import: '',
+ });
+ }
+
+ return data;
+ }),
+ accessChains: this.accessChains,
+ };
+ };
+}
+
+export type CustomLocalPathResolver = (
+ basePath: string,
+ path: string,
+ target: string,
+) => string;
+
+export type AnalyzeImportsConfig =
+ & {
+ basePath: string;
+ entry: string;
+ logger?: boolean;
+ ignoreTypes?: boolean;
+ localPaths?: string[];
+ }
+ & (
+ | {
+ blackList: string[];
+ }
+ | {
+ whiteList: string[];
+ }
+ );
+
+type AnyAnalyzeImportsConfig = {
+ basePath: string;
+ entry: string;
+ blackList?: string[];
+ whiteList?: string[];
+ logger?: boolean;
+ ignoreTypes?: boolean;
+ localPaths?: string[];
+};
+
+export function analyzeImports(cfg: AnalyzeImportsConfig) {
+ const {
+ basePath,
+ blackList,
+ whiteList,
+ entry,
+ localPaths: localImports,
+ ignoreTypes,
+ logger,
+ } = cfg as AnyAnalyzeImportsConfig;
+ const mode = whiteList ? 'whitelist' : 'blacklist';
+ const wantedList = blackList ?? whiteList!;
+
+ const analyzer = new ImportAnalyzer(
+ joinPath(basePath),
+ joinPath(entry),
+ mode,
+ wantedList,
+ localImports ?? [],
+ logger,
+ ignoreTypes,
+ );
+
+ return analyzer.analyzeImports();
+}
diff --git a/drizzle-kit/imports-checker/grammar/grammar.ohm b/drizzle-kit/imports-checker/grammar/grammar.ohm
new file mode 100644
index 000000000..de1459942
--- /dev/null
+++ b/drizzle-kit/imports-checker/grammar/grammar.ohm
@@ -0,0 +1,121 @@
+JSImports {
+ JSImports = (Expr ";"?)*
+
+ Expr =
+ | comment
+ | stringLiteral
+ | ImportExpr
+ | Rest
+
+ ImportExpr =
+ | "import" ImportInner "from" importSource -- From
+ | "import" importSource -- NoFrom
+
+ Rest = (~(ImportExpr | comment | stringLiteral) any)+
+
+ ImportInner =
+ | ("type" "{" NonemptyListOf ","? "}") -- Type
+ | ("{" NonemptyListOf ","? "}") -- Types
+ | ("{" NonemptyListOf ","? "}") -- Extended
+ | (identifier ("," "type"? "{" NonemptyListOf ","? "}")?) -- Mixed
+ | ("*" ("as" identifier)?) -- All
+ | (identifier ("as" identifier)?) -- Default
+
+
+ ImportExtendedSelection = TypeImport | Import
+ ImportExtendedSelectionTypes = TypeImport
+ ImportExtendedSelectionTypeless = Import
+
+ Import = identifier ("as" identifier)?
+ TypeImport = "type" Import ("as" identifier)?
+
+ identifier = letter alnum*
+ quote = "\"" | "'" | "`"
+ notQuote = ~quote any
+ importSource =
+ | "\"" notQuote+ "\""
+ | "'" notQuote+ "'"
+ | "`" notQuote+ "`"
+
+ lineTerminator = "\n" | "\r" | "\u2028" | "\u2029"
+ lineTerminatorSequence = "\n" | "\r" ~"\n" | "\u2028" | "\u2029" | "\r\n"
+
+ comment = multiLineComment | singleLineComment
+
+ multiLineComment = "/*" (~"*/" any)* "*/"
+ singleLineComment = "//" (~lineTerminator any)*
+
+ stringLiteral =
+ | "\"" doubleStringCharacter* "\""
+ | "'" singleStringCharacter* "'"
+ | "`" templateStringCharacter* "`"
+ doubleStringCharacter =
+ | ~("\"" | "\\" | lineTerminator) any -- NonEscaped
+ | "\\" escapeSequence -- Escaped
+ | lineContinuation -- LineContinuation
+ singleStringCharacter =
+ | ~("'" | "\\" | lineTerminator) any -- NonEscaped
+ | "\\" escapeSequence -- Escaped
+ | lineContinuation -- LineContinuation
+ templateStringCharacter =
+ | ~ ("`" | "\\") any -- NonEscaped
+ | "\\" escapeSequence -- Escaped
+ lineContinuation = "\\" lineTerminatorSequence
+ escapeSequence = unicodeEscapeSequence | hexEscapeSequence | octalEscapeSequence | characterEscapeSequence
+ characterEscapeSequence = singleEscapeCharacter | nonEscapeCharacter
+ singleEscapeCharacter = "'" | "\"" | "\\" | "b" | "f" | "n" | "r" | "t" | "v"
+ nonEscapeCharacter = ~(escapeCharacter | lineTerminator) any
+ escapeCharacter = singleEscapeCharacter | decimalDigit | "x" | "u"
+ octalEscapeSequence =
+ | zeroToThree octalDigit octalDigit -- Whole
+ | fourToSeven octalDigit -- EightTimesfourToSeven
+ | zeroToThree octalDigit ~decimalDigit -- EightTimesZeroToThree
+ | octalDigit ~decimalDigit -- Octal
+ hexEscapeSequence = "x" hexDigit hexDigit
+ unicodeEscapeSequence = "u" hexDigit hexDigit hexDigit hexDigit
+
+ zeroToThree = "0".."3"
+ fourToSeven = "4".."7"
+ decimalDigit = "0".."9"
+ nonZeroDigit = "1".."9"
+ octalDigit = "0".."7"
+
+ regularExpressionLiteral = "/" regularExpressionBody "/" regularExpressionFlags
+ regularExpressionBody = regularExpressionFirstChar regularExpressionChar*
+ regularExpressionFirstChar =
+ | ~("*" | "\\" | "/" | "[") regularExpressionNonTerminator
+ | regularExpressionBackslashSequence
+ | regularExpressionClass
+ regularExpressionChar = ~("\\" | "/" | "[") regularExpressionNonTerminator
+ | regularExpressionBackslashSequence
+ | regularExpressionClass
+ regularExpressionBackslashSequence = "\\" regularExpressionNonTerminator
+ regularExpressionNonTerminator = ~(lineTerminator) any
+ regularExpressionClass = "[" regularExpressionClassChar* "]"
+ regularExpressionClassChar =
+ | ~("]" | "\\") regularExpressionNonTerminator
+ | regularExpressionBackslashSequence
+ regularExpressionFlags = identifierPart*
+
+ multiLineCommentNoNL = "/*" (~("*/" | lineTerminator) any)* "*/"
+
+ identifierStart =
+ | letter | "$" | "_"
+ | "\\" unicodeEscapeSequence -- escaped
+ identifierPart =
+ | identifierStart | unicodeCombiningMark
+ | unicodeDigit | unicodeConnectorPunctuation
+ | "\u200C" | "\u200D"
+ letter += unicodeCategoryNl
+ unicodeCategoryNl
+ = "\u2160".."\u2182" | "\u3007" | "\u3021".."\u3029"
+ unicodeDigit (a digit)
+ = "\u0030".."\u0039" | "\u0660".."\u0669" | "\u06F0".."\u06F9" | "\u0966".."\u096F" | "\u09E6".."\u09EF" | "\u0A66".."\u0A6F" | "\u0AE6".."\u0AEF" | "\u0B66".."\u0B6F" | "\u0BE7".."\u0BEF" | "\u0C66".."\u0C6F" | "\u0CE6".."\u0CEF" | "\u0D66".."\u0D6F" | "\u0E50".."\u0E59" | "\u0ED0".."\u0ED9" | "\u0F20".."\u0F29" | "\uFF10".."\uFF19"
+
+ unicodeCombiningMark (a Unicode combining mark)
+ = "\u0300".."\u0345" | "\u0360".."\u0361" | "\u0483".."\u0486" | "\u0591".."\u05A1" | "\u05A3".."\u05B9" | "\u05BB".."\u05BD" | "\u05BF".."\u05BF" | "\u05C1".."\u05C2" | "\u05C4".."\u05C4" | "\u064B".."\u0652" | "\u0670".."\u0670" | "\u06D6".."\u06DC" | "\u06DF".."\u06E4" | "\u06E7".."\u06E8" | "\u06EA".."\u06ED" | "\u0901".."\u0902" | "\u093C".."\u093C" | "\u0941".."\u0948" | "\u094D".."\u094D" | "\u0951".."\u0954" | "\u0962".."\u0963" | "\u0981".."\u0981" | "\u09BC".."\u09BC" | "\u09C1".."\u09C4" | "\u09CD".."\u09CD" | "\u09E2".."\u09E3" | "\u0A02".."\u0A02" | "\u0A3C".."\u0A3C" | "\u0A41".."\u0A42" | "\u0A47".."\u0A48" | "\u0A4B".."\u0A4D" | "\u0A70".."\u0A71" | "\u0A81".."\u0A82" | "\u0ABC".."\u0ABC" | "\u0AC1".."\u0AC5" | "\u0AC7".."\u0AC8" | "\u0ACD".."\u0ACD" | "\u0B01".."\u0B01" | "\u0B3C".."\u0B3C" | "\u0B3F".."\u0B3F" | "\u0B41".."\u0B43" | "\u0B4D".."\u0B4D" | "\u0B56".."\u0B56" | "\u0B82".."\u0B82" | "\u0BC0".."\u0BC0" | "\u0BCD".."\u0BCD" | "\u0C3E".."\u0C40" | "\u0C46".."\u0C48" | "\u0C4A".."\u0C4D" | "\u0C55".."\u0C56" | "\u0CBF".."\u0CBF" | "\u0CC6".."\u0CC6" | "\u0CCC".."\u0CCD" | "\u0D41".."\u0D43" | "\u0D4D".."\u0D4D" | "\u0E31".."\u0E31" | "\u0E34".."\u0E3A" | "\u0E47".."\u0E4E" | "\u0EB1".."\u0EB1" | "\u0EB4".."\u0EB9" | "\u0EBB".."\u0EBC" | "\u0EC8".."\u0ECD" | "\u0F18".."\u0F19" | "\u0F35".."\u0F35" | "\u0F37".."\u0F37" | "\u0F39".."\u0F39" | "\u0F71".."\u0F7E" | "\u0F80".."\u0F84" | "\u0F86".."\u0F87" | "\u0F90".."\u0F95" | "\u0F97".."\u0F97" | "\u0F99".."\u0FAD" | "\u0FB1".."\u0FB7" | "\u0FB9".."\u0FB9" | "\u20D0".."\u20DC" | "\u20E1".."\u20E1" | "\u302A".."\u302F" | "\u3099".."\u309A" | "\uFB1E".."\uFB1E" | "\uFE20".."\uFE23"
+
+ unicodeConnectorPunctuation = "\u005F" | "\u203F".."\u2040" | "\u30FB" | "\uFE33".."\uFE34" | "\uFE4D".."\uFE4F" | "\uFF3F" | "\uFF65"
+ unicodeSpaceSeparator = "\u2000".."\u200B" | "\u3000"
+
+}
\ No newline at end of file
diff --git a/drizzle-kit/imports-checker/grammar/grammar.ohm-bundle.d.ts b/drizzle-kit/imports-checker/grammar/grammar.ohm-bundle.d.ts
new file mode 100644
index 000000000..64b5dfb78
--- /dev/null
+++ b/drizzle-kit/imports-checker/grammar/grammar.ohm-bundle.d.ts
@@ -0,0 +1,164 @@
+// AUTOGENERATED FILE
+// This file was generated from grammar.ohm by `ohm generateBundles`.
+
+import { BaseActionDict, Grammar, IterationNode, Node, NonterminalNode, Semantics, TerminalNode } from 'ohm-js';
+
+export interface JSImportsActionDict extends BaseActionDict {
+ JSImports?: (this: NonterminalNode, arg0: IterationNode, arg1: IterationNode) => T;
+ Expr?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ ImportExpr_From?: (
+ this: NonterminalNode,
+ arg0: TerminalNode,
+ arg1: NonterminalNode,
+ arg2: TerminalNode,
+ arg3: NonterminalNode,
+ ) => T;
+ ImportExpr_NoFrom?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode) => T;
+ ImportExpr?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ Rest?: (this: NonterminalNode, arg0: IterationNode) => T;
+ ImportInner_Type?: (
+ this: NonterminalNode,
+ arg0: TerminalNode,
+ arg1: TerminalNode,
+ arg2: NonterminalNode,
+ arg3: IterationNode,
+ arg4: TerminalNode,
+ ) => T;
+ ImportInner_Types?: (
+ this: NonterminalNode,
+ arg0: TerminalNode,
+ arg1: NonterminalNode,
+ arg2: IterationNode,
+ arg3: TerminalNode,
+ ) => T;
+ ImportInner_Extended?: (
+ this: NonterminalNode,
+ arg0: TerminalNode,
+ arg1: NonterminalNode,
+ arg2: IterationNode,
+ arg3: TerminalNode,
+ ) => T;
+ ImportInner_Mixed?: (
+ this: NonterminalNode,
+ arg0: NonterminalNode,
+ arg1: IterationNode,
+ arg2: IterationNode,
+ arg3: IterationNode,
+ arg4: IterationNode,
+ arg5: IterationNode,
+ arg6: IterationNode,
+ ) => T;
+ ImportInner_All?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode, arg2: IterationNode) => T;
+ ImportInner_Default?: (this: NonterminalNode, arg0: NonterminalNode, arg1: IterationNode, arg2: IterationNode) => T;
+ ImportInner?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ ImportExtendedSelection?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ ImportExtendedSelectionTypes?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ ImportExtendedSelectionTypeless?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ Import?: (this: NonterminalNode, arg0: NonterminalNode, arg1: IterationNode, arg2: IterationNode) => T;
+ TypeImport?: (
+ this: NonterminalNode,
+ arg0: TerminalNode,
+ arg1: NonterminalNode,
+ arg2: IterationNode,
+ arg3: IterationNode,
+ ) => T;
+ identifier?: (this: NonterminalNode, arg0: NonterminalNode, arg1: IterationNode) => T;
+ quote?: (this: NonterminalNode, arg0: TerminalNode) => T;
+ notQuote?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ importSource?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode, arg2: TerminalNode) => T;
+ lineTerminator?: (this: NonterminalNode, arg0: TerminalNode) => T;
+ lineTerminatorSequence?: (this: NonterminalNode, arg0: TerminalNode) => T;
+ comment?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ multiLineComment?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode, arg2: TerminalNode) => T;
+ singleLineComment?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode) => T;
+ stringLiteral?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode, arg2: TerminalNode) => T;
+ doubleStringCharacter_NonEscaped?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ doubleStringCharacter_Escaped?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode) => T;
+ doubleStringCharacter_LineContinuation?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ doubleStringCharacter?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ singleStringCharacter_NonEscaped?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ singleStringCharacter_Escaped?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode) => T;
+ singleStringCharacter_LineContinuation?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ singleStringCharacter?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ templateStringCharacter_NonEscaped?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ templateStringCharacter_Escaped?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode) => T;
+ templateStringCharacter?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ lineContinuation?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode) => T;
+ escapeSequence?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ characterEscapeSequence?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ singleEscapeCharacter?: (this: NonterminalNode, arg0: TerminalNode) => T;
+ nonEscapeCharacter?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ escapeCharacter?: (this: NonterminalNode, arg0: NonterminalNode | TerminalNode) => T;
+ octalEscapeSequence_Whole?: (
+ this: NonterminalNode,
+ arg0: NonterminalNode,
+ arg1: NonterminalNode,
+ arg2: NonterminalNode,
+ ) => T;
+ octalEscapeSequence_EightTimesfourToSeven?: (
+ this: NonterminalNode,
+ arg0: NonterminalNode,
+ arg1: NonterminalNode,
+ ) => T;
+ octalEscapeSequence_EightTimesZeroToThree?: (
+ this: NonterminalNode,
+ arg0: NonterminalNode,
+ arg1: NonterminalNode,
+ ) => T;
+ octalEscapeSequence_Octal?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ octalEscapeSequence?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ hexEscapeSequence?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode, arg2: NonterminalNode) => T;
+ unicodeEscapeSequence?: (
+ this: NonterminalNode,
+ arg0: TerminalNode,
+ arg1: NonterminalNode,
+ arg2: NonterminalNode,
+ arg3: NonterminalNode,
+ arg4: NonterminalNode,
+ ) => T;
+ zeroToThree?: (this: NonterminalNode, arg0: TerminalNode) => T;
+ fourToSeven?: (this: NonterminalNode, arg0: TerminalNode) => T;
+ decimalDigit?: (this: NonterminalNode, arg0: TerminalNode) => T;
+ nonZeroDigit?: (this: NonterminalNode, arg0: TerminalNode) => T;
+ octalDigit?: (this: NonterminalNode, arg0: TerminalNode) => T;
+ regularExpressionLiteral?: (
+ this: NonterminalNode,
+ arg0: TerminalNode,
+ arg1: NonterminalNode,
+ arg2: TerminalNode,
+ arg3: NonterminalNode,
+ ) => T;
+ regularExpressionBody?: (this: NonterminalNode, arg0: NonterminalNode, arg1: IterationNode) => T;
+ regularExpressionFirstChar?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ regularExpressionChar?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ regularExpressionBackslashSequence?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode) => T;
+ regularExpressionNonTerminator?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ regularExpressionClass?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode, arg2: TerminalNode) => T;
+ regularExpressionClassChar?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ regularExpressionFlags?: (this: NonterminalNode, arg0: IterationNode) => T;
+ multiLineCommentNoNL?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode, arg2: TerminalNode) => T;
+ identifierStart_escaped?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode) => T;
+ identifierStart?: (this: NonterminalNode, arg0: NonterminalNode | TerminalNode) => T;
+ identifierPart?: (this: NonterminalNode, arg0: NonterminalNode | TerminalNode) => T;
+ letter?: (this: NonterminalNode, arg0: NonterminalNode) => T;
+ unicodeCategoryNl?: (this: NonterminalNode, arg0: TerminalNode) => T;
+ unicodeDigit?: (this: NonterminalNode, arg0: TerminalNode) => T;
+ unicodeCombiningMark?: (this: NonterminalNode, arg0: TerminalNode) => T;
+ unicodeConnectorPunctuation?: (this: NonterminalNode, arg0: TerminalNode) => T;
+ unicodeSpaceSeparator?: (this: NonterminalNode, arg0: TerminalNode) => T;
+}
+
+export interface JSImportsSemantics extends Semantics {
+ addOperation(name: string, actionDict: JSImportsActionDict): this;
+ extendOperation(name: string, actionDict: JSImportsActionDict): this;
+ addAttribute(name: string, actionDict: JSImportsActionDict): this;
+ extendAttribute(name: string, actionDict: JSImportsActionDict): this;
+}
+
+export interface JSImportsGrammar extends Grammar {
+ createSemantics(): JSImportsSemantics;
+ extendSemantics(superSemantics: JSImportsSemantics): JSImportsSemantics;
+}
+
+declare const grammar: JSImportsGrammar;
+export default grammar;
diff --git a/drizzle-kit/imports-checker/grammar/grammar.ohm-bundle.js b/drizzle-kit/imports-checker/grammar/grammar.ohm-bundle.js
new file mode 100644
index 000000000..9a889d66f
--- /dev/null
+++ b/drizzle-kit/imports-checker/grammar/grammar.ohm-bundle.js
@@ -0,0 +1,753 @@
+import { makeRecipe } from 'ohm-js';
+const result = makeRecipe([
+ 'grammar',
+ {
+ source:
+ 'JSImports {\n JSImports = (Expr ";"?)*\n\n Expr = \n | comment\n | stringLiteral\n | ImportExpr\n | Rest\n\n ImportExpr =\n | "import" ImportInner "from" importSource -- From\n | "import" importSource -- NoFrom\n\n Rest = (~(ImportExpr | comment | stringLiteral) any)+\n\n ImportInner = \n | ("type" "{" NonemptyListOf ","? "}") -- Type\n | ("{" NonemptyListOf ","? "}") -- Types\n | ("{" NonemptyListOf ","? "}") -- Extended\n | (identifier ("," "type"? "{" NonemptyListOf ","? "}")?) -- Mixed\n | ("*" ("as" identifier)?) -- All\n | (identifier ("as" identifier)?) -- Default\n \n\n ImportExtendedSelection = TypeImport | Import\n ImportExtendedSelectionTypes = TypeImport\n ImportExtendedSelectionTypeless = Import\n\n Import = identifier ("as" identifier)?\n TypeImport = "type" Import ("as" identifier)?\n\n identifier = letter alnum*\n quote = "\\"" | "\'" | "`"\n notQuote = ~quote any\n importSource =\n | "\\"" notQuote+ "\\""\n | "\'" notQuote+ "\'"\n | "`" notQuote+ "`"\n\n lineTerminator = "\\n" | "\\r" | "\\u2028" | "\\u2029"\n lineTerminatorSequence = "\\n" | "\\r" ~"\\n" | "\\u2028" | "\\u2029" | "\\r\\n"\n \n comment = multiLineComment | singleLineComment\n\n multiLineComment = "/*" (~"*/" any)* "*/"\n singleLineComment = "//" (~lineTerminator any)*\n\n stringLiteral =\n | "\\"" doubleStringCharacter* "\\""\n | "\'" singleStringCharacter* "\'"\n | "`" templateStringCharacter* "`"\n doubleStringCharacter =\n | ~("\\"" | "\\\\" | lineTerminator) any -- NonEscaped\n | "\\\\" escapeSequence -- Escaped\n | lineContinuation -- LineContinuation\n singleStringCharacter =\n | ~("\'" | "\\\\" | lineTerminator) any -- NonEscaped\n | "\\\\" escapeSequence -- Escaped\n | lineContinuation -- LineContinuation\n templateStringCharacter = \n | ~ ("`" | "\\\\") any -- NonEscaped\n | "\\\\" escapeSequence -- Escaped\n lineContinuation = "\\\\" lineTerminatorSequence\n escapeSequence = unicodeEscapeSequence | hexEscapeSequence | octalEscapeSequence | characterEscapeSequence\n characterEscapeSequence = singleEscapeCharacter | nonEscapeCharacter\n singleEscapeCharacter = "\'" | "\\"" | "\\\\" | "b" | "f" | "n" | "r" | "t" | "v"\n nonEscapeCharacter = ~(escapeCharacter | lineTerminator) any\n escapeCharacter = singleEscapeCharacter | decimalDigit | "x" | "u"\n octalEscapeSequence =\n | zeroToThree octalDigit octalDigit -- Whole\n | fourToSeven octalDigit -- EightTimesfourToSeven\n | zeroToThree octalDigit ~decimalDigit -- EightTimesZeroToThree\n | octalDigit ~decimalDigit -- Octal\n hexEscapeSequence = "x" hexDigit hexDigit\n unicodeEscapeSequence = "u" hexDigit hexDigit hexDigit hexDigit\n\n zeroToThree = "0".."3"\n fourToSeven = "4".."7"\n decimalDigit = "0".."9"\n nonZeroDigit = "1".."9"\n octalDigit = "0".."7"\n\n regularExpressionLiteral = "/" regularExpressionBody "/" regularExpressionFlags\n regularExpressionBody = regularExpressionFirstChar regularExpressionChar*\n regularExpressionFirstChar =\n | ~("*" | "\\\\" | "/" | "[") regularExpressionNonTerminator\n | regularExpressionBackslashSequence\n | regularExpressionClass\n regularExpressionChar = ~("\\\\" | "/" | "[") regularExpressionNonTerminator\n | regularExpressionBackslashSequence\n | regularExpressionClass\n regularExpressionBackslashSequence = "\\\\" regularExpressionNonTerminator\n regularExpressionNonTerminator = ~(lineTerminator) any\n regularExpressionClass = "[" regularExpressionClassChar* "]"\n regularExpressionClassChar =\n | ~("]" | "\\\\") regularExpressionNonTerminator\n | regularExpressionBackslashSequence\n regularExpressionFlags = identifierPart*\n\n multiLineCommentNoNL = "/*" (~("*/" | lineTerminator) any)* "*/"\n\n identifierStart =\n | letter | "$" | "_"\n | "\\\\" unicodeEscapeSequence -- escaped\n identifierPart =\n | identifierStart | unicodeCombiningMark\n | unicodeDigit | unicodeConnectorPunctuation\n | "\\u200C" | "\\u200D"\n letter += unicodeCategoryNl\n unicodeCategoryNl\n = "\\u2160".."\\u2182" | "\\u3007" | "\\u3021".."\\u3029"\n unicodeDigit (a digit)\n = "\\u0030".."\\u0039" | "\\u0660".."\\u0669" | "\\u06F0".."\\u06F9" | "\\u0966".."\\u096F" | "\\u09E6".."\\u09EF" | "\\u0A66".."\\u0A6F" | "\\u0AE6".."\\u0AEF" | "\\u0B66".."\\u0B6F" | "\\u0BE7".."\\u0BEF" | "\\u0C66".."\\u0C6F" | "\\u0CE6".."\\u0CEF" | "\\u0D66".."\\u0D6F" | "\\u0E50".."\\u0E59" | "\\u0ED0".."\\u0ED9" | "\\u0F20".."\\u0F29" | "\\uFF10".."\\uFF19"\n\n unicodeCombiningMark (a Unicode combining mark)\n = "\\u0300".."\\u0345" | "\\u0360".."\\u0361" | "\\u0483".."\\u0486" | "\\u0591".."\\u05A1" | "\\u05A3".."\\u05B9" | "\\u05BB".."\\u05BD" | "\\u05BF".."\\u05BF" | "\\u05C1".."\\u05C2" | "\\u05C4".."\\u05C4" | "\\u064B".."\\u0652" | "\\u0670".."\\u0670" | "\\u06D6".."\\u06DC" | "\\u06DF".."\\u06E4" | "\\u06E7".."\\u06E8" | "\\u06EA".."\\u06ED" | "\\u0901".."\\u0902" | "\\u093C".."\\u093C" | "\\u0941".."\\u0948" | "\\u094D".."\\u094D" | "\\u0951".."\\u0954" | "\\u0962".."\\u0963" | "\\u0981".."\\u0981" | "\\u09BC".."\\u09BC" | "\\u09C1".."\\u09C4" | "\\u09CD".."\\u09CD" | "\\u09E2".."\\u09E3" | "\\u0A02".."\\u0A02" | "\\u0A3C".."\\u0A3C" | "\\u0A41".."\\u0A42" | "\\u0A47".."\\u0A48" | "\\u0A4B".."\\u0A4D" | "\\u0A70".."\\u0A71" | "\\u0A81".."\\u0A82" | "\\u0ABC".."\\u0ABC" | "\\u0AC1".."\\u0AC5" | "\\u0AC7".."\\u0AC8" | "\\u0ACD".."\\u0ACD" | "\\u0B01".."\\u0B01" | "\\u0B3C".."\\u0B3C" | "\\u0B3F".."\\u0B3F" | "\\u0B41".."\\u0B43" | "\\u0B4D".."\\u0B4D" | "\\u0B56".."\\u0B56" | "\\u0B82".."\\u0B82" | "\\u0BC0".."\\u0BC0" | "\\u0BCD".."\\u0BCD" | "\\u0C3E".."\\u0C40" | "\\u0C46".."\\u0C48" | "\\u0C4A".."\\u0C4D" | "\\u0C55".."\\u0C56" | "\\u0CBF".."\\u0CBF" | "\\u0CC6".."\\u0CC6" | "\\u0CCC".."\\u0CCD" | "\\u0D41".."\\u0D43" | "\\u0D4D".."\\u0D4D" | "\\u0E31".."\\u0E31" | "\\u0E34".."\\u0E3A" | "\\u0E47".."\\u0E4E" | "\\u0EB1".."\\u0EB1" | "\\u0EB4".."\\u0EB9" | "\\u0EBB".."\\u0EBC" | "\\u0EC8".."\\u0ECD" | "\\u0F18".."\\u0F19" | "\\u0F35".."\\u0F35" | "\\u0F37".."\\u0F37" | "\\u0F39".."\\u0F39" | "\\u0F71".."\\u0F7E" | "\\u0F80".."\\u0F84" | "\\u0F86".."\\u0F87" | "\\u0F90".."\\u0F95" | "\\u0F97".."\\u0F97" | "\\u0F99".."\\u0FAD" | "\\u0FB1".."\\u0FB7" | "\\u0FB9".."\\u0FB9" | "\\u20D0".."\\u20DC" | "\\u20E1".."\\u20E1" | "\\u302A".."\\u302F" | "\\u3099".."\\u309A" | "\\uFB1E".."\\uFB1E" | "\\uFE20".."\\uFE23"\n\n unicodeConnectorPunctuation = "\\u005F" | "\\u203F".."\\u2040" | "\\u30FB" | "\\uFE33".."\\uFE34" | "\\uFE4D".."\\uFE4F" | "\\uFF3F" | "\\uFF65"\n unicodeSpaceSeparator = "\\u2000".."\\u200B" | "\\u3000"\n\n}',
+ },
+ 'JSImports',
+ null,
+ 'JSImports',
+ {
+ JSImports: ['define', { sourceInterval: [16, 40] }, null, [], ['star', { sourceInterval: [28, 40] }, [
+ 'seq',
+ { sourceInterval: [29, 38] },
+ ['app', { sourceInterval: [29, 33] }, 'Expr', []],
+ ['opt', { sourceInterval: [34, 38] }, ['terminal', { sourceInterval: [34, 37] }, ';']],
+ ]]],
+ Expr: ['define', { sourceInterval: [46, 115] }, null, [], [
+ 'alt',
+ { sourceInterval: [58, 115] },
+ ['app', { sourceInterval: [60, 67] }, 'comment', []],
+ ['app', { sourceInterval: [74, 87] }, 'stringLiteral', []],
+ ['app', { sourceInterval: [94, 104] }, 'ImportExpr', []],
+ ['app', { sourceInterval: [111, 115] }, 'Rest', []],
+ ]],
+ ImportExpr_From: ['define', { sourceInterval: [140, 188] }, null, [], [
+ 'seq',
+ { sourceInterval: [140, 180] },
+ ['terminal', { sourceInterval: [140, 148] }, 'import'],
+ ['app', { sourceInterval: [149, 160] }, 'ImportInner', []],
+ ['terminal', { sourceInterval: [161, 167] }, 'from'],
+ ['app', { sourceInterval: [168, 180] }, 'importSource', []],
+ ]],
+ ImportExpr_NoFrom: ['define', { sourceInterval: [195, 226] }, null, [], ['seq', { sourceInterval: [195, 216] }, [
+ 'terminal',
+ { sourceInterval: [195, 203] },
+ 'import',
+ ], ['app', { sourceInterval: [204, 216] }, 'importSource', []]]],
+ ImportExpr: ['define', { sourceInterval: [121, 226] }, null, [], ['alt', { sourceInterval: [138, 226] }, [
+ 'app',
+ { sourceInterval: [140, 180] },
+ 'ImportExpr_From',
+ [],
+ ], ['app', { sourceInterval: [195, 216] }, 'ImportExpr_NoFrom', []]]],
+ Rest: ['define', { sourceInterval: [232, 285] }, null, [], ['plus', { sourceInterval: [239, 285] }, ['seq', {
+ sourceInterval: [240, 283],
+ }, ['not', { sourceInterval: [240, 279] }, [
+ 'alt',
+ { sourceInterval: [242, 278] },
+ ['app', { sourceInterval: [242, 252] }, 'ImportExpr', []],
+ ['app', { sourceInterval: [255, 262] }, 'comment', []],
+ ['app', { sourceInterval: [265, 278] }, 'stringLiteral', []],
+ ]], ['app', { sourceInterval: [280, 283] }, 'any', []]]]],
+ ImportInner_Type: ['define', { sourceInterval: [312, 405] }, null, [], [
+ 'seq',
+ { sourceInterval: [312, 386] },
+ ['terminal', { sourceInterval: [313, 319] }, 'type'],
+ ['terminal', { sourceInterval: [320, 323] }, '{'],
+ ['app', { sourceInterval: [324, 376] }, 'NonemptyListOf', [[
+ 'app',
+ { sourceInterval: [339, 370] },
+ 'ImportExtendedSelectionTypeless',
+ [],
+ ], ['terminal', { sourceInterval: [372, 375] }, ',']]],
+ ['opt', { sourceInterval: [377, 381] }, ['terminal', { sourceInterval: [377, 380] }, ',']],
+ ['terminal', { sourceInterval: [382, 385] }, '}'],
+ ]],
+ ImportInner_Types: ['define', { sourceInterval: [412, 506] }, null, [], ['seq', { sourceInterval: [412, 476] }, [
+ 'terminal',
+ { sourceInterval: [413, 416] },
+ '{',
+ ], ['app', { sourceInterval: [417, 466] }, 'NonemptyListOf', [[
+ 'app',
+ { sourceInterval: [432, 460] },
+ 'ImportExtendedSelectionTypes',
+ [],
+ ], ['terminal', { sourceInterval: [462, 465] }, ',']]], ['opt', { sourceInterval: [467, 471] }, ['terminal', {
+ sourceInterval: [467, 470],
+ }, ',']], ['terminal', { sourceInterval: [472, 475] }, '}']]],
+ ImportInner_Extended: ['define', { sourceInterval: [513, 610] }, null, [], ['seq', { sourceInterval: [513, 572] }, [
+ 'terminal',
+ { sourceInterval: [514, 517] },
+ '{',
+ ], ['app', { sourceInterval: [518, 562] }, 'NonemptyListOf', [[
+ 'app',
+ { sourceInterval: [533, 556] },
+ 'ImportExtendedSelection',
+ [],
+ ], ['terminal', { sourceInterval: [558, 561] }, ',']]], ['opt', { sourceInterval: [563, 567] }, ['terminal', {
+ sourceInterval: [563, 566],
+ }, ',']], ['terminal', { sourceInterval: [568, 571] }, '}']]],
+ ImportInner_Mixed: ['define', { sourceInterval: [617, 711] }, null, [], ['seq', { sourceInterval: [617, 702] }, [
+ 'app',
+ { sourceInterval: [618, 628] },
+ 'identifier',
+ [],
+ ], ['opt', { sourceInterval: [629, 701] }, [
+ 'seq',
+ { sourceInterval: [630, 699] },
+ ['terminal', { sourceInterval: [630, 633] }, ','],
+ ['opt', { sourceInterval: [634, 641] }, ['terminal', { sourceInterval: [634, 640] }, 'type']],
+ ['terminal', { sourceInterval: [642, 645] }, '{'],
+ ['app', { sourceInterval: [646, 690] }, 'NonemptyListOf', [[
+ 'app',
+ { sourceInterval: [661, 684] },
+ 'ImportExtendedSelection',
+ [],
+ ], ['terminal', { sourceInterval: [686, 689] }, ',']]],
+ ['opt', { sourceInterval: [691, 695] }, ['terminal', { sourceInterval: [691, 694] }, ',']],
+ ['terminal', { sourceInterval: [696, 699] }, '}'],
+ ]]]],
+ ImportInner_All: ['define', { sourceInterval: [718, 810] }, null, [], ['seq', { sourceInterval: [718, 742] }, [
+ 'terminal',
+ { sourceInterval: [719, 722] },
+ '*',
+ ], ['opt', { sourceInterval: [723, 741] }, ['seq', { sourceInterval: [724, 739] }, ['terminal', {
+ sourceInterval: [724, 728],
+ }, 'as'], ['app', { sourceInterval: [729, 739] }, 'identifier', []]]]]],
+ ImportInner_Default: ['define', { sourceInterval: [817, 913] }, null, [], ['seq', { sourceInterval: [817, 848] }, [
+ 'app',
+ { sourceInterval: [818, 828] },
+ 'identifier',
+ [],
+ ], ['opt', { sourceInterval: [829, 847] }, ['seq', { sourceInterval: [830, 845] }, ['terminal', {
+ sourceInterval: [830, 834],
+ }, 'as'], ['app', { sourceInterval: [835, 845] }, 'identifier', []]]]]],
+ ImportInner: ['define', { sourceInterval: [291, 913] }, null, [], [
+ 'alt',
+ { sourceInterval: [310, 913] },
+ ['app', { sourceInterval: [312, 386] }, 'ImportInner_Type', []],
+ ['app', { sourceInterval: [412, 476] }, 'ImportInner_Types', []],
+ ['app', { sourceInterval: [513, 572] }, 'ImportInner_Extended', []],
+ ['app', { sourceInterval: [617, 702] }, 'ImportInner_Mixed', []],
+ ['app', { sourceInterval: [718, 742] }, 'ImportInner_All', []],
+ ['app', { sourceInterval: [817, 848] }, 'ImportInner_Default', []],
+ ]],
+ ImportExtendedSelection: ['define', { sourceInterval: [924, 969] }, null, [], [
+ 'alt',
+ { sourceInterval: [950, 969] },
+ ['app', { sourceInterval: [950, 960] }, 'TypeImport', []],
+ ['app', { sourceInterval: [963, 969] }, 'Import', []],
+ ]],
+ ImportExtendedSelectionTypes: ['define', { sourceInterval: [974, 1015] }, null, [], [
+ 'app',
+ { sourceInterval: [1005, 1015] },
+ 'TypeImport',
+ [],
+ ]],
+ ImportExtendedSelectionTypeless: ['define', { sourceInterval: [1020, 1060] }, null, [], [
+ 'app',
+ { sourceInterval: [1054, 1060] },
+ 'Import',
+ [],
+ ]],
+ Import: ['define', { sourceInterval: [1066, 1104] }, null, [], ['seq', { sourceInterval: [1075, 1104] }, [
+ 'app',
+ { sourceInterval: [1075, 1085] },
+ 'identifier',
+ [],
+ ], ['opt', { sourceInterval: [1086, 1104] }, ['seq', { sourceInterval: [1087, 1102] }, ['terminal', {
+ sourceInterval: [1087, 1091],
+ }, 'as'], ['app', { sourceInterval: [1092, 1102] }, 'identifier', []]]]]],
+ TypeImport: ['define', { sourceInterval: [1109, 1154] }, null, [], [
+ 'seq',
+ { sourceInterval: [1122, 1154] },
+ ['terminal', { sourceInterval: [1122, 1128] }, 'type'],
+ ['app', { sourceInterval: [1129, 1135] }, 'Import', []],
+ ['opt', { sourceInterval: [1136, 1154] }, ['seq', { sourceInterval: [1137, 1152] }, ['terminal', {
+ sourceInterval: [1137, 1141],
+ }, 'as'], ['app', { sourceInterval: [1142, 1152] }, 'identifier', []]]],
+ ]],
+ identifier: ['define', { sourceInterval: [1160, 1186] }, null, [], ['seq', { sourceInterval: [1173, 1186] }, [
+ 'app',
+ { sourceInterval: [1173, 1179] },
+ 'letter',
+ [],
+ ], ['star', { sourceInterval: [1180, 1186] }, ['app', { sourceInterval: [1180, 1185] }, 'alnum', []]]]],
+ quote: ['define', { sourceInterval: [1191, 1215] }, null, [], [
+ 'alt',
+ { sourceInterval: [1199, 1215] },
+ ['terminal', { sourceInterval: [1199, 1203] }, '"'],
+ ['terminal', { sourceInterval: [1206, 1209] }, "'"],
+ ['terminal', { sourceInterval: [1212, 1215] }, '`'],
+ ]],
+ notQuote: ['define', { sourceInterval: [1220, 1241] }, null, [], ['seq', { sourceInterval: [1231, 1241] }, ['not', {
+ sourceInterval: [1231, 1237],
+ }, ['app', { sourceInterval: [1232, 1237] }, 'quote', []]], ['app', { sourceInterval: [1238, 1241] }, 'any', []]]],
+ importSource: ['define', { sourceInterval: [1246, 1334] }, null, [], [
+ 'alt',
+ { sourceInterval: [1265, 1334] },
+ ['seq', { sourceInterval: [1267, 1286] }, ['terminal', { sourceInterval: [1267, 1271] }, '"'], ['plus', {
+ sourceInterval: [1272, 1281],
+ }, ['app', { sourceInterval: [1272, 1280] }, 'notQuote', []]], [
+ 'terminal',
+ { sourceInterval: [1282, 1286] },
+ '"',
+ ]],
+ ['seq', { sourceInterval: [1293, 1310] }, ['terminal', { sourceInterval: [1293, 1296] }, "'"], ['plus', {
+ sourceInterval: [1297, 1306],
+ }, ['app', { sourceInterval: [1297, 1305] }, 'notQuote', []]], [
+ 'terminal',
+ { sourceInterval: [1307, 1310] },
+ "'",
+ ]],
+ ['seq', { sourceInterval: [1317, 1334] }, ['terminal', { sourceInterval: [1317, 1320] }, '`'], ['plus', {
+ sourceInterval: [1321, 1330],
+ }, ['app', { sourceInterval: [1321, 1329] }, 'notQuote', []]], [
+ 'terminal',
+ { sourceInterval: [1331, 1334] },
+ '`',
+ ]],
+ ]],
+ lineTerminator: ['define', { sourceInterval: [1340, 1390] }, null, [], [
+ 'alt',
+ { sourceInterval: [1357, 1390] },
+ ['terminal', { sourceInterval: [1357, 1361] }, '\n'],
+ ['terminal', { sourceInterval: [1364, 1368] }, '\r'],
+ ['terminal', { sourceInterval: [1371, 1379] }, '\u2028'],
+ ['terminal', { sourceInterval: [1382, 1390] }, '\u2029'],
+ ]],
+ lineTerminatorSequence: ['define', { sourceInterval: [1395, 1468] }, null, [], [
+ 'alt',
+ { sourceInterval: [1420, 1468] },
+ ['terminal', { sourceInterval: [1420, 1424] }, '\n'],
+ ['seq', { sourceInterval: [1427, 1437] }, ['terminal', { sourceInterval: [1427, 1431] }, '\r'], ['not', {
+ sourceInterval: [1432, 1437],
+ }, ['terminal', { sourceInterval: [1433, 1437] }, '\n']]],
+ ['terminal', { sourceInterval: [1440, 1448] }, '\u2028'],
+ ['terminal', { sourceInterval: [1451, 1459] }, '\u2029'],
+ ['terminal', { sourceInterval: [1462, 1468] }, '\r\n'],
+ ]],
+ comment: ['define', { sourceInterval: [1478, 1524] }, null, [], ['alt', { sourceInterval: [1488, 1524] }, [
+ 'app',
+ { sourceInterval: [1488, 1504] },
+ 'multiLineComment',
+ [],
+ ], ['app', { sourceInterval: [1507, 1524] }, 'singleLineComment', []]]],
+ multiLineComment: ['define', { sourceInterval: [1530, 1571] }, null, [], ['seq', { sourceInterval: [1549, 1571] }, [
+ 'terminal',
+ { sourceInterval: [1549, 1553] },
+ '/*',
+ ], ['star', { sourceInterval: [1554, 1566] }, ['seq', { sourceInterval: [1555, 1564] }, ['not', {
+ sourceInterval: [1555, 1560],
+ }, ['terminal', { sourceInterval: [1556, 1560] }, '*/']], ['app', { sourceInterval: [1561, 1564] }, 'any', []]]], [
+ 'terminal',
+ { sourceInterval: [1567, 1571] },
+ '*/',
+ ]]],
+ singleLineComment: ['define', { sourceInterval: [1576, 1623] }, null, [], [
+ 'seq',
+ { sourceInterval: [1596, 1623] },
+ ['terminal', { sourceInterval: [1596, 1600] }, '//'],
+ ['star', { sourceInterval: [1601, 1623] }, ['seq', { sourceInterval: [1602, 1621] }, ['not', {
+ sourceInterval: [1602, 1617],
+ }, ['app', { sourceInterval: [1603, 1617] }, 'lineTerminator', []]], [
+ 'app',
+ { sourceInterval: [1618, 1621] },
+ 'any',
+ [],
+ ]]],
+ ]],
+ stringLiteral: ['define', { sourceInterval: [1629, 1759] }, null, [], ['alt', { sourceInterval: [1649, 1759] }, [
+ 'seq',
+ { sourceInterval: [1651, 1683] },
+ ['terminal', { sourceInterval: [1651, 1655] }, '"'],
+ ['star', { sourceInterval: [1656, 1678] }, [
+ 'app',
+ { sourceInterval: [1656, 1677] },
+ 'doubleStringCharacter',
+ [],
+ ]],
+ ['terminal', { sourceInterval: [1679, 1683] }, '"'],
+ ], ['seq', { sourceInterval: [1690, 1720] }, ['terminal', { sourceInterval: [1690, 1693] }, "'"], ['star', {
+ sourceInterval: [1694, 1716],
+ }, ['app', { sourceInterval: [1694, 1715] }, 'singleStringCharacter', []]], ['terminal', {
+ sourceInterval: [1717, 1720],
+ }, "'"]], ['seq', { sourceInterval: [1727, 1759] }, ['terminal', { sourceInterval: [1727, 1730] }, '`'], ['star', {
+ sourceInterval: [1731, 1755],
+ }, ['app', { sourceInterval: [1731, 1754] }, 'templateStringCharacter', []]], ['terminal', {
+ sourceInterval: [1756, 1759],
+ }, '`']]]],
+ doubleStringCharacter_NonEscaped: ['define', { sourceInterval: [1794, 1845] }, null, [], ['seq', {
+ sourceInterval: [1794, 1829],
+ }, ['not', { sourceInterval: [1794, 1825] }, [
+ 'alt',
+ { sourceInterval: [1796, 1824] },
+ ['terminal', { sourceInterval: [1796, 1800] }, '"'],
+ ['terminal', { sourceInterval: [1803, 1807] }, '\\'],
+ ['app', { sourceInterval: [1810, 1824] }, 'lineTerminator', []],
+ ]], ['app', { sourceInterval: [1826, 1829] }, 'any', []]]],
+ doubleStringCharacter_Escaped: ['define', { sourceInterval: [1852, 1900] }, null, [], [
+ 'seq',
+ { sourceInterval: [1852, 1871] },
+ ['terminal', { sourceInterval: [1852, 1856] }, '\\'],
+ ['app', { sourceInterval: [1857, 1871] }, 'escapeSequence', []],
+ ]],
+ doubleStringCharacter_LineContinuation: ['define', { sourceInterval: [1907, 1964] }, null, [], [
+ 'app',
+ { sourceInterval: [1907, 1923] },
+ 'lineContinuation',
+ [],
+ ]],
+ doubleStringCharacter: ['define', { sourceInterval: [1764, 1964] }, null, [], [
+ 'alt',
+ { sourceInterval: [1792, 1964] },
+ ['app', { sourceInterval: [1794, 1829] }, 'doubleStringCharacter_NonEscaped', []],
+ ['app', { sourceInterval: [1852, 1871] }, 'doubleStringCharacter_Escaped', []],
+ ['app', { sourceInterval: [1907, 1923] }, 'doubleStringCharacter_LineContinuation', []],
+ ]],
+ singleStringCharacter_NonEscaped: ['define', { sourceInterval: [1999, 2050] }, null, [], ['seq', {
+ sourceInterval: [1999, 2033],
+ }, ['not', { sourceInterval: [1999, 2029] }, [
+ 'alt',
+ { sourceInterval: [2001, 2028] },
+ ['terminal', { sourceInterval: [2001, 2004] }, "'"],
+ ['terminal', { sourceInterval: [2007, 2011] }, '\\'],
+ ['app', { sourceInterval: [2014, 2028] }, 'lineTerminator', []],
+ ]], ['app', { sourceInterval: [2030, 2033] }, 'any', []]]],
+ singleStringCharacter_Escaped: ['define', { sourceInterval: [2057, 2105] }, null, [], [
+ 'seq',
+ { sourceInterval: [2057, 2076] },
+ ['terminal', { sourceInterval: [2057, 2061] }, '\\'],
+ ['app', { sourceInterval: [2062, 2076] }, 'escapeSequence', []],
+ ]],
+ singleStringCharacter_LineContinuation: ['define', { sourceInterval: [2112, 2169] }, null, [], [
+ 'app',
+ { sourceInterval: [2112, 2128] },
+ 'lineContinuation',
+ [],
+ ]],
+ singleStringCharacter: ['define', { sourceInterval: [1969, 2169] }, null, [], [
+ 'alt',
+ { sourceInterval: [1997, 2169] },
+ ['app', { sourceInterval: [1999, 2033] }, 'singleStringCharacter_NonEscaped', []],
+ ['app', { sourceInterval: [2057, 2076] }, 'singleStringCharacter_Escaped', []],
+ ['app', { sourceInterval: [2112, 2128] }, 'singleStringCharacter_LineContinuation', []],
+ ]],
+ templateStringCharacter_NonEscaped: ['define', { sourceInterval: [2207, 2258] }, null, [], ['seq', {
+ sourceInterval: [2207, 2225],
+ }, ['not', { sourceInterval: [2207, 2221] }, ['alt', { sourceInterval: [2210, 2220] }, ['terminal', {
+ sourceInterval: [2210, 2213],
+ }, '`'], ['terminal', { sourceInterval: [2216, 2220] }, '\\']]], [
+ 'app',
+ { sourceInterval: [2222, 2225] },
+ 'any',
+ [],
+ ]]],
+ templateStringCharacter_Escaped: ['define', { sourceInterval: [2265, 2318] }, null, [], [
+ 'seq',
+ { sourceInterval: [2265, 2284] },
+ ['terminal', { sourceInterval: [2265, 2269] }, '\\'],
+ ['app', { sourceInterval: [2270, 2284] }, 'escapeSequence', []],
+ ]],
+ templateStringCharacter: ['define', { sourceInterval: [2174, 2318] }, null, [], [
+ 'alt',
+ { sourceInterval: [2205, 2318] },
+ ['app', { sourceInterval: [2207, 2225] }, 'templateStringCharacter_NonEscaped', []],
+ ['app', { sourceInterval: [2265, 2284] }, 'templateStringCharacter_Escaped', []],
+ ]],
+ lineContinuation: ['define', { sourceInterval: [2323, 2369] }, null, [], ['seq', { sourceInterval: [2342, 2369] }, [
+ 'terminal',
+ { sourceInterval: [2342, 2346] },
+ '\\',
+ ], ['app', { sourceInterval: [2347, 2369] }, 'lineTerminatorSequence', []]]],
+ escapeSequence: ['define', { sourceInterval: [2374, 2480] }, null, [], [
+ 'alt',
+ { sourceInterval: [2391, 2480] },
+ ['app', { sourceInterval: [2391, 2412] }, 'unicodeEscapeSequence', []],
+ ['app', { sourceInterval: [2415, 2432] }, 'hexEscapeSequence', []],
+ ['app', { sourceInterval: [2435, 2454] }, 'octalEscapeSequence', []],
+ ['app', { sourceInterval: [2457, 2480] }, 'characterEscapeSequence', []],
+ ]],
+ characterEscapeSequence: ['define', { sourceInterval: [2485, 2553] }, null, [], [
+ 'alt',
+ { sourceInterval: [2511, 2553] },
+ ['app', { sourceInterval: [2511, 2532] }, 'singleEscapeCharacter', []],
+ ['app', { sourceInterval: [2535, 2553] }, 'nonEscapeCharacter', []],
+ ]],
+ singleEscapeCharacter: ['define', { sourceInterval: [2558, 2635] }, null, [], [
+ 'alt',
+ { sourceInterval: [2582, 2635] },
+ ['terminal', { sourceInterval: [2582, 2585] }, "'"],
+ ['terminal', { sourceInterval: [2588, 2592] }, '"'],
+ ['terminal', { sourceInterval: [2595, 2599] }, '\\'],
+ ['terminal', { sourceInterval: [2602, 2605] }, 'b'],
+ ['terminal', { sourceInterval: [2608, 2611] }, 'f'],
+ ['terminal', { sourceInterval: [2614, 2617] }, 'n'],
+ ['terminal', { sourceInterval: [2620, 2623] }, 'r'],
+ ['terminal', { sourceInterval: [2626, 2629] }, 't'],
+ ['terminal', { sourceInterval: [2632, 2635] }, 'v'],
+ ]],
+ nonEscapeCharacter: ['define', { sourceInterval: [2640, 2700] }, null, [], [
+ 'seq',
+ { sourceInterval: [2661, 2700] },
+ ['not', { sourceInterval: [2661, 2696] }, ['alt', { sourceInterval: [2663, 2695] }, [
+ 'app',
+ { sourceInterval: [2663, 2678] },
+ 'escapeCharacter',
+ [],
+ ], ['app', { sourceInterval: [2681, 2695] }, 'lineTerminator', []]]],
+ ['app', { sourceInterval: [2697, 2700] }, 'any', []],
+ ]],
+ escapeCharacter: ['define', { sourceInterval: [2705, 2771] }, null, [], [
+ 'alt',
+ { sourceInterval: [2723, 2771] },
+ ['app', { sourceInterval: [2723, 2744] }, 'singleEscapeCharacter', []],
+ ['app', { sourceInterval: [2747, 2759] }, 'decimalDigit', []],
+ ['terminal', { sourceInterval: [2762, 2765] }, 'x'],
+ ['terminal', { sourceInterval: [2768, 2771] }, 'u'],
+ ]],
+ octalEscapeSequence_Whole: ['define', { sourceInterval: [2804, 2850] }, null, [], [
+ 'seq',
+ { sourceInterval: [2804, 2837] },
+ ['app', { sourceInterval: [2804, 2815] }, 'zeroToThree', []],
+ ['app', { sourceInterval: [2816, 2826] }, 'octalDigit', []],
+ ['app', { sourceInterval: [2827, 2837] }, 'octalDigit', []],
+ ]],
+ octalEscapeSequence_EightTimesfourToSeven: ['define', { sourceInterval: [2857, 2919] }, null, [], [
+ 'seq',
+ { sourceInterval: [2857, 2879] },
+ ['app', { sourceInterval: [2857, 2868] }, 'fourToSeven', []],
+ ['app', { sourceInterval: [2869, 2879] }, 'octalDigit', []],
+ ]],
+ octalEscapeSequence_EightTimesZeroToThree: ['define', { sourceInterval: [2926, 2988] }, null, [], [
+ 'seq',
+ { sourceInterval: [2926, 2962] },
+ ['app', { sourceInterval: [2926, 2937] }, 'zeroToThree', []],
+ ['app', { sourceInterval: [2938, 2948] }, 'octalDigit', []],
+ ['not', { sourceInterval: [2949, 2962] }, ['app', { sourceInterval: [2950, 2962] }, 'decimalDigit', []]],
+ ]],
+ octalEscapeSequence_Octal: ['define', { sourceInterval: [2995, 3041] }, null, [], [
+ 'seq',
+ { sourceInterval: [2995, 3019] },
+ ['app', { sourceInterval: [2995, 3005] }, 'octalDigit', []],
+ ['not', { sourceInterval: [3006, 3019] }, ['app', { sourceInterval: [3007, 3019] }, 'decimalDigit', []]],
+ ]],
+ octalEscapeSequence: ['define', { sourceInterval: [2776, 3041] }, null, [], [
+ 'alt',
+ { sourceInterval: [2802, 3041] },
+ ['app', { sourceInterval: [2804, 2837] }, 'octalEscapeSequence_Whole', []],
+ ['app', { sourceInterval: [2857, 2879] }, 'octalEscapeSequence_EightTimesfourToSeven', []],
+ ['app', { sourceInterval: [2926, 2962] }, 'octalEscapeSequence_EightTimesZeroToThree', []],
+ ['app', { sourceInterval: [2995, 3019] }, 'octalEscapeSequence_Octal', []],
+ ]],
+ hexEscapeSequence: ['define', { sourceInterval: [3046, 3087] }, null, [], [
+ 'seq',
+ { sourceInterval: [3066, 3087] },
+ ['terminal', { sourceInterval: [3066, 3069] }, 'x'],
+ ['app', { sourceInterval: [3070, 3078] }, 'hexDigit', []],
+ ['app', { sourceInterval: [3079, 3087] }, 'hexDigit', []],
+ ]],
+ unicodeEscapeSequence: ['define', { sourceInterval: [3092, 3155] }, null, [], [
+ 'seq',
+ { sourceInterval: [3116, 3155] },
+ ['terminal', { sourceInterval: [3116, 3119] }, 'u'],
+ ['app', { sourceInterval: [3120, 3128] }, 'hexDigit', []],
+ ['app', { sourceInterval: [3129, 3137] }, 'hexDigit', []],
+ ['app', { sourceInterval: [3138, 3146] }, 'hexDigit', []],
+ ['app', { sourceInterval: [3147, 3155] }, 'hexDigit', []],
+ ]],
+ zeroToThree: ['define', { sourceInterval: [3161, 3183] }, null, [], [
+ 'range',
+ { sourceInterval: [3175, 3183] },
+ '0',
+ '3',
+ ]],
+ fourToSeven: ['define', { sourceInterval: [3188, 3210] }, null, [], [
+ 'range',
+ { sourceInterval: [3202, 3210] },
+ '4',
+ '7',
+ ]],
+ decimalDigit: ['define', { sourceInterval: [3215, 3238] }, null, [], [
+ 'range',
+ { sourceInterval: [3230, 3238] },
+ '0',
+ '9',
+ ]],
+ nonZeroDigit: ['define', { sourceInterval: [3243, 3266] }, null, [], [
+ 'range',
+ { sourceInterval: [3258, 3266] },
+ '1',
+ '9',
+ ]],
+ octalDigit: ['define', { sourceInterval: [3271, 3292] }, null, [], [
+ 'range',
+ { sourceInterval: [3284, 3292] },
+ '0',
+ '7',
+ ]],
+ regularExpressionLiteral: ['define', { sourceInterval: [3298, 3377] }, null, [], [
+ 'seq',
+ { sourceInterval: [3325, 3377] },
+ ['terminal', { sourceInterval: [3325, 3328] }, '/'],
+ ['app', { sourceInterval: [3329, 3350] }, 'regularExpressionBody', []],
+ ['terminal', { sourceInterval: [3351, 3354] }, '/'],
+ ['app', { sourceInterval: [3355, 3377] }, 'regularExpressionFlags', []],
+ ]],
+ regularExpressionBody: ['define', { sourceInterval: [3382, 3455] }, null, [], [
+ 'seq',
+ { sourceInterval: [3406, 3455] },
+ ['app', { sourceInterval: [3406, 3432] }, 'regularExpressionFirstChar', []],
+ ['star', { sourceInterval: [3433, 3455] }, [
+ 'app',
+ { sourceInterval: [3433, 3454] },
+ 'regularExpressionChar',
+ [],
+ ]],
+ ]],
+ regularExpressionFirstChar: ['define', { sourceInterval: [3460, 3621] }, null, [], ['alt', {
+ sourceInterval: [3493, 3621],
+ }, ['seq', { sourceInterval: [3495, 3551] }, ['not', { sourceInterval: [3495, 3520] }, [
+ 'alt',
+ { sourceInterval: [3497, 3519] },
+ ['terminal', { sourceInterval: [3497, 3500] }, '*'],
+ ['terminal', { sourceInterval: [3503, 3507] }, '\\'],
+ ['terminal', { sourceInterval: [3510, 3513] }, '/'],
+ ['terminal', { sourceInterval: [3516, 3519] }, '['],
+ ]], ['app', { sourceInterval: [3521, 3551] }, 'regularExpressionNonTerminator', []]], [
+ 'app',
+ { sourceInterval: [3558, 3592] },
+ 'regularExpressionBackslashSequence',
+ [],
+ ], ['app', { sourceInterval: [3599, 3621] }, 'regularExpressionClass', []]]],
+ regularExpressionChar: ['define', { sourceInterval: [3626, 3770] }, null, [], ['alt', {
+ sourceInterval: [3650, 3770],
+ }, ['seq', { sourceInterval: [3650, 3700] }, ['not', { sourceInterval: [3650, 3669] }, [
+ 'alt',
+ { sourceInterval: [3652, 3668] },
+ ['terminal', { sourceInterval: [3652, 3656] }, '\\'],
+ ['terminal', { sourceInterval: [3659, 3662] }, '/'],
+ ['terminal', { sourceInterval: [3665, 3668] }, '['],
+ ]], ['app', { sourceInterval: [3670, 3700] }, 'regularExpressionNonTerminator', []]], [
+ 'app',
+ { sourceInterval: [3707, 3741] },
+ 'regularExpressionBackslashSequence',
+ [],
+ ], ['app', { sourceInterval: [3748, 3770] }, 'regularExpressionClass', []]]],
+ regularExpressionBackslashSequence: ['define', { sourceInterval: [3775, 3847] }, null, [], [
+ 'seq',
+ { sourceInterval: [3812, 3847] },
+ ['terminal', { sourceInterval: [3812, 3816] }, '\\'],
+ ['app', { sourceInterval: [3817, 3847] }, 'regularExpressionNonTerminator', []],
+ ]],
+ regularExpressionNonTerminator: ['define', { sourceInterval: [3852, 3906] }, null, [], [
+ 'seq',
+ { sourceInterval: [3885, 3906] },
+ ['not', { sourceInterval: [3885, 3902] }, ['app', { sourceInterval: [3887, 3901] }, 'lineTerminator', []]],
+ ['app', { sourceInterval: [3903, 3906] }, 'any', []],
+ ]],
+ regularExpressionClass: ['define', { sourceInterval: [3911, 3971] }, null, [], [
+ 'seq',
+ { sourceInterval: [3936, 3971] },
+ ['terminal', { sourceInterval: [3936, 3939] }, '['],
+ ['star', { sourceInterval: [3940, 3967] }, [
+ 'app',
+ { sourceInterval: [3940, 3966] },
+ 'regularExpressionClassChar',
+ [],
+ ]],
+ ['terminal', { sourceInterval: [3968, 3971] }, ']'],
+ ]],
+ regularExpressionClassChar: ['define', { sourceInterval: [3976, 4096] }, null, [], ['alt', {
+ sourceInterval: [4009, 4096],
+ }, ['seq', { sourceInterval: [4011, 4055] }, ['not', { sourceInterval: [4011, 4024] }, [
+ 'alt',
+ { sourceInterval: [4013, 4023] },
+ ['terminal', { sourceInterval: [4013, 4016] }, ']'],
+ ['terminal', { sourceInterval: [4019, 4023] }, '\\'],
+ ]], ['app', { sourceInterval: [4025, 4055] }, 'regularExpressionNonTerminator', []]], [
+ 'app',
+ { sourceInterval: [4062, 4096] },
+ 'regularExpressionBackslashSequence',
+ [],
+ ]]],
+ regularExpressionFlags: ['define', { sourceInterval: [4101, 4141] }, null, [], ['star', {
+ sourceInterval: [4126, 4141],
+ }, ['app', { sourceInterval: [4126, 4140] }, 'identifierPart', []]]],
+ multiLineCommentNoNL: ['define', { sourceInterval: [4147, 4211] }, null, [], [
+ 'seq',
+ { sourceInterval: [4170, 4211] },
+ ['terminal', { sourceInterval: [4170, 4174] }, '/*'],
+ ['star', { sourceInterval: [4175, 4206] }, ['seq', { sourceInterval: [4176, 4204] }, ['not', {
+ sourceInterval: [4176, 4200],
+ }, ['alt', { sourceInterval: [4178, 4199] }, ['terminal', { sourceInterval: [4178, 4182] }, '*/'], [
+ 'app',
+ { sourceInterval: [4185, 4199] },
+ 'lineTerminator',
+ [],
+ ]]], ['app', { sourceInterval: [4201, 4204] }, 'any', []]]],
+ ['terminal', { sourceInterval: [4207, 4211] }, '*/'],
+ ]],
+ identifierStart_escaped: ['define', { sourceInterval: [4266, 4303] }, null, [], [
+ 'seq',
+ { sourceInterval: [4266, 4292] },
+ ['terminal', { sourceInterval: [4266, 4270] }, '\\'],
+ ['app', { sourceInterval: [4271, 4292] }, 'unicodeEscapeSequence', []],
+ ]],
+ identifierStart: ['define', { sourceInterval: [4217, 4303] }, null, [], [
+ 'alt',
+ { sourceInterval: [4239, 4303] },
+ ['app', { sourceInterval: [4241, 4247] }, 'letter', []],
+ ['terminal', { sourceInterval: [4250, 4253] }, '$'],
+ ['terminal', { sourceInterval: [4256, 4259] }, '_'],
+ ['app', { sourceInterval: [4266, 4292] }, 'identifierStart_escaped', []],
+ ]],
+ identifierPart: ['define', { sourceInterval: [4308, 4444] }, null, [], [
+ 'alt',
+ { sourceInterval: [4329, 4444] },
+ ['app', { sourceInterval: [4331, 4346] }, 'identifierStart', []],
+ ['app', { sourceInterval: [4349, 4369] }, 'unicodeCombiningMark', []],
+ ['app', { sourceInterval: [4376, 4388] }, 'unicodeDigit', []],
+ ['app', { sourceInterval: [4391, 4418] }, 'unicodeConnectorPunctuation', []],
+ ['terminal', { sourceInterval: [4425, 4433] }, ''],
+ ['terminal', { sourceInterval: [4436, 4444] }, ''],
+ ]],
+ letter: ['extend', { sourceInterval: [4449, 4476] }, null, [], [
+ 'app',
+ { sourceInterval: [4459, 4476] },
+ 'unicodeCategoryNl',
+ [],
+ ]],
+ unicodeCategoryNl: ['define', { sourceInterval: [4481, 4555] }, null, [], [
+ 'alt',
+ { sourceInterval: [4505, 4555] },
+ ['range', { sourceInterval: [4505, 4523] }, 'Ⅰ', 'ↂ'],
+ ['terminal', { sourceInterval: [4526, 4534] }, '〇'],
+ ['range', { sourceInterval: [4537, 4555] }, '〡', '〩'],
+ ]],
+ unicodeDigit: ['define', { sourceInterval: [4560, 4922] }, 'a digit', [], [
+ 'alt',
+ { sourceInterval: [4589, 4922] },
+ ['range', { sourceInterval: [4589, 4607] }, '0', '9'],
+ ['range', { sourceInterval: [4610, 4628] }, '٠', '٩'],
+ ['range', { sourceInterval: [4631, 4649] }, '۰', '۹'],
+ ['range', { sourceInterval: [4652, 4670] }, '०', '९'],
+ ['range', { sourceInterval: [4673, 4691] }, '০', '৯'],
+ ['range', { sourceInterval: [4694, 4712] }, '੦', '੯'],
+ ['range', { sourceInterval: [4715, 4733] }, '૦', '૯'],
+ ['range', { sourceInterval: [4736, 4754] }, '୦', '୯'],
+ ['range', { sourceInterval: [4757, 4775] }, '௧', '௯'],
+ ['range', { sourceInterval: [4778, 4796] }, '౦', '౯'],
+ ['range', { sourceInterval: [4799, 4817] }, '೦', '೯'],
+ ['range', { sourceInterval: [4820, 4838] }, '൦', '൯'],
+ ['range', { sourceInterval: [4841, 4859] }, '๐', '๙'],
+ ['range', { sourceInterval: [4862, 4880] }, '໐', '໙'],
+ ['range', { sourceInterval: [4883, 4901] }, '༠', '༩'],
+ ['range', { sourceInterval: [4904, 4922] }, '0', '9'],
+ ]],
+ unicodeCombiningMark: ['define', { sourceInterval: [4928, 6659] }, 'a Unicode combining mark', [], [
+ 'alt',
+ { sourceInterval: [4982, 6659] },
+ ['range', { sourceInterval: [4982, 5000] }, '̀', 'ͅ'],
+ ['range', { sourceInterval: [5003, 5021] }, '͠', '͡'],
+ ['range', { sourceInterval: [5024, 5042] }, '҃', '҆'],
+ ['range', { sourceInterval: [5045, 5063] }, '֑', '֡'],
+ ['range', { sourceInterval: [5066, 5084] }, '֣', 'ֹ'],
+ ['range', { sourceInterval: [5087, 5105] }, 'ֻ', 'ֽ'],
+ ['range', { sourceInterval: [5108, 5126] }, 'ֿ', 'ֿ'],
+ ['range', { sourceInterval: [5129, 5147] }, 'ׁ', 'ׂ'],
+ ['range', { sourceInterval: [5150, 5168] }, 'ׄ', 'ׄ'],
+ ['range', { sourceInterval: [5171, 5189] }, 'ً', 'ْ'],
+ ['range', { sourceInterval: [5192, 5210] }, 'ٰ', 'ٰ'],
+ ['range', { sourceInterval: [5213, 5231] }, 'ۖ', 'ۜ'],
+ ['range', { sourceInterval: [5234, 5252] }, '۟', 'ۤ'],
+ ['range', { sourceInterval: [5255, 5273] }, 'ۧ', 'ۨ'],
+ ['range', { sourceInterval: [5276, 5294] }, '۪', 'ۭ'],
+ ['range', { sourceInterval: [5297, 5315] }, 'ँ', 'ं'],
+ ['range', { sourceInterval: [5318, 5336] }, '़', '़'],
+ ['range', { sourceInterval: [5339, 5357] }, 'ु', 'ै'],
+ ['range', { sourceInterval: [5360, 5378] }, '्', '्'],
+ ['range', { sourceInterval: [5381, 5399] }, '॑', '॔'],
+ ['range', { sourceInterval: [5402, 5420] }, 'ॢ', 'ॣ'],
+ ['range', { sourceInterval: [5423, 5441] }, 'ঁ', 'ঁ'],
+ ['range', { sourceInterval: [5444, 5462] }, '়', '়'],
+ ['range', { sourceInterval: [5465, 5483] }, 'ু', 'ৄ'],
+ ['range', { sourceInterval: [5486, 5504] }, '্', '্'],
+ ['range', { sourceInterval: [5507, 5525] }, 'ৢ', 'ৣ'],
+ ['range', { sourceInterval: [5528, 5546] }, 'ਂ', 'ਂ'],
+ ['range', { sourceInterval: [5549, 5567] }, '਼', '਼'],
+ ['range', { sourceInterval: [5570, 5588] }, 'ੁ', 'ੂ'],
+ ['range', { sourceInterval: [5591, 5609] }, 'ੇ', 'ੈ'],
+ ['range', { sourceInterval: [5612, 5630] }, 'ੋ', '੍'],
+ ['range', { sourceInterval: [5633, 5651] }, 'ੰ', 'ੱ'],
+ ['range', { sourceInterval: [5654, 5672] }, 'ઁ', 'ં'],
+ ['range', { sourceInterval: [5675, 5693] }, '઼', '઼'],
+ ['range', { sourceInterval: [5696, 5714] }, 'ુ', 'ૅ'],
+ ['range', { sourceInterval: [5717, 5735] }, 'ે', 'ૈ'],
+ ['range', { sourceInterval: [5738, 5756] }, '્', '્'],
+ ['range', { sourceInterval: [5759, 5777] }, 'ଁ', 'ଁ'],
+ ['range', { sourceInterval: [5780, 5798] }, '଼', '଼'],
+ ['range', { sourceInterval: [5801, 5819] }, 'ି', 'ି'],
+ ['range', { sourceInterval: [5822, 5840] }, 'ୁ', 'ୃ'],
+ ['range', { sourceInterval: [5843, 5861] }, '୍', '୍'],
+ ['range', { sourceInterval: [5864, 5882] }, 'ୖ', 'ୖ'],
+ ['range', { sourceInterval: [5885, 5903] }, 'ஂ', 'ஂ'],
+ ['range', { sourceInterval: [5906, 5924] }, 'ீ', 'ீ'],
+ ['range', { sourceInterval: [5927, 5945] }, '்', '்'],
+ ['range', { sourceInterval: [5948, 5966] }, 'ా', 'ీ'],
+ ['range', { sourceInterval: [5969, 5987] }, 'ె', 'ై'],
+ ['range', { sourceInterval: [5990, 6008] }, 'ొ', '్'],
+ ['range', { sourceInterval: [6011, 6029] }, 'ౕ', 'ౖ'],
+ ['range', { sourceInterval: [6032, 6050] }, 'ಿ', 'ಿ'],
+ ['range', { sourceInterval: [6053, 6071] }, 'ೆ', 'ೆ'],
+ ['range', { sourceInterval: [6074, 6092] }, 'ೌ', '್'],
+ ['range', { sourceInterval: [6095, 6113] }, 'ു', 'ൃ'],
+ ['range', { sourceInterval: [6116, 6134] }, '്', '്'],
+ ['range', { sourceInterval: [6137, 6155] }, 'ั', 'ั'],
+ ['range', { sourceInterval: [6158, 6176] }, 'ิ', 'ฺ'],
+ ['range', { sourceInterval: [6179, 6197] }, '็', '๎'],
+ ['range', { sourceInterval: [6200, 6218] }, 'ັ', 'ັ'],
+ ['range', { sourceInterval: [6221, 6239] }, 'ິ', 'ູ'],
+ ['range', { sourceInterval: [6242, 6260] }, 'ົ', 'ຼ'],
+ ['range', { sourceInterval: [6263, 6281] }, '່', 'ໍ'],
+ ['range', { sourceInterval: [6284, 6302] }, '༘', '༙'],
+ ['range', { sourceInterval: [6305, 6323] }, '༵', '༵'],
+ ['range', { sourceInterval: [6326, 6344] }, '༷', '༷'],
+ ['range', { sourceInterval: [6347, 6365] }, '༹', '༹'],
+ ['range', { sourceInterval: [6368, 6386] }, 'ཱ', 'ཾ'],
+ ['range', { sourceInterval: [6389, 6407] }, 'ྀ', '྄'],
+ ['range', { sourceInterval: [6410, 6428] }, '྆', '྇'],
+ ['range', { sourceInterval: [6431, 6449] }, 'ྐ', 'ྕ'],
+ ['range', { sourceInterval: [6452, 6470] }, 'ྗ', 'ྗ'],
+ ['range', { sourceInterval: [6473, 6491] }, 'ྙ', 'ྭ'],
+ ['range', { sourceInterval: [6494, 6512] }, 'ྱ', 'ྷ'],
+ ['range', { sourceInterval: [6515, 6533] }, 'ྐྵ', 'ྐྵ'],
+ ['range', { sourceInterval: [6536, 6554] }, '⃐', '⃜'],
+ ['range', { sourceInterval: [6557, 6575] }, '⃡', '⃡'],
+ ['range', { sourceInterval: [6578, 6596] }, '〪', '〯'],
+ ['range', { sourceInterval: [6599, 6617] }, '゙', '゚'],
+ ['range', { sourceInterval: [6620, 6638] }, 'ﬞ', 'ﬞ'],
+ ['range', { sourceInterval: [6641, 6659] }, '︠', '︣'],
+ ]],
+ unicodeConnectorPunctuation: ['define', { sourceInterval: [6665, 6799] }, null, [], [
+ 'alt',
+ { sourceInterval: [6695, 6799] },
+ ['terminal', { sourceInterval: [6695, 6703] }, '_'],
+ ['range', { sourceInterval: [6706, 6724] }, '‿', '⁀'],
+ ['terminal', { sourceInterval: [6727, 6735] }, '・'],
+ ['range', { sourceInterval: [6738, 6756] }, '︳', '︴'],
+ ['range', { sourceInterval: [6759, 6777] }, '﹍', '﹏'],
+ ['terminal', { sourceInterval: [6780, 6788] }, '_'],
+ ['terminal', { sourceInterval: [6791, 6799] }, '・'],
+ ]],
+ unicodeSpaceSeparator: ['define', { sourceInterval: [6804, 6857] }, null, [], [
+ 'alt',
+ { sourceInterval: [6828, 6857] },
+ ['range', { sourceInterval: [6828, 6846] }, ' ', ''],
+ ['terminal', { sourceInterval: [6849, 6857] }, ' '],
+ ]],
+ },
+]);
+export default result;
diff --git a/drizzle-kit/imports-checker/index.ts b/drizzle-kit/imports-checker/index.ts
new file mode 100644
index 000000000..7a4e90838
--- /dev/null
+++ b/drizzle-kit/imports-checker/index.ts
@@ -0,0 +1,48 @@
+import chalk from 'chalk';
+import { analyzeImports, ChainLink } from './checker';
+
+const issues = analyzeImports({
+ basePath: './drizzle-kit',
+ localPaths: ['src'],
+ whiteList: [
+ '@drizzle-team/brocli',
+ 'json-diff',
+ 'path',
+ 'fs',
+ 'fs/*',
+ 'url',
+ 'zod',
+ 'node:*',
+ 'hono',
+ 'glob',
+ 'hono/*',
+ 'hono/**/*',
+ '@hono/*',
+ 'crypto',
+ 'hanji',
+ ],
+ entry: './drizzle-kit/src/cli/index.ts',
+ logger: true,
+ ignoreTypes: true,
+}).issues;
+
+const chainToString = (chains: ChainLink[]) => {
+ if (chains.length === 0) throw new Error();
+
+ let out = chains[0]!.file + '\n';
+ let indentation = 0;
+ for (let chain of chains) {
+ out += ' '.repeat(indentation)
+ + '└'
+ + chain.import
+ + ` ${chalk.gray(chain.file)}\n`;
+ indentation += 1;
+ }
+ return out;
+};
+
+console.log();
+for (const issue of issues) {
+ console.log(chalk.red(issue.imports.map((it) => it.name).join('\n')));
+ console.log(issue.accessChains.map((it) => chainToString(it)).join('\n'));
+}
diff --git a/drizzle-kit/package.json b/drizzle-kit/package.json
index c3f885722..6e2fec181 100644
--- a/drizzle-kit/package.json
+++ b/drizzle-kit/package.json
@@ -1,12 +1,13 @@
{
"name": "drizzle-kit",
- "version": "0.23.2",
+ "version": "0.30.2",
"homepage": "https://orm.drizzle.team",
"keywords": [
"drizzle",
"orm",
"pg",
"mysql",
+ "singlestore",
"postgresql",
"postgres",
"sqlite",
@@ -34,15 +35,15 @@
"api": "tsx ./dev/api.ts",
"migrate:old": "drizzle-kit generate:mysql",
"cli": "tsx ./src/cli/index.ts",
- "test": "TEST_CONFIG_PATH_PREFIX=./tests/cli/ vitest",
+ "test": "pnpm tsc && TEST_CONFIG_PATH_PREFIX=./tests/cli/ vitest",
"build": "rm -rf ./dist && tsx build.ts && cp package.json dist/ && attw --pack dist",
"build:dev": "rm -rf ./dist && tsx build.dev.ts && tsc -p tsconfig.cli-types.json && chmod +x ./dist/index.cjs",
"pack": "cp package.json README.md dist/ && (cd dist && npm pack --pack-destination ..) && rm -f package.tgz && mv *.tgz package.tgz",
- "tsc": "tsc -p tsconfig.build.json",
+ "tsc": "tsc -p tsconfig.build.json --noEmit",
"publish": "npm publish package.tgz"
},
"dependencies": {
- "@drizzle-team/brocli": "^0.8.2",
+ "@drizzle-team/brocli": "^0.10.2",
"@esbuild-kit/esm-loader": "^2.5.5",
"esbuild": "^0.19.7",
"esbuild-register": "^3.5.0"
@@ -51,10 +52,10 @@
"@arethetypeswrong/cli": "^0.15.3",
"@aws-sdk/client-rds-data": "^3.556.0",
"@cloudflare/workers-types": "^4.20230518.0",
- "@electric-sql/pglite": "^0.1.5",
+ "@electric-sql/pglite": "^0.2.12",
"@hono/node-server": "^1.9.0",
"@hono/zod-validator": "^0.2.1",
- "@libsql/client": "^0.4.2",
+ "@libsql/client": "^0.10.0",
"@neondatabase/serverless": "^0.9.1",
"@originjs/vite-plugin-commonjs": "^1.0.3",
"@planetscale/database": "^1.16.0",
@@ -62,6 +63,7 @@
"@types/dockerode": "^3.3.28",
"@types/glob": "^8.1.0",
"@types/json-diff": "^1.0.3",
+ "@types/micromatch": "^4.0.9",
"@types/minimatch": "^5.1.2",
"@types/node": "^18.11.15",
"@types/pg": "^8.10.7",
@@ -74,12 +76,13 @@
"@vercel/postgres": "^0.8.0",
"ava": "^5.1.0",
"better-sqlite3": "^9.4.3",
+ "bun-types": "^0.6.6",
"camelcase": "^7.0.1",
"chalk": "^5.2.0",
"commander": "^12.1.0",
"dockerode": "^3.3.4",
"dotenv": "^16.0.3",
- "drizzle-kit": "0.21.2",
+ "drizzle-kit": "0.25.0-b1faa33",
"drizzle-orm": "workspace:./drizzle-orm/dist",
"env-paths": "^3.0.0",
"esbuild-node-externals": "^1.9.0",
@@ -91,9 +94,11 @@
"hanji": "^0.0.5",
"hono": "^4.1.5",
"json-diff": "1.0.6",
+ "micromatch": "^4.0.8",
"minimatch": "^7.4.3",
- "mysql2": "2.3.3",
+ "mysql2": "3.3.3",
"node-fetch": "^3.3.2",
+ "ohm-js": "^17.1.0",
"pg": "^8.11.5",
"pluralize": "^8.0.0",
"postgres": "^3.4.4",
@@ -102,7 +107,7 @@
"superjson": "^2.2.1",
"tsup": "^8.0.2",
"tsx": "^3.12.1",
- "typescript": "^5.4.3",
+ "typescript": "^5.6.3",
"uuid": "^9.0.1",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.4.0",
diff --git a/drizzle-kit/pnpm-lock.yaml b/drizzle-kit/pnpm-lock.yaml
deleted file mode 100644
index 8f4d58f55..000000000
--- a/drizzle-kit/pnpm-lock.yaml
+++ /dev/null
@@ -1,7603 +0,0 @@
-lockfileVersion: '9.0'
-
-settings:
- autoInstallPeers: true
- excludeLinksFromLockfile: false
-
-patchedDependencies:
- difflib@0.2.4:
- hash: jq4t3ysdpnbunjeje4v7nrqn2q
- path: patches/difflib@0.2.4.patch
-
-importers:
-
- .:
- dependencies:
- '@esbuild-kit/esm-loader':
- specifier: ^2.5.5
- version: 2.6.5
- esbuild:
- specifier: ^0.19.7
- version: 0.19.12
- esbuild-register:
- specifier: ^3.5.0
- version: 3.5.0(esbuild@0.19.12)
- devDependencies:
- '@arethetypeswrong/cli':
- specifier: ^0.15.3
- version: 0.15.3
- '@aws-sdk/client-rds-data':
- specifier: ^3.556.0
- version: 3.577.0
- '@cloudflare/workers-types':
- specifier: ^4.20230518.0
- version: 4.20240512.0
- '@electric-sql/pglite':
- specifier: ^0.1.5
- version: 0.1.5
- '@hono/node-server':
- specifier: ^1.9.0
- version: 1.11.1
- '@hono/zod-validator':
- specifier: ^0.2.1
- version: 0.2.1(hono@4.3.9)(zod@3.23.8)
- '@libsql/client':
- specifier: ^0.4.2
- version: 0.4.3(bufferutil@4.0.8)(utf-8-validate@6.0.3)
- '@neondatabase/serverless':
- specifier: ^0.9.1
- version: 0.9.3
- '@originjs/vite-plugin-commonjs':
- specifier: ^1.0.3
- version: 1.0.3
- '@planetscale/database':
- specifier: ^1.16.0
- version: 1.18.0
- '@types/better-sqlite3':
- specifier: ^7.6.4
- version: 7.6.10
- '@types/dockerode':
- specifier: ^3.3.28
- version: 3.3.29
- '@types/glob':
- specifier: ^8.1.0
- version: 8.1.0
- '@types/json-diff':
- specifier: ^1.0.3
- version: 1.0.3
- '@types/minimatch':
- specifier: ^5.1.2
- version: 5.1.2
- '@types/node':
- specifier: ^18.11.15
- version: 18.19.33
- '@types/pg':
- specifier: ^8.10.7
- version: 8.11.6
- '@types/pluralize':
- specifier: ^0.0.33
- version: 0.0.33
- '@types/semver':
- specifier: ^7.5.5
- version: 7.5.8
- '@types/uuid':
- specifier: ^9.0.8
- version: 9.0.8
- '@types/ws':
- specifier: ^8.5.10
- version: 8.5.10
- '@typescript-eslint/eslint-plugin':
- specifier: ^7.2.0
- version: 7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)
- '@typescript-eslint/parser':
- specifier: ^7.2.0
- version: 7.10.0(eslint@8.57.0)(typescript@5.4.5)
- '@vercel/postgres':
- specifier: ^0.8.0
- version: 0.8.0
- ava:
- specifier: ^5.1.0
- version: 5.3.1
- better-sqlite3:
- specifier: ^9.4.3
- version: 9.6.0
- camelcase:
- specifier: ^7.0.1
- version: 7.0.1
- chalk:
- specifier: ^5.2.0
- version: 5.3.0
- commander:
- specifier: ^12.1.0
- version: 12.1.0
- dockerode:
- specifier: ^3.3.4
- version: 3.3.5
- dotenv:
- specifier: ^16.0.3
- version: 16.4.5
- drizzle-kit:
- specifier: 0.21.2
- version: 0.21.2
- drizzle-orm:
- specifier: 0.32.0-85c8008
- version: 0.32.0-85c8008(@aws-sdk/client-rds-data@3.577.0)(@cloudflare/workers-types@4.20240512.0)(@electric-sql/pglite@0.1.5)(@libsql/client@0.4.3(bufferutil@4.0.8)(utf-8-validate@6.0.3))(@neondatabase/serverless@0.9.3)(@planetscale/database@1.18.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.11.6)(@vercel/postgres@0.8.0)(better-sqlite3@9.6.0)(mysql2@2.3.3)(pg@8.11.5)(postgres@3.4.4)
- env-paths:
- specifier: ^3.0.0
- version: 3.0.0
- esbuild-node-externals:
- specifier: ^1.9.0
- version: 1.13.1(esbuild@0.19.12)
- eslint:
- specifier: ^8.57.0
- version: 8.57.0
- eslint-config-prettier:
- specifier: ^9.1.0
- version: 9.1.0(eslint@8.57.0)
- eslint-plugin-prettier:
- specifier: ^5.1.3
- version: 5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@2.8.8)
- get-port:
- specifier: ^6.1.2
- version: 6.1.2
- glob:
- specifier: ^8.1.0
- version: 8.1.0
- hanji:
- specifier: ^0.0.5
- version: 0.0.5
- hono:
- specifier: ^4.1.5
- version: 4.3.9
- json-diff:
- specifier: 1.0.6
- version: 1.0.6
- minimatch:
- specifier: ^7.4.3
- version: 7.4.6
- mysql2:
- specifier: 2.3.3
- version: 2.3.3
- node-fetch:
- specifier: ^3.3.2
- version: 3.3.2
- pg:
- specifier: ^8.11.5
- version: 8.11.5
- pluralize:
- specifier: ^8.0.0
- version: 8.0.0
- postgres:
- specifier: ^3.4.4
- version: 3.4.4
- prettier:
- specifier: ^2.8.1
- version: 2.8.8
- semver:
- specifier: ^7.5.4
- version: 7.6.2
- superjson:
- specifier: ^2.2.1
- version: 2.2.1
- tsup:
- specifier: ^8.0.2
- version: 8.0.2(postcss@8.4.38)(typescript@5.4.5)
- tsx:
- specifier: ^3.12.1
- version: 3.14.0
- typescript:
- specifier: ^5.4.3
- version: 5.4.5
- uuid:
- specifier: ^9.0.1
- version: 9.0.1
- vite-tsconfig-paths:
- specifier: ^4.3.2
- version: 4.3.2(typescript@5.4.5)(vite@5.2.11(@types/node@18.19.33))
- vitest:
- specifier: ^1.4.0
- version: 1.6.0(@types/node@18.19.33)
- wrangler:
- specifier: ^3.22.1
- version: 3.57.0(@cloudflare/workers-types@4.20240512.0)(bufferutil@4.0.8)(utf-8-validate@6.0.3)
- ws:
- specifier: ^8.16.0
- version: 8.17.0(bufferutil@4.0.8)(utf-8-validate@6.0.3)
- zod:
- specifier: ^3.20.2
- version: 3.23.8
- zx:
- specifier: ^7.2.2
- version: 7.2.3
-
-packages:
-
- '@andrewbranch/untar.js@1.0.3':
- resolution: {integrity: sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw==}
-
- '@arethetypeswrong/cli@0.15.3':
- resolution: {integrity: sha512-sIMA9ZJBWDEg1+xt5RkAEflZuf8+PO8SdKj17x6PtETuUho+qlZJg4DgmKc3q+QwQ9zOB5VLK6jVRbFdNLdUIA==}
- engines: {node: '>=18'}
- hasBin: true
-
- '@arethetypeswrong/core@0.15.1':
- resolution: {integrity: sha512-FYp6GBAgsNz81BkfItRz8RLZO03w5+BaeiPma1uCfmxTnxbtuMrI/dbzGiOk8VghO108uFI0oJo0OkewdSHw7g==}
- engines: {node: '>=18'}
-
- '@aws-crypto/ie11-detection@3.0.0':
- resolution: {integrity: sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==}
-
- '@aws-crypto/sha256-browser@3.0.0':
- resolution: {integrity: sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==}
-
- '@aws-crypto/sha256-js@3.0.0':
- resolution: {integrity: sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==}
-
- '@aws-crypto/supports-web-crypto@3.0.0':
- resolution: {integrity: sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg==}
-
- '@aws-crypto/util@3.0.0':
- resolution: {integrity: sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==}
-
- '@aws-sdk/client-rds-data@3.577.0':
- resolution: {integrity: sha512-24a27II6UkNhe2RB6ZwtQPcM3QB/DuRcKvzMmfvipgWS72Q5FEtuq3CO66IObWUel/pxi3ucE6mSvVCFnm7tBQ==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/client-sso-oidc@3.577.0':
- resolution: {integrity: sha512-njmKSPDWueWWYVFpFcZ2P3fI6/pdQVDa0FgCyYZhOnJLgEHZIcBBg1AsnkVWacBuLopp9XVt2m+7hO6ugY1/1g==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/client-sso@3.577.0':
- resolution: {integrity: sha512-BwujdXrydlk6UEyPmewm5GqG4nkQ6OVyRhS/SyZP/6UKSFv2/sf391Cmz0hN0itUTH1rR4XeLln8XCOtarkrzg==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/client-sts@3.577.0':
- resolution: {integrity: sha512-509Kklimva1XVlhGbpTpeX3kOP6ORpm44twJxDHpa9TURbmoaxj7veWlnLCbDorxDTrbsDghvYZshvcLsojVpg==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/core@3.576.0':
- resolution: {integrity: sha512-KDvDlbeipSTIf+ffKtTg1m419TK7s9mZSWC8bvuZ9qx6/sjQFOXIKOVqyuli6DnfxGbvRcwoRuY99OcCH1N/0w==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/credential-provider-env@3.577.0':
- resolution: {integrity: sha512-Jxu255j0gToMGEiqufP8ZtKI8HW90lOLjwJ3LrdlD/NLsAY0tOQf1fWc53u28hWmmNGMxmCrL2p66IOgMDhDUw==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/credential-provider-http@3.577.0':
- resolution: {integrity: sha512-n++yhCp67b9+ZRGEdY1jhamB5E/O+QsIDOPSuRmdaSGMCOd82oUEKPgIVEU1bkqxDsBxgiEWuvtfhK6sNiDS0A==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/credential-provider-ini@3.577.0':
- resolution: {integrity: sha512-q7lHPtv6BjRvChUE3m0tIaEZKxPTaZ1B3lKxGYsFl3VLAu5N8yGCUKwuA1izf4ucT+LyKscVGqK6VDZx1ev3nw==}
- engines: {node: '>=16.0.0'}
- peerDependencies:
- '@aws-sdk/client-sts': ^3.577.0
-
- '@aws-sdk/credential-provider-node@3.577.0':
- resolution: {integrity: sha512-epZ1HOMsrXBNczc0HQpv0VMjqAEpc09DUA7Rg3gUJfn8umhML7A7bXnUyqPA+S54q397UYg1leQKdSn23OiwQQ==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/credential-provider-process@3.577.0':
- resolution: {integrity: sha512-Gin6BWtOiXxIgITrJ3Nwc+Y2P1uVT6huYR4EcbA/DJUPWyO0n9y5UFLewPvVbLkRn15JeEqErBLUrHclkiOKtw==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/credential-provider-sso@3.577.0':
- resolution: {integrity: sha512-iVm5SQvS7EgZTJsRaqUOmDQpBQPPPat42SCbWFvFQOLrl8qewq8OP94hFS5w2mP62zngeYzqhJnDel79HXbxew==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/credential-provider-web-identity@3.577.0':
- resolution: {integrity: sha512-ZGHGNRaCtJJmszb9UTnC7izNCtRUttdPlLdMkh41KPS32vfdrBDHs1JrpbZijItRj1xKuOXsiYSXLAaHGcLh8Q==}
- engines: {node: '>=16.0.0'}
- peerDependencies:
- '@aws-sdk/client-sts': ^3.577.0
-
- '@aws-sdk/middleware-host-header@3.577.0':
- resolution: {integrity: sha512-9ca5MJz455CODIVXs0/sWmJm7t3QO4EUa1zf8pE8grLpzf0J94bz/skDWm37Pli13T3WaAQBHCTiH2gUVfCsWg==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/middleware-logger@3.577.0':
- resolution: {integrity: sha512-aPFGpGjTZcJYk+24bg7jT4XdIp42mFXSuPt49lw5KygefLyJM/sB0bKKqPYYivW0rcuZ9brQ58eZUNthrzYAvg==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/middleware-recursion-detection@3.577.0':
- resolution: {integrity: sha512-pn3ZVEd2iobKJlR3H+bDilHjgRnNrQ6HMmK9ZzZw89Ckn3Dcbv48xOv4RJvu0aU8SDLl/SNCxppKjeLDTPGBNA==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/middleware-user-agent@3.577.0':
- resolution: {integrity: sha512-P55HAXgwmiHHpFx5JEPvOnAbfhN7v6sWv9PBQs+z2tC7QiBcPS0cdJR6PfV7J1n4VPK52/OnrK3l9VxdQ7Ms0g==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/region-config-resolver@3.577.0':
- resolution: {integrity: sha512-4ChCFACNwzqx/xjg3zgFcW8Ali6R9C95cFECKWT/7CUM1D0MGvkclSH2cLarmHCmJgU6onKkJroFtWp0kHhgyg==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/token-providers@3.577.0':
- resolution: {integrity: sha512-0CkIZpcC3DNQJQ1hDjm2bdSy/Xjs7Ny5YvSsacasGOkNfk+FdkiQy6N67bZX3Zbc9KIx+Nz4bu3iDeNSNplnnQ==}
- engines: {node: '>=16.0.0'}
- peerDependencies:
- '@aws-sdk/client-sso-oidc': ^3.577.0
-
- '@aws-sdk/types@3.577.0':
- resolution: {integrity: sha512-FT2JZES3wBKN/alfmhlo+3ZOq/XJ0C7QOZcDNrpKjB0kqYoKjhVKZ/Hx6ArR0czkKfHzBBEs6y40ebIHx2nSmA==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/util-endpoints@3.577.0':
- resolution: {integrity: sha512-FjuUz1Kdy4Zly2q/c58tpdqHd6z7iOdU/caYzoc8jwgAHBDBbIJNQLCU9hXJnPV2M8pWxQDyIZsoVwtmvErPzw==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/util-locate-window@3.568.0':
- resolution: {integrity: sha512-3nh4TINkXYr+H41QaPelCceEB2FXP3fxp93YZXB/kqJvX0U9j0N0Uk45gvsjmEPzG8XxkPEeLIfT2I1M7A6Lig==}
- engines: {node: '>=16.0.0'}
-
- '@aws-sdk/util-user-agent-browser@3.577.0':
- resolution: {integrity: sha512-zEAzHgR6HWpZOH7xFgeJLc6/CzMcx4nxeQolZxVZoB5pPaJd3CjyRhZN0xXeZB0XIRCWmb4yJBgyiugXLNMkLA==}
-
- '@aws-sdk/util-user-agent-node@3.577.0':
- resolution: {integrity: sha512-XqvtFjbSMtycZTWVwDe8DRWovuoMbA54nhUoZwVU6rW9OSD6NZWGR512BUGHFaWzW0Wg8++Dj10FrKTG2XtqfA==}
- engines: {node: '>=16.0.0'}
- peerDependencies:
- aws-crt: '>=1.0.0'
- peerDependenciesMeta:
- aws-crt:
- optional: true
-
- '@aws-sdk/util-utf8-browser@3.259.0':
- resolution: {integrity: sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==}
-
- '@balena/dockerignore@1.0.2':
- resolution: {integrity: sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q==}
-
- '@cloudflare/kv-asset-handler@0.3.2':
- resolution: {integrity: sha512-EeEjMobfuJrwoctj7FA1y1KEbM0+Q1xSjobIEyie9k4haVEBB7vkDvsasw1pM3rO39mL2akxIAzLMUAtrMHZhA==}
- engines: {node: '>=16.13'}
-
- '@cloudflare/workerd-darwin-64@1.20240512.0':
- resolution: {integrity: sha512-VMp+CsSHFALQiBzPdQ5dDI4T1qwLu0mQ0aeKVNDosXjueN0f3zj/lf+mFil5/9jBbG3t4mG0y+6MMnalP9Lobw==}
- engines: {node: '>=16'}
- cpu: [x64]
- os: [darwin]
-
- '@cloudflare/workerd-darwin-arm64@1.20240512.0':
- resolution: {integrity: sha512-lZktXGmzMrB5rJqY9+PmnNfv1HKlj/YLZwMjPfF0WVKHUFdvQbAHsi7NlKv6mW9uIvlZnS+K4sIkWc0MDXcRnA==}
- engines: {node: '>=16'}
- cpu: [arm64]
- os: [darwin]
-
- '@cloudflare/workerd-linux-64@1.20240512.0':
- resolution: {integrity: sha512-wrHvqCZZqXz6Y3MUTn/9pQNsvaoNjbJpuA6vcXsXu8iCzJi911iVW2WUEBX+MpUWD+mBIP0oXni5tTlhkokOPw==}
- engines: {node: '>=16'}
- cpu: [x64]
- os: [linux]
-
- '@cloudflare/workerd-linux-arm64@1.20240512.0':
- resolution: {integrity: sha512-YPezHMySL9J9tFdzxz390eBswQ//QJNYcZolz9Dgvb3FEfdpK345cE/bsWbMOqw5ws2f82l388epoenghtYvAg==}
- engines: {node: '>=16'}
- cpu: [arm64]
- os: [linux]
-
- '@cloudflare/workerd-windows-64@1.20240512.0':
- resolution: {integrity: sha512-SxKapDrIYSscMR7lGIp/av0l6vokjH4xQ9ACxHgXh+OdOus9azppSmjaPyw4/ePvg7yqpkaNjf9o258IxWtvKQ==}
- engines: {node: '>=16'}
- cpu: [x64]
- os: [win32]
-
- '@cloudflare/workers-types@4.20240512.0':
- resolution: {integrity: sha512-o2yTEWg+YK/I1t/Me+dA0oarO0aCbjibp6wSeaw52DSE9tDyKJ7S+Qdyw/XsMrKn4t8kF6f/YOba+9O4MJfW9w==}
-
- '@colors/colors@1.5.0':
- resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==}
- engines: {node: '>=0.1.90'}
-
- '@cspotcode/source-map-support@0.8.1':
- resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
- engines: {node: '>=12'}
-
- '@electric-sql/pglite@0.1.5':
- resolution: {integrity: sha512-eymv4ONNvoPZQTvOQIi5dbpR+J5HzEv0qQH9o/y3gvNheJV/P/NFcrbsfJZYTsDKoq7DKrTiFNexsRkJKy8x9Q==}
-
- '@esbuild-kit/core-utils@3.3.2':
- resolution: {integrity: sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==}
-
- '@esbuild-kit/esm-loader@2.6.5':
- resolution: {integrity: sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==}
-
- '@esbuild-plugins/node-globals-polyfill@0.2.3':
- resolution: {integrity: sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw==}
- peerDependencies:
- esbuild: '*'
-
- '@esbuild-plugins/node-modules-polyfill@0.2.2':
- resolution: {integrity: sha512-LXV7QsWJxRuMYvKbiznh+U1ilIop3g2TeKRzUxOG5X3YITc8JyyTa90BmLwqqv0YnX4v32CSlG+vsziZp9dMvA==}
- peerDependencies:
- esbuild: '*'
-
- '@esbuild/aix-ppc64@0.19.12':
- resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==}
- engines: {node: '>=12'}
- cpu: [ppc64]
- os: [aix]
-
- '@esbuild/aix-ppc64@0.20.2':
- resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==}
- engines: {node: '>=12'}
- cpu: [ppc64]
- os: [aix]
-
- '@esbuild/android-arm64@0.17.19':
- resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [android]
-
- '@esbuild/android-arm64@0.18.20':
- resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [android]
-
- '@esbuild/android-arm64@0.19.12':
- resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [android]
-
- '@esbuild/android-arm64@0.20.2':
- resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [android]
-
- '@esbuild/android-arm@0.17.19':
- resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==}
- engines: {node: '>=12'}
- cpu: [arm]
- os: [android]
-
- '@esbuild/android-arm@0.18.20':
- resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==}
- engines: {node: '>=12'}
- cpu: [arm]
- os: [android]
-
- '@esbuild/android-arm@0.19.12':
- resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==}
- engines: {node: '>=12'}
- cpu: [arm]
- os: [android]
-
- '@esbuild/android-arm@0.20.2':
- resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==}
- engines: {node: '>=12'}
- cpu: [arm]
- os: [android]
-
- '@esbuild/android-x64@0.17.19':
- resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [android]
-
- '@esbuild/android-x64@0.18.20':
- resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [android]
-
- '@esbuild/android-x64@0.19.12':
- resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [android]
-
- '@esbuild/android-x64@0.20.2':
- resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [android]
-
- '@esbuild/darwin-arm64@0.17.19':
- resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [darwin]
-
- '@esbuild/darwin-arm64@0.18.20':
- resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [darwin]
-
- '@esbuild/darwin-arm64@0.19.12':
- resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [darwin]
-
- '@esbuild/darwin-arm64@0.20.2':
- resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [darwin]
-
- '@esbuild/darwin-x64@0.17.19':
- resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [darwin]
-
- '@esbuild/darwin-x64@0.18.20':
- resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [darwin]
-
- '@esbuild/darwin-x64@0.19.12':
- resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [darwin]
-
- '@esbuild/darwin-x64@0.20.2':
- resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [darwin]
-
- '@esbuild/freebsd-arm64@0.17.19':
- resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [freebsd]
-
- '@esbuild/freebsd-arm64@0.18.20':
- resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [freebsd]
-
- '@esbuild/freebsd-arm64@0.19.12':
- resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [freebsd]
-
- '@esbuild/freebsd-arm64@0.20.2':
- resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [freebsd]
-
- '@esbuild/freebsd-x64@0.17.19':
- resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [freebsd]
-
- '@esbuild/freebsd-x64@0.18.20':
- resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [freebsd]
-
- '@esbuild/freebsd-x64@0.19.12':
- resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [freebsd]
-
- '@esbuild/freebsd-x64@0.20.2':
- resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [freebsd]
-
- '@esbuild/linux-arm64@0.17.19':
- resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [linux]
-
- '@esbuild/linux-arm64@0.18.20':
- resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [linux]
-
- '@esbuild/linux-arm64@0.19.12':
- resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [linux]
-
- '@esbuild/linux-arm64@0.20.2':
- resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [linux]
-
- '@esbuild/linux-arm@0.17.19':
- resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==}
- engines: {node: '>=12'}
- cpu: [arm]
- os: [linux]
-
- '@esbuild/linux-arm@0.18.20':
- resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==}
- engines: {node: '>=12'}
- cpu: [arm]
- os: [linux]
-
- '@esbuild/linux-arm@0.19.12':
- resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==}
- engines: {node: '>=12'}
- cpu: [arm]
- os: [linux]
-
- '@esbuild/linux-arm@0.20.2':
- resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==}
- engines: {node: '>=12'}
- cpu: [arm]
- os: [linux]
-
- '@esbuild/linux-ia32@0.17.19':
- resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==}
- engines: {node: '>=12'}
- cpu: [ia32]
- os: [linux]
-
- '@esbuild/linux-ia32@0.18.20':
- resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==}
- engines: {node: '>=12'}
- cpu: [ia32]
- os: [linux]
-
- '@esbuild/linux-ia32@0.19.12':
- resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==}
- engines: {node: '>=12'}
- cpu: [ia32]
- os: [linux]
-
- '@esbuild/linux-ia32@0.20.2':
- resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==}
- engines: {node: '>=12'}
- cpu: [ia32]
- os: [linux]
-
- '@esbuild/linux-loong64@0.14.54':
- resolution: {integrity: sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==}
- engines: {node: '>=12'}
- cpu: [loong64]
- os: [linux]
-
- '@esbuild/linux-loong64@0.17.19':
- resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==}
- engines: {node: '>=12'}
- cpu: [loong64]
- os: [linux]
-
- '@esbuild/linux-loong64@0.18.20':
- resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==}
- engines: {node: '>=12'}
- cpu: [loong64]
- os: [linux]
-
- '@esbuild/linux-loong64@0.19.12':
- resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==}
- engines: {node: '>=12'}
- cpu: [loong64]
- os: [linux]
-
- '@esbuild/linux-loong64@0.20.2':
- resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==}
- engines: {node: '>=12'}
- cpu: [loong64]
- os: [linux]
-
- '@esbuild/linux-mips64el@0.17.19':
- resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==}
- engines: {node: '>=12'}
- cpu: [mips64el]
- os: [linux]
-
- '@esbuild/linux-mips64el@0.18.20':
- resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==}
- engines: {node: '>=12'}
- cpu: [mips64el]
- os: [linux]
-
- '@esbuild/linux-mips64el@0.19.12':
- resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==}
- engines: {node: '>=12'}
- cpu: [mips64el]
- os: [linux]
-
- '@esbuild/linux-mips64el@0.20.2':
- resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==}
- engines: {node: '>=12'}
- cpu: [mips64el]
- os: [linux]
-
- '@esbuild/linux-ppc64@0.17.19':
- resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==}
- engines: {node: '>=12'}
- cpu: [ppc64]
- os: [linux]
-
- '@esbuild/linux-ppc64@0.18.20':
- resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==}
- engines: {node: '>=12'}
- cpu: [ppc64]
- os: [linux]
-
- '@esbuild/linux-ppc64@0.19.12':
- resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==}
- engines: {node: '>=12'}
- cpu: [ppc64]
- os: [linux]
-
- '@esbuild/linux-ppc64@0.20.2':
- resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==}
- engines: {node: '>=12'}
- cpu: [ppc64]
- os: [linux]
-
- '@esbuild/linux-riscv64@0.17.19':
- resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==}
- engines: {node: '>=12'}
- cpu: [riscv64]
- os: [linux]
-
- '@esbuild/linux-riscv64@0.18.20':
- resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==}
- engines: {node: '>=12'}
- cpu: [riscv64]
- os: [linux]
-
- '@esbuild/linux-riscv64@0.19.12':
- resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==}
- engines: {node: '>=12'}
- cpu: [riscv64]
- os: [linux]
-
- '@esbuild/linux-riscv64@0.20.2':
- resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==}
- engines: {node: '>=12'}
- cpu: [riscv64]
- os: [linux]
-
- '@esbuild/linux-s390x@0.17.19':
- resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==}
- engines: {node: '>=12'}
- cpu: [s390x]
- os: [linux]
-
- '@esbuild/linux-s390x@0.18.20':
- resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==}
- engines: {node: '>=12'}
- cpu: [s390x]
- os: [linux]
-
- '@esbuild/linux-s390x@0.19.12':
- resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==}
- engines: {node: '>=12'}
- cpu: [s390x]
- os: [linux]
-
- '@esbuild/linux-s390x@0.20.2':
- resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==}
- engines: {node: '>=12'}
- cpu: [s390x]
- os: [linux]
-
- '@esbuild/linux-x64@0.17.19':
- resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [linux]
-
- '@esbuild/linux-x64@0.18.20':
- resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [linux]
-
- '@esbuild/linux-x64@0.19.12':
- resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [linux]
-
- '@esbuild/linux-x64@0.20.2':
- resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [linux]
-
- '@esbuild/netbsd-x64@0.17.19':
- resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [netbsd]
-
- '@esbuild/netbsd-x64@0.18.20':
- resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [netbsd]
-
- '@esbuild/netbsd-x64@0.19.12':
- resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [netbsd]
-
- '@esbuild/netbsd-x64@0.20.2':
- resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [netbsd]
-
- '@esbuild/openbsd-x64@0.17.19':
- resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [openbsd]
-
- '@esbuild/openbsd-x64@0.18.20':
- resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [openbsd]
-
- '@esbuild/openbsd-x64@0.19.12':
- resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [openbsd]
-
- '@esbuild/openbsd-x64@0.20.2':
- resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [openbsd]
-
- '@esbuild/sunos-x64@0.17.19':
- resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [sunos]
-
- '@esbuild/sunos-x64@0.18.20':
- resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [sunos]
-
- '@esbuild/sunos-x64@0.19.12':
- resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [sunos]
-
- '@esbuild/sunos-x64@0.20.2':
- resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [sunos]
-
- '@esbuild/win32-arm64@0.17.19':
- resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [win32]
-
- '@esbuild/win32-arm64@0.18.20':
- resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [win32]
-
- '@esbuild/win32-arm64@0.19.12':
- resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [win32]
-
- '@esbuild/win32-arm64@0.20.2':
- resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [win32]
-
- '@esbuild/win32-ia32@0.17.19':
- resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==}
- engines: {node: '>=12'}
- cpu: [ia32]
- os: [win32]
-
- '@esbuild/win32-ia32@0.18.20':
- resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==}
- engines: {node: '>=12'}
- cpu: [ia32]
- os: [win32]
-
- '@esbuild/win32-ia32@0.19.12':
- resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==}
- engines: {node: '>=12'}
- cpu: [ia32]
- os: [win32]
-
- '@esbuild/win32-ia32@0.20.2':
- resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==}
- engines: {node: '>=12'}
- cpu: [ia32]
- os: [win32]
-
- '@esbuild/win32-x64@0.17.19':
- resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [win32]
-
- '@esbuild/win32-x64@0.18.20':
- resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [win32]
-
- '@esbuild/win32-x64@0.19.12':
- resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [win32]
-
- '@esbuild/win32-x64@0.20.2':
- resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [win32]
-
- '@eslint-community/eslint-utils@4.4.0':
- resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- peerDependencies:
- eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
-
- '@eslint-community/regexpp@4.10.0':
- resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==}
- 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/js@8.57.0':
- resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
-
- '@ewoudenberg/difflib@0.1.0':
- resolution: {integrity: sha512-OU5P5mJyD3OoWYMWY+yIgwvgNS9cFAU10f+DDuvtogcWQOoJIsQ4Hy2McSfUfhKjq8L0FuWVb4Rt7kgA+XK86A==}
-
- '@fastify/busboy@2.1.1':
- resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==}
- engines: {node: '>=14'}
-
- '@hono/node-server@1.11.1':
- resolution: {integrity: sha512-GW1Iomhmm1o4Z+X57xGby8A35Cu9UZLL7pSMdqDBkD99U5cywff8F+8hLk5aBTzNubnsFAvWQ/fZjNwPsEn9lA==}
- engines: {node: '>=18.14.1'}
-
- '@hono/zod-validator@0.2.1':
- resolution: {integrity: sha512-HFoxln7Q6JsE64qz2WBS28SD33UB2alp3aRKmcWnNLDzEL1BLsWfbdX6e1HIiUprHYTIXf5y7ax8eYidKUwyaA==}
- peerDependencies:
- hono: '>=3.9.0'
- zod: ^3.19.1
-
- '@humanwhocodes/config-array@0.11.14':
- resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==}
- engines: {node: '>=10.10.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==}
-
- '@isaacs/cliui@8.0.2':
- resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
- engines: {node: '>=12'}
-
- '@jest/schemas@29.6.3':
- resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==}
- engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
-
- '@jridgewell/gen-mapping@0.3.5':
- resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==}
- engines: {node: '>=6.0.0'}
-
- '@jridgewell/resolve-uri@3.1.2':
- resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}
- engines: {node: '>=6.0.0'}
-
- '@jridgewell/set-array@1.2.1':
- resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==}
- engines: {node: '>=6.0.0'}
-
- '@jridgewell/sourcemap-codec@1.4.15':
- resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
-
- '@jridgewell/trace-mapping@0.3.25':
- resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==}
-
- '@jridgewell/trace-mapping@0.3.9':
- resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==}
-
- '@libsql/client@0.4.3':
- resolution: {integrity: sha512-AUYKnSPqAsFBVWBvmtrb4dG3pQlvTKT92eztAest9wQU2iJkabH8WzHLDb3dKFWKql7/kiCqvBQUVpozDwhekQ==}
-
- '@libsql/core@0.4.3':
- resolution: {integrity: sha512-r28iYBtaLBW9RRgXPFh6cGCsVI/rwRlOzSOpAu/1PVTm6EJ3t233pUf97jETVHU0vjdr1d8VvV6fKAvJkokqCw==}
-
- '@libsql/darwin-arm64@0.2.0':
- resolution: {integrity: sha512-+qyT2W/n5CFH1YZWv2mxW4Fsoo4dX9Z9M/nvbQqZ7H84J8hVegvVAsIGYzcK8xAeMEcpU5yGKB1Y9NoDY4hOSQ==}
- cpu: [arm64]
- os: [darwin]
-
- '@libsql/darwin-x64@0.2.0':
- resolution: {integrity: sha512-hwmO2mF1n8oDHKFrUju6Jv+n9iFtTf5JUK+xlnIE3Td0ZwGC/O1R/Z/btZTd9nD+vsvakC8SJT7/Q6YlWIkhEw==}
- cpu: [x64]
- os: [darwin]
-
- '@libsql/hrana-client@0.5.6':
- resolution: {integrity: sha512-mjQoAmejZ1atG+M3YR2ZW+rg6ceBByH/S/h17ZoYZkqbWrvohFhXyz2LFxj++ARMoY9m6w3RJJIRdJdmnEUlFg==}
-
- '@libsql/isomorphic-fetch@0.1.12':
- resolution: {integrity: sha512-MRo4UcmjAGAa3ac56LoD5OE13m2p0lu0VEtZC2NZMcogM/jc5fU9YtMQ3qbPjFJ+u2BBjFZgMPkQaLS1dlMhpg==}
-
- '@libsql/isomorphic-ws@0.1.5':
- resolution: {integrity: sha512-DtLWIH29onUYR00i0GlQ3UdcTRC6EP4u9w/h9LxpUZJWRMARk6dQwZ6Jkd+QdwVpuAOrdxt18v0K2uIYR3fwFg==}
-
- '@libsql/linux-arm64-gnu@0.2.0':
- resolution: {integrity: sha512-1w2lPXIYtnBaK5t/Ej5E8x7lPiE+jP3KATI/W4yei5Z/ONJh7jQW5PJ7sYU95vTME3hWEM1FXN6kvzcpFAte7w==}
- cpu: [arm64]
- os: [linux]
-
- '@libsql/linux-arm64-musl@0.2.0':
- resolution: {integrity: sha512-lkblBEJ7xuNiWNjP8DDq0rqoWccszfkUS7Efh5EjJ+GDWdCBVfh08mPofIZg0fZVLWQCY3j+VZCG1qZfATBizg==}
- cpu: [arm64]
- os: [linux]
-
- '@libsql/linux-x64-gnu@0.2.0':
- resolution: {integrity: sha512-+x/d289KeJydwOhhqSxKT+6MSQTCfLltzOpTzPccsvdt5fxg8CBi+gfvEJ4/XW23Sa+9bc7zodFP0i6MOlxX7w==}
- cpu: [x64]
- os: [linux]
-
- '@libsql/linux-x64-musl@0.2.0':
- resolution: {integrity: sha512-5Xn0c5A6vKf9D1ASpgk7mef//FuY7t5Lktj/eiU4n3ryxG+6WTpqstTittJUgepVjcleLPYxIhQAYeYwTYH1IQ==}
- cpu: [x64]
- os: [linux]
-
- '@libsql/win32-x64-msvc@0.2.0':
- resolution: {integrity: sha512-rpK+trBIpRST15m3cMYg5aPaX7kvCIottxY7jZPINkKAaScvfbn9yulU/iZUM9YtuK96Y1ZmvwyVIK/Y5DzoMQ==}
- cpu: [x64]
- os: [win32]
-
- '@neon-rs/load@0.0.4':
- resolution: {integrity: sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw==}
-
- '@neondatabase/serverless@0.7.2':
- resolution: {integrity: sha512-wU3WA2uTyNO7wjPs3Mg0G01jztAxUxzd9/mskMmtPwPTjf7JKWi9AW5/puOGXLxmZ9PVgRFeBVRVYq5nBPhsCg==}
-
- '@neondatabase/serverless@0.9.3':
- resolution: {integrity: sha512-6ZBK8asl2Z3+ADEaELvbaVVGVlmY1oAzkxxZfpmXPKFuJhbDN+5fU3zYBamsahS/Ch1zE+CVWB3R+8QEI2LMSw==}
-
- '@nodelib/fs.scandir@2.1.5':
- resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
- engines: {node: '>= 8'}
-
- '@nodelib/fs.stat@2.0.5':
- resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==}
- engines: {node: '>= 8'}
-
- '@nodelib/fs.walk@1.2.8':
- resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
- engines: {node: '>= 8'}
-
- '@originjs/vite-plugin-commonjs@1.0.3':
- resolution: {integrity: sha512-KuEXeGPptM2lyxdIEJ4R11+5ztipHoE7hy8ClZt3PYaOVQ/pyngd2alaSrPnwyFeOW1UagRBaQ752aA1dTMdOQ==}
-
- '@pkgjs/parseargs@0.11.0':
- resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
- engines: {node: '>=14'}
-
- '@pkgr/core@0.1.1':
- resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
- engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
-
- '@planetscale/database@1.18.0':
- resolution: {integrity: sha512-t2XdOfrVgcF7AW791FtdPS27NyNqcE1SpoXgk3HpziousvUMsJi4Q6NL3JyOBpsMOrvk94749o8yyonvX5quPw==}
- engines: {node: '>=16'}
-
- '@rollup/rollup-android-arm-eabi@4.17.2':
- resolution: {integrity: sha512-NM0jFxY8bB8QLkoKxIQeObCaDlJKewVlIEkuyYKm5An1tdVZ966w2+MPQ2l8LBZLjR+SgyV+nRkTIunzOYBMLQ==}
- cpu: [arm]
- os: [android]
-
- '@rollup/rollup-android-arm64@4.17.2':
- resolution: {integrity: sha512-yeX/Usk7daNIVwkq2uGoq2BYJKZY1JfyLTaHO/jaiSwi/lsf8fTFoQW/n6IdAsx5tx+iotu2zCJwz8MxI6D/Bw==}
- cpu: [arm64]
- os: [android]
-
- '@rollup/rollup-darwin-arm64@4.17.2':
- resolution: {integrity: sha512-kcMLpE6uCwls023+kknm71ug7MZOrtXo+y5p/tsg6jltpDtgQY1Eq5sGfHcQfb+lfuKwhBmEURDga9N0ol4YPw==}
- cpu: [arm64]
- os: [darwin]
-
- '@rollup/rollup-darwin-x64@4.17.2':
- resolution: {integrity: sha512-AtKwD0VEx0zWkL0ZjixEkp5tbNLzX+FCqGG1SvOu993HnSz4qDI6S4kGzubrEJAljpVkhRSlg5bzpV//E6ysTQ==}
- cpu: [x64]
- os: [darwin]
-
- '@rollup/rollup-linux-arm-gnueabihf@4.17.2':
- resolution: {integrity: sha512-3reX2fUHqN7sffBNqmEyMQVj/CKhIHZd4y631duy0hZqI8Qoqf6lTtmAKvJFYa6bhU95B1D0WgzHkmTg33In0A==}
- cpu: [arm]
- os: [linux]
-
- '@rollup/rollup-linux-arm-musleabihf@4.17.2':
- resolution: {integrity: sha512-uSqpsp91mheRgw96xtyAGP9FW5ChctTFEoXP0r5FAzj/3ZRv3Uxjtc7taRQSaQM/q85KEKjKsZuiZM3GyUivRg==}
- cpu: [arm]
- os: [linux]
-
- '@rollup/rollup-linux-arm64-gnu@4.17.2':
- resolution: {integrity: sha512-EMMPHkiCRtE8Wdk3Qhtciq6BndLtstqZIroHiiGzB3C5LDJmIZcSzVtLRbwuXuUft1Cnv+9fxuDtDxz3k3EW2A==}
- cpu: [arm64]
- os: [linux]
-
- '@rollup/rollup-linux-arm64-musl@4.17.2':
- resolution: {integrity: sha512-NMPylUUZ1i0z/xJUIx6VUhISZDRT+uTWpBcjdv0/zkp7b/bQDF+NfnfdzuTiB1G6HTodgoFa93hp0O1xl+/UbA==}
- cpu: [arm64]
- os: [linux]
-
- '@rollup/rollup-linux-powerpc64le-gnu@4.17.2':
- resolution: {integrity: sha512-T19My13y8uYXPw/L/k0JYaX1fJKFT/PWdXiHr8mTbXWxjVF1t+8Xl31DgBBvEKclw+1b00Chg0hxE2O7bTG7GQ==}
- cpu: [ppc64]
- os: [linux]
-
- '@rollup/rollup-linux-riscv64-gnu@4.17.2':
- resolution: {integrity: sha512-BOaNfthf3X3fOWAB+IJ9kxTgPmMqPPH5f5k2DcCsRrBIbWnaJCgX2ll77dV1TdSy9SaXTR5iDXRL8n7AnoP5cg==}
- cpu: [riscv64]
- os: [linux]
-
- '@rollup/rollup-linux-s390x-gnu@4.17.2':
- resolution: {integrity: sha512-W0UP/x7bnn3xN2eYMql2T/+wpASLE5SjObXILTMPUBDB/Fg/FxC+gX4nvCfPBCbNhz51C+HcqQp2qQ4u25ok6g==}
- cpu: [s390x]
- os: [linux]
-
- '@rollup/rollup-linux-x64-gnu@4.17.2':
- resolution: {integrity: sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==}
- cpu: [x64]
- os: [linux]
-
- '@rollup/rollup-linux-x64-musl@4.17.2':
- resolution: {integrity: sha512-h1+yTWeYbRdAyJ/jMiVw0l6fOOm/0D1vNLui9iPuqgRGnXA0u21gAqOyB5iHjlM9MMfNOm9RHCQ7zLIzT0x11Q==}
- cpu: [x64]
- os: [linux]
-
- '@rollup/rollup-win32-arm64-msvc@4.17.2':
- resolution: {integrity: sha512-tmdtXMfKAjy5+IQsVtDiCfqbynAQE/TQRpWdVataHmhMb9DCoJxp9vLcCBjEQWMiUYxO1QprH/HbY9ragCEFLA==}
- cpu: [arm64]
- os: [win32]
-
- '@rollup/rollup-win32-ia32-msvc@4.17.2':
- resolution: {integrity: sha512-7II/QCSTAHuE5vdZaQEwJq2ZACkBpQDOmQsE6D6XUbnBHW8IAhm4eTufL6msLJorzrHDFv3CF8oCA/hSIRuZeQ==}
- cpu: [ia32]
- os: [win32]
-
- '@rollup/rollup-win32-x64-msvc@4.17.2':
- resolution: {integrity: sha512-TGGO7v7qOq4CYmSBVEYpI1Y5xDuCEnbVC5Vth8mOsW0gDSzxNrVERPc790IGHsrT2dQSimgMr9Ub3Y1Jci5/8w==}
- cpu: [x64]
- os: [win32]
-
- '@sinclair/typebox@0.27.8':
- resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==}
-
- '@sindresorhus/is@4.6.0':
- resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==}
- engines: {node: '>=10'}
-
- '@smithy/abort-controller@3.0.0':
- resolution: {integrity: sha512-p6GlFGBt9K4MYLu72YuJ523NVR4A8oHlC5M2JO6OmQqN8kAc/uh1JqLE+FizTokrSJGg0CSvC+BrsmGzKtsZKA==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/config-resolver@3.0.0':
- resolution: {integrity: sha512-2GzOfADwYLQugYkKQhIyZyQlM05K+tMKvRnc6eFfZcpJGRfKoMUMYdPlBKmqHwQFXQKBrGV6cxL9oymWgDzvFw==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/core@2.0.1':
- resolution: {integrity: sha512-rcMkjvwxH/bER+oZUPR0yTA0ELD6m3A+d92+CFkdF6HJFCBB1bXo7P5pm21L66XwTN01B6bUhSCQ7cymWRD8zg==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/credential-provider-imds@3.0.0':
- resolution: {integrity: sha512-lfmBiFQcA3FsDAPxNfY0L7CawcWtbyWsBOHo34nF095728JLkBX4Y9q/VPPE2r7fqMVK+drmDigqE2/SSQeVRA==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/fetch-http-handler@3.0.1':
- resolution: {integrity: sha512-uaH74i5BDj+rBwoQaXioKpI0SHBJFtOVwzrCpxZxphOW0ki5jhj7dXvDMYM2IJem8TpdFvS2iC08sjOblfFGFg==}
-
- '@smithy/hash-node@3.0.0':
- resolution: {integrity: sha512-84qXstNemP3XS5jcof0el6+bDfjzuvhJPQTEfro3lgtbCtKgzPm3MgiS6ehXVPjeQ5+JS0HqmTz8f/RYfzHVxw==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/invalid-dependency@3.0.0':
- resolution: {integrity: sha512-F6wBBaEFgJzj0s4KUlliIGPmqXemwP6EavgvDqYwCH40O5Xr2iMHvS8todmGVZtuJCorBkXsYLyTu4PuizVq5g==}
-
- '@smithy/is-array-buffer@3.0.0':
- resolution: {integrity: sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/middleware-content-length@3.0.0':
- resolution: {integrity: sha512-3C4s4d/iGobgCtk2tnWW6+zSTOBg1PRAm2vtWZLdriwTroFbbWNSr3lcyzHdrQHnEXYCC5K52EbpfodaIUY8sg==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/middleware-endpoint@3.0.0':
- resolution: {integrity: sha512-aXOAWztw/5qAfp0NcA2OWpv6ZI/E+Dh9mByif7i91D/0iyYNUcKvskmXiowKESFkuZ7PIMd3VOR4fTibZDs2OQ==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/middleware-retry@3.0.1':
- resolution: {integrity: sha512-hBhSEuL841FhJBK/19WpaGk5YWSzFk/P2UaVjANGKRv3eYNO8Y1lANWgqnuPWjOyCEWMPr58vELFDWpxvRKANw==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/middleware-serde@3.0.0':
- resolution: {integrity: sha512-I1vKG1foI+oPgG9r7IMY1S+xBnmAn1ISqployvqkwHoSb8VPsngHDTOgYGYBonuOKndaWRUGJZrKYYLB+Ane6w==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/middleware-stack@3.0.0':
- resolution: {integrity: sha512-+H0jmyfAyHRFXm6wunskuNAqtj7yfmwFB6Fp37enytp2q047/Od9xetEaUbluyImOlGnGpaVGaVfjwawSr+i6Q==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/node-config-provider@3.0.0':
- resolution: {integrity: sha512-buqfaSdDh0zo62EPLf8rGDvcpKwGpO5ho4bXS2cdFhlOta7tBkWJt+O5uiaAeICfIOfPclNOndshDNSanX2X9g==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/node-http-handler@3.0.0':
- resolution: {integrity: sha512-3trD4r7NOMygwLbUJo4eodyQuypAWr7uvPnebNJ9a70dQhVn+US8j/lCnvoJS6BXfZeF7PkkkI0DemVJw+n+eQ==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/property-provider@3.0.0':
- resolution: {integrity: sha512-LmbPgHBswdXCrkWWuUwBm9w72S2iLWyC/5jet9/Y9cGHtzqxi+GVjfCfahkvNV4KXEwgnH8EMpcrD9RUYe0eLQ==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/protocol-http@4.0.0':
- resolution: {integrity: sha512-qOQZOEI2XLWRWBO9AgIYuHuqjZ2csyr8/IlgFDHDNuIgLAMRx2Bl8ck5U5D6Vh9DPdoaVpuzwWMa0xcdL4O/AQ==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/querystring-builder@3.0.0':
- resolution: {integrity: sha512-bW8Fi0NzyfkE0TmQphDXr1AmBDbK01cA4C1Z7ggwMAU5RDz5AAv/KmoRwzQAS0kxXNf/D2ALTEgwK0U2c4LtRg==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/querystring-parser@3.0.0':
- resolution: {integrity: sha512-UzHwthk0UEccV4dHzPySnBy34AWw3V9lIqUTxmozQ+wPDAO9csCWMfOLe7V9A2agNYy7xE+Pb0S6K/J23JSzfQ==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/service-error-classification@3.0.0':
- resolution: {integrity: sha512-3BsBtOUt2Gsnc3X23ew+r2M71WwtpHfEDGhHYHSDg6q1t8FrWh15jT25DLajFV1H+PpxAJ6gqe9yYeRUsmSdFA==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/shared-ini-file-loader@3.0.0':
- resolution: {integrity: sha512-REVw6XauXk8xE4zo5aGL7Rz4ywA8qNMUn8RtWeTRQsgAlmlvbJ7CEPBcaXU2NDC3AYBgYAXrGyWD8XrN8UGDog==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/signature-v4@3.0.0':
- resolution: {integrity: sha512-kXFOkNX+BQHe2qnLxpMEaCRGap9J6tUGLzc3A9jdn+nD4JdMwCKTJ+zFwQ20GkY+mAXGatyTw3HcoUlR39HwmA==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/smithy-client@3.0.1':
- resolution: {integrity: sha512-KAiFY4Y4jdHxR+4zerH/VBhaFKM8pbaVmJZ/CWJRwtM/CmwzTfXfvYwf6GoUwiHepdv+lwiOXCuOl6UBDUEINw==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/types@3.0.0':
- resolution: {integrity: sha512-VvWuQk2RKFuOr98gFhjca7fkBS+xLLURT8bUjk5XQoV0ZLm7WPwWPPY3/AwzTLuUBDeoKDCthfe1AsTUWaSEhw==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/url-parser@3.0.0':
- resolution: {integrity: sha512-2XLazFgUu+YOGHtWihB3FSLAfCUajVfNBXGGYjOaVKjLAuAxx3pSBY3hBgLzIgB17haf59gOG3imKqTy8mcrjw==}
-
- '@smithy/util-base64@3.0.0':
- resolution: {integrity: sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/util-body-length-browser@3.0.0':
- resolution: {integrity: sha512-cbjJs2A1mLYmqmyVl80uoLTJhAcfzMOyPgjwAYusWKMdLeNtzmMz9YxNl3/jRLoxSS3wkqkf0jwNdtXWtyEBaQ==}
-
- '@smithy/util-body-length-node@3.0.0':
- resolution: {integrity: sha512-Tj7pZ4bUloNUP6PzwhN7K386tmSmEET9QtQg0TgdNOnxhZvCssHji+oZTUIuzxECRfG8rdm2PMw2WCFs6eIYkA==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/util-buffer-from@3.0.0':
- resolution: {integrity: sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/util-config-provider@3.0.0':
- resolution: {integrity: sha512-pbjk4s0fwq3Di/ANL+rCvJMKM5bzAQdE5S/6RL5NXgMExFAi6UgQMPOm5yPaIWPpr+EOXKXRonJ3FoxKf4mCJQ==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/util-defaults-mode-browser@3.0.1':
- resolution: {integrity: sha512-nW5kEzdJn1Bn5TF+gOPHh2rcPli8JU9vSSXLbfg7uPnfR1TMRQqs9zlYRhIb87NeSxIbpdXOI94tvXSy+fvDYg==}
- engines: {node: '>= 10.0.0'}
-
- '@smithy/util-defaults-mode-node@3.0.1':
- resolution: {integrity: sha512-TFk+Qb+elLc/MOhtSp+50fstyfZ6avQbgH2d96xUBpeScu+Al9elxv+UFAjaTHe0HQe5n+wem8ZLpXvU8lwV6Q==}
- engines: {node: '>= 10.0.0'}
-
- '@smithy/util-endpoints@2.0.0':
- resolution: {integrity: sha512-+exaXzEY3DNt2qtA2OtRNSDlVrE4p32j1JSsQkzA5AdP0YtJNjkYbYhJxkFmPYcjI1abuwopOZCwUmv682QkiQ==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/util-hex-encoding@3.0.0':
- resolution: {integrity: sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/util-middleware@3.0.0':
- resolution: {integrity: sha512-q5ITdOnV2pXHSVDnKWrwgSNTDBAMHLptFE07ua/5Ty5WJ11bvr0vk2a7agu7qRhrCFRQlno5u3CneU5EELK+DQ==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/util-retry@3.0.0':
- resolution: {integrity: sha512-nK99bvJiziGv/UOKJlDvFF45F00WgPLKVIGUfAK+mDhzVN2hb/S33uW2Tlhg5PVBoqY7tDVqL0zmu4OxAHgo9g==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/util-stream@3.0.1':
- resolution: {integrity: sha512-7F7VNNhAsfMRA8I986YdOY5fE0/T1/ZjFF6OLsqkvQVNP3vZ/szYDfGCyphb7ioA09r32K/0qbSFfNFU68aSzA==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/util-uri-escape@3.0.0':
- resolution: {integrity: sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==}
- engines: {node: '>=16.0.0'}
-
- '@smithy/util-utf8@3.0.0':
- resolution: {integrity: sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==}
- engines: {node: '>=16.0.0'}
-
- '@types/better-sqlite3@7.6.10':
- resolution: {integrity: sha512-TZBjD+yOsyrUJGmcUj6OS3JADk3+UZcNv3NOBqGkM09bZdi28fNZw8ODqbMOLfKCu7RYCO62/ldq1iHbzxqoPw==}
-
- '@types/docker-modem@3.0.6':
- resolution: {integrity: sha512-yKpAGEuKRSS8wwx0joknWxsmLha78wNMe9R2S3UNsVOkZded8UqOrV8KoeDXoXsjndxwyF3eIhyClGbO1SEhEg==}
-
- '@types/dockerode@3.3.29':
- resolution: {integrity: sha512-5PRRq/yt5OT/Jf77ltIdz4EiR9+VLnPF+HpU4xGFwUqmV24Co2HKBNW3w+slqZ1CYchbcDeqJASHDYWzZCcMiQ==}
-
- '@types/estree@1.0.5':
- resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==}
-
- '@types/fs-extra@11.0.4':
- resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==}
-
- '@types/glob@8.1.0':
- resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==}
-
- '@types/json-diff@1.0.3':
- resolution: {integrity: sha512-Qvxm8fpRMv/1zZR3sQWImeRK2mBYJji20xF51Fq9Gt//Ed18u0x6/FNLogLS1xhfUWTEmDyqveJqn95ltB6Kvw==}
-
- '@types/jsonfile@6.1.4':
- resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==}
-
- '@types/minimatch@5.1.2':
- resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==}
-
- '@types/minimist@1.2.5':
- resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==}
-
- '@types/node-fetch@2.6.11':
- resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==}
-
- '@types/node-forge@1.3.11':
- resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==}
-
- '@types/node@18.19.33':
- resolution: {integrity: sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==}
-
- '@types/pg@8.11.6':
- resolution: {integrity: sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ==}
-
- '@types/pg@8.6.6':
- resolution: {integrity: sha512-O2xNmXebtwVekJDD+02udOncjVcMZQuTEQEMpKJ0ZRf5E7/9JJX3izhKUcUifBkyKpljyUM6BTgy2trmviKlpw==}
-
- '@types/pluralize@0.0.33':
- resolution: {integrity: sha512-JOqsl+ZoCpP4e8TDke9W79FDcSgPAR0l6pixx2JHkhnRjvShyYiAYw2LVsnA7K08Y6DeOnaU6ujmENO4os/cYg==}
-
- '@types/ps-tree@1.1.6':
- resolution: {integrity: sha512-PtrlVaOaI44/3pl3cvnlK+GxOM3re2526TJvPvh7W+keHIXdV4TE0ylpPBAcvFQCbGitaTXwL9u+RF7qtVeazQ==}
-
- '@types/semver@7.5.8':
- resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==}
-
- '@types/ssh2@1.15.0':
- resolution: {integrity: sha512-YcT8jP5F8NzWeevWvcyrrLB3zcneVjzYY9ZDSMAMboI+2zR1qYWFhwsyOFVzT7Jorn67vqxC0FRiw8YyG9P1ww==}
-
- '@types/uuid@9.0.8':
- resolution: {integrity: sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==}
-
- '@types/which@3.0.3':
- resolution: {integrity: sha512-2C1+XoY0huExTbs8MQv1DuS5FS86+SEjdM9F/+GS61gg5Hqbtj8ZiDSx8MfWcyei907fIPbfPGCOrNUTnVHY1g==}
-
- '@types/ws@8.5.10':
- resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==}
-
- '@typescript-eslint/eslint-plugin@7.10.0':
- resolution: {integrity: sha512-PzCr+a/KAef5ZawX7nbyNwBDtM1HdLIT53aSA2DDlxmxMngZ43O8SIePOeX8H5S+FHXeI6t97mTt/dDdzY4Fyw==}
- engines: {node: ^18.18.0 || >=20.0.0}
- peerDependencies:
- '@typescript-eslint/parser': ^7.0.0
- eslint: ^8.56.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
-
- '@typescript-eslint/parser@7.10.0':
- resolution: {integrity: sha512-2EjZMA0LUW5V5tGQiaa2Gys+nKdfrn2xiTIBLR4fxmPmVSvgPcKNW+AE/ln9k0A4zDUti0J/GZXMDupQoI+e1w==}
- engines: {node: ^18.18.0 || >=20.0.0}
- peerDependencies:
- eslint: ^8.56.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
-
- '@typescript-eslint/scope-manager@7.10.0':
- resolution: {integrity: sha512-7L01/K8W/VGl7noe2mgH0K7BE29Sq6KAbVmxurj8GGaPDZXPr8EEQ2seOeAS+mEV9DnzxBQB6ax6qQQ5C6P4xg==}
- engines: {node: ^18.18.0 || >=20.0.0}
-
- '@typescript-eslint/type-utils@7.10.0':
- resolution: {integrity: sha512-D7tS4WDkJWrVkuzgm90qYw9RdgBcrWmbbRkrLA4d7Pg3w0ttVGDsvYGV19SH8gPR5L7OtcN5J1hTtyenO9xE9g==}
- engines: {node: ^18.18.0 || >=20.0.0}
- peerDependencies:
- eslint: ^8.56.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
-
- '@typescript-eslint/types@7.10.0':
- resolution: {integrity: sha512-7fNj+Ya35aNyhuqrA1E/VayQX9Elwr8NKZ4WueClR3KwJ7Xx9jcCdOrLW04h51de/+gNbyFMs+IDxh5xIwfbNg==}
- engines: {node: ^18.18.0 || >=20.0.0}
-
- '@typescript-eslint/typescript-estree@7.10.0':
- resolution: {integrity: sha512-LXFnQJjL9XIcxeVfqmNj60YhatpRLt6UhdlFwAkjNc6jSUlK8zQOl1oktAP8PlWFzPQC1jny/8Bai3/HPuvN5g==}
- engines: {node: ^18.18.0 || >=20.0.0}
- peerDependencies:
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
-
- '@typescript-eslint/utils@7.10.0':
- resolution: {integrity: sha512-olzif1Fuo8R8m/qKkzJqT7qwy16CzPRWBvERS0uvyc+DHd8AKbO4Jb7kpAvVzMmZm8TrHnI7hvjN4I05zow+tg==}
- engines: {node: ^18.18.0 || >=20.0.0}
- peerDependencies:
- eslint: ^8.56.0
-
- '@typescript-eslint/visitor-keys@7.10.0':
- resolution: {integrity: sha512-9ntIVgsi6gg6FIq9xjEO4VQJvwOqA3jaBFQJ/6TK5AvEup2+cECI6Fh7QiBxmfMHXU0V0J4RyPeOU1VDNzl9cg==}
- engines: {node: ^18.18.0 || >=20.0.0}
-
- '@ungap/structured-clone@1.2.0':
- resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
-
- '@vercel/postgres@0.8.0':
- resolution: {integrity: sha512-/QUV9ExwaNdKooRjOQqvrKNVnRvsaXeukPNI5DB1ovUTesglfR/fparw7ngo1KUWWKIVpEj2TRrA+ObRHRdaLg==}
- engines: {node: '>=14.6'}
-
- '@vitest/expect@1.6.0':
- resolution: {integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==}
-
- '@vitest/runner@1.6.0':
- resolution: {integrity: sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==}
-
- '@vitest/snapshot@1.6.0':
- resolution: {integrity: sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==}
-
- '@vitest/spy@1.6.0':
- resolution: {integrity: sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==}
-
- '@vitest/utils@1.6.0':
- resolution: {integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==}
-
- acorn-jsx@5.3.2:
- resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
- peerDependencies:
- acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
-
- acorn-walk@8.3.2:
- resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==}
- engines: {node: '>=0.4.0'}
-
- acorn@8.11.3:
- resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==}
- engines: {node: '>=0.4.0'}
- hasBin: true
-
- aggregate-error@4.0.1:
- resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==}
- engines: {node: '>=12'}
-
- ajv@6.12.6:
- resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
-
- ansi-escapes@6.2.1:
- resolution: {integrity: sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==}
- engines: {node: '>=14.16'}
-
- ansi-regex@5.0.1:
- resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
- engines: {node: '>=8'}
-
- ansi-regex@6.0.1:
- resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==}
- engines: {node: '>=12'}
-
- ansi-styles@4.3.0:
- resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
- engines: {node: '>=8'}
-
- ansi-styles@5.2.0:
- resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==}
- engines: {node: '>=10'}
-
- ansi-styles@6.2.1:
- resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==}
- engines: {node: '>=12'}
-
- ansicolors@0.3.2:
- resolution: {integrity: sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==}
-
- any-promise@1.3.0:
- resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==}
-
- anymatch@3.1.3:
- resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
- engines: {node: '>= 8'}
-
- argparse@1.0.10:
- resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==}
-
- argparse@2.0.1:
- resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
-
- array-find-index@1.0.2:
- resolution: {integrity: sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==}
- engines: {node: '>=0.10.0'}
-
- array-union@2.1.0:
- resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==}
- engines: {node: '>=8'}
-
- arrgv@1.0.2:
- resolution: {integrity: sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==}
- engines: {node: '>=8.0.0'}
-
- arrify@3.0.0:
- resolution: {integrity: sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==}
- engines: {node: '>=12'}
-
- as-table@1.0.55:
- resolution: {integrity: sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==}
-
- asn1@0.2.6:
- resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==}
-
- assertion-error@1.1.0:
- resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==}
-
- asynckit@0.4.0:
- resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
-
- ava@5.3.1:
- resolution: {integrity: sha512-Scv9a4gMOXB6+ni4toLuhAm9KYWEjsgBglJl+kMGI5+IVDt120CCDZyB5HNU9DjmLI2t4I0GbnxGLmmRfGTJGg==}
- engines: {node: '>=14.19 <15 || >=16.15 <17 || >=18'}
- hasBin: true
- peerDependencies:
- '@ava/typescript': '*'
- peerDependenciesMeta:
- '@ava/typescript':
- optional: true
-
- balanced-match@1.0.2:
- resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
-
- base64-js@1.5.1:
- resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
-
- bcrypt-pbkdf@1.0.2:
- resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==}
-
- better-sqlite3@9.6.0:
- resolution: {integrity: sha512-yR5HATnqeYNVnkaUTf4bOP2dJSnyhP4puJN/QPRyx4YkBEEUxib422n2XzPqDEHjQQqazoYoADdAm5vE15+dAQ==}
-
- binary-extensions@2.3.0:
- resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==}
- engines: {node: '>=8'}
-
- bindings@1.5.0:
- resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==}
-
- bl@4.1.0:
- resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==}
-
- blake3-wasm@2.1.5:
- resolution: {integrity: sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==}
-
- blueimp-md5@2.19.0:
- resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==}
-
- bowser@2.11.0:
- resolution: {integrity: sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==}
-
- brace-expansion@1.1.11:
- resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
-
- brace-expansion@2.0.1:
- resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==}
-
- braces@3.0.2:
- resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==}
- engines: {node: '>=8'}
-
- buffer-from@1.1.2:
- resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
-
- buffer@5.7.1:
- resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==}
-
- bufferutil@4.0.8:
- resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==}
- engines: {node: '>=6.14.2'}
-
- buildcheck@0.0.6:
- resolution: {integrity: sha512-8f9ZJCUXyT1M35Jx7MkBgmBMo3oHTTBIPLiY9xyL0pl3T5RwcPEY8cUHr5LBNfu/fk6c2T4DJZuVM/8ZZT2D2A==}
- engines: {node: '>=10.0.0'}
-
- bundle-require@4.1.0:
- resolution: {integrity: sha512-FeArRFM+ziGkRViKRnSTbHZc35dgmR9yNog05Kn0+ItI59pOAISGvnnIwW1WgFZQW59IxD9QpJnUPkdIPfZuXg==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
- peerDependencies:
- esbuild: '>=0.17'
-
- cac@6.7.14:
- resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
- engines: {node: '>=8'}
-
- callsites@3.1.0:
- resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
- engines: {node: '>=6'}
-
- callsites@4.1.0:
- resolution: {integrity: sha512-aBMbD1Xxay75ViYezwT40aQONfr+pSXTHwNKvIXhXD6+LY3F1dLIcceoC5OZKBVHbXcysz1hL9D2w0JJIMXpUw==}
- engines: {node: '>=12.20'}
-
- camelcase@7.0.1:
- resolution: {integrity: sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==}
- engines: {node: '>=14.16'}
-
- capnp-ts@0.7.0:
- resolution: {integrity: sha512-XKxXAC3HVPv7r674zP0VC3RTXz+/JKhfyw94ljvF80yynK6VkTnqE3jMuN8b3dUVmmc43TjyxjW4KTsmB3c86g==}
-
- cardinal@2.1.1:
- resolution: {integrity: sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==}
- hasBin: true
-
- cbor@8.1.0:
- resolution: {integrity: sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==}
- engines: {node: '>=12.19'}
-
- chai@4.4.1:
- resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==}
- engines: {node: '>=4'}
-
- chalk@4.1.2:
- resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
- engines: {node: '>=10'}
-
- chalk@5.3.0:
- resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==}
- engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
-
- char-regex@1.0.2:
- resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==}
- engines: {node: '>=10'}
-
- check-error@1.0.3:
- resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==}
-
- chokidar@3.6.0:
- resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
- engines: {node: '>= 8.10.0'}
-
- chownr@1.1.4:
- resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==}
-
- chunkd@2.0.1:
- resolution: {integrity: sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==}
-
- ci-info@3.9.0:
- resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==}
- engines: {node: '>=8'}
-
- ci-parallel-vars@1.0.1:
- resolution: {integrity: sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==}
-
- clean-stack@4.2.0:
- resolution: {integrity: sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==}
- engines: {node: '>=12'}
-
- clean-yaml-object@0.1.0:
- resolution: {integrity: sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw==}
- engines: {node: '>=0.10.0'}
-
- cli-color@2.0.4:
- resolution: {integrity: sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==}
- engines: {node: '>=0.10'}
-
- cli-table3@0.6.5:
- resolution: {integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==}
- engines: {node: 10.* || >= 12.*}
-
- cli-truncate@3.1.0:
- resolution: {integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- cliui@8.0.1:
- resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==}
- engines: {node: '>=12'}
-
- code-excerpt@4.0.0:
- resolution: {integrity: sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- color-convert@2.0.1:
- resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
- engines: {node: '>=7.0.0'}
-
- color-name@1.1.4:
- resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
-
- colors@1.4.0:
- resolution: {integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==}
- engines: {node: '>=0.1.90'}
-
- combined-stream@1.0.8:
- resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
- engines: {node: '>= 0.8'}
-
- commander@10.0.1:
- resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==}
- engines: {node: '>=14'}
-
- commander@12.1.0:
- resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==}
- engines: {node: '>=18'}
-
- commander@4.1.1:
- resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}
- engines: {node: '>= 6'}
-
- commander@9.5.0:
- resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==}
- engines: {node: ^12.20.0 || >=14}
-
- common-path-prefix@3.0.0:
- resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==}
-
- concat-map@0.0.1:
- resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
-
- concordance@5.0.4:
- resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==}
- engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'}
-
- confbox@0.1.7:
- resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==}
-
- convert-to-spaces@2.0.1:
- resolution: {integrity: sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- cookie@0.5.0:
- resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==}
- engines: {node: '>= 0.6'}
-
- copy-anything@3.0.5:
- resolution: {integrity: sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==}
- engines: {node: '>=12.13'}
-
- cpu-features@0.0.10:
- resolution: {integrity: sha512-9IkYqtX3YHPCzoVg1Py+o9057a3i0fp7S530UWokCSaFVTc7CwXPRiOjRjBQQ18ZCNafx78YfnG+HALxtVmOGA==}
- engines: {node: '>=10.0.0'}
-
- cross-spawn@7.0.3:
- resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
- engines: {node: '>= 8'}
-
- currently-unhandled@0.4.1:
- resolution: {integrity: sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==}
- engines: {node: '>=0.10.0'}
-
- d@1.0.2:
- resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==}
- engines: {node: '>=0.12'}
-
- data-uri-to-buffer@2.0.2:
- resolution: {integrity: sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==}
-
- data-uri-to-buffer@4.0.1:
- resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==}
- engines: {node: '>= 12'}
-
- date-time@3.1.0:
- resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==}
- engines: {node: '>=6'}
-
- debug@4.3.4:
- resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
- 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'}
-
- deep-eql@4.1.3:
- resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==}
- engines: {node: '>=6'}
-
- deep-extend@0.6.0:
- resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==}
- engines: {node: '>=4.0.0'}
-
- deep-is@0.1.4:
- resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
-
- delayed-stream@1.0.0:
- resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
- engines: {node: '>=0.4.0'}
-
- denque@2.1.0:
- resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==}
- engines: {node: '>=0.10'}
-
- detect-libc@2.0.2:
- resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==}
- engines: {node: '>=8'}
-
- detect-libc@2.0.3:
- resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==}
- engines: {node: '>=8'}
-
- diff-sequences@29.6.3:
- resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==}
- engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
-
- difflib@0.2.4:
- resolution: {integrity: sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==}
-
- dir-glob@3.0.1:
- resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
- engines: {node: '>=8'}
-
- docker-modem@3.0.8:
- resolution: {integrity: sha512-f0ReSURdM3pcKPNS30mxOHSbaFLcknGmQjwSfmbcdOw1XWKXVhukM3NJHhr7NpY9BIyyWQb0EBo3KQvvuU5egQ==}
- engines: {node: '>= 8.0'}
-
- dockerode@3.3.5:
- resolution: {integrity: sha512-/0YNa3ZDNeLr/tSckmD69+Gq+qVNhvKfAHNeZJBnp7EOP6RGKV8ORrJHkUn20So5wU+xxT7+1n5u8PjHbfjbSA==}
- engines: {node: '>= 8.0'}
-
- doctrine@3.0.0:
- resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==}
- engines: {node: '>=6.0.0'}
-
- dotenv@16.4.5:
- resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==}
- engines: {node: '>=12'}
-
- dreamopt@0.8.0:
- resolution: {integrity: sha512-vyJTp8+mC+G+5dfgsY+r3ckxlz+QMX40VjPQsZc5gxVAxLmi64TBoVkP54A/pRAXMXsbu2GMMBrZPxNv23waMg==}
- engines: {node: '>=0.4.0'}
-
- drizzle-kit@0.21.2:
- resolution: {integrity: sha512-U87IhZyCt/9d0ZT/Na3KFJVY31tSxtTx/n9UMcWFpW/5c2Ede39xiCG5efNV/0iimsv97UIRtDI0ldLBW5lbcg==}
- hasBin: true
-
- drizzle-orm@0.32.0-85c8008:
- resolution: {integrity: sha512-gHLqGZz0eqAvSw4vq46sHRV8qLHxrbuCVlwaVZ1t4ntyH8csyCKEXTWO78cBJwYUpz7BCSzqVX+5ZYa/QM+/Gw==}
- peerDependencies:
- '@aws-sdk/client-rds-data': '>=3'
- '@cloudflare/workers-types': '>=3'
- '@electric-sql/pglite': '>=0.1.1'
- '@libsql/client': '*'
- '@neondatabase/serverless': '>=0.1'
- '@op-engineering/op-sqlite': '>=2'
- '@opentelemetry/api': ^1.4.1
- '@planetscale/database': '>=1'
- '@tidbcloud/serverless': '*'
- '@types/better-sqlite3': '*'
- '@types/pg': '*'
- '@types/react': '>=18'
- '@types/sql.js': '*'
- '@vercel/postgres': '>=0.8.0'
- '@xata.io/client': '*'
- better-sqlite3: '>=7'
- bun-types: '*'
- expo-sqlite: '>=13.2.0'
- knex: '*'
- kysely: '*'
- mysql2: '>=2'
- pg: '>=8'
- postgres: '>=3'
- react: '>=18'
- sql.js: '>=1'
- sqlite3: '>=5'
- peerDependenciesMeta:
- '@aws-sdk/client-rds-data':
- optional: true
- '@cloudflare/workers-types':
- optional: true
- '@electric-sql/pglite':
- optional: true
- '@libsql/client':
- optional: true
- '@neondatabase/serverless':
- optional: true
- '@op-engineering/op-sqlite':
- optional: true
- '@opentelemetry/api':
- optional: true
- '@planetscale/database':
- optional: true
- '@tidbcloud/serverless':
- optional: true
- '@types/better-sqlite3':
- optional: true
- '@types/pg':
- optional: true
- '@types/react':
- optional: true
- '@types/sql.js':
- optional: true
- '@vercel/postgres':
- optional: true
- '@xata.io/client':
- optional: true
- better-sqlite3:
- optional: true
- bun-types:
- optional: true
- expo-sqlite:
- optional: true
- knex:
- optional: true
- kysely:
- optional: true
- mysql2:
- optional: true
- pg:
- optional: true
- postgres:
- optional: true
- react:
- optional: true
- sql.js:
- optional: true
- sqlite3:
- optional: true
-
- duplexer@0.1.2:
- resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
-
- eastasianwidth@0.2.0:
- resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
-
- emittery@1.0.3:
- resolution: {integrity: sha512-tJdCJitoy2lrC2ldJcqN4vkqJ00lT+tOWNT1hBJjO/3FDMJa5TTIiYGCKGkn/WfCyOzUMObeohbVTj00fhiLiA==}
- engines: {node: '>=14.16'}
-
- emoji-regex@8.0.0:
- resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
-
- emoji-regex@9.2.2:
- resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
-
- emojilib@2.4.0:
- resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==}
-
- end-of-stream@1.4.4:
- resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==}
-
- env-paths@3.0.0:
- resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- es5-ext@0.10.64:
- resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==}
- engines: {node: '>=0.10'}
-
- es6-iterator@2.0.3:
- resolution: {integrity: sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==}
-
- es6-symbol@3.1.4:
- resolution: {integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==}
- engines: {node: '>=0.12'}
-
- es6-weak-map@2.0.3:
- resolution: {integrity: sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==}
-
- esbuild-android-64@0.14.54:
- resolution: {integrity: sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [android]
-
- esbuild-android-arm64@0.14.54:
- resolution: {integrity: sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [android]
-
- esbuild-darwin-64@0.14.54:
- resolution: {integrity: sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [darwin]
-
- esbuild-darwin-arm64@0.14.54:
- resolution: {integrity: sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [darwin]
-
- esbuild-freebsd-64@0.14.54:
- resolution: {integrity: sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [freebsd]
-
- esbuild-freebsd-arm64@0.14.54:
- resolution: {integrity: sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [freebsd]
-
- esbuild-linux-32@0.14.54:
- resolution: {integrity: sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==}
- engines: {node: '>=12'}
- cpu: [ia32]
- os: [linux]
-
- esbuild-linux-64@0.14.54:
- resolution: {integrity: sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [linux]
-
- esbuild-linux-arm64@0.14.54:
- resolution: {integrity: sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [linux]
-
- esbuild-linux-arm@0.14.54:
- resolution: {integrity: sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==}
- engines: {node: '>=12'}
- cpu: [arm]
- os: [linux]
-
- esbuild-linux-mips64le@0.14.54:
- resolution: {integrity: sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==}
- engines: {node: '>=12'}
- cpu: [mips64el]
- os: [linux]
-
- esbuild-linux-ppc64le@0.14.54:
- resolution: {integrity: sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==}
- engines: {node: '>=12'}
- cpu: [ppc64]
- os: [linux]
-
- esbuild-linux-riscv64@0.14.54:
- resolution: {integrity: sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==}
- engines: {node: '>=12'}
- cpu: [riscv64]
- os: [linux]
-
- esbuild-linux-s390x@0.14.54:
- resolution: {integrity: sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==}
- engines: {node: '>=12'}
- cpu: [s390x]
- os: [linux]
-
- esbuild-netbsd-64@0.14.54:
- resolution: {integrity: sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [netbsd]
-
- esbuild-node-externals@1.13.1:
- resolution: {integrity: sha512-ho4Lokc6iMB1lWbb2tWJ6otien+3Kfoaxe0fy7NUNgVuLnfmlW+GRINftTVUGtTVY/dapuwUu/CvFylYNwzkMA==}
- engines: {node: '>=12'}
- peerDependencies:
- esbuild: 0.12 - 0.21
-
- esbuild-openbsd-64@0.14.54:
- resolution: {integrity: sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [openbsd]
-
- esbuild-register@3.5.0:
- resolution: {integrity: sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==}
- peerDependencies:
- esbuild: '>=0.12 <1'
-
- esbuild-sunos-64@0.14.54:
- resolution: {integrity: sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [sunos]
-
- esbuild-windows-32@0.14.54:
- resolution: {integrity: sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==}
- engines: {node: '>=12'}
- cpu: [ia32]
- os: [win32]
-
- esbuild-windows-64@0.14.54:
- resolution: {integrity: sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [win32]
-
- esbuild-windows-arm64@0.14.54:
- resolution: {integrity: sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [win32]
-
- esbuild@0.14.54:
- resolution: {integrity: sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==}
- engines: {node: '>=12'}
- hasBin: true
-
- esbuild@0.17.19:
- resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==}
- engines: {node: '>=12'}
- hasBin: true
-
- esbuild@0.18.20:
- resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==}
- engines: {node: '>=12'}
- hasBin: true
-
- esbuild@0.19.12:
- resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==}
- engines: {node: '>=12'}
- hasBin: true
-
- esbuild@0.20.2:
- resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==}
- engines: {node: '>=12'}
- hasBin: true
-
- escalade@3.1.2:
- resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==}
- engines: {node: '>=6'}
-
- escape-string-regexp@2.0.0:
- resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==}
- engines: {node: '>=8'}
-
- escape-string-regexp@4.0.0:
- resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
- engines: {node: '>=10'}
-
- escape-string-regexp@5.0.0:
- resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==}
- engines: {node: '>=12'}
-
- eslint-config-prettier@9.1.0:
- resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==}
- hasBin: true
- peerDependencies:
- eslint: '>=7.0.0'
-
- eslint-plugin-prettier@5.1.3:
- resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==}
- engines: {node: ^14.18.0 || >=16.0.0}
- peerDependencies:
- '@types/eslint': '>=8.0.0'
- eslint: '>=8.0.0'
- eslint-config-prettier: '*'
- prettier: '>=3.0.0'
- peerDependenciesMeta:
- '@types/eslint':
- optional: true
- eslint-config-prettier:
- optional: true
-
- 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-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.0:
- resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- hasBin: true
-
- esniff@2.0.1:
- resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==}
- engines: {node: '>=0.10'}
-
- espree@9.6.1:
- resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.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==}
- engines: {node: '>=0.10'}
-
- esrecurse@4.3.0:
- resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==}
- engines: {node: '>=4.0'}
-
- estraverse@5.3.0:
- resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==}
- engines: {node: '>=4.0'}
-
- estree-walker@0.6.1:
- resolution: {integrity: sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==}
-
- estree-walker@3.0.3:
- resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}
-
- esutils@2.0.3:
- resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}
- engines: {node: '>=0.10.0'}
-
- event-emitter@0.3.5:
- resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==}
-
- event-stream@3.3.4:
- resolution: {integrity: sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==}
-
- execa@5.1.1:
- resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==}
- engines: {node: '>=10'}
-
- execa@8.0.1:
- resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==}
- engines: {node: '>=16.17'}
-
- exit-hook@2.2.1:
- resolution: {integrity: sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==}
- engines: {node: '>=6'}
-
- expand-template@2.0.3:
- resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==}
- engines: {node: '>=6'}
-
- ext@1.7.0:
- resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==}
-
- fast-deep-equal@3.1.3:
- resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
-
- fast-diff@1.3.0:
- resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==}
-
- 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==}
-
- fast-levenshtein@2.0.6:
- resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==}
-
- fast-xml-parser@4.2.5:
- resolution: {integrity: sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==}
- hasBin: true
-
- fastq@1.17.1:
- resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==}
-
- fetch-blob@3.2.0:
- resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==}
- engines: {node: ^12.20 || >= 14.13}
-
- fflate@0.8.2:
- resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==}
-
- figures@5.0.0:
- resolution: {integrity: sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==}
- engines: {node: '>=14'}
-
- file-entry-cache@6.0.1:
- resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==}
- engines: {node: ^10.12.0 || >=12.0.0}
-
- file-uri-to-path@1.0.0:
- resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==}
-
- fill-range@7.1.1:
- resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==}
- engines: {node: '>=8'}
-
- find-up@5.0.0:
- resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==}
- engines: {node: '>=10'}
-
- find-up@6.3.0:
- resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- flat-cache@3.2.0:
- resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==}
- engines: {node: ^10.12.0 || >=12.0.0}
-
- flatted@3.3.1:
- resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==}
-
- foreground-child@3.1.1:
- resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==}
- engines: {node: '>=14'}
-
- form-data@4.0.0:
- resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
- engines: {node: '>= 6'}
-
- formdata-polyfill@4.0.10:
- resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==}
- engines: {node: '>=12.20.0'}
-
- from@0.1.7:
- resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==}
-
- fs-constants@1.0.0:
- resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==}
-
- fs-extra@11.2.0:
- resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==}
- engines: {node: '>=14.14'}
-
- fs.realpath@1.0.0:
- resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
-
- fsevents@2.3.3:
- resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
- engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
- os: [darwin]
-
- function-bind@1.1.2:
- resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
-
- fx@34.0.0:
- resolution: {integrity: sha512-/fZih3/WLsrtlaj2mahjWxAmyuikmcl3D5kKPqLtFmEilLsy9wp0+/vEmfvYXXhwJc+ajtCFDCf+yttXmPMHSQ==}
- hasBin: true
-
- 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.*}
-
- get-func-name@2.0.2:
- resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==}
-
- get-port@6.1.2:
- resolution: {integrity: sha512-BrGGraKm2uPqurfGVj/z97/zv8dPleC6x9JBNRTrDNtCkkRF4rPwrQXFgL7+I+q8QSdU4ntLQX2D7KIxSy8nGw==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- get-source@2.0.12:
- resolution: {integrity: sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==}
-
- get-stream@6.0.1:
- resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
- engines: {node: '>=10'}
-
- get-stream@8.0.1:
- resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==}
- engines: {node: '>=16'}
-
- get-tsconfig@4.7.5:
- resolution: {integrity: sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==}
-
- github-from-package@0.0.0:
- resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==}
-
- glob-parent@5.1.2:
- resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
- engines: {node: '>= 6'}
-
- glob-parent@6.0.2:
- resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==}
- engines: {node: '>=10.13.0'}
-
- glob-to-regexp@0.4.1:
- resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==}
-
- glob@10.3.15:
- resolution: {integrity: sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw==}
- engines: {node: '>=16 || 14 >=14.18'}
- hasBin: true
-
- glob@7.2.3:
- resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
-
- glob@8.1.0:
- resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==}
- engines: {node: '>=12'}
-
- globals@13.24.0:
- resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==}
- engines: {node: '>=8'}
-
- globby@11.1.0:
- resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==}
- engines: {node: '>=10'}
-
- globby@13.2.2:
- resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- globrex@0.1.2:
- resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==}
-
- graceful-fs@4.2.11:
- resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
-
- graphemer@1.4.0:
- resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
-
- hanji@0.0.5:
- resolution: {integrity: sha512-Abxw1Lq+TnYiL4BueXqMau222fPSPMFtya8HdpWsz/xVAhifXou71mPh/kY2+08RgFcVccjG3uZHs6K5HAe3zw==}
-
- has-flag@4.0.0:
- resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
- engines: {node: '>=8'}
-
- hasown@2.0.2:
- resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
- engines: {node: '>= 0.4'}
-
- heap@0.2.7:
- resolution: {integrity: sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==}
-
- hono@4.3.9:
- resolution: {integrity: sha512-6c5LVE23HnIS8iBhY+XPmYJlPeeClznOi7mBNsAsJCgxo8Ciz75LTjqRUf5wv4RYq8kL+1KPLUZHCtKmbZssNg==}
- engines: {node: '>=16.0.0'}
-
- human-signals@2.1.0:
- resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==}
- engines: {node: '>=10.17.0'}
-
- human-signals@5.0.0:
- resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==}
- engines: {node: '>=16.17.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==}
-
- ignore-by-default@2.1.0:
- resolution: {integrity: sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==}
- engines: {node: '>=10 <11 || >=12 <13 || >=14'}
-
- ignore@5.3.1:
- resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==}
- engines: {node: '>= 4'}
-
- import-fresh@3.3.0:
- resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==}
- engines: {node: '>=6'}
-
- imurmurhash@0.1.4:
- resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==}
- engines: {node: '>=0.8.19'}
-
- indent-string@5.0.0:
- resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==}
- engines: {node: '>=12'}
-
- inflight@1.0.6:
- resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
-
- inherits@2.0.4:
- resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
-
- ini@1.3.8:
- resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==}
-
- irregular-plurals@3.5.0:
- resolution: {integrity: sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==}
- engines: {node: '>=8'}
-
- is-binary-path@2.1.0:
- resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
- engines: {node: '>=8'}
-
- is-core-module@2.13.1:
- resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==}
-
- is-error@2.2.2:
- resolution: {integrity: sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==}
-
- is-extglob@2.1.1:
- resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
- engines: {node: '>=0.10.0'}
-
- is-fullwidth-code-point@3.0.0:
- resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
- engines: {node: '>=8'}
-
- is-fullwidth-code-point@4.0.0:
- resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==}
- engines: {node: '>=12'}
-
- is-glob@4.0.3:
- resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
- engines: {node: '>=0.10.0'}
-
- is-number@7.0.0:
- resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
- engines: {node: '>=0.12.0'}
-
- is-path-inside@3.0.3:
- resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==}
- engines: {node: '>=8'}
-
- is-plain-object@5.0.0:
- resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==}
- engines: {node: '>=0.10.0'}
-
- is-promise@2.2.2:
- resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==}
-
- is-promise@4.0.0:
- resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==}
-
- is-property@1.0.2:
- resolution: {integrity: sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==}
-
- is-stream@2.0.1:
- resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
- engines: {node: '>=8'}
-
- is-stream@3.0.0:
- resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- is-unicode-supported@1.3.0:
- resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==}
- engines: {node: '>=12'}
-
- is-what@4.1.16:
- resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==}
- engines: {node: '>=12.13'}
-
- isexe@2.0.0:
- resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
-
- jackspeak@2.3.6:
- resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==}
- engines: {node: '>=14'}
-
- joycon@3.1.1:
- resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==}
- engines: {node: '>=10'}
-
- js-base64@3.7.7:
- resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==}
-
- js-string-escape@1.0.1:
- resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==}
- engines: {node: '>= 0.8'}
-
- js-tokens@9.0.0:
- resolution: {integrity: sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==}
-
- js-yaml@3.14.1:
- resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==}
- hasBin: true
-
- js-yaml@4.1.0:
- resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
- hasBin: true
-
- json-buffer@3.0.1:
- resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==}
-
- json-diff@0.9.0:
- resolution: {integrity: sha512-cVnggDrVkAAA3OvFfHpFEhOnmcsUpleEKq4d4O8sQWWSH40MBrWstKigVB1kGrgLWzuom+7rRdaCsnBD6VyObQ==}
- hasBin: true
-
- json-diff@1.0.6:
- resolution: {integrity: sha512-tcFIPRdlc35YkYdGxcamJjllUhXWv4n2rK9oJ2RsAzV4FBkuV4ojKEDgcZ+kpKxDmJKv+PFK65+1tVVOnSeEqA==}
- hasBin: true
-
- json-schema-traverse@0.4.1:
- resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==}
-
- json-stable-stringify-without-jsonify@1.0.1:
- resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
-
- jsonfile@6.1.0:
- resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}
-
- keyv@4.5.4:
- resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
-
- levn@0.4.1:
- resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
- engines: {node: '>= 0.8.0'}
-
- libsql@0.2.0:
- resolution: {integrity: sha512-ELBRqhpJx5Dap0187zKQnntZyk4EjlDHSrjIVL8t+fQ5e8IxbQTeYgZgigMjB1EvrETdkm0Y0VxBGhzPQ+t0Jg==}
- cpu: [x64, arm64]
- os: [darwin, linux, win32]
-
- lilconfig@3.1.1:
- resolution: {integrity: sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==}
- engines: {node: '>=14'}
-
- lines-and-columns@1.2.4:
- resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
-
- load-json-file@7.0.1:
- resolution: {integrity: sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- load-tsconfig@0.2.5:
- resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- local-pkg@0.5.0:
- resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==}
- engines: {node: '>=14'}
-
- locate-path@6.0.0:
- resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
- engines: {node: '>=10'}
-
- locate-path@7.2.0:
- resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- lodash.merge@4.6.2:
- resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}
-
- lodash.sortby@4.7.0:
- resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==}
-
- lodash.throttle@4.1.1:
- resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==}
-
- lodash@4.17.21:
- resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
-
- long@4.0.0:
- resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==}
-
- loupe@2.3.7:
- resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==}
-
- lru-cache@10.2.2:
- resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==}
- engines: {node: 14 || >=16.14}
-
- lru-cache@6.0.0:
- 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-queue@0.1.0:
- resolution: {integrity: sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==}
-
- magic-string@0.25.9:
- resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==}
-
- magic-string@0.30.10:
- resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==}
-
- map-age-cleaner@0.1.3:
- resolution: {integrity: sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==}
- engines: {node: '>=6'}
-
- map-stream@0.1.0:
- resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==}
-
- marked-terminal@6.2.0:
- resolution: {integrity: sha512-ubWhwcBFHnXsjYNsu+Wndpg0zhY4CahSpPlA70PlO0rR9r2sZpkyU+rkCsOWH+KMEkx847UpALON+HWgxowFtw==}
- engines: {node: '>=16.0.0'}
- peerDependencies:
- marked: '>=1 <12'
-
- marked@9.1.6:
- resolution: {integrity: sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q==}
- engines: {node: '>= 16'}
- hasBin: true
-
- matcher@5.0.0:
- resolution: {integrity: sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- md5-hex@3.0.1:
- resolution: {integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==}
- engines: {node: '>=8'}
-
- mem@9.0.2:
- resolution: {integrity: sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==}
- engines: {node: '>=12.20'}
-
- memoizee@0.4.15:
- resolution: {integrity: sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==}
-
- merge-stream@2.0.0:
- resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}
-
- merge2@1.4.1:
- resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
- engines: {node: '>= 8'}
-
- micromatch@4.0.5:
- resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==}
- engines: {node: '>=8.6'}
-
- mime-db@1.52.0:
- resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
- engines: {node: '>= 0.6'}
-
- mime-types@2.1.35:
- resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
- engines: {node: '>= 0.6'}
-
- mime@3.0.0:
- resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==}
- engines: {node: '>=10.0.0'}
- hasBin: true
-
- mimic-fn@2.1.0:
- resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==}
- engines: {node: '>=6'}
-
- mimic-fn@4.0.0:
- resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==}
- engines: {node: '>=12'}
-
- mimic-response@3.1.0:
- resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==}
- engines: {node: '>=10'}
-
- miniflare@3.20240512.0:
- resolution: {integrity: sha512-X0PlKR0AROKpxFoJNmRtCMIuJxj+ngEcyTOlEokj2rAQ0TBwUhB4/1uiPvdI6ofW5NugPOD1uomAv+gLjwsLDQ==}
- engines: {node: '>=16.13'}
- hasBin: true
-
- minimatch@3.1.2:
- resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
-
- minimatch@5.1.6:
- resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==}
- engines: {node: '>=10'}
-
- minimatch@7.4.6:
- resolution: {integrity: sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==}
- engines: {node: '>=10'}
-
- minimatch@9.0.4:
- resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==}
- engines: {node: '>=16 || 14 >=14.17'}
-
- minimist@1.2.8:
- resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
-
- minipass@7.1.1:
- resolution: {integrity: sha512-UZ7eQ+h8ywIRAW1hIEl2AqdwzJucU/Kp59+8kkZeSvafXhZjul247BvIJjEVFVeON6d7lM46XX1HXCduKAS8VA==}
- engines: {node: '>=16 || 14 >=14.17'}
-
- mkdirp-classic@0.5.3:
- resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==}
-
- mlly@1.7.0:
- resolution: {integrity: sha512-U9SDaXGEREBYQgfejV97coK0UL1r+qnF2SyO9A3qcI8MzKnsIFKHNVEkrDyNncQTKQQumsasmeq84eNMdBfsNQ==}
-
- ms@2.1.2:
- resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
-
- ms@2.1.3:
- resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
-
- mustache@4.2.0:
- resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==}
- hasBin: true
-
- mysql2@2.3.3:
- resolution: {integrity: sha512-wxJUev6LgMSgACDkb/InIFxDprRa6T95+VEoR+xPvtngtccNH2dGjEB/fVZ8yg1gWv1510c9CvXuJHi5zUm0ZA==}
- 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'}
-
- nan@2.19.0:
- resolution: {integrity: sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==}
-
- nanoid@3.3.7:
- resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==}
- engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
- hasBin: true
-
- napi-build-utils@1.0.2:
- resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==}
-
- natural-compare@1.4.0:
- resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
-
- next-tick@1.1.0:
- resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==}
-
- node-abi@3.62.0:
- resolution: {integrity: sha512-CPMcGa+y33xuL1E0TcNIu4YyaZCxnnvkVaEXrsosR3FxN+fV8xvb7Mzpb7IgKler10qeMkE6+Dp8qJhpzdq35g==}
- engines: {node: '>=10'}
-
- node-domexception@1.0.0:
- resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
- engines: {node: '>=10.5.0'}
-
- node-emoji@2.1.3:
- resolution: {integrity: sha512-E2WEOVsgs7O16zsURJ/eH8BqhF029wGpEOnv7Urwdo2wmQanOACwJQh0devF9D9RhoZru0+9JXIS0dBXIAz+lA==}
- engines: {node: '>=18'}
-
- node-fetch@2.7.0:
- resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==}
- engines: {node: 4.x || >=6.0.0}
- peerDependencies:
- encoding: ^0.1.0
- peerDependenciesMeta:
- encoding:
- optional: true
-
- node-fetch@3.3.1:
- resolution: {integrity: sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- node-fetch@3.3.2:
- resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- node-forge@1.3.1:
- resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==}
- engines: {node: '>= 6.13.0'}
-
- node-gyp-build@4.8.1:
- resolution: {integrity: sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==}
- hasBin: true
-
- nofilter@3.1.0:
- resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==}
- engines: {node: '>=12.19'}
-
- normalize-path@3.0.0:
- resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
- engines: {node: '>=0.10.0'}
-
- npm-run-path@4.0.1:
- resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==}
- engines: {node: '>=8'}
-
- npm-run-path@5.3.0:
- resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- object-assign@4.1.1:
- resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
- engines: {node: '>=0.10.0'}
-
- obuf@1.1.2:
- resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==}
-
- once@1.4.0:
- resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
-
- onetime@5.1.2:
- resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==}
- engines: {node: '>=6'}
-
- onetime@6.0.0:
- resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==}
- engines: {node: '>=12'}
-
- optionator@0.9.4:
- resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==}
- engines: {node: '>= 0.8.0'}
-
- p-defer@1.0.0:
- resolution: {integrity: sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==}
- engines: {node: '>=4'}
-
- p-event@5.0.1:
- resolution: {integrity: sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- p-limit@3.1.0:
- resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==}
- engines: {node: '>=10'}
-
- p-limit@4.0.0:
- resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- p-limit@5.0.0:
- resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==}
- engines: {node: '>=18'}
-
- p-locate@5.0.0:
- resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==}
- engines: {node: '>=10'}
-
- p-locate@6.0.0:
- resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- p-map@5.5.0:
- resolution: {integrity: sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==}
- engines: {node: '>=12'}
-
- p-timeout@5.1.0:
- resolution: {integrity: sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==}
- engines: {node: '>=12'}
-
- parent-module@1.0.1:
- resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
- engines: {node: '>=6'}
-
- parse-ms@3.0.0:
- resolution: {integrity: sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==}
- engines: {node: '>=12'}
-
- path-exists@4.0.0:
- resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
- engines: {node: '>=8'}
-
- path-exists@5.0.0:
- resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- path-is-absolute@1.0.1:
- resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}
- engines: {node: '>=0.10.0'}
-
- path-key@3.1.1:
- resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
- engines: {node: '>=8'}
-
- path-key@4.0.0:
- resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==}
- engines: {node: '>=12'}
-
- path-parse@1.0.7:
- resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
-
- path-scurry@1.11.1:
- resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
- engines: {node: '>=16 || 14 >=14.18'}
-
- path-to-regexp@6.2.2:
- resolution: {integrity: sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==}
-
- path-type@4.0.0:
- resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
- engines: {node: '>=8'}
-
- pathe@1.1.2:
- resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==}
-
- pathval@1.1.1:
- resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==}
-
- pause-stream@0.0.11:
- resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==}
-
- pg-cloudflare@1.1.1:
- resolution: {integrity: sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==}
-
- pg-connection-string@2.6.4:
- resolution: {integrity: sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==}
-
- pg-int8@1.0.1:
- resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==}
- engines: {node: '>=4.0.0'}
-
- pg-numeric@1.0.2:
- resolution: {integrity: sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==}
- engines: {node: '>=4'}
-
- pg-pool@3.6.2:
- resolution: {integrity: sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg==}
- peerDependencies:
- pg: '>=8.0'
-
- pg-protocol@1.6.1:
- resolution: {integrity: sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==}
-
- pg-types@2.2.0:
- resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==}
- engines: {node: '>=4'}
-
- pg-types@4.0.2:
- resolution: {integrity: sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==}
- engines: {node: '>=10'}
-
- pg@8.11.5:
- resolution: {integrity: sha512-jqgNHSKL5cbDjFlHyYsCXmQDrfIX/3RsNwYqpd4N0Kt8niLuNoRNH+aazv6cOd43gPh9Y4DjQCtb+X0MH0Hvnw==}
- engines: {node: '>= 8.0.0'}
- peerDependencies:
- pg-native: '>=3.0.1'
- peerDependenciesMeta:
- pg-native:
- optional: true
-
- pgpass@1.0.5:
- resolution: {integrity: sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==}
-
- picocolors@1.0.1:
- resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==}
-
- picomatch@2.3.1:
- resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
- engines: {node: '>=8.6'}
-
- pirates@4.0.6:
- resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==}
- engines: {node: '>= 6'}
-
- pkg-conf@4.0.0:
- resolution: {integrity: sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- pkg-types@1.1.1:
- resolution: {integrity: sha512-ko14TjmDuQJ14zsotODv7dBlwxKhUKQEhuhmbqo1uCi9BB0Z2alo/wAXg6q1dTR5TyuqYyWhjtfe/Tsh+X28jQ==}
-
- plur@5.1.0:
- resolution: {integrity: sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- pluralize@8.0.0:
- resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==}
- engines: {node: '>=4'}
-
- postcss-load-config@4.0.2:
- resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==}
- engines: {node: '>= 14'}
- peerDependencies:
- postcss: '>=8.0.9'
- ts-node: '>=9.0.0'
- peerDependenciesMeta:
- postcss:
- optional: true
- ts-node:
- optional: true
-
- postcss@8.4.38:
- resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==}
- engines: {node: ^10 || ^12 || >=14}
-
- postgres-array@2.0.0:
- resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==}
- engines: {node: '>=4'}
-
- postgres-array@3.0.2:
- resolution: {integrity: sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog==}
- engines: {node: '>=12'}
-
- postgres-bytea@1.0.0:
- resolution: {integrity: sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==}
- engines: {node: '>=0.10.0'}
-
- postgres-bytea@3.0.0:
- resolution: {integrity: sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw==}
- engines: {node: '>= 6'}
-
- postgres-date@1.0.7:
- resolution: {integrity: sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==}
- engines: {node: '>=0.10.0'}
-
- postgres-date@2.1.0:
- resolution: {integrity: sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==}
- engines: {node: '>=12'}
-
- postgres-interval@1.2.0:
- resolution: {integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==}
- engines: {node: '>=0.10.0'}
-
- postgres-interval@3.0.0:
- resolution: {integrity: sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw==}
- engines: {node: '>=12'}
-
- postgres-range@1.1.4:
- resolution: {integrity: sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w==}
-
- postgres@3.4.4:
- resolution: {integrity: sha512-IbyN+9KslkqcXa8AO9fxpk97PA4pzewvpi2B3Dwy9u4zpV32QicaEdgmF3eSQUzdRk7ttDHQejNgAEr4XoeH4A==}
- engines: {node: '>=12'}
-
- prebuild-install@7.1.2:
- resolution: {integrity: sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==}
- engines: {node: '>=10'}
- hasBin: true
-
- prelude-ls@1.2.1:
- resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
- engines: {node: '>= 0.8.0'}
-
- prettier-linter-helpers@1.0.0:
- resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==}
- engines: {node: '>=6.0.0'}
-
- prettier@2.8.8:
- resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==}
- engines: {node: '>=10.13.0'}
- hasBin: true
-
- pretty-format@29.7.0:
- resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==}
- engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
-
- pretty-ms@8.0.0:
- resolution: {integrity: sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==}
- engines: {node: '>=14.16'}
-
- printable-characters@1.0.42:
- resolution: {integrity: sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==}
-
- ps-tree@1.2.0:
- resolution: {integrity: sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==}
- engines: {node: '>= 0.10'}
- hasBin: true
-
- pump@3.0.0:
- resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==}
-
- punycode@2.3.1:
- resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
- engines: {node: '>=6'}
-
- queue-microtask@1.2.3:
- resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
-
- rc@1.2.8:
- resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==}
- hasBin: true
-
- react-is@18.3.1:
- resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==}
-
- readable-stream@3.6.2:
- resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==}
- engines: {node: '>= 6'}
-
- readdirp@3.6.0:
- resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
- engines: {node: '>=8.10.0'}
-
- redeyed@2.1.1:
- resolution: {integrity: sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==}
-
- require-directory@2.1.1:
- resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}
- engines: {node: '>=0.10.0'}
-
- resolve-cwd@3.0.0:
- resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==}
- engines: {node: '>=8'}
-
- resolve-from@4.0.0:
- resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
- engines: {node: '>=4'}
-
- resolve-from@5.0.0:
- resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==}
- engines: {node: '>=8'}
-
- resolve-pkg-maps@1.0.0:
- resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
-
- resolve.exports@2.0.2:
- resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==}
- engines: {node: '>=10'}
-
- resolve@1.22.8:
- resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==}
- hasBin: true
-
- reusify@1.0.4:
- 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==}
- hasBin: true
-
- rollup-plugin-inject@3.0.2:
- resolution: {integrity: sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==}
- deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
-
- rollup-plugin-node-polyfills@0.2.1:
- resolution: {integrity: sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==}
-
- rollup-pluginutils@2.8.2:
- resolution: {integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==}
-
- rollup@4.17.2:
- resolution: {integrity: sha512-/9ClTJPByC0U4zNLowV1tMBe8yMEAxewtR3cUNX5BoEpGH3dQEWpJLr6CLp0fPdYRF/fzVOgvDb1zXuakwF5kQ==}
- engines: {node: '>=18.0.0', npm: '>=8.0.0'}
- hasBin: true
-
- run-parallel@1.2.0:
- resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
-
- safe-buffer@5.2.1:
- resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
-
- safer-buffer@2.1.2:
- resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
-
- selfsigned@2.4.1:
- resolution: {integrity: sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==}
- engines: {node: '>=10'}
-
- semver@7.6.2:
- resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==}
- engines: {node: '>=10'}
- hasBin: true
-
- seq-queue@0.0.5:
- resolution: {integrity: sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==}
-
- serialize-error@7.0.1:
- resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==}
- engines: {node: '>=10'}
-
- shebang-command@2.0.0:
- resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
- engines: {node: '>=8'}
-
- shebang-regex@3.0.0:
- resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
- engines: {node: '>=8'}
-
- siginfo@2.0.0:
- resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}
-
- signal-exit@3.0.7:
- resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
-
- signal-exit@4.1.0:
- resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
- engines: {node: '>=14'}
-
- simple-concat@1.0.1:
- resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==}
-
- simple-get@4.0.1:
- resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==}
-
- sisteransi@1.0.5:
- resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}
-
- skin-tone@2.0.0:
- resolution: {integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==}
- engines: {node: '>=8'}
-
- slash@3.0.0:
- resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
- engines: {node: '>=8'}
-
- slash@4.0.0:
- resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==}
- engines: {node: '>=12'}
-
- slice-ansi@5.0.0:
- resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==}
- engines: {node: '>=12'}
-
- source-map-js@1.2.0:
- resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==}
- engines: {node: '>=0.10.0'}
-
- source-map-support@0.5.21:
- resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}
-
- source-map@0.6.1:
- resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
- engines: {node: '>=0.10.0'}
-
- source-map@0.8.0-beta.0:
- resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==}
- engines: {node: '>= 8'}
-
- sourcemap-codec@1.4.8:
- resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}
- deprecated: Please use @jridgewell/sourcemap-codec instead
-
- split-ca@1.0.1:
- resolution: {integrity: sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ==}
-
- split2@4.2.0:
- resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==}
- engines: {node: '>= 10.x'}
-
- split@0.3.3:
- resolution: {integrity: sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==}
-
- sprintf-js@1.0.3:
- resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==}
-
- sqlstring@2.3.3:
- resolution: {integrity: sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==}
- engines: {node: '>= 0.6'}
-
- ssh2@1.15.0:
- resolution: {integrity: sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw==}
- engines: {node: '>=10.16.0'}
-
- stack-utils@2.0.6:
- resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==}
- engines: {node: '>=10'}
-
- stackback@0.0.2:
- resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
-
- stacktracey@2.1.8:
- resolution: {integrity: sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==}
-
- std-env@3.7.0:
- resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==}
-
- stoppable@1.1.0:
- resolution: {integrity: sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==}
- engines: {node: '>=4', npm: '>=6'}
-
- stream-combiner@0.0.4:
- resolution: {integrity: sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==}
-
- string-width@4.2.3:
- resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
- engines: {node: '>=8'}
-
- string-width@5.1.2:
- resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==}
- engines: {node: '>=12'}
-
- string_decoder@1.3.0:
- resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
-
- strip-ansi@6.0.1:
- resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
- engines: {node: '>=8'}
-
- strip-ansi@7.1.0:
- resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==}
- engines: {node: '>=12'}
-
- strip-final-newline@2.0.0:
- resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==}
- engines: {node: '>=6'}
-
- strip-final-newline@3.0.0:
- resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==}
- engines: {node: '>=12'}
-
- strip-json-comments@2.0.1:
- resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==}
- engines: {node: '>=0.10.0'}
-
- strip-json-comments@3.1.1:
- resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
- engines: {node: '>=8'}
-
- strip-literal@2.1.0:
- resolution: {integrity: sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==}
-
- strnum@1.0.5:
- resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==}
-
- sucrase@3.35.0:
- resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==}
- engines: {node: '>=16 || 14 >=14.17'}
- hasBin: true
-
- superjson@2.2.1:
- resolution: {integrity: sha512-8iGv75BYOa0xRJHK5vRLEjE2H/i4lulTjzpUXic3Eg8akftYjkmQDa8JARQ42rlczXyFR3IeRoeFCc7RxHsYZA==}
- engines: {node: '>=16'}
-
- supertap@3.0.1:
- resolution: {integrity: sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
-
- supports-color@7.2.0:
- resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
- engines: {node: '>=8'}
-
- supports-hyperlinks@3.0.0:
- resolution: {integrity: sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==}
- engines: {node: '>=14.18'}
-
- supports-preserve-symlinks-flag@1.0.0:
- resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
- engines: {node: '>= 0.4'}
-
- synckit@0.8.8:
- resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==}
- engines: {node: ^14.18.0 || >=16.0.0}
-
- tar-fs@2.0.1:
- resolution: {integrity: sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA==}
-
- tar-fs@2.1.1:
- resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==}
-
- tar-stream@2.2.0:
- resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==}
- engines: {node: '>=6'}
-
- temp-dir@3.0.0:
- resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==}
- engines: {node: '>=14.16'}
-
- text-table@0.2.0:
- resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
-
- thenify-all@1.6.0:
- resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==}
- engines: {node: '>=0.8'}
-
- thenify@3.3.1:
- resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==}
-
- through@2.3.8:
- resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
-
- time-zone@1.0.0:
- resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==}
- engines: {node: '>=4'}
-
- timers-ext@0.1.7:
- resolution: {integrity: sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==}
-
- tinybench@2.8.0:
- resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==}
-
- tinypool@0.8.4:
- resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==}
- engines: {node: '>=14.0.0'}
-
- tinyspy@2.2.1:
- resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==}
- engines: {node: '>=14.0.0'}
-
- to-regex-range@5.0.1:
- resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
- engines: {node: '>=8.0'}
-
- tr46@0.0.3:
- resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
-
- tr46@1.0.1:
- resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==}
-
- tree-kill@1.2.2:
- resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==}
- hasBin: true
-
- ts-api-utils@1.3.0:
- resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==}
- engines: {node: '>=16'}
- peerDependencies:
- typescript: '>=4.2.0'
-
- ts-expose-internals-conditionally@1.0.0-empty.0:
- resolution: {integrity: sha512-F8m9NOF6ZhdOClDVdlM8gj3fDCav4ZIFSs/EI3ksQbAAXVSCN/Jh5OCJDDZWBuBy9psFc6jULGDlPwjMYMhJDw==}
-
- ts-interface-checker@0.1.13:
- resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==}
-
- tsconfck@3.0.3:
- resolution: {integrity: sha512-4t0noZX9t6GcPTfBAbIbbIU4pfpCwh0ueq3S4O/5qXI1VwK1outmxhe9dOiEWqMz3MW2LKgDTpqWV+37IWuVbA==}
- engines: {node: ^18 || >=20}
- hasBin: true
- peerDependencies:
- typescript: ^5.0.0
- peerDependenciesMeta:
- typescript:
- optional: true
-
- tslib@1.14.1:
- resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
-
- tslib@2.6.2:
- resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
-
- tsup@8.0.2:
- resolution: {integrity: sha512-NY8xtQXdH7hDUAZwcQdY/Vzlw9johQsaqf7iwZ6g1DOUlFYQ5/AtVAjTvihhEyeRlGo4dLRVHtrRaL35M1daqQ==}
- engines: {node: '>=18'}
- hasBin: true
- peerDependencies:
- '@microsoft/api-extractor': ^7.36.0
- '@swc/core': ^1
- postcss: ^8.4.12
- typescript: '>=4.5.0'
- peerDependenciesMeta:
- '@microsoft/api-extractor':
- optional: true
- '@swc/core':
- optional: true
- postcss:
- optional: true
- typescript:
- optional: true
-
- tsx@3.14.0:
- resolution: {integrity: sha512-xHtFaKtHxM9LOklMmJdI3BEnQq/D5F73Of2E1GDrITi9sgoVkvIsrQUTY1G8FlmGtA+awCI4EBlTRRYxkL2sRg==}
- hasBin: true
-
- tunnel-agent@0.6.0:
- resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==}
-
- tweetnacl@0.14.5:
- resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==}
-
- type-check@0.4.0:
- resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
- engines: {node: '>= 0.8.0'}
-
- type-detect@4.0.8:
- resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==}
- engines: {node: '>=4'}
-
- type-fest@0.13.1:
- resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==}
- engines: {node: '>=10'}
-
- type-fest@0.20.2:
- resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==}
- engines: {node: '>=10'}
-
- type@2.7.2:
- resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==}
-
- typescript@5.3.3:
- resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==}
- engines: {node: '>=14.17'}
- hasBin: true
-
- typescript@5.4.5:
- resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==}
- engines: {node: '>=14.17'}
- hasBin: true
-
- ufo@1.5.3:
- resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==}
-
- undici-types@5.26.5:
- resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
-
- undici@5.28.4:
- resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==}
- engines: {node: '>=14.0'}
-
- unicode-emoji-modifier-base@1.0.0:
- resolution: {integrity: sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==}
- engines: {node: '>=4'}
-
- universalify@2.0.1:
- resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==}
- engines: {node: '>= 10.0.0'}
-
- uri-js@4.4.1:
- resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
-
- utf-8-validate@6.0.3:
- resolution: {integrity: sha512-uIuGf9TWQ/y+0Lp+KGZCMuJWc3N9BHA+l/UmHd/oUHwJJDeysyTRxNQVkbzsIWfGFbRe3OcgML/i0mvVRPOyDA==}
- engines: {node: '>=6.14.2'}
-
- util-deprecate@1.0.2:
- resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
-
- uuid@9.0.1:
- resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==}
- hasBin: true
-
- validate-npm-package-name@5.0.1:
- resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==}
- engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
-
- vite-node@1.6.0:
- resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==}
- engines: {node: ^18.0.0 || >=20.0.0}
- hasBin: true
-
- vite-tsconfig-paths@4.3.2:
- resolution: {integrity: sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==}
- peerDependencies:
- vite: '*'
- peerDependenciesMeta:
- vite:
- optional: true
-
- vite@5.2.11:
- resolution: {integrity: sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==}
- engines: {node: ^18.0.0 || >=20.0.0}
- hasBin: true
- peerDependencies:
- '@types/node': ^18.0.0 || >=20.0.0
- less: '*'
- lightningcss: ^1.21.0
- sass: '*'
- stylus: '*'
- sugarss: '*'
- terser: ^5.4.0
- peerDependenciesMeta:
- '@types/node':
- optional: true
- less:
- optional: true
- lightningcss:
- optional: true
- sass:
- optional: true
- stylus:
- optional: true
- sugarss:
- optional: true
- terser:
- optional: true
-
- vitest@1.6.0:
- resolution: {integrity: sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==}
- engines: {node: ^18.0.0 || >=20.0.0}
- hasBin: true
- peerDependencies:
- '@edge-runtime/vm': '*'
- '@types/node': ^18.0.0 || >=20.0.0
- '@vitest/browser': 1.6.0
- '@vitest/ui': 1.6.0
- happy-dom: '*'
- jsdom: '*'
- peerDependenciesMeta:
- '@edge-runtime/vm':
- optional: true
- '@types/node':
- optional: true
- '@vitest/browser':
- optional: true
- '@vitest/ui':
- optional: true
- happy-dom:
- optional: true
- jsdom:
- optional: true
-
- web-streams-polyfill@3.3.3:
- resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==}
- engines: {node: '>= 8'}
-
- webidl-conversions@3.0.1:
- resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
-
- webidl-conversions@4.0.2:
- resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==}
-
- webpod@0.0.2:
- resolution: {integrity: sha512-cSwwQIeg8v4i3p4ajHhwgR7N6VyxAf+KYSSsY6Pd3aETE+xEU4vbitz7qQkB0I321xnhDdgtxuiSfk5r/FVtjg==}
- hasBin: true
-
- well-known-symbols@2.0.0:
- resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==}
- engines: {node: '>=6'}
-
- whatwg-url@5.0.0:
- resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
-
- whatwg-url@7.1.0:
- resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==}
-
- which@2.0.2:
- resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
- engines: {node: '>= 8'}
- hasBin: true
-
- which@3.0.1:
- resolution: {integrity: sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==}
- engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
- hasBin: true
-
- why-is-node-running@2.2.2:
- resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==}
- engines: {node: '>=8'}
- hasBin: true
-
- word-wrap@1.2.5:
- resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==}
- engines: {node: '>=0.10.0'}
-
- wordwrap@1.0.0:
- resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==}
-
- workerd@1.20240512.0:
- resolution: {integrity: sha512-VUBmR1PscAPHEE0OF/G2K7/H1gnr9aDWWZzdkIgWfNKkv8dKFCT75H+GJtUHjfwqz3rYCzaNZmatSXOpLGpF8A==}
- engines: {node: '>=16'}
- hasBin: true
-
- wrangler@3.57.0:
- resolution: {integrity: sha512-izK3AZtlFoTq8N0EZjLOQ7hqwsjaXCc1cbNKuhsLJjDX1jB1YZBDPhIhtXL4VVzkJAcH+0Zw2gguOePFCHNaxw==}
- engines: {node: '>=16.17.0'}
- hasBin: true
- peerDependencies:
- '@cloudflare/workers-types': ^4.20240512.0
- peerDependenciesMeta:
- '@cloudflare/workers-types':
- optional: true
-
- wrap-ansi@7.0.0:
- resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
- engines: {node: '>=10'}
-
- wrap-ansi@8.1.0:
- resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==}
- engines: {node: '>=12'}
-
- wrappy@1.0.2:
- resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
-
- write-file-atomic@5.0.1:
- resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==}
- engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
-
- ws@8.14.2:
- resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==}
- engines: {node: '>=10.0.0'}
- peerDependencies:
- bufferutil: ^4.0.1
- utf-8-validate: '>=5.0.2'
- peerDependenciesMeta:
- bufferutil:
- optional: true
- utf-8-validate:
- optional: true
-
- ws@8.17.0:
- resolution: {integrity: sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==}
- engines: {node: '>=10.0.0'}
- peerDependencies:
- bufferutil: ^4.0.1
- utf-8-validate: '>=5.0.2'
- peerDependenciesMeta:
- bufferutil:
- optional: true
- utf-8-validate:
- optional: true
-
- xtend@4.0.2:
- resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}
- engines: {node: '>=0.4'}
-
- xxhash-wasm@1.0.2:
- resolution: {integrity: sha512-ibF0Or+FivM9lNrg+HGJfVX8WJqgo+kCLDc4vx6xMeTce7Aj+DLttKbxxRR/gNLSAelRc1omAPlJ77N/Jem07A==}
-
- y18n@5.0.8:
- resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==}
- engines: {node: '>=10'}
-
- yallist@4.0.0:
- resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
-
- yaml@2.4.2:
- resolution: {integrity: sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==}
- engines: {node: '>= 14'}
- hasBin: true
-
- yargs-parser@21.1.1:
- resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==}
- engines: {node: '>=12'}
-
- yargs@17.7.2:
- resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==}
- engines: {node: '>=12'}
-
- yocto-queue@0.1.0:
- resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
- engines: {node: '>=10'}
-
- yocto-queue@1.0.0:
- resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==}
- engines: {node: '>=12.20'}
-
- youch@3.3.3:
- resolution: {integrity: sha512-qSFXUk3UZBLfggAW3dJKg0BMblG5biqSF8M34E06o5CSsZtH92u9Hqmj2RzGiHDi64fhe83+4tENFP2DB6t6ZA==}
-
- zod@3.23.8:
- resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==}
-
- zx@7.2.3:
- resolution: {integrity: sha512-QODu38nLlYXg/B/Gw7ZKiZrvPkEsjPN3LQ5JFXM7h0JvwhEdPNNl+4Ao1y4+o3CLNiDUNcwzQYZ4/Ko7kKzCMA==}
- engines: {node: '>= 16.0.0'}
- hasBin: true
-
-snapshots:
-
- '@andrewbranch/untar.js@1.0.3': {}
-
- '@arethetypeswrong/cli@0.15.3':
- dependencies:
- '@arethetypeswrong/core': 0.15.1
- chalk: 4.1.2
- cli-table3: 0.6.5
- commander: 10.0.1
- marked: 9.1.6
- marked-terminal: 6.2.0(marked@9.1.6)
- semver: 7.6.2
-
- '@arethetypeswrong/core@0.15.1':
- dependencies:
- '@andrewbranch/untar.js': 1.0.3
- fflate: 0.8.2
- semver: 7.6.2
- ts-expose-internals-conditionally: 1.0.0-empty.0
- typescript: 5.3.3
- validate-npm-package-name: 5.0.1
-
- '@aws-crypto/ie11-detection@3.0.0':
- dependencies:
- tslib: 1.14.1
-
- '@aws-crypto/sha256-browser@3.0.0':
- dependencies:
- '@aws-crypto/ie11-detection': 3.0.0
- '@aws-crypto/sha256-js': 3.0.0
- '@aws-crypto/supports-web-crypto': 3.0.0
- '@aws-crypto/util': 3.0.0
- '@aws-sdk/types': 3.577.0
- '@aws-sdk/util-locate-window': 3.568.0
- '@aws-sdk/util-utf8-browser': 3.259.0
- tslib: 1.14.1
-
- '@aws-crypto/sha256-js@3.0.0':
- dependencies:
- '@aws-crypto/util': 3.0.0
- '@aws-sdk/types': 3.577.0
- tslib: 1.14.1
-
- '@aws-crypto/supports-web-crypto@3.0.0':
- dependencies:
- tslib: 1.14.1
-
- '@aws-crypto/util@3.0.0':
- dependencies:
- '@aws-sdk/types': 3.577.0
- '@aws-sdk/util-utf8-browser': 3.259.0
- tslib: 1.14.1
-
- '@aws-sdk/client-rds-data@3.577.0':
- dependencies:
- '@aws-crypto/sha256-browser': 3.0.0
- '@aws-crypto/sha256-js': 3.0.0
- '@aws-sdk/client-sso-oidc': 3.577.0(@aws-sdk/client-sts@3.577.0)
- '@aws-sdk/client-sts': 3.577.0
- '@aws-sdk/core': 3.576.0
- '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0)
- '@aws-sdk/middleware-host-header': 3.577.0
- '@aws-sdk/middleware-logger': 3.577.0
- '@aws-sdk/middleware-recursion-detection': 3.577.0
- '@aws-sdk/middleware-user-agent': 3.577.0
- '@aws-sdk/region-config-resolver': 3.577.0
- '@aws-sdk/types': 3.577.0
- '@aws-sdk/util-endpoints': 3.577.0
- '@aws-sdk/util-user-agent-browser': 3.577.0
- '@aws-sdk/util-user-agent-node': 3.577.0
- '@smithy/config-resolver': 3.0.0
- '@smithy/core': 2.0.1
- '@smithy/fetch-http-handler': 3.0.1
- '@smithy/hash-node': 3.0.0
- '@smithy/invalid-dependency': 3.0.0
- '@smithy/middleware-content-length': 3.0.0
- '@smithy/middleware-endpoint': 3.0.0
- '@smithy/middleware-retry': 3.0.1
- '@smithy/middleware-serde': 3.0.0
- '@smithy/middleware-stack': 3.0.0
- '@smithy/node-config-provider': 3.0.0
- '@smithy/node-http-handler': 3.0.0
- '@smithy/protocol-http': 4.0.0
- '@smithy/smithy-client': 3.0.1
- '@smithy/types': 3.0.0
- '@smithy/url-parser': 3.0.0
- '@smithy/util-base64': 3.0.0
- '@smithy/util-body-length-browser': 3.0.0
- '@smithy/util-body-length-node': 3.0.0
- '@smithy/util-defaults-mode-browser': 3.0.1
- '@smithy/util-defaults-mode-node': 3.0.1
- '@smithy/util-endpoints': 2.0.0
- '@smithy/util-middleware': 3.0.0
- '@smithy/util-retry': 3.0.0
- '@smithy/util-utf8': 3.0.0
- tslib: 2.6.2
- transitivePeerDependencies:
- - aws-crt
-
- '@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0)':
- dependencies:
- '@aws-crypto/sha256-browser': 3.0.0
- '@aws-crypto/sha256-js': 3.0.0
- '@aws-sdk/client-sts': 3.577.0
- '@aws-sdk/core': 3.576.0
- '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0)
- '@aws-sdk/middleware-host-header': 3.577.0
- '@aws-sdk/middleware-logger': 3.577.0
- '@aws-sdk/middleware-recursion-detection': 3.577.0
- '@aws-sdk/middleware-user-agent': 3.577.0
- '@aws-sdk/region-config-resolver': 3.577.0
- '@aws-sdk/types': 3.577.0
- '@aws-sdk/util-endpoints': 3.577.0
- '@aws-sdk/util-user-agent-browser': 3.577.0
- '@aws-sdk/util-user-agent-node': 3.577.0
- '@smithy/config-resolver': 3.0.0
- '@smithy/core': 2.0.1
- '@smithy/fetch-http-handler': 3.0.1
- '@smithy/hash-node': 3.0.0
- '@smithy/invalid-dependency': 3.0.0
- '@smithy/middleware-content-length': 3.0.0
- '@smithy/middleware-endpoint': 3.0.0
- '@smithy/middleware-retry': 3.0.1
- '@smithy/middleware-serde': 3.0.0
- '@smithy/middleware-stack': 3.0.0
- '@smithy/node-config-provider': 3.0.0
- '@smithy/node-http-handler': 3.0.0
- '@smithy/protocol-http': 4.0.0
- '@smithy/smithy-client': 3.0.1
- '@smithy/types': 3.0.0
- '@smithy/url-parser': 3.0.0
- '@smithy/util-base64': 3.0.0
- '@smithy/util-body-length-browser': 3.0.0
- '@smithy/util-body-length-node': 3.0.0
- '@smithy/util-defaults-mode-browser': 3.0.1
- '@smithy/util-defaults-mode-node': 3.0.1
- '@smithy/util-endpoints': 2.0.0
- '@smithy/util-middleware': 3.0.0
- '@smithy/util-retry': 3.0.0
- '@smithy/util-utf8': 3.0.0
- tslib: 2.6.2
- transitivePeerDependencies:
- - '@aws-sdk/client-sts'
- - aws-crt
-
- '@aws-sdk/client-sso@3.577.0':
- dependencies:
- '@aws-crypto/sha256-browser': 3.0.0
- '@aws-crypto/sha256-js': 3.0.0
- '@aws-sdk/core': 3.576.0
- '@aws-sdk/middleware-host-header': 3.577.0
- '@aws-sdk/middleware-logger': 3.577.0
- '@aws-sdk/middleware-recursion-detection': 3.577.0
- '@aws-sdk/middleware-user-agent': 3.577.0
- '@aws-sdk/region-config-resolver': 3.577.0
- '@aws-sdk/types': 3.577.0
- '@aws-sdk/util-endpoints': 3.577.0
- '@aws-sdk/util-user-agent-browser': 3.577.0
- '@aws-sdk/util-user-agent-node': 3.577.0
- '@smithy/config-resolver': 3.0.0
- '@smithy/core': 2.0.1
- '@smithy/fetch-http-handler': 3.0.1
- '@smithy/hash-node': 3.0.0
- '@smithy/invalid-dependency': 3.0.0
- '@smithy/middleware-content-length': 3.0.0
- '@smithy/middleware-endpoint': 3.0.0
- '@smithy/middleware-retry': 3.0.1
- '@smithy/middleware-serde': 3.0.0
- '@smithy/middleware-stack': 3.0.0
- '@smithy/node-config-provider': 3.0.0
- '@smithy/node-http-handler': 3.0.0
- '@smithy/protocol-http': 4.0.0
- '@smithy/smithy-client': 3.0.1
- '@smithy/types': 3.0.0
- '@smithy/url-parser': 3.0.0
- '@smithy/util-base64': 3.0.0
- '@smithy/util-body-length-browser': 3.0.0
- '@smithy/util-body-length-node': 3.0.0
- '@smithy/util-defaults-mode-browser': 3.0.1
- '@smithy/util-defaults-mode-node': 3.0.1
- '@smithy/util-endpoints': 2.0.0
- '@smithy/util-middleware': 3.0.0
- '@smithy/util-retry': 3.0.0
- '@smithy/util-utf8': 3.0.0
- tslib: 2.6.2
- transitivePeerDependencies:
- - aws-crt
-
- '@aws-sdk/client-sts@3.577.0':
- dependencies:
- '@aws-crypto/sha256-browser': 3.0.0
- '@aws-crypto/sha256-js': 3.0.0
- '@aws-sdk/client-sso-oidc': 3.577.0(@aws-sdk/client-sts@3.577.0)
- '@aws-sdk/core': 3.576.0
- '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0)
- '@aws-sdk/middleware-host-header': 3.577.0
- '@aws-sdk/middleware-logger': 3.577.0
- '@aws-sdk/middleware-recursion-detection': 3.577.0
- '@aws-sdk/middleware-user-agent': 3.577.0
- '@aws-sdk/region-config-resolver': 3.577.0
- '@aws-sdk/types': 3.577.0
- '@aws-sdk/util-endpoints': 3.577.0
- '@aws-sdk/util-user-agent-browser': 3.577.0
- '@aws-sdk/util-user-agent-node': 3.577.0
- '@smithy/config-resolver': 3.0.0
- '@smithy/core': 2.0.1
- '@smithy/fetch-http-handler': 3.0.1
- '@smithy/hash-node': 3.0.0
- '@smithy/invalid-dependency': 3.0.0
- '@smithy/middleware-content-length': 3.0.0
- '@smithy/middleware-endpoint': 3.0.0
- '@smithy/middleware-retry': 3.0.1
- '@smithy/middleware-serde': 3.0.0
- '@smithy/middleware-stack': 3.0.0
- '@smithy/node-config-provider': 3.0.0
- '@smithy/node-http-handler': 3.0.0
- '@smithy/protocol-http': 4.0.0
- '@smithy/smithy-client': 3.0.1
- '@smithy/types': 3.0.0
- '@smithy/url-parser': 3.0.0
- '@smithy/util-base64': 3.0.0
- '@smithy/util-body-length-browser': 3.0.0
- '@smithy/util-body-length-node': 3.0.0
- '@smithy/util-defaults-mode-browser': 3.0.1
- '@smithy/util-defaults-mode-node': 3.0.1
- '@smithy/util-endpoints': 2.0.0
- '@smithy/util-middleware': 3.0.0
- '@smithy/util-retry': 3.0.0
- '@smithy/util-utf8': 3.0.0
- tslib: 2.6.2
- transitivePeerDependencies:
- - aws-crt
-
- '@aws-sdk/core@3.576.0':
- dependencies:
- '@smithy/core': 2.0.1
- '@smithy/protocol-http': 4.0.0
- '@smithy/signature-v4': 3.0.0
- '@smithy/smithy-client': 3.0.1
- '@smithy/types': 3.0.0
- fast-xml-parser: 4.2.5
- tslib: 2.6.2
-
- '@aws-sdk/credential-provider-env@3.577.0':
- dependencies:
- '@aws-sdk/types': 3.577.0
- '@smithy/property-provider': 3.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@aws-sdk/credential-provider-http@3.577.0':
- dependencies:
- '@aws-sdk/types': 3.577.0
- '@smithy/fetch-http-handler': 3.0.1
- '@smithy/node-http-handler': 3.0.0
- '@smithy/property-provider': 3.0.0
- '@smithy/protocol-http': 4.0.0
- '@smithy/smithy-client': 3.0.1
- '@smithy/types': 3.0.0
- '@smithy/util-stream': 3.0.1
- tslib: 2.6.2
-
- '@aws-sdk/credential-provider-ini@3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0)':
- dependencies:
- '@aws-sdk/client-sts': 3.577.0
- '@aws-sdk/credential-provider-env': 3.577.0
- '@aws-sdk/credential-provider-process': 3.577.0
- '@aws-sdk/credential-provider-sso': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))
- '@aws-sdk/credential-provider-web-identity': 3.577.0(@aws-sdk/client-sts@3.577.0)
- '@aws-sdk/types': 3.577.0
- '@smithy/credential-provider-imds': 3.0.0
- '@smithy/property-provider': 3.0.0
- '@smithy/shared-ini-file-loader': 3.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
- transitivePeerDependencies:
- - '@aws-sdk/client-sso-oidc'
- - aws-crt
-
- '@aws-sdk/credential-provider-node@3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0)':
- dependencies:
- '@aws-sdk/credential-provider-env': 3.577.0
- '@aws-sdk/credential-provider-http': 3.577.0
- '@aws-sdk/credential-provider-ini': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0)
- '@aws-sdk/credential-provider-process': 3.577.0
- '@aws-sdk/credential-provider-sso': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))
- '@aws-sdk/credential-provider-web-identity': 3.577.0(@aws-sdk/client-sts@3.577.0)
- '@aws-sdk/types': 3.577.0
- '@smithy/credential-provider-imds': 3.0.0
- '@smithy/property-provider': 3.0.0
- '@smithy/shared-ini-file-loader': 3.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
- transitivePeerDependencies:
- - '@aws-sdk/client-sso-oidc'
- - '@aws-sdk/client-sts'
- - aws-crt
-
- '@aws-sdk/credential-provider-process@3.577.0':
- dependencies:
- '@aws-sdk/types': 3.577.0
- '@smithy/property-provider': 3.0.0
- '@smithy/shared-ini-file-loader': 3.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@aws-sdk/credential-provider-sso@3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))':
- dependencies:
- '@aws-sdk/client-sso': 3.577.0
- '@aws-sdk/token-providers': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))
- '@aws-sdk/types': 3.577.0
- '@smithy/property-provider': 3.0.0
- '@smithy/shared-ini-file-loader': 3.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
- transitivePeerDependencies:
- - '@aws-sdk/client-sso-oidc'
- - aws-crt
-
- '@aws-sdk/credential-provider-web-identity@3.577.0(@aws-sdk/client-sts@3.577.0)':
- dependencies:
- '@aws-sdk/client-sts': 3.577.0
- '@aws-sdk/types': 3.577.0
- '@smithy/property-provider': 3.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@aws-sdk/middleware-host-header@3.577.0':
- dependencies:
- '@aws-sdk/types': 3.577.0
- '@smithy/protocol-http': 4.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@aws-sdk/middleware-logger@3.577.0':
- dependencies:
- '@aws-sdk/types': 3.577.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@aws-sdk/middleware-recursion-detection@3.577.0':
- dependencies:
- '@aws-sdk/types': 3.577.0
- '@smithy/protocol-http': 4.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@aws-sdk/middleware-user-agent@3.577.0':
- dependencies:
- '@aws-sdk/types': 3.577.0
- '@aws-sdk/util-endpoints': 3.577.0
- '@smithy/protocol-http': 4.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@aws-sdk/region-config-resolver@3.577.0':
- dependencies:
- '@aws-sdk/types': 3.577.0
- '@smithy/node-config-provider': 3.0.0
- '@smithy/types': 3.0.0
- '@smithy/util-config-provider': 3.0.0
- '@smithy/util-middleware': 3.0.0
- tslib: 2.6.2
-
- '@aws-sdk/token-providers@3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))':
- dependencies:
- '@aws-sdk/client-sso-oidc': 3.577.0(@aws-sdk/client-sts@3.577.0)
- '@aws-sdk/types': 3.577.0
- '@smithy/property-provider': 3.0.0
- '@smithy/shared-ini-file-loader': 3.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@aws-sdk/types@3.577.0':
- dependencies:
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@aws-sdk/util-endpoints@3.577.0':
- dependencies:
- '@aws-sdk/types': 3.577.0
- '@smithy/types': 3.0.0
- '@smithy/util-endpoints': 2.0.0
- tslib: 2.6.2
-
- '@aws-sdk/util-locate-window@3.568.0':
- dependencies:
- tslib: 2.6.2
-
- '@aws-sdk/util-user-agent-browser@3.577.0':
- dependencies:
- '@aws-sdk/types': 3.577.0
- '@smithy/types': 3.0.0
- bowser: 2.11.0
- tslib: 2.6.2
-
- '@aws-sdk/util-user-agent-node@3.577.0':
- dependencies:
- '@aws-sdk/types': 3.577.0
- '@smithy/node-config-provider': 3.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@aws-sdk/util-utf8-browser@3.259.0':
- dependencies:
- tslib: 2.6.2
-
- '@balena/dockerignore@1.0.2': {}
-
- '@cloudflare/kv-asset-handler@0.3.2':
- dependencies:
- mime: 3.0.0
-
- '@cloudflare/workerd-darwin-64@1.20240512.0':
- optional: true
-
- '@cloudflare/workerd-darwin-arm64@1.20240512.0':
- optional: true
-
- '@cloudflare/workerd-linux-64@1.20240512.0':
- optional: true
-
- '@cloudflare/workerd-linux-arm64@1.20240512.0':
- optional: true
-
- '@cloudflare/workerd-windows-64@1.20240512.0':
- optional: true
-
- '@cloudflare/workers-types@4.20240512.0': {}
-
- '@colors/colors@1.5.0':
- optional: true
-
- '@cspotcode/source-map-support@0.8.1':
- dependencies:
- '@jridgewell/trace-mapping': 0.3.9
-
- '@electric-sql/pglite@0.1.5': {}
-
- '@esbuild-kit/core-utils@3.3.2':
- dependencies:
- esbuild: 0.18.20
- source-map-support: 0.5.21
-
- '@esbuild-kit/esm-loader@2.6.5':
- dependencies:
- '@esbuild-kit/core-utils': 3.3.2
- get-tsconfig: 4.7.5
-
- '@esbuild-plugins/node-globals-polyfill@0.2.3(esbuild@0.17.19)':
- dependencies:
- esbuild: 0.17.19
-
- '@esbuild-plugins/node-modules-polyfill@0.2.2(esbuild@0.17.19)':
- dependencies:
- esbuild: 0.17.19
- escape-string-regexp: 4.0.0
- rollup-plugin-node-polyfills: 0.2.1
-
- '@esbuild/aix-ppc64@0.19.12':
- optional: true
-
- '@esbuild/aix-ppc64@0.20.2':
- optional: true
-
- '@esbuild/android-arm64@0.17.19':
- optional: true
-
- '@esbuild/android-arm64@0.18.20':
- optional: true
-
- '@esbuild/android-arm64@0.19.12':
- optional: true
-
- '@esbuild/android-arm64@0.20.2':
- optional: true
-
- '@esbuild/android-arm@0.17.19':
- optional: true
-
- '@esbuild/android-arm@0.18.20':
- optional: true
-
- '@esbuild/android-arm@0.19.12':
- optional: true
-
- '@esbuild/android-arm@0.20.2':
- optional: true
-
- '@esbuild/android-x64@0.17.19':
- optional: true
-
- '@esbuild/android-x64@0.18.20':
- optional: true
-
- '@esbuild/android-x64@0.19.12':
- optional: true
-
- '@esbuild/android-x64@0.20.2':
- optional: true
-
- '@esbuild/darwin-arm64@0.17.19':
- optional: true
-
- '@esbuild/darwin-arm64@0.18.20':
- optional: true
-
- '@esbuild/darwin-arm64@0.19.12':
- optional: true
-
- '@esbuild/darwin-arm64@0.20.2':
- optional: true
-
- '@esbuild/darwin-x64@0.17.19':
- optional: true
-
- '@esbuild/darwin-x64@0.18.20':
- optional: true
-
- '@esbuild/darwin-x64@0.19.12':
- optional: true
-
- '@esbuild/darwin-x64@0.20.2':
- optional: true
-
- '@esbuild/freebsd-arm64@0.17.19':
- optional: true
-
- '@esbuild/freebsd-arm64@0.18.20':
- optional: true
-
- '@esbuild/freebsd-arm64@0.19.12':
- optional: true
-
- '@esbuild/freebsd-arm64@0.20.2':
- optional: true
-
- '@esbuild/freebsd-x64@0.17.19':
- optional: true
-
- '@esbuild/freebsd-x64@0.18.20':
- optional: true
-
- '@esbuild/freebsd-x64@0.19.12':
- optional: true
-
- '@esbuild/freebsd-x64@0.20.2':
- optional: true
-
- '@esbuild/linux-arm64@0.17.19':
- optional: true
-
- '@esbuild/linux-arm64@0.18.20':
- optional: true
-
- '@esbuild/linux-arm64@0.19.12':
- optional: true
-
- '@esbuild/linux-arm64@0.20.2':
- optional: true
-
- '@esbuild/linux-arm@0.17.19':
- optional: true
-
- '@esbuild/linux-arm@0.18.20':
- optional: true
-
- '@esbuild/linux-arm@0.19.12':
- optional: true
-
- '@esbuild/linux-arm@0.20.2':
- optional: true
-
- '@esbuild/linux-ia32@0.17.19':
- optional: true
-
- '@esbuild/linux-ia32@0.18.20':
- optional: true
-
- '@esbuild/linux-ia32@0.19.12':
- optional: true
-
- '@esbuild/linux-ia32@0.20.2':
- optional: true
-
- '@esbuild/linux-loong64@0.14.54':
- optional: true
-
- '@esbuild/linux-loong64@0.17.19':
- optional: true
-
- '@esbuild/linux-loong64@0.18.20':
- optional: true
-
- '@esbuild/linux-loong64@0.19.12':
- optional: true
-
- '@esbuild/linux-loong64@0.20.2':
- optional: true
-
- '@esbuild/linux-mips64el@0.17.19':
- optional: true
-
- '@esbuild/linux-mips64el@0.18.20':
- optional: true
-
- '@esbuild/linux-mips64el@0.19.12':
- optional: true
-
- '@esbuild/linux-mips64el@0.20.2':
- optional: true
-
- '@esbuild/linux-ppc64@0.17.19':
- optional: true
-
- '@esbuild/linux-ppc64@0.18.20':
- optional: true
-
- '@esbuild/linux-ppc64@0.19.12':
- optional: true
-
- '@esbuild/linux-ppc64@0.20.2':
- optional: true
-
- '@esbuild/linux-riscv64@0.17.19':
- optional: true
-
- '@esbuild/linux-riscv64@0.18.20':
- optional: true
-
- '@esbuild/linux-riscv64@0.19.12':
- optional: true
-
- '@esbuild/linux-riscv64@0.20.2':
- optional: true
-
- '@esbuild/linux-s390x@0.17.19':
- optional: true
-
- '@esbuild/linux-s390x@0.18.20':
- optional: true
-
- '@esbuild/linux-s390x@0.19.12':
- optional: true
-
- '@esbuild/linux-s390x@0.20.2':
- optional: true
-
- '@esbuild/linux-x64@0.17.19':
- optional: true
-
- '@esbuild/linux-x64@0.18.20':
- optional: true
-
- '@esbuild/linux-x64@0.19.12':
- optional: true
-
- '@esbuild/linux-x64@0.20.2':
- optional: true
-
- '@esbuild/netbsd-x64@0.17.19':
- optional: true
-
- '@esbuild/netbsd-x64@0.18.20':
- optional: true
-
- '@esbuild/netbsd-x64@0.19.12':
- optional: true
-
- '@esbuild/netbsd-x64@0.20.2':
- optional: true
-
- '@esbuild/openbsd-x64@0.17.19':
- optional: true
-
- '@esbuild/openbsd-x64@0.18.20':
- optional: true
-
- '@esbuild/openbsd-x64@0.19.12':
- optional: true
-
- '@esbuild/openbsd-x64@0.20.2':
- optional: true
-
- '@esbuild/sunos-x64@0.17.19':
- optional: true
-
- '@esbuild/sunos-x64@0.18.20':
- optional: true
-
- '@esbuild/sunos-x64@0.19.12':
- optional: true
-
- '@esbuild/sunos-x64@0.20.2':
- optional: true
-
- '@esbuild/win32-arm64@0.17.19':
- optional: true
-
- '@esbuild/win32-arm64@0.18.20':
- optional: true
-
- '@esbuild/win32-arm64@0.19.12':
- optional: true
-
- '@esbuild/win32-arm64@0.20.2':
- optional: true
-
- '@esbuild/win32-ia32@0.17.19':
- optional: true
-
- '@esbuild/win32-ia32@0.18.20':
- optional: true
-
- '@esbuild/win32-ia32@0.19.12':
- optional: true
-
- '@esbuild/win32-ia32@0.20.2':
- optional: true
-
- '@esbuild/win32-x64@0.17.19':
- optional: true
-
- '@esbuild/win32-x64@0.18.20':
- optional: true
-
- '@esbuild/win32-x64@0.19.12':
- optional: true
-
- '@esbuild/win32-x64@0.20.2':
- optional: true
-
- '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)':
- dependencies:
- eslint: 8.57.0
- eslint-visitor-keys: 3.4.3
-
- '@eslint-community/regexpp@4.10.0': {}
-
- '@eslint/eslintrc@2.1.4':
- dependencies:
- ajv: 6.12.6
- debug: 4.3.4
- espree: 9.6.1
- globals: 13.24.0
- ignore: 5.3.1
- import-fresh: 3.3.0
- js-yaml: 4.1.0
- minimatch: 3.1.2
- strip-json-comments: 3.1.1
- transitivePeerDependencies:
- - supports-color
-
- '@eslint/js@8.57.0': {}
-
- '@ewoudenberg/difflib@0.1.0':
- dependencies:
- heap: 0.2.7
-
- '@fastify/busboy@2.1.1': {}
-
- '@hono/node-server@1.11.1': {}
-
- '@hono/zod-validator@0.2.1(hono@4.3.9)(zod@3.23.8)':
- dependencies:
- hono: 4.3.9
- zod: 3.23.8
-
- '@humanwhocodes/config-array@0.11.14':
- dependencies:
- '@humanwhocodes/object-schema': 2.0.3
- debug: 4.3.4
- minimatch: 3.1.2
- transitivePeerDependencies:
- - supports-color
-
- '@humanwhocodes/module-importer@1.0.1': {}
-
- '@humanwhocodes/object-schema@2.0.3': {}
-
- '@isaacs/cliui@8.0.2':
- dependencies:
- string-width: 5.1.2
- string-width-cjs: string-width@4.2.3
- strip-ansi: 7.1.0
- strip-ansi-cjs: strip-ansi@6.0.1
- wrap-ansi: 8.1.0
- wrap-ansi-cjs: wrap-ansi@7.0.0
-
- '@jest/schemas@29.6.3':
- dependencies:
- '@sinclair/typebox': 0.27.8
-
- '@jridgewell/gen-mapping@0.3.5':
- dependencies:
- '@jridgewell/set-array': 1.2.1
- '@jridgewell/sourcemap-codec': 1.4.15
- '@jridgewell/trace-mapping': 0.3.25
-
- '@jridgewell/resolve-uri@3.1.2': {}
-
- '@jridgewell/set-array@1.2.1': {}
-
- '@jridgewell/sourcemap-codec@1.4.15': {}
-
- '@jridgewell/trace-mapping@0.3.25':
- dependencies:
- '@jridgewell/resolve-uri': 3.1.2
- '@jridgewell/sourcemap-codec': 1.4.15
-
- '@jridgewell/trace-mapping@0.3.9':
- dependencies:
- '@jridgewell/resolve-uri': 3.1.2
- '@jridgewell/sourcemap-codec': 1.4.15
-
- '@libsql/client@0.4.3(bufferutil@4.0.8)(utf-8-validate@6.0.3)':
- dependencies:
- '@libsql/core': 0.4.3
- '@libsql/hrana-client': 0.5.6(bufferutil@4.0.8)(utf-8-validate@6.0.3)
- js-base64: 3.7.7
- optionalDependencies:
- libsql: 0.2.0
- transitivePeerDependencies:
- - bufferutil
- - encoding
- - utf-8-validate
-
- '@libsql/core@0.4.3':
- dependencies:
- js-base64: 3.7.7
-
- '@libsql/darwin-arm64@0.2.0':
- optional: true
-
- '@libsql/darwin-x64@0.2.0':
- optional: true
-
- '@libsql/hrana-client@0.5.6(bufferutil@4.0.8)(utf-8-validate@6.0.3)':
- dependencies:
- '@libsql/isomorphic-fetch': 0.1.12
- '@libsql/isomorphic-ws': 0.1.5(bufferutil@4.0.8)(utf-8-validate@6.0.3)
- js-base64: 3.7.7
- node-fetch: 3.3.2
- transitivePeerDependencies:
- - bufferutil
- - encoding
- - utf-8-validate
-
- '@libsql/isomorphic-fetch@0.1.12':
- dependencies:
- '@types/node-fetch': 2.6.11
- node-fetch: 2.7.0
- transitivePeerDependencies:
- - encoding
-
- '@libsql/isomorphic-ws@0.1.5(bufferutil@4.0.8)(utf-8-validate@6.0.3)':
- dependencies:
- '@types/ws': 8.5.10
- ws: 8.17.0(bufferutil@4.0.8)(utf-8-validate@6.0.3)
- transitivePeerDependencies:
- - bufferutil
- - utf-8-validate
-
- '@libsql/linux-arm64-gnu@0.2.0':
- optional: true
-
- '@libsql/linux-arm64-musl@0.2.0':
- optional: true
-
- '@libsql/linux-x64-gnu@0.2.0':
- optional: true
-
- '@libsql/linux-x64-musl@0.2.0':
- optional: true
-
- '@libsql/win32-x64-msvc@0.2.0':
- optional: true
-
- '@neon-rs/load@0.0.4':
- optional: true
-
- '@neondatabase/serverless@0.7.2':
- dependencies:
- '@types/pg': 8.6.6
-
- '@neondatabase/serverless@0.9.3':
- dependencies:
- '@types/pg': 8.11.6
-
- '@nodelib/fs.scandir@2.1.5':
- dependencies:
- '@nodelib/fs.stat': 2.0.5
- run-parallel: 1.2.0
-
- '@nodelib/fs.stat@2.0.5': {}
-
- '@nodelib/fs.walk@1.2.8':
- dependencies:
- '@nodelib/fs.scandir': 2.1.5
- fastq: 1.17.1
-
- '@originjs/vite-plugin-commonjs@1.0.3':
- dependencies:
- esbuild: 0.14.54
-
- '@pkgjs/parseargs@0.11.0':
- optional: true
-
- '@pkgr/core@0.1.1': {}
-
- '@planetscale/database@1.18.0': {}
-
- '@rollup/rollup-android-arm-eabi@4.17.2':
- optional: true
-
- '@rollup/rollup-android-arm64@4.17.2':
- optional: true
-
- '@rollup/rollup-darwin-arm64@4.17.2':
- optional: true
-
- '@rollup/rollup-darwin-x64@4.17.2':
- optional: true
-
- '@rollup/rollup-linux-arm-gnueabihf@4.17.2':
- optional: true
-
- '@rollup/rollup-linux-arm-musleabihf@4.17.2':
- optional: true
-
- '@rollup/rollup-linux-arm64-gnu@4.17.2':
- optional: true
-
- '@rollup/rollup-linux-arm64-musl@4.17.2':
- optional: true
-
- '@rollup/rollup-linux-powerpc64le-gnu@4.17.2':
- optional: true
-
- '@rollup/rollup-linux-riscv64-gnu@4.17.2':
- optional: true
-
- '@rollup/rollup-linux-s390x-gnu@4.17.2':
- optional: true
-
- '@rollup/rollup-linux-x64-gnu@4.17.2':
- optional: true
-
- '@rollup/rollup-linux-x64-musl@4.17.2':
- optional: true
-
- '@rollup/rollup-win32-arm64-msvc@4.17.2':
- optional: true
-
- '@rollup/rollup-win32-ia32-msvc@4.17.2':
- optional: true
-
- '@rollup/rollup-win32-x64-msvc@4.17.2':
- optional: true
-
- '@sinclair/typebox@0.27.8': {}
-
- '@sindresorhus/is@4.6.0': {}
-
- '@smithy/abort-controller@3.0.0':
- dependencies:
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/config-resolver@3.0.0':
- dependencies:
- '@smithy/node-config-provider': 3.0.0
- '@smithy/types': 3.0.0
- '@smithy/util-config-provider': 3.0.0
- '@smithy/util-middleware': 3.0.0
- tslib: 2.6.2
-
- '@smithy/core@2.0.1':
- dependencies:
- '@smithy/middleware-endpoint': 3.0.0
- '@smithy/middleware-retry': 3.0.1
- '@smithy/middleware-serde': 3.0.0
- '@smithy/protocol-http': 4.0.0
- '@smithy/smithy-client': 3.0.1
- '@smithy/types': 3.0.0
- '@smithy/util-middleware': 3.0.0
- tslib: 2.6.2
-
- '@smithy/credential-provider-imds@3.0.0':
- dependencies:
- '@smithy/node-config-provider': 3.0.0
- '@smithy/property-provider': 3.0.0
- '@smithy/types': 3.0.0
- '@smithy/url-parser': 3.0.0
- tslib: 2.6.2
-
- '@smithy/fetch-http-handler@3.0.1':
- dependencies:
- '@smithy/protocol-http': 4.0.0
- '@smithy/querystring-builder': 3.0.0
- '@smithy/types': 3.0.0
- '@smithy/util-base64': 3.0.0
- tslib: 2.6.2
-
- '@smithy/hash-node@3.0.0':
- dependencies:
- '@smithy/types': 3.0.0
- '@smithy/util-buffer-from': 3.0.0
- '@smithy/util-utf8': 3.0.0
- tslib: 2.6.2
-
- '@smithy/invalid-dependency@3.0.0':
- dependencies:
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/is-array-buffer@3.0.0':
- dependencies:
- tslib: 2.6.2
-
- '@smithy/middleware-content-length@3.0.0':
- dependencies:
- '@smithy/protocol-http': 4.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/middleware-endpoint@3.0.0':
- dependencies:
- '@smithy/middleware-serde': 3.0.0
- '@smithy/node-config-provider': 3.0.0
- '@smithy/shared-ini-file-loader': 3.0.0
- '@smithy/types': 3.0.0
- '@smithy/url-parser': 3.0.0
- '@smithy/util-middleware': 3.0.0
- tslib: 2.6.2
-
- '@smithy/middleware-retry@3.0.1':
- dependencies:
- '@smithy/node-config-provider': 3.0.0
- '@smithy/protocol-http': 4.0.0
- '@smithy/service-error-classification': 3.0.0
- '@smithy/smithy-client': 3.0.1
- '@smithy/types': 3.0.0
- '@smithy/util-middleware': 3.0.0
- '@smithy/util-retry': 3.0.0
- tslib: 2.6.2
- uuid: 9.0.1
-
- '@smithy/middleware-serde@3.0.0':
- dependencies:
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/middleware-stack@3.0.0':
- dependencies:
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/node-config-provider@3.0.0':
- dependencies:
- '@smithy/property-provider': 3.0.0
- '@smithy/shared-ini-file-loader': 3.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/node-http-handler@3.0.0':
- dependencies:
- '@smithy/abort-controller': 3.0.0
- '@smithy/protocol-http': 4.0.0
- '@smithy/querystring-builder': 3.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/property-provider@3.0.0':
- dependencies:
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/protocol-http@4.0.0':
- dependencies:
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/querystring-builder@3.0.0':
- dependencies:
- '@smithy/types': 3.0.0
- '@smithy/util-uri-escape': 3.0.0
- tslib: 2.6.2
-
- '@smithy/querystring-parser@3.0.0':
- dependencies:
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/service-error-classification@3.0.0':
- dependencies:
- '@smithy/types': 3.0.0
-
- '@smithy/shared-ini-file-loader@3.0.0':
- dependencies:
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/signature-v4@3.0.0':
- dependencies:
- '@smithy/is-array-buffer': 3.0.0
- '@smithy/types': 3.0.0
- '@smithy/util-hex-encoding': 3.0.0
- '@smithy/util-middleware': 3.0.0
- '@smithy/util-uri-escape': 3.0.0
- '@smithy/util-utf8': 3.0.0
- tslib: 2.6.2
-
- '@smithy/smithy-client@3.0.1':
- dependencies:
- '@smithy/middleware-endpoint': 3.0.0
- '@smithy/middleware-stack': 3.0.0
- '@smithy/protocol-http': 4.0.0
- '@smithy/types': 3.0.0
- '@smithy/util-stream': 3.0.1
- tslib: 2.6.2
-
- '@smithy/types@3.0.0':
- dependencies:
- tslib: 2.6.2
-
- '@smithy/url-parser@3.0.0':
- dependencies:
- '@smithy/querystring-parser': 3.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/util-base64@3.0.0':
- dependencies:
- '@smithy/util-buffer-from': 3.0.0
- '@smithy/util-utf8': 3.0.0
- tslib: 2.6.2
-
- '@smithy/util-body-length-browser@3.0.0':
- dependencies:
- tslib: 2.6.2
-
- '@smithy/util-body-length-node@3.0.0':
- dependencies:
- tslib: 2.6.2
-
- '@smithy/util-buffer-from@3.0.0':
- dependencies:
- '@smithy/is-array-buffer': 3.0.0
- tslib: 2.6.2
-
- '@smithy/util-config-provider@3.0.0':
- dependencies:
- tslib: 2.6.2
-
- '@smithy/util-defaults-mode-browser@3.0.1':
- dependencies:
- '@smithy/property-provider': 3.0.0
- '@smithy/smithy-client': 3.0.1
- '@smithy/types': 3.0.0
- bowser: 2.11.0
- tslib: 2.6.2
-
- '@smithy/util-defaults-mode-node@3.0.1':
- dependencies:
- '@smithy/config-resolver': 3.0.0
- '@smithy/credential-provider-imds': 3.0.0
- '@smithy/node-config-provider': 3.0.0
- '@smithy/property-provider': 3.0.0
- '@smithy/smithy-client': 3.0.1
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/util-endpoints@2.0.0':
- dependencies:
- '@smithy/node-config-provider': 3.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/util-hex-encoding@3.0.0':
- dependencies:
- tslib: 2.6.2
-
- '@smithy/util-middleware@3.0.0':
- dependencies:
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/util-retry@3.0.0':
- dependencies:
- '@smithy/service-error-classification': 3.0.0
- '@smithy/types': 3.0.0
- tslib: 2.6.2
-
- '@smithy/util-stream@3.0.1':
- dependencies:
- '@smithy/fetch-http-handler': 3.0.1
- '@smithy/node-http-handler': 3.0.0
- '@smithy/types': 3.0.0
- '@smithy/util-base64': 3.0.0
- '@smithy/util-buffer-from': 3.0.0
- '@smithy/util-hex-encoding': 3.0.0
- '@smithy/util-utf8': 3.0.0
- tslib: 2.6.2
-
- '@smithy/util-uri-escape@3.0.0':
- dependencies:
- tslib: 2.6.2
-
- '@smithy/util-utf8@3.0.0':
- dependencies:
- '@smithy/util-buffer-from': 3.0.0
- tslib: 2.6.2
-
- '@types/better-sqlite3@7.6.10':
- dependencies:
- '@types/node': 18.19.33
-
- '@types/docker-modem@3.0.6':
- dependencies:
- '@types/node': 18.19.33
- '@types/ssh2': 1.15.0
-
- '@types/dockerode@3.3.29':
- dependencies:
- '@types/docker-modem': 3.0.6
- '@types/node': 18.19.33
- '@types/ssh2': 1.15.0
-
- '@types/estree@1.0.5': {}
-
- '@types/fs-extra@11.0.4':
- dependencies:
- '@types/jsonfile': 6.1.4
- '@types/node': 18.19.33
-
- '@types/glob@8.1.0':
- dependencies:
- '@types/minimatch': 5.1.2
- '@types/node': 18.19.33
-
- '@types/json-diff@1.0.3': {}
-
- '@types/jsonfile@6.1.4':
- dependencies:
- '@types/node': 18.19.33
-
- '@types/minimatch@5.1.2': {}
-
- '@types/minimist@1.2.5': {}
-
- '@types/node-fetch@2.6.11':
- dependencies:
- '@types/node': 18.19.33
- form-data: 4.0.0
-
- '@types/node-forge@1.3.11':
- dependencies:
- '@types/node': 18.19.33
-
- '@types/node@18.19.33':
- dependencies:
- undici-types: 5.26.5
-
- '@types/pg@8.11.6':
- dependencies:
- '@types/node': 18.19.33
- pg-protocol: 1.6.1
- pg-types: 4.0.2
-
- '@types/pg@8.6.6':
- dependencies:
- '@types/node': 18.19.33
- pg-protocol: 1.6.1
- pg-types: 2.2.0
-
- '@types/pluralize@0.0.33': {}
-
- '@types/ps-tree@1.1.6': {}
-
- '@types/semver@7.5.8': {}
-
- '@types/ssh2@1.15.0':
- dependencies:
- '@types/node': 18.19.33
-
- '@types/uuid@9.0.8': {}
-
- '@types/which@3.0.3': {}
-
- '@types/ws@8.5.10':
- dependencies:
- '@types/node': 18.19.33
-
- '@typescript-eslint/eslint-plugin@7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)':
- dependencies:
- '@eslint-community/regexpp': 4.10.0
- '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.4.5)
- '@typescript-eslint/scope-manager': 7.10.0
- '@typescript-eslint/type-utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5)
- '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5)
- '@typescript-eslint/visitor-keys': 7.10.0
- eslint: 8.57.0
- graphemer: 1.4.0
- ignore: 5.3.1
- natural-compare: 1.4.0
- ts-api-utils: 1.3.0(typescript@5.4.5)
- optionalDependencies:
- typescript: 5.4.5
- transitivePeerDependencies:
- - supports-color
-
- '@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5)':
- dependencies:
- '@typescript-eslint/scope-manager': 7.10.0
- '@typescript-eslint/types': 7.10.0
- '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.4.5)
- '@typescript-eslint/visitor-keys': 7.10.0
- debug: 4.3.4
- eslint: 8.57.0
- optionalDependencies:
- typescript: 5.4.5
- transitivePeerDependencies:
- - supports-color
-
- '@typescript-eslint/scope-manager@7.10.0':
- dependencies:
- '@typescript-eslint/types': 7.10.0
- '@typescript-eslint/visitor-keys': 7.10.0
-
- '@typescript-eslint/type-utils@7.10.0(eslint@8.57.0)(typescript@5.4.5)':
- dependencies:
- '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.4.5)
- '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5)
- debug: 4.3.4
- eslint: 8.57.0
- ts-api-utils: 1.3.0(typescript@5.4.5)
- optionalDependencies:
- typescript: 5.4.5
- transitivePeerDependencies:
- - supports-color
-
- '@typescript-eslint/types@7.10.0': {}
-
- '@typescript-eslint/typescript-estree@7.10.0(typescript@5.4.5)':
- dependencies:
- '@typescript-eslint/types': 7.10.0
- '@typescript-eslint/visitor-keys': 7.10.0
- debug: 4.3.4
- globby: 11.1.0
- is-glob: 4.0.3
- minimatch: 9.0.4
- semver: 7.6.2
- ts-api-utils: 1.3.0(typescript@5.4.5)
- optionalDependencies:
- typescript: 5.4.5
- transitivePeerDependencies:
- - supports-color
-
- '@typescript-eslint/utils@7.10.0(eslint@8.57.0)(typescript@5.4.5)':
- dependencies:
- '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
- '@typescript-eslint/scope-manager': 7.10.0
- '@typescript-eslint/types': 7.10.0
- '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.4.5)
- eslint: 8.57.0
- transitivePeerDependencies:
- - supports-color
- - typescript
-
- '@typescript-eslint/visitor-keys@7.10.0':
- dependencies:
- '@typescript-eslint/types': 7.10.0
- eslint-visitor-keys: 3.4.3
-
- '@ungap/structured-clone@1.2.0': {}
-
- '@vercel/postgres@0.8.0':
- dependencies:
- '@neondatabase/serverless': 0.7.2
- bufferutil: 4.0.8
- utf-8-validate: 6.0.3
- ws: 8.14.2(bufferutil@4.0.8)(utf-8-validate@6.0.3)
-
- '@vitest/expect@1.6.0':
- dependencies:
- '@vitest/spy': 1.6.0
- '@vitest/utils': 1.6.0
- chai: 4.4.1
-
- '@vitest/runner@1.6.0':
- dependencies:
- '@vitest/utils': 1.6.0
- p-limit: 5.0.0
- pathe: 1.1.2
-
- '@vitest/snapshot@1.6.0':
- dependencies:
- magic-string: 0.30.10
- pathe: 1.1.2
- pretty-format: 29.7.0
-
- '@vitest/spy@1.6.0':
- dependencies:
- tinyspy: 2.2.1
-
- '@vitest/utils@1.6.0':
- dependencies:
- diff-sequences: 29.6.3
- estree-walker: 3.0.3
- loupe: 2.3.7
- pretty-format: 29.7.0
-
- acorn-jsx@5.3.2(acorn@8.11.3):
- dependencies:
- acorn: 8.11.3
-
- acorn-walk@8.3.2: {}
-
- acorn@8.11.3: {}
-
- aggregate-error@4.0.1:
- dependencies:
- clean-stack: 4.2.0
- indent-string: 5.0.0
-
- ajv@6.12.6:
- dependencies:
- fast-deep-equal: 3.1.3
- fast-json-stable-stringify: 2.1.0
- json-schema-traverse: 0.4.1
- uri-js: 4.4.1
-
- ansi-escapes@6.2.1: {}
-
- ansi-regex@5.0.1: {}
-
- ansi-regex@6.0.1: {}
-
- ansi-styles@4.3.0:
- dependencies:
- color-convert: 2.0.1
-
- ansi-styles@5.2.0: {}
-
- ansi-styles@6.2.1: {}
-
- ansicolors@0.3.2: {}
-
- any-promise@1.3.0: {}
-
- anymatch@3.1.3:
- dependencies:
- normalize-path: 3.0.0
- picomatch: 2.3.1
-
- argparse@1.0.10:
- dependencies:
- sprintf-js: 1.0.3
-
- argparse@2.0.1: {}
-
- array-find-index@1.0.2: {}
-
- array-union@2.1.0: {}
-
- arrgv@1.0.2: {}
-
- arrify@3.0.0: {}
-
- as-table@1.0.55:
- dependencies:
- printable-characters: 1.0.42
-
- asn1@0.2.6:
- dependencies:
- safer-buffer: 2.1.2
-
- assertion-error@1.1.0: {}
-
- asynckit@0.4.0: {}
-
- ava@5.3.1:
- dependencies:
- acorn: 8.11.3
- acorn-walk: 8.3.2
- ansi-styles: 6.2.1
- arrgv: 1.0.2
- arrify: 3.0.0
- callsites: 4.1.0
- cbor: 8.1.0
- chalk: 5.3.0
- chokidar: 3.6.0
- chunkd: 2.0.1
- ci-info: 3.9.0
- ci-parallel-vars: 1.0.1
- clean-yaml-object: 0.1.0
- cli-truncate: 3.1.0
- code-excerpt: 4.0.0
- common-path-prefix: 3.0.0
- concordance: 5.0.4
- currently-unhandled: 0.4.1
- debug: 4.3.4
- emittery: 1.0.3
- figures: 5.0.0
- globby: 13.2.2
- ignore-by-default: 2.1.0
- indent-string: 5.0.0
- is-error: 2.2.2
- is-plain-object: 5.0.0
- is-promise: 4.0.0
- matcher: 5.0.0
- mem: 9.0.2
- ms: 2.1.3
- p-event: 5.0.1
- p-map: 5.5.0
- picomatch: 2.3.1
- pkg-conf: 4.0.0
- plur: 5.1.0
- pretty-ms: 8.0.0
- resolve-cwd: 3.0.0
- stack-utils: 2.0.6
- strip-ansi: 7.1.0
- supertap: 3.0.1
- temp-dir: 3.0.0
- write-file-atomic: 5.0.1
- yargs: 17.7.2
- transitivePeerDependencies:
- - supports-color
-
- balanced-match@1.0.2: {}
-
- base64-js@1.5.1: {}
-
- bcrypt-pbkdf@1.0.2:
- dependencies:
- tweetnacl: 0.14.5
-
- better-sqlite3@9.6.0:
- dependencies:
- bindings: 1.5.0
- prebuild-install: 7.1.2
-
- binary-extensions@2.3.0: {}
-
- bindings@1.5.0:
- dependencies:
- file-uri-to-path: 1.0.0
-
- bl@4.1.0:
- dependencies:
- buffer: 5.7.1
- inherits: 2.0.4
- readable-stream: 3.6.2
-
- blake3-wasm@2.1.5: {}
-
- blueimp-md5@2.19.0: {}
-
- bowser@2.11.0: {}
-
- brace-expansion@1.1.11:
- dependencies:
- balanced-match: 1.0.2
- concat-map: 0.0.1
-
- brace-expansion@2.0.1:
- dependencies:
- balanced-match: 1.0.2
-
- braces@3.0.2:
- dependencies:
- fill-range: 7.1.1
-
- buffer-from@1.1.2: {}
-
- buffer@5.7.1:
- dependencies:
- base64-js: 1.5.1
- ieee754: 1.2.1
-
- bufferutil@4.0.8:
- dependencies:
- node-gyp-build: 4.8.1
-
- buildcheck@0.0.6:
- optional: true
-
- bundle-require@4.1.0(esbuild@0.19.12):
- dependencies:
- esbuild: 0.19.12
- load-tsconfig: 0.2.5
-
- cac@6.7.14: {}
-
- callsites@3.1.0: {}
-
- callsites@4.1.0: {}
-
- camelcase@7.0.1: {}
-
- capnp-ts@0.7.0:
- dependencies:
- debug: 4.3.4
- tslib: 2.6.2
- transitivePeerDependencies:
- - supports-color
-
- cardinal@2.1.1:
- dependencies:
- ansicolors: 0.3.2
- redeyed: 2.1.1
-
- cbor@8.1.0:
- dependencies:
- nofilter: 3.1.0
-
- chai@4.4.1:
- dependencies:
- assertion-error: 1.1.0
- check-error: 1.0.3
- deep-eql: 4.1.3
- get-func-name: 2.0.2
- loupe: 2.3.7
- pathval: 1.1.1
- type-detect: 4.0.8
-
- chalk@4.1.2:
- dependencies:
- ansi-styles: 4.3.0
- supports-color: 7.2.0
-
- chalk@5.3.0: {}
-
- char-regex@1.0.2: {}
-
- check-error@1.0.3:
- dependencies:
- get-func-name: 2.0.2
-
- chokidar@3.6.0:
- dependencies:
- anymatch: 3.1.3
- braces: 3.0.2
- glob-parent: 5.1.2
- is-binary-path: 2.1.0
- is-glob: 4.0.3
- normalize-path: 3.0.0
- readdirp: 3.6.0
- optionalDependencies:
- fsevents: 2.3.3
-
- chownr@1.1.4: {}
-
- chunkd@2.0.1: {}
-
- ci-info@3.9.0: {}
-
- ci-parallel-vars@1.0.1: {}
-
- clean-stack@4.2.0:
- dependencies:
- escape-string-regexp: 5.0.0
-
- clean-yaml-object@0.1.0: {}
-
- cli-color@2.0.4:
- dependencies:
- d: 1.0.2
- es5-ext: 0.10.64
- es6-iterator: 2.0.3
- memoizee: 0.4.15
- timers-ext: 0.1.7
-
- cli-table3@0.6.5:
- dependencies:
- string-width: 4.2.3
- optionalDependencies:
- '@colors/colors': 1.5.0
-
- cli-truncate@3.1.0:
- dependencies:
- slice-ansi: 5.0.0
- string-width: 5.1.2
-
- cliui@8.0.1:
- dependencies:
- string-width: 4.2.3
- strip-ansi: 6.0.1
- wrap-ansi: 7.0.0
-
- code-excerpt@4.0.0:
- dependencies:
- convert-to-spaces: 2.0.1
-
- color-convert@2.0.1:
- dependencies:
- color-name: 1.1.4
-
- color-name@1.1.4: {}
-
- colors@1.4.0: {}
-
- combined-stream@1.0.8:
- dependencies:
- delayed-stream: 1.0.0
-
- commander@10.0.1: {}
-
- commander@12.1.0: {}
-
- commander@4.1.1: {}
-
- commander@9.5.0: {}
-
- common-path-prefix@3.0.0: {}
-
- concat-map@0.0.1: {}
-
- concordance@5.0.4:
- dependencies:
- date-time: 3.1.0
- esutils: 2.0.3
- fast-diff: 1.3.0
- js-string-escape: 1.0.1
- lodash: 4.17.21
- md5-hex: 3.0.1
- semver: 7.6.2
- well-known-symbols: 2.0.0
-
- confbox@0.1.7: {}
-
- convert-to-spaces@2.0.1: {}
-
- cookie@0.5.0: {}
-
- copy-anything@3.0.5:
- dependencies:
- is-what: 4.1.16
-
- cpu-features@0.0.10:
- dependencies:
- buildcheck: 0.0.6
- nan: 2.19.0
- optional: true
-
- cross-spawn@7.0.3:
- dependencies:
- path-key: 3.1.1
- shebang-command: 2.0.0
- which: 2.0.2
-
- currently-unhandled@0.4.1:
- dependencies:
- array-find-index: 1.0.2
-
- d@1.0.2:
- dependencies:
- es5-ext: 0.10.64
- type: 2.7.2
-
- data-uri-to-buffer@2.0.2: {}
-
- data-uri-to-buffer@4.0.1: {}
-
- date-time@3.1.0:
- dependencies:
- time-zone: 1.0.0
-
- debug@4.3.4:
- dependencies:
- ms: 2.1.2
-
- decompress-response@6.0.0:
- dependencies:
- mimic-response: 3.1.0
-
- deep-eql@4.1.3:
- dependencies:
- type-detect: 4.0.8
-
- deep-extend@0.6.0: {}
-
- deep-is@0.1.4: {}
-
- delayed-stream@1.0.0: {}
-
- denque@2.1.0: {}
-
- detect-libc@2.0.2:
- optional: true
-
- detect-libc@2.0.3: {}
-
- diff-sequences@29.6.3: {}
-
- difflib@0.2.4(patch_hash=jq4t3ysdpnbunjeje4v7nrqn2q):
- dependencies:
- heap: 0.2.7
-
- dir-glob@3.0.1:
- dependencies:
- path-type: 4.0.0
-
- docker-modem@3.0.8:
- dependencies:
- debug: 4.3.4
- readable-stream: 3.6.2
- split-ca: 1.0.1
- ssh2: 1.15.0
- transitivePeerDependencies:
- - supports-color
-
- dockerode@3.3.5:
- dependencies:
- '@balena/dockerignore': 1.0.2
- docker-modem: 3.0.8
- tar-fs: 2.0.1
- transitivePeerDependencies:
- - supports-color
-
- doctrine@3.0.0:
- dependencies:
- esutils: 2.0.3
-
- dotenv@16.4.5: {}
-
- dreamopt@0.8.0:
- dependencies:
- wordwrap: 1.0.0
-
- drizzle-kit@0.21.2:
- dependencies:
- '@esbuild-kit/esm-loader': 2.6.5
- commander: 9.5.0
- env-paths: 3.0.0
- esbuild: 0.19.12
- esbuild-register: 3.5.0(esbuild@0.19.12)
- glob: 8.1.0
- hanji: 0.0.5
- json-diff: 0.9.0
- zod: 3.23.8
- transitivePeerDependencies:
- - supports-color
-
- drizzle-orm@0.32.0-85c8008(@aws-sdk/client-rds-data@3.577.0)(@cloudflare/workers-types@4.20240512.0)(@electric-sql/pglite@0.1.5)(@libsql/client@0.4.3(bufferutil@4.0.8)(utf-8-validate@6.0.3))(@neondatabase/serverless@0.9.3)(@planetscale/database@1.18.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.11.6)(@vercel/postgres@0.8.0)(better-sqlite3@9.6.0)(mysql2@2.3.3)(pg@8.11.5)(postgres@3.4.4):
- optionalDependencies:
- '@aws-sdk/client-rds-data': 3.577.0
- '@cloudflare/workers-types': 4.20240512.0
- '@electric-sql/pglite': 0.1.5
- '@libsql/client': 0.4.3(bufferutil@4.0.8)(utf-8-validate@6.0.3)
- '@neondatabase/serverless': 0.9.3
- '@planetscale/database': 1.18.0
- '@types/better-sqlite3': 7.6.10
- '@types/pg': 8.11.6
- '@vercel/postgres': 0.8.0
- better-sqlite3: 9.6.0
- mysql2: 2.3.3
- pg: 8.11.5
- postgres: 3.4.4
-
- duplexer@0.1.2: {}
-
- eastasianwidth@0.2.0: {}
-
- emittery@1.0.3: {}
-
- emoji-regex@8.0.0: {}
-
- emoji-regex@9.2.2: {}
-
- emojilib@2.4.0: {}
-
- end-of-stream@1.4.4:
- dependencies:
- once: 1.4.0
-
- env-paths@3.0.0: {}
-
- es5-ext@0.10.64:
- dependencies:
- es6-iterator: 2.0.3
- es6-symbol: 3.1.4
- esniff: 2.0.1
- next-tick: 1.1.0
-
- es6-iterator@2.0.3:
- dependencies:
- d: 1.0.2
- es5-ext: 0.10.64
- es6-symbol: 3.1.4
-
- es6-symbol@3.1.4:
- dependencies:
- d: 1.0.2
- ext: 1.7.0
-
- es6-weak-map@2.0.3:
- dependencies:
- d: 1.0.2
- es5-ext: 0.10.64
- es6-iterator: 2.0.3
- es6-symbol: 3.1.4
-
- esbuild-android-64@0.14.54:
- optional: true
-
- esbuild-android-arm64@0.14.54:
- optional: true
-
- esbuild-darwin-64@0.14.54:
- optional: true
-
- esbuild-darwin-arm64@0.14.54:
- optional: true
-
- esbuild-freebsd-64@0.14.54:
- optional: true
-
- esbuild-freebsd-arm64@0.14.54:
- optional: true
-
- esbuild-linux-32@0.14.54:
- optional: true
-
- esbuild-linux-64@0.14.54:
- optional: true
-
- esbuild-linux-arm64@0.14.54:
- optional: true
-
- esbuild-linux-arm@0.14.54:
- optional: true
-
- esbuild-linux-mips64le@0.14.54:
- optional: true
-
- esbuild-linux-ppc64le@0.14.54:
- optional: true
-
- esbuild-linux-riscv64@0.14.54:
- optional: true
-
- esbuild-linux-s390x@0.14.54:
- optional: true
-
- esbuild-netbsd-64@0.14.54:
- optional: true
-
- esbuild-node-externals@1.13.1(esbuild@0.19.12):
- dependencies:
- esbuild: 0.19.12
- find-up: 5.0.0
- tslib: 2.6.2
-
- esbuild-openbsd-64@0.14.54:
- optional: true
-
- esbuild-register@3.5.0(esbuild@0.19.12):
- dependencies:
- debug: 4.3.4
- esbuild: 0.19.12
- transitivePeerDependencies:
- - supports-color
-
- esbuild-sunos-64@0.14.54:
- optional: true
-
- esbuild-windows-32@0.14.54:
- optional: true
-
- esbuild-windows-64@0.14.54:
- optional: true
-
- esbuild-windows-arm64@0.14.54:
- optional: true
-
- esbuild@0.14.54:
- optionalDependencies:
- '@esbuild/linux-loong64': 0.14.54
- esbuild-android-64: 0.14.54
- esbuild-android-arm64: 0.14.54
- esbuild-darwin-64: 0.14.54
- esbuild-darwin-arm64: 0.14.54
- esbuild-freebsd-64: 0.14.54
- esbuild-freebsd-arm64: 0.14.54
- esbuild-linux-32: 0.14.54
- esbuild-linux-64: 0.14.54
- esbuild-linux-arm: 0.14.54
- esbuild-linux-arm64: 0.14.54
- esbuild-linux-mips64le: 0.14.54
- esbuild-linux-ppc64le: 0.14.54
- esbuild-linux-riscv64: 0.14.54
- esbuild-linux-s390x: 0.14.54
- esbuild-netbsd-64: 0.14.54
- esbuild-openbsd-64: 0.14.54
- esbuild-sunos-64: 0.14.54
- esbuild-windows-32: 0.14.54
- esbuild-windows-64: 0.14.54
- esbuild-windows-arm64: 0.14.54
-
- esbuild@0.17.19:
- optionalDependencies:
- '@esbuild/android-arm': 0.17.19
- '@esbuild/android-arm64': 0.17.19
- '@esbuild/android-x64': 0.17.19
- '@esbuild/darwin-arm64': 0.17.19
- '@esbuild/darwin-x64': 0.17.19
- '@esbuild/freebsd-arm64': 0.17.19
- '@esbuild/freebsd-x64': 0.17.19
- '@esbuild/linux-arm': 0.17.19
- '@esbuild/linux-arm64': 0.17.19
- '@esbuild/linux-ia32': 0.17.19
- '@esbuild/linux-loong64': 0.17.19
- '@esbuild/linux-mips64el': 0.17.19
- '@esbuild/linux-ppc64': 0.17.19
- '@esbuild/linux-riscv64': 0.17.19
- '@esbuild/linux-s390x': 0.17.19
- '@esbuild/linux-x64': 0.17.19
- '@esbuild/netbsd-x64': 0.17.19
- '@esbuild/openbsd-x64': 0.17.19
- '@esbuild/sunos-x64': 0.17.19
- '@esbuild/win32-arm64': 0.17.19
- '@esbuild/win32-ia32': 0.17.19
- '@esbuild/win32-x64': 0.17.19
-
- esbuild@0.18.20:
- optionalDependencies:
- '@esbuild/android-arm': 0.18.20
- '@esbuild/android-arm64': 0.18.20
- '@esbuild/android-x64': 0.18.20
- '@esbuild/darwin-arm64': 0.18.20
- '@esbuild/darwin-x64': 0.18.20
- '@esbuild/freebsd-arm64': 0.18.20
- '@esbuild/freebsd-x64': 0.18.20
- '@esbuild/linux-arm': 0.18.20
- '@esbuild/linux-arm64': 0.18.20
- '@esbuild/linux-ia32': 0.18.20
- '@esbuild/linux-loong64': 0.18.20
- '@esbuild/linux-mips64el': 0.18.20
- '@esbuild/linux-ppc64': 0.18.20
- '@esbuild/linux-riscv64': 0.18.20
- '@esbuild/linux-s390x': 0.18.20
- '@esbuild/linux-x64': 0.18.20
- '@esbuild/netbsd-x64': 0.18.20
- '@esbuild/openbsd-x64': 0.18.20
- '@esbuild/sunos-x64': 0.18.20
- '@esbuild/win32-arm64': 0.18.20
- '@esbuild/win32-ia32': 0.18.20
- '@esbuild/win32-x64': 0.18.20
-
- esbuild@0.19.12:
- optionalDependencies:
- '@esbuild/aix-ppc64': 0.19.12
- '@esbuild/android-arm': 0.19.12
- '@esbuild/android-arm64': 0.19.12
- '@esbuild/android-x64': 0.19.12
- '@esbuild/darwin-arm64': 0.19.12
- '@esbuild/darwin-x64': 0.19.12
- '@esbuild/freebsd-arm64': 0.19.12
- '@esbuild/freebsd-x64': 0.19.12
- '@esbuild/linux-arm': 0.19.12
- '@esbuild/linux-arm64': 0.19.12
- '@esbuild/linux-ia32': 0.19.12
- '@esbuild/linux-loong64': 0.19.12
- '@esbuild/linux-mips64el': 0.19.12
- '@esbuild/linux-ppc64': 0.19.12
- '@esbuild/linux-riscv64': 0.19.12
- '@esbuild/linux-s390x': 0.19.12
- '@esbuild/linux-x64': 0.19.12
- '@esbuild/netbsd-x64': 0.19.12
- '@esbuild/openbsd-x64': 0.19.12
- '@esbuild/sunos-x64': 0.19.12
- '@esbuild/win32-arm64': 0.19.12
- '@esbuild/win32-ia32': 0.19.12
- '@esbuild/win32-x64': 0.19.12
-
- esbuild@0.20.2:
- optionalDependencies:
- '@esbuild/aix-ppc64': 0.20.2
- '@esbuild/android-arm': 0.20.2
- '@esbuild/android-arm64': 0.20.2
- '@esbuild/android-x64': 0.20.2
- '@esbuild/darwin-arm64': 0.20.2
- '@esbuild/darwin-x64': 0.20.2
- '@esbuild/freebsd-arm64': 0.20.2
- '@esbuild/freebsd-x64': 0.20.2
- '@esbuild/linux-arm': 0.20.2
- '@esbuild/linux-arm64': 0.20.2
- '@esbuild/linux-ia32': 0.20.2
- '@esbuild/linux-loong64': 0.20.2
- '@esbuild/linux-mips64el': 0.20.2
- '@esbuild/linux-ppc64': 0.20.2
- '@esbuild/linux-riscv64': 0.20.2
- '@esbuild/linux-s390x': 0.20.2
- '@esbuild/linux-x64': 0.20.2
- '@esbuild/netbsd-x64': 0.20.2
- '@esbuild/openbsd-x64': 0.20.2
- '@esbuild/sunos-x64': 0.20.2
- '@esbuild/win32-arm64': 0.20.2
- '@esbuild/win32-ia32': 0.20.2
- '@esbuild/win32-x64': 0.20.2
-
- escalade@3.1.2: {}
-
- escape-string-regexp@2.0.0: {}
-
- escape-string-regexp@4.0.0: {}
-
- escape-string-regexp@5.0.0: {}
-
- eslint-config-prettier@9.1.0(eslint@8.57.0):
- dependencies:
- eslint: 8.57.0
-
- eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@2.8.8):
- dependencies:
- eslint: 8.57.0
- prettier: 2.8.8
- prettier-linter-helpers: 1.0.0
- synckit: 0.8.8
- optionalDependencies:
- eslint-config-prettier: 9.1.0(eslint@8.57.0)
-
- eslint-scope@7.2.2:
- dependencies:
- esrecurse: 4.3.0
- estraverse: 5.3.0
-
- eslint-visitor-keys@3.4.3: {}
-
- eslint@8.57.0:
- dependencies:
- '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
- '@eslint-community/regexpp': 4.10.0
- '@eslint/eslintrc': 2.1.4
- '@eslint/js': 8.57.0
- '@humanwhocodes/config-array': 0.11.14
- '@humanwhocodes/module-importer': 1.0.1
- '@nodelib/fs.walk': 1.2.8
- '@ungap/structured-clone': 1.2.0
- ajv: 6.12.6
- chalk: 4.1.2
- cross-spawn: 7.0.3
- debug: 4.3.4
- doctrine: 3.0.0
- 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
- esutils: 2.0.3
- fast-deep-equal: 3.1.3
- file-entry-cache: 6.0.1
- find-up: 5.0.0
- glob-parent: 6.0.2
- globals: 13.24.0
- graphemer: 1.4.0
- ignore: 5.3.1
- 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.4
- strip-ansi: 6.0.1
- text-table: 0.2.0
- transitivePeerDependencies:
- - supports-color
-
- esniff@2.0.1:
- dependencies:
- d: 1.0.2
- es5-ext: 0.10.64
- event-emitter: 0.3.5
- type: 2.7.2
-
- espree@9.6.1:
- dependencies:
- acorn: 8.11.3
- acorn-jsx: 5.3.2(acorn@8.11.3)
- eslint-visitor-keys: 3.4.3
-
- esprima@4.0.1: {}
-
- esquery@1.5.0:
- dependencies:
- estraverse: 5.3.0
-
- esrecurse@4.3.0:
- dependencies:
- estraverse: 5.3.0
-
- estraverse@5.3.0: {}
-
- estree-walker@0.6.1: {}
-
- estree-walker@3.0.3:
- dependencies:
- '@types/estree': 1.0.5
-
- esutils@2.0.3: {}
-
- event-emitter@0.3.5:
- dependencies:
- d: 1.0.2
- es5-ext: 0.10.64
-
- event-stream@3.3.4:
- dependencies:
- duplexer: 0.1.2
- from: 0.1.7
- map-stream: 0.1.0
- pause-stream: 0.0.11
- split: 0.3.3
- stream-combiner: 0.0.4
- through: 2.3.8
-
- execa@5.1.1:
- dependencies:
- cross-spawn: 7.0.3
- get-stream: 6.0.1
- human-signals: 2.1.0
- is-stream: 2.0.1
- merge-stream: 2.0.0
- npm-run-path: 4.0.1
- onetime: 5.1.2
- signal-exit: 3.0.7
- strip-final-newline: 2.0.0
-
- execa@8.0.1:
- dependencies:
- cross-spawn: 7.0.3
- get-stream: 8.0.1
- human-signals: 5.0.0
- is-stream: 3.0.0
- merge-stream: 2.0.0
- npm-run-path: 5.3.0
- onetime: 6.0.0
- signal-exit: 4.1.0
- strip-final-newline: 3.0.0
-
- exit-hook@2.2.1: {}
-
- expand-template@2.0.3: {}
-
- ext@1.7.0:
- dependencies:
- type: 2.7.2
-
- fast-deep-equal@3.1.3: {}
-
- fast-diff@1.3.0: {}
-
- 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.5
-
- fast-json-stable-stringify@2.1.0: {}
-
- fast-levenshtein@2.0.6: {}
-
- fast-xml-parser@4.2.5:
- dependencies:
- strnum: 1.0.5
-
- fastq@1.17.1:
- dependencies:
- reusify: 1.0.4
-
- fetch-blob@3.2.0:
- dependencies:
- node-domexception: 1.0.0
- web-streams-polyfill: 3.3.3
-
- fflate@0.8.2: {}
-
- figures@5.0.0:
- dependencies:
- escape-string-regexp: 5.0.0
- is-unicode-supported: 1.3.0
-
- file-entry-cache@6.0.1:
- dependencies:
- flat-cache: 3.2.0
-
- file-uri-to-path@1.0.0: {}
-
- fill-range@7.1.1:
- dependencies:
- to-regex-range: 5.0.1
-
- find-up@5.0.0:
- dependencies:
- locate-path: 6.0.0
- path-exists: 4.0.0
-
- find-up@6.3.0:
- dependencies:
- locate-path: 7.2.0
- path-exists: 5.0.0
-
- flat-cache@3.2.0:
- dependencies:
- flatted: 3.3.1
- keyv: 4.5.4
- rimraf: 3.0.2
-
- flatted@3.3.1: {}
-
- foreground-child@3.1.1:
- dependencies:
- cross-spawn: 7.0.3
- signal-exit: 4.1.0
-
- form-data@4.0.0:
- dependencies:
- asynckit: 0.4.0
- combined-stream: 1.0.8
- mime-types: 2.1.35
-
- formdata-polyfill@4.0.10:
- dependencies:
- fetch-blob: 3.2.0
-
- from@0.1.7: {}
-
- fs-constants@1.0.0: {}
-
- fs-extra@11.2.0:
- dependencies:
- graceful-fs: 4.2.11
- jsonfile: 6.1.0
- universalify: 2.0.1
-
- fs.realpath@1.0.0: {}
-
- fsevents@2.3.3:
- optional: true
-
- function-bind@1.1.2: {}
-
- fx@34.0.0: {}
-
- generate-function@2.3.1:
- dependencies:
- is-property: 1.0.2
-
- get-caller-file@2.0.5: {}
-
- get-func-name@2.0.2: {}
-
- get-port@6.1.2: {}
-
- get-source@2.0.12:
- dependencies:
- data-uri-to-buffer: 2.0.2
- source-map: 0.6.1
-
- get-stream@6.0.1: {}
-
- get-stream@8.0.1: {}
-
- get-tsconfig@4.7.5:
- dependencies:
- resolve-pkg-maps: 1.0.0
-
- github-from-package@0.0.0: {}
-
- glob-parent@5.1.2:
- dependencies:
- is-glob: 4.0.3
-
- glob-parent@6.0.2:
- dependencies:
- is-glob: 4.0.3
-
- glob-to-regexp@0.4.1: {}
-
- glob@10.3.15:
- dependencies:
- foreground-child: 3.1.1
- jackspeak: 2.3.6
- minimatch: 9.0.4
- minipass: 7.1.1
- path-scurry: 1.11.1
-
- glob@7.2.3:
- dependencies:
- fs.realpath: 1.0.0
- inflight: 1.0.6
- inherits: 2.0.4
- minimatch: 3.1.2
- once: 1.4.0
- path-is-absolute: 1.0.1
-
- glob@8.1.0:
- dependencies:
- fs.realpath: 1.0.0
- inflight: 1.0.6
- inherits: 2.0.4
- minimatch: 5.1.6
- once: 1.4.0
-
- globals@13.24.0:
- dependencies:
- type-fest: 0.20.2
-
- globby@11.1.0:
- dependencies:
- array-union: 2.1.0
- dir-glob: 3.0.1
- fast-glob: 3.3.2
- ignore: 5.3.1
- merge2: 1.4.1
- slash: 3.0.0
-
- globby@13.2.2:
- dependencies:
- dir-glob: 3.0.1
- fast-glob: 3.3.2
- ignore: 5.3.1
- merge2: 1.4.1
- slash: 4.0.0
-
- globrex@0.1.2: {}
-
- graceful-fs@4.2.11: {}
-
- graphemer@1.4.0: {}
-
- hanji@0.0.5:
- dependencies:
- lodash.throttle: 4.1.1
- sisteransi: 1.0.5
-
- has-flag@4.0.0: {}
-
- hasown@2.0.2:
- dependencies:
- function-bind: 1.1.2
-
- heap@0.2.7: {}
-
- hono@4.3.9: {}
-
- human-signals@2.1.0: {}
-
- human-signals@5.0.0: {}
-
- iconv-lite@0.6.3:
- dependencies:
- safer-buffer: 2.1.2
-
- ieee754@1.2.1: {}
-
- ignore-by-default@2.1.0: {}
-
- ignore@5.3.1: {}
-
- import-fresh@3.3.0:
- dependencies:
- parent-module: 1.0.1
- resolve-from: 4.0.0
-
- imurmurhash@0.1.4: {}
-
- indent-string@5.0.0: {}
-
- inflight@1.0.6:
- dependencies:
- once: 1.4.0
- wrappy: 1.0.2
-
- inherits@2.0.4: {}
-
- ini@1.3.8: {}
-
- irregular-plurals@3.5.0: {}
-
- is-binary-path@2.1.0:
- dependencies:
- binary-extensions: 2.3.0
-
- is-core-module@2.13.1:
- dependencies:
- hasown: 2.0.2
-
- is-error@2.2.2: {}
-
- is-extglob@2.1.1: {}
-
- is-fullwidth-code-point@3.0.0: {}
-
- is-fullwidth-code-point@4.0.0: {}
-
- is-glob@4.0.3:
- dependencies:
- is-extglob: 2.1.1
-
- is-number@7.0.0: {}
-
- is-path-inside@3.0.3: {}
-
- is-plain-object@5.0.0: {}
-
- is-promise@2.2.2: {}
-
- is-promise@4.0.0: {}
-
- is-property@1.0.2: {}
-
- is-stream@2.0.1: {}
-
- is-stream@3.0.0: {}
-
- is-unicode-supported@1.3.0: {}
-
- is-what@4.1.16: {}
-
- isexe@2.0.0: {}
-
- jackspeak@2.3.6:
- dependencies:
- '@isaacs/cliui': 8.0.2
- optionalDependencies:
- '@pkgjs/parseargs': 0.11.0
-
- joycon@3.1.1: {}
-
- js-base64@3.7.7: {}
-
- js-string-escape@1.0.1: {}
-
- js-tokens@9.0.0: {}
-
- js-yaml@3.14.1:
- dependencies:
- argparse: 1.0.10
- esprima: 4.0.1
-
- js-yaml@4.1.0:
- dependencies:
- argparse: 2.0.1
-
- json-buffer@3.0.1: {}
-
- json-diff@0.9.0:
- dependencies:
- cli-color: 2.0.4
- difflib: 0.2.4(patch_hash=jq4t3ysdpnbunjeje4v7nrqn2q)
- dreamopt: 0.8.0
-
- json-diff@1.0.6:
- dependencies:
- '@ewoudenberg/difflib': 0.1.0
- colors: 1.4.0
- dreamopt: 0.8.0
-
- json-schema-traverse@0.4.1: {}
-
- json-stable-stringify-without-jsonify@1.0.1: {}
-
- jsonfile@6.1.0:
- dependencies:
- universalify: 2.0.1
- optionalDependencies:
- graceful-fs: 4.2.11
-
- keyv@4.5.4:
- dependencies:
- json-buffer: 3.0.1
-
- levn@0.4.1:
- dependencies:
- prelude-ls: 1.2.1
- type-check: 0.4.0
-
- libsql@0.2.0:
- dependencies:
- '@neon-rs/load': 0.0.4
- detect-libc: 2.0.2
- optionalDependencies:
- '@libsql/darwin-arm64': 0.2.0
- '@libsql/darwin-x64': 0.2.0
- '@libsql/linux-arm64-gnu': 0.2.0
- '@libsql/linux-arm64-musl': 0.2.0
- '@libsql/linux-x64-gnu': 0.2.0
- '@libsql/linux-x64-musl': 0.2.0
- '@libsql/win32-x64-msvc': 0.2.0
- optional: true
-
- lilconfig@3.1.1: {}
-
- lines-and-columns@1.2.4: {}
-
- load-json-file@7.0.1: {}
-
- load-tsconfig@0.2.5: {}
-
- local-pkg@0.5.0:
- dependencies:
- mlly: 1.7.0
- pkg-types: 1.1.1
-
- locate-path@6.0.0:
- dependencies:
- p-locate: 5.0.0
-
- locate-path@7.2.0:
- dependencies:
- p-locate: 6.0.0
-
- lodash.merge@4.6.2: {}
-
- lodash.sortby@4.7.0: {}
-
- lodash.throttle@4.1.1: {}
-
- lodash@4.17.21: {}
-
- long@4.0.0: {}
-
- loupe@2.3.7:
- dependencies:
- get-func-name: 2.0.2
-
- lru-cache@10.2.2: {}
-
- lru-cache@6.0.0:
- dependencies:
- yallist: 4.0.0
-
- lru-cache@7.18.3: {}
-
- lru-queue@0.1.0:
- dependencies:
- es5-ext: 0.10.64
-
- magic-string@0.25.9:
- dependencies:
- sourcemap-codec: 1.4.8
-
- magic-string@0.30.10:
- dependencies:
- '@jridgewell/sourcemap-codec': 1.4.15
-
- map-age-cleaner@0.1.3:
- dependencies:
- p-defer: 1.0.0
-
- map-stream@0.1.0: {}
-
- marked-terminal@6.2.0(marked@9.1.6):
- dependencies:
- ansi-escapes: 6.2.1
- cardinal: 2.1.1
- chalk: 5.3.0
- cli-table3: 0.6.5
- marked: 9.1.6
- node-emoji: 2.1.3
- supports-hyperlinks: 3.0.0
-
- marked@9.1.6: {}
-
- matcher@5.0.0:
- dependencies:
- escape-string-regexp: 5.0.0
-
- md5-hex@3.0.1:
- dependencies:
- blueimp-md5: 2.19.0
-
- mem@9.0.2:
- dependencies:
- map-age-cleaner: 0.1.3
- mimic-fn: 4.0.0
-
- memoizee@0.4.15:
- dependencies:
- d: 1.0.2
- es5-ext: 0.10.64
- es6-weak-map: 2.0.3
- event-emitter: 0.3.5
- is-promise: 2.2.2
- lru-queue: 0.1.0
- next-tick: 1.1.0
- timers-ext: 0.1.7
-
- merge-stream@2.0.0: {}
-
- merge2@1.4.1: {}
-
- micromatch@4.0.5:
- dependencies:
- braces: 3.0.2
- picomatch: 2.3.1
-
- mime-db@1.52.0: {}
-
- mime-types@2.1.35:
- dependencies:
- mime-db: 1.52.0
-
- mime@3.0.0: {}
-
- mimic-fn@2.1.0: {}
-
- mimic-fn@4.0.0: {}
-
- mimic-response@3.1.0: {}
-
- miniflare@3.20240512.0(bufferutil@4.0.8)(utf-8-validate@6.0.3):
- dependencies:
- '@cspotcode/source-map-support': 0.8.1
- acorn: 8.11.3
- acorn-walk: 8.3.2
- capnp-ts: 0.7.0
- exit-hook: 2.2.1
- glob-to-regexp: 0.4.1
- stoppable: 1.1.0
- undici: 5.28.4
- workerd: 1.20240512.0
- ws: 8.17.0(bufferutil@4.0.8)(utf-8-validate@6.0.3)
- youch: 3.3.3
- zod: 3.23.8
- transitivePeerDependencies:
- - bufferutil
- - supports-color
- - utf-8-validate
-
- minimatch@3.1.2:
- dependencies:
- brace-expansion: 1.1.11
-
- minimatch@5.1.6:
- dependencies:
- brace-expansion: 2.0.1
-
- minimatch@7.4.6:
- dependencies:
- brace-expansion: 2.0.1
-
- minimatch@9.0.4:
- dependencies:
- brace-expansion: 2.0.1
-
- minimist@1.2.8: {}
-
- minipass@7.1.1: {}
-
- mkdirp-classic@0.5.3: {}
-
- mlly@1.7.0:
- dependencies:
- acorn: 8.11.3
- pathe: 1.1.2
- pkg-types: 1.1.1
- ufo: 1.5.3
-
- ms@2.1.2: {}
-
- ms@2.1.3: {}
-
- mustache@4.2.0: {}
-
- mysql2@2.3.3:
- dependencies:
- denque: 2.1.0
- generate-function: 2.3.1
- iconv-lite: 0.6.3
- long: 4.0.0
- lru-cache: 6.0.0
- 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
-
- nan@2.19.0:
- optional: true
-
- nanoid@3.3.7: {}
-
- napi-build-utils@1.0.2: {}
-
- natural-compare@1.4.0: {}
-
- next-tick@1.1.0: {}
-
- node-abi@3.62.0:
- dependencies:
- semver: 7.6.2
-
- node-domexception@1.0.0: {}
-
- node-emoji@2.1.3:
- dependencies:
- '@sindresorhus/is': 4.6.0
- char-regex: 1.0.2
- emojilib: 2.4.0
- skin-tone: 2.0.0
-
- node-fetch@2.7.0:
- dependencies:
- whatwg-url: 5.0.0
-
- node-fetch@3.3.1:
- dependencies:
- data-uri-to-buffer: 4.0.1
- fetch-blob: 3.2.0
- formdata-polyfill: 4.0.10
-
- node-fetch@3.3.2:
- dependencies:
- data-uri-to-buffer: 4.0.1
- fetch-blob: 3.2.0
- formdata-polyfill: 4.0.10
-
- node-forge@1.3.1: {}
-
- node-gyp-build@4.8.1: {}
-
- nofilter@3.1.0: {}
-
- normalize-path@3.0.0: {}
-
- npm-run-path@4.0.1:
- dependencies:
- path-key: 3.1.1
-
- npm-run-path@5.3.0:
- dependencies:
- path-key: 4.0.0
-
- object-assign@4.1.1: {}
-
- obuf@1.1.2: {}
-
- once@1.4.0:
- dependencies:
- wrappy: 1.0.2
-
- onetime@5.1.2:
- dependencies:
- mimic-fn: 2.1.0
-
- onetime@6.0.0:
- dependencies:
- mimic-fn: 4.0.0
-
- optionator@0.9.4:
- dependencies:
- 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
-
- p-defer@1.0.0: {}
-
- p-event@5.0.1:
- dependencies:
- p-timeout: 5.1.0
-
- p-limit@3.1.0:
- dependencies:
- yocto-queue: 0.1.0
-
- p-limit@4.0.0:
- dependencies:
- yocto-queue: 1.0.0
-
- p-limit@5.0.0:
- dependencies:
- yocto-queue: 1.0.0
-
- p-locate@5.0.0:
- dependencies:
- p-limit: 3.1.0
-
- p-locate@6.0.0:
- dependencies:
- p-limit: 4.0.0
-
- p-map@5.5.0:
- dependencies:
- aggregate-error: 4.0.1
-
- p-timeout@5.1.0: {}
-
- parent-module@1.0.1:
- dependencies:
- callsites: 3.1.0
-
- parse-ms@3.0.0: {}
-
- path-exists@4.0.0: {}
-
- path-exists@5.0.0: {}
-
- path-is-absolute@1.0.1: {}
-
- path-key@3.1.1: {}
-
- path-key@4.0.0: {}
-
- path-parse@1.0.7: {}
-
- path-scurry@1.11.1:
- dependencies:
- lru-cache: 10.2.2
- minipass: 7.1.1
-
- path-to-regexp@6.2.2: {}
-
- path-type@4.0.0: {}
-
- pathe@1.1.2: {}
-
- pathval@1.1.1: {}
-
- pause-stream@0.0.11:
- dependencies:
- through: 2.3.8
-
- pg-cloudflare@1.1.1:
- optional: true
-
- pg-connection-string@2.6.4: {}
-
- pg-int8@1.0.1: {}
-
- pg-numeric@1.0.2: {}
-
- pg-pool@3.6.2(pg@8.11.5):
- dependencies:
- pg: 8.11.5
-
- pg-protocol@1.6.1: {}
-
- pg-types@2.2.0:
- dependencies:
- pg-int8: 1.0.1
- postgres-array: 2.0.0
- postgres-bytea: 1.0.0
- postgres-date: 1.0.7
- postgres-interval: 1.2.0
-
- pg-types@4.0.2:
- dependencies:
- pg-int8: 1.0.1
- pg-numeric: 1.0.2
- postgres-array: 3.0.2
- postgres-bytea: 3.0.0
- postgres-date: 2.1.0
- postgres-interval: 3.0.0
- postgres-range: 1.1.4
-
- pg@8.11.5:
- dependencies:
- pg-connection-string: 2.6.4
- pg-pool: 3.6.2(pg@8.11.5)
- pg-protocol: 1.6.1
- pg-types: 2.2.0
- pgpass: 1.0.5
- optionalDependencies:
- pg-cloudflare: 1.1.1
-
- pgpass@1.0.5:
- dependencies:
- split2: 4.2.0
-
- picocolors@1.0.1: {}
-
- picomatch@2.3.1: {}
-
- pirates@4.0.6: {}
-
- pkg-conf@4.0.0:
- dependencies:
- find-up: 6.3.0
- load-json-file: 7.0.1
-
- pkg-types@1.1.1:
- dependencies:
- confbox: 0.1.7
- mlly: 1.7.0
- pathe: 1.1.2
-
- plur@5.1.0:
- dependencies:
- irregular-plurals: 3.5.0
-
- pluralize@8.0.0: {}
-
- postcss-load-config@4.0.2(postcss@8.4.38):
- dependencies:
- lilconfig: 3.1.1
- yaml: 2.4.2
- optionalDependencies:
- postcss: 8.4.38
-
- postcss@8.4.38:
- dependencies:
- nanoid: 3.3.7
- picocolors: 1.0.1
- source-map-js: 1.2.0
-
- postgres-array@2.0.0: {}
-
- postgres-array@3.0.2: {}
-
- postgres-bytea@1.0.0: {}
-
- postgres-bytea@3.0.0:
- dependencies:
- obuf: 1.1.2
-
- postgres-date@1.0.7: {}
-
- postgres-date@2.1.0: {}
-
- postgres-interval@1.2.0:
- dependencies:
- xtend: 4.0.2
-
- postgres-interval@3.0.0: {}
-
- postgres-range@1.1.4: {}
-
- postgres@3.4.4: {}
-
- prebuild-install@7.1.2:
- dependencies:
- detect-libc: 2.0.3
- expand-template: 2.0.3
- github-from-package: 0.0.0
- minimist: 1.2.8
- mkdirp-classic: 0.5.3
- napi-build-utils: 1.0.2
- node-abi: 3.62.0
- pump: 3.0.0
- rc: 1.2.8
- simple-get: 4.0.1
- tar-fs: 2.1.1
- tunnel-agent: 0.6.0
-
- prelude-ls@1.2.1: {}
-
- prettier-linter-helpers@1.0.0:
- dependencies:
- fast-diff: 1.3.0
-
- prettier@2.8.8: {}
-
- pretty-format@29.7.0:
- dependencies:
- '@jest/schemas': 29.6.3
- ansi-styles: 5.2.0
- react-is: 18.3.1
-
- pretty-ms@8.0.0:
- dependencies:
- parse-ms: 3.0.0
-
- printable-characters@1.0.42: {}
-
- ps-tree@1.2.0:
- dependencies:
- event-stream: 3.3.4
-
- pump@3.0.0:
- dependencies:
- end-of-stream: 1.4.4
- once: 1.4.0
-
- punycode@2.3.1: {}
-
- queue-microtask@1.2.3: {}
-
- rc@1.2.8:
- dependencies:
- deep-extend: 0.6.0
- ini: 1.3.8
- minimist: 1.2.8
- strip-json-comments: 2.0.1
-
- react-is@18.3.1: {}
-
- readable-stream@3.6.2:
- dependencies:
- inherits: 2.0.4
- string_decoder: 1.3.0
- util-deprecate: 1.0.2
-
- readdirp@3.6.0:
- dependencies:
- picomatch: 2.3.1
-
- redeyed@2.1.1:
- dependencies:
- esprima: 4.0.1
-
- require-directory@2.1.1: {}
-
- resolve-cwd@3.0.0:
- dependencies:
- resolve-from: 5.0.0
-
- resolve-from@4.0.0: {}
-
- resolve-from@5.0.0: {}
-
- resolve-pkg-maps@1.0.0: {}
-
- resolve.exports@2.0.2: {}
-
- resolve@1.22.8:
- dependencies:
- is-core-module: 2.13.1
- path-parse: 1.0.7
- supports-preserve-symlinks-flag: 1.0.0
-
- reusify@1.0.4: {}
-
- rimraf@3.0.2:
- dependencies:
- glob: 7.2.3
-
- rollup-plugin-inject@3.0.2:
- dependencies:
- estree-walker: 0.6.1
- magic-string: 0.25.9
- rollup-pluginutils: 2.8.2
-
- rollup-plugin-node-polyfills@0.2.1:
- dependencies:
- rollup-plugin-inject: 3.0.2
-
- rollup-pluginutils@2.8.2:
- dependencies:
- estree-walker: 0.6.1
-
- rollup@4.17.2:
- dependencies:
- '@types/estree': 1.0.5
- optionalDependencies:
- '@rollup/rollup-android-arm-eabi': 4.17.2
- '@rollup/rollup-android-arm64': 4.17.2
- '@rollup/rollup-darwin-arm64': 4.17.2
- '@rollup/rollup-darwin-x64': 4.17.2
- '@rollup/rollup-linux-arm-gnueabihf': 4.17.2
- '@rollup/rollup-linux-arm-musleabihf': 4.17.2
- '@rollup/rollup-linux-arm64-gnu': 4.17.2
- '@rollup/rollup-linux-arm64-musl': 4.17.2
- '@rollup/rollup-linux-powerpc64le-gnu': 4.17.2
- '@rollup/rollup-linux-riscv64-gnu': 4.17.2
- '@rollup/rollup-linux-s390x-gnu': 4.17.2
- '@rollup/rollup-linux-x64-gnu': 4.17.2
- '@rollup/rollup-linux-x64-musl': 4.17.2
- '@rollup/rollup-win32-arm64-msvc': 4.17.2
- '@rollup/rollup-win32-ia32-msvc': 4.17.2
- '@rollup/rollup-win32-x64-msvc': 4.17.2
- fsevents: 2.3.3
-
- run-parallel@1.2.0:
- dependencies:
- queue-microtask: 1.2.3
-
- safe-buffer@5.2.1: {}
-
- safer-buffer@2.1.2: {}
-
- selfsigned@2.4.1:
- dependencies:
- '@types/node-forge': 1.3.11
- node-forge: 1.3.1
-
- semver@7.6.2: {}
-
- seq-queue@0.0.5: {}
-
- serialize-error@7.0.1:
- dependencies:
- type-fest: 0.13.1
-
- shebang-command@2.0.0:
- dependencies:
- shebang-regex: 3.0.0
-
- shebang-regex@3.0.0: {}
-
- siginfo@2.0.0: {}
-
- signal-exit@3.0.7: {}
-
- signal-exit@4.1.0: {}
-
- simple-concat@1.0.1: {}
-
- simple-get@4.0.1:
- dependencies:
- decompress-response: 6.0.0
- once: 1.4.0
- simple-concat: 1.0.1
-
- sisteransi@1.0.5: {}
-
- skin-tone@2.0.0:
- dependencies:
- unicode-emoji-modifier-base: 1.0.0
-
- slash@3.0.0: {}
-
- slash@4.0.0: {}
-
- slice-ansi@5.0.0:
- dependencies:
- ansi-styles: 6.2.1
- is-fullwidth-code-point: 4.0.0
-
- source-map-js@1.2.0: {}
-
- source-map-support@0.5.21:
- dependencies:
- buffer-from: 1.1.2
- source-map: 0.6.1
-
- source-map@0.6.1: {}
-
- source-map@0.8.0-beta.0:
- dependencies:
- whatwg-url: 7.1.0
-
- sourcemap-codec@1.4.8: {}
-
- split-ca@1.0.1: {}
-
- split2@4.2.0: {}
-
- split@0.3.3:
- dependencies:
- through: 2.3.8
-
- sprintf-js@1.0.3: {}
-
- sqlstring@2.3.3: {}
-
- ssh2@1.15.0:
- dependencies:
- asn1: 0.2.6
- bcrypt-pbkdf: 1.0.2
- optionalDependencies:
- cpu-features: 0.0.10
- nan: 2.19.0
-
- stack-utils@2.0.6:
- dependencies:
- escape-string-regexp: 2.0.0
-
- stackback@0.0.2: {}
-
- stacktracey@2.1.8:
- dependencies:
- as-table: 1.0.55
- get-source: 2.0.12
-
- std-env@3.7.0: {}
-
- stoppable@1.1.0: {}
-
- stream-combiner@0.0.4:
- dependencies:
- duplexer: 0.1.2
-
- string-width@4.2.3:
- dependencies:
- emoji-regex: 8.0.0
- is-fullwidth-code-point: 3.0.0
- strip-ansi: 6.0.1
-
- string-width@5.1.2:
- dependencies:
- eastasianwidth: 0.2.0
- emoji-regex: 9.2.2
- strip-ansi: 7.1.0
-
- string_decoder@1.3.0:
- dependencies:
- safe-buffer: 5.2.1
-
- strip-ansi@6.0.1:
- dependencies:
- ansi-regex: 5.0.1
-
- strip-ansi@7.1.0:
- dependencies:
- ansi-regex: 6.0.1
-
- strip-final-newline@2.0.0: {}
-
- strip-final-newline@3.0.0: {}
-
- strip-json-comments@2.0.1: {}
-
- strip-json-comments@3.1.1: {}
-
- strip-literal@2.1.0:
- dependencies:
- js-tokens: 9.0.0
-
- strnum@1.0.5: {}
-
- sucrase@3.35.0:
- dependencies:
- '@jridgewell/gen-mapping': 0.3.5
- commander: 4.1.1
- glob: 10.3.15
- lines-and-columns: 1.2.4
- mz: 2.7.0
- pirates: 4.0.6
- ts-interface-checker: 0.1.13
-
- superjson@2.2.1:
- dependencies:
- copy-anything: 3.0.5
-
- supertap@3.0.1:
- dependencies:
- indent-string: 5.0.0
- js-yaml: 3.14.1
- serialize-error: 7.0.1
- strip-ansi: 7.1.0
-
- supports-color@7.2.0:
- dependencies:
- has-flag: 4.0.0
-
- supports-hyperlinks@3.0.0:
- dependencies:
- has-flag: 4.0.0
- supports-color: 7.2.0
-
- supports-preserve-symlinks-flag@1.0.0: {}
-
- synckit@0.8.8:
- dependencies:
- '@pkgr/core': 0.1.1
- tslib: 2.6.2
-
- tar-fs@2.0.1:
- dependencies:
- chownr: 1.1.4
- mkdirp-classic: 0.5.3
- pump: 3.0.0
- tar-stream: 2.2.0
-
- tar-fs@2.1.1:
- dependencies:
- chownr: 1.1.4
- mkdirp-classic: 0.5.3
- pump: 3.0.0
- tar-stream: 2.2.0
-
- tar-stream@2.2.0:
- dependencies:
- bl: 4.1.0
- end-of-stream: 1.4.4
- fs-constants: 1.0.0
- inherits: 2.0.4
- readable-stream: 3.6.2
-
- temp-dir@3.0.0: {}
-
- text-table@0.2.0: {}
-
- thenify-all@1.6.0:
- dependencies:
- thenify: 3.3.1
-
- thenify@3.3.1:
- dependencies:
- any-promise: 1.3.0
-
- through@2.3.8: {}
-
- time-zone@1.0.0: {}
-
- timers-ext@0.1.7:
- dependencies:
- es5-ext: 0.10.64
- next-tick: 1.1.0
-
- tinybench@2.8.0: {}
-
- tinypool@0.8.4: {}
-
- tinyspy@2.2.1: {}
-
- to-regex-range@5.0.1:
- dependencies:
- is-number: 7.0.0
-
- tr46@0.0.3: {}
-
- tr46@1.0.1:
- dependencies:
- punycode: 2.3.1
-
- tree-kill@1.2.2: {}
-
- ts-api-utils@1.3.0(typescript@5.4.5):
- dependencies:
- typescript: 5.4.5
-
- ts-expose-internals-conditionally@1.0.0-empty.0: {}
-
- ts-interface-checker@0.1.13: {}
-
- tsconfck@3.0.3(typescript@5.4.5):
- optionalDependencies:
- typescript: 5.4.5
-
- tslib@1.14.1: {}
-
- tslib@2.6.2: {}
-
- tsup@8.0.2(postcss@8.4.38)(typescript@5.4.5):
- dependencies:
- bundle-require: 4.1.0(esbuild@0.19.12)
- cac: 6.7.14
- chokidar: 3.6.0
- debug: 4.3.4
- esbuild: 0.19.12
- execa: 5.1.1
- globby: 11.1.0
- joycon: 3.1.1
- postcss-load-config: 4.0.2(postcss@8.4.38)
- resolve-from: 5.0.0
- rollup: 4.17.2
- source-map: 0.8.0-beta.0
- sucrase: 3.35.0
- tree-kill: 1.2.2
- optionalDependencies:
- postcss: 8.4.38
- typescript: 5.4.5
- transitivePeerDependencies:
- - supports-color
- - ts-node
-
- tsx@3.14.0:
- dependencies:
- esbuild: 0.18.20
- get-tsconfig: 4.7.5
- source-map-support: 0.5.21
- optionalDependencies:
- fsevents: 2.3.3
-
- tunnel-agent@0.6.0:
- dependencies:
- safe-buffer: 5.2.1
-
- tweetnacl@0.14.5: {}
-
- type-check@0.4.0:
- dependencies:
- prelude-ls: 1.2.1
-
- type-detect@4.0.8: {}
-
- type-fest@0.13.1: {}
-
- type-fest@0.20.2: {}
-
- type@2.7.2: {}
-
- typescript@5.3.3: {}
-
- typescript@5.4.5: {}
-
- ufo@1.5.3: {}
-
- undici-types@5.26.5: {}
-
- undici@5.28.4:
- dependencies:
- '@fastify/busboy': 2.1.1
-
- unicode-emoji-modifier-base@1.0.0: {}
-
- universalify@2.0.1: {}
-
- uri-js@4.4.1:
- dependencies:
- punycode: 2.3.1
-
- utf-8-validate@6.0.3:
- dependencies:
- node-gyp-build: 4.8.1
-
- util-deprecate@1.0.2: {}
-
- uuid@9.0.1: {}
-
- validate-npm-package-name@5.0.1: {}
-
- vite-node@1.6.0(@types/node@18.19.33):
- dependencies:
- cac: 6.7.14
- debug: 4.3.4
- pathe: 1.1.2
- picocolors: 1.0.1
- vite: 5.2.11(@types/node@18.19.33)
- transitivePeerDependencies:
- - '@types/node'
- - less
- - lightningcss
- - sass
- - stylus
- - sugarss
- - supports-color
- - terser
-
- vite-tsconfig-paths@4.3.2(typescript@5.4.5)(vite@5.2.11(@types/node@18.19.33)):
- dependencies:
- debug: 4.3.4
- globrex: 0.1.2
- tsconfck: 3.0.3(typescript@5.4.5)
- optionalDependencies:
- vite: 5.2.11(@types/node@18.19.33)
- transitivePeerDependencies:
- - supports-color
- - typescript
-
- vite@5.2.11(@types/node@18.19.33):
- dependencies:
- esbuild: 0.20.2
- postcss: 8.4.38
- rollup: 4.17.2
- optionalDependencies:
- '@types/node': 18.19.33
- fsevents: 2.3.3
-
- vitest@1.6.0(@types/node@18.19.33):
- dependencies:
- '@vitest/expect': 1.6.0
- '@vitest/runner': 1.6.0
- '@vitest/snapshot': 1.6.0
- '@vitest/spy': 1.6.0
- '@vitest/utils': 1.6.0
- acorn-walk: 8.3.2
- chai: 4.4.1
- debug: 4.3.4
- execa: 8.0.1
- local-pkg: 0.5.0
- magic-string: 0.30.10
- pathe: 1.1.2
- picocolors: 1.0.1
- std-env: 3.7.0
- strip-literal: 2.1.0
- tinybench: 2.8.0
- tinypool: 0.8.4
- vite: 5.2.11(@types/node@18.19.33)
- vite-node: 1.6.0(@types/node@18.19.33)
- why-is-node-running: 2.2.2
- optionalDependencies:
- '@types/node': 18.19.33
- transitivePeerDependencies:
- - less
- - lightningcss
- - sass
- - stylus
- - sugarss
- - supports-color
- - terser
-
- web-streams-polyfill@3.3.3: {}
-
- webidl-conversions@3.0.1: {}
-
- webidl-conversions@4.0.2: {}
-
- webpod@0.0.2: {}
-
- well-known-symbols@2.0.0: {}
-
- whatwg-url@5.0.0:
- dependencies:
- tr46: 0.0.3
- webidl-conversions: 3.0.1
-
- whatwg-url@7.1.0:
- dependencies:
- lodash.sortby: 4.7.0
- tr46: 1.0.1
- webidl-conversions: 4.0.2
-
- which@2.0.2:
- dependencies:
- isexe: 2.0.0
-
- which@3.0.1:
- dependencies:
- isexe: 2.0.0
-
- why-is-node-running@2.2.2:
- dependencies:
- siginfo: 2.0.0
- stackback: 0.0.2
-
- word-wrap@1.2.5: {}
-
- wordwrap@1.0.0: {}
-
- workerd@1.20240512.0:
- optionalDependencies:
- '@cloudflare/workerd-darwin-64': 1.20240512.0
- '@cloudflare/workerd-darwin-arm64': 1.20240512.0
- '@cloudflare/workerd-linux-64': 1.20240512.0
- '@cloudflare/workerd-linux-arm64': 1.20240512.0
- '@cloudflare/workerd-windows-64': 1.20240512.0
-
- wrangler@3.57.0(@cloudflare/workers-types@4.20240512.0)(bufferutil@4.0.8)(utf-8-validate@6.0.3):
- dependencies:
- '@cloudflare/kv-asset-handler': 0.3.2
- '@esbuild-plugins/node-globals-polyfill': 0.2.3(esbuild@0.17.19)
- '@esbuild-plugins/node-modules-polyfill': 0.2.2(esbuild@0.17.19)
- blake3-wasm: 2.1.5
- chokidar: 3.6.0
- esbuild: 0.17.19
- miniflare: 3.20240512.0(bufferutil@4.0.8)(utf-8-validate@6.0.3)
- nanoid: 3.3.7
- path-to-regexp: 6.2.2
- resolve: 1.22.8
- resolve.exports: 2.0.2
- selfsigned: 2.4.1
- source-map: 0.6.1
- xxhash-wasm: 1.0.2
- optionalDependencies:
- '@cloudflare/workers-types': 4.20240512.0
- fsevents: 2.3.3
- transitivePeerDependencies:
- - bufferutil
- - supports-color
- - utf-8-validate
-
- wrap-ansi@7.0.0:
- dependencies:
- ansi-styles: 4.3.0
- string-width: 4.2.3
- strip-ansi: 6.0.1
-
- wrap-ansi@8.1.0:
- dependencies:
- ansi-styles: 6.2.1
- string-width: 5.1.2
- strip-ansi: 7.1.0
-
- wrappy@1.0.2: {}
-
- write-file-atomic@5.0.1:
- dependencies:
- imurmurhash: 0.1.4
- signal-exit: 4.1.0
-
- ws@8.14.2(bufferutil@4.0.8)(utf-8-validate@6.0.3):
- optionalDependencies:
- bufferutil: 4.0.8
- utf-8-validate: 6.0.3
-
- ws@8.17.0(bufferutil@4.0.8)(utf-8-validate@6.0.3):
- optionalDependencies:
- bufferutil: 4.0.8
- utf-8-validate: 6.0.3
-
- xtend@4.0.2: {}
-
- xxhash-wasm@1.0.2: {}
-
- y18n@5.0.8: {}
-
- yallist@4.0.0: {}
-
- yaml@2.4.2: {}
-
- yargs-parser@21.1.1: {}
-
- yargs@17.7.2:
- dependencies:
- cliui: 8.0.1
- escalade: 3.1.2
- get-caller-file: 2.0.5
- require-directory: 2.1.1
- string-width: 4.2.3
- y18n: 5.0.8
- yargs-parser: 21.1.1
-
- yocto-queue@0.1.0: {}
-
- yocto-queue@1.0.0: {}
-
- youch@3.3.3:
- dependencies:
- cookie: 0.5.0
- mustache: 4.2.0
- stacktracey: 2.1.8
-
- zod@3.23.8: {}
-
- zx@7.2.3:
- dependencies:
- '@types/fs-extra': 11.0.4
- '@types/minimist': 1.2.5
- '@types/node': 18.19.33
- '@types/ps-tree': 1.1.6
- '@types/which': 3.0.3
- chalk: 5.3.0
- fs-extra: 11.2.0
- fx: 34.0.0
- globby: 13.2.2
- minimist: 1.2.8
- node-fetch: 3.3.1
- ps-tree: 1.2.0
- webpod: 0.0.2
- which: 3.0.1
- yaml: 2.4.2
diff --git a/drizzle-kit/schema.ts b/drizzle-kit/schema.ts
deleted file mode 100644
index e69de29bb..000000000
diff --git a/drizzle-kit/src/@types/utils.ts b/drizzle-kit/src/@types/utils.ts
index 3f14151a4..e71d45b89 100644
--- a/drizzle-kit/src/@types/utils.ts
+++ b/drizzle-kit/src/@types/utils.ts
@@ -4,6 +4,8 @@ declare global {
squashSpaces(): string;
capitalise(): string;
camelCase(): string;
+ snake_case(): string;
+
concatIf(it: string, condition: boolean): string;
}
@@ -11,6 +13,7 @@ declare global {
random(): T;
}
}
+
import camelcase from 'camelcase';
String.prototype.trimChar = function(char: string) {
@@ -44,6 +47,10 @@ String.prototype.concatIf = function(it: string, condition: boolean) {
return condition ? `${this}${it}` : String(this);
};
+String.prototype.snake_case = function() {
+ return this && this.length > 0 ? `${this.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`)}` : String(this);
+};
+
Array.prototype.random = function() {
return this[~~(Math.random() * this.length)];
};
diff --git a/drizzle-kit/src/api.ts b/drizzle-kit/src/api.ts
index 06f6dc1c0..18107bd34 100644
--- a/drizzle-kit/src/api.ts
+++ b/drizzle-kit/src/api.ts
@@ -1,38 +1,55 @@
import { randomUUID } from 'crypto';
-import type { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
import { LibSQLDatabase } from 'drizzle-orm/libsql';
import type { MySql2Database } from 'drizzle-orm/mysql2';
import { PgDatabase } from 'drizzle-orm/pg-core';
+import { SingleStoreDriverDatabase } from 'drizzle-orm/singlestore';
import {
columnsResolver,
enumsResolver,
+ indPolicyResolver,
+ mySqlViewsResolver,
+ policyResolver,
+ roleResolver,
schemasResolver,
sequencesResolver,
+ sqliteViewsResolver,
tablesResolver,
+ viewsResolver,
} from './cli/commands/migrate';
import { pgPushIntrospect } from './cli/commands/pgIntrospect';
import { pgSuggestions } from './cli/commands/pgPushUtils';
-import { updateUpToV6 as upPgV6 } from './cli/commands/pgUp';
+import { updateUpToV6 as upPgV6, updateUpToV7 as upPgV7 } from './cli/commands/pgUp';
import { sqlitePushIntrospect } from './cli/commands/sqliteIntrospect';
import { logSuggestionsAndReturn } from './cli/commands/sqlitePushUtils';
+import type { CasingType } from './cli/validations/common';
+import { getTablesFilterByExtensions } from './extensions/getTablesFilterByExtensions';
import { originUUID } from './global';
+import type { Config } from './index';
import { fillPgSnapshot } from './migrationPreparator';
import { MySqlSchema as MySQLSchemaKit, mysqlSchema, squashMysqlScheme } from './serializer/mysqlSchema';
import { generateMySqlSnapshot } from './serializer/mysqlSerializer';
import { prepareFromExports } from './serializer/pgImports';
import { PgSchema as PgSchemaKit, pgSchema, squashPgScheme } from './serializer/pgSchema';
import { generatePgSnapshot } from './serializer/pgSerializer';
+import {
+ SingleStoreSchema as SingleStoreSchemaKit,
+ singlestoreSchema,
+ squashSingleStoreScheme,
+} from './serializer/singlestoreSchema';
+import { generateSingleStoreSnapshot } from './serializer/singlestoreSerializer';
import { SQLiteSchema as SQLiteSchemaKit, sqliteSchema, squashSqliteScheme } from './serializer/sqliteSchema';
import { generateSqliteSnapshot } from './serializer/sqliteSerializer';
import type { DB, SQLiteDB } from './utils';
export type DrizzleSnapshotJSON = PgSchemaKit;
export type DrizzleSQLiteSnapshotJSON = SQLiteSchemaKit;
export type DrizzleMySQLSnapshotJSON = MySQLSchemaKit;
+export type DrizzleSingleStoreSnapshotJSON = SingleStoreSchemaKit;
export const generateDrizzleJson = (
imports: Record,
prevId?: string,
schemaFilters?: string[],
+ casing?: CasingType,
): PgSchemaKit => {
const prepared = prepareFromExports(imports);
@@ -43,6 +60,11 @@ export const generateDrizzleJson = (
prepared.enums,
prepared.schemas,
prepared.sequences,
+ prepared.roles,
+ prepared.policies,
+ prepared.views,
+ prepared.matViews,
+ casing,
schemaFilters,
);
@@ -71,8 +93,12 @@ export const generateMigration = async (
schemasResolver,
enumsResolver,
sequencesResolver,
+ policyResolver,
+ indPolicyResolver,
+ roleResolver,
tablesResolver,
columnsResolver,
+ viewsResolver,
validatedPrev,
validatedCur,
);
@@ -84,9 +110,14 @@ export const pushSchema = async (
imports: Record,
drizzleInstance: PgDatabase,
schemaFilters?: string[],
+ tablesFilter?: string[],
+ extensionsFilters?: Config['extensionsFilters'],
) => {
const { applyPgSnapshotsDiff } = await import('./snapshotsDiffer');
const { sql } = await import('drizzle-orm');
+ const filters = (tablesFilter ?? []).concat(
+ getTablesFilterByExtensions({ extensionsFilters, dialect: 'postgresql' }),
+ );
const db: DB = {
query: async (query: string, params?: any[]) => {
@@ -98,8 +129,9 @@ export const pushSchema = async (
const cur = generateDrizzleJson(imports);
const { schema: prev } = await pgPushIntrospect(
db,
- [],
+ filters,
schemaFilters ?? ['public'],
+ undefined,
);
const validatedPrev = pgSchema.parse(prev);
@@ -114,8 +146,12 @@ export const pushSchema = async (
schemasResolver,
enumsResolver,
sequencesResolver,
+ policyResolver,
+ indPolicyResolver,
+ roleResolver,
tablesResolver,
columnsResolver,
+ viewsResolver,
validatedPrev,
validatedCur,
'push',
@@ -140,6 +176,7 @@ export const pushSchema = async (
export const generateSQLiteDrizzleJson = async (
imports: Record,
prevId?: string,
+ casing?: CasingType,
): Promise => {
const { prepareFromExports } = await import('./serializer/sqliteImports');
@@ -147,7 +184,7 @@ export const generateSQLiteDrizzleJson = async (
const id = randomUUID();
- const snapshot = generateSqliteSnapshot(prepared.tables);
+ const snapshot = generateSqliteSnapshot(prepared.tables, prepared.views, casing);
return {
...snapshot,
@@ -173,6 +210,7 @@ export const generateSQLiteMigration = async (
squashedCur,
tablesResolver,
columnsResolver,
+ sqliteViewsResolver,
validatedPrev,
validatedCur,
);
@@ -213,6 +251,7 @@ export const pushSQLiteSchema = async (
squashedCur,
tablesResolver,
columnsResolver,
+ sqliteViewsResolver,
validatedPrev,
validatedCur,
'push',
@@ -243,6 +282,7 @@ export const pushSQLiteSchema = async (
export const generateMySQLDrizzleJson = async (
imports: Record,
prevId?: string,
+ casing?: CasingType,
): Promise => {
const { prepareFromExports } = await import('./serializer/mysqlImports');
@@ -250,7 +290,7 @@ export const generateMySQLDrizzleJson = async (
const id = randomUUID();
- const snapshot = generateMySqlSnapshot(prepared.tables);
+ const snapshot = generateMySqlSnapshot(prepared.tables, prepared.views, casing);
return {
...snapshot,
@@ -276,6 +316,7 @@ export const generateMySQLMigration = async (
squashedCur,
tablesResolver,
columnsResolver,
+ mySqlViewsResolver,
validatedPrev,
validatedCur,
);
@@ -317,6 +358,113 @@ export const pushMySQLSchema = async (
squashedCur,
tablesResolver,
columnsResolver,
+ mySqlViewsResolver,
+ validatedPrev,
+ validatedCur,
+ 'push',
+ );
+
+ const { shouldAskForApprove, statementsToExecute, infoToPrint } = await logSuggestionsAndReturn(
+ db,
+ statements,
+ validatedCur,
+ );
+
+ return {
+ hasDataLoss: shouldAskForApprove,
+ warnings: infoToPrint,
+ statementsToExecute,
+ apply: async () => {
+ for (const dStmnt of statementsToExecute) {
+ await db.query(dStmnt);
+ }
+ },
+ };
+};
+
+// SingleStore
+
+export const generateSingleStoreDrizzleJson = async (
+ imports: Record,
+ prevId?: string,
+ casing?: CasingType,
+): Promise => {
+ const { prepareFromExports } = await import('./serializer/singlestoreImports');
+
+ const prepared = prepareFromExports(imports);
+
+ const id = randomUUID();
+
+ const snapshot = generateSingleStoreSnapshot(prepared.tables, /* prepared.views, */ casing);
+
+ return {
+ ...snapshot,
+ id,
+ prevId: prevId ?? originUUID,
+ };
+};
+
+export const generateSingleStoreMigration = async (
+ prev: DrizzleSingleStoreSnapshotJSON,
+ cur: DrizzleSingleStoreSnapshotJSON,
+) => {
+ const { applySingleStoreSnapshotsDiff } = await import('./snapshotsDiffer');
+
+ const validatedPrev = singlestoreSchema.parse(prev);
+ const validatedCur = singlestoreSchema.parse(cur);
+
+ const squashedPrev = squashSingleStoreScheme(validatedPrev);
+ const squashedCur = squashSingleStoreScheme(validatedCur);
+
+ const { sqlStatements } = await applySingleStoreSnapshotsDiff(
+ squashedPrev,
+ squashedCur,
+ tablesResolver,
+ columnsResolver,
+ /* singleStoreViewsResolver, */
+ validatedPrev,
+ validatedCur,
+ 'push',
+ );
+
+ return sqlStatements;
+};
+
+export const pushSingleStoreSchema = async (
+ imports: Record,
+ drizzleInstance: SingleStoreDriverDatabase,
+ databaseName: string,
+) => {
+ const { applySingleStoreSnapshotsDiff } = await import('./snapshotsDiffer');
+ const { logSuggestionsAndReturn } = await import(
+ './cli/commands/singlestorePushUtils'
+ );
+ const { singlestorePushIntrospect } = await import(
+ './cli/commands/singlestoreIntrospect'
+ );
+ const { sql } = await import('drizzle-orm');
+
+ const db: DB = {
+ query: async (query: string) => {
+ const res = await drizzleInstance.execute(sql.raw(query));
+ return res[0] as unknown as any[];
+ },
+ };
+ const cur = await generateSingleStoreDrizzleJson(imports);
+ const { schema: prev } = await singlestorePushIntrospect(db, databaseName, []);
+
+ const validatedPrev = singlestoreSchema.parse(prev);
+ const validatedCur = singlestoreSchema.parse(cur);
+
+ const squashedPrev = squashSingleStoreScheme(validatedPrev);
+ const squashedCur = squashSingleStoreScheme(validatedCur);
+
+ const { statements } = await applySingleStoreSnapshotsDiff(
+ squashedPrev,
+ squashedCur,
+ tablesResolver,
+ columnsResolver,
+ /* singleStoreViewsResolver, */
validatedPrev,
validatedCur,
'push',
@@ -341,5 +489,11 @@ export const pushMySQLSchema = async (
};
export const upPgSnapshot = (snapshot: Record) => {
- return upPgV6(snapshot);
+ if (snapshot.version === '5') {
+ return upPgV7(upPgV6(snapshot));
+ }
+ if (snapshot.version === '6') {
+ return upPgV7(snapshot);
+ }
+ return snapshot;
};
diff --git a/drizzle-kit/src/cli/commands/introspect.ts b/drizzle-kit/src/cli/commands/introspect.ts
index 61ba0b44a..101eb617a 100644
--- a/drizzle-kit/src/cli/commands/introspect.ts
+++ b/drizzle-kit/src/cli/commands/introspect.ts
@@ -4,29 +4,47 @@ import { render, renderWithTask } from 'hanji';
import { Minimatch } from 'minimatch';
import { join } from 'path';
import { plural, singular } from 'pluralize';
+import { drySingleStore, SingleStoreSchema, squashSingleStoreScheme } from 'src/serializer/singlestoreSchema';
import { assertUnreachable, originUUID } from '../../global';
import { schemaToTypeScript as mysqlSchemaToTypeScript } from '../../introspect-mysql';
import { paramNameFor, schemaToTypeScript as postgresSchemaToTypeScript } from '../../introspect-pg';
+import { schemaToTypeScript as singlestoreSchemaToTypeScript } from '../../introspect-singlestore';
import { schemaToTypeScript as sqliteSchemaToTypeScript } from '../../introspect-sqlite';
import { dryMySql, MySqlSchema, squashMysqlScheme } from '../../serializer/mysqlSchema';
import { fromDatabase as fromMysqlDatabase } from '../../serializer/mysqlSerializer';
import { dryPg, type PgSchema, squashPgScheme } from '../../serializer/pgSchema';
import { fromDatabase as fromPostgresDatabase } from '../../serializer/pgSerializer';
+import { fromDatabase as fromSingleStoreDatabase } from '../../serializer/singlestoreSerializer';
import { drySQLite, type SQLiteSchema, squashSqliteScheme } from '../../serializer/sqliteSchema';
import { fromDatabase as fromSqliteDatabase } from '../../serializer/sqliteSerializer';
-import { applyMysqlSnapshotsDiff, applyPgSnapshotsDiff, applySqliteSnapshotsDiff } from '../../snapshotsDiffer';
+import {
+ applyLibSQLSnapshotsDiff,
+ applyMysqlSnapshotsDiff,
+ applyPgSnapshotsDiff,
+ applySingleStoreSnapshotsDiff,
+ applySqliteSnapshotsDiff,
+} from '../../snapshotsDiffer';
import { prepareOutFolder } from '../../utils';
+import { Entities } from '../validations/cli';
import type { Casing, Prefix } from '../validations/common';
+import { LibSQLCredentials } from '../validations/libsql';
import type { MysqlCredentials } from '../validations/mysql';
import type { PostgresCredentials } from '../validations/postgres';
+import { SingleStoreCredentials } from '../validations/singlestore';
import type { SqliteCredentials } from '../validations/sqlite';
import { IntrospectProgress } from '../views';
import {
columnsResolver,
enumsResolver,
+ indPolicyResolver,
+ mySqlViewsResolver,
+ policyResolver,
+ roleResolver,
schemasResolver,
sequencesResolver,
+ sqliteViewsResolver,
tablesResolver,
+ viewsResolver,
writeResult,
} from './migrate';
@@ -38,6 +56,7 @@ export const introspectPostgres = async (
tablesFilter: string[],
schemasFilter: string[],
prefix: Prefix,
+ entities: Entities,
) => {
const { preparePostgresDB } = await import('../connections');
const db = await preparePostgresDB(credentials);
@@ -70,11 +89,18 @@ export const introspectPostgres = async (
};
const progress = new IntrospectProgress(true);
+
const res = await renderWithTask(
progress,
- fromPostgresDatabase(db, filter, schemasFilter, (stage, count, status) => {
- progress.update(stage, count, status);
- }),
+ fromPostgresDatabase(
+ db,
+ filter,
+ schemasFilter,
+ entities,
+ (stage, count, status) => {
+ progress.update(stage, count, status);
+ },
+ ),
);
const schema = { id: originUUID, prevId: '', ...res } as PgSchema;
@@ -97,8 +123,12 @@ export const introspectPostgres = async (
schemasResolver,
enumsResolver,
sequencesResolver,
+ policyResolver,
+ indPolicyResolver,
+ roleResolver,
tablesResolver,
columnsResolver,
+ viewsResolver,
dryPg,
schema,
);
@@ -128,14 +158,14 @@ export const introspectPostgres = async (
chalk.green(
'✓',
)
- }] You schema file is ready ➜ ${chalk.bold.underline.blue(schemaFile)} 🚀`,
+ }] Your schema file is ready ➜ ${chalk.bold.underline.blue(schemaFile)} 🚀`,
);
render(
`[${
chalk.green(
'✓',
)
- }] You relations file is ready ➜ ${
+ }] Your relations file is ready ➜ ${
chalk.bold.underline.blue(
relationsFile,
)
@@ -201,7 +231,7 @@ export const introspectMysql = async (
writeFileSync(relationsFile, relationsTs.file);
console.log();
- const { snapshots, journal } = prepareOutFolder(out, 'postgresql');
+ const { snapshots, journal } = prepareOutFolder(out, 'mysql');
if (snapshots.length === 0) {
const { sqlStatements, _meta } = await applyMysqlSnapshotsDiff(
@@ -209,6 +239,7 @@ export const introspectMysql = async (
squashMysqlScheme(schema),
tablesResolver,
columnsResolver,
+ mySqlViewsResolver,
dryMySql,
schema,
);
@@ -238,14 +269,14 @@ export const introspectMysql = async (
chalk.green(
'✓',
)
- }] You schema file is ready ➜ ${chalk.bold.underline.blue(schemaFile)} 🚀`,
+ }] Your schema file is ready ➜ ${chalk.bold.underline.blue(schemaFile)} 🚀`,
);
render(
`[${
chalk.green(
'✓',
)
- }] You relations file is ready ➜ ${
+ }] Your relations file is ready ➜ ${
chalk.bold.underline.blue(
relationsFile,
)
@@ -254,6 +285,103 @@ export const introspectMysql = async (
process.exit(0);
};
+export const introspectSingleStore = async (
+ casing: Casing,
+ out: string,
+ breakpoints: boolean,
+ credentials: SingleStoreCredentials,
+ tablesFilter: string[],
+ prefix: Prefix,
+) => {
+ const { connectToSingleStore } = await import('../connections');
+ const { db, database } = await connectToSingleStore(credentials);
+
+ const matchers = tablesFilter.map((it) => {
+ return new Minimatch(it);
+ });
+
+ const filter = (tableName: string) => {
+ if (matchers.length === 0) return true;
+
+ let flags: boolean[] = [];
+
+ for (let matcher of matchers) {
+ if (matcher.negate) {
+ if (!matcher.match(tableName)) {
+ flags.push(false);
+ }
+ }
+
+ if (matcher.match(tableName)) {
+ flags.push(true);
+ }
+ }
+
+ if (flags.length > 0) {
+ return flags.every(Boolean);
+ }
+ return false;
+ };
+
+ const progress = new IntrospectProgress();
+ const res = await renderWithTask(
+ progress,
+ fromSingleStoreDatabase(db, database, filter, (stage, count, status) => {
+ progress.update(stage, count, status);
+ }),
+ );
+
+ const schema = { id: originUUID, prevId: '', ...res } as SingleStoreSchema;
+ const ts = singlestoreSchemaToTypeScript(schema, casing);
+ const { internal, ...schemaWithoutInternals } = schema;
+
+ const schemaFile = join(out, 'schema.ts');
+ writeFileSync(schemaFile, ts.file);
+ console.log();
+
+ const { snapshots, journal } = prepareOutFolder(out, 'postgresql');
+
+ if (snapshots.length === 0) {
+ const { sqlStatements, _meta } = await applySingleStoreSnapshotsDiff(
+ squashSingleStoreScheme(drySingleStore),
+ squashSingleStoreScheme(schema),
+ tablesResolver,
+ columnsResolver,
+ /* singleStoreViewsResolver, */
+ drySingleStore,
+ schema,
+ );
+
+ writeResult({
+ cur: schema,
+ sqlStatements,
+ journal,
+ _meta,
+ outFolder: out,
+ breakpoints,
+ type: 'introspect',
+ prefixMode: prefix,
+ });
+ } else {
+ render(
+ `[${
+ chalk.blue(
+ 'i',
+ )
+ }] No SQL generated, you already have migrations in project`,
+ );
+ }
+
+ render(
+ `[${
+ chalk.green(
+ '✓',
+ )
+ }] You schema file is ready ➜ ${chalk.bold.underline.blue(schemaFile)} 🚀`,
+ );
+ process.exit(0);
+};
+
export const introspectSqlite = async (
casing: Casing,
out: string,
@@ -312,7 +440,7 @@ export const introspectSqlite = async (
writeFileSync(relationsFile, relationsTs.file);
console.log();
- const { snapshots, journal } = prepareOutFolder(out, 'postgresql');
+ const { snapshots, journal } = prepareOutFolder(out, 'sqlite');
if (snapshots.length === 0) {
const { sqlStatements, _meta } = await applySqliteSnapshotsDiff(
@@ -320,6 +448,7 @@ export const introspectSqlite = async (
squashSqliteScheme(schema),
tablesResolver,
columnsResolver,
+ sqliteViewsResolver,
drySQLite,
schema,
);
@@ -365,6 +494,118 @@ export const introspectSqlite = async (
process.exit(0);
};
+export const introspectLibSQL = async (
+ casing: Casing,
+ out: string,
+ breakpoints: boolean,
+ credentials: LibSQLCredentials,
+ tablesFilter: string[],
+ prefix: Prefix,
+) => {
+ const { connectToLibSQL } = await import('../connections');
+ const db = await connectToLibSQL(credentials);
+
+ const matchers = tablesFilter.map((it) => {
+ return new Minimatch(it);
+ });
+
+ const filter = (tableName: string) => {
+ if (matchers.length === 0) return true;
+
+ let flags: boolean[] = [];
+
+ for (let matcher of matchers) {
+ if (matcher.negate) {
+ if (!matcher.match(tableName)) {
+ flags.push(false);
+ }
+ }
+
+ if (matcher.match(tableName)) {
+ flags.push(true);
+ }
+ }
+
+ if (flags.length > 0) {
+ return flags.every(Boolean);
+ }
+ return false;
+ };
+
+ const progress = new IntrospectProgress();
+ const res = await renderWithTask(
+ progress,
+ fromSqliteDatabase(db, filter, (stage, count, status) => {
+ progress.update(stage, count, status);
+ }),
+ );
+
+ const schema = { id: originUUID, prevId: '', ...res } as SQLiteSchema;
+ const ts = sqliteSchemaToTypeScript(schema, casing);
+ const relationsTs = relationsToTypeScript(schema, casing);
+
+ // check orm and orm-pg api version
+
+ const schemaFile = join(out, 'schema.ts');
+ writeFileSync(schemaFile, ts.file);
+ const relationsFile = join(out, 'relations.ts');
+ writeFileSync(relationsFile, relationsTs.file);
+ console.log();
+
+ const { snapshots, journal } = prepareOutFolder(out, 'sqlite');
+
+ if (snapshots.length === 0) {
+ const { sqlStatements, _meta } = await applyLibSQLSnapshotsDiff(
+ squashSqliteScheme(drySQLite),
+ squashSqliteScheme(schema),
+ tablesResolver,
+ columnsResolver,
+ sqliteViewsResolver,
+ drySQLite,
+ schema,
+ );
+
+ writeResult({
+ cur: schema,
+ sqlStatements,
+ journal,
+ _meta,
+ outFolder: out,
+ breakpoints,
+ type: 'introspect',
+ prefixMode: prefix,
+ });
+ } else {
+ render(
+ `[${
+ chalk.blue(
+ 'i',
+ )
+ }] No SQL generated, you already have migrations in project`,
+ );
+ }
+
+ render(
+ `[${
+ chalk.green(
+ '✓',
+ )
+ }] Your schema file is ready ➜ ${chalk.bold.underline.blue(schemaFile)} 🚀`,
+ );
+ render(
+ `[${
+ chalk.green(
+ '✓',
+ )
+ }] Your relations file is ready ➜ ${
+ chalk.bold.underline.blue(
+ relationsFile,
+ )
+ } 🚀`,
+ );
+ process.exit(0);
+};
+
const withCasing = (value: string, casing: Casing) => {
if (casing === 'preserve') {
return value;
diff --git a/drizzle-kit/src/cli/commands/libSqlPushUtils.ts b/drizzle-kit/src/cli/commands/libSqlPushUtils.ts
new file mode 100644
index 000000000..31e90c872
--- /dev/null
+++ b/drizzle-kit/src/cli/commands/libSqlPushUtils.ts
@@ -0,0 +1,355 @@
+import chalk from 'chalk';
+
+import { JsonStatement } from 'src/jsonStatements';
+import { findAddedAndRemoved, SQLiteDB } from 'src/utils';
+import { SQLiteSchemaInternal, SQLiteSchemaSquashed, SQLiteSquasher } from '../../serializer/sqliteSchema';
+import {
+ CreateSqliteIndexConvertor,
+ fromJson,
+ LibSQLModifyColumn,
+ SQLiteCreateTableConvertor,
+ SQLiteDropTableConvertor,
+ SqliteRenameTableConvertor,
+} from '../../sqlgenerator';
+
+export const getOldTableName = (
+ tableName: string,
+ meta: SQLiteSchemaInternal['_meta'],
+) => {
+ for (const key of Object.keys(meta.tables)) {
+ const value = meta.tables[key];
+ if (`"${tableName}"` === value) {
+ return key.substring(1, key.length - 1);
+ }
+ }
+ return tableName;
+};
+
+export const _moveDataStatements = (
+ tableName: string,
+ json: SQLiteSchemaSquashed,
+ dataLoss: boolean = false,
+) => {
+ const statements: string[] = [];
+
+ const newTableName = `__new_${tableName}`;
+
+ // create table statement from a new json2 with proper name
+ const tableColumns = Object.values(json.tables[tableName].columns);
+ const referenceData = Object.values(json.tables[tableName].foreignKeys);
+ const compositePKs = Object.values(
+ json.tables[tableName].compositePrimaryKeys,
+ ).map((it) => SQLiteSquasher.unsquashPK(it));
+ const checkConstraints = Object.values(json.tables[tableName].checkConstraints);
+
+ const fks = referenceData.map((it) => SQLiteSquasher.unsquashPushFK(it));
+
+ const mappedCheckConstraints: string[] = checkConstraints.map((it) =>
+ it.replaceAll(`"${tableName}".`, `"${newTableName}".`)
+ .replaceAll(`\`${tableName}\`.`, `\`${newTableName}\`.`)
+ .replaceAll(`${tableName}.`, `${newTableName}.`)
+ .replaceAll(`'${tableName}'.`, `\`${newTableName}\`.`)
+ );
+
+ // create new table
+ statements.push(
+ new SQLiteCreateTableConvertor().convert({
+ type: 'sqlite_create_table',
+ tableName: newTableName,
+ columns: tableColumns,
+ referenceData: fks,
+ compositePKs,
+ checkConstraints: mappedCheckConstraints,
+ }),
+ );
+
+ // move data
+ if (!dataLoss) {
+ const columns = Object.keys(json.tables[tableName].columns).map(
+ (c) => `"${c}"`,
+ );
+
+ statements.push(
+ `INSERT INTO \`${newTableName}\`(${
+ columns.join(
+ ', ',
+ )
+ }) SELECT ${columns.join(', ')} FROM \`${tableName}\`;`,
+ );
+ }
+
+ statements.push(
+ new SQLiteDropTableConvertor().convert({
+ type: 'drop_table',
+ tableName: tableName,
+ schema: '',
+ }),
+ );
+
+ // rename table
+ statements.push(
+ new SqliteRenameTableConvertor().convert({
+ fromSchema: '',
+ tableNameFrom: newTableName,
+ tableNameTo: tableName,
+ toSchema: '',
+ type: 'rename_table',
+ }),
+ );
+
+ for (const idx of Object.values(json.tables[tableName].indexes)) {
+ statements.push(
+ new CreateSqliteIndexConvertor().convert({
+ type: 'create_index',
+ tableName: tableName,
+ schema: '',
+ data: idx,
+ }),
+ );
+ }
+ return statements;
+};
+
+export const libSqlLogSuggestionsAndReturn = async (
+ connection: SQLiteDB,
+ statements: JsonStatement[],
+ json1: SQLiteSchemaSquashed,
+ json2: SQLiteSchemaSquashed,
+ meta: SQLiteSchemaInternal['_meta'],
+) => {
+ let shouldAskForApprove = false;
+ const statementsToExecute: string[] = [];
+ const infoToPrint: string[] = [];
+
+ const tablesToRemove: string[] = [];
+ const columnsToRemove: string[] = [];
+ const tablesToTruncate: string[] = [];
+
+ for (const statement of statements) {
+ if (statement.type === 'drop_table') {
+ const res = await connection.query<{ count: string }>(
+ `select count(*) as count from \`${statement.tableName}\``,
+ );
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to delete ${
+ chalk.underline(
+ statement.tableName,
+ )
+ } table with ${count} items`,
+ );
+ tablesToRemove.push(statement.tableName);
+ shouldAskForApprove = true;
+ }
+ const fromJsonStatement = fromJson([statement], 'turso', 'push', json2);
+ statementsToExecute.push(
+ ...(Array.isArray(fromJsonStatement) ? fromJsonStatement : [fromJsonStatement]),
+ );
+ } else if (statement.type === 'alter_table_drop_column') {
+ const tableName = statement.tableName;
+
+ const res = await connection.query<{ count: string }>(
+ `select count(*) as count from \`${tableName}\``,
+ );
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to delete ${
+ chalk.underline(
+ statement.columnName,
+ )
+ } column in ${tableName} table with ${count} items`,
+ );
+ columnsToRemove.push(`${tableName}_${statement.columnName}`);
+ shouldAskForApprove = true;
+ }
+
+ const fromJsonStatement = fromJson([statement], 'turso', 'push', json2);
+ statementsToExecute.push(
+ ...(Array.isArray(fromJsonStatement) ? fromJsonStatement : [fromJsonStatement]),
+ );
+ } else if (
+ statement.type === 'sqlite_alter_table_add_column'
+ && statement.column.notNull
+ && !statement.column.default
+ ) {
+ const newTableName = statement.tableName;
+ const res = await connection.query<{ count: string }>(
+ `select count(*) as count from \`${newTableName}\``,
+ );
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to add not-null ${
+ chalk.underline(
+ statement.column.name,
+ )
+ } column without default value, which contains ${count} items`,
+ );
+
+ tablesToTruncate.push(newTableName);
+ statementsToExecute.push(`delete from ${newTableName};`);
+
+ shouldAskForApprove = true;
+ }
+
+ const fromJsonStatement = fromJson([statement], 'turso', 'push', json2);
+ statementsToExecute.push(
+ ...(Array.isArray(fromJsonStatement) ? fromJsonStatement : [fromJsonStatement]),
+ );
+ } else if (statement.type === 'alter_table_alter_column_set_notnull') {
+ const tableName = statement.tableName;
+
+ if (
+ statement.type === 'alter_table_alter_column_set_notnull'
+ && typeof statement.columnDefault === 'undefined'
+ ) {
+ const res = await connection.query<{ count: string }>(
+ `select count(*) as count from \`${tableName}\``,
+ );
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to add not-null constraint to ${
+ chalk.underline(
+ statement.columnName,
+ )
+ } column without default value, which contains ${count} items`,
+ );
+
+ tablesToTruncate.push(tableName);
+ statementsToExecute.push(`delete from \`${tableName}\``);
+ shouldAskForApprove = true;
+ }
+ }
+
+ const modifyStatements = new LibSQLModifyColumn().convert(statement, json2);
+
+ statementsToExecute.push(
+ ...(Array.isArray(modifyStatements) ? modifyStatements : [modifyStatements]),
+ );
+ } else if (statement.type === 'recreate_table') {
+ const tableName = statement.tableName;
+
+ let dataLoss = false;
+
+ const oldTableName = getOldTableName(tableName, meta);
+
+ const prevColumnNames = Object.keys(json1.tables[oldTableName].columns);
+ const currentColumnNames = Object.keys(json2.tables[tableName].columns);
+ const { removedColumns, addedColumns } = findAddedAndRemoved(
+ prevColumnNames,
+ currentColumnNames,
+ );
+
+ if (removedColumns.length) {
+ for (const removedColumn of removedColumns) {
+ const res = await connection.query<{ count: string }>(
+ `select count(\`${tableName}\`.\`${removedColumn}\`) as count from \`${tableName}\``,
+ );
+
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to delete ${
+ chalk.underline(
+ removedColumn,
+ )
+ } column in ${tableName} table with ${count} items`,
+ );
+ columnsToRemove.push(removedColumn);
+ shouldAskForApprove = true;
+ }
+ }
+ }
+
+ if (addedColumns.length) {
+ for (const addedColumn of addedColumns) {
+ const [res] = await connection.query<{ count: string }>(
+ `select count(*) as count from \`${tableName}\``,
+ );
+
+ const columnConf = json2.tables[tableName].columns[addedColumn];
+
+ const count = Number(res.count);
+ if (count > 0 && columnConf.notNull && !columnConf.default) {
+ dataLoss = true;
+
+ infoToPrint.push(
+ `· You're about to add not-null ${
+ chalk.underline(
+ addedColumn,
+ )
+ } column without default value to table, which contains ${count} items`,
+ );
+ shouldAskForApprove = true;
+ tablesToTruncate.push(tableName);
+
+ statementsToExecute.push(`DELETE FROM \`${tableName}\`;`);
+ }
+ }
+ }
+
+ // check if some tables referencing current for pragma
+ const tablesReferencingCurrent: string[] = [];
+
+ for (const table of Object.values(json2.tables)) {
+ const tablesRefs = Object.values(json2.tables[table.name].foreignKeys)
+ .filter((t) => SQLiteSquasher.unsquashPushFK(t).tableTo === tableName)
+ .map((it) => SQLiteSquasher.unsquashPushFK(it).tableFrom);
+
+ tablesReferencingCurrent.push(...tablesRefs);
+ }
+
+ if (!tablesReferencingCurrent.length) {
+ statementsToExecute.push(..._moveDataStatements(tableName, json2, dataLoss));
+ continue;
+ }
+
+ // recreate table
+ statementsToExecute.push(
+ ..._moveDataStatements(tableName, json2, dataLoss),
+ );
+ } else if (
+ statement.type === 'alter_table_alter_column_set_generated'
+ || statement.type === 'alter_table_alter_column_drop_generated'
+ ) {
+ const tableName = statement.tableName;
+
+ const res = await connection.query<{ count: string }>(
+ `select count("${statement.columnName}") as count from \`${tableName}\``,
+ );
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to delete ${
+ chalk.underline(
+ statement.columnName,
+ )
+ } column in ${tableName} table with ${count} items`,
+ );
+ columnsToRemove.push(`${tableName}_${statement.columnName}`);
+ shouldAskForApprove = true;
+ }
+ const fromJsonStatement = fromJson([statement], 'turso', 'push', json2);
+ statementsToExecute.push(
+ ...(Array.isArray(fromJsonStatement) ? fromJsonStatement : [fromJsonStatement]),
+ );
+ } else {
+ const fromJsonStatement = fromJson([statement], 'turso', 'push', json2);
+ statementsToExecute.push(
+ ...(Array.isArray(fromJsonStatement) ? fromJsonStatement : [fromJsonStatement]),
+ );
+ }
+ }
+
+ return {
+ statementsToExecute: [...new Set(statementsToExecute)],
+ shouldAskForApprove,
+ infoToPrint,
+ columnsToRemove: [...new Set(columnsToRemove)],
+ tablesToTruncate: [...new Set(tablesToTruncate)],
+ tablesToRemove: [...new Set(tablesToRemove)],
+ };
+};
diff --git a/drizzle-kit/src/cli/commands/migrate.ts b/drizzle-kit/src/cli/commands/migrate.ts
index 8ef469fa1..8c62a5edb 100644
--- a/drizzle-kit/src/cli/commands/migrate.ts
+++ b/drizzle-kit/src/cli/commands/migrate.ts
@@ -4,6 +4,8 @@ import {
prepareMySqlMigrationSnapshot,
preparePgDbPushSnapshot,
preparePgMigrationSnapshot,
+ prepareSingleStoreDbPushSnapshot,
+ prepareSingleStoreMigrationSnapshot,
prepareSQLiteDbPushSnapshot,
prepareSqliteMigrationSnapshot,
} from '../../migrationPreparator';
@@ -11,28 +13,37 @@ import {
import chalk from 'chalk';
import { render } from 'hanji';
import path, { join } from 'path';
+import { SingleStoreSchema, singlestoreSchema, squashSingleStoreScheme } from 'src/serializer/singlestoreSchema';
import { TypeOf } from 'zod';
import type { CommonSchema } from '../../schemaValidator';
-import { MySqlSchema, mysqlSchema, squashMysqlScheme } from '../../serializer/mysqlSchema';
-import { PgSchema, pgSchema, squashPgScheme } from '../../serializer/pgSchema';
-import { SQLiteSchema, sqliteSchema, squashSqliteScheme } from '../../serializer/sqliteSchema';
+import { MySqlSchema, mysqlSchema, squashMysqlScheme, ViewSquashed } from '../../serializer/mysqlSchema';
+import { PgSchema, pgSchema, Policy, Role, squashPgScheme, View } from '../../serializer/pgSchema';
+import { SQLiteSchema, sqliteSchema, squashSqliteScheme, View as SQLiteView } from '../../serializer/sqliteSchema';
import {
+ applyLibSQLSnapshotsDiff,
applyMysqlSnapshotsDiff,
applyPgSnapshotsDiff,
+ applySingleStoreSnapshotsDiff,
applySqliteSnapshotsDiff,
Column,
ColumnsResolverInput,
ColumnsResolverOutput,
Enum,
+ PolicyResolverInput,
+ PolicyResolverOutput,
ResolverInput,
ResolverOutput,
ResolverOutputWithMoved,
+ RolesResolverInput,
+ RolesResolverOutput,
Sequence,
Table,
+ TablePolicyResolverInput,
+ TablePolicyResolverOutput,
} from '../../snapshotsDiffer';
import { assertV1OutFolder, Journal, prepareMigrationFolder } from '../../utils';
import { prepareMigrationMetadata } from '../../utils/words';
-import { Prefix } from '../validations/common';
+import { CasingType, Driver, Prefix } from '../validations/common';
import { withStyle } from '../validations/outputs';
import {
isRenamePromptItem,
@@ -40,9 +51,10 @@ import {
ResolveColumnSelect,
ResolveSchemasSelect,
ResolveSelect,
+ ResolveSelectNamed,
schema,
} from '../views';
-import { GenerateConfig } from './utils';
+import { ExportConfig, GenerateConfig } from './utils';
export type Named = {
name: string;
@@ -91,6 +103,94 @@ export const tablesResolver = async (
}
};
+export const viewsResolver = async (
+ input: ResolverInput,
+): Promise> => {
+ try {
+ const { created, deleted, moved, renamed } = await promptNamedWithSchemasConflict(
+ input.created,
+ input.deleted,
+ 'view',
+ );
+
+ return {
+ created: created,
+ deleted: deleted,
+ moved: moved,
+ renamed: renamed,
+ };
+ } catch (e) {
+ console.error(e);
+ throw e;
+ }
+};
+
+export const mySqlViewsResolver = async (
+ input: ResolverInput,
+): Promise> => {
+ try {
+ const { created, deleted, moved, renamed } = await promptNamedWithSchemasConflict(
+ input.created,
+ input.deleted,
+ 'view',
+ );
+
+ return {
+ created: created,
+ deleted: deleted,
+ moved: moved,
+ renamed: renamed,
+ };
+ } catch (e) {
+ console.error(e);
+ throw e;
+ }
+};
+
+/* export const singleStoreViewsResolver = async (
+ input: ResolverInput,
+): Promise> => {
+ try {
+ const { created, deleted, moved, renamed } = await promptNamedWithSchemasConflict(
+ input.created,
+ input.deleted,
+ 'view',
+ );
+
+ return {
+ created: created,
+ deleted: deleted,
+ moved: moved,
+ renamed: renamed,
+ };
+ } catch (e) {
+ console.error(e);
+ throw e;
+ }
+}; */
+
+export const sqliteViewsResolver = async (
+ input: ResolverInput,
+): Promise> => {
+ try {
+ const { created, deleted, moved, renamed } = await promptNamedWithSchemasConflict(
+ input.created,
+ input.deleted,
+ 'view',
+ );
+
+ return {
+ created: created,
+ deleted: deleted,
+ moved: moved,
+ renamed: renamed,
+ };
+ } catch (e) {
+ console.error(e);
+ throw e;
+ }
+};
+
export const sequencesResolver = async (
input: ResolverInput,
): Promise> => {
@@ -113,6 +213,53 @@ export const sequencesResolver = async (
}
};
+export const roleResolver = async (
+ input: RolesResolverInput,
+): Promise> => {
+ const result = await promptNamedConflict(
+ input.created,
+ input.deleted,
+ 'role',
+ );
+ return {
+ created: result.created,
+ deleted: result.deleted,
+ renamed: result.renamed,
+ };
+};
+
+export const policyResolver = async (
+ input: TablePolicyResolverInput,
+): Promise> => {
+ const result = await promptColumnsConflicts(
+ input.tableName,
+ input.created,
+ input.deleted,
+ );
+ return {
+ tableName: input.tableName,
+ schema: input.schema,
+ created: result.created,
+ deleted: result.deleted,
+ renamed: result.renamed,
+ };
+};
+
+export const indPolicyResolver = async (
+ input: PolicyResolverInput,
+): Promise> => {
+ const result = await promptNamedConflict(
+ input.created,
+ input.deleted,
+ 'policy',
+ );
+ return {
+ created: result.created,
+ deleted: result.deleted,
+ renamed: result.renamed,
+ };
+};
+
export const enumsResolver = async (
input: ResolverInput,
): Promise> => {
@@ -155,6 +302,7 @@ export const columnsResolver = async (
export const prepareAndMigratePg = async (config: GenerateConfig) => {
const outFolder = config.out;
const schemaPath = config.schema;
+ const casing = config.casing;
try {
assertV1OutFolder(outFolder);
@@ -167,6 +315,7 @@ export const prepareAndMigratePg = async (config: GenerateConfig) => {
const { prev, cur, custom } = await preparePgMigrationSnapshot(
snapshots,
schemaPath,
+ casing,
);
const validatedPrev = pgSchema.parse(prev);
@@ -195,8 +344,12 @@ export const prepareAndMigratePg = async (config: GenerateConfig) => {
schemasResolver,
enumsResolver,
sequencesResolver,
+ policyResolver,
+ indPolicyResolver,
+ roleResolver,
tablesResolver,
columnsResolver,
+ viewsResolver,
validatedPrev,
validatedCur,
);
@@ -215,17 +368,48 @@ export const prepareAndMigratePg = async (config: GenerateConfig) => {
}
};
+export const prepareAndExportPg = async (config: ExportConfig) => {
+ const schemaPath = config.schema;
+
+ try {
+ const { prev, cur } = await preparePgMigrationSnapshot(
+ [], // no snapshots before
+ schemaPath,
+ undefined,
+ );
+
+ const validatedPrev = pgSchema.parse(prev);
+ const validatedCur = pgSchema.parse(cur);
+
+ const squashedPrev = squashPgScheme(validatedPrev);
+ const squashedCur = squashPgScheme(validatedCur);
+
+ const { sqlStatements } = await applyPgSnapshotsDiff(
+ squashedPrev,
+ squashedCur,
+ schemasResolver,
+ enumsResolver,
+ sequencesResolver,
+ policyResolver,
+ indPolicyResolver,
+ roleResolver,
+ tablesResolver,
+ columnsResolver,
+ viewsResolver,
+ validatedPrev,
+ validatedCur,
+ );
+
+ console.log(sqlStatements.join('\n'));
+ } catch (e) {
+ console.error(e);
+ }
+};
+
export const preparePgPush = async (
- schemaPath: string | string[],
- snapshot: PgSchema,
- schemaFilter: string[],
+ cur: PgSchema,
+ prev: PgSchema,
) => {
- const { prev, cur } = await preparePgDbPushSnapshot(
- snapshot,
- schemaPath,
- schemaFilter,
- );
-
const validatedPrev = pgSchema.parse(prev);
const validatedCur = pgSchema.parse(cur);
@@ -238,8 +422,12 @@ export const preparePgPush = async (
schemasResolver,
enumsResolver,
sequencesResolver,
+ policyResolver,
+ indPolicyResolver,
+ roleResolver,
tablesResolver,
columnsResolver,
+ viewsResolver,
validatedPrev,
validatedCur,
'push',
@@ -248,66 +436,345 @@ export const preparePgPush = async (
return { sqlStatements, statements, squashedPrev, squashedCur };
};
-// Not needed for now
-function mysqlSchemaSuggestions(
- curSchema: TypeOf,
- prevSchema: TypeOf,
-) {
- const suggestions: string[] = [];
- const usedSuggestions: string[] = [];
- const suggestionTypes = {
- serial: withStyle.errorWarning(
- `We deprecated the use of 'serial' for MySQL starting from version 0.20.0. In MySQL, 'serial' is simply an alias for 'bigint unsigned not null auto_increment unique,' which creates all constraints and indexes for you. This may make the process less explicit for both users and drizzle-kit push commands`,
- ),
- };
+// Not needed for now
+function mysqlSchemaSuggestions(
+ curSchema: TypeOf,
+ prevSchema: TypeOf,
+) {
+ const suggestions: string[] = [];
+ const usedSuggestions: string[] = [];
+ const suggestionTypes = {
+ serial: withStyle.errorWarning(
+ `We deprecated the use of 'serial' for MySQL starting from version 0.20.0. In MySQL, 'serial' is simply an alias for 'bigint unsigned not null auto_increment unique,' which creates all constraints and indexes for you. This may make the process less explicit for both users and drizzle-kit push commands`,
+ ),
+ };
+
+ for (const table of Object.values(curSchema.tables)) {
+ for (const column of Object.values(table.columns)) {
+ if (column.type === 'serial') {
+ if (!usedSuggestions.includes('serial')) {
+ suggestions.push(suggestionTypes['serial']);
+ }
+
+ const uniqueForSerial = Object.values(
+ prevSchema.tables[table.name].uniqueConstraints,
+ ).find((it) => it.columns[0] === column.name);
+
+ suggestions.push(
+ `\n`
+ + withStyle.suggestion(
+ `We are suggesting to change ${
+ chalk.blue(
+ column.name,
+ )
+ } column in ${
+ chalk.blueBright(
+ table.name,
+ )
+ } table from serial to bigint unsigned\n\n${
+ chalk.blueBright(
+ `bigint("${column.name}", { mode: "number", unsigned: true }).notNull().autoincrement().unique(${
+ uniqueForSerial?.name ? `"${uniqueForSerial?.name}"` : ''
+ })`,
+ )
+ }`,
+ ),
+ );
+ }
+ }
+ }
+
+ return suggestions;
+}
+
+// Intersect with prepareAnMigrate
+export const prepareMySQLPush = async (
+ schemaPath: string | string[],
+ snapshot: MySqlSchema,
+ casing: CasingType | undefined,
+) => {
+ try {
+ const { prev, cur } = await prepareMySqlDbPushSnapshot(
+ snapshot,
+ schemaPath,
+ casing,
+ );
+
+ const validatedPrev = mysqlSchema.parse(prev);
+ const validatedCur = mysqlSchema.parse(cur);
+
+ const squashedPrev = squashMysqlScheme(validatedPrev);
+ const squashedCur = squashMysqlScheme(validatedCur);
+
+ const { sqlStatements, statements } = await applyMysqlSnapshotsDiff(
+ squashedPrev,
+ squashedCur,
+ tablesResolver,
+ columnsResolver,
+ mySqlViewsResolver,
+ validatedPrev,
+ validatedCur,
+ 'push',
+ );
+
+ return { sqlStatements, statements, validatedCur, validatedPrev };
+ } catch (e) {
+ console.error(e);
+ process.exit(1);
+ }
+};
+
+export const prepareAndMigrateMysql = async (config: GenerateConfig) => {
+ const outFolder = config.out;
+ const schemaPath = config.schema;
+ const casing = config.casing;
+
+ try {
+ // TODO: remove
+ assertV1OutFolder(outFolder);
+
+ const { snapshots, journal } = prepareMigrationFolder(outFolder, 'mysql');
+ const { prev, cur, custom } = await prepareMySqlMigrationSnapshot(
+ snapshots,
+ schemaPath,
+ casing,
+ );
+
+ const validatedPrev = mysqlSchema.parse(prev);
+ const validatedCur = mysqlSchema.parse(cur);
+
+ if (config.custom) {
+ writeResult({
+ cur: custom,
+ sqlStatements: [],
+ journal,
+ outFolder,
+ name: config.name,
+ breakpoints: config.breakpoints,
+ type: 'custom',
+ prefixMode: config.prefix,
+ });
+ return;
+ }
+
+ const squashedPrev = squashMysqlScheme(validatedPrev);
+ const squashedCur = squashMysqlScheme(validatedCur);
+
+ const { sqlStatements, statements, _meta } = await applyMysqlSnapshotsDiff(
+ squashedPrev,
+ squashedCur,
+ tablesResolver,
+ columnsResolver,
+ mySqlViewsResolver,
+ validatedPrev,
+ validatedCur,
+ );
+
+ writeResult({
+ cur,
+ sqlStatements,
+ journal,
+ _meta,
+ outFolder,
+ name: config.name,
+ breakpoints: config.breakpoints,
+ prefixMode: config.prefix,
+ });
+ } catch (e) {
+ console.error(e);
+ }
+};
+
+// Not needed for now
+function singleStoreSchemaSuggestions(
+ curSchema: TypeOf,
+ prevSchema: TypeOf,
+) {
+ const suggestions: string[] = [];
+ const usedSuggestions: string[] = [];
+ const suggestionTypes = {
+ // TODO: Check if SingleStore has serial type
+ serial: withStyle.errorWarning(
+ `We deprecated the use of 'serial' for SingleStore starting from version 0.20.0. In SingleStore, 'serial' is simply an alias for 'bigint unsigned not null auto_increment unique,' which creates all constraints and indexes for you. This may make the process less explicit for both users and drizzle-kit push commands`,
+ ),
+ };
+
+ for (const table of Object.values(curSchema.tables)) {
+ for (const column of Object.values(table.columns)) {
+ if (column.type === 'serial') {
+ if (!usedSuggestions.includes('serial')) {
+ suggestions.push(suggestionTypes['serial']);
+ }
+
+ const uniqueForSerial = Object.values(
+ prevSchema.tables[table.name].uniqueConstraints,
+ ).find((it) => it.columns[0] === column.name);
+
+ suggestions.push(
+ `\n`
+ + withStyle.suggestion(
+ `We are suggesting to change ${
+ chalk.blue(
+ column.name,
+ )
+ } column in ${
+ chalk.blueBright(
+ table.name,
+ )
+ } table from serial to bigint unsigned\n\n${
+ chalk.blueBright(
+ `bigint("${column.name}", { mode: "number", unsigned: true }).notNull().autoincrement().unique(${
+ uniqueForSerial?.name ? `"${uniqueForSerial?.name}"` : ''
+ })`,
+ )
+ }`,
+ ),
+ );
+ }
+ }
+ }
+
+ return suggestions;
+}
+
+// Intersect with prepareAnMigrate
+export const prepareSingleStorePush = async (
+ schemaPath: string | string[],
+ snapshot: SingleStoreSchema,
+ casing: CasingType | undefined,
+) => {
+ try {
+ const { prev, cur } = await prepareSingleStoreDbPushSnapshot(
+ snapshot,
+ schemaPath,
+ casing,
+ );
+
+ const validatedPrev = singlestoreSchema.parse(prev);
+ const validatedCur = singlestoreSchema.parse(cur);
+
+ const squashedPrev = squashSingleStoreScheme(validatedPrev);
+ const squashedCur = squashSingleStoreScheme(validatedCur);
+
+ const { sqlStatements, statements } = await applySingleStoreSnapshotsDiff(
+ squashedPrev,
+ squashedCur,
+ tablesResolver,
+ columnsResolver,
+ /* singleStoreViewsResolver, */
+ validatedPrev,
+ validatedCur,
+ 'push',
+ );
+
+ return { sqlStatements, statements, validatedCur, validatedPrev };
+ } catch (e) {
+ console.error(e);
+ process.exit(1);
+ }
+};
+
+export const prepareAndMigrateSingleStore = async (config: GenerateConfig) => {
+ const outFolder = config.out;
+ const schemaPath = config.schema;
+ const casing = config.casing;
+
+ try {
+ // TODO: remove
+ assertV1OutFolder(outFolder);
+
+ const { snapshots, journal } = prepareMigrationFolder(outFolder, 'singlestore');
+ const { prev, cur, custom } = await prepareSingleStoreMigrationSnapshot(
+ snapshots,
+ schemaPath,
+ casing,
+ );
+
+ const validatedPrev = singlestoreSchema.parse(prev);
+ const validatedCur = singlestoreSchema.parse(cur);
+
+ if (config.custom) {
+ writeResult({
+ cur: custom,
+ sqlStatements: [],
+ journal,
+ outFolder,
+ name: config.name,
+ breakpoints: config.breakpoints,
+ type: 'custom',
+ prefixMode: config.prefix,
+ });
+ return;
+ }
+
+ const squashedPrev = squashSingleStoreScheme(validatedPrev);
+ const squashedCur = squashSingleStoreScheme(validatedCur);
+
+ const { sqlStatements, _meta } = await applySingleStoreSnapshotsDiff(
+ squashedPrev,
+ squashedCur,
+ tablesResolver,
+ columnsResolver,
+ /* singleStoreViewsResolver, */
+ validatedPrev,
+ validatedCur,
+ );
+
+ writeResult({
+ cur,
+ sqlStatements,
+ journal,
+ _meta,
+ outFolder,
+ name: config.name,
+ breakpoints: config.breakpoints,
+ prefixMode: config.prefix,
+ });
+ } catch (e) {
+ console.error(e);
+ }
+};
+
+export const prepareAndExportSinglestore = async (config: ExportConfig) => {
+ const schemaPath = config.schema;
- for (const table of Object.values(curSchema.tables)) {
- for (const column of Object.values(table.columns)) {
- if (column.type === 'serial') {
- if (!usedSuggestions.includes('serial')) {
- suggestions.push(suggestionTypes['serial']);
- }
+ try {
+ const { prev, cur } = await prepareSingleStoreMigrationSnapshot(
+ [],
+ schemaPath,
+ undefined,
+ );
- const uniqueForSerial = Object.values(
- prevSchema.tables[table.name].uniqueConstraints,
- ).find((it) => it.columns[0] === column.name);
+ const validatedPrev = singlestoreSchema.parse(prev);
+ const validatedCur = singlestoreSchema.parse(cur);
- suggestions.push(
- `\n`
- + withStyle.suggestion(
- `We are suggesting to change ${
- chalk.blue(
- column.name,
- )
- } column in ${
- chalk.blueBright(
- table.name,
- )
- } table from serial to bigint unsigned\n\n${
- chalk.blueBright(
- `bigint("${column.name}", { mode: "number", unsigned: true }).notNull().autoincrement().unique(${
- uniqueForSerial?.name ? `"${uniqueForSerial?.name}"` : ''
- })`,
- )
- }`,
- ),
- );
- }
- }
+ const squashedPrev = squashSingleStoreScheme(validatedPrev);
+ const squashedCur = squashSingleStoreScheme(validatedCur);
+
+ const { sqlStatements, _meta } = await applySingleStoreSnapshotsDiff(
+ squashedPrev,
+ squashedCur,
+ tablesResolver,
+ columnsResolver,
+ /* singleStoreViewsResolver, */
+ validatedPrev,
+ validatedCur,
+ );
+
+ console.log(sqlStatements.join('\n'));
+ } catch (e) {
+ console.error(e);
}
+};
- return suggestions;
-}
+export const prepareAndExportMysql = async (config: ExportConfig) => {
+ const schemaPath = config.schema;
-// Intersect with prepareAnMigrate
-export const prepareMySQLPush = async (
- schemaPath: string | string[],
- snapshot: MySqlSchema,
-) => {
try {
- const { prev, cur } = await prepareMySqlDbPushSnapshot(
- snapshot,
+ const { prev, cur, custom } = await prepareMySqlMigrationSnapshot(
+ [],
schemaPath,
+ undefined,
);
const validatedPrev = mysqlSchema.parse(prev);
@@ -316,39 +783,39 @@ export const prepareMySQLPush = async (
const squashedPrev = squashMysqlScheme(validatedPrev);
const squashedCur = squashMysqlScheme(validatedCur);
- const { sqlStatements, statements } = await applyMysqlSnapshotsDiff(
+ const { sqlStatements, statements, _meta } = await applyMysqlSnapshotsDiff(
squashedPrev,
squashedCur,
tablesResolver,
columnsResolver,
+ mySqlViewsResolver,
validatedPrev,
validatedCur,
- 'push',
);
- return { sqlStatements, statements, validatedCur, validatedPrev };
+ console.log(sqlStatements.join('\n'));
} catch (e) {
console.error(e);
- process.exit(1);
}
};
-export const prepareAndMigrateMysql = async (config: GenerateConfig) => {
+export const prepareAndMigrateSqlite = async (config: GenerateConfig) => {
const outFolder = config.out;
const schemaPath = config.schema;
+ const casing = config.casing;
try {
- // TODO: remove
assertV1OutFolder(outFolder);
- const { snapshots, journal } = prepareMigrationFolder(outFolder, 'mysql');
- const { prev, cur, custom } = await prepareMySqlMigrationSnapshot(
+ const { snapshots, journal } = prepareMigrationFolder(outFolder, 'sqlite');
+ const { prev, cur, custom } = await prepareSqliteMigrationSnapshot(
snapshots,
schemaPath,
+ casing,
);
- const validatedPrev = mysqlSchema.parse(prev);
- const validatedCur = mysqlSchema.parse(cur);
+ const validatedPrev = sqliteSchema.parse(prev);
+ const validatedCur = sqliteSchema.parse(cur);
if (config.custom) {
writeResult({
@@ -358,20 +825,22 @@ export const prepareAndMigrateMysql = async (config: GenerateConfig) => {
outFolder,
name: config.name,
breakpoints: config.breakpoints,
+ bundle: config.bundle,
type: 'custom',
prefixMode: config.prefix,
});
return;
}
- const squashedPrev = squashMysqlScheme(validatedPrev);
- const squashedCur = squashMysqlScheme(validatedCur);
+ const squashedPrev = squashSqliteScheme(validatedPrev);
+ const squashedCur = squashSqliteScheme(validatedCur);
- const { sqlStatements, statements, _meta } = await applyMysqlSnapshotsDiff(
+ const { sqlStatements, _meta } = await applySqliteSnapshotsDiff(
squashedPrev,
squashedCur,
tablesResolver,
columnsResolver,
+ sqliteViewsResolver,
validatedPrev,
validatedCur,
);
@@ -384,16 +853,51 @@ export const prepareAndMigrateMysql = async (config: GenerateConfig) => {
outFolder,
name: config.name,
breakpoints: config.breakpoints,
+ bundle: config.bundle,
prefixMode: config.prefix,
+ driver: config.driver,
});
} catch (e) {
console.error(e);
}
};
-export const prepareAndMigrateSqlite = async (config: GenerateConfig) => {
+export const prepareAndExportSqlite = async (config: ExportConfig) => {
+ const schemaPath = config.schema;
+
+ try {
+ const { prev, cur } = await prepareSqliteMigrationSnapshot(
+ [],
+ schemaPath,
+ undefined,
+ );
+
+ const validatedPrev = sqliteSchema.parse(prev);
+ const validatedCur = sqliteSchema.parse(cur);
+
+ const squashedPrev = squashSqliteScheme(validatedPrev);
+ const squashedCur = squashSqliteScheme(validatedCur);
+
+ const { sqlStatements, _meta } = await applySqliteSnapshotsDiff(
+ squashedPrev,
+ squashedCur,
+ tablesResolver,
+ columnsResolver,
+ sqliteViewsResolver,
+ validatedPrev,
+ validatedCur,
+ );
+
+ console.log(sqlStatements.join('\n'));
+ } catch (e) {
+ console.error(e);
+ }
+};
+
+export const prepareAndMigrateLibSQL = async (config: GenerateConfig) => {
const outFolder = config.out;
const schemaPath = config.schema;
+ const casing = config.casing;
try {
assertV1OutFolder(outFolder);
@@ -402,6 +906,7 @@ export const prepareAndMigrateSqlite = async (config: GenerateConfig) => {
const { prev, cur, custom } = await prepareSqliteMigrationSnapshot(
snapshots,
schemaPath,
+ casing,
);
const validatedPrev = sqliteSchema.parse(prev);
@@ -425,11 +930,12 @@ export const prepareAndMigrateSqlite = async (config: GenerateConfig) => {
const squashedPrev = squashSqliteScheme(validatedPrev);
const squashedCur = squashSqliteScheme(validatedCur);
- const { sqlStatements, _meta } = await applySqliteSnapshotsDiff(
+ const { sqlStatements, _meta } = await applyLibSQLSnapshotsDiff(
squashedPrev,
squashedCur,
tablesResolver,
columnsResolver,
+ sqliteViewsResolver,
validatedPrev,
validatedCur,
);
@@ -450,11 +956,44 @@ export const prepareAndMigrateSqlite = async (config: GenerateConfig) => {
}
};
+export const prepareAndExportLibSQL = async (config: ExportConfig) => {
+ const schemaPath = config.schema;
+
+ try {
+ const { prev, cur, custom } = await prepareSqliteMigrationSnapshot(
+ [],
+ schemaPath,
+ undefined,
+ );
+
+ const validatedPrev = sqliteSchema.parse(prev);
+ const validatedCur = sqliteSchema.parse(cur);
+
+ const squashedPrev = squashSqliteScheme(validatedPrev);
+ const squashedCur = squashSqliteScheme(validatedCur);
+
+ const { sqlStatements, _meta } = await applyLibSQLSnapshotsDiff(
+ squashedPrev,
+ squashedCur,
+ tablesResolver,
+ columnsResolver,
+ sqliteViewsResolver,
+ validatedPrev,
+ validatedCur,
+ );
+
+ console.log(sqlStatements.join('\n'));
+ } catch (e) {
+ console.error(e);
+ }
+};
+
export const prepareSQLitePush = async (
schemaPath: string | string[],
snapshot: SQLiteSchema,
+ casing: CasingType | undefined,
) => {
- const { prev, cur } = await prepareSQLiteDbPushSnapshot(snapshot, schemaPath);
+ const { prev, cur } = await prepareSQLiteDbPushSnapshot(snapshot, schemaPath, casing);
const validatedPrev = sqliteSchema.parse(prev);
const validatedCur = sqliteSchema.parse(cur);
@@ -467,6 +1006,40 @@ export const prepareSQLitePush = async (
squashedCur,
tablesResolver,
columnsResolver,
+ sqliteViewsResolver,
+ validatedPrev,
+ validatedCur,
+ 'push',
+ );
+
+ return {
+ sqlStatements,
+ statements,
+ squashedPrev,
+ squashedCur,
+ meta: _meta,
+ };
+};
+
+export const prepareLibSQLPush = async (
+ schemaPath: string | string[],
+ snapshot: SQLiteSchema,
+ casing: CasingType | undefined,
+) => {
+ const { prev, cur } = await prepareSQLiteDbPushSnapshot(snapshot, schemaPath, casing);
+
+ const validatedPrev = sqliteSchema.parse(prev);
+ const validatedCur = sqliteSchema.parse(cur);
+
+ const squashedPrev = squashSqliteScheme(validatedPrev, 'push');
+ const squashedCur = squashSqliteScheme(validatedCur, 'push');
+
+ const { sqlStatements, statements, _meta } = await applyLibSQLSnapshotsDiff(
+ squashedPrev,
+ squashedCur,
+ tablesResolver,
+ columnsResolver,
+ sqliteViewsResolver,
validatedPrev,
validatedCur,
'push',
@@ -557,10 +1130,82 @@ export const promptColumnsConflicts = async (
return result;
};
+export const promptNamedConflict = async (
+ newItems: T[],
+ missingItems: T[],
+ entity: 'role' | 'policy',
+): Promise<{
+ created: T[];
+ renamed: { from: T; to: T }[];
+ deleted: T[];
+}> => {
+ if (missingItems.length === 0 || newItems.length === 0) {
+ return {
+ created: newItems,
+ renamed: [],
+ deleted: missingItems,
+ };
+ }
+
+ const result: {
+ created: T[];
+ renamed: { from: T; to: T }[];
+ deleted: T[];
+ } = { created: [], renamed: [], deleted: [] };
+ let index = 0;
+ let leftMissing = [...missingItems];
+ do {
+ const created = newItems[index];
+ const renames: RenamePropmtItem[] = leftMissing.map((it) => {
+ return { from: it, to: created };
+ });
+
+ const promptData: (RenamePropmtItem | T)[] = [created, ...renames];
+
+ const { status, data } = await render(
+ new ResolveSelectNamed(created, promptData, entity),
+ );
+ if (status === 'aborted') {
+ console.error('ERROR');
+ process.exit(1);
+ }
+
+ if (isRenamePromptItem(data)) {
+ console.log(
+ `${chalk.yellow('~')} ${data.from.name} › ${data.to.name} ${
+ chalk.gray(
+ `${entity} will be renamed/moved`,
+ )
+ }`,
+ );
+
+ if (data.from.name !== data.to.name) {
+ result.renamed.push(data);
+ }
+
+ delete leftMissing[leftMissing.indexOf(data.from)];
+ leftMissing = leftMissing.filter(Boolean);
+ } else {
+ console.log(
+ `${chalk.green('+')} ${data.name} ${
+ chalk.gray(
+ `${entity} will be created`,
+ )
+ }`,
+ );
+ result.created.push(created);
+ }
+ index += 1;
+ } while (index < newItems.length);
+ console.log(chalk.gray(`--- all ${entity} conflicts resolved ---\n`));
+ result.deleted.push(...leftMissing);
+ return result;
+};
+
export const promptNamedWithSchemasConflict = async (
newItems: T[],
missingItems: T[],
- entity: 'table' | 'enum' | 'sequence',
+ entity: 'table' | 'enum' | 'sequence' | 'view',
): Promise<{
created: T[];
renamed: { from: T; to: T }[];
@@ -723,6 +1368,7 @@ export const writeResult = ({
bundle = false,
type = 'none',
prefixMode,
+ driver,
}: {
cur: CommonSchema;
sqlStatements: string[];
@@ -734,6 +1380,7 @@ export const writeResult = ({
name?: string;
bundle?: boolean;
type?: 'introspect' | 'custom' | 'none';
+ driver?: Driver;
}) => {
if (type === 'none') {
console.log(schema(cur));
@@ -776,7 +1423,7 @@ export const writeResult = ({
if (type === 'custom') {
console.log('Prepared empty file for your custom SQL migration!');
- sql = '-- Custom SQL migration file, put you code below! --';
+ sql = '-- Custom SQL migration file, put your code below! --';
}
journal.entries.push({
@@ -791,9 +1438,9 @@ export const writeResult = ({
fs.writeFileSync(`${outFolder}/${tag}.sql`, sql);
- // js file with .sql imports for React Native / Expo
+ // js file with .sql imports for React Native / Expo and Durable Sqlite Objects
if (bundle) {
- const js = embeddedMigrations(journal);
+ const js = embeddedMigrations(journal, driver);
fs.writeFileSync(`${outFolder}/migrations.js`, js);
}
@@ -810,9 +1457,11 @@ export const writeResult = ({
);
};
-export const embeddedMigrations = (journal: Journal) => {
- let content =
- '// This file is required for Expo/React Native SQLite migrations - https://orm.drizzle.team/quick-sqlite/expo\n\n';
+export const embeddedMigrations = (journal: Journal, driver?: Driver) => {
+ let content = driver === 'expo'
+ ? '// This file is required for Expo/React Native SQLite migrations - https://orm.drizzle.team/quick-sqlite/expo\n\n'
+ : '';
+
content += "import journal from './meta/_journal.json';\n";
journal.entries.forEach((entry) => {
content += `import m${entry.idx.toString().padStart(4, '0')} from './${entry.tag}.sql';\n`;
diff --git a/drizzle-kit/src/cli/commands/mysqlUp.ts b/drizzle-kit/src/cli/commands/mysqlUp.ts
index 6c7d2ebe5..8b467090b 100644
--- a/drizzle-kit/src/cli/commands/mysqlUp.ts
+++ b/drizzle-kit/src/cli/commands/mysqlUp.ts
@@ -82,6 +82,7 @@ export const upMySqlHandlerV4toV5 = (obj: MySqlSchemaV4): MySqlSchemaV5 => {
columns: mappedColumns,
compositePrimaryKeys: {},
uniqueConstraints: {},
+ checkConstraint: {},
};
}
diff --git a/drizzle-kit/src/cli/commands/pgIntrospect.ts b/drizzle-kit/src/cli/commands/pgIntrospect.ts
index dbd3ba238..02867fae9 100644
--- a/drizzle-kit/src/cli/commands/pgIntrospect.ts
+++ b/drizzle-kit/src/cli/commands/pgIntrospect.ts
@@ -1,15 +1,18 @@
import { renderWithTask } from 'hanji';
import { Minimatch } from 'minimatch';
import { originUUID } from '../../global';
-import type { PgSchema } from '../../serializer/pgSchema';
+import type { PgSchema, PgSchemaInternal } from '../../serializer/pgSchema';
import { fromDatabase } from '../../serializer/pgSerializer';
import type { DB } from '../../utils';
+import { Entities } from '../validations/cli';
import { ProgressView } from '../views';
export const pgPushIntrospect = async (
db: DB,
filters: string[],
schemaFilters: string[],
+ entities: Entities,
+ tsSchema?: PgSchemaInternal,
) => {
const matchers = filters.map((it) => {
return new Minimatch(it);
@@ -43,7 +46,7 @@ export const pgPushIntrospect = async (
);
const res = await renderWithTask(
progress,
- fromDatabase(db, filter, schemaFilters),
+ fromDatabase(db, filter, schemaFilters, entities, undefined, tsSchema),
);
const schema = { id: originUUID, prevId: '', ...res } as PgSchema;
diff --git a/drizzle-kit/src/cli/commands/pgPushUtils.ts b/drizzle-kit/src/cli/commands/pgPushUtils.ts
index eee0dc954..05322f738 100644
--- a/drizzle-kit/src/cli/commands/pgPushUtils.ts
+++ b/drizzle-kit/src/cli/commands/pgPushUtils.ts
@@ -47,15 +47,9 @@ function tableNameWithSchemaFrom(
renamedSchemas: Record,
renamedTables: Record,
) {
- const newSchemaName = schema
- ? renamedSchemas[schema]
- ? renamedSchemas[schema]
- : schema
- : undefined;
+ const newSchemaName = schema ? (renamedSchemas[schema] ? renamedSchemas[schema] : schema) : undefined;
- const newTableName = renamedTables[
- concatSchemaAndTableName(newSchemaName, tableName)
- ]
+ const newTableName = renamedTables[concatSchemaAndTableName(newSchemaName, tableName)]
? renamedTables[concatSchemaAndTableName(newSchemaName, tableName)]
: tableName;
@@ -71,6 +65,7 @@ export const pgSuggestions = async (db: DB, statements: JsonStatement[]) => {
const columnsToRemove: string[] = [];
const schemasToRemove: string[] = [];
const tablesToTruncate: string[] = [];
+ const matViewsToRemove: string[] = [];
let renamedSchemas: Record = {};
let renamedTables: Record = {};
@@ -79,53 +74,44 @@ export const pgSuggestions = async (db: DB, statements: JsonStatement[]) => {
if (statement.type === 'rename_schema') {
renamedSchemas[statement.to] = statement.from;
} else if (statement.type === 'rename_table') {
- renamedTables[
- concatSchemaAndTableName(statement.toSchema, statement.tableNameTo)
- ] = statement.tableNameFrom;
+ renamedTables[concatSchemaAndTableName(statement.toSchema, statement.tableNameTo)] = statement.tableNameFrom;
} else if (statement.type === 'drop_table') {
const res = await db.query(
`select count(*) as count from ${
- tableNameWithSchemaFrom(
- statement.schema,
- statement.tableName,
- renamedSchemas,
- renamedTables,
- )
+ tableNameWithSchemaFrom(statement.schema, statement.tableName, renamedSchemas, renamedTables)
}`,
);
const count = Number(res[0].count);
if (count > 0) {
- infoToPrint.push(
- `· You're about to delete ${
- chalk.underline(
- statement.tableName,
- )
- } table with ${count} items`,
- );
+ infoToPrint.push(`· You're about to delete ${chalk.underline(statement.tableName)} table with ${count} items`);
// statementsToExecute.push(
// `truncate table ${tableNameWithSchemaFrom(statement)} cascade;`
// );
tablesToRemove.push(statement.tableName);
shouldAskForApprove = true;
}
+ } else if (statement.type === 'drop_view' && statement.materialized) {
+ const res = await db.query(`select count(*) as count from "${statement.schema ?? 'public'}"."${statement.name}"`);
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to delete "${chalk.underline(statement.name)}" materialized view with ${count} items`,
+ );
+
+ matViewsToRemove.push(statement.name);
+ shouldAskForApprove = true;
+ }
} else if (statement.type === 'alter_table_drop_column') {
const res = await db.query(
`select count(*) as count from ${
- tableNameWithSchemaFrom(
- statement.schema,
- statement.tableName,
- renamedSchemas,
- renamedTables,
- )
+ tableNameWithSchemaFrom(statement.schema, statement.tableName, renamedSchemas, renamedTables)
}`,
);
const count = Number(res[0].count);
if (count > 0) {
infoToPrint.push(
`· You're about to delete ${
- chalk.underline(
- statement.columnName,
- )
+ chalk.underline(statement.columnName)
} column in ${statement.tableName} table with ${count} items`,
);
columnsToRemove.push(`${statement.tableName}_${statement.columnName}`);
@@ -137,48 +123,30 @@ export const pgSuggestions = async (db: DB, statements: JsonStatement[]) => {
);
const count = Number(res[0].count);
if (count > 0) {
- infoToPrint.push(
- `· You're about to delete ${
- chalk.underline(
- statement.name,
- )
- } schema with ${count} tables`,
- );
+ infoToPrint.push(`· You're about to delete ${chalk.underline(statement.name)} schema with ${count} tables`);
schemasToRemove.push(statement.name);
shouldAskForApprove = true;
}
} else if (statement.type === 'alter_table_alter_column_set_type') {
const res = await db.query(
`select count(*) as count from ${
- tableNameWithSchemaFrom(
- statement.schema,
- statement.tableName,
- renamedSchemas,
- renamedTables,
- )
+ tableNameWithSchemaFrom(statement.schema, statement.tableName, renamedSchemas, renamedTables)
}`,
);
const count = Number(res[0].count);
if (count > 0) {
infoToPrint.push(
- `· You're about to change ${
- chalk.underline(
- statement.columnName,
- )
- } column type from ${
+ `· You're about to change ${chalk.underline(statement.columnName)} column type from ${
+ chalk.underline(statement.oldDataType)
+ } to ${
chalk.underline(
- statement.oldDataType,
+ statement.newDataType,
)
- } to ${chalk.underline(statement.newDataType)} with ${count} items`,
+ } with ${count} items`,
);
statementsToExecute.push(
`truncate table ${
- tableNameWithSchemaFrom(
- statement.schema,
- statement.tableName,
- renamedSchemas,
- renamedTables,
- )
+ tableNameWithSchemaFrom(statement.schema, statement.tableName, renamedSchemas, renamedTables)
} cascade;`,
);
tablesToTruncate.push(statement.tableName);
@@ -187,21 +155,14 @@ export const pgSuggestions = async (db: DB, statements: JsonStatement[]) => {
} else if (statement.type === 'alter_table_alter_column_drop_pk') {
const res = await db.query(
`select count(*) as count from ${
- tableNameWithSchemaFrom(
- statement.schema,
- statement.tableName,
- renamedSchemas,
- renamedTables,
- )
+ tableNameWithSchemaFrom(statement.schema, statement.tableName, renamedSchemas, renamedTables)
}`,
);
const count = Number(res[0].count);
if (count > 0) {
infoToPrint.push(
`· You're about to change ${
- chalk.underline(
- statement.tableName,
- )
+ chalk.underline(statement.tableName)
} primary key. This statements may fail and you table may left without primary key`,
);
@@ -219,9 +180,7 @@ export const pgSuggestions = async (db: DB, statements: JsonStatement[]) => {
const pkNameResponse = await db.query(
`SELECT constraint_name FROM information_schema.table_constraints
WHERE table_schema = '${
- typeof statement.schema === 'undefined' || statement.schema === ''
- ? 'public'
- : statement.schema
+ typeof statement.schema === 'undefined' || statement.schema === '' ? 'public' : statement.schema
}'
AND table_name = '${statement.tableName}'
AND constraint_type = 'PRIMARY KEY';`,
@@ -233,39 +192,24 @@ export const pgSuggestions = async (db: DB, statements: JsonStatement[]) => {
// we will generate statement for drop pk here and not after all if-else statements
continue;
} else if (statement.type === 'alter_table_add_column') {
- if (
- statement.column.notNull
- && typeof statement.column.default === 'undefined'
- ) {
+ if (statement.column.notNull && typeof statement.column.default === 'undefined') {
const res = await db.query(
`select count(*) as count from ${
- tableNameWithSchemaFrom(
- statement.schema,
- statement.tableName,
- renamedSchemas,
- renamedTables,
- )
+ tableNameWithSchemaFrom(statement.schema, statement.tableName, renamedSchemas, renamedTables)
}`,
);
const count = Number(res[0].count);
if (count > 0) {
infoToPrint.push(
`· You're about to add not-null ${
- chalk.underline(
- statement.column.name,
- )
+ chalk.underline(statement.column.name)
} column without default value, which contains ${count} items`,
);
tablesToTruncate.push(statement.tableName);
statementsToExecute.push(
`truncate table ${
- tableNameWithSchemaFrom(
- statement.schema,
- statement.tableName,
- renamedSchemas,
- renamedTables,
- )
+ tableNameWithSchemaFrom(statement.schema, statement.tableName, renamedSchemas, renamedTables)
} cascade;`,
);
@@ -275,12 +219,7 @@ export const pgSuggestions = async (db: DB, statements: JsonStatement[]) => {
} else if (statement.type === 'create_unique_constraint') {
const res = await db.query(
`select count(*) as count from ${
- tableNameWithSchemaFrom(
- statement.schema,
- statement.tableName,
- renamedSchemas,
- renamedTables,
- )
+ tableNameWithSchemaFrom(statement.schema, statement.tableName, renamedSchemas, renamedTables)
}`,
);
const count = Number(res[0].count);
@@ -298,48 +237,30 @@ export const pgSuggestions = async (db: DB, statements: JsonStatement[]) => {
} table?\n`,
);
const { status, data } = await render(
- new Select([
- 'No, add the constraint without truncating the table',
- `Yes, truncate the table`,
- ]),
+ new Select(['No, add the constraint without truncating the table', `Yes, truncate the table`]),
);
if (data?.index === 1) {
tablesToTruncate.push(statement.tableName);
statementsToExecute.push(
`truncate table ${
- tableNameWithSchemaFrom(
- statement.schema,
- statement.tableName,
- renamedSchemas,
- renamedTables,
- )
+ tableNameWithSchemaFrom(statement.schema, statement.tableName, renamedSchemas, renamedTables)
} cascade;`,
);
shouldAskForApprove = true;
}
}
}
- const stmnt = fromJson([statement], 'postgresql');
+ const stmnt = fromJson([statement], 'postgresql', 'push');
if (typeof stmnt !== 'undefined') {
- if (statement.type === 'drop_table') {
- statementsToExecute.push(
- `DROP TABLE ${
- concatSchemaAndTableName(
- statement.schema,
- statement.tableName,
- )
- } CASCADE;`,
- );
- } else {
- statementsToExecute.push(...stmnt);
- }
+ statementsToExecute.push(...stmnt);
}
}
return {
- statementsToExecute,
+ statementsToExecute: [...new Set(statementsToExecute)],
shouldAskForApprove,
infoToPrint,
+ matViewsToRemove: [...new Set(matViewsToRemove)],
columnsToRemove: [...new Set(columnsToRemove)],
schemasToRemove: [...new Set(schemasToRemove)],
tablesToTruncate: [...new Set(tablesToTruncate)],
diff --git a/drizzle-kit/src/cli/commands/pgUp.ts b/drizzle-kit/src/cli/commands/pgUp.ts
index f3faaeb62..52a2fc4a1 100644
--- a/drizzle-kit/src/cli/commands/pgUp.ts
+++ b/drizzle-kit/src/cli/commands/pgUp.ts
@@ -93,7 +93,7 @@ export const updateUpToV7 = (json: Record): PgSchema => {
return [idx[0], { columns: mappedColumns, with: {}, ...rest }];
}),
);
- return [it[0], { ...table, indexes: mappedIndexes }];
+ return [it[0], { ...table, indexes: mappedIndexes, policies: {}, isRLSEnabled: false, checkConstraints: {} }];
}),
);
@@ -103,6 +103,9 @@ export const updateUpToV7 = (json: Record): PgSchema => {
dialect: 'postgresql',
sequences: {},
tables: tables,
+ policies: {},
+ views: {},
+ roles: {},
};
};
diff --git a/drizzle-kit/src/cli/commands/push.ts b/drizzle-kit/src/cli/commands/push.ts
index e48a5da9e..0c82fe026 100644
--- a/drizzle-kit/src/cli/commands/push.ts
+++ b/drizzle-kit/src/cli/commands/push.ts
@@ -1,13 +1,27 @@
import chalk from 'chalk';
+import { randomUUID } from 'crypto';
import { render } from 'hanji';
+import { serializePg } from 'src/serializer';
import { fromJson } from '../../sqlgenerator';
import { Select } from '../selector-ui';
+import { Entities } from '../validations/cli';
+import { CasingType } from '../validations/common';
+import { LibSQLCredentials } from '../validations/libsql';
import type { MysqlCredentials } from '../validations/mysql';
import { withStyle } from '../validations/outputs';
import type { PostgresCredentials } from '../validations/postgres';
+import { SingleStoreCredentials } from '../validations/singlestore';
import type { SqliteCredentials } from '../validations/sqlite';
-import { filterStatements, logSuggestionsAndReturn } from './mysqlPushUtils';
+import { libSqlLogSuggestionsAndReturn } from './libSqlPushUtils';
+import {
+ filterStatements as mySqlFilterStatements,
+ logSuggestionsAndReturn as mySqlLogSuggestionsAndReturn,
+} from './mysqlPushUtils';
import { pgSuggestions } from './pgPushUtils';
+import {
+ filterStatements as singleStoreFilterStatements,
+ logSuggestionsAndReturn as singleStoreLogSuggestionsAndReturn,
+} from './singlestorePushUtils';
import { logSuggestionsAndReturn as sqliteSuggestions } from './sqlitePushUtils';
export const mysqlPush = async (
@@ -17,6 +31,7 @@ export const mysqlPush = async (
strict: boolean,
verbose: boolean,
force: boolean,
+ casing: CasingType | undefined,
) => {
const { connectToMySQL } = await import('../connections');
const { mysqlPushIntrospect } = await import('./mysqlIntrospect');
@@ -26,9 +41,9 @@ export const mysqlPush = async (
const { schema } = await mysqlPushIntrospect(db, database, tablesFilter);
const { prepareMySQLPush } = await import('./migrate');
- const statements = await prepareMySQLPush(schemaPath, schema);
+ const statements = await prepareMySQLPush(schemaPath, schema, casing);
- const filteredStatements = filterStatements(
+ const filteredStatements = mySqlFilterStatements(
statements.statements ?? [],
statements.validatedCur,
statements.validatedPrev,
@@ -45,8 +60,7 @@ export const mysqlPush = async (
tablesToRemove,
tablesToTruncate,
infoToPrint,
- schemasToRemove,
- } = await logSuggestionsAndReturn(
+ } = await mySqlLogSuggestionsAndReturn(
db,
filteredStatements,
statements.validatedCur,
@@ -69,7 +83,150 @@ export const mysqlPush = async (
if (verbose) {
console.log();
- // console.log(chalk.gray('Verbose logs:'));
+ console.log(
+ withStyle.warning('You are about to execute current statements:'),
+ );
+ console.log();
+ console.log(
+ [...uniqueSqlStatementsToExecute, ...uniqueFilteredSqlStatements]
+ .map((s) => chalk.blue(s))
+ .join('\n'),
+ );
+ console.log();
+ }
+
+ if (!force && strict) {
+ if (!shouldAskForApprove) {
+ const { status, data } = await render(
+ new Select(['No, abort', `Yes, I want to execute all statements`]),
+ );
+ if (data?.index === 0) {
+ render(`[${chalk.red('x')}] All changes were aborted`);
+ process.exit(0);
+ }
+ }
+ }
+
+ if (!force && shouldAskForApprove) {
+ console.log(withStyle.warning('Found data-loss statements:'));
+ console.log(infoToPrint.join('\n'));
+ console.log();
+ console.log(
+ chalk.red.bold(
+ 'THIS ACTION WILL CAUSE DATA LOSS AND CANNOT BE REVERTED\n',
+ ),
+ );
+
+ console.log(chalk.white('Do you still want to push changes?'));
+
+ const { status, data } = await render(
+ new Select([
+ 'No, abort',
+ `Yes, I want to${
+ tablesToRemove.length > 0
+ ? ` remove ${tablesToRemove.length} ${tablesToRemove.length > 1 ? 'tables' : 'table'},`
+ : ' '
+ }${
+ columnsToRemove.length > 0
+ ? ` remove ${columnsToRemove.length} ${columnsToRemove.length > 1 ? 'columns' : 'column'},`
+ : ' '
+ }${
+ tablesToTruncate.length > 0
+ ? ` truncate ${tablesToTruncate.length} ${tablesToTruncate.length > 1 ? 'tables' : 'table'}`
+ : ''
+ }`
+ .replace(/(^,)|(,$)/g, '')
+ .replace(/ +(?= )/g, ''),
+ ]),
+ );
+ if (data?.index === 0) {
+ render(`[${chalk.red('x')}] All changes were aborted`);
+ process.exit(0);
+ }
+ }
+
+ for (const dStmnt of uniqueSqlStatementsToExecute) {
+ await db.query(dStmnt);
+ }
+
+ for (const statement of uniqueFilteredSqlStatements) {
+ await db.query(statement);
+ }
+ if (filteredStatements.length > 0) {
+ render(`[${chalk.green('✓')}] Changes applied`);
+ } else {
+ render(`[${chalk.blue('i')}] No changes detected`);
+ }
+ }
+ } catch (e) {
+ console.log(e);
+ }
+};
+
+export const singlestorePush = async (
+ schemaPath: string | string[],
+ credentials: SingleStoreCredentials,
+ tablesFilter: string[],
+ strict: boolean,
+ verbose: boolean,
+ force: boolean,
+ casing: CasingType | undefined,
+) => {
+ const { connectToSingleStore } = await import('../connections');
+ const { singlestorePushIntrospect } = await import('./singlestoreIntrospect');
+
+ const { db, database } = await connectToSingleStore(credentials);
+
+ const { schema } = await singlestorePushIntrospect(
+ db,
+ database,
+ tablesFilter,
+ );
+ const { prepareSingleStorePush } = await import('./migrate');
+
+ const statements = await prepareSingleStorePush(schemaPath, schema, casing);
+
+ const filteredStatements = singleStoreFilterStatements(
+ statements.statements ?? [],
+ statements.validatedCur,
+ statements.validatedPrev,
+ );
+
+ try {
+ if (filteredStatements.length === 0) {
+ render(`[${chalk.blue('i')}] No changes detected`);
+ } else {
+ const {
+ shouldAskForApprove,
+ statementsToExecute,
+ columnsToRemove,
+ tablesToRemove,
+ tablesToTruncate,
+ infoToPrint,
+ schemasToRemove,
+ } = await singleStoreLogSuggestionsAndReturn(
+ db,
+ filteredStatements,
+ statements.validatedCur,
+ );
+
+ const filteredSqlStatements = fromJson(filteredStatements, 'singlestore');
+
+ const uniqueSqlStatementsToExecute: string[] = [];
+ statementsToExecute.forEach((ss) => {
+ if (!uniqueSqlStatementsToExecute.includes(ss)) {
+ uniqueSqlStatementsToExecute.push(ss);
+ }
+ });
+ const uniqueFilteredSqlStatements: string[] = [];
+ filteredSqlStatements.forEach((ss) => {
+ if (!uniqueFilteredSqlStatements.includes(ss)) {
+ uniqueFilteredSqlStatements.push(ss);
+ }
+ });
+
+ if (verbose) {
+ console.log();
console.log(
withStyle.warning('You are about to execute current statements:'),
);
@@ -157,17 +314,24 @@ export const pgPush = async (
credentials: PostgresCredentials,
tablesFilter: string[],
schemasFilter: string[],
+ entities: Entities,
force: boolean,
+ casing: CasingType | undefined,
) => {
const { preparePostgresDB } = await import('../connections');
const { pgPushIntrospect } = await import('./pgIntrospect');
const db = await preparePostgresDB(credentials);
- const { schema } = await pgPushIntrospect(db, tablesFilter, schemasFilter);
+ const serialized = await serializePg(schemaPath, casing, schemasFilter);
+
+ const { schema } = await pgPushIntrospect(db, tablesFilter, schemasFilter, entities, serialized);
const { preparePgPush } = await import('./migrate');
- const statements = await preparePgPush(schemaPath, schema, schemasFilter);
+ const statements = await preparePgPush(
+ { id: randomUUID(), prevId: schema.id, ...serialized },
+ schema,
+ );
try {
if (statements.sqlStatements.length === 0) {
@@ -179,6 +343,7 @@ export const pgPush = async (
statementsToExecute,
columnsToRemove,
tablesToRemove,
+ matViewsToRemove,
tablesToTruncate,
infoToPrint,
schemasToRemove,
@@ -234,6 +399,12 @@ export const pgPush = async (
tablesToTruncate.length > 0
? ` truncate ${tablesToTruncate.length} ${tablesToTruncate.length > 1 ? 'tables' : 'table'}`
: ''
+ }${
+ matViewsToRemove.length > 0
+ ? ` remove ${matViewsToRemove.length} ${
+ matViewsToRemove.length > 1 ? 'materialized views' : 'materialize view'
+ },`
+ : ' '
}`
.replace(/(^,)|(,$)/g, '')
.replace(/ +(?= )/g, ''),
@@ -267,6 +438,7 @@ export const sqlitePush = async (
credentials: SqliteCredentials,
tablesFilter: string[],
force: boolean,
+ casing: CasingType | undefined,
) => {
const { connectToSQLite } = await import('../connections');
const { sqlitePushIntrospect } = await import('./sqliteIntrospect');
@@ -275,7 +447,7 @@ export const sqlitePush = async (
const { schema } = await sqlitePushIntrospect(db, tablesFilter);
const { prepareSQLitePush } = await import('./migrate');
- const statements = await prepareSQLitePush(schemaPath, schema);
+ const statements = await prepareSQLitePush(schemaPath, schema, casing);
if (statements.sqlStatements.length === 0) {
render(`\n[${chalk.blue('i')}] No changes detected`);
@@ -291,8 +463,8 @@ export const sqlitePush = async (
} = await sqliteSuggestions(
db,
statements.statements,
- statements.squashedCur,
statements.squashedPrev,
+ statements.squashedCur,
statements.meta!,
);
@@ -361,21 +533,126 @@ export const sqlitePush = async (
render(`\n[${chalk.blue('i')}] No changes detected`);
} else {
if (!('driver' in credentials)) {
- await db.query('begin');
+ await db.run('begin');
try {
for (const dStmnt of statementsToExecute) {
- await db.query(dStmnt);
+ await db.run(dStmnt);
}
- await db.query('commit');
+ await db.run('commit');
} catch (e) {
console.error(e);
- await db.query('rollback');
+ await db.run('rollback');
process.exit(1);
}
- } else if (credentials.driver === 'turso') {
- await db.batch!(statementsToExecute.map((it) => ({ query: it })));
}
render(`[${chalk.green('✓')}] Changes applied`);
}
}
};
+
+export const libSQLPush = async (
+ schemaPath: string | string[],
+ verbose: boolean,
+ strict: boolean,
+ credentials: LibSQLCredentials,
+ tablesFilter: string[],
+ force: boolean,
+ casing: CasingType | undefined,
+) => {
+ const { connectToLibSQL } = await import('../connections');
+ const { sqlitePushIntrospect } = await import('./sqliteIntrospect');
+
+ const db = await connectToLibSQL(credentials);
+ const { schema } = await sqlitePushIntrospect(db, tablesFilter);
+
+ const { prepareLibSQLPush } = await import('./migrate');
+
+ const statements = await prepareLibSQLPush(schemaPath, schema, casing);
+
+ if (statements.sqlStatements.length === 0) {
+ render(`\n[${chalk.blue('i')}] No changes detected`);
+ } else {
+ const {
+ shouldAskForApprove,
+ statementsToExecute,
+ columnsToRemove,
+ tablesToRemove,
+ tablesToTruncate,
+ infoToPrint,
+ } = await libSqlLogSuggestionsAndReturn(
+ db,
+ statements.statements,
+ statements.squashedPrev,
+ statements.squashedCur,
+ statements.meta!,
+ );
+
+ if (verbose && statementsToExecute.length > 0) {
+ console.log();
+ console.log(
+ withStyle.warning('You are about to execute current statements:'),
+ );
+ console.log();
+ console.log(statementsToExecute.map((s) => chalk.blue(s)).join('\n'));
+ console.log();
+ }
+
+ if (!force && strict) {
+ if (!shouldAskForApprove) {
+ const { status, data } = await render(
+ new Select(['No, abort', `Yes, I want to execute all statements`]),
+ );
+ if (data?.index === 0) {
+ render(`[${chalk.red('x')}] All changes were aborted`);
+ process.exit(0);
+ }
+ }
+ }
+
+ if (!force && shouldAskForApprove) {
+ console.log(withStyle.warning('Found data-loss statements:'));
+ console.log(infoToPrint.join('\n'));
+ console.log();
+ console.log(
+ chalk.red.bold(
+ 'THIS ACTION WILL CAUSE DATA LOSS AND CANNOT BE REVERTED\n',
+ ),
+ );
+
+ console.log(chalk.white('Do you still want to push changes?'));
+
+ const { status, data } = await render(
+ new Select([
+ 'No, abort',
+ `Yes, I want to${
+ tablesToRemove.length > 0
+ ? ` remove ${tablesToRemove.length} ${tablesToRemove.length > 1 ? 'tables' : 'table'},`
+ : ' '
+ }${
+ columnsToRemove.length > 0
+ ? ` remove ${columnsToRemove.length} ${columnsToRemove.length > 1 ? 'columns' : 'column'},`
+ : ' '
+ }${
+ tablesToTruncate.length > 0
+ ? ` truncate ${tablesToTruncate.length} ${tablesToTruncate.length > 1 ? 'tables' : 'table'}`
+ : ''
+ }`
+ .trimEnd()
+ .replace(/(^,)|(,$)/g, '')
+ .replace(/ +(?= )/g, ''),
+ ]),
+ );
+ if (data?.index === 0) {
+ render(`[${chalk.red('x')}] All changes were aborted`);
+ process.exit(0);
+ }
+ }
+
+ if (statementsToExecute.length === 0) {
+ render(`\n[${chalk.blue('i')}] No changes detected`);
+ } else {
+ await db.batchWithPragma!(statementsToExecute);
+ render(`[${chalk.green('✓')}] Changes applied`);
+ }
+ }
+};
diff --git a/drizzle-kit/src/cli/commands/singlestoreIntrospect.ts b/drizzle-kit/src/cli/commands/singlestoreIntrospect.ts
new file mode 100644
index 000000000..27d8c59c5
--- /dev/null
+++ b/drizzle-kit/src/cli/commands/singlestoreIntrospect.ts
@@ -0,0 +1,53 @@
+import { renderWithTask } from 'hanji';
+import { Minimatch } from 'minimatch';
+import { originUUID } from '../../global';
+import type { SingleStoreSchema } from '../../serializer/singlestoreSchema';
+import { fromDatabase } from '../../serializer/singlestoreSerializer';
+import type { DB } from '../../utils';
+import { ProgressView } from '../views';
+
+export const singlestorePushIntrospect = async (
+ db: DB,
+ databaseName: string,
+ filters: string[],
+) => {
+ const matchers = filters.map((it) => {
+ return new Minimatch(it);
+ });
+
+ const filter = (tableName: string) => {
+ if (matchers.length === 0) return true;
+
+ let flags: boolean[] = [];
+
+ for (let matcher of matchers) {
+ if (matcher.negate) {
+ if (!matcher.match(tableName)) {
+ flags.push(false);
+ }
+ }
+
+ if (matcher.match(tableName)) {
+ flags.push(true);
+ }
+ }
+
+ if (flags.length > 0) {
+ return flags.every(Boolean);
+ }
+ return false;
+ };
+
+ const progress = new ProgressView(
+ 'Pulling schema from database...',
+ 'Pulling schema from database...',
+ );
+ const res = await renderWithTask(
+ progress,
+ fromDatabase(db, databaseName, filter),
+ );
+
+ const schema = { id: originUUID, prevId: '', ...res } as SingleStoreSchema;
+ const { internal, ...schemaWithoutInternals } = schema;
+ return { schema: schemaWithoutInternals };
+};
diff --git a/drizzle-kit/src/cli/commands/singlestorePushUtils.ts b/drizzle-kit/src/cli/commands/singlestorePushUtils.ts
new file mode 100644
index 000000000..80fad9b2d
--- /dev/null
+++ b/drizzle-kit/src/cli/commands/singlestorePushUtils.ts
@@ -0,0 +1,352 @@
+import chalk from 'chalk';
+import { render } from 'hanji';
+import { TypeOf } from 'zod';
+import { JsonAlterColumnTypeStatement, JsonStatement } from '../../jsonStatements';
+import { singlestoreSchema, SingleStoreSquasher } from '../../serializer/singlestoreSchema';
+import type { DB } from '../../utils';
+import { Select } from '../selector-ui';
+import { withStyle } from '../validations/outputs';
+
+export const filterStatements = (
+ statements: JsonStatement[],
+ currentSchema: TypeOf,
+ prevSchema: TypeOf,
+) => {
+ return statements.filter((statement) => {
+ if (statement.type === 'alter_table_alter_column_set_type') {
+ // Don't need to handle it on migrations step and introspection
+ // but for both it should be skipped
+ if (
+ statement.oldDataType.startsWith('tinyint')
+ && statement.newDataType.startsWith('boolean')
+ ) {
+ return false;
+ }
+
+ if (
+ statement.oldDataType.startsWith('bigint unsigned')
+ && statement.newDataType.startsWith('serial')
+ ) {
+ return false;
+ }
+
+ if (
+ statement.oldDataType.startsWith('serial')
+ && statement.newDataType.startsWith('bigint unsigned')
+ ) {
+ return false;
+ }
+ } else if (statement.type === 'alter_table_alter_column_set_default') {
+ if (
+ statement.newDefaultValue === false
+ && statement.oldDefaultValue === 0
+ && statement.newDataType === 'boolean'
+ ) {
+ return false;
+ }
+ if (
+ statement.newDefaultValue === true
+ && statement.oldDefaultValue === 1
+ && statement.newDataType === 'boolean'
+ ) {
+ return false;
+ }
+ } else if (statement.type === 'delete_unique_constraint') {
+ const unsquashed = SingleStoreSquasher.unsquashUnique(statement.data);
+ // only if constraint was removed from a serial column, than treat it as removed
+ // const serialStatement = statements.find(
+ // (it) => it.type === "alter_table_alter_column_set_type"
+ // ) as JsonAlterColumnTypeStatement;
+ // if (
+ // serialStatement?.oldDataType.startsWith("bigint unsigned") &&
+ // serialStatement?.newDataType.startsWith("serial") &&
+ // serialStatement.columnName ===
+ // SingleStoreSquasher.unsquashUnique(statement.data).columns[0]
+ // ) {
+ // return false;
+ // }
+ // Check if uniqueindex was only on this column, that is serial
+
+ // if now serial and was not serial and was unique index
+ if (
+ unsquashed.columns.length === 1
+ && currentSchema.tables[statement.tableName].columns[unsquashed.columns[0]]
+ .type === 'serial'
+ && prevSchema.tables[statement.tableName].columns[unsquashed.columns[0]]
+ .type === 'serial'
+ && currentSchema.tables[statement.tableName].columns[unsquashed.columns[0]]
+ .name === unsquashed.columns[0]
+ ) {
+ return false;
+ }
+ } else if (statement.type === 'alter_table_alter_column_drop_notnull') {
+ // only if constraint was removed from a serial column, than treat it as removed
+ const serialStatement = statements.find(
+ (it) => it.type === 'alter_table_alter_column_set_type',
+ ) as JsonAlterColumnTypeStatement;
+ if (
+ serialStatement?.oldDataType.startsWith('bigint unsigned')
+ && serialStatement?.newDataType.startsWith('serial')
+ && serialStatement.columnName === statement.columnName
+ && serialStatement.tableName === statement.tableName
+ ) {
+ return false;
+ }
+ if (statement.newDataType === 'serial' && !statement.columnNotNull) {
+ return false;
+ }
+ if (statement.columnAutoIncrement) {
+ return false;
+ }
+ }
+
+ return true;
+ });
+};
+
+export const logSuggestionsAndReturn = async (
+ db: DB,
+ statements: JsonStatement[],
+ json2: TypeOf,
+) => {
+ let shouldAskForApprove = false;
+ const statementsToExecute: string[] = [];
+ const infoToPrint: string[] = [];
+
+ const tablesToRemove: string[] = [];
+ const columnsToRemove: string[] = [];
+ const schemasToRemove: string[] = [];
+ const tablesToTruncate: string[] = [];
+
+ for (const statement of statements) {
+ if (statement.type === 'drop_table') {
+ const res = await db.query(
+ `select count(*) as count from \`${statement.tableName}\``,
+ );
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to delete ${
+ chalk.underline(
+ statement.tableName,
+ )
+ } table with ${count} items`,
+ );
+ tablesToRemove.push(statement.tableName);
+ shouldAskForApprove = true;
+ }
+ } else if (statement.type === 'alter_table_drop_column') {
+ const res = await db.query(
+ `select count(*) as count from \`${statement.tableName}\``,
+ );
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to delete ${
+ chalk.underline(
+ statement.columnName,
+ )
+ } column in ${statement.tableName} table with ${count} items`,
+ );
+ columnsToRemove.push(`${statement.tableName}_${statement.columnName}`);
+ shouldAskForApprove = true;
+ }
+ } else if (statement.type === 'drop_schema') {
+ const res = await db.query(
+ `select count(*) as count from information_schema.tables where table_schema = \`${statement.name}\`;`,
+ );
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to delete ${
+ chalk.underline(
+ statement.name,
+ )
+ } schema with ${count} tables`,
+ );
+ schemasToRemove.push(statement.name);
+ shouldAskForApprove = true;
+ }
+ } else if (statement.type === 'alter_table_alter_column_set_type') {
+ const res = await db.query(
+ `select count(*) as count from \`${statement.tableName}\``,
+ );
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to change ${
+ chalk.underline(
+ statement.columnName,
+ )
+ } column type from ${
+ chalk.underline(
+ statement.oldDataType,
+ )
+ } to ${chalk.underline(statement.newDataType)} with ${count} items`,
+ );
+ statementsToExecute.push(`truncate table ${statement.tableName};`);
+ tablesToTruncate.push(statement.tableName);
+ shouldAskForApprove = true;
+ }
+ } else if (statement.type === 'alter_table_alter_column_drop_default') {
+ if (statement.columnNotNull) {
+ const res = await db.query(
+ `select count(*) as count from \`${statement.tableName}\``,
+ );
+
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to remove default value from ${
+ chalk.underline(
+ statement.columnName,
+ )
+ } not-null column with ${count} items`,
+ );
+
+ tablesToTruncate.push(statement.tableName);
+ statementsToExecute.push(`truncate table ${statement.tableName};`);
+
+ shouldAskForApprove = true;
+ }
+ }
+ // shouldAskForApprove = true;
+ } else if (statement.type === 'alter_table_alter_column_set_notnull') {
+ if (typeof statement.columnDefault === 'undefined') {
+ const res = await db.query(
+ `select count(*) as count from \`${statement.tableName}\``,
+ );
+
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to set not-null constraint to ${
+ chalk.underline(
+ statement.columnName,
+ )
+ } column without default, which contains ${count} items`,
+ );
+
+ tablesToTruncate.push(statement.tableName);
+ statementsToExecute.push(`truncate table ${statement.tableName};`);
+
+ shouldAskForApprove = true;
+ }
+ }
+ } else if (statement.type === 'alter_table_alter_column_drop_pk') {
+ const res = await db.query(
+ `select count(*) as count from \`${statement.tableName}\``,
+ );
+
+ // if drop pk and json2 has autoincrement in table -> exit process with error
+ if (
+ Object.values(json2.tables[statement.tableName].columns).filter(
+ (column) => column.autoincrement,
+ ).length > 0
+ ) {
+ console.log(
+ `${
+ withStyle.errorWarning(
+ `You have removed the primary key from a ${statement.tableName} table without removing the auto-increment property from this table. As the database error states: 'there can be only one auto column, and it must be defined as a key. Make sure to remove autoincrement from ${statement.tableName} table`,
+ )
+ }`,
+ );
+ process.exit(1);
+ }
+
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to change ${
+ chalk.underline(
+ statement.tableName,
+ )
+ } primary key. This statements may fail and you table may left without primary key`,
+ );
+
+ tablesToTruncate.push(statement.tableName);
+ shouldAskForApprove = true;
+ }
+ } else if (statement.type === 'delete_composite_pk') {
+ // if drop pk and json2 has autoincrement in table -> exit process with error
+ if (
+ Object.values(json2.tables[statement.tableName].columns).filter(
+ (column) => column.autoincrement,
+ ).length > 0
+ ) {
+ console.log(
+ `${
+ withStyle.errorWarning(
+ `You have removed the primary key from a ${statement.tableName} table without removing the auto-increment property from this table. As the database error states: 'there can be only one auto column, and it must be defined as a key. Make sure to remove autoincrement from ${statement.tableName} table`,
+ )
+ }`,
+ );
+ process.exit(1);
+ }
+ } else if (statement.type === 'alter_table_add_column') {
+ if (
+ statement.column.notNull
+ && typeof statement.column.default === 'undefined'
+ ) {
+ const res = await db.query(
+ `select count(*) as count from \`${statement.tableName}\``,
+ );
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to add not-null ${
+ chalk.underline(
+ statement.column.name,
+ )
+ } column without default value, which contains ${count} items`,
+ );
+
+ tablesToTruncate.push(statement.tableName);
+ statementsToExecute.push(`truncate table ${statement.tableName};`);
+
+ shouldAskForApprove = true;
+ }
+ }
+ } else if (statement.type === 'create_unique_constraint') {
+ const res = await db.query(
+ `select count(*) as count from \`${statement.tableName}\``,
+ );
+ const count = Number(res[0].count);
+ if (count > 0) {
+ const unsquashedUnique = SingleStoreSquasher.unsquashUnique(statement.data);
+ console.log(
+ `· You're about to add ${
+ chalk.underline(
+ unsquashedUnique.name,
+ )
+ } unique constraint to the table, which contains ${count} items. If this statement fails, you will receive an error from the database. Do you want to truncate ${
+ chalk.underline(
+ statement.tableName,
+ )
+ } table?\n`,
+ );
+ const { status, data } = await render(
+ new Select([
+ 'No, add the constraint without truncating the table',
+ `Yes, truncate the table`,
+ ]),
+ );
+ if (data?.index === 1) {
+ tablesToTruncate.push(statement.tableName);
+ statementsToExecute.push(`truncate table ${statement.tableName};`);
+ shouldAskForApprove = true;
+ }
+ }
+ }
+ }
+
+ return {
+ statementsToExecute,
+ shouldAskForApprove,
+ infoToPrint,
+ columnsToRemove: [...new Set(columnsToRemove)],
+ schemasToRemove: [...new Set(schemasToRemove)],
+ tablesToTruncate: [...new Set(tablesToTruncate)],
+ tablesToRemove: [...new Set(tablesToRemove)],
+ };
+};
diff --git a/drizzle-kit/src/cli/commands/singlestoreUp.ts b/drizzle-kit/src/cli/commands/singlestoreUp.ts
new file mode 100644
index 000000000..dc5004ed0
--- /dev/null
+++ b/drizzle-kit/src/cli/commands/singlestoreUp.ts
@@ -0,0 +1 @@
+export const upSinglestoreHandler = (out: string) => {};
diff --git a/drizzle-kit/src/cli/commands/sqlitePushUtils.ts b/drizzle-kit/src/cli/commands/sqlitePushUtils.ts
index 451f035a7..a18b36945 100644
--- a/drizzle-kit/src/cli/commands/sqlitePushUtils.ts
+++ b/drizzle-kit/src/cli/commands/sqlitePushUtils.ts
@@ -10,7 +10,7 @@ import {
} from '../../sqlgenerator';
import type { JsonStatement } from '../../jsonStatements';
-import type { DB, SQLiteDB } from '../../utils';
+import { findAddedAndRemoved, type SQLiteDB } from '../../utils';
export const _moveDataStatements = (
tableName: string,
@@ -19,16 +19,7 @@ export const _moveDataStatements = (
) => {
const statements: string[] = [];
- // rename table to __old_${tablename}
- statements.push(
- new SqliteRenameTableConvertor().convert({
- type: 'rename_table',
- tableNameFrom: tableName,
- tableNameTo: `__old_push_${tableName}`,
- fromSchema: '',
- toSchema: '',
- }),
- );
+ const newTableName = `__new_${tableName}`;
// create table statement from a new json2 with proper name
const tableColumns = Object.values(json.tables[tableName].columns);
@@ -36,34 +27,63 @@ export const _moveDataStatements = (
const compositePKs = Object.values(
json.tables[tableName].compositePrimaryKeys,
).map((it) => SQLiteSquasher.unsquashPK(it));
+ const checkConstraints = Object.values(json.tables[tableName].checkConstraints);
+
+ const mappedCheckConstraints: string[] = checkConstraints.map((it) =>
+ it.replaceAll(`"${tableName}".`, `"${newTableName}".`)
+ .replaceAll(`\`${tableName}\`.`, `\`${newTableName}\`.`)
+ .replaceAll(`${tableName}.`, `${newTableName}.`)
+ .replaceAll(`'${tableName}'.`, `\`${newTableName}\`.`)
+ );
const fks = referenceData.map((it) => SQLiteSquasher.unsquashPushFK(it));
+ // create new table
statements.push(
new SQLiteCreateTableConvertor().convert({
type: 'sqlite_create_table',
- tableName: tableName,
+ tableName: newTableName,
columns: tableColumns,
referenceData: fks,
compositePKs,
+ checkConstraints: mappedCheckConstraints,
}),
);
// move data
if (!dataLoss) {
+ const columns = Object.keys(json.tables[tableName].columns).map(
+ (c) => `"${c}"`,
+ );
+
statements.push(
- `INSERT INTO "${tableName}" SELECT * FROM "__old_push_${tableName}";`,
+ `INSERT INTO \`${newTableName}\`(${
+ columns.join(
+ ', ',
+ )
+ }) SELECT ${columns.join(', ')} FROM \`${tableName}\`;`,
);
}
- // drop table with name __old_${tablename}
+
statements.push(
new SQLiteDropTableConvertor().convert({
type: 'drop_table',
- tableName: `__old_push_${tableName}`,
+ tableName: tableName,
schema: '',
}),
);
+ // rename table
+ statements.push(
+ new SqliteRenameTableConvertor().convert({
+ fromSchema: '',
+ tableNameFrom: newTableName,
+ tableNameTo: tableName,
+ toSchema: '',
+ type: 'rename_table',
+ }),
+ );
+
for (const idx of Object.values(json.tables[tableName].indexes)) {
statements.push(
new CreateSqliteIndexConvertor().convert({
@@ -120,8 +140,6 @@ export const logSuggestionsAndReturn = async (
const schemasToRemove: string[] = [];
const tablesToTruncate: string[] = [];
- const tablesContext: Record = {};
-
for (const statement of statements) {
if (statement.type === 'drop_table') {
const res = await connection.query<{ count: string }>(
@@ -139,248 +157,159 @@ export const logSuggestionsAndReturn = async (
tablesToRemove.push(statement.tableName);
shouldAskForApprove = true;
}
- const stmnt = fromJson([statement], 'sqlite')[0];
- statementsToExecute.push(stmnt);
- } else if (statement.type === 'alter_table_drop_column') {
- const newTableName = getOldTableName(statement.tableName, meta);
-
- const columnIsPartOfPk = Object.values(
- json1.tables[newTableName].compositePrimaryKeys,
- ).find((c) => SQLiteSquasher.unsquashPK(c).includes(statement.columnName));
- const columnIsPartOfIndex = Object.values(
- json1.tables[newTableName].indexes,
- ).find((c) => SQLiteSquasher.unsquashIdx(c).columns.includes(statement.columnName));
-
- const columnIsPk = json1.tables[newTableName].columns[statement.columnName].primaryKey;
-
- const columnIsPartOfFk = Object.values(
- json1.tables[newTableName].foreignKeys,
- ).find((t) =>
- SQLiteSquasher.unsquashPushFK(t).columnsFrom.includes(
- statement.columnName,
- )
+ const fromJsonStatement = fromJson([statement], 'sqlite', 'push');
+ statementsToExecute.push(
+ ...(Array.isArray(fromJsonStatement) ? fromJsonStatement : [fromJsonStatement]),
);
+ } else if (statement.type === 'alter_table_drop_column') {
+ const tableName = statement.tableName;
+ const columnName = statement.columnName;
const res = await connection.query<{ count: string }>(
- `select count(*) as count from \`${newTableName}\``,
+ `select count(\`${tableName}\`.\`${columnName}\`) as count from \`${tableName}\``,
);
const count = Number(res[0].count);
if (count > 0) {
infoToPrint.push(
`· You're about to delete ${
chalk.underline(
- statement.columnName,
+ columnName,
)
- } column in ${newTableName} table with ${count} items`,
+ } column in ${tableName} table with ${count} items`,
);
- columnsToRemove.push(`${newTableName}_${statement.columnName}`);
+ columnsToRemove.push(`${tableName}_${statement.columnName}`);
shouldAskForApprove = true;
}
- if (
- columnIsPk
- || columnIsPartOfPk
- || columnIsPartOfIndex
- || columnIsPartOfFk
- ) {
- tablesContext[newTableName] = [
- ..._moveDataStatements(statement.tableName, json2, true),
- ];
- // check table that have fk to this table
-
- const tablesReferncingCurrent: string[] = [];
-
- for (const table of Object.values(json1.tables)) {
- const tablesRefs = Object.values(json1.tables[table.name].foreignKeys)
- .filter(
- (t) => SQLiteSquasher.unsquashPushFK(t).tableTo === newTableName,
+ const fromJsonStatement = fromJson([statement], 'sqlite', 'push');
+ statementsToExecute.push(
+ ...(Array.isArray(fromJsonStatement) ? fromJsonStatement : [fromJsonStatement]),
+ );
+ } else if (
+ statement.type === 'sqlite_alter_table_add_column'
+ && (statement.column.notNull && !statement.column.default)
+ ) {
+ const tableName = statement.tableName;
+ const columnName = statement.column.name;
+ const res = await connection.query<{ count: string }>(
+ `select count(*) as count from \`${tableName}\``,
+ );
+ const count = Number(res[0].count);
+ if (count > 0) {
+ infoToPrint.push(
+ `· You're about to add not-null ${
+ chalk.underline(
+ columnName,
)
- .map((t) => SQLiteSquasher.unsquashPushFK(t).tableFrom);
-
- tablesReferncingCurrent.push(...tablesRefs);
- }
-
- const uniqueTableRefs = [...new Set(tablesReferncingCurrent)];
-
- for (const table of uniqueTableRefs) {
- if (typeof tablesContext[table] === 'undefined') {
- tablesContext[table] = [..._moveDataStatements(table, json2)];
- }
- }
- } else {
- if (typeof tablesContext[newTableName] === 'undefined') {
- const stmnt = fromJson([statement], 'sqlite')[0];
- statementsToExecute.push(stmnt);
- }
- }
- } else if (statement.type === 'sqlite_alter_table_add_column') {
- const newTableName = getOldTableName(statement.tableName, meta);
- if (statement.column.notNull && !statement.column.default) {
- const res = await connection.query<{ count: string }>(
- `select count(*) as count from \`${newTableName}\``,
+ } column without default value, which contains ${count} items`,
);
- const count = Number(res[0].count);
- if (count > 0) {
- infoToPrint.push(
- `· You're about to add not-null ${
- chalk.underline(
- statement.column.name,
- )
- } column without default value, which contains ${count} items`,
- );
- tablesToTruncate.push(newTableName);
- statementsToExecute.push(`delete from ${newTableName};`);
+ tablesToTruncate.push(tableName);
+ statementsToExecute.push(`delete from ${tableName};`);
- shouldAskForApprove = true;
- }
+ shouldAskForApprove = true;
}
- if (statement.column.primaryKey) {
- tablesContext[newTableName] = [
- ..._moveDataStatements(statement.tableName, json2, true),
- ];
- const tablesReferncingCurrent: string[] = [];
-
- for (const table of Object.values(json1.tables)) {
- const tablesRefs = Object.values(json1.tables[table.name].foreignKeys)
- .filter(
- (t) => SQLiteSquasher.unsquashPushFK(t).tableTo === newTableName,
- )
- .map((t) => SQLiteSquasher.unsquashPushFK(t).tableFrom);
- tablesReferncingCurrent.push(...tablesRefs);
- }
+ const fromJsonStatement = fromJson([statement], 'sqlite', 'push');
+ statementsToExecute.push(
+ ...(Array.isArray(fromJsonStatement) ? fromJsonStatement : [fromJsonStatement]),
+ );
+ } else if (statement.type === 'recreate_table') {
+ const tableName = statement.tableName;
+ const oldTableName = getOldTableName(tableName, meta);
- const uniqueTableRefs = [...new Set(tablesReferncingCurrent)];
+ let dataLoss = false;
- for (const table of uniqueTableRefs) {
- if (typeof tablesContext[table] === 'undefined') {
- tablesContext[table] = [..._moveDataStatements(table, json2)];
- }
- }
- } else {
- if (typeof tablesContext[newTableName] === 'undefined') {
- const stmnt = fromJson([statement], 'sqlite')[0];
- statementsToExecute.push(stmnt);
- }
- }
- } else if (
- statement.type === 'alter_table_alter_column_set_type'
- || statement.type === 'alter_table_alter_column_set_default'
- || statement.type === 'alter_table_alter_column_drop_default'
- || statement.type === 'alter_table_alter_column_set_notnull'
- || statement.type === 'alter_table_alter_column_drop_notnull'
- || statement.type === 'alter_table_alter_column_drop_autoincrement'
- || statement.type === 'alter_table_alter_column_set_autoincrement'
- || statement.type === 'alter_table_alter_column_drop_pk'
- || statement.type === 'alter_table_alter_column_set_pk'
- ) {
- if (
- !(
- statement.type === 'alter_table_alter_column_set_notnull'
- && statement.columnPk
- )
- ) {
- const newTableName = getOldTableName(statement.tableName, meta);
- if (
- statement.type === 'alter_table_alter_column_set_notnull'
- && typeof statement.columnDefault === 'undefined'
- ) {
+ const prevColumnNames = Object.keys(json1.tables[oldTableName].columns);
+ const currentColumnNames = Object.keys(json2.tables[tableName].columns);
+ const { removedColumns, addedColumns } = findAddedAndRemoved(
+ prevColumnNames,
+ currentColumnNames,
+ );
+
+ if (removedColumns.length) {
+ for (const removedColumn of removedColumns) {
const res = await connection.query<{ count: string }>(
- `select count(*) as count from \`${newTableName}\``,
+ `select count(\`${tableName}\`.\`${removedColumn}\`) as count from \`${tableName}\``,
);
+
const count = Number(res[0].count);
if (count > 0) {
infoToPrint.push(
- `· You're about to add not-null constraint to ${
+ `· You're about to delete ${
chalk.underline(
- statement.columnName,
+ removedColumn,
)
- } column without default value, which contains ${count} items`,
+ } column in ${tableName} table with ${count} items`,
);
-
- tablesToTruncate.push(newTableName);
+ columnsToRemove.push(removedColumn);
shouldAskForApprove = true;
}
- tablesContext[newTableName] = _moveDataStatements(
- statement.tableName,
- json1,
- true,
+ }
+ }
+
+ if (addedColumns.length) {
+ for (const addedColumn of addedColumns) {
+ const [res] = await connection.query<{ count: string }>(
+ `select count(*) as count from \`${tableName}\``,
);
- } else {
- if (typeof tablesContext[newTableName] === 'undefined') {
- tablesContext[newTableName] = _moveDataStatements(
- statement.tableName,
- json1,
+
+ const columnConf = json2.tables[tableName].columns[addedColumn];
+
+ const count = Number(res.count);
+ if (count > 0 && columnConf.notNull && !columnConf.default) {
+ dataLoss = true;
+ infoToPrint.push(
+ `· You're about to add not-null ${
+ chalk.underline(
+ addedColumn,
+ )
+ } column without default value to table, which contains ${count} items`,
);
+ shouldAskForApprove = true;
+ tablesToTruncate.push(tableName);
+
+ statementsToExecute.push(`DELETE FROM \`${tableName}\`;`);
}
}
+ }
- const tablesReferncingCurrent: string[] = [];
+ // check if some tables referencing current for pragma
+ const tablesReferencingCurrent: string[] = [];
- for (const table of Object.values(json1.tables)) {
- const tablesRefs = Object.values(json1.tables[table.name].foreignKeys)
- .filter(
- (t) => SQLiteSquasher.unsquashPushFK(t).tableTo === newTableName,
- )
- .map((t) => {
- return getNewTableName(
- SQLiteSquasher.unsquashPushFK(t).tableFrom,
- meta,
- );
- });
-
- tablesReferncingCurrent.push(...tablesRefs);
- }
+ for (const table of Object.values(json2.tables)) {
+ const tablesRefs = Object.values(json2.tables[table.name].foreignKeys)
+ .filter((t) => SQLiteSquasher.unsquashPushFK(t).tableTo === tableName)
+ .map((it) => SQLiteSquasher.unsquashPushFK(it).tableFrom);
- const uniqueTableRefs = [...new Set(tablesReferncingCurrent)];
+ tablesReferencingCurrent.push(...tablesRefs);
+ }
- for (const table of uniqueTableRefs) {
- if (typeof tablesContext[table] === 'undefined') {
- tablesContext[table] = [..._moveDataStatements(table, json1)];
- }
- }
+ if (!tablesReferencingCurrent.length) {
+ statementsToExecute.push(..._moveDataStatements(tableName, json2, dataLoss));
+ continue;
}
- } else if (
- statement.type === 'create_reference'
- || statement.type === 'delete_reference'
- || statement.type === 'alter_reference'
- ) {
- const fk = SQLiteSquasher.unsquashPushFK(statement.data);
- if (typeof tablesContext[statement.tableName] === 'undefined') {
- tablesContext[statement.tableName] = _moveDataStatements(
- statement.tableName,
- json2,
- );
+ const [{ foreign_keys: pragmaState }] = await connection.query<{
+ foreign_keys: number;
+ }>(`PRAGMA foreign_keys;`);
+
+ if (pragmaState) {
+ statementsToExecute.push(`PRAGMA foreign_keys=OFF;`);
}
- } else if (
- statement.type === 'create_composite_pk'
- || statement.type === 'alter_composite_pk'
- || statement.type === 'delete_composite_pk'
- || statement.type === 'create_unique_constraint'
- || statement.type === 'delete_unique_constraint'
- ) {
- const newTableName = getOldTableName(statement.tableName, meta);
- if (typeof tablesContext[newTableName] === 'undefined') {
- tablesContext[newTableName] = _moveDataStatements(
- statement.tableName,
- json2,
- );
+ statementsToExecute.push(..._moveDataStatements(tableName, json2, dataLoss));
+ if (pragmaState) {
+ statementsToExecute.push(`PRAGMA foreign_keys=ON;`);
}
} else {
- const stmnt = fromJson([statement], 'sqlite');
- if (typeof stmnt !== 'undefined') {
- statementsToExecute.push(...stmnt);
- }
+ const fromJsonStatement = fromJson([statement], 'sqlite', 'push');
+ statementsToExecute.push(
+ ...(Array.isArray(fromJsonStatement) ? fromJsonStatement : [fromJsonStatement]),
+ );
}
}
- for (const context of Object.values(tablesContext)) {
- statementsToExecute.push(...context);
- }
-
return {
statementsToExecute,
shouldAskForApprove,
diff --git a/drizzle-kit/src/cli/commands/sqliteUp.ts b/drizzle-kit/src/cli/commands/sqliteUp.ts
index b76b9e2cd..aaa1fa7b9 100644
--- a/drizzle-kit/src/cli/commands/sqliteUp.ts
+++ b/drizzle-kit/src/cli/commands/sqliteUp.ts
@@ -47,5 +47,6 @@ const updateUpToV6 = (json: Record): SQLiteSchema => {
version: '6',
dialect: 'sqlite',
tables: tables,
+ views: {},
};
};
diff --git a/drizzle-kit/src/cli/commands/utils.ts b/drizzle-kit/src/cli/commands/utils.ts
index 9f65318a6..cb5c75886 100644
--- a/drizzle-kit/src/cli/commands/utils.ts
+++ b/drizzle-kit/src/cli/commands/utils.ts
@@ -3,12 +3,14 @@ import { existsSync } from 'fs';
import { render } from 'hanji';
import { join, resolve } from 'path';
import { object, string } from 'zod';
+import { getTablesFilterByExtensions } from '../../extensions/getTablesFilterByExtensions';
import { assertUnreachable } from '../../global';
import { type Dialect, dialect } from '../../schemaValidator';
import { prepareFilenames } from '../../serializer';
-import { pullParams, pushParams } from '../validations/cli';
+import { Entities, pullParams, pushParams } from '../validations/cli';
import {
Casing,
+ CasingType,
CliConfig,
configCommonSchema,
configMigrations,
@@ -16,6 +18,8 @@ import {
Prefix,
wrapParam,
} from '../validations/common';
+import { LibSQLCredentials, libSQLCredentials } from '../validations/libsql';
+import { printConfigConnectionIssues as printIssuesLibSql } from '../validations/libsql';
import {
MysqlCredentials,
mysqlCredentials,
@@ -27,6 +31,11 @@ import {
postgresCredentials,
printConfigConnectionIssues as printIssuesPg,
} from '../validations/postgres';
+import {
+ printConfigConnectionIssues as printIssuesSingleStore,
+ SingleStoreCredentials,
+ singlestoreCredentials,
+} from '../validations/singlestore';
import {
printConfigConnectionIssues as printIssuesSqlite,
SqliteCredentials,
@@ -79,7 +88,7 @@ export const safeRegister = async () => {
export const prepareCheckParams = async (
options: {
config?: string;
- dialect: Dialect;
+ dialect?: Dialect;
out?: string;
},
from: 'cli' | 'config',
@@ -122,6 +131,14 @@ export type GenerateConfig = {
prefix: Prefix;
custom: boolean;
bundle: boolean;
+ casing?: CasingType;
+ driver?: Driver;
+};
+
+export type ExportConfig = {
+ dialect: Dialect;
+ schema: string | string[];
+ sql: boolean;
};
export const prepareGenerateConfig = async (
@@ -135,12 +152,13 @@ export const prepareGenerateConfig = async (
dialect?: Dialect;
driver?: Driver;
prefix?: Prefix;
+ casing?: CasingType;
},
from: 'config' | 'cli',
): Promise => {
const config = from === 'config' ? await drizzleConfigFromFile(options.config) : options;
- const { schema, out, breakpoints, dialect, driver } = config;
+ const { schema, out, breakpoints, dialect, driver, casing } = config;
if (!schema || !dialect) {
console.log(error('Please provide required params:'));
@@ -164,10 +182,44 @@ export const prepareGenerateConfig = async (
name: options.name,
custom: options.custom || false,
prefix,
- breakpoints: breakpoints || true,
+ breakpoints: breakpoints ?? true,
schema: schema,
out: out || 'drizzle',
- bundle: driver === 'expo',
+ bundle: driver === 'expo' || driver === 'durable-sqlite',
+ casing,
+ driver,
+ };
+};
+
+export const prepareExportConfig = async (
+ options: {
+ config?: string;
+ schema?: string;
+ dialect?: Dialect;
+ sql: boolean;
+ },
+ from: 'config' | 'cli',
+): Promise => {
+ const config = from === 'config' ? await drizzleConfigFromFile(options.config, true) : options;
+
+ const { schema, dialect, sql } = config;
+
+ if (!schema || !dialect) {
+ console.log(error('Please provide required params:'));
+ console.log(wrapParam('schema', schema));
+ console.log(wrapParam('dialect', dialect));
+ process.exit(1);
+ }
+
+ const fileNames = prepareFilenames(schema);
+ if (fileNames.length === 0) {
+ render(`[${chalk.blue('i')}] No schema file in ${schema} was found`);
+ process.exit(0);
+ }
+ return {
+ dialect: dialect,
+ schema: schema,
+ sql: sql,
};
};
@@ -211,6 +263,14 @@ export const preparePushConfig = async (
dialect: 'sqlite';
credentials: SqliteCredentials;
}
+ | {
+ dialect: 'turso';
+ credentials: LibSQLCredentials;
+ }
+ | {
+ dialect: 'singlestore';
+ credentials: SingleStoreCredentials;
+ }
) & {
schemaPath: string | string[];
verbose: boolean;
@@ -218,6 +278,8 @@ export const preparePushConfig = async (
force: boolean;
tablesFilter: string[];
schemasFilter: string[];
+ casing?: CasingType;
+ entities?: Entities;
}
> => {
const raw = flattenDatabaseCredentials(
@@ -261,16 +323,7 @@ export const preparePushConfig = async (
: schemasFilterConfig
: [];
- if (config.extensionsFilters) {
- if (
- config.extensionsFilters.includes('postgis')
- && config.dialect === 'postgresql'
- ) {
- tablesFilter.push(
- ...['!geography_columns', '!geometry_columns', '!spatial_ref_sys'],
- );
- }
- }
+ tablesFilter.push(...getTablesFilterByExtensions(config));
if (config.dialect === 'postgresql') {
const parsed = postgresCredentials.safeParse(config);
@@ -286,8 +339,10 @@ export const preparePushConfig = async (
verbose: config.verbose ?? false,
force: (options.force as boolean) ?? false,
credentials: parsed.data,
+ casing: config.casing,
tablesFilter,
schemasFilter,
+ entities: config.entities,
};
}
@@ -304,6 +359,26 @@ export const preparePushConfig = async (
verbose: config.verbose ?? false,
force: (options.force as boolean) ?? false,
credentials: parsed.data,
+ casing: config.casing,
+ tablesFilter,
+ schemasFilter,
+ };
+ }
+
+ if (config.dialect === 'singlestore') {
+ const parsed = singlestoreCredentials.safeParse(config);
+ if (!parsed.success) {
+ printIssuesSingleStore(config);
+ process.exit(1);
+ }
+
+ return {
+ dialect: 'singlestore',
+ schemaPath: config.schema,
+ strict: config.strict ?? false,
+ verbose: config.verbose ?? false,
+ force: (options.force as boolean) ?? false,
+ credentials: parsed.data,
tablesFilter,
schemasFilter,
};
@@ -322,6 +397,26 @@ export const preparePushConfig = async (
verbose: config.verbose ?? false,
force: (options.force as boolean) ?? false,
credentials: parsed.data,
+ casing: config.casing,
+ tablesFilter,
+ schemasFilter,
+ };
+ }
+
+ if (config.dialect === 'turso') {
+ const parsed = libSQLCredentials.safeParse(config);
+ if (!parsed.success) {
+ printIssuesSqlite(config, 'pull');
+ process.exit(1);
+ }
+ return {
+ dialect: 'turso',
+ schemaPath: config.schema,
+ strict: config.strict ?? false,
+ verbose: config.verbose ?? false,
+ force: (options.force as boolean) ?? false,
+ credentials: parsed.data,
+ casing: config.casing,
tablesFilter,
schemasFilter,
};
@@ -347,6 +442,14 @@ export const preparePullConfig = async (
dialect: 'sqlite';
credentials: SqliteCredentials;
}
+ | {
+ dialect: 'turso';
+ credentials: LibSQLCredentials;
+ }
+ | {
+ dialect: 'singlestore';
+ credentials: SingleStoreCredentials;
+ }
) & {
out: string;
breakpoints: boolean;
@@ -354,6 +457,7 @@ export const preparePullConfig = async (
tablesFilter: string[];
schemasFilter: string[];
prefix: Prefix;
+ entities: Entities;
}
> => {
const raw = flattenPull(
@@ -408,11 +512,12 @@ export const preparePullConfig = async (
dialect: 'postgresql',
out: config.out,
breakpoints: config.breakpoints,
- casing: config.introspectCasing,
+ casing: config.casing,
credentials: parsed.data,
tablesFilter,
schemasFilter,
- prefix: config.database?.prefix || 'index',
+ prefix: config.migrations?.prefix || 'index',
+ entities: config.entities,
};
}
@@ -426,11 +531,32 @@ export const preparePullConfig = async (
dialect: 'mysql',
out: config.out,
breakpoints: config.breakpoints,
- casing: config.introspectCasing,
+ casing: config.casing,
credentials: parsed.data,
tablesFilter,
schemasFilter,
- prefix: config.database?.prefix || 'index',
+ prefix: config.migrations?.prefix || 'index',
+ entities: config.entities,
+ };
+ }
+
+ if (dialect === 'singlestore') {
+ const parsed = singlestoreCredentials.safeParse(config);
+ if (!parsed.success) {
+ printIssuesSingleStore(config);
+ process.exit(1);
+ }
+
+ return {
+ dialect: 'singlestore',
+ out: config.out,
+ breakpoints: config.breakpoints,
+ casing: config.casing,
+ credentials: parsed.data,
+ tablesFilter,
+ schemasFilter,
+ prefix: config.migrations?.prefix || 'index',
+ entities: config.entities,
};
}
@@ -444,11 +570,31 @@ export const preparePullConfig = async (
dialect: 'sqlite',
out: config.out,
breakpoints: config.breakpoints,
- casing: config.introspectCasing,
+ casing: config.casing,
+ credentials: parsed.data,
+ tablesFilter,
+ schemasFilter,
+ prefix: config.migrations?.prefix || 'index',
+ entities: config.entities,
+ };
+ }
+
+ if (dialect === 'turso') {
+ const parsed = libSQLCredentials.safeParse(config);
+ if (!parsed.success) {
+ printIssuesLibSql(config, 'pull');
+ process.exit(1);
+ }
+ return {
+ dialect,
+ out: config.out,
+ breakpoints: config.breakpoints,
+ casing: config.casing,
credentials: parsed.data,
tablesFilter,
schemasFilter,
- prefix: config.database?.prefix || 'index',
+ prefix: config.migrations?.prefix || 'index',
+ entities: config.entities,
};
}
@@ -505,6 +651,23 @@ export const prepareStudioConfig = async (options: Record) => {
credentials,
};
}
+
+ if (dialect === 'singlestore') {
+ const parsed = singlestoreCredentials.safeParse(flattened);
+ if (!parsed.success) {
+ printIssuesSingleStore(flattened as Record);
+ process.exit(1);
+ }
+ const credentials = parsed.data;
+ return {
+ dialect,
+ schema,
+ host,
+ port,
+ credentials,
+ };
+ }
+
if (dialect === 'sqlite') {
const parsed = sqliteCredentials.safeParse(flattened);
if (!parsed.success) {
@@ -521,6 +684,22 @@ export const prepareStudioConfig = async (options: Record) => {
};
}
+ if (dialect === 'turso') {
+ const parsed = libSQLCredentials.safeParse(flattened);
+ if (!parsed.success) {
+ printIssuesLibSql(flattened as Record, 'studio');
+ process.exit(1);
+ }
+ const credentials = parsed.data;
+ return {
+ dialect,
+ schema,
+ host,
+ port,
+ credentials,
+ };
+ }
+
assertUnreachable(dialect);
};
@@ -574,6 +753,23 @@ export const prepareMigrateConfig = async (configPath: string | undefined) => {
table,
};
}
+
+ if (dialect === 'singlestore') {
+ const parsed = singlestoreCredentials.safeParse(flattened);
+ if (!parsed.success) {
+ printIssuesSingleStore(flattened as Record);
+ process.exit(1);
+ }
+ const credentials = parsed.data;
+ return {
+ dialect,
+ out,
+ credentials,
+ schema,
+ table,
+ };
+ }
+
if (dialect === 'sqlite') {
const parsed = sqliteCredentials.safeParse(flattened);
if (!parsed.success) {
@@ -589,12 +785,28 @@ export const prepareMigrateConfig = async (configPath: string | undefined) => {
table,
};
}
+ if (dialect === 'turso') {
+ const parsed = libSQLCredentials.safeParse(flattened);
+ if (!parsed.success) {
+ printIssuesLibSql(flattened as Record, 'migrate');
+ process.exit(1);
+ }
+ const credentials = parsed.data;
+ return {
+ dialect,
+ out,
+ credentials,
+ schema,
+ table,
+ };
+ }
assertUnreachable(dialect);
};
export const drizzleConfigFromFile = async (
configPath?: string,
+ isExport?: boolean,
): Promise => {
const prefix = process.env.TEST_CONFIG_PATH_PREFIX || '';
@@ -610,7 +822,7 @@ export const drizzleConfigFromFile = async (
? 'drizzle.config.js'
: 'drizzle.config.json';
- if (!configPath) {
+ if (!configPath && !isExport) {
console.log(
chalk.gray(
`No config path provided, using default '${defaultConfigPath}'`,
@@ -625,7 +837,8 @@ export const drizzleConfigFromFile = async (
process.exit(1);
}
- console.log(chalk.grey(`Reading config file '${path}'`));
+ if (!isExport) console.log(chalk.grey(`Reading config file '${path}'`));
+
const { unregister } = await safeRegister();
const required = require(`${path}`);
const content = required.default ?? required;
@@ -634,6 +847,7 @@ export const drizzleConfigFromFile = async (
// --- get response and then check by each dialect independently
const res = configCommonSchema.safeParse(content);
if (!res.success) {
+ console.log(res.error);
if (!('dialect' in content)) {
console.log(error("Please specify 'dialect' param in config file"));
}
diff --git a/drizzle-kit/src/cli/connections.ts b/drizzle-kit/src/cli/connections.ts
index 02f3e8411..f2cf4817c 100644
--- a/drizzle-kit/src/cli/connections.ts
+++ b/drizzle-kit/src/cli/connections.ts
@@ -5,11 +5,21 @@ import fetch from 'node-fetch';
import ws from 'ws';
import { assertUnreachable } from '../global';
import type { ProxyParams } from '../serializer/studio';
-import { type DB, normaliseSQLiteUrl, type Proxy, type SQLiteDB, type SqliteProxy } from '../utils';
+import {
+ type DB,
+ LibSQLDB,
+ normalisePGliteUrl,
+ normaliseSQLiteUrl,
+ type Proxy,
+ type SQLiteDB,
+ type SqliteProxy,
+} from '../utils';
import { assertPackages, checkPackage } from './utils';
+import { LibSQLCredentials } from './validations/libsql';
import type { MysqlCredentials } from './validations/mysql';
import { withStyle } from './validations/outputs';
import type { PostgresCredentials } from './validations/postgres';
+import { SingleStoreCredentials } from './validations/singlestore';
import type { SqliteCredentials } from './validations/sqlite';
export const preparePostgresDB = async (
@@ -21,7 +31,8 @@ export const preparePostgresDB = async (
}
> => {
if ('driver' in credentials) {
- if (credentials.driver === 'aws-data-api') {
+ const { driver } = credentials;
+ if (driver === 'aws-data-api') {
assertPackages('@aws-sdk/client-rds-data');
const { RDSDataClient, ExecuteStatementCommand, TypeHint } = await import(
'@aws-sdk/client-rds-data'
@@ -47,7 +58,7 @@ export const preparePostgresDB = async (
);
const db = drizzle(rdsClient, config);
- const migrateFn = async (config: string | MigrationConfig) => {
+ const migrateFn = async (config: MigrationConfig) => {
return migrate(db, config);
};
@@ -92,12 +103,51 @@ export const preparePostgresDB = async (
};
}
- assertUnreachable(credentials.driver);
+ if (driver === 'pglite') {
+ assertPackages('@electric-sql/pglite');
+ const { PGlite, types } = await import('@electric-sql/pglite');
+ const { drizzle } = await import('drizzle-orm/pglite');
+ const { migrate } = await import('drizzle-orm/pglite/migrator');
+
+ const pglite = new PGlite(normalisePGliteUrl(credentials.url));
+ await pglite.waitReady;
+ const drzl = drizzle(pglite);
+ const migrateFn = async (config: MigrationConfig) => {
+ return migrate(drzl, config);
+ };
+
+ const parsers = {
+ [types.TIMESTAMP]: (value: any) => value,
+ [types.TIMESTAMPTZ]: (value: any) => value,
+ [types.INTERVAL]: (value: any) => value,
+ [types.DATE]: (value: any) => value,
+ };
+
+ const query = async (sql: string, params: any[] = []) => {
+ const result = await pglite.query(sql, params, {
+ parsers,
+ });
+ return result.rows as T[];
+ };
+
+ const proxy = async (params: ProxyParams) => {
+ const preparedParams = preparePGliteParams(params.params);
+ const result = await pglite.query(params.sql, preparedParams, {
+ rowMode: params.mode,
+ parsers,
+ });
+ return result.rows;
+ };
+
+ return { query, proxy, migrate: migrateFn };
+ }
+
+ assertUnreachable(driver);
}
if (await checkPackage('pg')) {
console.log(withStyle.info(`Using 'pg' driver for database querying`));
- const pg = await import('pg');
+ const { default: pg } = await import('pg');
const { drizzle } = await import('drizzle-orm/node-postgres');
const { migrate } = await import('drizzle-orm/node-postgres/migrator');
@@ -111,17 +161,42 @@ export const preparePostgresDB = async (
: credentials.ssl
: {};
+ // Override pg default date parsers
+ const types: { getTypeParser: typeof pg.types.getTypeParser } = {
+ // @ts-ignore
+ getTypeParser: (typeId, format) => {
+ if (typeId === pg.types.builtins.TIMESTAMPTZ) {
+ return (val) => val;
+ }
+ if (typeId === pg.types.builtins.TIMESTAMP) {
+ return (val) => val;
+ }
+ if (typeId === pg.types.builtins.DATE) {
+ return (val) => val;
+ }
+ if (typeId === pg.types.builtins.INTERVAL) {
+ return (val) => val;
+ }
+ // @ts-ignore
+ return pg.types.getTypeParser(typeId, format);
+ },
+ };
+
const client = 'url' in credentials
- ? new pg.default.Pool({ connectionString: credentials.url, max: 1 })
- : new pg.default.Pool({ ...credentials, ssl, max: 1 });
+ ? new pg.Pool({ connectionString: credentials.url, max: 1 })
+ : new pg.Pool({ ...credentials, ssl, max: 1 });
const db = drizzle(client);
- const migrateFn = async (config: string | MigrationConfig) => {
+ const migrateFn = async (config: MigrationConfig) => {
return migrate(db, config);
};
const query = async (sql: string, params?: any[]) => {
- const result = await client.query(sql, params ?? []);
+ const result = await client.query({
+ text: sql,
+ values: params ?? [],
+ types,
+ });
return result.rows;
};
@@ -130,6 +205,7 @@ export const preparePostgresDB = async (
text: params.sql,
values: params.params,
...(params.mode === 'array' && { rowMode: 'array' }),
+ types,
});
return result.rows;
};
@@ -150,8 +226,18 @@ export const preparePostgresDB = async (
? postgres.default(credentials.url, { max: 1 })
: postgres.default({ ...credentials, max: 1 });
+ const transparentParser = (val: any) => val;
+
+ // Override postgres.js default date parsers: https://github.com/porsager/postgres/discussions/761
+ for (const type of ['1184', '1082', '1083', '1114']) {
+ client.options.parsers[type as any] = transparentParser;
+ client.options.serializers[type as any] = transparentParser;
+ }
+ client.options.serializers['114'] = transparentParser;
+ client.options.serializers['3802'] = transparentParser;
+
const db = drizzle(client);
- const migrateFn = async (config: string | MigrationConfig) => {
+ const migrateFn = async (config: MigrationConfig) => {
return migrate(db, config);
};
@@ -179,7 +265,7 @@ export const preparePostgresDB = async (
"'@vercel/postgres' can only connect to remote Neon/Vercel Postgres/Supabase instances through a websocket",
),
);
- const { VercelPool } = await import('@vercel/postgres');
+ const { VercelPool, types: pgTypes } = await import('@vercel/postgres');
const { drizzle } = await import('drizzle-orm/vercel-postgres');
const { migrate } = await import('drizzle-orm/vercel-postgres/migrator');
const ssl = 'ssl' in credentials
@@ -192,6 +278,27 @@ export const preparePostgresDB = async (
: credentials.ssl
: {};
+ // Override @vercel/postgres default date parsers
+ const types: { getTypeParser: typeof pgTypes.getTypeParser } = {
+ // @ts-ignore
+ getTypeParser: (typeId, format) => {
+ if (typeId === pgTypes.builtins.TIMESTAMPTZ) {
+ return (val: any) => val;
+ }
+ if (typeId === pgTypes.builtins.TIMESTAMP) {
+ return (val: any) => val;
+ }
+ if (typeId === pgTypes.builtins.DATE) {
+ return (val: any) => val;
+ }
+ if (typeId === pgTypes.builtins.INTERVAL) {
+ return (val: any) => val;
+ }
+ // @ts-ignore
+ return pgTypes.getTypeParser(typeId, format);
+ },
+ };
+
const client = 'url' in credentials
? new VercelPool({ connectionString: credentials.url })
: new VercelPool({ ...credentials, ssl });
@@ -199,12 +306,16 @@ export const preparePostgresDB = async (
await client.connect();
const db = drizzle(client);
- const migrateFn = async (config: string | MigrationConfig) => {
+ const migrateFn = async (config: MigrationConfig) => {
return migrate(db, config);
};
const query = async (sql: string, params?: any[]) => {
- const result = await client.query(sql, params ?? []);
+ const result = await client.query({
+ text: sql,
+ values: params ?? [],
+ types,
+ });
return result.rows;
};
@@ -213,6 +324,7 @@ export const preparePostgresDB = async (
text: params.sql,
values: params.params,
...(params.mode === 'array' && { rowMode: 'array' }),
+ types,
});
return result.rows;
};
@@ -231,7 +343,7 @@ export const preparePostgresDB = async (
"'@neondatabase/serverless' can only connect to remote Neon/Vercel Postgres/Supabase instances through a websocket",
),
);
- const { Pool, neonConfig } = await import('@neondatabase/serverless');
+ const { Pool, neonConfig, types: pgTypes } = await import('@neondatabase/serverless');
const { drizzle } = await import('drizzle-orm/neon-serverless');
const { migrate } = await import('drizzle-orm/neon-serverless/migrator');
@@ -245,18 +357,43 @@ export const preparePostgresDB = async (
: credentials.ssl
: {};
+ // Override @neondatabase/serverless default date parsers
+ const types: { getTypeParser: typeof pgTypes.getTypeParser } = {
+ // @ts-ignore
+ getTypeParser: (typeId, format) => {
+ if (typeId === pgTypes.builtins.TIMESTAMPTZ) {
+ return (val: any) => val;
+ }
+ if (typeId === pgTypes.builtins.TIMESTAMP) {
+ return (val: any) => val;
+ }
+ if (typeId === pgTypes.builtins.DATE) {
+ return (val: any) => val;
+ }
+ if (typeId === pgTypes.builtins.INTERVAL) {
+ return (val: any) => val;
+ }
+ // @ts-ignore
+ return pgTypes.getTypeParser(typeId, format);
+ },
+ };
+
const client = 'url' in credentials
? new Pool({ connectionString: credentials.url, max: 1 })
: new Pool({ ...credentials, max: 1, ssl });
neonConfig.webSocketConstructor = ws;
const db = drizzle(client);
- const migrateFn = async (config: string | MigrationConfig) => {
+ const migrateFn = async (config: MigrationConfig) => {
return migrate(db, config);
};
const query = async (sql: string, params?: any[]) => {
- const result = await client.query(sql, params ?? []);
+ const result = await client.query({
+ text: sql,
+ values: params ?? [],
+ types,
+ });
return result.rows;
};
@@ -265,6 +402,7 @@ export const preparePostgresDB = async (
text: params.sql,
values: params.params,
...(params.mode === 'array' && { rowMode: 'array' }),
+ types,
});
return result.rows;
};
@@ -278,6 +416,85 @@ export const preparePostgresDB = async (
process.exit(1);
};
+const parseSingleStoreCredentials = (credentials: SingleStoreCredentials) => {
+ if ('url' in credentials) {
+ const url = credentials.url;
+
+ const connectionUrl = new URL(url);
+ const pathname = connectionUrl.pathname;
+
+ const database = pathname.split('/')[pathname.split('/').length - 1];
+ if (!database) {
+ console.error(
+ 'You should specify a database name in connection string (singlestore://USER:PASSWORD@HOST:PORT/DATABASE)',
+ );
+ process.exit(1);
+ }
+ return { database, url };
+ } else {
+ return {
+ database: credentials.database,
+ credentials,
+ };
+ }
+};
+
+export const connectToSingleStore = async (
+ it: SingleStoreCredentials,
+): Promise<{
+ db: DB;
+ proxy: Proxy;
+ database: string;
+ migrate: (config: MigrationConfig) => Promise;
+}> => {
+ const result = parseSingleStoreCredentials(it);
+
+ if (await checkPackage('mysql2')) {
+ const { createConnection } = await import('mysql2/promise');
+ const { drizzle } = await import('drizzle-orm/singlestore');
+ const { migrate } = await import('drizzle-orm/singlestore/migrator');
+
+ const connection = result.url
+ ? await createConnection(result.url)
+ : await createConnection(result.credentials!); // needed for some reason!
+
+ const db = drizzle(connection);
+ const migrateFn = async (config: MigrationConfig) => {
+ return migrate(db, config);
+ };
+
+ await connection.connect();
+ const query: DB['query'] = async (
+ sql: string,
+ params?: any[],
+ ): Promise => {
+ const res = await connection.execute(sql, params);
+ return res[0] as any;
+ };
+
+ const proxy: Proxy = async (params: ProxyParams) => {
+ const result = await connection.query({
+ sql: params.sql,
+ values: params.params,
+ rowsAsArray: params.mode === 'array',
+ });
+ return result[0] as any[];
+ };
+
+ return {
+ db: { query },
+ proxy,
+ database: result.database,
+ migrate: migrateFn,
+ };
+ }
+
+ console.error(
+ "To connect to SingleStore database - please install 'singlestore' driver",
+ );
+ process.exit(1);
+};
+
const parseMysqlCredentials = (credentials: MysqlCredentials) => {
if ('url' in credentials) {
const url = credentials.url;
@@ -325,12 +542,23 @@ export const connectToMySQL = async (
return migrate(db, config);
};
+ const typeCast = (field: any, next: any) => {
+ if (field.type === 'TIMESTAMP' || field.type === 'DATETIME' || field.type === 'DATE') {
+ return field.string();
+ }
+ return next();
+ };
+
await connection.connect();
const query: DB['query'] = async (
sql: string,
params?: any[],
): Promise => {
- const res = await connection.execute(sql, params);
+ const res = await connection.execute({
+ sql,
+ values: params,
+ typeCast,
+ });
return res[0] as any;
};
@@ -339,6 +567,7 @@ export const connectToMySQL = async (
sql: params.sql,
values: params.params,
rowsAsArray: params.mode === 'array',
+ typeCast,
});
return result[0] as any[];
};
@@ -352,13 +581,13 @@ export const connectToMySQL = async (
}
if (await checkPackage('@planetscale/database')) {
- const { connect } = await import('@planetscale/database');
+ const { Client } = await import('@planetscale/database');
const { drizzle } = await import('drizzle-orm/planetscale-serverless');
const { migrate } = await import(
'drizzle-orm/planetscale-serverless/migrator'
);
- const connection = connect(result);
+ const connection = new Client(result);
const db = drizzle(connection);
const migrateFn = async (config: MigrationConfig) => {
@@ -415,6 +644,25 @@ const prepareSqliteParams = (params: any[], driver?: string) => {
});
};
+const preparePGliteParams = (params: any[]) => {
+ return params.map((param) => {
+ if (
+ param
+ && typeof param === 'object'
+ && 'type' in param
+ && 'value' in param
+ && param.type === 'binary'
+ ) {
+ const value = typeof param.value === 'object'
+ ? JSON.stringify(param.value)
+ : (param.value as string);
+
+ return value;
+ }
+ return param;
+ });
+};
+
export const connectToSQLite = async (
credentials: SqliteCredentials,
): Promise<
@@ -424,56 +672,7 @@ export const connectToSQLite = async (
> => {
if ('driver' in credentials) {
const { driver } = credentials;
- if (driver === 'turso') {
- assertPackages('@libsql/client');
- const { createClient } = await import('@libsql/client');
- const { drizzle } = await import('drizzle-orm/libsql');
- const { migrate } = await import('drizzle-orm/libsql/migrator');
-
- const client = createClient({
- url: credentials.url,
- authToken: credentials.authToken,
- });
-
- const drzl = drizzle(client);
- const migrateFn = async (config: MigrationConfig) => {
- return migrate(drzl, config);
- };
-
- const db: SQLiteDB = {
- query: async (sql: string, params?: any[]) => {
- const res = await client.execute({ sql, args: params || [] });
- return res.rows as T[];
- },
- run: async (query: string) => {
- await client.execute(query);
- },
- batch: async (
- queries: { query: string; values?: any[] | undefined }[],
- ) => {
- await client.batch(
- queries.map((it) => ({ sql: it.query, args: it.values ?? [] })),
- );
- },
- };
- const proxy: SqliteProxy = {
- proxy: async (params: ProxyParams) => {
- const preparedParams = prepareSqliteParams(params.params);
- const result = await client.execute({
- sql: params.sql,
- args: preparedParams,
- });
-
- if (params.mode === 'array') {
- return result.rows.map((row) => Object.values(row));
- } else {
- return result.rows;
- }
- },
- };
-
- return { ...db, ...proxy, migrate: migrateFn };
- } else if (driver === 'd1-http') {
+ if (driver === 'd1-http') {
const { drizzle } = await import('drizzle-orm/sqlite-proxy');
const { migrate } = await import('drizzle-orm/sqlite-proxy/migrator');
@@ -650,8 +849,66 @@ export const connectToSQLite = async (
};
return { ...db, ...proxy, migrate: migrateFn };
}
+
console.log(
"Please install either 'better-sqlite3' or '@libsql/client' for Drizzle Kit to connect to SQLite databases",
);
process.exit(1);
};
+
+export const connectToLibSQL = async (credentials: LibSQLCredentials): Promise<
+ & LibSQLDB
+ & SqliteProxy
+ & { migrate: (config: MigrationConfig) => Promise }
+> => {
+ if (await checkPackage('@libsql/client')) {
+ const { createClient } = await import('@libsql/client');
+ const { drizzle } = await import('drizzle-orm/libsql');
+ const { migrate } = await import('drizzle-orm/libsql/migrator');
+
+ const client = createClient({
+ url: normaliseSQLiteUrl(credentials.url, 'libsql'),
+ authToken: credentials.authToken,
+ });
+ const drzl = drizzle(client);
+ const migrateFn = async (config: MigrationConfig) => {
+ return migrate(drzl, config);
+ };
+
+ const db: LibSQLDB = {
+ query: async (sql: string, params?: any[]) => {
+ const res = await client.execute({ sql, args: params || [] });
+ return res.rows as T[];
+ },
+ run: async (query: string) => {
+ await client.execute(query);
+ },
+ batchWithPragma: async (queries: string[]) => {
+ await client.migrate(queries);
+ },
+ };
+
+ const proxy: SqliteProxy = {
+ proxy: async (params: ProxyParams) => {
+ const preparedParams = prepareSqliteParams(params.params);
+ const result = await client.execute({
+ sql: params.sql,
+ args: preparedParams,
+ });
+
+ if (params.mode === 'array') {
+ return result.rows.map((row) => Object.values(row));
+ } else {
+ return result.rows;
+ }
+ },
+ };
+
+ return { ...db, ...proxy, migrate: migrateFn };
+ }
+
+ console.log(
+ "Please install '@libsql/client' for Drizzle Kit to connect to LibSQL databases",
+ );
+ process.exit(1);
+};
diff --git a/drizzle-kit/src/cli/index.ts b/drizzle-kit/src/cli/index.ts
index a7272ffef..42730be1d 100644
--- a/drizzle-kit/src/cli/index.ts
+++ b/drizzle-kit/src/cli/index.ts
@@ -1,6 +1,6 @@
import { command, run } from '@drizzle-team/brocli';
import chalk from 'chalk';
-import { check, drop, generate, migrate, pull, push, studio, up } from './schema';
+import { check, drop, exportRaw, generate, migrate, pull, push, studio, up } from './schema';
import { ormCoreVersions } from './utils';
const version = async () => {
@@ -42,6 +42,7 @@ const legacy = [
legacyCommand('check:sqlite', 'check'),
];
-run([generate, migrate, pull, push, studio, up, check, drop, ...legacy], {
+run([generate, migrate, pull, push, studio, up, check, drop, exportRaw, ...legacy], {
+ name: 'drizzle-kit',
version: version,
});
diff --git a/drizzle-kit/src/cli/schema.ts b/drizzle-kit/src/cli/schema.ts
index 0e88a7023..110f9d633 100644
--- a/drizzle-kit/src/cli/schema.ts
+++ b/drizzle-kit/src/cli/schema.ts
@@ -1,36 +1,40 @@
+import { boolean, command, number, string } from '@drizzle-team/brocli';
import chalk from 'chalk';
-import { checkHandler } from './commands/check';
-import { assertOrmCoreVersion, assertPackages, assertStudioNodeVersion, ormVersionGt } from './utils';
+import 'dotenv/config';
+import { mkdirSync } from 'fs';
+import { renderWithTask } from 'hanji';
+import { dialects } from 'src/schemaValidator';
import '../@types/utils';
+import { assertUnreachable } from '../global';
+import { type Setup } from '../serializer/studio';
import { assertV1OutFolder } from '../utils';
+import { certs } from '../utils/certs';
+import { checkHandler } from './commands/check';
import { dropMigration } from './commands/drop';
import { upMysqlHandler } from './commands/mysqlUp';
import { upPgHandler } from './commands/pgUp';
+import { upSinglestoreHandler } from './commands/singlestoreUp';
import { upSqliteHandler } from './commands/sqliteUp';
import {
prepareCheckParams,
prepareDropParams,
+ prepareExportConfig,
prepareGenerateConfig,
prepareMigrateConfig,
preparePullConfig,
preparePushConfig,
prepareStudioConfig,
} from './commands/utils';
+import { assertOrmCoreVersion, assertPackages, assertStudioNodeVersion, ormVersionGt } from './utils';
import { assertCollisions, drivers, prefixes } from './validations/common';
import { withStyle } from './validations/outputs';
-import 'dotenv/config';
-import { boolean, command, number, string } from '@drizzle-team/brocli';
-import { mkdirSync } from 'fs';
-import { renderWithTask } from 'hanji';
-import { dialects } from 'src/schemaValidator';
-import { assertUnreachable } from '../global';
-import type { Setup } from '../serializer/studio';
-import { certs } from '../utils/certs';
import { grey, MigrateProgress } from './views';
const optionDialect = string('dialect')
.enum(...dialects)
- .desc(`Database dialect: 'postgresql', 'mysql' or 'sqlite'`);
+ .desc(
+ `Database dialect: 'postgresql', 'mysql', 'sqlite', 'turso' or 'singlestore'`,
+ );
const optionOut = string().desc("Output folder, 'drizzle' by default");
const optionConfig = string().desc('Path to drizzle config file');
const optionBreakpoints = boolean().desc(
@@ -41,12 +45,15 @@ const optionDriver = string()
.enum(...drivers)
.desc('Database driver');
+const optionCasing = string().enum('camelCase', 'snake_case').desc('Casing for serialization');
+
export const generate = command({
name: 'generate',
options: {
config: optionConfig,
dialect: optionDialect,
driver: optionDriver,
+ casing: optionCasing,
schema: string().desc('Path to a schema file or folder'),
out: optionOut,
name: string().desc('Migration file name'),
@@ -63,7 +70,7 @@ export const generate = command({
'generate',
opts,
['prefix', 'name', 'custom'],
- ['driver', 'breakpoints', 'schema', 'out', 'dialect'],
+ ['driver', 'breakpoints', 'schema', 'out', 'dialect', 'casing'],
);
return prepareGenerateConfig(opts, from);
},
@@ -77,6 +84,8 @@ export const generate = command({
prepareAndMigratePg,
prepareAndMigrateMysql,
prepareAndMigrateSqlite,
+ prepareAndMigrateLibSQL,
+ prepareAndMigrateSingleStore,
} = await import('./commands/migrate');
const dialect = opts.dialect;
@@ -86,6 +95,10 @@ export const generate = command({
await prepareAndMigrateMysql(opts);
} else if (dialect === 'sqlite') {
await prepareAndMigrateSqlite(opts);
+ } else if (dialect === 'turso') {
+ await prepareAndMigrateLibSQL(opts);
+ } else if (dialect === 'singlestore') {
+ await prepareAndMigrateSingleStore(opts);
} else {
assertUnreachable(dialect);
}
@@ -108,15 +121,23 @@ export const migrate = command({
try {
if (dialect === 'postgresql') {
if ('driver' in credentials) {
- if (credentials.driver === 'aws-data-api') {
+ const { driver } = credentials;
+ if (driver === 'aws-data-api') {
if (!(await ormVersionGt('0.30.10'))) {
console.log(
"To use 'aws-data-api' driver - please update drizzle-orm to the latest version",
);
process.exit(1);
}
+ } else if (driver === 'pglite') {
+ if (!(await ormVersionGt('0.30.6'))) {
+ console.log(
+ "To use 'pglite' driver - please update drizzle-orm to the latest version",
+ );
+ process.exit(1);
+ }
} else {
- assertUnreachable(credentials.driver);
+ assertUnreachable(driver);
}
}
const { preparePostgresDB } = await import('./connections');
@@ -140,6 +161,17 @@ export const migrate = command({
migrationsSchema: schema,
}),
);
+ } else if (dialect === 'singlestore') {
+ const { connectToSingleStore } = await import('./connections');
+ const { migrate } = await connectToSingleStore(credentials);
+ await renderWithTask(
+ new MigrateProgress(),
+ migrate({
+ migrationsFolder: out,
+ migrationsTable: table,
+ migrationsSchema: schema,
+ }),
+ );
} else if (dialect === 'sqlite') {
const { connectToSQLite } = await import('./connections');
const { migrate } = await connectToSQLite(credentials);
@@ -151,6 +183,17 @@ export const migrate = command({
migrationsSchema: schema,
}),
);
+ } else if (dialect === 'turso') {
+ const { connectToLibSQL } = await import('./connections');
+ const { migrate } = await connectToLibSQL(credentials);
+ await renderWithTask(
+ new MigrateProgress(),
+ migrate({
+ migrationsFolder: opts.out,
+ migrationsTable: table,
+ migrationsSchema: schema,
+ }),
+ );
} else {
assertUnreachable(dialect);
}
@@ -190,6 +233,7 @@ export const push = command({
options: {
config: optionConfig,
dialect: optionDialect,
+ casing: optionCasing,
schema: string().desc('Path to a schema file or folder'),
...optionsFilters,
...optionsDatabaseCredentials,
@@ -223,6 +267,7 @@ export const push = command({
'schemaFilters',
'extensionsFilters',
'tablesFilter',
+ 'casing',
],
);
@@ -241,6 +286,8 @@ export const push = command({
tablesFilter,
schemasFilter,
force,
+ casing,
+ entities,
} = config;
try {
@@ -253,18 +300,27 @@ export const push = command({
strict,
verbose,
force,
+ casing,
);
} else if (dialect === 'postgresql') {
if ('driver' in credentials) {
- if (credentials.driver === 'aws-data-api') {
+ const { driver } = credentials;
+ if (driver === 'aws-data-api') {
if (!(await ormVersionGt('0.30.10'))) {
console.log(
"To use 'aws-data-api' driver - please update drizzle-orm to the latest version",
);
process.exit(1);
}
+ } else if (driver === 'pglite') {
+ if (!(await ormVersionGt('0.30.6'))) {
+ console.log(
+ "To use 'pglite' driver - please update drizzle-orm to the latest version",
+ );
+ process.exit(1);
+ }
} else {
- assertUnreachable(credentials.driver);
+ assertUnreachable(driver);
}
}
@@ -276,7 +332,9 @@ export const push = command({
credentials,
tablesFilter,
schemasFilter,
+ entities,
force,
+ casing,
);
} else if (dialect === 'sqlite') {
const { sqlitePush } = await import('./commands/push');
@@ -287,6 +345,29 @@ export const push = command({
credentials,
tablesFilter,
force,
+ casing,
+ );
+ } else if (dialect === 'turso') {
+ const { libSQLPush } = await import('./commands/push');
+ await libSQLPush(
+ schemaPath,
+ verbose,
+ strict,
+ credentials,
+ tablesFilter,
+ force,
+ casing,
+ );
+ } else if (dialect === 'singlestore') {
+ const { singlestorePush } = await import('./commands/push');
+ await singlestorePush(
+ schemaPath,
+ credentials,
+ tablesFilter,
+ strict,
+ verbose,
+ force,
+ casing,
);
} else {
assertUnreachable(dialect);
@@ -343,9 +424,13 @@ export const up = command({
upMysqlHandler(out);
}
- if (dialect === 'sqlite') {
+ if (dialect === 'sqlite' || dialect === 'turso') {
upSqliteHandler(out);
}
+
+ if (dialect === 'singlestore') {
+ upSinglestoreHandler(out);
+ }
},
});
@@ -400,6 +485,7 @@ export const pull = command({
tablesFilter,
schemasFilter,
prefix,
+ entities,
} = config;
mkdirSync(out, { recursive: true });
@@ -417,15 +503,23 @@ export const pull = command({
try {
if (dialect === 'postgresql') {
if ('driver' in credentials) {
- if (credentials.driver === 'aws-data-api') {
+ const { driver } = credentials;
+ if (driver === 'aws-data-api') {
if (!(await ormVersionGt('0.30.10'))) {
console.log(
"To use 'aws-data-api' driver - please update drizzle-orm to the latest version",
);
process.exit(1);
}
+ } else if (driver === 'pglite') {
+ if (!(await ormVersionGt('0.30.6'))) {
+ console.log(
+ "To use 'pglite' driver - please update drizzle-orm to the latest version",
+ );
+ process.exit(1);
+ }
} else {
- assertUnreachable(credentials.driver);
+ assertUnreachable(driver);
}
}
@@ -438,6 +532,7 @@ export const pull = command({
tablesFilter,
schemasFilter,
prefix,
+ entities,
);
} else if (dialect === 'mysql') {
const { introspectMysql } = await import('./commands/introspect');
@@ -459,6 +554,26 @@ export const pull = command({
tablesFilter,
prefix,
);
+ } else if (dialect === 'turso') {
+ const { introspectLibSQL } = await import('./commands/introspect');
+ await introspectLibSQL(
+ casing,
+ out,
+ breakpoints,
+ credentials,
+ tablesFilter,
+ prefix,
+ );
+ } else if (dialect === 'singlestore') {
+ const { introspectSingleStore } = await import('./commands/introspect');
+ await introspectSingleStore(
+ casing,
+ out,
+ breakpoints,
+ credentials,
+ tablesFilter,
+ prefix,
+ );
} else {
assertUnreachable(dialect);
}
@@ -519,21 +634,32 @@ export const studio = command({
drizzleForMySQL,
prepareSQLiteSchema,
drizzleForSQLite,
+ prepareSingleStoreSchema,
+ drizzleForSingleStore,
+ drizzleForLibSQL,
} = await import('../serializer/studio');
let setup: Setup;
try {
if (dialect === 'postgresql') {
if ('driver' in credentials) {
- if (credentials.driver === 'aws-data-api') {
+ const { driver } = credentials;
+ if (driver === 'aws-data-api') {
if (!(await ormVersionGt('0.30.10'))) {
console.log(
"To use 'aws-data-api' driver - please update drizzle-orm to the latest version",
);
process.exit(1);
}
+ } else if (driver === 'pglite') {
+ if (!(await ormVersionGt('0.30.6'))) {
+ console.log(
+ "To use 'pglite' driver - please update drizzle-orm to the latest version",
+ );
+ process.exit(1);
+ }
} else {
- assertUnreachable(credentials.driver);
+ assertUnreachable(driver);
}
}
@@ -551,6 +677,21 @@ export const studio = command({
? await prepareSQLiteSchema(schemaPath)
: { schema: {}, relations: {}, files: [] };
setup = await drizzleForSQLite(credentials, schema, relations, files);
+ } else if (dialect === 'turso') {
+ const { schema, relations, files } = schemaPath
+ ? await prepareSQLiteSchema(schemaPath)
+ : { schema: {}, relations: {}, files: [] };
+ setup = await drizzleForLibSQL(credentials, schema, relations, files);
+ } else if (dialect === 'singlestore') {
+ const { schema, relations, files } = schemaPath
+ ? await prepareSingleStoreSchema(schemaPath)
+ : { schema: {}, relations: {}, files: [] };
+ setup = await drizzleForSingleStore(
+ credentials,
+ schema,
+ relations,
+ files,
+ );
} else {
assertUnreachable(dialect);
}
@@ -607,3 +748,47 @@ export const studio = command({
}
},
});
+
+export const exportRaw = command({
+ name: 'export',
+ desc: 'Generate diff between current state and empty state in specified formats: sql',
+ options: {
+ sql: boolean('sql').default(true).desc('Generate as sql'),
+ config: optionConfig,
+ dialect: optionDialect,
+ schema: string().desc('Path to a schema file or folder'),
+ },
+ transform: async (opts) => {
+ const from = assertCollisions('export', opts, ['sql'], ['dialect', 'schema']);
+ return prepareExportConfig(opts, from);
+ },
+ handler: async (opts) => {
+ await assertOrmCoreVersion();
+ await assertPackages('drizzle-orm');
+
+ const {
+ prepareAndExportPg,
+ prepareAndExportMysql,
+ prepareAndExportSqlite,
+ prepareAndExportLibSQL,
+ prepareAndExportSinglestore,
+ } = await import(
+ './commands/migrate'
+ );
+
+ const dialect = opts.dialect;
+ if (dialect === 'postgresql') {
+ await prepareAndExportPg(opts);
+ } else if (dialect === 'mysql') {
+ await prepareAndExportMysql(opts);
+ } else if (dialect === 'sqlite') {
+ await prepareAndExportSqlite(opts);
+ } else if (dialect === 'turso') {
+ await prepareAndExportLibSQL(opts);
+ } else if (dialect === 'singlestore') {
+ await prepareAndExportSinglestore(opts);
+ } else {
+ assertUnreachable(dialect);
+ }
+ },
+});
diff --git a/drizzle-kit/src/cli/utils.ts b/drizzle-kit/src/cli/utils.ts
index f7e7a2ae9..a4c28851e 100644
--- a/drizzle-kit/src/cli/utils.ts
+++ b/drizzle-kit/src/cli/utils.ts
@@ -74,7 +74,7 @@ export const assertEitherPackage = async (
process.exit(1);
};
-const requiredApiVersion = 7;
+const requiredApiVersion = 10;
export const assertOrmCoreVersion = async () => {
try {
const { compatibilityVersion } = await import('drizzle-orm/version');
diff --git a/drizzle-kit/src/cli/validations/cli.ts b/drizzle-kit/src/cli/validations/cli.ts
index 67e118a98..a2a5ad81f 100644
--- a/drizzle-kit/src/cli/validations/cli.ts
+++ b/drizzle-kit/src/cli/validations/cli.ts
@@ -1,6 +1,6 @@
-import { boolean, intersection, literal, object, string, TypeOf, union } from 'zod';
+import { array, boolean, intersection, literal, object, string, TypeOf, union } from 'zod';
import { dialect } from '../../schemaValidator';
-import { casing, prefix } from './common';
+import { casing, casingType, prefix } from './common';
export const cliConfigGenerate = object({
dialect: dialect.optional(),
@@ -17,6 +17,7 @@ export type CliConfigGenerate = TypeOf;
export const pushParams = object({
dialect: dialect,
+ casing: casingType.optional(),
schema: union([string(), string().array()]),
tablesFilter: union([string(), string().array()]).optional(),
schemaFilter: union([string(), string().array()])
@@ -25,6 +26,13 @@ export const pushParams = object({
extensionsFilters: literal('postgis').array().optional(),
verbose: boolean().optional(),
strict: boolean().optional(),
+ entities: object({
+ roles: boolean().or(object({
+ provider: string().optional(),
+ include: string().array().optional(),
+ exclude: string().array().optional(),
+ })).optional().default(false),
+ }).optional(),
}).passthrough();
export type PushParams = TypeOf;
@@ -38,13 +46,22 @@ export const pullParams = object({
.optional()
.default(['public']),
extensionsFilters: literal('postgis').array().optional(),
- introspectCasing: casing,
+ casing,
breakpoints: boolean().optional().default(true),
- database: object({
+ migrations: object({
prefix: prefix.optional().default('index'),
}).optional(),
+ entities: object({
+ roles: boolean().or(object({
+ provider: string().optional(),
+ include: string().array().optional(),
+ exclude: string().array().optional(),
+ })).optional().default(false),
+ }).optional(),
}).passthrough();
+export type Entities = TypeOf['entities'];
+
export type PullParams = TypeOf;
export const configCheck = object({
diff --git a/drizzle-kit/src/cli/validations/common.ts b/drizzle-kit/src/cli/validations/common.ts
index e800afbc5..721f6effa 100644
--- a/drizzle-kit/src/cli/validations/common.ts
+++ b/drizzle-kit/src/cli/validations/common.ts
@@ -10,7 +10,8 @@ export type Commands =
| 'check'
| 'up'
| 'drop'
- | 'push';
+ | 'push'
+ | 'export';
type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never;
type IsUnion = [T] extends [UnionToIntersection] ? false : true;
@@ -61,9 +62,14 @@ export const assertCollisions = <
};
export const sqliteDriversLiterals = [
- literal('turso'),
literal('d1-http'),
literal('expo'),
+ literal('durable-sqlite'),
+] as const;
+
+export const postgresqlDriversLiterals = [
+ literal('aws-data-api'),
+ literal('pglite'),
] as const;
export const prefixes = [
@@ -80,8 +86,12 @@ export type Prefix = (typeof prefixes)[number];
const _: Prefix = '' as TypeOf;
}
+export const casingTypes = ['snake_case', 'camelCase'] as const;
+export const casingType = enum_(casingTypes);
+export type CasingType = (typeof casingTypes)[number];
+
export const sqliteDriver = union(sqliteDriversLiterals);
-export const postgresDriver = literal('aws-data-api');
+export const postgresDriver = union(postgresqlDriversLiterals);
export const driver = union([sqliteDriver, postgresDriver]);
export const configMigrations = object({
@@ -101,6 +111,8 @@ export const configCommonSchema = object({
schemaFilter: union([string(), string().array()]).default(['public']),
migrations: configMigrations,
dbCredentials: any().optional(),
+ casing: casingType.optional(),
+ sql: boolean().default(true),
}).passthrough();
export const casing = union([literal('camel'), literal('preserve')]).default(
@@ -151,7 +163,7 @@ export const configPushSchema = object({
});
export type CliConfig = TypeOf;
-export const drivers = ['turso', 'd1-http', 'expo', 'aws-data-api'] as const;
+export const drivers = ['d1-http', 'expo', 'aws-data-api', 'pglite', 'durable-sqlite'] as const;
export type Driver = (typeof drivers)[number];
const _: Driver = '' as TypeOf;
diff --git a/drizzle-kit/src/cli/validations/libsql.ts b/drizzle-kit/src/cli/validations/libsql.ts
new file mode 100644
index 000000000..a9b03c168
--- /dev/null
+++ b/drizzle-kit/src/cli/validations/libsql.ts
@@ -0,0 +1,27 @@
+import { softAssertUnreachable } from 'src/global';
+import { object, string, TypeOf } from 'zod';
+import { error } from '../views';
+import { wrapParam } from './common';
+
+export const libSQLCredentials = object({
+ url: string().min(1),
+ authToken: string().min(1).optional(),
+});
+
+export type LibSQLCredentials = {
+ url: string;
+ authToken?: string;
+};
+
+const _: LibSQLCredentials = {} as TypeOf;
+
+export const printConfigConnectionIssues = (
+ options: Record,
+ command: 'generate' | 'migrate' | 'push' | 'pull' | 'studio',
+) => {
+ let text = `Please provide required params for 'turso' dialect:\n`;
+ console.log(error(text));
+ console.log(wrapParam('url', options.url));
+ console.log(wrapParam('authToken', options.authToken, true, 'secret'));
+ process.exit(1);
+};
diff --git a/drizzle-kit/src/cli/validations/outputs.ts b/drizzle-kit/src/cli/validations/outputs.ts
index 6b92829d5..6e9d520dd 100644
--- a/drizzle-kit/src/cli/validations/outputs.ts
+++ b/drizzle-kit/src/cli/validations/outputs.ts
@@ -26,7 +26,7 @@ export const outputs = {
),
noDialect: () =>
withStyle.error(
- `Please specify 'dialect' param in config, either of 'pg', 'mysql' or 'sqlite'`,
+ `Please specify 'dialect' param in config, either of 'postgresql', 'mysql', 'sqlite', turso or singlestore`,
),
},
common: {
@@ -79,4 +79,13 @@ export const outputs = {
introspect: {},
push: {},
},
+ singlestore: {
+ connection: {
+ driver: () => withStyle.error(`Only "mysql2" is available options for "--driver"`),
+ required: () =>
+ withStyle.error(
+ `Either "url" or "host", "database" are required for database connection`,
+ ),
+ },
+ },
};
diff --git a/drizzle-kit/src/cli/validations/postgres.ts b/drizzle-kit/src/cli/validations/postgres.ts
index 3dd02b4f3..658760c61 100644
--- a/drizzle-kit/src/cli/validations/postgres.ts
+++ b/drizzle-kit/src/cli/validations/postgres.ts
@@ -35,6 +35,10 @@ export const postgresCredentials = union([
secretArn: string().min(1),
resourceArn: string().min(1),
}),
+ object({
+ driver: literal('pglite'),
+ url: string().min(1),
+ }),
]);
export type PostgresCredentials = TypeOf;
diff --git a/drizzle-kit/src/cli/validations/singlestore.ts b/drizzle-kit/src/cli/validations/singlestore.ts
new file mode 100644
index 000000000..ebe0cc5f0
--- /dev/null
+++ b/drizzle-kit/src/cli/validations/singlestore.ts
@@ -0,0 +1,61 @@
+import { boolean, coerce, object, string, TypeOf, union } from 'zod';
+import { error } from '../views';
+import { wrapParam } from './common';
+import { outputs } from './outputs';
+
+export const singlestoreCredentials = union([
+ object({
+ host: string().min(1),
+ port: coerce.number().min(1).optional(),
+ user: string().min(1).optional(),
+ password: string().min(1).optional(),
+ database: string().min(1),
+ ssl: union([
+ string(),
+ object({
+ pfx: string().optional(),
+ key: string().optional(),
+ passphrase: string().optional(),
+ cert: string().optional(),
+ ca: union([string(), string().array()]).optional(),
+ crl: union([string(), string().array()]).optional(),
+ ciphers: string().optional(),
+ rejectUnauthorized: boolean().optional(),
+ }),
+ ]).optional(),
+ }),
+ object({
+ url: string().min(1),
+ }),
+]);
+
+export type SingleStoreCredentials = TypeOf;
+
+export const printCliConnectionIssues = (options: any) => {
+ const { uri, host, database } = options || {};
+
+ if (!uri && (!host || !database)) {
+ console.log(outputs.singlestore.connection.required());
+ }
+};
+
+export const printConfigConnectionIssues = (
+ options: Record,
+) => {
+ if ('url' in options) {
+ let text = `Please provide required params for SingleStore driver:\n`;
+ console.log(error(text));
+ console.log(wrapParam('url', options.url, false, 'url'));
+ process.exit(1);
+ }
+
+ let text = `Please provide required params for SingleStore driver:\n`;
+ console.log(error(text));
+ console.log(wrapParam('host', options.host));
+ console.log(wrapParam('port', options.port, true));
+ console.log(wrapParam('user', options.user, true));
+ console.log(wrapParam('password', options.password, true, 'secret'));
+ console.log(wrapParam('database', options.database));
+ console.log(wrapParam('ssl', options.ssl, true));
+ process.exit(1);
+};
diff --git a/drizzle-kit/src/cli/validations/sqlite.ts b/drizzle-kit/src/cli/validations/sqlite.ts
index b6ad062d5..bb16492c3 100644
--- a/drizzle-kit/src/cli/validations/sqlite.ts
+++ b/drizzle-kit/src/cli/validations/sqlite.ts
@@ -25,11 +25,6 @@ export const sqliteCredentials = union([
]);
export type SqliteCredentials =
- | {
- driver: 'turso';
- url: string;
- authToken: string;
- }
| {
driver: 'd1-http';
accountId: string;
@@ -77,12 +72,27 @@ export const printConfigConnectionIssues = (
console.log(wrapParam('databaseId', options.databaseId));
console.log(wrapParam('token', options.token, false, 'secret'));
process.exit(1);
- } else if (driver === 'turso') {
- let text = `Please provide required params for Turso driver:\n`;
- console.log(error(text));
- console.log(wrapParam('url', options.url));
- console.log(wrapParam('authToken', options.authToken, false, 'secret'));
- return;
+ } else if (driver === 'durable-sqlite') {
+ if (command === 'migrate') {
+ console.log(
+ error(
+ `You can't use 'migrate' command with SQLite Durable Objects`,
+ ),
+ );
+ } else if (command === 'studio') {
+ console.log(
+ error(
+ `You can't use 'migrate' command with SQLite Durable Objects`,
+ ),
+ );
+ } else if (command === 'pull') {
+ console.log(error("You can't use 'pull' command with SQLite Durable Objects"));
+ } else if (command === 'push') {
+ console.log(error("You can't use 'push' command with SQLite Durable Objects"));
+ } else {
+ console.log(error('Unexpected error with SQLite Durable Object driver 🤔'));
+ }
+ process.exit(1);
} else {
softAssertUnreachable(driver);
}
diff --git a/drizzle-kit/src/cli/views.ts b/drizzle-kit/src/cli/views.ts
index 56e0331df..9106d31cd 100644
--- a/drizzle-kit/src/cli/views.ts
+++ b/drizzle-kit/src/cli/views.ts
@@ -32,7 +32,13 @@ export const schema = (schema: CommonSchema): string => {
.map((t) => {
const columnsCount = Object.values(t.columns).length;
const indexesCount = Object.values(t.indexes).length;
- const foreignKeys = Object.values(t.foreignKeys).length;
+ let foreignKeys: number = 0;
+ // Singlestore doesn't have foreign keys
+ if (schema.dialect !== 'singlestore') {
+ // @ts-expect-error
+ foreignKeys = Object.values(t.foreignKeys).length;
+ }
+
return `${chalk.bold.blue(t.name)} ${
chalk.gray(
`${columnsCount} columns ${indexesCount} indexes ${foreignKeys} fks`,
@@ -158,6 +164,77 @@ export const tableKey = (it: NamedWithSchema) => {
: `${it.schema}.${it.name}`;
};
+export class ResolveSelectNamed extends Prompt<
+ RenamePropmtItem | T
+> {
+ private readonly state: SelectState | T>;
+
+ constructor(
+ private readonly base: T,
+ data: (RenamePropmtItem | T)[],
+ private readonly entityType: 'role' | 'policy',
+ ) {
+ super();
+ this.on('attach', (terminal) => terminal.toggleCursor('hide'));
+ this.state = new SelectState(data);
+ this.state.bind(this);
+ this.base = base;
+ }
+
+ render(status: 'idle' | 'submitted' | 'aborted'): string {
+ if (status === 'submitted' || status === 'aborted') {
+ return '';
+ }
+ const key = this.base.name;
+
+ let text = `\nIs ${chalk.bold.blue(key)} ${this.entityType} created or renamed from another ${this.entityType}?\n`;
+
+ const isSelectedRenamed = isRenamePromptItem(
+ this.state.items[this.state.selectedIdx],
+ );
+
+ const selectedPrefix = isSelectedRenamed
+ ? chalk.yellow('❯ ')
+ : chalk.green('❯ ');
+
+ const labelLength: number = this.state.items
+ .filter((it) => isRenamePromptItem(it))
+ .map((_) => {
+ const it = _ as RenamePropmtItem;
+ const keyFrom = it.from.name;
+ return key.length + 3 + keyFrom.length;
+ })
+ .reduce((a, b) => {
+ if (a > b) {
+ return a;
+ }
+ return b;
+ }, 0);
+
+ const entityType = this.entityType;
+ this.state.items.forEach((it, idx) => {
+ const isSelected = idx === this.state.selectedIdx;
+ const isRenamed = isRenamePromptItem(it);
+
+ const title = isRenamed
+ ? `${it.from.name} › ${it.to.name}`.padEnd(labelLength, ' ')
+ : it.name.padEnd(labelLength, ' ');
+
+ const label = isRenamed
+ ? `${chalk.yellow('~')} ${title} ${chalk.gray(`rename ${entityType}`)}`
+ : `${chalk.green('+')} ${title} ${chalk.gray(`create ${entityType}`)}`;
+
+ text += isSelected ? `${selectedPrefix}${label}` : ` ${label}`;
+ text += idx != this.state.items.length - 1 ? '\n' : '';
+ });
+ return text;
+ }
+
+ result(): RenamePropmtItem | T {
+ return this.state.items[this.state.selectedIdx]!;
+ }
+}
+
export class ResolveSelect extends Prompt<
RenamePropmtItem | T
> {
@@ -166,7 +243,7 @@ export class ResolveSelect extends Prompt<
constructor(
private readonly base: T,
data: (RenamePropmtItem | T)[],
- private readonly entityType: 'table' | 'enum' | 'sequence',
+ private readonly entityType: 'table' | 'enum' | 'sequence' | 'view' | 'role',
) {
super();
this.on('attach', (terminal) => terminal.toggleCursor('hide'));
@@ -330,7 +407,11 @@ export type IntrospectStage =
| 'columns'
| 'enums'
| 'indexes'
- | 'fks';
+ | 'policies'
+ | 'checks'
+ | 'fks'
+ | 'views';
+
type IntrospectState = {
[key in IntrospectStage]: {
count: number;
@@ -369,6 +450,21 @@ export class IntrospectProgress extends TaskView {
name: 'foreign keys',
status: 'fetching',
},
+ policies: {
+ count: 0,
+ name: 'policies',
+ status: 'fetching',
+ },
+ checks: {
+ count: 0,
+ name: 'check constraints',
+ status: 'fetching',
+ },
+ views: {
+ count: 0,
+ name: 'views',
+ status: 'fetching',
+ },
};
constructor(private readonly hasEnums: boolean = false) {
@@ -422,6 +518,10 @@ export class IntrospectProgress extends TaskView {
info += this.hasEnums ? this.statusText(spin, this.state.enums) : '';
info += this.statusText(spin, this.state.indexes);
info += this.statusText(spin, this.state.fks);
+ info += this.statusText(spin, this.state.policies);
+ info += this.statusText(spin, this.state.checks);
+ info += this.statusText(spin, this.state.views);
+
return info;
}
}
diff --git a/drizzle-kit/src/extensions/getTablesFilterByExtensions.ts b/drizzle-kit/src/extensions/getTablesFilterByExtensions.ts
new file mode 100644
index 000000000..80321fc6a
--- /dev/null
+++ b/drizzle-kit/src/extensions/getTablesFilterByExtensions.ts
@@ -0,0 +1,16 @@
+import type { Config } from '../index';
+
+export const getTablesFilterByExtensions = ({
+ extensionsFilters,
+ dialect,
+}: Pick): string[] => {
+ if (extensionsFilters) {
+ if (
+ extensionsFilters.includes('postgis')
+ && dialect === 'postgresql'
+ ) {
+ return ['!geography_columns', '!geometry_columns', '!spatial_ref_sys'];
+ }
+ }
+ return [];
+};
diff --git a/drizzle-kit/src/index.ts b/drizzle-kit/src/index.ts
index 08c302ac3..4c55f3eb6 100644
--- a/drizzle-kit/src/index.ts
+++ b/drizzle-kit/src/index.ts
@@ -23,7 +23,7 @@ type Verify = U;
* **Config** usage:
*
* `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
- * *Possible values*: `postgresql`, `mysql`, `sqlite`
+ * *Possible values*: `postgresql`, `mysql`, `sqlite`, `singlestore
*
* See https://orm.drizzle.team/kit-docs/config-reference#dialect
*
@@ -40,7 +40,7 @@ type Verify = U;
*
* ---
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
- * *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`
+ * *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
* If you don't use AWS Data API, D1, Turso or Expo - ypu don't need this driver. You can check a driver strategy choice here: https://orm.drizzle.team/kit-docs/upgrade-21
*
* See https://orm.drizzle.team/kit-docs/config-reference#driver
@@ -64,7 +64,7 @@ type Verify = U;
*
* `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
* It’s optional and true by default, it’s necessary to properly apply migrations on databases,
- * that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite) and
+ * that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite, SingleStore) and
* Drizzle ORM has to apply them sequentially one by one.
*
* See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
@@ -117,6 +117,7 @@ export type Config =
schema?: string | string[];
verbose?: boolean;
strict?: boolean;
+ casing?: 'camelCase' | 'snake_case';
migrations?: {
table?: string;
schema?: string;
@@ -125,18 +126,20 @@ export type Config =
introspect?: {
casing: 'camel' | 'preserve';
};
+ entities?: {
+ roles?: boolean | { provider?: 'supabase' | 'neon' | string & {}; exclude?: string[]; include?: string[] };
+ };
}
& (
| {
- dialect: Verify;
- driver: Verify;
+ dialect: Verify;
dbCredentials: {
url: string;
authToken?: string;
};
}
| {
- dialect: 'sqlite';
+ dialect: Verify;
dbCredentials: {
url: string;
};
@@ -171,6 +174,13 @@ export type Config =
resourceArn: string;
};
}
+ | {
+ dialect: Verify;
+ driver: Verify;
+ dbCredentials: {
+ url: string;
+ };
+ }
| {
dialect: Verify;
dbCredentials:
@@ -199,7 +209,26 @@ export type Config =
dialect: Verify;
driver: Verify;
}
+ | {
+ dialect: Verify;
+ driver: Verify;
+ }
| {}
+ | {
+ dialect: Verify;
+ dbCredentials:
+ | {
+ host: string;
+ port?: number;
+ user?: string;
+ password?: string;
+ database: string;
+ ssl?: string | SslOptions;
+ }
+ | {
+ url: string;
+ };
+ }
);
/**
@@ -209,7 +238,7 @@ export type Config =
* **Config** usage:
*
* `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
- * *Possible values*: `postgresql`, `mysql`, `sqlite`
+ * *Possible values*: `postgresql`, `mysql`, `sqlite`, `singlestore`
*
* See https://orm.drizzle.team/kit-docs/config-reference#dialect
*
@@ -226,7 +255,7 @@ export type Config =
*
* ---
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
- * *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`
+ * *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
* If you don't use AWS Data API, D1, Turso or Expo - ypu don't need this driver. You can check a driver strategy choice here: https://orm.drizzle.team/kit-docs/upgrade-21
*
* See https://orm.drizzle.team/kit-docs/config-reference#driver
@@ -250,7 +279,7 @@ export type Config =
*
* `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
* It’s optional and true by default, it’s necessary to properly apply migrations on databases,
- * that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite) and
+ * that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite, SingleStore) and
* Drizzle ORM has to apply them sequentially one by one.
*
* See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
diff --git a/drizzle-kit/src/introspect-mysql.ts b/drizzle-kit/src/introspect-mysql.ts
index fb1c71428..005a2af42 100644
--- a/drizzle-kit/src/introspect-mysql.ts
+++ b/drizzle-kit/src/introspect-mysql.ts
@@ -1,7 +1,10 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */
+import { toCamelCase } from 'drizzle-orm/casing';
import './@types/utils';
import type { Casing } from './cli/validations/common';
+import { assertUnreachable } from './global';
import {
+ CheckConstraint,
Column,
ForeignKey,
Index,
@@ -11,9 +14,7 @@ import {
UniqueConstraint,
} from './serializer/mysqlSchema';
import { indexName } from './serializer/mysqlSerializer';
-
-// time precision to fsp
-// {mode: "string"} for timestamp by default
+import { unescapeSingleQuotes } from './utils';
const mysqlImportsList = new Set([
'mysqlTable',
@@ -101,15 +102,33 @@ const importsPatch = {
const relations = new Set();
+const escapeColumnKey = (value: string) => {
+ if (/^(?![a-zA-Z_$][a-zA-Z0-9_$]*$).+$/.test(value)) {
+ return `"${value}"`;
+ }
+ return value;
+};
+
const prepareCasing = (casing?: Casing) => (value: string) => {
- if (typeof casing === 'undefined') {
- return value;
+ if (casing === 'preserve') {
+ return escapeColumnKey(value);
}
if (casing === 'camel') {
- return value.camelCase();
+ return escapeColumnKey(value.camelCase());
}
- return value;
+ assertUnreachable(casing);
+};
+
+const dbColumnName = ({ name, casing, withMode = false }: { name: string; casing: Casing; withMode?: boolean }) => {
+ if (casing === 'preserve') {
+ return '';
+ }
+ if (casing === 'camel') {
+ return toCamelCase(name) === name ? '' : withMode ? `"${name}", ` : `"${name}"`;
+ }
+
+ assertUnreachable(casing);
};
export const schemaToTypeScript = (
@@ -135,11 +154,15 @@ export const schemaToTypeScript = (
const uniqueImports = Object.values(it.uniqueConstraints).map(
(it) => 'unique',
);
+ const checkImports = Object.values(it.checkConstraint).map(
+ (it) => 'check',
+ );
res.mysql.push(...idxImports);
res.mysql.push(...fkImpots);
res.mysql.push(...pkImports);
res.mysql.push(...uniqueImports);
+ res.mysql.push(...checkImports);
const columnImports = Object.values(it.columns)
.map((col) => {
@@ -153,6 +176,13 @@ export const schemaToTypeScript = (
patched = patched.startsWith('datetime(') ? 'datetime' : patched;
patched = patched.startsWith('varbinary(') ? 'varbinary' : patched;
patched = patched.startsWith('int(') ? 'int' : patched;
+ patched = patched.startsWith('double(') ? 'double' : patched;
+ patched = patched.startsWith('float(') ? 'float' : patched;
+ patched = patched.startsWith('int unsigned') ? 'int' : patched;
+ patched = patched.startsWith('tinyint unsigned') ? 'tinyint' : patched;
+ patched = patched.startsWith('smallint unsigned') ? 'smallint' : patched;
+ patched = patched.startsWith('mediumint unsigned') ? 'mediumint' : patched;
+ patched = patched.startsWith('bigint unsigned') ? 'bigint' : patched;
return patched;
})
.filter((type) => {
@@ -165,6 +195,37 @@ export const schemaToTypeScript = (
{ mysql: [] as string[] },
);
+ Object.values(schema.views).forEach((it) => {
+ imports.mysql.push('mysqlView');
+
+ const columnImports = Object.values(it.columns)
+ .map((col) => {
+ let patched = importsPatch[col.type] ?? col.type;
+ patched = patched.startsWith('varchar(') ? 'varchar' : patched;
+ patched = patched.startsWith('char(') ? 'char' : patched;
+ patched = patched.startsWith('binary(') ? 'binary' : patched;
+ patched = patched.startsWith('decimal(') ? 'decimal' : patched;
+ patched = patched.startsWith('smallint(') ? 'smallint' : patched;
+ patched = patched.startsWith('enum(') ? 'mysqlEnum' : patched;
+ patched = patched.startsWith('datetime(') ? 'datetime' : patched;
+ patched = patched.startsWith('varbinary(') ? 'varbinary' : patched;
+ patched = patched.startsWith('int(') ? 'int' : patched;
+ patched = patched.startsWith('double(') ? 'double' : patched;
+ patched = patched.startsWith('float(') ? 'float' : patched;
+ patched = patched.startsWith('int unsigned') ? 'int' : patched;
+ patched = patched.startsWith('tinyint unsigned') ? 'tinyint' : patched;
+ patched = patched.startsWith('smallint unsigned') ? 'smallint' : patched;
+ patched = patched.startsWith('mediumint unsigned') ? 'mediumint' : patched;
+ patched = patched.startsWith('bigint unsigned') ? 'bigint' : patched;
+ return patched;
+ })
+ .filter((type) => {
+ return mysqlImportsList.has(type);
+ });
+
+ imports.mysql.push(...columnImports);
+ });
+
const tableStatements = Object.values(schema.tables).map((table) => {
const func = 'mysqlTable';
let statement = '';
@@ -180,6 +241,7 @@ export const schemaToTypeScript = (
Object.values(table.columns),
Object.values(table.foreignKeys),
withCasing,
+ casing,
table.name,
schema,
);
@@ -195,10 +257,10 @@ export const schemaToTypeScript = (
|| filteredFKs.length > 0
|| Object.keys(table.compositePrimaryKeys).length > 0
|| Object.keys(table.uniqueConstraints).length > 0
+ || Object.keys(table.checkConstraint).length > 0
) {
statement += ',\n';
- statement += '(table) => {\n';
- statement += '\treturn {\n';
+ statement += '(table) => [';
statement += createTableIndexes(
table.name,
Object.values(table.indexes),
@@ -213,14 +275,48 @@ export const schemaToTypeScript = (
Object.values(table.uniqueConstraints),
withCasing,
);
- statement += '\t}\n';
- statement += '}';
+ statement += createTableChecks(
+ Object.values(table.checkConstraint),
+ withCasing,
+ );
+ statement += '\n]';
}
statement += ');';
return statement;
});
+ const viewsStatements = Object.values(schema.views).map((view) => {
+ const { columns, name, algorithm, definition, sqlSecurity, withCheckOption } = view;
+ const func = 'mysqlView';
+ let statement = '';
+
+ if (imports.mysql.includes(withCasing(name))) {
+ statement = `// Table name is in conflict with ${
+ withCasing(
+ view.name,
+ )
+ } import.\n// Please change to any other name, that is not in imports list\n`;
+ }
+ statement += `export const ${withCasing(name)} = ${func}("${name}", {\n`;
+ statement += createTableColumns(
+ Object.values(columns),
+ [],
+ withCasing,
+ casing,
+ name,
+ schema,
+ );
+ statement += '})';
+
+ statement += algorithm ? `.algorithm("${algorithm}")` : '';
+ statement += sqlSecurity ? `.sqlSecurity("${sqlSecurity}")` : '';
+ statement += withCheckOption ? `.withCheckOption("${withCheckOption}")` : '';
+ statement += `.as(sql\`${definition?.replaceAll('`', '\\`')}\`);`;
+
+ return statement;
+ });
+
const uniqueMySqlImports = [
'mysqlTable',
'mysqlSchema',
@@ -235,6 +331,8 @@ export const schemaToTypeScript = (
let decalrations = '';
decalrations += tableStatements.join('\n\n');
+ decalrations += '\n';
+ decalrations += viewsStatements.join('\n\n');
const file = importsTs + decalrations;
@@ -290,6 +388,7 @@ const column = (
type: string,
name: string,
casing: (value: string) => string,
+ rawCasing: Casing,
defaultValue?: any,
autoincrement?: boolean,
onUpdate?: boolean,
@@ -301,12 +400,15 @@ const column = (
}
if (lowered === 'serial') {
- return `${casing(name)}: serial("${name}")`;
+ return `${casing(name)}: serial(${dbColumnName({ name, casing: rawCasing })})`;
}
if (lowered.startsWith('int')) {
const isUnsigned = lowered.startsWith('int unsigned');
- let out = `${casing(name)}: int("${name}"${isUnsigned ? ', { unsigned: true }' : ''})`;
+ const columnName = dbColumnName({ name, casing: rawCasing, withMode: isUnsigned });
+ let out = `${casing(name)}: int(${columnName}${
+ isUnsigned ? `${columnName.length > 0 ? ', ' : ''}{ unsigned: true }` : ''
+ })`;
out += autoincrement ? `.autoincrement()` : '';
out += typeof defaultValue !== 'undefined'
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
@@ -316,8 +418,11 @@ const column = (
if (lowered.startsWith('tinyint')) {
const isUnsigned = lowered.startsWith('tinyint unsigned');
+ const columnName = dbColumnName({ name, casing: rawCasing, withMode: isUnsigned });
// let out = `${name.camelCase()}: tinyint("${name}")`;
- let out: string = `${casing(name)}: tinyint("${name}"${isUnsigned ? ', { unsigned: true }' : ''})`;
+ let out: string = `${casing(name)}: tinyint(${columnName}${
+ isUnsigned ? `${columnName.length > 0 ? ', ' : ''}{ unsigned: true }` : ''
+ })`;
out += autoincrement ? `.autoincrement()` : '';
out += typeof defaultValue !== 'undefined'
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
@@ -327,7 +432,10 @@ const column = (
if (lowered.startsWith('smallint')) {
const isUnsigned = lowered.startsWith('smallint unsigned');
- let out = `${casing(name)}: smallint("${name}"${isUnsigned ? ', { unsigned: true }' : ''})`;
+ const columnName = dbColumnName({ name, casing: rawCasing, withMode: isUnsigned });
+ let out = `${casing(name)}: smallint(${columnName}${
+ isUnsigned ? `${columnName.length > 0 ? ', ' : ''}{ unsigned: true }` : ''
+ })`;
out += autoincrement ? `.autoincrement()` : '';
out += defaultValue
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
@@ -337,7 +445,10 @@ const column = (
if (lowered.startsWith('mediumint')) {
const isUnsigned = lowered.startsWith('mediumint unsigned');
- let out = `${casing(name)}: mediumint("${name}"${isUnsigned ? ', { unsigned: true }' : ''})`;
+ const columnName = dbColumnName({ name, casing: rawCasing, withMode: isUnsigned });
+ let out = `${casing(name)}: mediumint(${columnName}${
+ isUnsigned ? `${columnName.length > 0 ? ', ' : ''}{ unsigned: true }` : ''
+ })`;
out += autoincrement ? `.autoincrement()` : '';
out += defaultValue
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
@@ -347,7 +458,9 @@ const column = (
if (lowered.startsWith('bigint')) {
const isUnsigned = lowered.startsWith('bigint unsigned');
- let out = `${casing(name)}: bigint("${name}", { mode: "number"${isUnsigned ? ', unsigned: true' : ''} })`;
+ let out = `${casing(name)}: bigint(${dbColumnName({ name, casing: rawCasing, withMode: true })}{ mode: "number"${
+ isUnsigned ? ', unsigned: true' : ''
+ } })`;
out += autoincrement ? `.autoincrement()` : '';
out += defaultValue
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
@@ -356,7 +469,7 @@ const column = (
}
if (lowered === 'boolean') {
- let out = `${casing(name)}: boolean("${name}")`;
+ let out = `${casing(name)}: boolean(${dbColumnName({ name, casing: rawCasing })})`;
out += defaultValue
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
: '';
@@ -365,19 +478,27 @@ const column = (
if (lowered.startsWith('double')) {
let params:
- | { precision: string | undefined; scale: string | undefined }
+ | { precision?: string; scale?: string; unsigned?: boolean }
| undefined;
- if (lowered.length > 6) {
+ if (lowered.length > (lowered.includes('unsigned') ? 15 : 6)) {
const [precision, scale] = lowered
- .slice(7, lowered.length - 1)
+ .slice(7, lowered.length - (1 + (lowered.includes('unsigned') ? 9 : 0)))
.split(',');
params = { precision, scale };
}
+ if (lowered.includes('unsigned')) {
+ params = { ...(params ?? {}), unsigned: true };
+ }
+
+ const timeConfigParams = params ? timeConfig(params) : undefined;
+
let out = params
- ? `${casing(name)}: double("${name}", ${timeConfig(params)})`
- : `${casing(name)}: double("${name}")`;
+ ? `${casing(name)}: double(${
+ dbColumnName({ name, casing: rawCasing, withMode: timeConfigParams !== undefined })
+ }${timeConfig(params)})`
+ : `${casing(name)}: double(${dbColumnName({ name, casing: rawCasing })})`;
// let out = `${name.camelCase()}: double("${name}")`;
out += defaultValue
@@ -386,8 +507,23 @@ const column = (
return out;
}
- if (lowered === 'float') {
- let out = `${casing(name)}: float("${name}")`;
+ if (lowered.startsWith('float')) {
+ let params:
+ | { precision?: string; scale?: string; unsigned?: boolean }
+ | undefined;
+
+ if (lowered.length > (lowered.includes('unsigned') ? 14 : 5)) {
+ const [precision, scale] = lowered
+ .slice(6, lowered.length - (1 + (lowered.includes('unsigned') ? 9 : 0)))
+ .split(',');
+ params = { precision, scale };
+ }
+
+ if (lowered.includes('unsigned')) {
+ params = { ...(params ?? {}), unsigned: true };
+ }
+
+ let out = `${casing(name)}: float(${dbColumnName({ name, casing: rawCasing })}${params ? timeConfig(params) : ''})`;
out += defaultValue
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
: '';
@@ -395,7 +531,7 @@ const column = (
}
if (lowered === 'real') {
- let out = `${casing(name)}: real("${name}")`;
+ let out = `${casing(name)}: real(${dbColumnName({ name, casing: rawCasing })})`;
out += defaultValue
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
: '';
@@ -412,8 +548,10 @@ const column = (
const params = timeConfig({ fsp, mode: "'string'" });
let out = params
- ? `${casing(name)}: timestamp("${name}", ${params})`
- : `${casing(name)}: timestamp("${name}")`;
+ ? `${casing(name)}: timestamp(${
+ dbColumnName({ name, casing: rawCasing, withMode: params !== undefined })
+ }${params})`
+ : `${casing(name)}: timestamp(${dbColumnName({ name, casing: rawCasing })})`;
// mysql has only CURRENT_TIMESTAMP, as I found from docs. But will leave now() for just a case
defaultValue = defaultValue === 'now()' || defaultValue === '(CURRENT_TIMESTAMP)'
@@ -440,8 +578,8 @@ const column = (
const params = timeConfig({ fsp });
let out = params
- ? `${casing(name)}: time("${name}", ${params})`
- : `${casing(name)}: time("${name}")`;
+ ? `${casing(name)}: time(${dbColumnName({ name, casing: rawCasing, withMode: params !== undefined })}${params})`
+ : `${casing(name)}: time(${dbColumnName({ name, casing: rawCasing })})`;
defaultValue = defaultValue === 'now()'
? '.defaultNow()'
@@ -458,7 +596,7 @@ const column = (
casing(
name,
)
- }: date("${name}", { mode: 'string' })`;
+ }: date(${dbColumnName({ name, casing: rawCasing, withMode: true })}{ mode: 'string' })`;
defaultValue = defaultValue === 'now()'
? '.defaultNow()'
@@ -472,7 +610,7 @@ const column = (
// in mysql text can't have default value. Will leave it in case smth ;)
if (lowered === 'text') {
- let out = `${casing(name)}: text("${name}")`;
+ let out = `${casing(name)}: text(${dbColumnName({ name, casing: rawCasing })})`;
out += defaultValue
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
: '';
@@ -481,7 +619,7 @@ const column = (
// in mysql text can't have default value. Will leave it in case smth ;)
if (lowered === 'tinytext') {
- let out = `${casing(name)}: tinytext("${name}")`;
+ let out = `${casing(name)}: tinytext(${dbColumnName({ name, casing: rawCasing })})`;
out += defaultValue
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
: '';
@@ -490,7 +628,7 @@ const column = (
// in mysql text can't have default value. Will leave it in case smth ;)
if (lowered === 'mediumtext') {
- let out = `${casing(name)}: mediumtext("${name}")`;
+ let out = `${casing(name)}: mediumtext(${dbColumnName({ name, casing: rawCasing })})`;
out += defaultValue
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
: '';
@@ -499,7 +637,7 @@ const column = (
// in mysql text can't have default value. Will leave it in case smth ;)
if (lowered === 'longtext') {
- let out = `${casing(name)}: longtext("${name}")`;
+ let out = `${casing(name)}: longtext(${dbColumnName({ name, casing: rawCasing })})`;
out += defaultValue
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
: '';
@@ -507,7 +645,7 @@ const column = (
}
if (lowered === 'year') {
- let out = `${casing(name)}: year("${name}")`;
+ let out = `${casing(name)}: year(${dbColumnName({ name, casing: rawCasing })})`;
out += defaultValue
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
: '';
@@ -516,7 +654,7 @@ const column = (
// in mysql json can't have default value. Will leave it in case smth ;)
if (lowered === 'json') {
- let out = `${casing(name)}: json("${name}")`;
+ let out = `${casing(name)}: json(${dbColumnName({ name, casing: rawCasing })})`;
out += defaultValue
? `.default(${mapColumnDefaultForJson(defaultValue)})`
@@ -530,15 +668,16 @@ const column = (
casing(
name,
)
- }: varchar("${name}", { length: ${
+ }: varchar(${dbColumnName({ name, casing: rawCasing, withMode: true })}{ length: ${
lowered.substring(
'varchar'.length + 1,
lowered.length - 1,
)
} })`;
+ const mappedDefaultValue = mapColumnDefault(defaultValue, isExpression);
out += defaultValue
- ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ ? `.default(${isExpression ? mappedDefaultValue : unescapeSingleQuotes(mappedDefaultValue, true)})`
: '';
return out;
}
@@ -548,7 +687,7 @@ const column = (
casing(
name,
)
- }: char("${name}", { length: ${
+ }: char(${dbColumnName({ name, casing: rawCasing, withMode: true })}{ length: ${
lowered.substring(
'char'.length + 1,
lowered.length - 1,
@@ -573,13 +712,13 @@ const column = (
casing(
name,
)
- }: datetime("${name}", { mode: 'string', fsp: ${
+ }: datetime(${dbColumnName({ name, casing: rawCasing, withMode: true })}{ mode: 'string', fsp: ${
lowered.substring(
'datetime'.length + 1,
lowered.length - 1,
)
} })`
- : `${casing(name)}: datetime("${name}", { mode: 'string'})`;
+ : `${casing(name)}: datetime(${dbColumnName({ name, casing: rawCasing, withMode: true })}{ mode: 'string'})`;
defaultValue = defaultValue === 'now()'
? '.defaultNow()'
@@ -593,19 +732,27 @@ const column = (
if (lowered.startsWith('decimal')) {
let params:
- | { precision: string | undefined; scale: string | undefined }
+ | { precision?: string; scale?: string; unsigned?: boolean }
| undefined;
- if (lowered.length > 7) {
+ if (lowered.length > (lowered.includes('unsigned') ? 16 : 7)) {
const [precision, scale] = lowered
- .slice(8, lowered.length - 1)
+ .slice(8, lowered.length - (1 + (lowered.includes('unsigned') ? 9 : 0)))
.split(',');
params = { precision, scale };
}
+ if (lowered.includes('unsigned')) {
+ params = { ...(params ?? {}), unsigned: true };
+ }
+
+ const timeConfigParams = params ? timeConfig(params) : undefined;
+
let out = params
- ? `${casing(name)}: decimal("${name}", ${timeConfig(params)})`
- : `${casing(name)}: decimal("${name}")`;
+ ? `${casing(name)}: decimal(${
+ dbColumnName({ name, casing: rawCasing, withMode: timeConfigParams !== undefined })
+ }${timeConfigParams})`
+ : `${casing(name)}: decimal(${dbColumnName({ name, casing: rawCasing })})`;
defaultValue = typeof defaultValue !== 'undefined'
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
@@ -625,8 +772,8 @@ const column = (
const params = binaryConfig({ length });
let out = params
- ? `${casing(name)}: binary("${name}", ${params})`
- : `${casing(name)}: binary("${name}")`;
+ ? `${casing(name)}: binary(${dbColumnName({ name, casing: rawCasing, withMode: params !== undefined })}${params})`
+ : `${casing(name)}: binary(${dbColumnName({ name, casing: rawCasing })})`;
defaultValue = defaultValue
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
@@ -637,10 +784,15 @@ const column = (
}
if (lowered.startsWith('enum')) {
- const values = lowered.substring('enum'.length + 1, lowered.length - 1);
- let out = `${casing(name)}: mysqlEnum("${name}", [${values}])`;
+ const values = lowered
+ .substring('enum'.length + 1, lowered.length - 1)
+ .split(',')
+ .map((v) => unescapeSingleQuotes(v, true))
+ .join(',');
+ let out = `${casing(name)}: mysqlEnum(${dbColumnName({ name, casing: rawCasing, withMode: true })}[${values}])`;
+ const mappedDefaultValue = mapColumnDefault(defaultValue, isExpression);
out += defaultValue
- ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ ? `.default(${isExpression ? mappedDefaultValue : unescapeSingleQuotes(mappedDefaultValue, true)})`
: '';
return out;
}
@@ -655,8 +807,10 @@ const column = (
const params = binaryConfig({ length });
let out = params
- ? `${casing(name)}: varbinary("${name}", ${params})`
- : `${casing(name)}: varbinary("${name}")`;
+ ? `${casing(name)}: varbinary(${
+ dbColumnName({ name, casing: rawCasing, withMode: params !== undefined })
+ }${params})`
+ : `${casing(name)}: varbinary(${dbColumnName({ name, casing: rawCasing })})`;
defaultValue = defaultValue
? `.default(${mapColumnDefault(defaultValue, isExpression)})`
@@ -674,6 +828,7 @@ const createTableColumns = (
columns: Column[],
fks: ForeignKey[],
casing: (val: string) => string,
+ rawCasing: Casing,
tableName: string,
schema: MySqlSchemaInternal,
): string => {
@@ -699,6 +854,7 @@ const createTableColumns = (
it.type,
it.name,
casing,
+ rawCasing,
it.default,
it.autoincrement,
it.onUpdate,
@@ -771,7 +927,7 @@ const createTableIndexes = (
const indexGeneratedName = indexName(tableName, it.columns);
const escapedIndexName = indexGeneratedName === it.name ? '' : `"${it.name}"`;
- statement += `\t\t${idxKey}: `;
+ statement += `\n\t`;
statement += it.isUnique ? 'uniqueIndex(' : 'index(';
statement += `${escapedIndexName})`;
statement += `.on(${
@@ -779,7 +935,6 @@ const createTableIndexes = (
.map((it) => `table.${casing(it)}`)
.join(', ')
}),`;
- statement += `\n`;
});
return statement;
@@ -794,7 +949,7 @@ const createTableUniques = (
unqs.forEach((it) => {
const idxKey = casing(it.name);
- statement += `\t\t${idxKey}: `;
+ statement += `\n\t`;
statement += 'unique(';
statement += `"${it.name}")`;
statement += `.on(${
@@ -802,7 +957,23 @@ const createTableUniques = (
.map((it) => `table.${casing(it)}`)
.join(', ')
}),`;
- statement += `\n`;
+ });
+
+ return statement;
+};
+
+const createTableChecks = (
+ checks: CheckConstraint[],
+ casing: (value: string) => string,
+): string => {
+ let statement = '';
+
+ checks.forEach((it) => {
+ statement += `\n\t`;
+ statement += 'check(';
+ statement += `"${it.name}", `;
+ statement += `sql\`${it.value.replace(/`/g, '\\`')}\`)`;
+ statement += `,`;
});
return statement;
@@ -817,7 +988,7 @@ const createTablePKs = (
pks.forEach((it) => {
let idxKey = casing(it.name);
- statement += `\t\t${idxKey}: `;
+ statement += `\n\t`;
statement += 'primaryKey({ columns: [';
statement += `${
it.columns
@@ -827,7 +998,6 @@ const createTablePKs = (
.join(', ')
}]${it.name ? `, name: "${it.name}"` : ''}}`;
statement += '),';
- statement += `\n`;
});
return statement;
@@ -842,7 +1012,8 @@ const createTableFKs = (
fks.forEach((it) => {
const isSelf = it.tableTo === it.tableFrom;
const tableTo = isSelf ? 'table' : `${casing(it.tableTo)}`;
- statement += `\t\t${casing(it.name)}: foreignKey({\n`;
+ statement += `\n\t`;
+ statement += `foreignKey({\n`;
statement += `\t\t\tcolumns: [${
it.columnsFrom
.map((i) => `table.${casing(i)}`)
@@ -864,7 +1035,7 @@ const createTableFKs = (
? `.onDelete("${it.onDelete}")`
: '';
- statement += `,\n`;
+ statement += `,`;
});
return statement;
diff --git a/drizzle-kit/src/introspect-pg.ts b/drizzle-kit/src/introspect-pg.ts
index d20a96562..4bb65ee0c 100644
--- a/drizzle-kit/src/introspect-pg.ts
+++ b/drizzle-kit/src/introspect-pg.ts
@@ -8,21 +8,23 @@ import {
Relation,
Relations,
} from 'drizzle-orm/relations';
-import { plural, singular } from 'pluralize';
import './@types/utils';
+import { toCamelCase } from 'drizzle-orm/casing';
import { Casing } from './cli/validations/common';
-import { vectorOps } from './extensions/vector';
import { assertUnreachable } from './global';
import {
+ CheckConstraint,
Column,
ForeignKey,
Index,
PgKitInternals,
PgSchemaInternal,
+ Policy,
PrimaryKey,
UniqueConstraint,
} from './serializer/pgSchema';
import { indexName } from './serializer/pgSerializer';
+import { unescapeSingleQuotes } from './utils';
const pgImportsList = new Set([
'pgTable',
@@ -133,13 +135,19 @@ const intervalConfig = (str: string) => {
if (keys.length === 0) return;
let statement = '{ ';
- statement += keys
- .map((it: keyof typeof json) => `${it}: ${json[it]}`)
- .join(', ');
+ statement += keys.map((it: keyof typeof json) => `${it}: ${json[it]}`).join(', ');
statement += ' }';
return statement;
};
+const mapColumnDefault = (defaultValue: any, isExpression?: boolean) => {
+ if (isExpression) {
+ return `sql\`${defaultValue}\``;
+ }
+
+ return defaultValue;
+};
+
const importsPatch = {
'double precision': 'doublePrecision',
'timestamp without time zone': 'timestamp',
@@ -150,12 +158,30 @@ const importsPatch = {
const relations = new Set();
+const escapeColumnKey = (value: string) => {
+ if (/^(?![a-zA-Z_$][a-zA-Z0-9_$]*$).+$/.test(value)) {
+ return `"${value}"`;
+ }
+ return value;
+};
+
const withCasing = (value: string, casing: Casing) => {
if (casing === 'preserve') {
- return value;
+ return escapeColumnKey(value);
+ }
+ if (casing === 'camel') {
+ return escapeColumnKey(value.camelCase());
+ }
+
+ assertUnreachable(casing);
+};
+
+const dbColumnName = ({ name, casing, withMode = false }: { name: string; casing: Casing; withMode?: boolean }) => {
+ if (casing === 'preserve') {
+ return '';
}
if (casing === 'camel') {
- return value.camelCase();
+ return toCamelCase(name) === name ? '' : withMode ? `"${name}", ` : `"${name}"`;
}
assertUnreachable(casing);
@@ -181,10 +207,7 @@ export const relationsToTypeScriptForStudio = (
...relations,
};
- const relationsConfig = extractTablesRelationalConfig(
- relationalSchema,
- createTableRelationsHelpers,
- );
+ const relationsConfig = extractTablesRelationalConfig(relationalSchema, createTableRelationsHelpers);
let result = '';
@@ -213,45 +236,29 @@ export const relationsToTypeScriptForStudio = (
if (is(relation, Many)) {
hasMany = true;
relationsObjAsStr += `\t\t${relation.fieldName}: many(${
- relationsConfig.tableNamesMap[relation.referencedTableName].split(
- '.',
- )[1]
- }${
- typeof relation.relationName !== 'undefined'
- ? `, { relationName: "${relation.relationName}"}`
- : ''
- }),`;
+ relationsConfig.tableNamesMap[relation.referencedTableName].split('.')[1]
+ }${typeof relation.relationName !== 'undefined' ? `, { relationName: "${relation.relationName}"}` : ''}),`;
}
if (is(relation, One)) {
hasOne = true;
relationsObjAsStr += `\t\t${relation.fieldName}: one(${
- relationsConfig.tableNamesMap[relation.referencedTableName].split(
- '.',
- )[1]
+ relationsConfig.tableNamesMap[relation.referencedTableName].split('.')[1]
}, { fields: [${
relation.config?.fields.map(
(c) =>
- `${
- relationsConfig.tableNamesMap[
- getTableName(relation.sourceTable)
- ].split('.')[1]
- }.${findColumnKey(relation.sourceTable, c.name)}`,
+ `${relationsConfig.tableNamesMap[getTableName(relation.sourceTable)].split('.')[1]}.${
+ findColumnKey(relation.sourceTable, c.name)
+ }`,
)
}], references: [${
relation.config?.references.map(
(c) =>
- `${
- relationsConfig.tableNamesMap[
- getTableName(relation.referencedTable)
- ].split('.')[1]
- }.${findColumnKey(relation.referencedTable, c.name)}`,
+ `${relationsConfig.tableNamesMap[getTableName(relation.referencedTable)].split('.')[1]}.${
+ findColumnKey(relation.referencedTable, c.name)
+ }`,
)
- }]${
- typeof relation.relationName !== 'undefined'
- ? `, relationName: "${relation.relationName}"`
- : ''
- }}),`;
+ }]${typeof relation.relationName !== 'undefined' ? `, relationName: "${relation.relationName}"` : ''}}),`;
}
});
@@ -267,15 +274,39 @@ export const relationsToTypeScriptForStudio = (
return result;
};
+function generateIdentityParams(identity: Column['identity']) {
+ let paramsObj = `{ name: "${identity!.name}"`;
+ if (identity?.startWith) {
+ paramsObj += `, startWith: ${identity.startWith}`;
+ }
+ if (identity?.increment) {
+ paramsObj += `, increment: ${identity.increment}`;
+ }
+ if (identity?.minValue) {
+ paramsObj += `, minValue: ${identity.minValue}`;
+ }
+ if (identity?.maxValue) {
+ paramsObj += `, maxValue: ${identity.maxValue}`;
+ }
+ if (identity?.cache) {
+ paramsObj += `, cache: ${identity.cache}`;
+ }
+ if (identity?.cycle) {
+ paramsObj += `, cycle: true`;
+ }
+ paramsObj += ' }';
+ if (identity?.type === 'always') {
+ return `.generatedAlwaysAsIdentity(${paramsObj})`;
+ }
+ return `.generatedByDefaultAsIdentity(${paramsObj})`;
+}
+
export const paramNameFor = (name: string, schema?: string) => {
const schemaSuffix = schema && schema !== 'public' ? `In${schema.capitalise()}` : '';
return `${name}${schemaSuffix}`;
};
-export const schemaToTypeScript = (
- schema: PgSchemaInternal,
- casing: Casing,
-) => {
+export const schemaToTypeScript = (schema: PgSchemaInternal, casing: Casing) => {
// collectFKs
Object.values(schema.tables).forEach((table) => {
Object.values(table.foreignKeys).forEach((fk) => {
@@ -290,22 +321,27 @@ export const schemaToTypeScript = (
}),
);
- const enumTypes = new Set(Object.values(schema.enums).map((it) => it.name));
+ const enumTypes = Object.values(schema.enums).reduce((acc, cur) => {
+ acc.add(`${cur.schema}.${cur.name}`);
+ return acc;
+ }, new Set());
const imports = Object.values(schema.tables).reduce(
(res, it) => {
- const idxImports = Object.values(it.indexes).map((idx) => idx.isUnique ? 'uniqueIndex' : 'index');
+ const idxImports = Object.values(it.indexes).map((idx) => (idx.isUnique ? 'uniqueIndex' : 'index'));
const fkImpots = Object.values(it.foreignKeys).map((it) => 'foreignKey');
- if (
- Object.values(it.foreignKeys).some((it) => isCyclic(it) && !isSelf(it))
- ) {
+ if (Object.values(it.foreignKeys).some((it) => isCyclic(it) && !isSelf(it))) {
res.pg.push('type AnyPgColumn');
}
- const pkImports = Object.values(it.compositePrimaryKeys).map(
- (it) => 'primaryKey',
+ const pkImports = Object.values(it.compositePrimaryKeys).map((it) => 'primaryKey');
+ const uniqueImports = Object.values(it.uniqueConstraints).map((it) => 'unique');
+
+ const checkImports = Object.values(it.checkConstraints).map(
+ (it) => 'check',
);
- const uniqueImports = Object.values(it.uniqueConstraints).map(
- (it) => 'unique',
+
+ const policiesImports = Object.values(it.policies).map(
+ (it) => 'pgPolicy',
);
if (it.schema && it.schema !== 'public' && it.schema !== '') {
@@ -316,14 +352,13 @@ export const schemaToTypeScript = (
res.pg.push(...fkImpots);
res.pg.push(...pkImports);
res.pg.push(...uniqueImports);
-
- if (enumTypes.size > 0) {
- res.pg.push('pgEnum');
- }
+ res.pg.push(...policiesImports);
+ res.pg.push(...checkImports);
const columnImports = Object.values(it.columns)
.map((col) => {
- let patched: string = importsPatch[col.type] || col.type;
+ let patched: string = (importsPatch[col.type] || col.type).replace('[]', '');
+ patched = patched === 'double precision' ? 'doublePrecision' : patched;
patched = patched.startsWith('varchar(') ? 'varchar' : patched;
patched = patched.startsWith('char(') ? 'char' : patched;
patched = patched.startsWith('numeric(') ? 'numeric' : patched;
@@ -343,6 +378,55 @@ export const schemaToTypeScript = (
{ pg: [] as string[] },
);
+ Object.values(schema.views).forEach((it) => {
+ if (it.schema && it.schema !== 'public' && it.schema !== '') {
+ imports.pg.push('pgSchema');
+ } else if (it.schema === 'public') {
+ it.materialized ? imports.pg.push('pgMaterializedView') : imports.pg.push('pgView');
+ }
+
+ Object.values(it.columns).forEach(() => {
+ const columnImports = Object.values(it.columns)
+ .map((col) => {
+ let patched: string = (importsPatch[col.type] || col.type).replace('[]', '');
+ patched = patched === 'double precision' ? 'doublePrecision' : patched;
+ patched = patched.startsWith('varchar(') ? 'varchar' : patched;
+ patched = patched.startsWith('char(') ? 'char' : patched;
+ patched = patched.startsWith('numeric(') ? 'numeric' : patched;
+ patched = patched.startsWith('time(') ? 'time' : patched;
+ patched = patched.startsWith('timestamp(') ? 'timestamp' : patched;
+ patched = patched.startsWith('vector(') ? 'vector' : patched;
+ patched = patched.startsWith('geometry(') ? 'geometry' : patched;
+ return patched;
+ })
+ .filter((type) => {
+ return pgImportsList.has(type);
+ });
+
+ imports.pg.push(...columnImports);
+ });
+ });
+
+ Object.values(schema.sequences).forEach((it) => {
+ if (it.schema && it.schema !== 'public' && it.schema !== '') {
+ imports.pg.push('pgSchema');
+ } else if (it.schema === 'public') {
+ imports.pg.push('pgSequence');
+ }
+ });
+
+ Object.values(schema.enums).forEach((it) => {
+ if (it.schema && it.schema !== 'public' && it.schema !== '') {
+ imports.pg.push('pgSchema');
+ } else if (it.schema === 'public') {
+ imports.pg.push('pgEnum');
+ }
+ });
+
+ if (Object.keys(schema.roles).length > 0) {
+ imports.pg.push('pgRole');
+ }
+
const enumStatements = Object.values(schema.enums)
.map((it) => {
const enumSchema = schemas[it.schema];
@@ -352,13 +436,50 @@ export const schemaToTypeScript = (
const func = enumSchema ? `${enumSchema}.enum` : 'pgEnum';
const values = Object.values(it.values)
- .map((it) => `'${it}'`)
+ .map((it) => `'${unescapeSingleQuotes(it, false)}'`)
.join(', ');
return `export const ${withCasing(paramName, casing)} = ${func}("${it.name}", [${values}])\n`;
})
.join('')
.concat('\n');
+ const sequencesStatements = Object.values(schema.sequences)
+ .map((it) => {
+ const seqSchema = schemas[it.schema];
+ const paramName = paramNameFor(it.name, seqSchema);
+
+ const func = seqSchema ? `${seqSchema}.sequence` : 'pgSequence';
+
+ let params = '';
+
+ if (it.startWith) {
+ params += `, startWith: "${it.startWith}"`;
+ }
+ if (it.increment) {
+ params += `, increment: "${it.increment}"`;
+ }
+ if (it.minValue) {
+ params += `, minValue: "${it.minValue}"`;
+ }
+ if (it.maxValue) {
+ params += `, maxValue: "${it.maxValue}"`;
+ }
+ if (it.cache) {
+ params += `, cache: "${it.cache}"`;
+ }
+ if (it.cycle) {
+ params += `, cycle: true`;
+ } else {
+ params += `, cycle: false`;
+ }
+
+ return `export const ${withCasing(paramName, casing)} = ${func}("${it.name}"${
+ params ? `, { ${params.trimChar(',')} }` : ''
+ })\n`;
+ })
+ .join('')
+ .concat('');
+
const schemaStatements = Object.entries(schemas)
// .filter((it) => it[0] !== "public")
.map((it) => {
@@ -366,6 +487,24 @@ export const schemaToTypeScript = (
})
.join('');
+ const rolesNameToTsKey: Record = {};
+
+ const rolesStatements = Object.entries(schema.roles)
+ .map((it) => {
+ const fields = it[1];
+ rolesNameToTsKey[fields.name] = it[0];
+ return `export const ${withCasing(it[0], casing)} = pgRole("${fields.name}", ${
+ !fields.createDb && !fields.createRole && fields.inherit
+ ? ''
+ : `${
+ `, { ${fields.createDb ? `createDb: true,` : ''}${fields.createRole ? ` createRole: true,` : ''}${
+ !fields.inherit ? ` inherit: false ` : ''
+ }`.trimChar(',')
+ }}`
+ } );\n`;
+ })
+ .join('');
+
const tableStatements = Object.values(schema.tables).map((table) => {
const tableSchema = schemas[table.schema];
const paramName = paramNameFor(table.name, tableSchema);
@@ -384,25 +523,23 @@ export const schemaToTypeScript = (
statement += '}';
// more than 2 fields or self reference or cyclic
- const filteredFKs = Object.values(table.foreignKeys).filter((it) => {
- return it.columnsFrom.length > 1 || isSelf(it);
- });
+ // Andrii: I switched this one off until we will get custom names in .references()
+ // const filteredFKs = Object.values(table.foreignKeys).filter((it) => {
+ // return it.columnsFrom.length > 1 || isSelf(it);
+ // });
if (
Object.keys(table.indexes).length > 0
- || filteredFKs.length > 0
+ || Object.values(table.foreignKeys).length > 0
+ || Object.values(table.policies).length > 0
|| Object.keys(table.compositePrimaryKeys).length > 0
|| Object.keys(table.uniqueConstraints).length > 0
+ || Object.keys(table.checkConstraints).length > 0
) {
- statement += ',\n';
- statement += '(table) => {\n';
- statement += '\treturn {\n';
- statement += createTableIndexes(
- table.name,
- Object.values(table.indexes),
- casing,
- );
- statement += createTableFKs(Object.values(filteredFKs), schemas, casing);
+ statement += ', ';
+ statement += '(table) => [';
+ statement += createTableIndexes(table.name, Object.values(table.indexes), casing);
+ statement += createTableFKs(Object.values(table.foreignKeys), schemas, casing);
statement += createTablePKs(
Object.values(table.compositePrimaryKeys),
casing,
@@ -411,14 +548,59 @@ export const schemaToTypeScript = (
Object.values(table.uniqueConstraints),
casing,
);
- statement += '\t}\n';
- statement += '}';
+ statement += createTablePolicies(
+ Object.values(table.policies),
+ casing,
+ rolesNameToTsKey,
+ );
+ statement += createTableChecks(
+ Object.values(table.checkConstraints),
+ casing,
+ );
+ statement += '\n]';
}
statement += ');';
return statement;
});
+ const viewsStatements = Object.values(schema.views)
+ .map((it) => {
+ const viewSchema = schemas[it.schema];
+
+ const paramName = paramNameFor(it.name, viewSchema);
+
+ const func = viewSchema
+ ? (it.materialized ? `${viewSchema}.materializedView` : `${viewSchema}.view`)
+ : it.materialized
+ ? 'pgMaterializedView'
+ : 'pgView';
+
+ const withOption = it.with ?? '';
+
+ const as = `sql\`${it.definition}\``;
+
+ const tablespace = it.tablespace ?? '';
+
+ const columns = createTableColumns(
+ '',
+ Object.values(it.columns),
+ [],
+ enumTypes,
+ schemas,
+ casing,
+ schema.internal,
+ );
+
+ let statement = `export const ${withCasing(paramName, casing)} = ${func}("${it.name}", {${columns}})`;
+ statement += tablespace ? `.tablespace("${tablespace}")` : '';
+ statement += withOption ? `.with(${JSON.stringify(withOption)})` : '';
+ statement += `.as(${as});`;
+
+ return statement;
+ })
+ .join('\n\n');
+
const uniquePgImports = ['pgTable', ...new Set(imports.pg)];
const importsTs = `import { ${
@@ -426,12 +608,16 @@ export const schemaToTypeScript = (
', ',
)
} } from "drizzle-orm/pg-core"
- import { sql } from "drizzle-orm"\n\n`;
+import { sql } from "drizzle-orm"\n\n`;
let decalrations = schemaStatements;
+ decalrations += rolesStatements;
decalrations += enumStatements;
+ decalrations += sequencesStatements;
decalrations += '\n';
decalrations += tableStatements.join('\n\n');
+ decalrations += '\n';
+ decalrations += viewsStatements;
const file = importsTs + decalrations;
@@ -459,103 +645,278 @@ const isSelf = (fk: ForeignKey) => {
return fk.tableFrom === fk.tableTo;
};
+const buildArrayDefault = (defaultValue: string, typeName: string): string => {
+ if (typeof defaultValue === 'string' && !(defaultValue.startsWith('{') || defaultValue.startsWith("'{"))) {
+ return `sql\`${defaultValue}\``;
+ }
+ defaultValue = defaultValue.substring(2, defaultValue.length - 2);
+ return `[${
+ defaultValue
+ .split(/\s*,\s*/g)
+ .map((value) => {
+ // if (['integer', 'smallint', 'bigint', 'double precision', 'real'].includes(typeName)) {
+ // return value;
+ // } else if (typeName === 'interval') {
+ // return value.replaceAll('"', "'");
+ // } else if (typeName === 'boolean') {
+ // return value === 't' ? 'true' : 'false';
+ if (typeName === 'json' || typeName === 'jsonb') {
+ return value.substring(1, value.length - 1).replaceAll('\\', '');
+ }
+ return value;
+ // }
+ })
+ .join(', ')
+ }]`;
+};
+
+const mapDefault = (
+ tableName: string,
+ type: string,
+ name: string,
+ enumTypes: Set,
+ typeSchema: string,
+ defaultValue?: any,
+ internals?: PgKitInternals,
+) => {
+ const isExpression = internals?.tables[tableName]?.columns[name]?.isDefaultAnExpression ?? false;
+ const isArray = internals?.tables[tableName]?.columns[name]?.isArray ?? false;
+ const lowered = type.toLowerCase().replace('[]', '');
+
+ if (isArray) {
+ return typeof defaultValue !== 'undefined' ? `.default(${buildArrayDefault(defaultValue, lowered)})` : '';
+ }
+
+ if (enumTypes.has(`${typeSchema}.${type.replace('[]', '')}`)) {
+ return typeof defaultValue !== 'undefined'
+ ? `.default(${mapColumnDefault(unescapeSingleQuotes(defaultValue, true), isExpression)})`
+ : '';
+ }
+
+ if (lowered.startsWith('integer')) {
+ return typeof defaultValue !== 'undefined' ? `.default(${mapColumnDefault(defaultValue, isExpression)})` : '';
+ }
+
+ if (lowered.startsWith('smallint')) {
+ return typeof defaultValue !== 'undefined' ? `.default(${mapColumnDefault(defaultValue, isExpression)})` : '';
+ }
+
+ if (lowered.startsWith('bigint')) {
+ return typeof defaultValue !== 'undefined' ? `.default(${mapColumnDefault(defaultValue, isExpression)})` : '';
+ }
+
+ if (lowered.startsWith('boolean')) {
+ return typeof defaultValue !== 'undefined' ? `.default(${mapColumnDefault(defaultValue, isExpression)})` : '';
+ }
+
+ if (lowered.startsWith('double precision')) {
+ return typeof defaultValue !== 'undefined' ? `.default(${mapColumnDefault(defaultValue, isExpression)})` : '';
+ }
+
+ if (lowered.startsWith('real')) {
+ return typeof defaultValue !== 'undefined' ? `.default(${mapColumnDefault(defaultValue, isExpression)})` : '';
+ }
+
+ if (lowered.startsWith('uuid')) {
+ return defaultValue === 'gen_random_uuid()'
+ ? '.defaultRandom()'
+ : defaultValue
+ ? `.default(sql\`${defaultValue}\`)`
+ : '';
+ }
+
+ if (lowered.startsWith('numeric')) {
+ defaultValue = defaultValue
+ ? (defaultValue.startsWith(`'`) && defaultValue.endsWith(`'`)
+ ? defaultValue.substring(1, defaultValue.length - 1)
+ : defaultValue)
+ : undefined;
+ return defaultValue ? `.default('${mapColumnDefault(defaultValue, isExpression)}')` : '';
+ }
+
+ if (lowered.startsWith('timestamp')) {
+ return defaultValue === 'now()'
+ ? '.defaultNow()'
+ : /^'\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(\.\d+)?([+-]\d{2}(:\d{2})?)?'$/.test(defaultValue) // Matches 'YYYY-MM-DD HH:MI:SS', 'YYYY-MM-DD HH:MI:SS.FFFFFF', 'YYYY-MM-DD HH:MI:SS+TZ', 'YYYY-MM-DD HH:MI:SS.FFFFFF+TZ' and 'YYYY-MM-DD HH:MI:SS+HH:MI'
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : defaultValue
+ ? `.default(sql\`${defaultValue}\`)`
+ : '';
+ }
+
+ if (lowered.startsWith('time')) {
+ return defaultValue === 'now()'
+ ? '.defaultNow()'
+ : /^'\d{2}:\d{2}(:\d{2})?(\.\d+)?'$/.test(defaultValue) // Matches 'HH:MI', 'HH:MI:SS' and 'HH:MI:SS.FFFFFF'
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : defaultValue
+ ? `.default(sql\`${defaultValue}\`)`
+ : '';
+ }
+
+ if (lowered.startsWith('interval')) {
+ return defaultValue ? `.default(${mapColumnDefault(defaultValue, isExpression)})` : '';
+ }
+
+ if (lowered === 'date') {
+ return defaultValue === 'now()'
+ ? '.defaultNow()'
+ : /^'\d{4}-\d{2}-\d{2}'$/.test(defaultValue) // Matches 'YYYY-MM-DD'
+ ? `.default(${defaultValue})`
+ : defaultValue
+ ? `.default(sql\`${defaultValue}\`)`
+ : '';
+ }
+
+ if (lowered.startsWith('text')) {
+ return typeof defaultValue !== 'undefined'
+ ? `.default(${mapColumnDefault(unescapeSingleQuotes(defaultValue, true), isExpression)})`
+ : '';
+ }
+
+ if (lowered.startsWith('jsonb')) {
+ const def = typeof defaultValue !== 'undefined'
+ ? defaultValue.replace(/::(.*?)(?,
+ typeSchema: string,
casing: Casing,
defaultValue?: any,
internals?: PgKitInternals,
) => {
- const lowered = type.toLowerCase();
+ const isExpression = internals?.tables[tableName]?.columns[name]?.isDefaultAnExpression ?? false;
+ const lowered = type.toLowerCase().replace('[]', '');
+
+ if (enumTypes.has(`${typeSchema}.${type.replace('[]', '')}`)) {
+ let out = `${withCasing(name, casing)}: ${withCasing(paramNameFor(type.replace('[]', ''), typeSchema), casing)}(${
+ dbColumnName({ name, casing })
+ })`;
+ return out;
+ }
+
if (lowered.startsWith('serial')) {
- return `${withCasing(name, casing)}: serial("${name}")`;
+ return `${withCasing(name, casing)}: serial(${dbColumnName({ name, casing })})`;
}
if (lowered.startsWith('smallserial')) {
- return `${withCasing(name, casing)}: smallserial("${name}")`;
+ return `${withCasing(name, casing)}: smallserial(${dbColumnName({ name, casing })})`;
}
if (lowered.startsWith('bigserial')) {
- return `${
- withCasing(
- name,
- casing,
- )
- }: bigserial("${name}", { mode: "bigint" })`;
+ return `${withCasing(name, casing)}: bigserial(${
+ dbColumnName({ name, casing, withMode: true })
+ }{ mode: "bigint" })`;
}
if (lowered.startsWith('integer')) {
- let out = `${withCasing(name, casing)}: integer("${name}")`;
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
+ let out = `${withCasing(name, casing)}: integer(${dbColumnName({ name, casing })})`;
return out;
}
if (lowered.startsWith('smallint')) {
- let out = `${withCasing(name, casing)}: smallint("${name}")`;
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
+ let out = `${withCasing(name, casing)}: smallint(${dbColumnName({ name, casing })})`;
return out;
}
if (lowered.startsWith('bigint')) {
let out = `// You can use { mode: "bigint" } if numbers are exceeding js number limitations\n\t`;
- out += `${withCasing(name, casing)}: bigint("${name}", { mode: "number" })`;
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
+ out += `${withCasing(name, casing)}: bigint(${dbColumnName({ name, casing, withMode: true })}{ mode: "number" })`;
return out;
}
if (lowered.startsWith('boolean')) {
- let out = `${withCasing(name, casing)}: boolean("${name}")`;
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
+ let out = `${withCasing(name, casing)}: boolean(${dbColumnName({ name, casing })})`;
return out;
}
if (lowered.startsWith('double precision')) {
- let out = `${withCasing(name, casing)}: doublePrecision("${name}")`;
- out += defaultValue ? `.default(${defaultValue})` : '';
+ let out = `${withCasing(name, casing)}: doublePrecision(${dbColumnName({ name, casing })})`;
return out;
}
if (lowered.startsWith('real')) {
- let out = `${withCasing(name, casing)}: real("${name}")`;
- out += defaultValue ? `.default(${defaultValue})` : '';
+ let out = `${withCasing(name, casing)}: real(${dbColumnName({ name, casing })})`;
return out;
}
if (lowered.startsWith('uuid')) {
- let out = `${withCasing(name, casing)}: uuid("${name}")`;
+ let out = `${withCasing(name, casing)}: uuid(${dbColumnName({ name, casing })})`;
- out += defaultValue === 'gen_random_uuid()'
- ? '.defaultRandom()'
- : defaultValue
- ? `.default(sql\`${defaultValue}\`)`
- : '';
return out;
}
if (lowered.startsWith('numeric')) {
- let params:
- | { precision: string | undefined; scale: string | undefined }
- | undefined;
+ let params: { precision: string | undefined; scale: string | undefined } | undefined;
if (lowered.length > 7) {
- const [precision, scale] = lowered
- .slice(8, lowered.length - 1)
- .split(',');
+ const [precision, scale] = lowered.slice(8, lowered.length - 1).split(',');
params = { precision, scale };
}
let out = params
- ? `${withCasing(name, casing)}: numeric("${name}", ${timeConfig(params)})`
- : `${withCasing(name, casing)}: numeric("${name}")`;
-
- defaultValue = defaultValue
- ? defaultValue.startsWith(`'`) && defaultValue.endsWith(`'`)
- ? defaultValue.substring(1, defaultValue.length - 1)
- : defaultValue
- : undefined;
- out += defaultValue ? `.default('${defaultValue}')` : '';
+ ? `${withCasing(name, casing)}: numeric(${dbColumnName({ name, casing, withMode: true })}${timeConfig(params)})`
+ : `${withCasing(name, casing)}: numeric(${dbColumnName({ name, casing })})`;
return out;
}
@@ -564,11 +925,7 @@ const column = (
const withTimezone = lowered.includes('with time zone');
// const split = lowered.split(" ");
let precision = lowered.startsWith('timestamp(')
- ? Number(
- lowered
- .split(' ')[0]
- .substring('timestamp('.length, lowered.split(' ')[0].length - 1),
- )
+ ? Number(lowered.split(' ')[0].substring('timestamp('.length, lowered.split(' ')[0].length - 1))
: null;
precision = precision ? precision : null;
@@ -579,24 +936,9 @@ const column = (
});
let out = params
- ? `${withCasing(name, casing)}: timestamp("${name}", ${params})`
- : `${withCasing(name, casing)}: timestamp("${name}")`;
-
- // defaultValue = defaultValue?.endsWith("::timestamp without time zone")
- // ? defaultValue.substring(0, defaultValue.length - 29)
- // : defaultValue;
-
- // defaultValue = defaultValue?.endsWith("::timestamp with time zone")
- // ? defaultValue.substring(0, defaultValue.length - 26)
- // : defaultValue;
-
- defaultValue = defaultValue === 'now()' || defaultValue === 'CURRENT_TIMESTAMP'
- ? '.defaultNow()'
- : defaultValue
- ? `.default(${defaultValue})`
- : '';
+ ? `${withCasing(name, casing)}: timestamp(${dbColumnName({ name, casing, withMode: true })}${params})`
+ : `${withCasing(name, casing)}: timestamp(${dbColumnName({ name, casing })})`;
- out += defaultValue;
return out;
}
@@ -604,27 +946,16 @@ const column = (
const withTimezone = lowered.includes('with time zone');
let precision = lowered.startsWith('time(')
- ? Number(
- lowered
- .split(' ')[0]
- .substring('time('.length, lowered.split(' ')[0].length - 1),
- )
+ ? Number(lowered.split(' ')[0].substring('time('.length, lowered.split(' ')[0].length - 1))
: null;
precision = precision ? precision : null;
const params = timeConfig({ precision, withTimezone });
let out = params
- ? `${withCasing(name, casing)}: time("${name}", ${params})`
- : `${withCasing(name, casing)}: time("${name}")`;
+ ? `${withCasing(name, casing)}: time(${dbColumnName({ name, casing, withMode: true })}${params})`
+ : `${withCasing(name, casing)}: time(${dbColumnName({ name, casing })})`;
- defaultValue = defaultValue === 'now()'
- ? '.defaultNow()'
- : defaultValue
- ? `.default(${defaultValue})`
- : '';
-
- out += defaultValue;
return out;
}
@@ -637,144 +968,73 @@ const column = (
const params = intervalConfig(lowered);
let out = params
- ? `${withCasing(name, casing)}: interval("${name}", ${params})`
- : `${withCasing(name, casing)}: interval("${name}")`;
+ ? `${withCasing(name, casing)}: interval(${dbColumnName({ name, casing, withMode: true })}${params})`
+ : `${withCasing(name, casing)}: interval(${dbColumnName({ name, casing })})`;
- out += defaultValue ? `.default(${defaultValue})` : '';
return out;
}
if (lowered === 'date') {
- let out = `${withCasing(name, casing)}: date("${name}")`;
+ let out = `${withCasing(name, casing)}: date(${dbColumnName({ name, casing })})`;
- defaultValue = defaultValue === 'now()'
- ? '.defaultNow()'
- : defaultValue === 'CURRENT_DATE'
- ? `.default(sql\`${defaultValue}\`)`
- : defaultValue
- ? `.default(${defaultValue})`
- : '';
-
- out += defaultValue;
return out;
}
if (lowered.startsWith('text')) {
- let out = `${withCasing(name, casing)}: text("${name}")`;
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
+ let out = `${withCasing(name, casing)}: text(${dbColumnName({ name, casing })})`;
return out;
}
- if (lowered === 'json') {
- let out = `${withCasing(name, casing)}: json("${name}")`;
- // defaultValue = defaultValue?.replace("::json", "");
-
- defaultValue = defaultValue?.endsWith('::json')
- ? defaultValue.substring(1, defaultValue.length - 7)
- : defaultValue;
- // const def = defaultValue ? objToStatement(JSON.parse(defaultValue)) : null;
- const def = defaultValue ? defaultValue : null;
-
- out += typeof defaultValue !== 'undefined' ? `.default(${def})` : '';
+ if (lowered.startsWith('jsonb')) {
+ let out = `${withCasing(name, casing)}: jsonb(${dbColumnName({ name, casing })})`;
return out;
}
- if (lowered === 'jsonb') {
- let out = `${withCasing(name, casing)}: jsonb("${name}")`;
-
- defaultValue = defaultValue?.endsWith('::jsonb')
- ? defaultValue.substring(1, defaultValue.length - 8)
- : defaultValue;
- // const def = defaultValue ? objToStatement(JSON.parse(defaultValue)) : null;
- const def = typeof defaultValue !== 'undefined' ? defaultValue : null;
-
- out += defaultValue ? `.default(${def})` : '';
+ if (lowered.startsWith('json')) {
+ let out = `${withCasing(name, casing)}: json(${dbColumnName({ name, casing })})`;
return out;
}
if (lowered.startsWith('inet')) {
- let out = `${withCasing(name, casing)}: inet("${name}")`;
-
- // defaultValue = defaultValue?.endsWith("::inet")
- // ? defaultValue.substring(0, defaultValue.length - 6)
- // : defaultValue;
-
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
+ let out = `${withCasing(name, casing)}: inet(${dbColumnName({ name, casing })})`;
return out;
}
if (lowered.startsWith('cidr')) {
- let out = `${withCasing(name, casing)}: cidr("${name}")`;
-
- // defaultValue = defaultValue?.endsWith("::cidr")
- // ? defaultValue.substring(0, defaultValue.length - 6)
- // : defaultValue;
-
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
+ let out = `${withCasing(name, casing)}: cidr(${dbColumnName({ name, casing })})`;
return out;
}
- if (lowered.startsWith('macaddr')) {
- let out = `${withCasing(name, casing)}: macaddr("${name}")`;
-
- // defaultValue = defaultValue?.endsWith("::macaddr")
- // ? defaultValue.substring(0, defaultValue.length - 9)
- // : defaultValue;
-
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
+ if (lowered.startsWith('macaddr8')) {
+ let out = `${withCasing(name, casing)}: macaddr8(${dbColumnName({ name, casing })})`;
return out;
}
- if (lowered.startsWith('macaddr8')) {
- let out = `${withCasing(name, casing)}: macaddr8("${name}")`;
-
- // defaultValue = defaultValue?.endsWith("::macaddr8")
- // ? defaultValue.substring(0, defaultValue.length - 10)
- // : defaultValue;
-
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
+ if (lowered.startsWith('macaddr')) {
+ let out = `${withCasing(name, casing)}: macaddr(${dbColumnName({ name, casing })})`;
return out;
}
if (lowered.startsWith('varchar')) {
- const split = lowered.split(' ');
-
let out: string;
if (lowered.length !== 7) {
- out = `${
- withCasing(
- name,
- casing,
- )
- }: varchar("${name}", { length: ${
- lowered.substring(
- 8,
- lowered.length - 1,
- )
+ out = `${withCasing(name, casing)}: varchar(${dbColumnName({ name, casing, withMode: true })}{ length: ${
+ lowered.substring(8, lowered.length - 1)
} })`;
} else {
- out = `${withCasing(name, casing)}: varchar("${name}")`;
+ out = `${withCasing(name, casing)}: varchar(${dbColumnName({ name, casing })})`;
}
- // defaultValue = defaultValue?.endsWith("::character varying")
- // ? defaultValue.substring(0, defaultValue.length - 19)
- // : defaultValue;
-
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
return out;
}
if (lowered.startsWith('point')) {
- let out: string = `${withCasing(name, casing)}: point("${name}")`;
-
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
+ let out: string = `${withCasing(name, casing)}: point(${dbColumnName({ name, casing })})`;
return out;
}
if (lowered.startsWith('line')) {
- let out: string = `${withCasing(name, casing)}: point("${name}")`;
-
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
+ let out: string = `${withCasing(name, casing)}: point(${dbColumnName({ name, casing })})`;
return out;
}
@@ -786,20 +1046,20 @@ const column = (
if (lowered.length !== 8) {
const geometryOptions = lowered.slice(9, -1).split(',');
if (geometryOptions.length === 1 && geometryOptions[0] !== '') {
- out = `${withCasing(name, casing)}: geometry("${name}", { type: "${geometryOptions[0]}" })`;
+ out = `${withCasing(name, casing)}: geometry(${dbColumnName({ name, casing, withMode: true })}{ type: "${
+ geometryOptions[0]
+ }" })`;
} else if (geometryOptions.length === 2) {
- out = `${withCasing(name, casing)}: geometry("${name}", { type: "${geometryOptions[0]}", srid: ${
- geometryOptions[1]
- } })`;
+ out = `${withCasing(name, casing)}: geometry(${dbColumnName({ name, casing, withMode: true })}{ type: "${
+ geometryOptions[0]
+ }", srid: ${geometryOptions[1]} })`;
} else {
isGeoUnknown = true;
}
} else {
- out = `${withCasing(name, casing)}: geometry("${name}")`;
+ out = `${withCasing(name, casing)}: geometry(${dbColumnName({ name, casing })})`;
}
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
-
if (isGeoUnknown) {
let unknown =
`// TODO: failed to parse geometry type because found more than 2 options inside geometry function '${type}'\n// Introspect is currently supporting only type and srid options\n`;
@@ -810,85 +1070,28 @@ const column = (
}
if (lowered.startsWith('vector')) {
- const split = lowered.split(' ');
-
let out: string;
if (lowered.length !== 6) {
- out = `${
- withCasing(
- name,
- casing,
- )
- }: vector("${name}", { dimensions: ${
- lowered.substring(
- 7,
- lowered.length - 1,
- )
+ out = `${withCasing(name, casing)}: vector(${dbColumnName({ name, casing, withMode: true })}{ dimensions: ${
+ lowered.substring(7, lowered.length - 1)
} })`;
} else {
- out = `${withCasing(name, casing)}: vector("${name}")`;
+ out = `${withCasing(name, casing)}: vector(${dbColumnName({ name, casing })})`;
}
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
return out;
}
if (lowered.startsWith('char')) {
- // const split = lowered.split(" ");
-
let out: string;
if (lowered.length !== 4) {
- out = `${
- withCasing(
- name,
- casing,
- )
- }: char("${name}", { length: ${
- lowered.substring(
- 5,
- lowered.length - 1,
- )
+ out = `${withCasing(name, casing)}: char(${dbColumnName({ name, casing, withMode: true })}{ length: ${
+ lowered.substring(5, lowered.length - 1)
} })`;
} else {
- out = `${withCasing(name, casing)}: char("${name}")`;
- }
-
- // defaultValue = defaultValue?.endsWith("::bpchar")
- // ? defaultValue.substring(0, defaultValue.length - 8)
- // : defaultValue;
-
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
- return out;
- }
-
- // if internal has this column - use it
- const columnInternals = internals?.tables[tableName]?.columns[name];
- if (typeof columnInternals !== 'undefined') {
- // it means there is enum as array case
- if (
- columnInternals.isArray
- && columnInternals.rawType
- && enumTypes.has(columnInternals.rawType)
- ) {
- let out = `${withCasing(columnInternals.rawType, casing)}: ${
- withCasing(
- columnInternals.rawType,
- casing,
- )
- }("${name}")`;
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
- return out;
+ out = `${withCasing(name, casing)}: char(${dbColumnName({ name, casing })})`;
}
- }
- if (enumTypes.has(type)) {
- let out = `${withCasing(name, casing)}: ${
- withCasing(
- type,
- casing,
- )
- }("${name}")`;
- out += typeof defaultValue !== 'undefined' ? `.default(${defaultValue})` : '';
return out;
}
@@ -937,6 +1140,7 @@ const createTableColumns = (
it.type,
it.name,
enumTypes,
+ it.typeSchema ?? 'public',
casing,
it.default,
internals,
@@ -945,77 +1149,48 @@ const createTableColumns = (
statement += columnStatement;
// Provide just this in column function
if (internals?.tables[tableName]?.columns[it.name]?.isArray) {
- statement += dimensionsInArray(
- internals?.tables[tableName]?.columns[it.name]?.dimensions,
- );
+ statement += dimensionsInArray(internals?.tables[tableName]?.columns[it.name]?.dimensions);
}
+ statement += mapDefault(tableName, it.type, it.name, enumTypes, it.typeSchema ?? 'public', it.default, internals);
statement += it.primaryKey ? '.primaryKey()' : '';
statement += it.notNull && !it.identity ? '.notNull()' : '';
- function generateIdentityParams(identity: Column['identity']) {
- let paramsObj = `{ name: "${identity!.name}"`;
- if (identity?.startWith) {
- paramsObj += `, startWith: ${identity.startWith}`;
- }
- if (identity?.increment) {
- paramsObj += `, increment: ${identity.increment}`;
- }
- if (identity?.minValue) {
- paramsObj += `, minValue: ${identity.minValue}`;
- }
- if (identity?.maxValue) {
- paramsObj += `, maxValue: ${identity.maxValue}`;
- }
- if (identity?.cache) {
- paramsObj += `, cache: ${identity.cache}`;
- }
- if (identity?.cycle) {
- paramsObj += `, cycle: true`;
- }
- paramsObj += ' }';
- if (identity?.type === 'always') {
- return `.generatedAlwaysAsIdentity(${paramsObj})`;
- }
- return `.generatedByDefaultAsIdentity(${paramsObj})`;
- }
-
statement += it.identity ? generateIdentityParams(it.identity) : '';
- statement += it.generated
- ? `.generatedAlwaysAs(sql\`${it.generated.as}\`)`
- : '';
-
- const fks = fkByColumnName[it.name];
- if (fks) {
- const fksStatement = fks
- .map((it) => {
- const onDelete = it.onDelete && it.onDelete !== 'no action' ? it.onDelete : null;
- const onUpdate = it.onUpdate && it.onUpdate !== 'no action' ? it.onUpdate : null;
- const params = { onDelete, onUpdate };
-
- const typeSuffix = isCyclic(it) ? ': AnyPgColumn' : '';
-
- const paramsStr = objToStatement2(params);
- const tableSchema = schemas[it.schemaTo || ''];
- const paramName = paramNameFor(it.tableTo, tableSchema);
- if (paramsStr) {
- return `.references(()${typeSuffix} => ${
- withCasing(
- paramName,
- casing,
- )
- }.${withCasing(it.columnsTo[0], casing)}, ${paramsStr} )`;
- }
- return `.references(()${typeSuffix} => ${
- withCasing(
- paramName,
- casing,
- )
- }.${withCasing(it.columnsTo[0], casing)})`;
- })
- .join('');
- statement += fksStatement;
- }
+ statement += it.generated ? `.generatedAlwaysAs(sql\`${it.generated.as}\`)` : '';
+
+ // const fks = fkByColumnName[it.name];
+ // Andrii: I switched it off until we will get a custom naem setting in references
+ // if (fks) {
+ // const fksStatement = fks
+ // .map((it) => {
+ // const onDelete = it.onDelete && it.onDelete !== 'no action' ? it.onDelete : null;
+ // const onUpdate = it.onUpdate && it.onUpdate !== 'no action' ? it.onUpdate : null;
+ // const params = { onDelete, onUpdate };
+
+ // const typeSuffix = isCyclic(it) ? ': AnyPgColumn' : '';
+
+ // const paramsStr = objToStatement2(params);
+ // const tableSchema = schemas[it.schemaTo || ''];
+ // const paramName = paramNameFor(it.tableTo, tableSchema);
+ // if (paramsStr) {
+ // return `.references(()${typeSuffix} => ${
+ // withCasing(
+ // paramName,
+ // casing,
+ // )
+ // }.${withCasing(it.columnsTo[0], casing)}, ${paramsStr} )`;
+ // }
+ // return `.references(()${typeSuffix} => ${
+ // withCasing(
+ // paramName,
+ // casing,
+ // )
+ // }.${withCasing(it.columnsTo[0], casing)})`;
+ // })
+ // .join('');
+ // statement += fksStatement;
+ // }
statement += ',\n';
});
@@ -1023,21 +1198,13 @@ const createTableColumns = (
return statement;
};
-const createTableIndexes = (
- tableName: string,
- idxs: Index[],
- casing: Casing,
-): string => {
+const createTableIndexes = (tableName: string, idxs: Index[], casing: Casing): string => {
let statement = '';
idxs.forEach((it) => {
// we have issue when index is called as table called
- let idxKey = it.name.startsWith(tableName) && it.name !== tableName
- ? it.name.slice(tableName.length + 1)
- : it.name;
- idxKey = idxKey.endsWith('_index')
- ? idxKey.slice(0, -'_index'.length) + '_idx'
- : idxKey;
+ let idxKey = it.name.startsWith(tableName) && it.name !== tableName ? it.name.slice(tableName.length + 1) : it.name;
+ idxKey = idxKey.endsWith('_index') ? idxKey.slice(0, -'_index'.length) + '_idx' : idxKey;
idxKey = withCasing(idxKey, casing);
@@ -1047,7 +1214,7 @@ const createTableIndexes = (
);
const escapedIndexName = indexGeneratedName === it.name ? '' : `"${it.name}"`;
- statement += `\t\t${idxKey}: `;
+ statement += `\n\t`;
statement += it.isUnique ? 'uniqueIndex(' : 'index(';
statement += `${escapedIndexName})`;
statement += `${it.concurrently ? `.concurrently()` : ''}`;
@@ -1058,8 +1225,10 @@ const createTableIndexes = (
if (it.isExpression) {
return `sql\`${it.expression}\``;
} else {
- return `table.${withCasing(it.expression, casing)}${
- it.opclass && vectorOps.includes(it.opclass)
+ return `table.${withCasing(it.expression, casing)}${it.asc ? '.asc()' : '.desc()'}${
+ it.nulls === 'first' ? '.nullsFirst()' : '.nullsLast()'
+ }${
+ it.opclass
? `.op("${it.opclass}")`
: ''
}`;
@@ -1076,16 +1245,12 @@ const createTableIndexes = (
reversedString += `${key}: "${mappedWith[key]}",`;
}
}
- reversedString = reversedString.length > 1
- ? reversedString.slice(0, reversedString.length - 1)
- : reversedString;
+ reversedString = reversedString.length > 1 ? reversedString.slice(0, reversedString.length - 1) : reversedString;
return `${reversedString}}`;
}
- statement += it.with && Object.keys(it.with).length > 0
- ? `.with(${reverseLogic(it.with)})`
- : '';
- statement += `,\n`;
+ statement += it.with && Object.keys(it.with).length > 0 ? `.with(${reverseLogic(it.with)})` : '';
+ statement += `,`;
});
return statement;
@@ -1095,9 +1260,7 @@ const createTablePKs = (pks: PrimaryKey[], casing: Casing): string => {
let statement = '';
pks.forEach((it) => {
- let idxKey = withCasing(it.name, casing);
-
- statement += `\t\t${idxKey}: `;
+ statement += `\n\t`;
statement += 'primaryKey({ columns: [';
statement += `${
it.columns
@@ -1107,7 +1270,36 @@ const createTablePKs = (pks: PrimaryKey[], casing: Casing): string => {
.join(', ')
}]${it.name ? `, name: "${it.name}"` : ''}}`;
statement += ')';
- statement += `,\n`;
+ statement += `,`;
+ });
+
+ return statement;
+};
+
+// get a map of db role name to ts key
+// if to by key is in this map - no quotes, otherwise - quotes
+
+const createTablePolicies = (
+ policies: Policy[],
+ casing: Casing,
+ rolesNameToTsKey: Record = {},
+): string => {
+ let statement = '';
+
+ policies.forEach((it) => {
+ const idxKey = withCasing(it.name, casing);
+
+ const mappedItTo = it.to?.map((v) => {
+ return rolesNameToTsKey[v] ? withCasing(rolesNameToTsKey[v], casing) : `"${v}"`;
+ });
+
+ statement += `\n\t`;
+ statement += 'pgPolicy(';
+ statement += `"${it.name}", { `;
+ statement += `as: "${it.as?.toLowerCase()}", for: "${it.for?.toLowerCase()}", to: [${mappedItTo?.join(', ')}]${
+ it.using ? `, using: sql\`${it.using}\`` : ''
+ }${it.withCheck ? `, withCheck: sql\`${it.withCheck}\` ` : ''}`;
+ statement += ` }),`;
});
return statement;
@@ -1120,28 +1312,35 @@ const createTableUniques = (
let statement = '';
unqs.forEach((it) => {
- const idxKey = withCasing(it.name, casing);
-
- statement += `\t\t${idxKey}: `;
+ statement += `\n\t`;
statement += 'unique(';
statement += `"${it.name}")`;
- statement += `.on(${
- it.columns
- .map((it) => `table.${withCasing(it, casing)}`)
- .join(', ')
- })`;
+ statement += `.on(${it.columns.map((it) => `table.${withCasing(it, casing)}`).join(', ')})`;
statement += it.nullsNotDistinct ? `.nullsNotDistinct()` : '';
- statement += `,\n`;
+ statement += `,`;
});
return statement;
};
-const createTableFKs = (
- fks: ForeignKey[],
- schemas: Record,
+const createTableChecks = (
+ checkConstraints: CheckConstraint[],
casing: Casing,
-): string => {
+) => {
+ let statement = '';
+
+ checkConstraints.forEach((it) => {
+ statement += `\n\t`;
+ statement += 'check(';
+ statement += `"${it.name}", `;
+ statement += `sql\`${it.value}\`)`;
+ statement += `,`;
+ });
+
+ return statement;
+};
+
+const createTableFKs = (fks: ForeignKey[], schemas: Record, casing: Casing): string => {
let statement = '';
fks.forEach((it) => {
@@ -1150,29 +1349,20 @@ const createTableFKs = (
const isSelf = it.tableTo === it.tableFrom;
const tableTo = isSelf ? 'table' : `${withCasing(paramName, casing)}`;
- statement += `\t\t${withCasing(it.name, casing)}: foreignKey({\n`;
- statement += `\t\t\tcolumns: [${
- it.columnsFrom
- .map((i) => `table.${withCasing(i, casing)}`)
- .join(', ')
- }],\n`;
+ statement += `\n\t`;
+ statement += `foreignKey({\n`;
+ statement += `\t\t\tcolumns: [${it.columnsFrom.map((i) => `table.${withCasing(i, casing)}`).join(', ')}],\n`;
statement += `\t\t\tforeignColumns: [${
- it.columnsTo
- .map((i) => `${tableTo}.${withCasing(i, casing)}`)
- .join(', ')
+ it.columnsTo.map((i) => `${tableTo}.${withCasing(i, casing)}`).join(', ')
}],\n`;
statement += `\t\t\tname: "${it.name}"\n`;
statement += `\t\t})`;
- statement += it.onUpdate && it.onUpdate !== 'no action'
- ? `.onUpdate("${it.onUpdate}")`
- : '';
+ statement += it.onUpdate && it.onUpdate !== 'no action' ? `.onUpdate("${it.onUpdate}")` : '';
- statement += it.onDelete && it.onDelete !== 'no action'
- ? `.onDelete("${it.onDelete}")`
- : '';
+ statement += it.onDelete && it.onDelete !== 'no action' ? `.onDelete("${it.onDelete}")` : '';
- statement += `,\n`;
+ statement += `,`;
});
return statement;
diff --git a/drizzle-kit/src/introspect-singlestore.ts b/drizzle-kit/src/introspect-singlestore.ts
new file mode 100644
index 000000000..ee0ae5e0d
--- /dev/null
+++ b/drizzle-kit/src/introspect-singlestore.ts
@@ -0,0 +1,922 @@
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
+import { toCamelCase } from 'drizzle-orm/casing';
+import './@types/utils';
+import type { Casing } from './cli/validations/common';
+import { assertUnreachable } from './global';
+import {
+ Column,
+ Index,
+ PrimaryKey,
+ SingleStoreSchema,
+ SingleStoreSchemaInternal,
+ UniqueConstraint,
+} from './serializer/singlestoreSchema';
+import { indexName } from './serializer/singlestoreSerializer';
+
+// time precision to fsp
+// {mode: "string"} for timestamp by default
+
+const singlestoreImportsList = new Set([
+ 'singlestoreTable',
+ 'singlestoreEnum',
+ 'bigint',
+ 'binary',
+ 'boolean',
+ 'char',
+ 'date',
+ 'datetime',
+ 'decimal',
+ 'double',
+ 'float',
+ 'int',
+ 'json',
+ // TODO: add new type BSON
+ // TODO: add new type Blob
+ // TODO: add new type UUID
+ // TODO: add new type GUID
+ // TODO: add new type Vector
+ // TODO: add new type GeoPoint
+ 'mediumint',
+ 'real',
+ 'serial',
+ 'smallint',
+ 'text',
+ 'tinytext',
+ 'mediumtext',
+ 'longtext',
+ 'time',
+ 'timestamp',
+ 'tinyint',
+ 'varbinary',
+ 'varchar',
+ 'vector',
+ 'year',
+ 'enum',
+]);
+
+const objToStatement = (json: any) => {
+ json = Object.fromEntries(Object.entries(json).filter((it) => it[1]));
+
+ const keys = Object.keys(json);
+ if (keys.length === 0) return;
+
+ let statement = '{ ';
+ statement += keys.map((it) => `"${it}": "${json[it]}"`).join(', ');
+ statement += ' }';
+ return statement;
+};
+
+const objToStatement2 = (json: any) => {
+ json = Object.fromEntries(Object.entries(json).filter((it) => it[1]));
+
+ const keys = Object.keys(json);
+ if (keys.length === 0) return;
+
+ let statement = '{ ';
+ statement += keys.map((it) => `${it}: "${json[it]}"`).join(', '); // no "" for keys
+ statement += ' }';
+ return statement;
+};
+
+const timeConfig = (json: any) => {
+ json = Object.fromEntries(Object.entries(json).filter((it) => it[1]));
+
+ const keys = Object.keys(json);
+ if (keys.length === 0) return;
+
+ let statement = '{ ';
+ statement += keys.map((it) => `${it}: ${json[it]}`).join(', ');
+ statement += ' }';
+ return statement;
+};
+
+const binaryConfig = (json: any) => {
+ json = Object.fromEntries(Object.entries(json).filter((it) => it[1]));
+
+ const keys = Object.keys(json);
+ if (keys.length === 0) return;
+
+ let statement = '{ ';
+ statement += keys.map((it) => `${it}: ${json[it]}`).join(', ');
+ statement += ' }';
+ return statement;
+};
+
+const importsPatch = {
+ 'double precision': 'doublePrecision',
+ 'timestamp without time zone': 'timestamp',
+} as Record;
+
+const escapeColumnKey = (value: string) => {
+ if (/^(?![a-zA-Z_$][a-zA-Z0-9_$]*$).+$/.test(value)) {
+ return `"${value}"`;
+ }
+ return value;
+};
+
+const prepareCasing = (casing?: Casing) => (value: string) => {
+ if (casing === 'preserve') {
+ return escapeColumnKey(value);
+ }
+ if (casing === 'camel') {
+ return escapeColumnKey(value.camelCase());
+ }
+
+ assertUnreachable(casing);
+};
+
+const dbColumnName = ({ name, casing, withMode = false }: { name: string; casing: Casing; withMode?: boolean }) => {
+ if (casing === 'preserve') {
+ return '';
+ }
+ if (casing === 'camel') {
+ return toCamelCase(name) === name ? '' : withMode ? `"${name}", ` : `"${name}"`;
+ }
+
+ assertUnreachable(casing);
+};
+
+export const schemaToTypeScript = (
+ schema: SingleStoreSchemaInternal,
+ casing: Casing,
+) => {
+ const withCasing = prepareCasing(casing);
+
+ const imports = Object.values(schema.tables).reduce(
+ (res, it) => {
+ const idxImports = Object.values(it.indexes).map((idx) => idx.isUnique ? 'uniqueIndex' : 'index');
+ const pkImports = Object.values(it.compositePrimaryKeys).map(
+ (it) => 'primaryKey',
+ );
+ const uniqueImports = Object.values(it.uniqueConstraints).map(
+ (it) => 'unique',
+ );
+
+ res.singlestore.push(...idxImports);
+ res.singlestore.push(...pkImports);
+ res.singlestore.push(...uniqueImports);
+
+ const columnImports = Object.values(it.columns)
+ .map((col) => {
+ let patched = importsPatch[col.type] ?? col.type;
+ patched = patched.startsWith('varchar(') ? 'varchar' : patched;
+ patched = patched.startsWith('char(') ? 'char' : patched;
+ patched = patched.startsWith('binary(') ? 'binary' : patched;
+ patched = patched.startsWith('decimal(') ? 'decimal' : patched;
+ patched = patched.startsWith('smallint(') ? 'smallint' : patched;
+ patched = patched.startsWith('enum(') ? 'singlestoreEnum' : patched;
+ patched = patched.startsWith('datetime(') ? 'datetime' : patched;
+ patched = patched.startsWith('varbinary(') ? 'varbinary' : patched;
+ patched = patched.startsWith('int(') ? 'int' : patched;
+ patched = patched.startsWith('double(') ? 'double' : patched;
+ patched = patched.startsWith('float(') ? 'float' : patched;
+ patched = patched.startsWith('int unsigned') ? 'int' : patched;
+ patched = patched.startsWith('tinyint(') ? 'tinyint' : patched;
+ patched = patched.startsWith('mediumint(') ? 'mediumint' : patched;
+ patched = patched.startsWith('bigint(') ? 'bigint' : patched;
+ patched = patched.startsWith('tinyint unsigned') ? 'tinyint' : patched;
+ patched = patched.startsWith('smallint unsigned') ? 'smallint' : patched;
+ patched = patched.startsWith('mediumint unsigned') ? 'mediumint' : patched;
+ patched = patched.startsWith('bigint unsigned') ? 'bigint' : patched;
+ return patched;
+ })
+ .filter((type) => {
+ return singlestoreImportsList.has(type);
+ });
+
+ res.singlestore.push(...columnImports);
+ return res;
+ },
+ { singlestore: [] as string[] },
+ );
+
+ /* Object.values(schema.views).forEach((it) => {
+ imports.singlestore.push('singlestoreView');
+
+ const columnImports = Object.values(it.columns)
+ .map((col) => {
+ let patched = importsPatch[col.type] ?? col.type;
+ patched = patched.startsWith('varchar(') ? 'varchar' : patched;
+ patched = patched.startsWith('char(') ? 'char' : patched;
+ patched = patched.startsWith('binary(') ? 'binary' : patched;
+ patched = patched.startsWith('decimal(') ? 'decimal' : patched;
+ patched = patched.startsWith('smallint(') ? 'smallint' : patched;
+ patched = patched.startsWith('enum(') ? 'singlestoreEnum' : patched;
+ patched = patched.startsWith('datetime(') ? 'datetime' : patched;
+ patched = patched.startsWith('varbinary(') ? 'varbinary' : patched;
+ patched = patched.startsWith('int(') ? 'int' : patched;
+ patched = patched.startsWith('double(') ? 'double' : patched;
+ patched = patched.startsWith('float(') ? 'float' : patched;
+ patched = patched.startsWith('int unsigned') ? 'int' : patched;
+ patched = patched.startsWith('tinyint(') ? 'tinyint' : patched;
+ patched = patched.startsWith('mediumint(') ? 'mediumint' : patched;
+ patched = patched.startsWith('bigint(') ? 'bigint' : patched;
+ patched = patched.startsWith('tinyint unsigned') ? 'tinyint' : patched;
+ patched = patched.startsWith('smallint unsigned') ? 'smallint' : patched;
+ patched = patched.startsWith('mediumint unsigned') ? 'mediumint' : patched;
+ patched = patched.startsWith('bigint unsigned') ? 'bigint' : patched;
+ return patched;
+ })
+ .filter((type) => {
+ return singlestoreImportsList.has(type);
+ });
+
+ imports.singlestore.push(...columnImports);
+ }); */
+
+ const tableStatements = Object.values(schema.tables).map((table) => {
+ const func = 'singlestoreTable';
+ let statement = '';
+ if (imports.singlestore.includes(withCasing(table.name))) {
+ statement = `// Table name is in conflict with ${
+ withCasing(
+ table.name,
+ )
+ } import.\n// Please change to any other name, that is not in imports list\n`;
+ }
+ statement += `export const ${withCasing(table.name)} = ${func}("${table.name}", {\n`;
+ statement += createTableColumns(
+ Object.values(table.columns),
+ withCasing,
+ casing,
+ table.name,
+ schema,
+ );
+ statement += '}';
+
+ if (
+ Object.keys(table.indexes).length > 0
+ || Object.keys(table.compositePrimaryKeys).length > 0
+ || Object.keys(table.uniqueConstraints).length > 0
+ ) {
+ statement += ',\n';
+ statement += '(table) => [';
+ statement += createTableIndexes(
+ table.name,
+ Object.values(table.indexes),
+ withCasing,
+ );
+ statement += createTablePKs(
+ Object.values(table.compositePrimaryKeys),
+ withCasing,
+ );
+ statement += createTableUniques(
+ Object.values(table.uniqueConstraints),
+ withCasing,
+ );
+ statement += '\n]';
+ }
+
+ statement += ');';
+ return statement;
+ });
+
+ /* const viewsStatements = Object.values(schema.views).map((view) => {
+ const { columns, name, algorithm, definition, sqlSecurity, withCheckOption } = view;
+ const func = 'singlestoreView';
+ let statement = '';
+
+ if (imports.singlestore.includes(withCasing(name))) {
+ statement = `// Table name is in conflict with ${
+ withCasing(
+ view.name,
+ )
+ } import.\n// Please change to any other name, that is not in imports list\n`;
+ }
+ statement += `export const ${withCasing(name)} = ${func}("${name}", {\n`;
+ statement += createTableColumns(
+ Object.values(columns),
+ withCasing,
+ casing,
+ name,
+ schema,
+ );
+ statement += '})';
+
+ statement += algorithm ? `.algorithm("${algorithm}")` : '';
+ statement += sqlSecurity ? `.sqlSecurity("${sqlSecurity}")` : '';
+ statement += withCheckOption ? `.withCheckOption("${withCheckOption}")` : '';
+ statement += `.as(sql\`${definition?.replaceAll('`', '\\`')}\`);`;
+
+ return statement;
+ }); */
+
+ const uniqueSingleStoreImports = [
+ 'singlestoreTable',
+ 'singlestoreSchema',
+ 'AnySingleStoreColumn',
+ ...new Set(imports.singlestore),
+ ];
+ const importsTs = `import { ${
+ uniqueSingleStoreImports.join(
+ ', ',
+ )
+ } } from "drizzle-orm/singlestore-core"\nimport { sql } from "drizzle-orm"\n\n`;
+
+ let decalrations = '';
+ decalrations += tableStatements.join('\n\n');
+ decalrations += '\n';
+ /* decalrations += viewsStatements.join('\n\n'); */
+
+ const file = importsTs + decalrations;
+
+ const schemaEntry = `
+ {
+ ${
+ Object.values(schema.tables)
+ .map((it) => withCasing(it.name))
+ .join(',')
+ }
+ }
+ `;
+
+ return {
+ file, // backward compatible, print to file
+ imports: importsTs,
+ decalrations,
+ schemaEntry,
+ };
+};
+
+const mapColumnDefault = (defaultValue: any, isExpression?: boolean) => {
+ if (isExpression) {
+ return `sql\`${defaultValue}\``;
+ }
+
+ return defaultValue;
+};
+
+const mapColumnDefaultForJson = (defaultValue: any) => {
+ if (
+ typeof defaultValue === 'string'
+ && defaultValue.startsWith("('")
+ && defaultValue.endsWith("')")
+ ) {
+ return defaultValue.substring(2, defaultValue.length - 2);
+ }
+
+ return defaultValue;
+};
+
+const column = (
+ type: string,
+ name: string,
+ casing: (value: string) => string,
+ rawCasing: Casing,
+ defaultValue?: any,
+ autoincrement?: boolean,
+ onUpdate?: boolean,
+ isExpression?: boolean,
+) => {
+ let lowered = type;
+ if (!type.startsWith('enum(')) {
+ lowered = type.toLowerCase();
+ }
+
+ if (lowered === 'serial') {
+ return `${casing(name)}: serial(${dbColumnName({ name, casing: rawCasing })})`;
+ }
+
+ if (lowered.startsWith('int')) {
+ const isUnsigned = lowered.includes('unsigned');
+ const columnName = dbColumnName({ name, casing: rawCasing, withMode: isUnsigned });
+ let out = `${casing(name)}: int(${columnName}${
+ isUnsigned ? `${columnName.length > 0 ? ', ' : ''}{ unsigned: true }` : ''
+ })`;
+ out += autoincrement ? `.autoincrement()` : '';
+ out += typeof defaultValue !== 'undefined'
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ if (lowered.startsWith('tinyint')) {
+ const isUnsigned = lowered.includes('unsigned');
+ const columnName = dbColumnName({ name, casing: rawCasing, withMode: isUnsigned });
+ // let out = `${name.camelCase()}: tinyint("${name}")`;
+ let out: string = `${casing(name)}: tinyint(${columnName}${
+ isUnsigned ? `${columnName.length > 0 ? ', ' : ''}{ unsigned: true }` : ''
+ })`;
+ out += autoincrement ? `.autoincrement()` : '';
+ out += typeof defaultValue !== 'undefined'
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ if (lowered.startsWith('smallint')) {
+ const isUnsigned = lowered.includes('unsigned');
+ const columnName = dbColumnName({ name, casing: rawCasing, withMode: isUnsigned });
+ let out = `${casing(name)}: smallint(${columnName}${
+ isUnsigned ? `${columnName.length > 0 ? ', ' : ''}{ unsigned: true }` : ''
+ })`;
+ out += autoincrement ? `.autoincrement()` : '';
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ if (lowered.startsWith('mediumint')) {
+ const isUnsigned = lowered.includes('unsigned');
+ const columnName = dbColumnName({ name, casing: rawCasing, withMode: isUnsigned });
+ let out = `${casing(name)}: mediumint(${columnName}${
+ isUnsigned ? `${columnName.length > 0 ? ', ' : ''}{ unsigned: true }` : ''
+ })`;
+ out += autoincrement ? `.autoincrement()` : '';
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ if (lowered.startsWith('bigint')) {
+ const isUnsigned = lowered.includes('unsigned');
+ let out = `${casing(name)}: bigint(${dbColumnName({ name, casing: rawCasing, withMode: true })}{ mode: "number"${
+ isUnsigned ? ', unsigned: true' : ''
+ } })`;
+ out += autoincrement ? `.autoincrement()` : '';
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ if (lowered === 'boolean') {
+ let out = `${casing(name)}: boolean(${dbColumnName({ name, casing: rawCasing })})`;
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ if (lowered.startsWith('double')) {
+ let params:
+ | { precision?: string; scale?: string; unsigned?: boolean }
+ | undefined;
+
+ if (lowered.length > (lowered.includes('unsigned') ? 15 : 6)) {
+ const [precision, scale] = lowered
+ .slice(7, lowered.length - (1 + (lowered.includes('unsigned') ? 9 : 0)))
+ .split(',');
+ params = { precision, scale };
+ }
+
+ if (lowered.includes('unsigned')) {
+ params = { ...(params ?? {}), unsigned: true };
+ }
+
+ const timeConfigParams = params ? timeConfig(params) : undefined;
+
+ let out = params
+ ? `${casing(name)}: double(${
+ dbColumnName({ name, casing: rawCasing, withMode: timeConfigParams !== undefined })
+ }${timeConfig(params)})`
+ : `${casing(name)}: double(${dbColumnName({ name, casing: rawCasing })})`;
+
+ // let out = `${name.camelCase()}: double("${name}")`;
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ if (lowered.startsWith('float')) {
+ let params:
+ | { precision?: string; scale?: string; unsigned?: boolean }
+ | undefined;
+
+ if (lowered.length > (lowered.includes('unsigned') ? 14 : 5)) {
+ const [precision, scale] = lowered
+ .slice(6, lowered.length - (1 + (lowered.includes('unsigned') ? 9 : 0)))
+ .split(',');
+ params = { precision, scale };
+ }
+
+ if (lowered.includes('unsigned')) {
+ params = { ...(params ?? {}), unsigned: true };
+ }
+
+ let out = `${casing(name)}: float(${dbColumnName({ name, casing: rawCasing })}${params ? timeConfig(params) : ''})`;
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ if (lowered === 'real') {
+ let out = `${casing(name)}: real(${dbColumnName({ name, casing: rawCasing })})`;
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ if (lowered.startsWith('timestamp')) {
+ const keyLength = 'timestamp'.length + 1;
+ let fsp = lowered.length > keyLength
+ ? Number(lowered.substring(keyLength, lowered.length - 1))
+ : null;
+ fsp = fsp ? fsp : null;
+
+ const params = timeConfig({ fsp, mode: "'string'" });
+
+ let out = params
+ ? `${casing(name)}: timestamp(${
+ dbColumnName({ name, casing: rawCasing, withMode: params !== undefined })
+ }${params})`
+ : `${casing(name)}: timestamp(${dbColumnName({ name, casing: rawCasing })})`;
+
+ // singlestore has only CURRENT_TIMESTAMP, as I found from docs. But will leave now() for just a case
+ defaultValue = defaultValue === 'now()' || defaultValue === 'CURRENT_TIMESTAMP'
+ ? '.defaultNow()'
+ : defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+
+ out += defaultValue;
+
+ let onUpdateNow = onUpdate ? '.onUpdateNow()' : '';
+ out += onUpdateNow;
+
+ return out;
+ }
+
+ if (lowered.startsWith('time')) {
+ const keyLength = 'time'.length + 1;
+ let fsp = lowered.length > keyLength
+ ? Number(lowered.substring(keyLength, lowered.length - 1))
+ : null;
+ fsp = fsp ? fsp : null;
+
+ const params = timeConfig({ fsp });
+
+ let out = params
+ ? `${casing(name)}: time(${dbColumnName({ name, casing: rawCasing, withMode: params !== undefined })}${params})`
+ : `${casing(name)}: time(${dbColumnName({ name, casing: rawCasing })})`;
+
+ defaultValue = defaultValue === 'now()'
+ ? '.defaultNow()'
+ : defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+
+ out += defaultValue;
+ return out;
+ }
+
+ if (lowered === 'date') {
+ let out = `// you can use { mode: 'date' }, if you want to have Date as type for this column\n\t${
+ casing(
+ name,
+ )
+ }: date(${dbColumnName({ name, casing: rawCasing, withMode: true })}{ mode: 'string' })`;
+
+ defaultValue = defaultValue === 'now()'
+ ? '.defaultNow()'
+ : defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+
+ out += defaultValue;
+ return out;
+ }
+
+ // in singlestore text can't have default value. Will leave it in case smth ;)
+ if (lowered === 'text') {
+ let out = `${casing(name)}: text(${dbColumnName({ name, casing: rawCasing })})`;
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ // in singlestore text can't have default value. Will leave it in case smth ;)
+ if (lowered === 'tinytext') {
+ let out = `${casing(name)}: tinytext(${dbColumnName({ name, casing: rawCasing })})`;
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ // in singlestore text can't have default value. Will leave it in case smth ;)
+ if (lowered === 'mediumtext') {
+ let out = `${casing(name)}: mediumtext(${dbColumnName({ name, casing: rawCasing })})`;
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ // in singlestore text can't have default value. Will leave it in case smth ;)
+ if (lowered === 'longtext') {
+ let out = `${casing(name)}: longtext(${dbColumnName({ name, casing: rawCasing })})`;
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ if (lowered === 'year') {
+ let out = `${casing(name)}: year(${dbColumnName({ name, casing: rawCasing })})`;
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ // in singlestore json can't have default value. Will leave it in case smth ;)
+ if (lowered === 'json') {
+ let out = `${casing(name)}: json(${dbColumnName({ name, casing: rawCasing })})`;
+
+ out += defaultValue
+ ? `.default(${mapColumnDefaultForJson(defaultValue)})`
+ : '';
+
+ return out;
+ }
+
+ if (lowered.startsWith('varchar')) {
+ let out: string = `${
+ casing(
+ name,
+ )
+ }: varchar(${dbColumnName({ name, casing: rawCasing, withMode: true })}{ length: ${
+ lowered.substring(
+ 'varchar'.length + 1,
+ lowered.length - 1,
+ )
+ } })`;
+
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ if (lowered.startsWith('char')) {
+ let out: string = `${
+ casing(
+ name,
+ )
+ }: char(${dbColumnName({ name, casing: rawCasing, withMode: true })}{ length: ${
+ lowered.substring(
+ 'char'.length + 1,
+ lowered.length - 1,
+ )
+ } })`;
+
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ if (lowered.startsWith('datetime')) {
+ let out = `// you can use { mode: 'date' }, if you want to have Date as type for this column\n\t`;
+
+ const fsp = lowered.startsWith('datetime(')
+ ? lowered.substring('datetime'.length + 1, lowered.length - 1)
+ : undefined;
+
+ out = fsp
+ ? `${
+ casing(
+ name,
+ )
+ }: datetime(${dbColumnName({ name, casing: rawCasing, withMode: true })}{ mode: 'string', fsp: ${
+ lowered.substring(
+ 'datetime'.length + 1,
+ lowered.length - 1,
+ )
+ } })`
+ : `${casing(name)}: datetime(${dbColumnName({ name, casing: rawCasing, withMode: true })}{ mode: 'string'})`;
+
+ defaultValue = defaultValue === 'now()'
+ ? '.defaultNow()'
+ : defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+
+ out += defaultValue;
+ return out;
+ }
+
+ if (lowered.startsWith('decimal')) {
+ let params:
+ | { precision?: string; scale?: string; unsigned?: boolean }
+ | undefined;
+
+ if (lowered.length > (lowered.includes('unsigned') ? 16 : 7)) {
+ const [precision, scale] = lowered
+ .slice(8, lowered.length - (1 + (lowered.includes('unsigned') ? 9 : 0)))
+ .split(',');
+ params = { precision, scale };
+ }
+
+ if (lowered.includes('unsigned')) {
+ params = { ...(params ?? {}), unsigned: true };
+ }
+
+ const timeConfigParams = params ? timeConfig(params) : undefined;
+
+ let out = params
+ ? `${casing(name)}: decimal(${
+ dbColumnName({ name, casing: rawCasing, withMode: timeConfigParams !== undefined })
+ }${timeConfigParams})`
+ : `${casing(name)}: decimal(${dbColumnName({ name, casing: rawCasing })})`;
+
+ defaultValue = typeof defaultValue !== 'undefined'
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+
+ out += defaultValue;
+ return out;
+ }
+
+ if (lowered.startsWith('binary')) {
+ const keyLength = 'binary'.length + 1;
+ let length = lowered.length > keyLength
+ ? Number(lowered.substring(keyLength, lowered.length - 1))
+ : null;
+ length = length ? length : null;
+
+ const params = binaryConfig({ length });
+
+ let out = params
+ ? `${casing(name)}: binary(${dbColumnName({ name, casing: rawCasing, withMode: params !== undefined })}${params})`
+ : `${casing(name)}: binary(${dbColumnName({ name, casing: rawCasing })})`;
+
+ defaultValue = defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+
+ out += defaultValue;
+ return out;
+ }
+
+ if (lowered.startsWith('enum')) {
+ const values = lowered.substring('enum'.length + 1, lowered.length - 1);
+ let out = `${casing(name)}: singlestoreEnum(${
+ dbColumnName({ name, casing: rawCasing, withMode: true })
+ }[${values}])`;
+ out += defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+ return out;
+ }
+
+ if (lowered.startsWith('varbinary')) {
+ const keyLength = 'varbinary'.length + 1;
+ let length = lowered.length > keyLength
+ ? Number(lowered.substring(keyLength, lowered.length - 1))
+ : null;
+ length = length ? length : null;
+
+ const params = binaryConfig({ length });
+
+ let out = params
+ ? `${casing(name)}: varbinary(${
+ dbColumnName({ name, casing: rawCasing, withMode: params !== undefined })
+ }${params})`
+ : `${casing(name)}: varbinary(${dbColumnName({ name, casing: rawCasing })})`;
+
+ defaultValue = defaultValue
+ ? `.default(${mapColumnDefault(defaultValue, isExpression)})`
+ : '';
+
+ out += defaultValue;
+ return out;
+ }
+
+ if (lowered.startsWith('vector')) {
+ const [dimensions, elementType] = lowered.substring('vector'.length + 1, lowered.length - 1).split(',');
+ let out = `${casing(name)}: vector(${
+ dbColumnName({ name, casing: rawCasing, withMode: true })
+ }{ dimensions: ${dimensions}, elementType: ${elementType} })`;
+
+ out += defaultValue ? `.default(${mapColumnDefault(defaultValue, isExpression)})` : '';
+ return out;
+ }
+
+ console.log('uknown', type);
+ return `// Warning: Can't parse ${type} from database\n\t// ${type}Type: ${type}("${name}")`;
+};
+
+const createTableColumns = (
+ columns: Column[],
+ casing: (val: string) => string,
+ rawCasing: Casing,
+ tableName: string,
+ schema: SingleStoreSchemaInternal,
+): string => {
+ let statement = '';
+
+ columns.forEach((it) => {
+ statement += '\t';
+ statement += column(
+ it.type,
+ it.name,
+ casing,
+ rawCasing,
+ it.default,
+ it.autoincrement,
+ it.onUpdate,
+ schema.internal?.tables![tableName]?.columns[it.name]
+ ?.isDefaultAnExpression ?? false,
+ );
+ statement += it.primaryKey ? '.primaryKey()' : '';
+ statement += it.notNull ? '.notNull()' : '';
+
+ statement += it.generated
+ ? `.generatedAlwaysAs(sql\`${
+ it.generated.as.replace(
+ /`/g,
+ '\\`',
+ )
+ }\`, { mode: "${it.generated.type}" })`
+ : '';
+
+ statement += ',\n';
+ });
+
+ return statement;
+};
+
+const createTableIndexes = (
+ tableName: string,
+ idxs: Index[],
+ casing: (value: string) => string,
+): string => {
+ let statement = '';
+
+ idxs.forEach((it) => {
+ let idxKey = it.name.startsWith(tableName) && it.name !== tableName
+ ? it.name.slice(tableName.length + 1)
+ : it.name;
+ idxKey = idxKey.endsWith('_index')
+ ? idxKey.slice(0, -'_index'.length) + '_idx'
+ : idxKey;
+
+ idxKey = casing(idxKey);
+
+ const indexGeneratedName = indexName(tableName, it.columns);
+ const escapedIndexName = indexGeneratedName === it.name ? '' : `"${it.name}"`;
+
+ statement += `\n\t`;
+ statement += it.isUnique ? 'uniqueIndex(' : 'index(';
+ statement += `${escapedIndexName})`;
+ statement += `.on(${
+ it.columns
+ .map((it) => `table.${casing(it)}`)
+ .join(', ')
+ }),`;
+ });
+
+ return statement;
+};
+
+const createTableUniques = (
+ unqs: UniqueConstraint[],
+ casing: (value: string) => string,
+): string => {
+ let statement = '';
+
+ unqs.forEach((it) => {
+ statement += `\n\t`;
+ statement += 'unique(';
+ statement += `"${it.name}")`;
+ statement += `.on(${
+ it.columns
+ .map((it) => `table.${casing(it)}`)
+ .join(', ')
+ }),`;
+ });
+
+ return statement;
+};
+
+const createTablePKs = (
+ pks: PrimaryKey[],
+ casing: (value: string) => string,
+): string => {
+ let statement = '';
+
+ pks.forEach((it) => {
+ let idxKey = casing(it.name);
+
+ statement += `\n\t`;
+ statement += 'primaryKey({ columns: [';
+ statement += `${
+ it.columns
+ .map((c) => {
+ return `table.${casing(c)}`;
+ })
+ .join(', ')
+ }]${it.name ? `, name: "${it.name}"` : ''}}`;
+ statement += '),';
+ });
+
+ return statement;
+};
diff --git a/drizzle-kit/src/introspect-sqlite.ts b/drizzle-kit/src/introspect-sqlite.ts
index 9ff119ce6..d3aac6f04 100644
--- a/drizzle-kit/src/introspect-sqlite.ts
+++ b/drizzle-kit/src/introspect-sqlite.ts
@@ -1,6 +1,9 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */
+import { toCamelCase } from 'drizzle-orm/casing';
import './@types/utils';
import type { Casing } from './cli/validations/common';
+import { assertUnreachable } from './global';
+import { CheckConstraint } from './serializer/mysqlSchema';
import type {
Column,
ForeignKey,
@@ -38,17 +41,35 @@ const objToStatement2 = (json: any) => {
const relations = new Set();
+const escapeColumnKey = (value: string) => {
+ if (/^(?![a-zA-Z_$][a-zA-Z0-9_$]*$).+$/.test(value)) {
+ return `"${value}"`;
+ }
+ return value;
+};
+
const withCasing = (value: string, casing?: Casing) => {
- if (typeof casing === 'undefined') {
- return value;
+ if (casing === 'preserve') {
+ return escapeColumnKey(value);
}
if (casing === 'camel') {
- return value.camelCase();
+ return escapeColumnKey(value.camelCase());
}
return value;
};
+const dbColumnName = ({ name, casing, withMode = false }: { name: string; casing: Casing; withMode?: boolean }) => {
+ if (casing === 'preserve') {
+ return '';
+ }
+ if (casing === 'camel') {
+ return toCamelCase(name) === name ? '' : withMode ? `"${name}", ` : `"${name}"`;
+ }
+
+ assertUnreachable(casing);
+};
+
export const schemaToTypeScript = (
schema: SQLiteSchemaInternal,
casing: Casing,
@@ -71,11 +92,15 @@ export const schemaToTypeScript = (
const uniqueImports = Object.values(it.uniqueConstraints).map(
(it) => 'unique',
);
+ const checkImports = Object.values(it.checkConstraints).map(
+ (it) => 'check',
+ );
res.sqlite.push(...idxImports);
res.sqlite.push(...fkImpots);
res.sqlite.push(...pkImports);
res.sqlite.push(...uniqueImports);
+ res.sqlite.push(...checkImports);
const columnImports = Object.values(it.columns)
.map((col) => {
@@ -91,6 +116,20 @@ export const schemaToTypeScript = (
{ sqlite: [] as string[] },
);
+ Object.values(schema.views).forEach((it) => {
+ imports.sqlite.push('sqliteView');
+
+ const columnImports = Object.values(it.columns)
+ .map((col) => {
+ return col.type;
+ })
+ .filter((type) => {
+ return sqliteImportsList.has(type);
+ });
+
+ imports.sqlite.push(...columnImports);
+ });
+
const tableStatements = Object.values(schema.tables).map((table) => {
const func = 'sqliteTable';
let statement = '';
@@ -120,10 +159,10 @@ export const schemaToTypeScript = (
|| filteredFKs.length > 0
|| Object.keys(table.compositePrimaryKeys).length > 0
|| Object.keys(table.uniqueConstraints).length > 0
+ || Object.keys(table.checkConstraints).length > 0
) {
statement += ',\n';
- statement += '(table) => {\n';
- statement += '\treturn {\n';
+ statement += '(table) => [';
statement += createTableIndexes(
table.name,
Object.values(table.indexes),
@@ -138,14 +177,41 @@ export const schemaToTypeScript = (
Object.values(table.uniqueConstraints),
casing,
);
- statement += '\t}\n';
- statement += '}';
+ statement += createTableChecks(
+ Object.values(table.checkConstraints),
+ casing,
+ );
+ statement += '\n]';
}
statement += ');';
return statement;
});
+ const viewsStatements = Object.values(schema.views).map((view) => {
+ const func = 'sqliteView';
+
+ let statement = '';
+ if (imports.sqlite.includes(withCasing(view.name, casing))) {
+ statement = `// Table name is in conflict with ${
+ withCasing(
+ view.name,
+ casing,
+ )
+ } import.\n// Please change to any other name, that is not in imports list\n`;
+ }
+ statement += `export const ${withCasing(view.name, casing)} = ${func}("${view.name}", {\n`;
+ statement += createTableColumns(
+ Object.values(view.columns),
+ [],
+ casing,
+ );
+ statement += '})';
+ statement += `.as(sql\`${view.definition?.replaceAll('`', '\\`')}\`);`;
+
+ return statement;
+ });
+
const uniqueSqliteImports = [
'sqliteTable',
'AnySQLiteColumn',
@@ -159,7 +225,9 @@ export const schemaToTypeScript = (
} } from "drizzle-orm/sqlite-core"
import { sql } from "drizzle-orm"\n\n`;
- const decalrations = tableStatements.join('\n\n');
+ let decalrations = tableStatements.join('\n\n');
+ decalrations += '\n\n';
+ decalrations += viewsStatements.join('\n\n');
const file = importsTs + decalrations;
@@ -202,10 +270,8 @@ const mapColumnDefault = (defaultValue: any) => {
if (
typeof defaultValue === 'string'
- && defaultValue.startsWith("'")
- && defaultValue.endsWith("'")
) {
- return defaultValue.substring(1, defaultValue.length - 1);
+ return defaultValue.substring(1, defaultValue.length - 1).replaceAll('"', '\\"').replaceAll("''", "'");
}
return defaultValue;
@@ -219,9 +285,10 @@ const column = (
casing?: Casing,
) => {
let lowered = type;
+ casing = casing!;
if (lowered === 'integer') {
- let out = `${withCasing(name, casing)}: integer("${name}")`;
+ let out = `${withCasing(name, casing)}: integer(${dbColumnName({ name, casing })})`;
// out += autoincrement ? `.autoincrement()` : "";
out += typeof defaultValue !== 'undefined'
? `.default(${mapColumnDefault(defaultValue)})`
@@ -230,7 +297,7 @@ const column = (
}
if (lowered === 'real') {
- let out = `${withCasing(name, casing)}: real("${name}")`;
+ let out = `${withCasing(name, casing)}: real(${dbColumnName({ name, casing })})`;
out += defaultValue ? `.default(${mapColumnDefault(defaultValue)})` : '';
return out;
}
@@ -240,9 +307,11 @@ const column = (
let out: string;
if (match) {
- out = `${withCasing(name, casing)}: text("${name}", { length: ${match[0]} })`;
+ out = `${withCasing(name, casing)}: text(${dbColumnName({ name, casing, withMode: true })}{ length: ${
+ match[0]
+ } })`;
} else {
- out = `${withCasing(name, casing)}: text("${name}")`;
+ out = `${withCasing(name, casing)}: text(${dbColumnName({ name, casing })})`;
}
out += defaultValue ? `.default("${mapColumnDefault(defaultValue)}")` : '';
@@ -250,13 +319,13 @@ const column = (
}
if (lowered === 'blob') {
- let out = `${withCasing(name, casing)}: blob("${name}")`;
+ let out = `${withCasing(name, casing)}: blob(${dbColumnName({ name, casing })})`;
out += defaultValue ? `.default(${mapColumnDefault(defaultValue)})` : '';
return out;
}
if (lowered === 'numeric') {
- let out = `${withCasing(name, casing)}: numeric("${name}")`;
+ let out = `${withCasing(name, casing)}: numeric(${dbColumnName({ name, casing })})`;
out += defaultValue ? `.default(${mapColumnDefault(defaultValue)})` : '';
return out;
}
@@ -358,7 +427,7 @@ const createTableIndexes = (
const indexGeneratedName = indexName(tableName, it.columns);
const escapedIndexName = indexGeneratedName === it.name ? '' : `"${it.name}"`;
- statement += `\t\t${idxKey}: `;
+ statement += `\n\t`;
statement += it.isUnique ? 'uniqueIndex(' : 'index(';
statement += `${escapedIndexName})`;
statement += `.on(${
@@ -366,7 +435,6 @@ const createTableIndexes = (
.map((it) => `table.${withCasing(it, casing)}`)
.join(', ')
}),`;
- statement += `\n`;
});
return statement;
@@ -381,7 +449,7 @@ const createTableUniques = (
unqs.forEach((it) => {
const idxKey = withCasing(it.name, casing);
- statement += `\t\t${idxKey}: `;
+ statement += `\n\t`;
statement += 'unique(';
statement += `"${it.name}")`;
statement += `.on(${
@@ -389,7 +457,22 @@ const createTableUniques = (
.map((it) => `table.${withCasing(it, casing)}`)
.join(', ')
}),`;
- statement += `\n`;
+ });
+
+ return statement;
+};
+const createTableChecks = (
+ checks: CheckConstraint[],
+ casing: Casing,
+): string => {
+ let statement = '';
+
+ checks.forEach((it) => {
+ statement += `\n\t`;
+ statement += 'check(';
+ statement += `"${it.name}", `;
+ statement += `sql\`${it.value}\`)`;
+ statement += `,`;
});
return statement;
@@ -399,7 +482,7 @@ const createTablePKs = (pks: PrimaryKey[], casing: Casing): string => {
let statement = '';
pks.forEach((it, i) => {
- statement += `\t\tpk${i}: `;
+ statement += `\n\t`;
statement += 'primaryKey({ columns: [';
statement += `${
it.columns
@@ -409,7 +492,6 @@ const createTablePKs = (pks: PrimaryKey[], casing: Casing): string => {
.join(', ')
}]${it.name ? `, name: "${it.name}"` : ''}}`;
statement += ')';
- statement += `\n`;
});
return statement;
@@ -421,7 +503,8 @@ const createTableFKs = (fks: ForeignKey[], casing: Casing): string => {
fks.forEach((it) => {
const isSelf = it.tableTo === it.tableFrom;
const tableTo = isSelf ? 'table' : `${withCasing(it.tableTo, casing)}`;
- statement += `\t\t${withCasing(it.name, casing)}: foreignKey(() => ({\n`;
+ statement += `\n\t`;
+ statement += `foreignKey(() => ({\n`;
statement += `\t\t\tcolumns: [${
it.columnsFrom
.map((i) => `table.${withCasing(i, casing)}`)
@@ -443,7 +526,7 @@ const createTableFKs = (fks: ForeignKey[], casing: Casing): string => {
? `.onDelete("${it.onDelete}")`
: '';
- statement += `,\n`;
+ statement += `,`;
});
return statement;
diff --git a/drizzle-kit/src/jsonDiffer.js b/drizzle-kit/src/jsonDiffer.js
index 113d7e0a4..da8284979 100644
--- a/drizzle-kit/src/jsonDiffer.js
+++ b/drizzle-kit/src/jsonDiffer.js
@@ -103,6 +103,22 @@ export function diffSchemasOrTables(left, right) {
return { added, deleted };
}
+export function diffIndPolicies(left, right) {
+ left = JSON.parse(JSON.stringify(left));
+ right = JSON.parse(JSON.stringify(right));
+
+ const result = Object.entries(diff(left, right) ?? {});
+
+ const added = result
+ .filter((it) => it[0].endsWith('__added'))
+ .map((it) => it[1]);
+ const deleted = result
+ .filter((it) => it[0].endsWith('__deleted'))
+ .map((it) => it[1]);
+
+ return { added, deleted };
+}
+
export function diffColumns(left, right) {
left = JSON.parse(JSON.stringify(left));
right = JSON.parse(JSON.stringify(right));
@@ -146,6 +162,49 @@ export function diffColumns(left, right) {
return alteredTables;
}
+export function diffPolicies(left, right) {
+ left = JSON.parse(JSON.stringify(left));
+ right = JSON.parse(JSON.stringify(right));
+ const result = diff(left, right) ?? {};
+
+ const alteredTables = Object.fromEntries(
+ Object.entries(result)
+ .filter((it) => {
+ return !(it[0].includes('__added') || it[0].includes('__deleted'));
+ })
+ .map((tableEntry) => {
+ // const entry = { name: it, ...result[it] }
+ const deletedPolicies = Object.entries(tableEntry[1].policies ?? {})
+ .filter((it) => {
+ return it[0].endsWith('__deleted');
+ })
+ .map((it) => {
+ return it[1];
+ });
+
+ const addedPolicies = Object.entries(tableEntry[1].policies ?? {})
+ .filter((it) => {
+ return it[0].endsWith('__added');
+ })
+ .map((it) => {
+ return it[1];
+ });
+
+ tableEntry[1].policies = {
+ added: addedPolicies,
+ deleted: deletedPolicies,
+ };
+ const table = left[tableEntry[0]];
+ return [
+ tableEntry[0],
+ { name: table.name, schema: table.schema, ...tableEntry[1] },
+ ];
+ }),
+ );
+
+ return alteredTables;
+}
+
export function applyJsonDiff(json1, json2) {
json1 = JSON.parse(JSON.stringify(json1));
json2 = JSON.parse(JSON.stringify(json2));
@@ -158,6 +217,9 @@ export function applyJsonDiff(json1, json2) {
difference.tables = difference.tables || {};
difference.enums = difference.enums || {};
difference.sequences = difference.sequences || {};
+ difference.roles = difference.roles || {};
+ difference.policies = difference.policies || {};
+ difference.views = difference.views || {};
// remove added/deleted schemas
const schemaKeys = Object.keys(difference.schemas);
@@ -239,6 +301,99 @@ export function applyJsonDiff(json1, json2) {
return json2.sequences[it[0]];
});
+ const rolesEntries = Object.entries(difference.roles);
+ const alteredRoles = rolesEntries
+ .filter((it) => !(it[0].includes('__added') || it[0].includes('__deleted')))
+ .map((it) => {
+ return json2.roles[it[0]];
+ });
+
+ const policiesEntries = Object.entries(difference.policies);
+ const alteredPolicies = policiesEntries
+ .filter((it) => !(it[0].includes('__added') || it[0].includes('__deleted')))
+ .map((it) => {
+ return json2.policies[it[0]];
+ });
+
+ const viewsEntries = Object.entries(difference.views);
+
+ const alteredViews = viewsEntries.filter((it) => !(it[0].includes('__added') || it[0].includes('__deleted'))).map(
+ ([nameWithSchema, view]) => {
+ const deletedWithOption = view.with__deleted;
+
+ const addedWithOption = view.with__added;
+
+ const deletedWith = Object.fromEntries(
+ Object.entries(view.with || {}).filter((it) => it[0].endsWith('__deleted')).map(([key, value]) => {
+ return [key.replace('__deleted', ''), value];
+ }),
+ );
+
+ const addedWith = Object.fromEntries(
+ Object.entries(view.with || {}).filter((it) => it[0].endsWith('__added')).map(([key, value]) => {
+ return [key.replace('__added', ''), value];
+ }),
+ );
+
+ const alterWith = Object.fromEntries(
+ Object.entries(view.with || {}).filter((it) =>
+ typeof it[1].__old !== 'undefined' && typeof it[1].__new !== 'undefined'
+ ).map(
+ (it) => {
+ return [it[0], it[1].__new];
+ },
+ ),
+ );
+
+ const alteredSchema = view.schema;
+
+ const alteredDefinition = view.definition;
+
+ const alteredExisting = view.isExisting;
+
+ const addedTablespace = view.tablespace__added;
+ const droppedTablespace = view.tablespace__deleted;
+ const alterTablespaceTo = view.tablespace;
+
+ let alteredTablespace;
+ if (addedTablespace) alteredTablespace = { __new: addedTablespace, __old: 'pg_default' };
+ if (droppedTablespace) alteredTablespace = { __new: 'pg_default', __old: droppedTablespace };
+ if (alterTablespaceTo) alteredTablespace = alterTablespaceTo;
+
+ const addedUsing = view.using__added;
+ const droppedUsing = view.using__deleted;
+ const alterUsingTo = view.using;
+
+ let alteredUsing;
+ if (addedUsing) alteredUsing = { __new: addedUsing, __old: 'heap' };
+ if (droppedUsing) alteredUsing = { __new: 'heap', __old: droppedUsing };
+ if (alterUsingTo) alteredUsing = alterUsingTo;
+
+ const alteredMeta = view.meta;
+
+ return Object.fromEntries(
+ Object.entries({
+ name: json2.views[nameWithSchema].name,
+ schema: json2.views[nameWithSchema].schema,
+ // pg
+ deletedWithOption: deletedWithOption,
+ addedWithOption: addedWithOption,
+ deletedWith: Object.keys(deletedWith).length ? deletedWith : undefined,
+ addedWith: Object.keys(addedWith).length ? addedWith : undefined,
+ alteredWith: Object.keys(alterWith).length ? alterWith : undefined,
+ alteredSchema,
+ alteredTablespace,
+ alteredUsing,
+ // mysql
+ alteredMeta,
+ // common
+ alteredDefinition,
+ alteredExisting,
+ }).filter(([_, value]) => value !== undefined),
+ );
+ },
+ );
+
const alteredTablesWithColumns = Object.values(difference.tables).map(
(table) => {
return findAlternationsInTable(table);
@@ -249,6 +404,9 @@ export function applyJsonDiff(json1, json2) {
alteredTablesWithColumns,
alteredEnums,
alteredSequences,
+ alteredRoles,
+ alteredViews,
+ alteredPolicies,
};
}
@@ -286,6 +444,28 @@ const findAlternationsInTable = (table) => {
}),
);
+ const deletedPolicies = Object.fromEntries(
+ Object.entries(table.policies__deleted || {})
+ .concat(
+ Object.entries(table.policies || {}).filter((it) => it[0].includes('__deleted')),
+ )
+ .map((entry) => [entry[0].replace('__deleted', ''), entry[1]]),
+ );
+
+ const addedPolicies = Object.fromEntries(
+ Object.entries(table.policies__added || {})
+ .concat(
+ Object.entries(table.policies || {}).filter((it) => it[0].includes('__added')),
+ )
+ .map((entry) => [entry[0].replace('__added', ''), entry[1]]),
+ );
+
+ const alteredPolicies = Object.fromEntries(
+ Object.entries(table.policies || {}).filter((it) => {
+ return !it[0].endsWith('__deleted') && !it[0].endsWith('__added');
+ }),
+ );
+
const deletedForeignKeys = Object.fromEntries(
Object.entries(table.foreignKeys__deleted || {})
.concat(
@@ -346,6 +526,24 @@ const findAlternationsInTable = (table) => {
}),
);
+ const addedCheckConstraints = Object.fromEntries(
+ Object.entries(table.checkConstraints || {}).filter((it) => {
+ return it[0].endsWith('__added');
+ }),
+ );
+
+ const deletedCheckConstraints = Object.fromEntries(
+ Object.entries(table.checkConstraints || {}).filter((it) => {
+ return it[0].endsWith('__deleted');
+ }),
+ );
+
+ const alteredCheckConstraints = Object.fromEntries(
+ Object.entries(table.checkConstraints || {}).filter((it) => {
+ return !it[0].endsWith('__deleted') && !it[0].endsWith('__added');
+ }),
+ );
+
const mappedAltered = altered.map((it) => alternationsInColumn(it)).filter(Boolean);
return {
@@ -364,11 +562,18 @@ const findAlternationsInTable = (table) => {
addedUniqueConstraints,
deletedUniqueConstraints,
alteredUniqueConstraints,
+ deletedPolicies,
+ addedPolicies,
+ alteredPolicies,
+ addedCheckConstraints,
+ deletedCheckConstraints,
+ alteredCheckConstraints,
};
};
const alternationsInColumn = (column) => {
const altered = [column];
+
const result = altered
.filter((it) => {
if ('type' in it && it.type.__old.replace(' (', '(') === it.type.__new.replace(' (', '(')) {
@@ -632,6 +837,33 @@ const alternationsInColumn = (column) => {
}
return it;
})
+ .map((it) => {
+ if ('' in it) {
+ return {
+ ...it,
+ autoincrement: {
+ type: 'changed',
+ old: it.autoincrement.__old,
+ new: it.autoincrement.__new,
+ },
+ };
+ }
+ if ('autoincrement__added' in it) {
+ const { autoincrement__added, ...others } = it;
+ return {
+ ...others,
+ autoincrement: { type: 'added', value: it.autoincrement__added },
+ };
+ }
+ if ('autoincrement__deleted' in it) {
+ const { autoincrement__deleted, ...others } = it;
+ return {
+ ...others,
+ autoincrement: { type: 'deleted', value: it.autoincrement__deleted },
+ };
+ }
+ return it;
+ })
.filter(Boolean);
return result[0];
diff --git a/drizzle-kit/src/jsonStatements.ts b/drizzle-kit/src/jsonStatements.ts
index ad2afea7f..f64020f5a 100644
--- a/drizzle-kit/src/jsonStatements.ts
+++ b/drizzle-kit/src/jsonStatements.ts
@@ -1,10 +1,26 @@
import chalk from 'chalk';
-import { table } from 'console';
+import { getNewTableName } from './cli/commands/sqlitePushUtils';
import { warning } from './cli/views';
-import { CommonSquashedSchema, Dialect } from './schemaValidator';
-import { MySqlKitInternals, MySqlSchema, MySqlSquasher } from './serializer/mysqlSchema';
-import { Index, PgSchema, PgSquasher } from './serializer/pgSchema';
-import { SQLiteKitInternals, SQLiteSquasher } from './serializer/sqliteSchema';
+import { CommonSquashedSchema } from './schemaValidator';
+import { MySqlKitInternals, MySqlSchema, MySqlSquasher, View as MySqlView } from './serializer/mysqlSchema';
+import {
+ Index,
+ MatViewWithOption,
+ PgSchema,
+ PgSquasher,
+ Policy,
+ Role,
+ View as PgView,
+ ViewWithOption,
+} from './serializer/pgSchema';
+import { SingleStoreKitInternals, SingleStoreSchema, SingleStoreSquasher } from './serializer/singlestoreSchema';
+import {
+ SQLiteKitInternals,
+ SQLiteSchemaInternal,
+ SQLiteSchemaSquashed,
+ SQLiteSquasher,
+ View as SqliteView,
+} from './serializer/sqliteSchema';
import { AlteredColumn, Column, Sequence, Table } from './snapshotsDiffer';
export interface JsonSqliteCreateTableStatement {
@@ -22,6 +38,7 @@ export interface JsonSqliteCreateTableStatement {
}[];
compositePKs: string[][];
uniqueConstraints?: string[];
+ checkConstraints?: string[];
}
export interface JsonCreateTableStatement {
@@ -32,13 +49,35 @@ export interface JsonCreateTableStatement {
compositePKs: string[];
compositePkName?: string;
uniqueConstraints?: string[];
- internals?: MySqlKitInternals;
+ policies?: string[];
+ checkConstraints?: string[];
+ internals?: MySqlKitInternals | SingleStoreKitInternals;
+ isRLSEnabled?: boolean;
+}
+
+export interface JsonRecreateTableStatement {
+ type: 'recreate_table';
+ tableName: string;
+ columns: Column[];
+ referenceData: {
+ name: string;
+ tableFrom: string;
+ columnsFrom: string[];
+ tableTo: string;
+ columnsTo: string[];
+ onUpdate?: string | undefined;
+ onDelete?: string | undefined;
+ }[];
+ compositePKs: string[][];
+ uniqueConstraints?: string[];
+ checkConstraints: string[];
}
export interface JsonDropTableStatement {
type: 'drop_table';
tableName: string;
schema: string;
+ policies?: string[];
}
export interface JsonRenameTableStatement {
@@ -84,6 +123,49 @@ export interface JsonAddValueToEnumStatement {
before: string;
}
+//////
+
+export interface JsonCreateRoleStatement {
+ type: 'create_role';
+ name: string;
+ values: {
+ inherit?: boolean;
+ createDb?: boolean;
+ createRole?: boolean;
+ };
+}
+
+export interface JsonDropRoleStatement {
+ type: 'drop_role';
+ name: string;
+}
+export interface JsonRenameRoleStatement {
+ type: 'rename_role';
+ nameFrom: string;
+ nameTo: string;
+}
+
+export interface JsonAlterRoleStatement {
+ type: 'alter_role';
+ name: string;
+ values: {
+ inherit?: boolean;
+ createDb?: boolean;
+ createRole?: boolean;
+ };
+}
+
+//////
+
+export interface JsonDropValueFromEnumStatement {
+ type: 'alter_type_drop_value';
+ name: string;
+ schema: string;
+ deletedValues: string[];
+ newValues: string[];
+ columnsWithEnum: { schema: string; table: string; column: string }[];
+}
+
export interface JsonCreateSequenceStatement {
type: 'create_sequence';
name: string;
@@ -153,12 +235,79 @@ export interface JsonSqliteAddColumnStatement {
referenceData?: string;
}
+export interface JsonCreatePolicyStatement {
+ type: 'create_policy';
+ tableName: string;
+ data: Policy;
+ schema: string;
+}
+
+export interface JsonCreateIndPolicyStatement {
+ type: 'create_ind_policy';
+ tableName: string;
+ data: Policy;
+}
+
+export interface JsonDropPolicyStatement {
+ type: 'drop_policy';
+ tableName: string;
+ data: Policy;
+ schema: string;
+}
+
+export interface JsonDropIndPolicyStatement {
+ type: 'drop_ind_policy';
+ tableName: string;
+ data: Policy;
+}
+
+export interface JsonRenamePolicyStatement {
+ type: 'rename_policy';
+ tableName: string;
+ oldName: string;
+ newName: string;
+ schema: string;
+}
+
+export interface JsonIndRenamePolicyStatement {
+ type: 'rename_ind_policy';
+ tableKey: string;
+ oldName: string;
+ newName: string;
+}
+
+export interface JsonEnableRLSStatement {
+ type: 'enable_rls';
+ tableName: string;
+ schema: string;
+}
+
+export interface JsonDisableRLSStatement {
+ type: 'disable_rls';
+ tableName: string;
+ schema: string;
+}
+
+export interface JsonAlterPolicyStatement {
+ type: 'alter_policy';
+ tableName: string;
+ oldData: string;
+ newData: string;
+ schema: string;
+}
+
+export interface JsonAlterIndPolicyStatement {
+ type: 'alter_ind_policy';
+ oldData: Policy;
+ newData: Policy;
+}
+
export interface JsonCreateIndexStatement {
type: 'create_index';
tableName: string;
data: string;
schema: string;
- internal?: MySqlKitInternals | SQLiteKitInternals;
+ internal?: MySqlKitInternals | SQLiteKitInternals | SingleStoreKitInternals;
}
export interface JsonPgCreateIndexStatement {
@@ -173,6 +322,10 @@ export interface JsonReferenceStatement {
data: string;
schema: string;
tableName: string;
+ isMulticolumn?: boolean;
+ columnNotNull?: boolean;
+ columnDefault?: string;
+ columnType?: string;
// fromTable: string;
// fromColumns: string[];
// toTable: string;
@@ -208,6 +361,20 @@ export interface JsonAlterUniqueConstraint {
newConstraintName?: string;
}
+export interface JsonCreateCheckConstraint {
+ type: 'create_check_constraint';
+ tableName: string;
+ data: string;
+ schema?: string;
+}
+
+export interface JsonDeleteCheckConstraint {
+ type: 'delete_check_constraint';
+ tableName: string;
+ constraintName: string;
+ schema?: string;
+}
+
export interface JsonCreateCompositePK {
type: 'create_composite_pk';
tableName: string;
@@ -498,6 +665,114 @@ export interface JsonRenameSchema {
to: string;
}
+export type JsonCreatePgViewStatement = {
+ type: 'create_view';
+} & Omit;
+
+export type JsonCreateMySqlViewStatement = {
+ type: 'mysql_create_view';
+ replace: boolean;
+} & Omit;
+
+/* export type JsonCreateSingleStoreViewStatement = {
+ type: 'singlestore_create_view';
+ replace: boolean;
+} & Omit; */
+
+export type JsonCreateSqliteViewStatement = {
+ type: 'sqlite_create_view';
+} & Omit;
+
+export interface JsonDropViewStatement {
+ type: 'drop_view';
+ name: string;
+ schema?: string;
+ materialized?: boolean;
+}
+
+export interface JsonRenameViewStatement {
+ type: 'rename_view';
+ nameTo: string;
+ nameFrom: string;
+ schema: string;
+ materialized?: boolean;
+}
+
+export interface JsonRenameMySqlViewStatement {
+ type: 'rename_view';
+ nameTo: string;
+ nameFrom: string;
+ schema: string;
+ materialized?: boolean;
+}
+
+export interface JsonAlterViewAlterSchemaStatement {
+ type: 'alter_view_alter_schema';
+ fromSchema: string;
+ toSchema: string;
+ name: string;
+ materialized?: boolean;
+}
+
+export type JsonAlterViewAddWithOptionStatement =
+ & {
+ type: 'alter_view_add_with_option';
+ schema: string;
+ name: string;
+ }
+ & ({
+ materialized: true;
+ with: MatViewWithOption;
+ } | {
+ materialized: false;
+ with: ViewWithOption;
+ });
+
+export type JsonAlterViewDropWithOptionStatement =
+ & {
+ type: 'alter_view_drop_with_option';
+ schema: string;
+ name: string;
+ }
+ & ({
+ materialized: true;
+ with: MatViewWithOption;
+ } | {
+ materialized: false;
+ with: ViewWithOption;
+ });
+
+export interface JsonAlterViewAlterTablespaceStatement {
+ type: 'alter_view_alter_tablespace';
+ toTablespace: string;
+ name: string;
+ schema: string;
+ materialized: true;
+}
+
+export interface JsonAlterViewAlterUsingStatement {
+ type: 'alter_view_alter_using';
+ toUsing: string;
+ name: string;
+ schema: string;
+ materialized: true;
+}
+
+export type JsonAlterMySqlViewStatement = {
+ type: 'alter_mysql_view';
+} & Omit;
+
+/* export type JsonAlterSingleStoreViewStatement = {
+ type: 'alter_singlestore_view';
+} & Omit; */
+
+export type JsonAlterViewStatement =
+ | JsonAlterViewAlterSchemaStatement
+ | JsonAlterViewAddWithOptionStatement
+ | JsonAlterViewDropWithOptionStatement
+ | JsonAlterViewAlterTablespaceStatement
+ | JsonAlterViewAlterUsingStatement;
+
export type JsonAlterColumnStatement =
| JsonRenameColumnStatement
| JsonAlterColumnTypeStatement
@@ -519,6 +794,7 @@ export type JsonAlterColumnStatement =
| JsonAlterColumnDropIdentityStatement;
export type JsonStatement =
+ | JsonRecreateTableStatement
| JsonAlterColumnStatement
| JsonCreateTableStatement
| JsonDropTableStatement
@@ -555,14 +831,41 @@ export type JsonStatement =
| JsonDropSequenceStatement
| JsonCreateSequenceStatement
| JsonMoveSequenceStatement
- | JsonRenameSequenceStatement;
+ | JsonRenameSequenceStatement
+ | JsonDropPolicyStatement
+ | JsonCreatePolicyStatement
+ | JsonAlterPolicyStatement
+ | JsonRenamePolicyStatement
+ | JsonEnableRLSStatement
+ | JsonDisableRLSStatement
+ | JsonRenameRoleStatement
+ | JsonCreateRoleStatement
+ | JsonDropRoleStatement
+ | JsonAlterRoleStatement
+ | JsonCreatePgViewStatement
+ | JsonDropViewStatement
+ | JsonRenameViewStatement
+ | JsonAlterViewStatement
+ | JsonCreateMySqlViewStatement
+ | JsonAlterMySqlViewStatement
+ /* | JsonCreateSingleStoreViewStatement
+ | JsonAlterSingleStoreViewStatement */
+ | JsonCreateSqliteViewStatement
+ | JsonCreateCheckConstraint
+ | JsonDeleteCheckConstraint
+ | JsonDropValueFromEnumStatement
+ | JsonIndRenamePolicyStatement
+ | JsonDropIndPolicyStatement
+ | JsonCreateIndPolicyStatement
+ | JsonAlterIndPolicyStatement;
export const preparePgCreateTableJson = (
table: Table,
// TODO: remove?
json2: PgSchema,
): JsonCreateTableStatement => {
- const { name, schema, columns, compositePrimaryKeys, uniqueConstraints } = table;
+ const { name, schema, columns, compositePrimaryKeys, uniqueConstraints, checkConstraints, policies, isRLSEnabled } =
+ table;
const tableKey = `${schema || 'public'}.${name}`;
// TODO: @AndriiSherman. We need this, will add test cases
@@ -580,6 +883,9 @@ export const preparePgCreateTableJson = (
compositePKs: Object.values(compositePrimaryKeys),
compositePkName: compositePkName,
uniqueConstraints: Object.values(uniqueConstraints),
+ policies: Object.values(policies),
+ checkConstraints: Object.values(checkConstraints),
+ isRLSEnabled: isRLSEnabled ?? false,
};
};
@@ -592,7 +898,7 @@ export const prepareMySqlCreateTableJson = (
// if previously it was an expression or column
internals: MySqlKitInternals,
): JsonCreateTableStatement => {
- const { name, schema, columns, compositePrimaryKeys, uniqueConstraints } = table;
+ const { name, schema, columns, compositePrimaryKeys, uniqueConstraints, checkConstraints } = table;
return {
type: 'create_table',
@@ -608,6 +914,35 @@ export const prepareMySqlCreateTableJson = (
: '',
uniqueConstraints: Object.values(uniqueConstraints),
internals,
+ checkConstraints: Object.values(checkConstraints),
+ };
+};
+
+export const prepareSingleStoreCreateTableJson = (
+ table: Table,
+ // TODO: remove?
+ json2: SingleStoreSchema,
+ // we need it to know if some of the indexes(and in future other parts) are expressions or columns
+ // didn't change singlestoreserialaizer, because it will break snapshots and diffs and it's hard to detect
+ // if previously it was an expression or column
+ internals: SingleStoreKitInternals,
+): JsonCreateTableStatement => {
+ const { name, schema, columns, compositePrimaryKeys, uniqueConstraints } = table;
+
+ return {
+ type: 'create_table',
+ tableName: name,
+ schema,
+ columns: Object.values(columns),
+ compositePKs: Object.values(compositePrimaryKeys),
+ compositePkName: Object.values(compositePrimaryKeys).length > 0
+ ? json2.tables[name].compositePrimaryKeys[
+ SingleStoreSquasher.unsquashPK(Object.values(compositePrimaryKeys)[0])
+ .name
+ ].name
+ : '',
+ uniqueConstraints: Object.values(uniqueConstraints),
+ internals,
};
};
@@ -615,7 +950,7 @@ export const prepareSQLiteCreateTable = (
table: Table,
action?: 'push' | undefined,
): JsonSqliteCreateTableStatement => {
- const { name, columns, uniqueConstraints } = table;
+ const { name, columns, uniqueConstraints, checkConstraints } = table;
const references: string[] = Object.values(table.foreignKeys);
@@ -636,6 +971,7 @@ export const prepareSQLiteCreateTable = (
referenceData: fks,
compositePKs: composites,
uniqueConstraints: Object.values(uniqueConstraints),
+ checkConstraints: Object.values(checkConstraints),
};
};
@@ -644,6 +980,7 @@ export const prepareDropTableJson = (table: Table): JsonDropTableStatement => {
type: 'drop_table',
tableName: table.name,
schema: table.schema,
+ policies: table.policies ? Object.values(table.policies) : [],
};
};
@@ -690,6 +1027,36 @@ export const prepareAddValuesToEnumJson = (
});
};
+export const prepareDropEnumValues = (
+ name: string,
+ schema: string,
+ removedValues: string[],
+ json2: PgSchema,
+): JsonDropValueFromEnumStatement[] => {
+ if (!removedValues.length) return [];
+
+ const affectedColumns: { schema: string; table: string; column: string }[] = [];
+
+ for (const tableKey in json2.tables) {
+ const table = json2.tables[tableKey];
+ for (const columnKey in table.columns) {
+ const column = table.columns[columnKey];
+ if (column.type === name && column.typeSchema === schema) {
+ affectedColumns.push({ schema: table.schema || 'public', table: table.name, column: column.name });
+ }
+ }
+ }
+
+ return [{
+ type: 'alter_type_drop_value',
+ name: name,
+ schema: schema,
+ deletedValues: removedValues,
+ newValues: json2.enums[`${schema}.${name}`].values,
+ columnsWithEnum: affectedColumns,
+ }];
+};
+
export const prepareDropEnumJson = (
name: string,
schema: string,
@@ -794,6 +1161,56 @@ export const prepareRenameSequenceJson = (
////////////
+export const prepareCreateRoleJson = (
+ role: Role,
+): JsonCreateRoleStatement => {
+ return {
+ type: 'create_role',
+ name: role.name,
+ values: {
+ createDb: role.createDb,
+ createRole: role.createRole,
+ inherit: role.inherit,
+ },
+ };
+};
+
+export const prepareAlterRoleJson = (
+ role: Role,
+): JsonAlterRoleStatement => {
+ return {
+ type: 'alter_role',
+ name: role.name,
+ values: {
+ createDb: role.createDb,
+ createRole: role.createRole,
+ inherit: role.inherit,
+ },
+ };
+};
+
+export const prepareDropRoleJson = (
+ name: string,
+): JsonDropRoleStatement => {
+ return {
+ type: 'drop_role',
+ name: name,
+ };
+};
+
+export const prepareRenameRoleJson = (
+ nameFrom: string,
+ nameTo: string,
+): JsonRenameRoleStatement => {
+ return {
+ type: 'rename_role',
+ nameFrom,
+ nameTo,
+ };
+};
+
+//////////
+
export const prepareCreateSchemasJson = (
values: string[],
): JsonCreateSchema[] => {
@@ -830,7 +1247,7 @@ export const prepareDeleteSchemasJson = (
export const prepareRenameColumns = (
tableName: string,
- // TODO: split for pg and mysql+sqlite without schema
+ // TODO: split for pg and mysql+sqlite and singlestore without schema
schema: string,
pairs: { from: Column; to: Column }[],
): JsonRenameColumnStatement[] => {
@@ -893,19 +1310,374 @@ export const _prepareSqliteAddColumns = (
return undefined;
}
- return {
- type: 'sqlite_alter_table_add_column',
- tableName: tableName,
- column: it,
- referenceData: columnsWithReference
- ? SQLiteSquasher.squashFK(columnsWithReference)
- : undefined,
- };
- })
- .filter(Boolean) as JsonSqliteAddColumnStatement[];
+ return {
+ type: 'sqlite_alter_table_add_column',
+ tableName: tableName,
+ column: it,
+ referenceData: columnsWithReference
+ ? SQLiteSquasher.squashFK(columnsWithReference)
+ : undefined,
+ };
+ })
+ .filter(Boolean) as JsonSqliteAddColumnStatement[];
+};
+
+export const prepareAlterColumnsMysql = (
+ tableName: string,
+ schema: string,
+ columns: AlteredColumn[],
+ // TODO: remove?
+ json1: CommonSquashedSchema,
+ json2: CommonSquashedSchema,
+ action?: 'push' | undefined,
+): JsonAlterColumnStatement[] => {
+ let statements: JsonAlterColumnStatement[] = [];
+ let dropPkStatements: JsonAlterColumnDropPrimaryKeyStatement[] = [];
+ let setPkStatements: JsonAlterColumnSetPrimaryKeyStatement[] = [];
+
+ for (const column of columns) {
+ const columnName = typeof column.name !== 'string' ? column.name.new : column.name;
+
+ const table = json2.tables[tableName];
+ const snapshotColumn = table.columns[columnName];
+
+ const columnType = snapshotColumn.type;
+ const columnDefault = snapshotColumn.default;
+ const columnOnUpdate = 'onUpdate' in snapshotColumn ? snapshotColumn.onUpdate : undefined;
+ const columnNotNull = table.columns[columnName].notNull;
+
+ const columnAutoIncrement = 'autoincrement' in snapshotColumn
+ ? snapshotColumn.autoincrement ?? false
+ : false;
+
+ const columnPk = table.columns[columnName].primaryKey;
+
+ if (column.autoincrement?.type === 'added') {
+ statements.push({
+ type: 'alter_table_alter_column_set_autoincrement',
+ tableName,
+ columnName,
+ schema,
+ newDataType: columnType,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ });
+ }
+
+ if (column.autoincrement?.type === 'changed') {
+ const type = column.autoincrement.new
+ ? 'alter_table_alter_column_set_autoincrement'
+ : 'alter_table_alter_column_drop_autoincrement';
+
+ statements.push({
+ type,
+ tableName,
+ columnName,
+ schema,
+ newDataType: columnType,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ });
+ }
+
+ if (column.autoincrement?.type === 'deleted') {
+ statements.push({
+ type: 'alter_table_alter_column_drop_autoincrement',
+ tableName,
+ columnName,
+ schema,
+ newDataType: columnType,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ });
+ }
+ }
+
+ for (const column of columns) {
+ const columnName = typeof column.name !== 'string' ? column.name.new : column.name;
+
+ // I used any, because those fields are available only for mysql dialect
+ // For other dialects it will become undefined, that is fine for json statements
+ const columnType = json2.tables[tableName].columns[columnName].type;
+ const columnDefault = json2.tables[tableName].columns[columnName].default;
+ const columnGenerated = json2.tables[tableName].columns[columnName].generated;
+ const columnOnUpdate = (json2.tables[tableName].columns[columnName] as any)
+ .onUpdate;
+ const columnNotNull = json2.tables[tableName].columns[columnName].notNull;
+ const columnAutoIncrement = (
+ json2.tables[tableName].columns[columnName] as any
+ ).autoincrement;
+ const columnPk = (json2.tables[tableName].columns[columnName] as any)
+ .primaryKey;
+
+ const compositePk = json2.tables[tableName].compositePrimaryKeys[
+ `${tableName}_${columnName}`
+ ];
+
+ if (typeof column.name !== 'string') {
+ statements.push({
+ type: 'alter_table_rename_column',
+ tableName,
+ oldColumnName: column.name.old,
+ newColumnName: column.name.new,
+ schema,
+ });
+ }
+
+ if (column.type?.type === 'changed') {
+ statements.push({
+ type: 'alter_table_alter_column_set_type',
+ tableName,
+ columnName,
+ newDataType: column.type.new,
+ oldDataType: column.type.old,
+ schema,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ columnGenerated,
+ });
+ }
+
+ if (
+ column.primaryKey?.type === 'deleted'
+ || (column.primaryKey?.type === 'changed'
+ && !column.primaryKey.new
+ && typeof compositePk === 'undefined')
+ ) {
+ dropPkStatements.push({
+ ////
+ type: 'alter_table_alter_column_drop_pk',
+ tableName,
+ columnName,
+ schema,
+ });
+ }
+
+ if (column.default?.type === 'added') {
+ statements.push({
+ type: 'alter_table_alter_column_set_default',
+ tableName,
+ columnName,
+ newDefaultValue: column.default.value,
+ schema,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ newDataType: columnType,
+ columnPk,
+ });
+ }
+
+ if (column.default?.type === 'changed') {
+ statements.push({
+ type: 'alter_table_alter_column_set_default',
+ tableName,
+ columnName,
+ newDefaultValue: column.default.new,
+ oldDefaultValue: column.default.old,
+ schema,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ newDataType: columnType,
+ columnPk,
+ });
+ }
+
+ if (column.default?.type === 'deleted') {
+ statements.push({
+ type: 'alter_table_alter_column_drop_default',
+ tableName,
+ columnName,
+ schema,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ newDataType: columnType,
+ columnPk,
+ });
+ }
+
+ if (column.notNull?.type === 'added') {
+ statements.push({
+ type: 'alter_table_alter_column_set_notnull',
+ tableName,
+ columnName,
+ schema,
+ newDataType: columnType,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ });
+ }
+
+ if (column.notNull?.type === 'changed') {
+ const type = column.notNull.new
+ ? 'alter_table_alter_column_set_notnull'
+ : 'alter_table_alter_column_drop_notnull';
+ statements.push({
+ type: type,
+ tableName,
+ columnName,
+ schema,
+ newDataType: columnType,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ });
+ }
+
+ if (column.notNull?.type === 'deleted') {
+ statements.push({
+ type: 'alter_table_alter_column_drop_notnull',
+ tableName,
+ columnName,
+ schema,
+ newDataType: columnType,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ });
+ }
+
+ if (column.generated?.type === 'added') {
+ if (columnGenerated?.type === 'virtual') {
+ warning(
+ `You are trying to add virtual generated constraint to ${
+ chalk.blue(
+ columnName,
+ )
+ } column. As MySQL docs mention: "Nongenerated columns can be altered to stored but not virtual generated columns". We will drop an existing column and add it with a virtual generated statement. This means that the data previously stored in this column will be wiped, and new data will be generated on each read for this column\n`,
+ );
+ }
+ statements.push({
+ type: 'alter_table_alter_column_set_generated',
+ tableName,
+ columnName,
+ schema,
+ newDataType: columnType,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ columnGenerated,
+ });
+ }
+
+ if (column.generated?.type === 'changed' && action !== 'push') {
+ statements.push({
+ type: 'alter_table_alter_column_alter_generated',
+ tableName,
+ columnName,
+ schema,
+ newDataType: columnType,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ columnGenerated,
+ });
+ }
+
+ if (column.generated?.type === 'deleted') {
+ if (columnGenerated?.type === 'virtual') {
+ warning(
+ `You are trying to remove virtual generated constraint from ${
+ chalk.blue(
+ columnName,
+ )
+ } column. As MySQL docs mention: "Stored but not virtual generated columns can be altered to nongenerated columns. The stored generated values become the values of the nongenerated column". We will drop an existing column and add it without a virtual generated statement. This means that this column will have no data after migration\n`,
+ );
+ }
+ statements.push({
+ type: 'alter_table_alter_column_drop_generated',
+ tableName,
+ columnName,
+ schema,
+ newDataType: columnType,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ columnGenerated,
+ oldColumn: json1.tables[tableName].columns[columnName],
+ });
+ }
+
+ if (
+ column.primaryKey?.type === 'added'
+ || (column.primaryKey?.type === 'changed' && column.primaryKey.new)
+ ) {
+ const wasAutoincrement = statements.filter(
+ (it) => it.type === 'alter_table_alter_column_set_autoincrement',
+ );
+ if (wasAutoincrement.length === 0) {
+ setPkStatements.push({
+ type: 'alter_table_alter_column_set_pk',
+ tableName,
+ schema,
+ columnName,
+ });
+ }
+ }
+
+ if (column.onUpdate?.type === 'added') {
+ statements.push({
+ type: 'alter_table_alter_column_set_on_update',
+ tableName,
+ columnName,
+ schema,
+ newDataType: columnType,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ });
+ }
+
+ if (column.onUpdate?.type === 'deleted') {
+ statements.push({
+ type: 'alter_table_alter_column_drop_on_update',
+ tableName,
+ columnName,
+ schema,
+ newDataType: columnType,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ });
+ }
+ }
+
+ return [...dropPkStatements, ...setPkStatements, ...statements];
};
-export const prepareAlterColumnsMysql = (
+export const prepareAlterColumnsSingleStore = (
tableName: string,
schema: string,
columns: AlteredColumn[],
@@ -988,7 +1760,7 @@ export const prepareAlterColumnsMysql = (
for (const column of columns) {
const columnName = typeof column.name !== 'string' ? column.name.new : column.name;
- // I used any, because those fields are available only for mysql dialect
+ // I used any, because those fields are available only for mysql and singlestore dialect
// For other dialects it will become undefined, that is fine for json statements
const columnType = json2.tables[tableName].columns[columnName].type;
const columnDefault = json2.tables[tableName].columns[columnName].default;
@@ -1144,6 +1916,7 @@ export const prepareAlterColumnsMysql = (
if (column.generated?.type === 'added') {
if (columnGenerated?.type === 'virtual') {
+ // TODO: Change warning message according to SingleStore docs
warning(
`You are trying to add virtual generated constraint to ${
chalk.blue(
@@ -1185,6 +1958,7 @@ export const prepareAlterColumnsMysql = (
if (column.generated?.type === 'deleted') {
if (columnGenerated?.type === 'virtual') {
+ // TODO: Change warning message according to SingleStore docs
warning(
`You are trying to remove virtual generated constraint from ${
chalk.blue(
@@ -1637,6 +2411,55 @@ export const prepareSqliteAlterColumns = (
`${tableName}_${columnName}`
];
+ if (column.autoincrement?.type === 'added') {
+ statements.push({
+ type: 'alter_table_alter_column_set_autoincrement',
+ tableName,
+ columnName,
+ schema,
+ newDataType: columnType,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ });
+ }
+
+ if (column.autoincrement?.type === 'changed') {
+ const type = column.autoincrement.new
+ ? 'alter_table_alter_column_set_autoincrement'
+ : 'alter_table_alter_column_drop_autoincrement';
+
+ statements.push({
+ type,
+ tableName,
+ columnName,
+ schema,
+ newDataType: columnType,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ });
+ }
+
+ if (column.autoincrement?.type === 'deleted') {
+ statements.push({
+ type: 'alter_table_alter_column_drop_autoincrement',
+ tableName,
+ columnName,
+ schema,
+ newDataType: columnType,
+ columnDefault,
+ columnOnUpdate,
+ columnNotNull,
+ columnAutoIncrement,
+ columnPk,
+ });
+ }
+
if (typeof column.name !== 'string') {
statements.push({
type: 'alter_table_rename_column',
@@ -1883,6 +2706,121 @@ export const prepareSqliteAlterColumns = (
return [...dropPkStatements, ...setPkStatements, ...statements];
};
+export const prepareRenamePolicyJsons = (
+ tableName: string,
+ schema: string,
+ renames: {
+ from: Policy;
+ to: Policy;
+ }[],
+): JsonRenamePolicyStatement[] => {
+ return renames.map((it) => {
+ return {
+ type: 'rename_policy',
+ tableName: tableName,
+ oldName: it.from.name,
+ newName: it.to.name,
+ schema,
+ };
+ });
+};
+
+export const prepareRenameIndPolicyJsons = (
+ renames: {
+ from: Policy;
+ to: Policy;
+ }[],
+): JsonIndRenamePolicyStatement[] => {
+ return renames.map((it) => {
+ return {
+ type: 'rename_ind_policy',
+ tableKey: it.from.on!,
+ oldName: it.from.name,
+ newName: it.to.name,
+ };
+ });
+};
+
+export const prepareCreatePolicyJsons = (
+ tableName: string,
+ schema: string,
+ policies: Policy[],
+): JsonCreatePolicyStatement[] => {
+ return policies.map((it) => {
+ return {
+ type: 'create_policy',
+ tableName,
+ data: it,
+ schema,
+ };
+ });
+};
+
+export const prepareCreateIndPolicyJsons = (
+ policies: Policy[],
+): JsonCreateIndPolicyStatement[] => {
+ return policies.map((it) => {
+ return {
+ type: 'create_ind_policy',
+ tableName: it.on!,
+ data: it,
+ };
+ });
+};
+
+export const prepareDropPolicyJsons = (
+ tableName: string,
+ schema: string,
+ policies: Policy[],
+): JsonDropPolicyStatement[] => {
+ return policies.map((it) => {
+ return {
+ type: 'drop_policy',
+ tableName,
+ data: it,
+ schema,
+ };
+ });
+};
+
+export const prepareDropIndPolicyJsons = (
+ policies: Policy[],
+): JsonDropIndPolicyStatement[] => {
+ return policies.map((it) => {
+ return {
+ type: 'drop_ind_policy',
+ tableName: it.on!,
+ data: it,
+ };
+ });
+};
+
+export const prepareAlterPolicyJson = (
+ tableName: string,
+ schema: string,
+ oldPolicy: string,
+ newPolicy: string,
+): JsonAlterPolicyStatement => {
+ return {
+ type: 'alter_policy',
+ tableName,
+ oldData: oldPolicy,
+ newData: newPolicy,
+ schema,
+ };
+};
+
+export const prepareAlterIndPolicyJson = (
+ oldPolicy: Policy,
+ newPolicy: Policy,
+): JsonAlterIndPolicyStatement => {
+ return {
+ type: 'alter_ind_policy',
+ oldData: oldPolicy,
+ newData: newPolicy,
+ };
+};
+
export const preparePgCreateIndexesJson = (
tableName: string,
schema: string,
@@ -1944,6 +2882,54 @@ export const prepareCreateReferencesJson = (
};
});
};
+export const prepareLibSQLCreateReferencesJson = (
+ tableName: string,
+ schema: string,
+ foreignKeys: Record,
+ json2: SQLiteSchemaSquashed,
+ action?: 'push',
+): JsonCreateReferenceStatement[] => {
+ return Object.values(foreignKeys).map((fkData) => {
+ const { columnsFrom, tableFrom, columnsTo } = action === 'push'
+ ? SQLiteSquasher.unsquashPushFK(fkData)
+ : SQLiteSquasher.unsquashFK(fkData);
+
+ // When trying to alter table in lib sql it is necessary to pass all config for column like "NOT NULL", "DEFAULT", etc.
+ // If it is multicolumn reference it is not possible to pass this data for all columns
+ // Pass multicolumn flag for sql statements to not generate migration
+ let isMulticolumn = false;
+
+ if (columnsFrom.length > 1 || columnsTo.length > 1) {
+ isMulticolumn = true;
+
+ return {
+ type: 'create_reference',
+ tableName,
+ data: fkData,
+ schema,
+ isMulticolumn,
+ };
+ }
+
+ const columnFrom = columnsFrom[0];
+
+ const {
+ notNull: columnNotNull,
+ default: columnDefault,
+ type: columnType,
+ } = json2.tables[tableFrom].columns[columnFrom];
+
+ return {
+ type: 'create_reference',
+ tableName,
+ data: fkData,
+ schema,
+ columnNotNull,
+ columnDefault,
+ columnType,
+ };
+ });
+};
export const prepareDropReferencesJson = (
tableName: string,
@@ -1959,6 +2945,77 @@ export const prepareDropReferencesJson = (
};
});
};
+export const prepareLibSQLDropReferencesJson = (
+ tableName: string,
+ schema: string,
+ foreignKeys: Record,
+ json2: SQLiteSchemaSquashed,
+ meta: SQLiteSchemaInternal['_meta'],
+ action?: 'push',
+): JsonDeleteReferenceStatement[] => {
+ const statements = Object.values(foreignKeys).map((fkData) => {
+ const { columnsFrom, tableFrom, columnsTo, name, tableTo, onDelete, onUpdate } = action === 'push'
+ ? SQLiteSquasher.unsquashPushFK(fkData)
+ : SQLiteSquasher.unsquashFK(fkData);
+
+ // If all columns from where were references were deleted -> skip this logic
+ // Drop columns will cover this scenario
+ const keys = Object.keys(json2.tables[tableName].columns);
+ const filtered = columnsFrom.filter((it) => keys.includes(it));
+ const fullDrop = filtered.length === 0;
+ if (fullDrop) return;
+
+ // When trying to alter table in lib sql it is necessary to pass all config for column like "NOT NULL", "DEFAULT", etc.
+ // If it is multicolumn reference it is not possible to pass this data for all columns
+ // Pass multicolumn flag for sql statements to not generate migration
+ let isMulticolumn = false;
+
+ if (columnsFrom.length > 1 || columnsTo.length > 1) {
+ isMulticolumn = true;
+
+ return {
+ type: 'delete_reference',
+ tableName,
+ data: fkData,
+ schema,
+ isMulticolumn,
+ };
+ }
+
+ const columnFrom = columnsFrom[0];
+ const newTableName = getNewTableName(tableFrom, meta);
+
+ const {
+ notNull: columnNotNull,
+ default: columnDefault,
+ type: columnType,
+ } = json2.tables[newTableName].columns[columnFrom];
+
+ const fkToSquash = {
+ columnsFrom,
+ columnsTo,
+ name,
+ tableFrom: newTableName,
+ tableTo,
+ onDelete,
+ onUpdate,
+ };
+ const foreignKey = action === 'push'
+ ? SQLiteSquasher.squashPushFK(fkToSquash)
+ : SQLiteSquasher.squashFK(fkToSquash);
+ return {
+ type: 'delete_reference',
+ tableName,
+ data: foreignKey,
+ schema,
+ columnNotNull,
+ columnDefault,
+ columnType,
+ };
+ });
+
+ return statements.filter((it) => it) as JsonDeleteReferenceStatement[];
+};
// alter should create 2 statements. It's important to make only 1 sql per statement(for breakpoints)
export const prepareAlterReferencesJson = (
@@ -2054,9 +3111,7 @@ export const prepareAddCompositePrimaryKeyPg = (
tableName,
data: it,
schema,
- constraintName: json2.tables[`${schema || 'public'}.${tableName}`].compositePrimaryKeys[
- unsquashed.name
- ].name,
+ constraintName: PgSquasher.unsquashPK(it).name,
} as JsonCreateCompositePK;
});
};
@@ -2074,9 +3129,7 @@ export const prepareDeleteCompositePrimaryKeyPg = (
tableName,
data: it,
schema,
- constraintName: json1.tables[`${schema || 'public'}.${tableName}`].compositePrimaryKeys[
- PgSquasher.unsquashPK(it).name
- ].name,
+ constraintName: PgSquasher.unsquashPK(it).name,
} as JsonDeleteCompositePK;
});
};
@@ -2096,12 +3149,8 @@ export const prepareAlterCompositePrimaryKeyPg = (
old: it.__old,
new: it.__new,
schema,
- oldConstraintName: json1.tables[`${schema || 'public'}.${tableName}`].compositePrimaryKeys[
- PgSquasher.unsquashPK(it.__old).name
- ].name,
- newConstraintName: json2.tables[`${schema || 'public'}.${tableName}`].compositePrimaryKeys[
- PgSquasher.unsquashPK(it.__new).name
- ].name,
+ oldConstraintName: PgSquasher.unsquashPK(it.__old).name,
+ newConstraintName: PgSquasher.unsquashPK(it.__new).name,
} as JsonAlterCompositePK;
});
};
@@ -2136,6 +3185,36 @@ export const prepareDeleteUniqueConstraintPg = (
});
};
+export const prepareAddCheckConstraint = (
+ tableName: string,
+ schema: string,
+ check: Record,
+): JsonCreateCheckConstraint[] => {
+ return Object.values(check).map((it) => {
+ return {
+ type: 'create_check_constraint',
+ tableName,
+ data: it,
+ schema,
+ } as JsonCreateCheckConstraint;
+ });
+};
+
+export const prepareDeleteCheckConstraint = (
+ tableName: string,
+ schema: string,
+ check: Record,
+): JsonDeleteCheckConstraint[] => {
+ return Object.values(check).map((it) => {
+ return {
+ type: 'delete_check_constraint',
+ tableName,
+ constraintName: PgSquasher.unsquashCheck(it).name,
+ schema,
+ } as JsonDeleteCheckConstraint;
+ });
+};
+
// add create table changes
// add handler to make drop and add and not alter(looking at __old and __new)
// add serializer for mysql and sqlite + types
@@ -2184,7 +3263,7 @@ export const prepareAddCompositePrimaryKeyMySql = (
type: 'create_composite_pk',
tableName,
data: it,
- constraintName: json2.tables[tableName].compositePrimaryKeys[unsquashed.name].name,
+ constraintName: unsquashed.name,
} as JsonCreateCompositePK);
}
return res;
@@ -2197,13 +3276,11 @@ export const prepareDeleteCompositePrimaryKeyMySql = (
json1: MySqlSchema,
): JsonDeleteCompositePK[] => {
return Object.values(pks).map((it) => {
+ const unsquashed = MySqlSquasher.unsquashPK(it);
return {
type: 'delete_composite_pk',
tableName,
data: it,
- constraintName: json1.tables[tableName].compositePrimaryKeys[
- MySqlSquasher.unsquashPK(it).name
- ].name,
} as JsonDeleteCompositePK;
});
};
@@ -2230,3 +3307,194 @@ export const prepareAlterCompositePrimaryKeyMySql = (
} as JsonAlterCompositePK;
});
};
+
+export const preparePgCreateViewJson = (
+ name: string,
+ schema: string,
+ definition: string,
+ materialized: boolean,
+ withNoData: boolean = false,
+ withOption?: any,
+ using?: string,
+ tablespace?: string,
+): JsonCreatePgViewStatement => {
+ return {
+ type: 'create_view',
+ name: name,
+ schema: schema,
+ definition: definition,
+ with: withOption,
+ materialized: materialized,
+ withNoData,
+ using,
+ tablespace,
+ };
+};
+
+export const prepareMySqlCreateViewJson = (
+ name: string,
+ definition: string,
+ meta: string,
+ replace: boolean = false,
+): JsonCreateMySqlViewStatement => {
+ const { algorithm, sqlSecurity, withCheckOption } = MySqlSquasher.unsquashView(meta);
+ return {
+ type: 'mysql_create_view',
+ name: name,
+ definition: definition,
+ algorithm,
+ sqlSecurity,
+ withCheckOption,
+ replace,
+ };
+};
+
+/* export const prepareSingleStoreCreateViewJson = (
+ name: string,
+ definition: string,
+ meta: string,
+ replace: boolean = false,
+): JsonCreateSingleStoreViewStatement => {
+ const { algorithm, sqlSecurity, withCheckOption } = SingleStoreSquasher.unsquashView(meta);
+ return {
+ type: 'singlestore_create_view',
+ name: name,
+ definition: definition,
+ algorithm,
+ sqlSecurity,
+ withCheckOption,
+ replace,
+ };
+}; */
+
+export const prepareSqliteCreateViewJson = (
+ name: string,
+ definition: string,
+): JsonCreateSqliteViewStatement => {
+ return {
+ type: 'sqlite_create_view',
+ name: name,
+ definition: definition,
+ };
+};
+
+export const prepareDropViewJson = (
+ name: string,
+ schema?: string,
+ materialized?: boolean,
+): JsonDropViewStatement => {
+ const resObject: JsonDropViewStatement = { name, type: 'drop_view' };
+
+ if (schema) resObject['schema'] = schema;
+
+ if (materialized) resObject['materialized'] = materialized;
+
+ return resObject;
+};
+
+export const prepareRenameViewJson = (
+ to: string,
+ from: string,
+ schema?: string,
+ materialized?: boolean,
+): JsonRenameViewStatement => {
+ const resObject: JsonRenameViewStatement = {
+ type: 'rename_view',
+ nameTo: to,
+ nameFrom: from,
+ };
+
+ if (schema) resObject['schema'] = schema;
+ if (materialized) resObject['materialized'] = materialized;
+
+ return resObject;
+};
+
+export const preparePgAlterViewAlterSchemaJson = (
+ to: string,
+ from: string,
+ name: string,
+ materialized?: boolean,
+): JsonAlterViewAlterSchemaStatement => {
+ const returnObject: JsonAlterViewAlterSchemaStatement = {
+ type: 'alter_view_alter_schema',
+ fromSchema: from,
+ toSchema: to,
+ name,
+ };
+
+ if (materialized) returnObject['materialized'] = materialized;
+ return returnObject;
+};
+
+export const preparePgAlterViewAddWithOptionJson = (
+ name: string,
+ schema: string,
+ materialized: boolean,
+ withOption: MatViewWithOption | ViewWithOption,
+): JsonAlterViewAddWithOptionStatement => {
+ return {
+ type: 'alter_view_add_with_option',
+ name,
+ schema,
+ materialized: materialized,
+ with: withOption,
+ } as JsonAlterViewAddWithOptionStatement;
+};
+
+export const preparePgAlterViewDropWithOptionJson = (
+ name: string,
+ schema: string,
+ materialized: boolean,
+ withOption: MatViewWithOption | ViewWithOption,
+): JsonAlterViewDropWithOptionStatement => {
+ return {
+ type: 'alter_view_drop_with_option',
+ name,
+ schema,
+ materialized: materialized,
+ with: withOption,
+ } as JsonAlterViewDropWithOptionStatement;
+};
+
+export const preparePgAlterViewAlterTablespaceJson = (
+ name: string,
+ schema: string,
+ materialized: boolean,
+ to: string,
+): JsonAlterViewAlterTablespaceStatement => {
+ return {
+ type: 'alter_view_alter_tablespace',
+ name,
+ schema,
+ materialized: materialized,
+ toTablespace: to,
+ } as JsonAlterViewAlterTablespaceStatement;
+};
+
+export const preparePgAlterViewAlterUsingJson = (
+ name: string,
+ schema: string,
+ materialized: boolean,
+ to: string,
+): JsonAlterViewAlterUsingStatement => {
+ return {
+ type: 'alter_view_alter_using',
+ name,
+ schema,
+ materialized: materialized,
+ toUsing: to,
+ } as JsonAlterViewAlterUsingStatement;
+};
+
+export const prepareMySqlAlterView = (
+ view: Omit,
+): JsonAlterMySqlViewStatement => {
+ return { type: 'alter_mysql_view', ...view };
+};
+
+/* export const prepareSingleStoreAlterView = (
+ view: Omit,
+): JsonAlterSingleStoreViewStatement => {
+ return { type: 'alter_singlestore_view', ...view };
+}; */
diff --git a/drizzle-kit/src/migrationPreparator.ts b/drizzle-kit/src/migrationPreparator.ts
index 687cfdb7c..4e67e8174 100644
--- a/drizzle-kit/src/migrationPreparator.ts
+++ b/drizzle-kit/src/migrationPreparator.ts
@@ -1,15 +1,18 @@
import { randomUUID } from 'crypto';
import fs from 'fs';
-import { serializeMySql, serializePg, serializeSQLite } from './serializer';
+import { CasingType } from './cli/validations/common';
+import { serializeMySql, serializePg, serializeSingleStore, serializeSQLite } from './serializer';
import { dryMySql, MySqlSchema, mysqlSchema } from './serializer/mysqlSchema';
import { dryPg, PgSchema, pgSchema, PgSchemaInternal } from './serializer/pgSchema';
+import { drySingleStore, SingleStoreSchema, singlestoreSchema } from './serializer/singlestoreSchema';
import { drySQLite, SQLiteSchema, sqliteSchema } from './serializer/sqliteSchema';
export const prepareMySqlDbPushSnapshot = async (
prev: MySqlSchema,
schemaPath: string | string[],
+ casing: CasingType | undefined,
): Promise<{ prev: MySqlSchema; cur: MySqlSchema }> => {
- const serialized = await serializeMySql(schemaPath);
+ const serialized = await serializeMySql(schemaPath, casing);
const id = randomUUID();
const idPrev = prev.id;
@@ -20,11 +23,28 @@ export const prepareMySqlDbPushSnapshot = async (
return { prev, cur: result };
};
+export const prepareSingleStoreDbPushSnapshot = async (
+ prev: SingleStoreSchema,
+ schemaPath: string | string[],
+ casing: CasingType | undefined,
+): Promise<{ prev: SingleStoreSchema; cur: SingleStoreSchema }> => {
+ const serialized = await serializeSingleStore(schemaPath, casing);
+
+ const id = randomUUID();
+ const idPrev = prev.id;
+
+ const { version, dialect, ...rest } = serialized;
+ const result: SingleStoreSchema = { version, dialect, id, prevId: idPrev, ...rest };
+
+ return { prev, cur: result };
+};
+
export const prepareSQLiteDbPushSnapshot = async (
prev: SQLiteSchema,
schemaPath: string | string[],
+ casing: CasingType | undefined,
): Promise<{ prev: SQLiteSchema; cur: SQLiteSchema }> => {
- const serialized = await serializeSQLite(schemaPath);
+ const serialized = await serializeSQLite(schemaPath, casing);
const id = randomUUID();
const idPrev = prev.id;
@@ -44,9 +64,10 @@ export const prepareSQLiteDbPushSnapshot = async (
export const preparePgDbPushSnapshot = async (
prev: PgSchema,
schemaPath: string | string[],
+ casing: CasingType | undefined,
schemaFilter: string[] = ['public'],
): Promise<{ prev: PgSchema; cur: PgSchema }> => {
- const serialized = await serializePg(schemaPath, schemaFilter);
+ const serialized = await serializePg(schemaPath, casing, schemaFilter);
const id = randomUUID();
const idPrev = prev.id;
@@ -60,11 +81,12 @@ export const preparePgDbPushSnapshot = async (
export const prepareMySqlMigrationSnapshot = async (
migrationFolders: string[],
schemaPath: string | string[],
+ casing: CasingType | undefined,
): Promise<{ prev: MySqlSchema; cur: MySqlSchema; custom: MySqlSchema }> => {
const prevSnapshot = mysqlSchema.parse(
preparePrevSnapshot(migrationFolders, dryMySql),
);
- const serialized = await serializeMySql(schemaPath);
+ const serialized = await serializeMySql(schemaPath, casing);
const id = randomUUID();
const idPrev = prevSnapshot.id;
@@ -84,14 +106,43 @@ export const prepareMySqlMigrationSnapshot = async (
return { prev: prevSnapshot, cur: result, custom };
};
+export const prepareSingleStoreMigrationSnapshot = async (
+ migrationFolders: string[],
+ schemaPath: string | string[],
+ casing: CasingType | undefined,
+): Promise<{ prev: SingleStoreSchema; cur: SingleStoreSchema; custom: SingleStoreSchema }> => {
+ const prevSnapshot = singlestoreSchema.parse(
+ preparePrevSnapshot(migrationFolders, drySingleStore),
+ );
+ const serialized = await serializeSingleStore(schemaPath, casing);
+
+ const id = randomUUID();
+ const idPrev = prevSnapshot.id;
+
+ const { version, dialect, ...rest } = serialized;
+ const result: SingleStoreSchema = { version, dialect, id, prevId: idPrev, ...rest };
+
+ const { id: _ignoredId, prevId: _ignoredPrevId, ...prevRest } = prevSnapshot;
+
+ // that's for custom migrations, when we need new IDs, but old snapshot
+ const custom: SingleStoreSchema = {
+ id,
+ prevId: idPrev,
+ ...prevRest,
+ };
+
+ return { prev: prevSnapshot, cur: result, custom };
+};
+
export const prepareSqliteMigrationSnapshot = async (
snapshots: string[],
schemaPath: string | string[],
+ casing: CasingType | undefined,
): Promise<{ prev: SQLiteSchema; cur: SQLiteSchema; custom: SQLiteSchema }> => {
const prevSnapshot = sqliteSchema.parse(
preparePrevSnapshot(snapshots, drySQLite),
);
- const serialized = await serializeSQLite(schemaPath);
+ const serialized = await serializeSQLite(schemaPath, casing);
const id = randomUUID();
const idPrev = prevSnapshot.id;
@@ -133,9 +184,10 @@ export const fillPgSnapshot = ({
export const preparePgMigrationSnapshot = async (
snapshots: string[],
schemaPath: string | string[],
+ casing: CasingType | undefined,
): Promise<{ prev: PgSchema; cur: PgSchema; custom: PgSchema }> => {
const prevSnapshot = pgSchema.parse(preparePrevSnapshot(snapshots, dryPg));
- const serialized = await serializePg(schemaPath);
+ const serialized = await serializePg(schemaPath, casing);
const id = randomUUID();
const idPrev = prevSnapshot.id;
diff --git a/drizzle-kit/src/schemaValidator.ts b/drizzle-kit/src/schemaValidator.ts
index 9c1f4dcfc..e91b5ab11 100644
--- a/drizzle-kit/src/schemaValidator.ts
+++ b/drizzle-kit/src/schemaValidator.ts
@@ -1,9 +1,10 @@
import { enum as enumType, TypeOf, union } from 'zod';
import { mysqlSchema, mysqlSchemaSquashed } from './serializer/mysqlSchema';
import { pgSchema, pgSchemaSquashed } from './serializer/pgSchema';
+import { singlestoreSchema, singlestoreSchemaSquashed } from './serializer/singlestoreSchema';
import { sqliteSchema, SQLiteSchemaSquashed } from './serializer/sqliteSchema';
-export const dialects = ['postgresql', 'mysql', 'sqlite'] as const;
+export const dialects = ['postgresql', 'mysql', 'sqlite', 'turso', 'singlestore'] as const;
export const dialect = enumType(dialects);
export type Dialect = (typeof dialects)[number];
@@ -13,9 +14,10 @@ const commonSquashedSchema = union([
pgSchemaSquashed,
mysqlSchemaSquashed,
SQLiteSchemaSquashed,
+ singlestoreSchemaSquashed,
]);
-const commonSchema = union([pgSchema, mysqlSchema, sqliteSchema]);
+const commonSchema = union([pgSchema, mysqlSchema, sqliteSchema, singlestoreSchema]);
export type CommonSquashedSchema = TypeOf;
export type CommonSchema = TypeOf;
diff --git a/drizzle-kit/src/serializer/index.ts b/drizzle-kit/src/serializer/index.ts
index 214ca38c7..d24afbab0 100644
--- a/drizzle-kit/src/serializer/index.ts
+++ b/drizzle-kit/src/serializer/index.ts
@@ -1,43 +1,17 @@
import chalk from 'chalk';
-import type { SQL } from 'drizzle-orm';
import fs from 'fs';
import * as glob from 'glob';
import Path from 'path';
+import { CasingType } from 'src/cli/validations/common';
import { error } from '../cli/views';
import type { MySqlSchemaInternal } from './mysqlSchema';
import type { PgSchemaInternal } from './pgSchema';
+import { SingleStoreSchemaInternal } from './singlestoreSchema';
import type { SQLiteSchemaInternal } from './sqliteSchema';
-export const sqlToStr = (sql: SQL) => {
- return sql.toQuery({
- escapeName: () => {
- throw new Error("we don't support params for `sql` default values");
- },
- escapeParam: () => {
- throw new Error("we don't support params for `sql` default values");
- },
- escapeString: () => {
- throw new Error("we don't support params for `sql` default values");
- },
- }).sql;
-};
-
-export const sqlToStrGenerated = (sql: SQL) => {
- return sql.toQuery({
- escapeName: () => {
- throw new Error("we don't support params for `sql` default values");
- },
- escapeParam: () => {
- throw new Error("we don't support params for `sql` default values");
- },
- escapeString: () => {
- throw new Error("we don't support params for `sql` default values");
- },
- }).sql;
-};
-
export const serializeMySql = async (
path: string | string[],
+ casing: CasingType | undefined,
): Promise => {
const filenames = prepareFilenames(path);
@@ -46,13 +20,14 @@ export const serializeMySql = async (
const { prepareFromMySqlImports } = await import('./mysqlImports');
const { generateMySqlSnapshot } = await import('./mysqlSerializer');
- const { tables } = await prepareFromMySqlImports(filenames);
+ const { tables, views } = await prepareFromMySqlImports(filenames);
- return generateMySqlSnapshot(tables);
+ return generateMySqlSnapshot(tables, views, casing);
};
export const serializePg = async (
path: string | string[],
+ casing: CasingType | undefined,
schemaFilter?: string[],
): Promise => {
const filenames = prepareFilenames(path);
@@ -60,22 +35,39 @@ export const serializePg = async (
const { prepareFromPgImports } = await import('./pgImports');
const { generatePgSnapshot } = await import('./pgSerializer');
- const { tables, enums, schemas, sequences } = await prepareFromPgImports(
+ const { tables, enums, schemas, sequences, views, matViews, roles, policies } = await prepareFromPgImports(
filenames,
);
- return generatePgSnapshot(tables, enums, schemas, sequences, schemaFilter);
+ return generatePgSnapshot(tables, enums, schemas, sequences, roles, policies, views, matViews, casing, schemaFilter);
};
export const serializeSQLite = async (
path: string | string[],
+ casing: CasingType | undefined,
): Promise => {
const filenames = prepareFilenames(path);
const { prepareFromSqliteImports } = await import('./sqliteImports');
const { generateSqliteSnapshot } = await import('./sqliteSerializer');
- const { tables } = await prepareFromSqliteImports(filenames);
- return generateSqliteSnapshot(tables);
+ const { tables, views } = await prepareFromSqliteImports(filenames);
+ return generateSqliteSnapshot(tables, views, casing);
+};
+
+export const serializeSingleStore = async (
+ path: string | string[],
+ casing: CasingType | undefined,
+): Promise => {
+ const filenames = prepareFilenames(path);
+
+ console.log(chalk.gray(`Reading schema files:\n${filenames.join('\n')}\n`));
+
+ const { prepareFromSingleStoreImports } = await import('./singlestoreImports');
+ const { generateSingleStoreSnapshot } = await import('./singlestoreSerializer');
+
+ const { tables /* views */ } = await prepareFromSingleStoreImports(filenames);
+
+ return generateSingleStoreSnapshot(tables, /* views, */ casing);
};
export const prepareFilenames = (path: string | string[]) => {
diff --git a/drizzle-kit/src/serializer/mysqlImports.ts b/drizzle-kit/src/serializer/mysqlImports.ts
index d9899026b..a8e8ead39 100644
--- a/drizzle-kit/src/serializer/mysqlImports.ts
+++ b/drizzle-kit/src/serializer/mysqlImports.ts
@@ -1,22 +1,28 @@
import { is } from 'drizzle-orm';
-import { AnyMySqlTable, MySqlTable } from 'drizzle-orm/mysql-core';
+import { AnyMySqlTable, MySqlTable, MySqlView } from 'drizzle-orm/mysql-core';
import { safeRegister } from '../cli/commands/utils';
export const prepareFromExports = (exports: Record) => {
const tables: AnyMySqlTable[] = [];
+ const views: MySqlView[] = [];
const i0values = Object.values(exports);
i0values.forEach((t) => {
if (is(t, MySqlTable)) {
tables.push(t);
}
+
+ if (is(t, MySqlView)) {
+ views.push(t);
+ }
});
- return { tables };
+ return { tables, views };
};
export const prepareFromMySqlImports = async (imports: string[]) => {
const tables: AnyMySqlTable[] = [];
+ const views: MySqlView[] = [];
const { unregister } = await safeRegister();
for (let i = 0; i < imports.length; i++) {
@@ -25,7 +31,8 @@ export const prepareFromMySqlImports = async (imports: string[]) => {
const prepared = prepareFromExports(i0);
tables.push(...prepared.tables);
+ views.push(...prepared.views);
}
unregister();
- return { tables: Array.from(new Set(tables)) };
+ return { tables: Array.from(new Set(tables)), views };
};
diff --git a/drizzle-kit/src/serializer/mysqlSchema.ts b/drizzle-kit/src/serializer/mysqlSchema.ts
index 5bc62ab2f..3a6fb9179 100644
--- a/drizzle-kit/src/serializer/mysqlSchema.ts
+++ b/drizzle-kit/src/serializer/mysqlSchema.ts
@@ -1,5 +1,5 @@
import { any, boolean, enum as enumType, literal, object, record, string, TypeOf, union } from 'zod';
-import { mapValues, originUUID, snapshotVersion } from '../global';
+import { mapValues, originUUID } from '../global';
// ------- V3 --------
const index = object({
@@ -52,6 +52,11 @@ const uniqueConstraint = object({
columns: string().array(),
}).strict();
+const checkConstraint = object({
+ name: string(),
+ value: string(),
+}).strict();
+
const tableV4 = object({
name: string(),
schema: string().optional(),
@@ -67,8 +72,23 @@ const table = object({
foreignKeys: record(string(), fk),
compositePrimaryKeys: record(string(), compositePK),
uniqueConstraints: record(string(), uniqueConstraint).default({}),
+ checkConstraint: record(string(), checkConstraint).default({}),
}).strict();
+const viewMeta = object({
+ algorithm: enumType(['undefined', 'merge', 'temptable']),
+ sqlSecurity: enumType(['definer', 'invoker']),
+ withCheckOption: enumType(['local', 'cascaded']).optional(),
+}).strict();
+
+export const view = object({
+ name: string(),
+ columns: record(string(), column),
+ definition: string().optional(),
+ isExisting: boolean(),
+}).strict().merge(viewMeta);
+type SquasherViewMeta = Omit, 'definer'>;
+
export const kitInternals = object({
tables: record(
string(),
@@ -128,6 +148,7 @@ export const schemaInternal = object({
version: literal('5'),
dialect: dialect,
tables: record(string(), table),
+ views: record(string(), view).default({}),
_meta: object({
tables: record(string(), string()),
columns: record(string(), string()),
@@ -155,12 +176,20 @@ const tableSquashed = object({
foreignKeys: record(string(), string()),
compositePrimaryKeys: record(string(), string()),
uniqueConstraints: record(string(), string()).default({}),
+ checkConstraints: record(string(), string()).default({}),
}).strict();
+const viewSquashed = view.omit({
+ algorithm: true,
+ sqlSecurity: true,
+ withCheckOption: true,
+}).extend({ meta: string() });
+
export const schemaSquashed = object({
version: literal('5'),
dialect: dialect,
tables: record(string(), tableSquashed),
+ views: record(string(), viewSquashed),
}).strict();
export const schemaSquashedV4 = object({
@@ -186,6 +215,9 @@ export type Index = TypeOf;
export type ForeignKey = TypeOf;
export type PrimaryKey = TypeOf;
export type UniqueConstraint = TypeOf;
+export type CheckConstraint = TypeOf;
+export type View = TypeOf;
+export type ViewSquashed = TypeOf;
export const MySqlSquasher = {
squashIdx: (idx: Index) => {
@@ -247,6 +279,27 @@ export const MySqlSquasher = {
});
return result;
},
+ squashCheck: (input: CheckConstraint): string => {
+ return `${input.name};${input.value}`;
+ },
+ unsquashCheck: (input: string): CheckConstraint => {
+ const [name, value] = input.split(';');
+
+ return { name, value };
+ },
+ squashView: (view: View): string => {
+ return `${view.algorithm};${view.sqlSecurity};${view.withCheckOption}`;
+ },
+ unsquashView: (meta: string): SquasherViewMeta => {
+ const [algorithm, sqlSecurity, withCheckOption] = meta.split(';');
+ const toReturn = {
+ algorithm: algorithm,
+ sqlSecurity: sqlSecurity,
+ withCheckOption: withCheckOption !== 'undefined' ? withCheckOption : undefined,
+ };
+
+ return viewMeta.parse(toReturn);
+ },
};
export const squashMysqlSchemeV4 = (
@@ -304,6 +357,10 @@ export const squashMysqlScheme = (json: MySqlSchema): MySqlSchemaSquashed => {
},
);
+ const squashedCheckConstraints = mapValues(it[1].checkConstraint, (check) => {
+ return MySqlSquasher.squashCheck(check);
+ });
+
return [
it[0],
{
@@ -313,14 +370,31 @@ export const squashMysqlScheme = (json: MySqlSchema): MySqlSchemaSquashed => {
foreignKeys: squashedFKs,
compositePrimaryKeys: squashedPKs,
uniqueConstraints: squashedUniqueConstraints,
+ checkConstraints: squashedCheckConstraints,
},
];
}),
);
+
+ const mappedViews = Object.fromEntries(
+ Object.entries(json.views).map(([key, value]) => {
+ const meta = MySqlSquasher.squashView(value);
+
+ return [key, {
+ name: value.name,
+ isExisting: value.isExisting,
+ columns: value.columns,
+ definition: value.definition,
+ meta,
+ }];
+ }),
+ );
+
return {
version: '5',
dialect: json.dialect,
tables: mappedTables,
+ views: mappedViews,
};
};
@@ -340,6 +414,7 @@ export const dryMySql = mysqlSchema.parse({
prevId: '',
tables: {},
schemas: {},
+ views: {},
_meta: {
schemas: {},
tables: {},
diff --git a/drizzle-kit/src/serializer/mysqlSerializer.ts b/drizzle-kit/src/serializer/mysqlSerializer.ts
index eb18743fb..aaa1acb82 100644
--- a/drizzle-kit/src/serializer/mysqlSerializer.ts
+++ b/drizzle-kit/src/serializer/mysqlSerializer.ts
@@ -1,12 +1,21 @@
import chalk from 'chalk';
-import { getTableName, is } from 'drizzle-orm';
-import { SQL } from 'drizzle-orm';
-import { AnyMySqlTable, MySqlDialect, type PrimaryKey as PrimaryKeyORM, uniqueKeyName } from 'drizzle-orm/mysql-core';
-import { getTableConfig } from 'drizzle-orm/mysql-core';
+import { getTableName, is, SQL } from 'drizzle-orm';
+import {
+ AnyMySqlTable,
+ getTableConfig,
+ getViewConfig,
+ MySqlColumn,
+ MySqlDialect,
+ MySqlView,
+ type PrimaryKey as PrimaryKeyORM,
+ uniqueKeyName,
+} from 'drizzle-orm/mysql-core';
import { RowDataPacket } from 'mysql2/promise';
+import { CasingType } from 'src/cli/validations/common';
import { withStyle } from '../cli/validations/outputs';
import { IntrospectStage, IntrospectStatus } from '../cli/views';
import {
+ CheckConstraint,
Column,
ForeignKey,
Index,
@@ -15,23 +24,32 @@ import {
PrimaryKey,
Table,
UniqueConstraint,
+ View,
} from '../serializer/mysqlSchema';
-import type { DB } from '../utils';
-import { sqlToStr } from '.';
-// import { MySqlColumnWithAutoIncrement } from "drizzle-orm/mysql-core";
-// import { MySqlDateBaseColumn } from "drizzle-orm/mysql-core";
-
-const dialect = new MySqlDialect();
+import { type DB, escapeSingleQuotes } from '../utils';
+import { getColumnCasing, sqlToStr } from './utils';
export const indexName = (tableName: string, columns: string[]) => {
return `${tableName}_${columns.join('_')}_index`;
};
+const handleEnumType = (type: string) => {
+ let str = type.split('(')[1];
+ str = str.substring(0, str.length - 1);
+ const values = str.split(',').map((v) => `'${escapeSingleQuotes(v.substring(1, v.length - 1))}'`);
+ return `enum(${values.join(',')})`;
+};
+
export const generateMySqlSnapshot = (
tables: AnyMySqlTable[],
+ views: MySqlView[],
+ casing: CasingType | undefined,
): MySqlSchemaInternal => {
+ const dialect = new MySqlDialect({ casing });
const result: Record = {};
+ const resultViews: Record = {};
const internal: MySqlKitInternals = { tables: {}, indexes: {} };
+
for (const table of tables) {
const {
name: tableName,
@@ -39,18 +57,26 @@ export const generateMySqlSnapshot = (
indexes,
foreignKeys,
schema,
+ checks,
primaryKeys,
uniqueConstraints,
} = getTableConfig(table);
+
const columnsObject: Record = {};
const indexesObject: Record = {};
const foreignKeysObject: Record = {};
const primaryKeysObject: Record = {};
const uniqueConstraintObject: Record = {};
+ const checkConstraintObject: Record = {};
+
+ // this object will help to identify same check names
+ let checksInTable: Record = {};
columns.forEach((column) => {
+ const name = getColumnCasing(column, casing);
const notNull: boolean = column.notNull;
- const sqlTypeLowered = column.getSQLType().toLowerCase();
+ const sqlType = column.getSQLType();
+ const sqlTypeLowered = sqlType.toLowerCase();
const autoIncrement = typeof (column as any).autoIncrement === 'undefined'
? false
: (column as any).autoIncrement;
@@ -58,8 +84,8 @@ export const generateMySqlSnapshot = (
const generated = column.generated;
const columnToSet: Column = {
- name: column.name,
- type: column.getSQLType(),
+ name,
+ type: sqlType.startsWith('enum') ? handleEnumType(sqlType) : sqlType,
primaryKey: false,
// If field is autoincrement it's notNull by default
// notNull: autoIncrement ? true : notNull,
@@ -79,9 +105,9 @@ export const generateMySqlSnapshot = (
};
if (column.primary) {
- primaryKeysObject[`${tableName}_${column.name}`] = {
- name: `${tableName}_${column.name}`,
- columns: [column.name],
+ primaryKeysObject[`${tableName}_${name}`] = {
+ name: `${tableName}_${name}`,
+ columns: [name],
};
}
@@ -101,7 +127,7 @@ export const generateMySqlSnapshot = (
)
} on the ${
chalk.underline.blue(
- column.name,
+ name,
)
} column is confilcting with a unique constraint name already defined for ${
chalk.underline.blue(
@@ -120,10 +146,10 @@ export const generateMySqlSnapshot = (
if (column.default !== undefined) {
if (is(column.default, SQL)) {
- columnToSet.default = sqlToStr(column.default);
+ columnToSet.default = sqlToStr(column.default, casing);
} else {
if (typeof column.default === 'string') {
- columnToSet.default = `'${column.default}'`;
+ columnToSet.default = `'${escapeSingleQuotes(column.default)}'`;
} else {
if (sqlTypeLowered === 'json') {
columnToSet.default = `'${JSON.stringify(column.default)}'`;
@@ -150,24 +176,33 @@ export const generateMySqlSnapshot = (
}
}
}
- columnsObject[column.name] = columnToSet;
+ columnsObject[name] = columnToSet;
});
primaryKeys.map((pk: PrimaryKeyORM) => {
- const columnNames = pk.columns.map((c: any) => c.name);
- primaryKeysObject[pk.getName()] = {
- name: pk.getName(),
+ const originalColumnNames = pk.columns.map((c) => c.name);
+ const columnNames = pk.columns.map((c: any) => getColumnCasing(c, casing));
+
+ let name = pk.getName();
+ if (casing !== undefined) {
+ for (let i = 0; i < originalColumnNames.length; i++) {
+ name = name.replace(originalColumnNames[i], columnNames[i]);
+ }
+ }
+
+ primaryKeysObject[name] = {
+ name,
columns: columnNames,
};
// all composite pk's should be treated as notNull
for (const column of pk.columns) {
- columnsObject[column.name].notNull = true;
+ columnsObject[getColumnCasing(column, casing)].notNull = true;
}
});
uniqueConstraints?.map((unq) => {
- const columnNames = unq.columns.map((c) => c.name);
+ const columnNames = unq.columns.map((c) => getColumnCasing(c, casing));
const name = unq.name ?? uniqueKeyName(table, columnNames);
@@ -206,7 +241,6 @@ export const generateMySqlSnapshot = (
});
const fks: ForeignKey[] = foreignKeys.map((fk) => {
- const name = fk.getName();
const tableFrom = tableName;
const onDelete = fk.onDelete ?? 'no action';
const onUpdate = fk.onUpdate ?? 'no action';
@@ -216,8 +250,22 @@ export const generateMySqlSnapshot = (
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
const tableTo = getTableName(referenceFT);
- const columnsFrom = reference.columns.map((it) => it.name);
- const columnsTo = reference.foreignColumns.map((it) => it.name);
+
+ const originalColumnsFrom = reference.columns.map((it) => it.name);
+ const columnsFrom = reference.columns.map((it) => getColumnCasing(it, casing));
+ const originalColumnsTo = reference.foreignColumns.map((it) => it.name);
+ const columnsTo = reference.foreignColumns.map((it) => getColumnCasing(it, casing));
+
+ let name = fk.getName();
+ if (casing !== undefined) {
+ for (let i = 0; i < originalColumnsFrom.length; i++) {
+ name = name.replace(originalColumnsFrom[i], columnsFrom[i]);
+ }
+ for (let i = 0; i < originalColumnsTo.length; i++) {
+ name = name.replace(originalColumnsTo[i], columnsTo[i]);
+ }
+ }
+
return {
name,
tableFrom,
@@ -259,7 +307,7 @@ export const generateMySqlSnapshot = (
}
return sql;
} else {
- return `${it.name}`;
+ return `${getColumnCasing(it, casing)}`;
}
});
@@ -322,6 +370,39 @@ export const generateMySqlSnapshot = (
};
});
+ checks.forEach((check) => {
+ check;
+ const checkName = check.name;
+ if (typeof checksInTable[tableName] !== 'undefined') {
+ if (checksInTable[tableName].includes(check.name)) {
+ console.log(
+ `\n${
+ withStyle.errorWarning(
+ `We\'ve found duplicated check constraint name in ${
+ chalk.underline.blue(
+ tableName,
+ )
+ }. Please rename your check constraint in the ${
+ chalk.underline.blue(
+ tableName,
+ )
+ } table`,
+ )
+ }`,
+ );
+ process.exit(1);
+ }
+ checksInTable[tableName].push(checkName);
+ } else {
+ checksInTable[tableName] = [check.name];
+ }
+
+ checkConstraintObject[checkName] = {
+ name: checkName,
+ value: dialect.sqlToQuery(check.value).sql,
+ };
+ });
+
// only handle tables without schemas
if (!schema) {
result[tableName] = {
@@ -331,14 +412,126 @@ export const generateMySqlSnapshot = (
foreignKeys: foreignKeysObject,
compositePrimaryKeys: primaryKeysObject,
uniqueConstraints: uniqueConstraintObject,
+ checkConstraint: checkConstraintObject,
};
}
}
+ for (const view of views) {
+ const {
+ isExisting,
+ name,
+ query,
+ schema,
+ selectedFields,
+ algorithm,
+ sqlSecurity,
+ withCheckOption,
+ } = getViewConfig(view);
+
+ const columnsObject: Record = {};
+
+ const existingView = resultViews[name];
+ if (typeof existingView !== 'undefined') {
+ console.log(
+ `\n${
+ withStyle.errorWarning(
+ `We\'ve found duplicated view name across ${
+ chalk.underline.blue(
+ schema ?? 'public',
+ )
+ } schema. Please rename your view`,
+ )
+ }`,
+ );
+ process.exit(1);
+ }
+
+ for (const key in selectedFields) {
+ if (is(selectedFields[key], MySqlColumn)) {
+ const column = selectedFields[key];
+
+ const notNull: boolean = column.notNull;
+ const sqlTypeLowered = column.getSQLType().toLowerCase();
+ const autoIncrement = typeof (column as any).autoIncrement === 'undefined'
+ ? false
+ : (column as any).autoIncrement;
+
+ const generated = column.generated;
+
+ const columnToSet: Column = {
+ name: column.name,
+ type: column.getSQLType(),
+ primaryKey: false,
+ // If field is autoincrement it's notNull by default
+ // notNull: autoIncrement ? true : notNull,
+ notNull,
+ autoincrement: autoIncrement,
+ onUpdate: (column as any).hasOnUpdateNow,
+ generated: generated
+ ? {
+ as: is(generated.as, SQL)
+ ? dialect.sqlToQuery(generated.as as SQL).sql
+ : typeof generated.as === 'function'
+ ? dialect.sqlToQuery(generated.as() as SQL).sql
+ : (generated.as as any),
+ type: generated.mode ?? 'stored',
+ }
+ : undefined,
+ };
+
+ if (column.default !== undefined) {
+ if (is(column.default, SQL)) {
+ columnToSet.default = sqlToStr(column.default, casing);
+ } else {
+ if (typeof column.default === 'string') {
+ columnToSet.default = `'${column.default}'`;
+ } else {
+ if (sqlTypeLowered === 'json') {
+ columnToSet.default = `'${JSON.stringify(column.default)}'`;
+ } else if (column.default instanceof Date) {
+ if (sqlTypeLowered === 'date') {
+ columnToSet.default = `'${column.default.toISOString().split('T')[0]}'`;
+ } else if (
+ sqlTypeLowered.startsWith('datetime')
+ || sqlTypeLowered.startsWith('timestamp')
+ ) {
+ columnToSet.default = `'${
+ column.default
+ .toISOString()
+ .replace('T', ' ')
+ .slice(0, 23)
+ }'`;
+ }
+ } else {
+ columnToSet.default = column.default;
+ }
+ }
+ if (['blob', 'text', 'json'].includes(column.getSQLType())) {
+ columnToSet.default = `(${columnToSet.default})`;
+ }
+ }
+ }
+ columnsObject[column.name] = columnToSet;
+ }
+ }
+
+ resultViews[name] = {
+ columns: columnsObject,
+ name,
+ isExisting,
+ definition: isExisting ? undefined : dialect.sqlToQuery(query!).sql,
+ withCheckOption,
+ algorithm: algorithm ?? 'undefined', // set default values
+ sqlSecurity: sqlSecurity ?? 'definer', // set default values
+ };
+ }
+
return {
version: '5',
dialect: 'mysql',
tables: result,
+ views: resultViews,
_meta: {
tables: {},
columns: {},
@@ -359,9 +552,9 @@ function clearDefaults(defaultValue: any, collate: string) {
.substring(collate.length, defaultValue.length)
.replace(/\\/g, '');
if (resultDefault.startsWith("'") && resultDefault.endsWith("'")) {
- return `('${resultDefault.substring(1, resultDefault.length - 1)}')`;
+ return `('${escapeSingleQuotes(resultDefault.substring(1, resultDefault.length - 1))}')`;
} else {
- return `'${resultDefault}'`;
+ return `'${escapeSingleQuotes(resultDefault.substring(1, resultDefault.length - 1))}'`;
}
} else {
return `(${resultDefault})`;
@@ -393,6 +586,8 @@ export const fromDatabase = async (
let tablesCount = new Set();
let indexesCount = 0;
let foreignKeysCount = 0;
+ let checksCount = 0;
+ let viewsCount = 0;
const idxs = await db.query(
`select * from INFORMATION_SCHEMA.STATISTICS
@@ -464,8 +659,8 @@ export const fromDatabase = async (
}
}
- if (columnType.startsWith('tinyint')) {
- changedType = 'tinyint';
+ if (columnType.includes('decimal(10,0)')) {
+ changedType = columnType.replace('decimal(10,0)', 'decimal');
}
let onUpdate: boolean | undefined = undefined;
@@ -478,14 +673,14 @@ export const fromDatabase = async (
}
const newColumn: Column = {
- default: columnDefault === null
+ default: columnDefault === null || columnDefault === undefined
? undefined
: /^-?[\d.]+(?:e-?\d+)?$/.test(columnDefault)
- && !columnType.startsWith('decimal')
+ && !['decimal', 'char', 'varchar'].some((type) => columnType.startsWith(type))
? Number(columnDefault)
: isDefaultAnExpression
? clearDefaults(columnDefault, collation)
- : `'${columnDefault}'`,
+ : `'${escapeSingleQuotes(columnDefault)}'`,
autoincrement: isAutoincrement,
name: columnName,
type: changedType,
@@ -536,6 +731,7 @@ export const fromDatabase = async (
indexes: {},
foreignKeys: {},
uniqueConstraints: {},
+ checkConstraint: {},
};
} else {
result[tableName]!.columns[columnName] = newColumn;
@@ -709,16 +905,91 @@ export const fromDatabase = async (
}
}
+ const views = await db.query(
+ `select * from INFORMATION_SCHEMA.VIEWS WHERE table_schema = '${inputSchema}';`,
+ );
+
+ const resultViews: Record = {};
+
+ viewsCount = views.length;
+ if (progressCallback) {
+ progressCallback('views', viewsCount, 'fetching');
+ }
+ for await (const view of views) {
+ const viewName = view['TABLE_NAME'];
+ const definition = view['VIEW_DEFINITION'];
+
+ const withCheckOption = view['CHECK_OPTION'] === 'NONE' ? undefined : view['CHECK_OPTION'].toLowerCase();
+ const sqlSecurity = view['SECURITY_TYPE'].toLowerCase();
+
+ const [createSqlStatement] = await db.query(`SHOW CREATE VIEW \`${viewName}\`;`);
+ const algorithmMatch = createSqlStatement['Create View'].match(/ALGORITHM=([^ ]+)/);
+ const algorithm = algorithmMatch ? algorithmMatch[1].toLowerCase() : undefined;
+
+ const columns = result[viewName].columns;
+ delete result[viewName];
+
+ resultViews[viewName] = {
+ columns: columns,
+ isExisting: false,
+ name: viewName,
+ algorithm,
+ definition,
+ sqlSecurity,
+ withCheckOption,
+ };
+ }
+
if (progressCallback) {
progressCallback('indexes', indexesCount, 'done');
// progressCallback("enums", 0, "fetching");
progressCallback('enums', 0, 'done');
+ progressCallback('views', viewsCount, 'done');
+ }
+
+ const checkConstraints = await db.query(
+ `SELECT
+ tc.table_name,
+ tc.constraint_name,
+ cc.check_clause
+FROM
+ information_schema.table_constraints tc
+JOIN
+ information_schema.check_constraints cc
+ ON tc.constraint_name = cc.constraint_name
+WHERE
+ tc.constraint_schema = '${inputSchema}'
+AND
+ tc.constraint_type = 'CHECK';`,
+ );
+
+ checksCount += checkConstraints.length;
+ if (progressCallback) {
+ progressCallback('checks', checksCount, 'fetching');
+ }
+ for (const checkConstraintRow of checkConstraints) {
+ const constraintName = checkConstraintRow['CONSTRAINT_NAME'];
+ const constraintValue = checkConstraintRow['CHECK_CLAUSE'];
+ const tableName = checkConstraintRow['TABLE_NAME'];
+
+ const tableInResult = result[tableName];
+ // if (typeof tableInResult === 'undefined') continue;
+
+ tableInResult.checkConstraint[constraintName] = {
+ name: constraintName,
+ value: constraintValue,
+ };
+ }
+
+ if (progressCallback) {
+ progressCallback('checks', checksCount, 'done');
}
return {
version: '5',
dialect: 'mysql',
tables: result,
+ views: resultViews,
_meta: {
tables: {},
columns: {},
diff --git a/drizzle-kit/src/serializer/pgImports.ts b/drizzle-kit/src/serializer/pgImports.ts
index ffedd084c..40e54616a 100644
--- a/drizzle-kit/src/serializer/pgImports.ts
+++ b/drizzle-kit/src/serializer/pgImports.ts
@@ -1,5 +1,19 @@
import { is } from 'drizzle-orm';
-import { AnyPgTable, isPgEnum, isPgSequence, PgEnum, PgSchema, PgSequence, PgTable } from 'drizzle-orm/pg-core';
+import {
+ AnyPgTable,
+ isPgEnum,
+ isPgMaterializedView,
+ isPgSequence,
+ isPgView,
+ PgEnum,
+ PgMaterializedView,
+ PgPolicy,
+ PgRole,
+ PgSchema,
+ PgSequence,
+ PgTable,
+ PgView,
+} from 'drizzle-orm/pg-core';
import { safeRegister } from '../cli/commands/utils';
export const prepareFromExports = (exports: Record) => {
@@ -7,6 +21,10 @@ export const prepareFromExports = (exports: Record) => {
const enums: PgEnum[] = [];
const schemas: PgSchema[] = [];
const sequences: PgSequence[] = [];
+ const roles: PgRole[] = [];
+ const policies: PgPolicy[] = [];
+ const views: PgView[] = [];
+ const matViews: PgMaterializedView[] = [];
const i0values = Object.values(exports);
i0values.forEach((t) => {
@@ -22,19 +40,39 @@ export const prepareFromExports = (exports: Record) => {
schemas.push(t);
}
+ if (isPgView(t)) {
+ views.push(t);
+ }
+
+ if (isPgMaterializedView(t)) {
+ matViews.push(t);
+ }
+
if (isPgSequence(t)) {
sequences.push(t);
}
+
+ if (is(t, PgRole)) {
+ roles.push(t);
+ }
+
+ if (is(t, PgPolicy)) {
+ policies.push(t);
+ }
});
- return { tables, enums, schemas, sequences };
+ return { tables, enums, schemas, sequences, views, matViews, roles, policies };
};
export const prepareFromPgImports = async (imports: string[]) => {
- let tables: AnyPgTable[] = [];
- let enums: PgEnum[] = [];
- let schemas: PgSchema[] = [];
- let sequences: PgSequence[] = [];
+ const tables: AnyPgTable[] = [];
+ const enums: PgEnum[] = [];
+ const schemas: PgSchema[] = [];
+ const sequences: PgSequence[] = [];
+ const views: PgView[] = [];
+ const roles: PgRole[] = [];
+ const policies: PgPolicy[] = [];
+ const matViews: PgMaterializedView[] = [];
const { unregister } = await safeRegister();
for (let i = 0; i < imports.length; i++) {
@@ -47,8 +85,12 @@ export const prepareFromPgImports = async (imports: string[]) => {
enums.push(...prepared.enums);
schemas.push(...prepared.schemas);
sequences.push(...prepared.sequences);
+ views.push(...prepared.views);
+ matViews.push(...prepared.matViews);
+ roles.push(...prepared.roles);
+ policies.push(...prepared.policies);
}
unregister();
- return { tables: Array.from(new Set(tables)), enums, schemas, sequences };
+ return { tables: Array.from(new Set(tables)), enums, schemas, sequences, views, matViews, roles, policies };
};
diff --git a/drizzle-kit/src/serializer/pgSchema.ts b/drizzle-kit/src/serializer/pgSchema.ts
index 7e4a55afd..d7604d645 100644
--- a/drizzle-kit/src/serializer/pgSchema.ts
+++ b/drizzle-kit/src/serializer/pgSchema.ts
@@ -147,6 +147,13 @@ export const sequenceSchema = object({
schema: string(),
}).strict();
+export const roleSchema = object({
+ name: string(),
+ createDb: boolean().optional(),
+ createRole: boolean().optional(),
+ inherit: boolean().optional(),
+}).strict();
+
export const sequenceSquashed = object({
name: string(),
schema: string(),
@@ -184,6 +191,11 @@ const column = object({
.optional(),
}).strict();
+const checkConstraint = object({
+ name: string(),
+ value: string(),
+}).strict();
+
const columnSquashed = object({
name: string(),
type: string(),
@@ -219,6 +231,64 @@ const uniqueConstraint = object({
nullsNotDistinct: boolean(),
}).strict();
+export const policy = object({
+ name: string(),
+ as: enumType(['PERMISSIVE', 'RESTRICTIVE']).optional(),
+ for: enumType(['ALL', 'SELECT', 'INSERT', 'UPDATE', 'DELETE']).optional(),
+ to: string().array().optional(),
+ using: string().optional(),
+ withCheck: string().optional(),
+ on: string().optional(),
+ schema: string().optional(),
+}).strict();
+
+export const policySquashed = object({
+ name: string(),
+ values: string(),
+}).strict();
+
+const viewWithOption = object({
+ checkOption: enumType(['local', 'cascaded']).optional(),
+ securityBarrier: boolean().optional(),
+ securityInvoker: boolean().optional(),
+}).strict();
+
+const matViewWithOption = object({
+ fillfactor: number().optional(),
+ toastTupleTarget: number().optional(),
+ parallelWorkers: number().optional(),
+ autovacuumEnabled: boolean().optional(),
+ vacuumIndexCleanup: enumType(['auto', 'off', 'on']).optional(),
+ vacuumTruncate: boolean().optional(),
+ autovacuumVacuumThreshold: number().optional(),
+ autovacuumVacuumScaleFactor: number().optional(),
+ autovacuumVacuumCostDelay: number().optional(),
+ autovacuumVacuumCostLimit: number().optional(),
+ autovacuumFreezeMinAge: number().optional(),
+ autovacuumFreezeMaxAge: number().optional(),
+ autovacuumFreezeTableAge: number().optional(),
+ autovacuumMultixactFreezeMinAge: number().optional(),
+ autovacuumMultixactFreezeMaxAge: number().optional(),
+ autovacuumMultixactFreezeTableAge: number().optional(),
+ logAutovacuumMinDuration: number().optional(),
+ userCatalogTable: boolean().optional(),
+}).strict();
+
+export const mergedViewWithOption = viewWithOption.merge(matViewWithOption).strict();
+
+export const view = object({
+ name: string(),
+ schema: string(),
+ columns: record(string(), column),
+ definition: string().optional(),
+ materialized: boolean(),
+ with: mergedViewWithOption.optional(),
+ isExisting: boolean(),
+ withNoData: boolean().optional(),
+ using: string().optional(),
+ tablespace: string().optional(),
+}).strict();
+
const tableV4 = object({
name: string(),
schema: string(),
@@ -265,6 +335,9 @@ const table = object({
foreignKeys: record(string(), fk),
compositePrimaryKeys: record(string(), compositePK),
uniqueConstraints: record(string(), uniqueConstraint).default({}),
+ policies: record(string(), policy).default({}),
+ checkConstraints: record(string(), checkConstraint).default({}),
+ isRLSEnabled: boolean().default(false),
}).strict();
const schemaHash = object({
@@ -282,6 +355,7 @@ export const kitInternals = object({
isArray: boolean().optional(),
dimensions: number().optional(),
rawType: string().optional(),
+ isDefaultAnExpression: boolean().optional(),
}).optional(),
),
}).optional(),
@@ -366,7 +440,10 @@ export const pgSchemaInternal = object({
tables: record(string(), table),
enums: record(string(), enumSchema),
schemas: record(string(), string()),
+ views: record(string(), view).default({}),
sequences: record(string(), sequenceSchema).default({}),
+ roles: record(string(), roleSchema).default({}),
+ policies: record(string(), policy).default({}),
_meta: object({
schemas: record(string(), string()),
tables: record(string(), string()),
@@ -383,6 +460,9 @@ const tableSquashed = object({
foreignKeys: record(string(), string()),
compositePrimaryKeys: record(string(), string()),
uniqueConstraints: record(string(), string()),
+ policies: record(string(), string()),
+ checkConstraints: record(string(), string()),
+ isRLSEnabled: boolean().default(false),
}).strict();
const tableSquashedV4 = object({
@@ -415,7 +495,10 @@ export const pgSchemaSquashed = object({
tables: record(string(), tableSquashed),
enums: record(string(), enumSchema),
schemas: record(string(), string()),
+ views: record(string(), view),
sequences: record(string(), sequenceSquashed),
+ roles: record(string(), roleSchema).default({}),
+ policies: record(string(), policySquashed).default({}),
}).strict();
export const pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash);
@@ -427,6 +510,7 @@ export const pgSchema = pgSchemaInternal.merge(schemaHash);
export type Enum = TypeOf;
export type Sequence = TypeOf;
+export type Role = TypeOf;
export type Column = TypeOf;
export type TableV3 = TypeOf;
export type TableV4 = TypeOf;
@@ -443,7 +527,13 @@ export type Index = TypeOf;
export type ForeignKey = TypeOf;
export type PrimaryKey = TypeOf;
export type UniqueConstraint = TypeOf;
+export type Policy = TypeOf;
+export type View = TypeOf;
+export type MatViewWithOption = TypeOf;
+export type ViewWithOption = TypeOf;
+
export type PgKitInternals = TypeOf;
+export type CheckConstraint = TypeOf;
export type PgSchemaV1 = TypeOf;
export type PgSchemaV2 = TypeOf;
@@ -464,7 +554,7 @@ export const PgSquasher = {
return `${idx.name};${
idx.columns
.map(
- (c) => `${c.expression}--${c.isExpression}--${c.asc}--${c.nulls}--${c.opclass}`,
+ (c) => `${c.expression}--${c.isExpression}--${c.asc}--${c.nulls}--${c.opclass ? c.opclass : ''}`,
)
.join(',,')
};${idx.isUnique};${idx.concurrently};${idx.method};${idx.where};${JSON.stringify(idx.with)}`;
@@ -544,6 +634,36 @@ export const PgSquasher = {
fk.onUpdate ?? ''
};${fk.onDelete ?? ''};${fk.schemaTo || 'public'}`;
},
+ squashPolicy: (policy: Policy) => {
+ return `${policy.name}--${policy.as}--${policy.for}--${
+ policy.to?.join(',')
+ }--${policy.using}--${policy.withCheck}--${policy.on}`;
+ },
+ unsquashPolicy: (policy: string): Policy => {
+ const splitted = policy.split('--');
+ return {
+ name: splitted[0],
+ as: splitted[1] as Policy['as'],
+ for: splitted[2] as Policy['for'],
+ to: splitted[3].split(','),
+ using: splitted[4] !== 'undefined' ? splitted[4] : undefined,
+ withCheck: splitted[5] !== 'undefined' ? splitted[5] : undefined,
+ on: splitted[6] !== 'undefined' ? splitted[6] : undefined,
+ };
+ },
+ squashPolicyPush: (policy: Policy) => {
+ return `${policy.name}--${policy.as}--${policy.for}--${policy.to?.join(',')}--${policy.on}`;
+ },
+ unsquashPolicyPush: (policy: string): Policy => {
+ const splitted = policy.split('--');
+ return {
+ name: splitted[0],
+ as: splitted[1] as Policy['as'],
+ for: splitted[2] as Policy['for'],
+ to: splitted[3].split(','),
+ on: splitted[4] !== 'undefined' ? splitted[4] : undefined,
+ };
+ },
squashPK: (pk: PrimaryKey) => {
return `${pk.columns.join(',')};${pk.name}`;
},
@@ -622,6 +742,17 @@ export const PgSquasher = {
cycle: splitted[7] === 'true',
};
},
+ squashCheck: (check: CheckConstraint) => {
+ return `${check.name};${check.value}`;
+ },
+ unsquashCheck: (input: string): CheckConstraint => {
+ const [
+ name,
+ value,
+ ] = input.split(';');
+
+ return { name, value };
+ },
};
export const squashPgScheme = (
@@ -666,6 +797,18 @@ export const squashPgScheme = (
},
);
+ const squashedPolicies = mapValues(it[1].policies, (policy) => {
+ return action === 'push'
+ ? PgSquasher.squashPolicyPush(policy)
+ : PgSquasher.squashPolicy(policy);
+ });
+ const squashedChecksContraints = mapValues(
+ it[1].checkConstraints,
+ (check) => {
+ return PgSquasher.squashCheck(check);
+ },
+ );
+
return [
it[0],
{
@@ -676,6 +819,9 @@ export const squashPgScheme = (
foreignKeys: squashedFKs,
compositePrimaryKeys: squashedPKs,
uniqueConstraints: squashedUniqueConstraints,
+ policies: squashedPolicies,
+ checkConstraints: squashedChecksContraints,
+ isRLSEnabled: it[1].isRLSEnabled ?? false,
},
];
}),
@@ -694,13 +840,30 @@ export const squashPgScheme = (
}),
);
+ const mappedPolicies = Object.fromEntries(
+ Object.entries(json.policies).map((it) => {
+ return [
+ it[0],
+ {
+ name: it[1].name,
+ values: action === 'push'
+ ? PgSquasher.squashPolicyPush(it[1])
+ : PgSquasher.squashPolicy(it[1]),
+ },
+ ];
+ }),
+ );
+
return {
version: '7',
dialect: json.dialect,
tables: mappedTables,
enums: json.enums,
schemas: json.schemas,
+ views: json.views,
+ policies: mappedPolicies,
sequences: mappedSequences,
+ roles: json.roles,
};
};
@@ -712,6 +875,8 @@ export const dryPg = pgSchema.parse({
tables: {},
enums: {},
schemas: {},
+ policies: {},
+ roles: {},
sequences: {},
_meta: {
schemas: {},
diff --git a/drizzle-kit/src/serializer/pgSerializer.ts b/drizzle-kit/src/serializer/pgSerializer.ts
index 4ab37a0ae..b0faa5ea8 100644
--- a/drizzle-kit/src/serializer/pgSerializer.ts
+++ b/drizzle-kit/src/serializer/pgSerializer.ts
@@ -2,67 +2,60 @@ import chalk from 'chalk';
import { getTableName, is, SQL } from 'drizzle-orm';
import {
AnyPgTable,
- ExtraConfigColumn,
+ getMaterializedViewConfig,
+ getTableConfig,
+ getViewConfig,
IndexedColumn,
PgColumn,
PgDialect,
PgEnum,
PgEnumColumn,
- PgInteger,
+ PgMaterializedView,
+ PgPolicy,
+ PgRole,
PgSchema,
PgSequence,
+ PgView,
uniqueKeyName,
} from 'drizzle-orm/pg-core';
-import { getTableConfig } from 'drizzle-orm/pg-core';
+import { CasingType } from 'src/cli/validations/common';
import { vectorOps } from 'src/extensions/vector';
import { withStyle } from '../cli/validations/outputs';
import type { IntrospectStage, IntrospectStatus } from '../cli/views';
import type {
- Column as Column,
+ CheckConstraint,
+ Column,
Enum,
ForeignKey,
Index,
IndexColumnType,
PgKitInternals,
PgSchemaInternal,
+ Policy,
PrimaryKey,
+ Role,
Sequence,
Table,
UniqueConstraint,
+ View,
} from '../serializer/pgSchema';
-import type { DB } from '../utils';
-import { sqlToStr } from '.';
-
-const dialect = new PgDialect();
+import { type DB, escapeSingleQuotes, isPgArrayType } from '../utils';
+import { getColumnCasing, sqlToStr } from './utils';
export const indexName = (tableName: string, columns: string[]) => {
return `${tableName}_${columns.join('_')}_index`;
};
-function stringFromIdentityProperty(
- field: string | number | undefined,
-): string | undefined {
- return typeof field === 'string'
- ? (field as string)
- : typeof field === 'undefined'
- ? undefined
- : String(field);
+function stringFromIdentityProperty(field: string | number | undefined): string | undefined {
+ return typeof field === 'string' ? (field as string) : typeof field === 'undefined' ? undefined : String(field);
}
function maxRangeForIdentityBasedOn(columnType: string) {
- return columnType === 'integer'
- ? '2147483647'
- : columnType === 'bigint'
- ? '9223372036854775807'
- : '32767';
+ return columnType === 'integer' ? '2147483647' : columnType === 'bigint' ? '9223372036854775807' : '32767';
}
function minRangeForIdentityBasedOn(columnType: string) {
- return columnType === 'integer'
- ? '-2147483648'
- : columnType === 'bitint'
- ? '-9223372036854775808'
- : '-32768';
+ return columnType === 'integer' ? '-2147483648' : columnType === 'bigint' ? '-9223372036854775808' : '-32768';
}
function stringFromDatabaseIdentityProperty(field: any): string | undefined {
@@ -75,21 +68,65 @@ function stringFromDatabaseIdentityProperty(field: any): string | undefined {
: String(field);
}
+export function buildArrayString(array: any[], sqlType: string): string {
+ sqlType = sqlType.split('[')[0];
+ const values = array
+ .map((value) => {
+ if (typeof value === 'number' || typeof value === 'bigint') {
+ return value.toString();
+ } else if (typeof value === 'boolean') {
+ return value ? 'true' : 'false';
+ } else if (Array.isArray(value)) {
+ return buildArrayString(value, sqlType);
+ } else if (value instanceof Date) {
+ if (sqlType === 'date') {
+ return `"${value.toISOString().split('T')[0]}"`;
+ } else if (sqlType === 'timestamp') {
+ return `"${value.toISOString().replace('T', ' ').slice(0, 23)}"`;
+ } else {
+ return `"${value.toISOString()}"`;
+ }
+ } else if (typeof value === 'object') {
+ return `"${JSON.stringify(value).replaceAll('"', '\\"')}"`;
+ }
+
+ return `"${value}"`;
+ })
+ .join(',');
+
+ return `{${values}}`;
+}
+
export const generatePgSnapshot = (
tables: AnyPgTable[],
enums: PgEnum[],
schemas: PgSchema[],
sequences: PgSequence[],
+ roles: PgRole[],
+ policies: PgPolicy[],
+ views: PgView[],
+ matViews: PgMaterializedView[],
+ casing: CasingType | undefined,
schemaFilter?: string[],
): PgSchemaInternal => {
+ const dialect = new PgDialect({ casing });
const result: Record = {};
+ const resultViews: Record = {};
const sequencesToReturn: Record = {};
+ const rolesToReturn: Record = {};
+ // this policies are a separate objects that were linked to a table outside of it
+ const policiesToReturn: Record = {};
// This object stores unique names for indexes and will be used to detect if you have the same names for indexes
// within the same PostgreSQL schema
+
const indexesInSchema: Record = {};
for (const table of tables) {
+ // This object stores unique names for checks and will be used to detect if you have the same names for checks
+ // within the same PostgreSQL table
+ const checksInTable: Record = {};
+
const {
name: tableName,
columns,
@@ -99,6 +136,8 @@ export const generatePgSnapshot = (
schema,
primaryKeys,
uniqueConstraints,
+ policies,
+ enableRLS,
} = getTableConfig(table);
if (schemaFilter && !schemaFilter.includes(schema ?? 'public')) {
@@ -107,36 +146,33 @@ export const generatePgSnapshot = (
const columnsObject: Record = {};
const indexesObject: Record = {};
+ const checksObject: Record = {};
const foreignKeysObject: Record = {};
const primaryKeysObject: Record = {};
const uniqueConstraintObject: Record = {};
+ const policiesObject: Record = {};
columns.forEach((column) => {
+ const name = getColumnCasing(column, casing);
const notNull: boolean = column.notNull;
const primaryKey: boolean = column.primary;
const sqlTypeLowered = column.getSQLType().toLowerCase();
- const typeSchema = is(column, PgEnumColumn)
- ? column.enum.schema || 'public'
- : undefined;
+ const typeSchema = is(column, PgEnumColumn) ? column.enum.schema || 'public' : undefined;
const generated = column.generated;
const identity = column.generatedIdentity;
const increment = stringFromIdentityProperty(identity?.sequenceOptions?.increment) ?? '1';
const minValue = stringFromIdentityProperty(identity?.sequenceOptions?.minValue)
- ?? (parseFloat(increment) < 0
- ? minRangeForIdentityBasedOn(column.columnType)
- : '1');
+ ?? (parseFloat(increment) < 0 ? minRangeForIdentityBasedOn(column.columnType) : '1');
const maxValue = stringFromIdentityProperty(identity?.sequenceOptions?.maxValue)
- ?? (parseFloat(increment) < 0
- ? '-1'
- : maxRangeForIdentityBasedOn(column.getSQLType()));
+ ?? (parseFloat(increment) < 0 ? '-1' : maxRangeForIdentityBasedOn(column.getSQLType()));
const startWith = stringFromIdentityProperty(identity?.sequenceOptions?.startWith)
?? (parseFloat(increment) < 0 ? maxValue : minValue);
const cache = stringFromIdentityProperty(identity?.sequenceOptions?.cache) ?? '1';
const columnToSet: Column = {
- name: column.name,
+ name,
type: column.getSQLType(),
typeSchema: typeSchema,
primaryKey,
@@ -154,7 +190,7 @@ export const generatePgSnapshot = (
identity: identity
? {
type: identity.type,
- name: identity.sequenceName ?? `${tableName}_${column.name}_seq`,
+ name: identity.sequenceName ?? `${tableName}_${name}_seq`,
schema: schema ?? 'public',
increment,
startWith,
@@ -182,9 +218,9 @@ export const generatePgSnapshot = (
)
} on the ${
chalk.underline.blue(
- column.name,
+ name,
)
- } column is confilcting with a unique constraint name already defined for ${
+ } column is conflicting with a unique constraint name already defined for ${
chalk.underline.blue(
existingUnique.columns.join(','),
)
@@ -202,30 +238,23 @@ export const generatePgSnapshot = (
if (column.default !== undefined) {
if (is(column.default, SQL)) {
- columnToSet.default = sqlToStr(column.default);
+ columnToSet.default = sqlToStr(column.default, casing);
} else {
if (typeof column.default === 'string') {
- columnToSet.default = `'${column.default}'`;
+ columnToSet.default = `'${escapeSingleQuotes(column.default)}'`;
} else {
if (sqlTypeLowered === 'jsonb' || sqlTypeLowered === 'json') {
- columnToSet.default = `'${
- JSON.stringify(
- column.default,
- )
- }'::${sqlTypeLowered}`;
+ columnToSet.default = `'${JSON.stringify(column.default)}'::${sqlTypeLowered}`;
} else if (column.default instanceof Date) {
if (sqlTypeLowered === 'date') {
columnToSet.default = `'${column.default.toISOString().split('T')[0]}'`;
} else if (sqlTypeLowered === 'timestamp') {
- columnToSet.default = `'${
- column.default
- .toISOString()
- .replace('T', ' ')
- .slice(0, 23)
- }'`;
+ columnToSet.default = `'${column.default.toISOString().replace('T', ' ').slice(0, 23)}'`;
} else {
columnToSet.default = `'${column.default.toISOString()}'`;
}
+ } else if (isPgArrayType(sqlTypeLowered) && Array.isArray(column.default)) {
+ columnToSet.default = `'${buildArrayString(column.default, sqlTypeLowered)}'`;
} else {
// Should do for all types
// columnToSet.default = `'${column.default}'::${sqlTypeLowered}`;
@@ -234,19 +263,28 @@ export const generatePgSnapshot = (
}
}
}
- columnsObject[column.name] = columnToSet;
+ columnsObject[name] = columnToSet;
});
primaryKeys.map((pk) => {
- const columnNames = pk.columns.map((c) => c.name);
- primaryKeysObject[pk.getName()] = {
- name: pk.getName(),
+ const originalColumnNames = pk.columns.map((c) => c.name);
+ const columnNames = pk.columns.map((c) => getColumnCasing(c, casing));
+
+ let name = pk.getName();
+ if (casing !== undefined) {
+ for (let i = 0; i < originalColumnNames.length; i++) {
+ name = name.replace(originalColumnNames[i], columnNames[i]);
+ }
+ }
+
+ primaryKeysObject[name] = {
+ name,
columns: columnNames,
};
});
uniqueConstraints?.map((unq) => {
- const columnNames = unq.columns.map((c) => c.name);
+ const columnNames = unq.columns.map((c) => getColumnCasing(c, casing));
const name = unq.name ?? uniqueKeyName(table, columnNames);
@@ -254,24 +292,16 @@ export const generatePgSnapshot = (
if (typeof existingUnique !== 'undefined') {
console.log(
`\n${
- withStyle.errorWarning(`We\'ve found duplicated unique constraint names in ${
- chalk.underline.blue(
- tableName,
- )
- } table.
- The unique constraint ${
- chalk.underline.blue(
- name,
- )
- } on the ${
- chalk.underline.blue(
- columnNames.join(','),
- )
- } columns is confilcting with a unique constraint name already defined for ${
- chalk.underline.blue(
- existingUnique.columns.join(','),
- )
- } columns\n`)
+ withStyle.errorWarning(
+ `We\'ve found duplicated unique constraint names in ${chalk.underline.blue(tableName)} table.
+ The unique constraint ${chalk.underline.blue(name)} on the ${
+ chalk.underline.blue(
+ columnNames.join(','),
+ )
+ } columns is confilcting with a unique constraint name already defined for ${
+ chalk.underline.blue(existingUnique.columns.join(','))
+ } columns\n`,
+ )
}`,
);
process.exit(1);
@@ -285,7 +315,6 @@ export const generatePgSnapshot = (
});
const fks: ForeignKey[] = foreignKeys.map((fk) => {
- const name = fk.getName();
const tableFrom = tableName;
const onDelete = fk.onDelete;
const onUpdate = fk.onUpdate;
@@ -296,8 +325,20 @@ export const generatePgSnapshot = (
// getTableConfig(reference.foreignTable).schema || "public";
const schemaTo = getTableConfig(reference.foreignTable).schema;
- const columnsFrom = reference.columns.map((it) => it.name);
- const columnsTo = reference.foreignColumns.map((it) => it.name);
+ const originalColumnsFrom = reference.columns.map((it) => it.name);
+ const columnsFrom = reference.columns.map((it) => getColumnCasing(it, casing));
+ const originalColumnsTo = reference.foreignColumns.map((it) => it.name);
+ const columnsTo = reference.foreignColumns.map((it) => getColumnCasing(it, casing));
+
+ let name = fk.getName();
+ if (casing !== undefined) {
+ for (let i = 0; i < originalColumnsFrom.length; i++) {
+ name = name.replace(originalColumnsFrom[i], columnsFrom[i]);
+ }
+ for (let i = 0; i < originalColumnsTo.length; i++) {
+ name = name.replace(originalColumnsTo[i], columnsTo[i]);
+ }
+ }
return {
name,
@@ -325,11 +366,7 @@ export const generatePgSnapshot = (
console.log(
`\n${
withStyle.errorWarning(
- `Please specify an index name in ${
- getTableName(
- value.config.table,
- )
- } table that has "${
+ `Please specify an index name in ${getTableName(value.config.table)} table that has "${
dialect.sqlToQuery(it).sql
}" expression. We can generate index names for indexes on columns only; for expressions in indexes, you need to specify the name yourself.`,
)
@@ -339,6 +376,7 @@ export const generatePgSnapshot = (
}
}
it = it as IndexedColumn;
+ const name = getColumnCasing(it as IndexedColumn, casing);
if (
!is(it, SQL)
&& it.type! === 'PgVector'
@@ -349,7 +387,7 @@ export const generatePgSnapshot = (
withStyle.errorWarning(
`You are specifying an index on the ${
chalk.blueBright(
- it.name,
+ name,
)
} column inside the ${
chalk.blueBright(
@@ -362,12 +400,10 @@ export const generatePgSnapshot = (
} type without specifying an operator class. Vector extension doesn't have a default operator class, so you need to specify one of the available options. Here is a list of available op classes for the vector extension: [${
vectorOps
.map((it) => `${chalk.underline(`${it}`)}`)
- .join(
- ', ',
- )
+ .join(', ')
}].\n\nYou can specify it using current syntax: ${
chalk.underline(
- `index("${value.config.name}").using("${value.config.method}", table.${it.name}.op("${
+ `index("${value.config.name}").using("${value.config.method}", table.${name}.op("${
vectorOps[0]
}"))`,
)
@@ -377,12 +413,10 @@ export const generatePgSnapshot = (
);
process.exit(1);
}
- indexColumnNames.push((it as ExtraConfigColumn).name);
+ indexColumnNames.push(name);
});
- const name = value.config.name
- ? value.config.name
- : indexName(tableName, indexColumnNames);
+ const name = value.config.name ? value.config.name : indexName(tableName, indexColumnNames);
let indexColumns: IndexColumnType[] = columns.map(
(it): IndexColumnType => {
@@ -396,7 +430,7 @@ export const generatePgSnapshot = (
} else {
it = it as IndexedColumn;
return {
- expression: it.name!,
+ expression: getColumnCasing(it as IndexedColumn, casing),
isExpression: false,
asc: it.indexConfig?.order === 'asc',
nulls: it.indexConfig?.nulls
@@ -417,9 +451,7 @@ export const generatePgSnapshot = (
`\n${
withStyle.errorWarning(
`We\'ve found duplicated index name across ${
- chalk.underline.blue(
- schema ?? 'public',
- )
+ chalk.underline.blue(schema ?? 'public')
} schema. Please rename your index in either the ${
chalk.underline.blue(
tableName,
@@ -439,15 +471,98 @@ export const generatePgSnapshot = (
name,
columns: indexColumns,
isUnique: value.config.unique ?? false,
- where: value.config.where
- ? dialect.sqlToQuery(value.config.where).sql
- : undefined,
+ where: value.config.where ? dialect.sqlToQuery(value.config.where).sql : undefined,
concurrently: value.config.concurrently ?? false,
method: value.config.method ?? 'btree',
with: value.config.with ?? {},
};
});
+ policies.forEach((policy) => {
+ const mappedTo = [];
+
+ if (!policy.to) {
+ mappedTo.push('public');
+ } else {
+ if (policy.to && typeof policy.to === 'string') {
+ mappedTo.push(policy.to);
+ } else if (policy.to && is(policy.to, PgRole)) {
+ mappedTo.push(policy.to.name);
+ } else if (policy.to && Array.isArray(policy.to)) {
+ policy.to.forEach((it) => {
+ if (typeof it === 'string') {
+ mappedTo.push(it);
+ } else if (is(it, PgRole)) {
+ mappedTo.push(it.name);
+ }
+ });
+ }
+ }
+
+ if (policiesObject[policy.name] !== undefined) {
+ console.log(
+ `\n${
+ withStyle.errorWarning(
+ `We\'ve found duplicated policy name across ${
+ chalk.underline.blue(tableKey)
+ } table. Please rename one of the policies with ${
+ chalk.underline.blue(
+ policy.name,
+ )
+ } name`,
+ )
+ }`,
+ );
+ process.exit(1);
+ }
+
+ policiesObject[policy.name] = {
+ name: policy.name,
+ as: policy.as?.toUpperCase() as Policy['as'] ?? 'PERMISSIVE',
+ for: policy.for?.toUpperCase() as Policy['for'] ?? 'ALL',
+ to: mappedTo.sort(),
+ using: is(policy.using, SQL) ? dialect.sqlToQuery(policy.using).sql : undefined,
+ withCheck: is(policy.withCheck, SQL) ? dialect.sqlToQuery(policy.withCheck).sql : undefined,
+ };
+ });
+
+ checks.forEach((check) => {
+ const checkName = check.name;
+
+ if (typeof checksInTable[`"${schema ?? 'public'}"."${tableName}"`] !== 'undefined') {
+ if (checksInTable[`"${schema ?? 'public'}"."${tableName}"`].includes(check.name)) {
+ console.log(
+ `\n${
+ withStyle.errorWarning(
+ `We\'ve found duplicated check constraint name across ${
+ chalk.underline.blue(
+ schema ?? 'public',
+ )
+ } schema in ${
+ chalk.underline.blue(
+ tableName,
+ )
+ }. Please rename your check constraint in either the ${
+ chalk.underline.blue(
+ tableName,
+ )
+ } table or the table with the duplicated check contraint name`,
+ )
+ }`,
+ );
+ process.exit(1);
+ }
+ checksInTable[`"${schema ?? 'public'}"."${tableName}"`].push(checkName);
+ } else {
+ checksInTable[`"${schema ?? 'public'}"."${tableName}"`] = [check.name];
+ }
+
+ checksObject[checkName] = {
+ name: checkName,
+ value: dialect.sqlToQuery(check.value).sql,
+ };
+ });
+
const tableKey = `${schema ?? 'public'}.${tableName}`;
result[tableKey] = {
@@ -458,15 +573,94 @@ export const generatePgSnapshot = (
foreignKeys: foreignKeysObject,
compositePrimaryKeys: primaryKeysObject,
uniqueConstraints: uniqueConstraintObject,
+ policies: policiesObject,
+ checkConstraints: checksObject,
+ isRLSEnabled: enableRLS,
};
}
+ for (const policy of policies) {
+ // @ts-ignore
+ if (!policy._linkedTable) {
+ console.log(
+ `\n${
+ withStyle.errorWarning(
+ `"Policy ${policy.name} was skipped because it was not linked to any table. You should either include the policy in a table or use .link() on the policy to link it to any table you have. For more information, please check:`,
+ )
+ }`,
+ );
+ continue;
+ }
+
+ // @ts-ignore
+ const tableConfig = getTableConfig(policy._linkedTable);
+
+ const tableKey = `${tableConfig.schema ?? 'public'}.${tableConfig.name}`;
+
+ const mappedTo = [];
+
+ if (!policy.to) {
+ mappedTo.push('public');
+ } else {
+ if (policy.to && typeof policy.to === 'string') {
+ mappedTo.push(policy.to);
+ } else if (policy.to && is(policy.to, PgRole)) {
+ mappedTo.push(policy.to.name);
+ } else if (policy.to && Array.isArray(policy.to)) {
+ policy.to.forEach((it) => {
+ if (typeof it === 'string') {
+ mappedTo.push(it);
+ } else if (is(it, PgRole)) {
+ mappedTo.push(it.name);
+ }
+ });
+ }
+ }
+
+ // add separate policies object, that will be only responsible for policy creation
+ // but we would need to track if a policy was enabled for a specific table or not
+ // enable only if jsonStatements for enable rls was not already there + filter it
+
+ if (result[tableKey]?.policies[policy.name] !== undefined || policiesToReturn[policy.name] !== undefined) {
+ console.log(
+ `\n${
+ withStyle.errorWarning(
+ `We\'ve found duplicated policy name across ${
+ chalk.underline.blue(tableKey)
+ } table. Please rename one of the policies with ${
+ chalk.underline.blue(
+ policy.name,
+ )
+ } name`,
+ )
+ }`,
+ );
+ process.exit(1);
+ }
+
+ const mappedPolicy = {
+ name: policy.name,
+ as: policy.as?.toUpperCase() as Policy['as'] ?? 'PERMISSIVE',
+ for: policy.for?.toUpperCase() as Policy['for'] ?? 'ALL',
+ to: mappedTo.sort(),
+ using: is(policy.using, SQL) ? dialect.sqlToQuery(policy.using).sql : undefined,
+ withCheck: is(policy.withCheck, SQL) ? dialect.sqlToQuery(policy.withCheck).sql : undefined,
+ };
+
+ if (result[tableKey]) {
+ result[tableKey].policies[policy.name] = mappedPolicy;
+ } else {
+ policiesToReturn[policy.name] = {
+ ...mappedPolicy,
+ schema: tableConfig.schema ?? 'public',
+ on: `"${tableConfig.schema ?? 'public'}"."${tableConfig.name}"`,
+ };
+ }
+ }
+
for (const sequence of sequences) {
const name = sequence.seqName!;
- if (
- typeof sequencesToReturn[`${sequence.schema ?? 'public'}.${name}`]
- === 'undefined'
- ) {
+ if (typeof sequencesToReturn[`${sequence.schema ?? 'public'}.${name}`] === 'undefined') {
const increment = stringFromIdentityProperty(sequence?.seqOptions?.increment) ?? '1';
const minValue = stringFromIdentityProperty(sequence?.seqOptions?.minValue)
?? (parseFloat(increment) < 0 ? '-9223372036854775808' : '1');
@@ -491,6 +685,182 @@ export const generatePgSnapshot = (
}
}
+ for (const role of roles) {
+ if (!(role as any)._existing) {
+ rolesToReturn[role.name] = {
+ name: role.name,
+ createDb: (role as any).createDb === undefined ? false : (role as any).createDb,
+ createRole: (role as any).createRole === undefined ? false : (role as any).createRole,
+ inherit: (role as any).inherit === undefined ? true : (role as any).inherit,
+ };
+ }
+ }
+ const combinedViews = [...views, ...matViews];
+ for (const view of combinedViews) {
+ let viewName;
+ let schema;
+ let query;
+ let selectedFields;
+ let isExisting;
+ let withOption;
+ let tablespace;
+ let using;
+ let withNoData;
+ let materialized: boolean = false;
+
+ if (is(view, PgView)) {
+ ({ name: viewName, schema, query, selectedFields, isExisting, with: withOption } = getViewConfig(view));
+ } else {
+ ({ name: viewName, schema, query, selectedFields, isExisting, with: withOption, tablespace, using, withNoData } =
+ getMaterializedViewConfig(view));
+
+ materialized = true;
+ }
+
+ const viewSchema = schema ?? 'public';
+
+ const viewKey = `${viewSchema}.${viewName}`;
+
+ const columnsObject: Record = {};
+ const uniqueConstraintObject: Record = {};
+
+ const existingView = resultViews[viewKey];
+ if (typeof existingView !== 'undefined') {
+ console.log(
+ `\n${
+ withStyle.errorWarning(
+ `We\'ve found duplicated view name across ${
+ chalk.underline.blue(schema ?? 'public')
+ } schema. Please rename your view`,
+ )
+ }`,
+ );
+ process.exit(1);
+ }
+
+ for (const key in selectedFields) {
+ if (is(selectedFields[key], PgColumn)) {
+ const column = selectedFields[key];
+
+ const notNull: boolean = column.notNull;
+ const primaryKey: boolean = column.primary;
+ const sqlTypeLowered = column.getSQLType().toLowerCase();
+
+ const typeSchema = is(column, PgEnumColumn) ? column.enum.schema || 'public' : undefined;
+ const generated = column.generated;
+ const identity = column.generatedIdentity;
+
+ const increment = stringFromIdentityProperty(identity?.sequenceOptions?.increment) ?? '1';
+ const minValue = stringFromIdentityProperty(identity?.sequenceOptions?.minValue)
+ ?? (parseFloat(increment) < 0 ? minRangeForIdentityBasedOn(column.columnType) : '1');
+ const maxValue = stringFromIdentityProperty(identity?.sequenceOptions?.maxValue)
+ ?? (parseFloat(increment) < 0 ? '-1' : maxRangeForIdentityBasedOn(column.getSQLType()));
+ const startWith = stringFromIdentityProperty(identity?.sequenceOptions?.startWith)
+ ?? (parseFloat(increment) < 0 ? maxValue : minValue);
+ const cache = stringFromIdentityProperty(identity?.sequenceOptions?.cache) ?? '1';
+
+ const columnToSet: Column = {
+ name: column.name,
+ type: column.getSQLType(),
+ typeSchema: typeSchema,
+ primaryKey,
+ notNull,
+ generated: generated
+ ? {
+ as: is(generated.as, SQL)
+ ? dialect.sqlToQuery(generated.as as SQL).sql
+ : typeof generated.as === 'function'
+ ? dialect.sqlToQuery(generated.as() as SQL).sql
+ : (generated.as as any),
+ type: 'stored',
+ }
+ : undefined,
+ identity: identity
+ ? {
+ type: identity.type,
+ name: identity.sequenceName ?? `${viewName}_${column.name}_seq`,
+ schema: schema ?? 'public',
+ increment,
+ startWith,
+ minValue,
+ maxValue,
+ cache,
+ cycle: identity?.sequenceOptions?.cycle ?? false,
+ }
+ : undefined,
+ };
+
+ if (column.isUnique) {
+ const existingUnique = uniqueConstraintObject[column.uniqueName!];
+ if (typeof existingUnique !== 'undefined') {
+ console.log(
+ `\n${
+ withStyle.errorWarning(
+ `We\'ve found duplicated unique constraint names in ${chalk.underline.blue(viewName)} table.
+ The unique constraint ${chalk.underline.blue(column.uniqueName)} on the ${
+ chalk.underline.blue(
+ column.name,
+ )
+ } column is confilcting with a unique constraint name already defined for ${
+ chalk.underline.blue(existingUnique.columns.join(','))
+ } columns\n`,
+ )
+ }`,
+ );
+ process.exit(1);
+ }
+ uniqueConstraintObject[column.uniqueName!] = {
+ name: column.uniqueName!,
+ nullsNotDistinct: column.uniqueType === 'not distinct',
+ columns: [columnToSet.name],
+ };
+ }
+
+ if (column.default !== undefined) {
+ if (is(column.default, SQL)) {
+ columnToSet.default = sqlToStr(column.default, casing);
+ } else {
+ if (typeof column.default === 'string') {
+ columnToSet.default = `'${column.default}'`;
+ } else {
+ if (sqlTypeLowered === 'jsonb' || sqlTypeLowered === 'json') {
+ columnToSet.default = `'${JSON.stringify(column.default)}'::${sqlTypeLowered}`;
+ } else if (column.default instanceof Date) {
+ if (sqlTypeLowered === 'date') {
+ columnToSet.default = `'${column.default.toISOString().split('T')[0]}'`;
+ } else if (sqlTypeLowered === 'timestamp') {
+ columnToSet.default = `'${column.default.toISOString().replace('T', ' ').slice(0, 23)}'`;
+ } else {
+ columnToSet.default = `'${column.default.toISOString()}'`;
+ }
+ } else if (isPgArrayType(sqlTypeLowered) && Array.isArray(column.default)) {
+ columnToSet.default = `'${buildArrayString(column.default, sqlTypeLowered)}'`;
+ } else {
+ // Should do for all types
+ // columnToSet.default = `'${column.default}'::${sqlTypeLowered}`;
+ columnToSet.default = column.default;
+ }
+ }
+ }
+ }
+ columnsObject[column.name] = columnToSet;
+ }
+ }
+
+ resultViews[viewKey] = {
+ columns: columnsObject,
+ definition: isExisting ? undefined : dialect.sqlToQuery(query!).sql,
+ name: viewName,
+ schema: viewSchema,
+ isExisting,
+ with: withOption,
+ withNoData,
+ materialized,
+ tablespace,
+ using,
+ };
+ }
+
const enumsToReturn: Record = enums.reduce<{
[key: string]: Enum;
}>((map, obj) => {
@@ -508,9 +878,7 @@ export const generatePgSnapshot = (
schemas
.filter((it) => {
if (schemaFilter) {
- return (
- schemaFilter.includes(it.schemaName) && it.schemaName !== 'public'
- );
+ return schemaFilter.includes(it.schemaName) && it.schemaName !== 'public';
} else {
return it.schemaName !== 'public';
}
@@ -525,6 +893,9 @@ export const generatePgSnapshot = (
enums: enumsToReturn,
schemas: schemasObject,
sequences: sequencesToReturn,
+ roles: rolesToReturn,
+ policies: policiesToReturn,
+ views: resultViews,
_meta: {
schemas: {},
tables: {},
@@ -541,28 +912,93 @@ const trimChar = (str: string, char: string) => {
while (end > start && str[end - 1] === char) --end;
// this.toString() due to ava deep equal issue with String { "value" }
- return start > 0 || end < str.length
- ? str.substring(start, end)
- : str.toString();
+ return start > 0 || end < str.length ? str.substring(start, end) : str.toString();
};
+function prepareRoles(entities?: {
+ roles: boolean | {
+ provider?: string | undefined;
+ include?: string[] | undefined;
+ exclude?: string[] | undefined;
+ };
+}) {
+ let useRoles: boolean = false;
+ const includeRoles: string[] = [];
+ const excludeRoles: string[] = [];
+
+ if (entities && entities.roles) {
+ if (typeof entities.roles === 'object') {
+ if (entities.roles.provider) {
+ if (entities.roles.provider === 'supabase') {
+ excludeRoles.push(...[
+ 'anon',
+ 'authenticator',
+ 'authenticated',
+ 'service_role',
+ 'supabase_auth_admin',
+ 'supabase_storage_admin',
+ 'dashboard_user',
+ 'supabase_admin',
+ ]);
+ } else if (entities.roles.provider === 'neon') {
+ excludeRoles.push(...['authenticated', 'anonymous']);
+ }
+ }
+ if (entities.roles.include) {
+ includeRoles.push(...entities.roles.include);
+ }
+ if (entities.roles.exclude) {
+ excludeRoles.push(...entities.roles.exclude);
+ }
+ } else {
+ useRoles = entities.roles;
+ }
+ }
+ return { useRoles, includeRoles, excludeRoles };
+}
+
export const fromDatabase = async (
db: DB,
tablesFilter: (table: string) => boolean = () => true,
schemaFilters: string[],
+ entities?: {
+ roles: boolean | {
+ provider?: string | undefined;
+ include?: string[] | undefined;
+ exclude?: string[] | undefined;
+ };
+ },
progressCallback?: (
stage: IntrospectStage,
count: number,
status: IntrospectStatus,
) => void,
+ tsSchema?: PgSchemaInternal,
): Promise => {
const result: Record = {};
+ const views: Record = {};
+ const policies: Record = {};
const internals: PgKitInternals = { tables: {} };
- const where = schemaFilters.map((t) => `table_schema = '${t}'`).join(' or ');
-
- const allTables = await db.query(
- `SELECT table_schema, table_name FROM information_schema.tables${where === '' ? '' : ` WHERE ${where}`};`,
+ const where = schemaFilters.map((t) => `n.nspname = '${t}'`).join(' or ');
+
+ const allTables = await db.query<{ table_schema: string; table_name: string; type: string; rls_enabled: boolean }>(
+ `SELECT
+ n.nspname AS table_schema,
+ c.relname AS table_name,
+ CASE
+ WHEN c.relkind = 'r' THEN 'table'
+ WHEN c.relkind = 'v' THEN 'view'
+ WHEN c.relkind = 'm' THEN 'materialized_view'
+ END AS type,
+ c.relrowsecurity AS rls_enabled
+FROM
+ pg_catalog.pg_class c
+JOIN
+ pg_catalog.pg_namespace n ON n.oid = c.relnamespace
+WHERE
+ c.relkind IN ('r', 'v', 'm')
+ ${where === '' ? '' : ` AND ${where}`};`,
);
const schemas = new Set(allTables.map((it) => it.table_schema));
@@ -588,6 +1024,8 @@ export const fromDatabase = async (
let indexesCount = 0;
let foreignKeysCount = 0;
let tableCount = 0;
+ let checksCount = 0;
+ let viewsCount = 0;
const sequencesToReturn: Record = {};
@@ -622,9 +1060,7 @@ export const fromDatabase = async (
};
}
- const whereEnums = schemaFilters
- .map((t) => `n.nspname = '${t}'`)
- .join(' or ');
+ const whereEnums = schemaFilters.map((t) => `n.nspname = '${t}'`).join(' or ');
const allEnums = await db.query(
`select n.nspname as enum_schema,
@@ -660,308 +1096,442 @@ export const fromDatabase = async (
progressCallback('enums', Object.keys(enumsToReturn).length, 'done');
}
- const sequencesInColumns: string[] = [];
+ const allRoles = await db.query<
+ { rolname: string; rolinherit: boolean; rolcreatedb: boolean; rolcreaterole: boolean }
+ >(
+ `SELECT rolname, rolinherit, rolcreatedb, rolcreaterole FROM pg_roles;`,
+ );
- const all = allTables.map((row) => {
- return new Promise(async (res, rej) => {
- const tableName = row.table_name as string;
- if (!tablesFilter(tableName)) return res('');
- tableCount += 1;
- const tableSchema = row.table_schema;
-
- try {
- const columnToReturn: Record = {};
- const indexToReturn: Record = {};
- const foreignKeysToReturn: Record = {};
- const primaryKeys: Record