drizzle-kit 0.20.2 → 0.20.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin.cjs CHANGED
@@ -59566,15 +59566,15 @@ var init_mysql_introspect = __esm({
59566
59566
  "AnyMySqlColumn",
59567
59567
  ...new Set(imports.mysql)
59568
59568
  ];
59569
- let result = `import { ${uniqueMySqlImports.join(
59569
+ const importsTs = `import { ${uniqueMySqlImports.join(
59570
59570
  ", "
59571
59571
  )} } from "drizzle-orm/mysql-core"
59572
59572
  import { sql } from "drizzle-orm"
59573
59573
 
59574
59574
  `;
59575
- result += schemaStatements;
59576
- result += "\n";
59577
- result += tableStatements.join("\n\n");
59575
+ const bodyTs = schemaStatements + "\n" + tableStatements.join("\n\n");
59576
+ let result = importsTs;
59577
+ result += bodyTs;
59578
59578
  return result;
59579
59579
  };
59580
59580
  isCyclic3 = (fk4) => {
@@ -60141,7 +60141,7 @@ init_source();
60141
60141
  // package.json
60142
60142
  var package_default = {
60143
60143
  name: "drizzle-kit",
60144
- version: "0.20.2",
60144
+ version: "0.20.4",
60145
60145
  repository: "https://github.com/drizzle-team/drizzle-kit-mirror",
60146
60146
  author: "Drizzle Team",
60147
60147
  license: "MIT",
@@ -60176,7 +60176,8 @@ var package_default = {
60176
60176
  sim: "node -r esbuild-register ./dev/simulate.ts",
60177
60177
  "sim:sqlite": "node -r esbuild-register ./dev/sqlite/index.ts",
60178
60178
  test: "ava test --timeout=60s",
60179
- build: "rm -rf ./dist && tsc -p tsconfig.cli-types.json && cp dist/index.d.ts dist/index.d.mts && tsx build.ts",
60179
+ build: "rm -rf ./dist && tsc -p tsconfig.cli-types.json && pnpm mts && tsx build.ts",
60180
+ mts: "cp dist/index.d.ts dist/index.d.mts && cp dist/utils-studio.d.ts dist/utils-studio.d.mts",
60180
60181
  "build:dev": "rm -rf ./dist && tsx build.dev.ts && tsc -p tsconfig.cli-types.json && chmod +x ./dist/index.cjs",
60181
60182
  packit: "pnpm build && cp package.json dist/ && cd dist && pnpm pack",
60182
60183
  tsc: "tsc -p tsconfig.build.json",
@@ -60252,6 +60253,18 @@ var package_default = {
60252
60253
  },
60253
60254
  types: "./index.d.mts",
60254
60255
  default: "./index.mjs"
60256
+ },
60257
+ "./utils-studio": {
60258
+ import: {
60259
+ types: "./utils-studio.d.mts",
60260
+ default: "./utils-studio.mjs"
60261
+ },
60262
+ require: {
60263
+ types: "./utils-studio.d.ts",
60264
+ default: "./utils-studio.js"
60265
+ },
60266
+ types: "./utils-studio.d.mts",
60267
+ default: "./utils-studio.mjs"
60255
60268
  }
60256
60269
  }
60257
60270
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.20.2",
3
+ "version": "0.20.4",
4
4
  "repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
5
5
  "author": "Drizzle Team",
6
6
  "license": "MIT",
@@ -35,7 +35,8 @@
35
35
  "sim": "node -r esbuild-register ./dev/simulate.ts",
36
36
  "sim:sqlite": "node -r esbuild-register ./dev/sqlite/index.ts",
37
37
  "test": "ava test --timeout=60s",
38
- "build": "rm -rf ./dist && tsc -p tsconfig.cli-types.json && cp dist/index.d.ts dist/index.d.mts && tsx build.ts",
38
+ "build": "rm -rf ./dist && tsc -p tsconfig.cli-types.json && pnpm mts && tsx build.ts",
39
+ "mts": "cp dist/index.d.ts dist/index.d.mts && cp dist/utils-studio.d.ts dist/utils-studio.d.mts",
39
40
  "build:dev": "rm -rf ./dist && tsx build.dev.ts && tsc -p tsconfig.cli-types.json && chmod +x ./dist/index.cjs",
40
41
  "packit": "pnpm build && cp package.json dist/ && cd dist && pnpm pack",
41
42
  "tsc": "tsc -p tsconfig.build.json",
@@ -111,6 +112,18 @@
111
112
  },
112
113
  "types": "./index.d.mts",
113
114
  "default": "./index.mjs"
115
+ },
116
+ "./utils-studio": {
117
+ "import": {
118
+ "types": "./utils-studio.d.mts",
119
+ "default": "./utils-studio.mjs"
120
+ },
121
+ "require": {
122
+ "types": "./utils-studio.d.ts",
123
+ "default": "./utils-studio.js"
124
+ },
125
+ "types": "./utils-studio.d.mts",
126
+ "default": "./utils-studio.mjs"
114
127
  }
115
128
  }
116
129
  }
@@ -0,0 +1,5 @@
1
+ export { toDrizzle as drizzleSchemaPg } from "./serializer/pgSerializer";
2
+ export { toDrizzle as drizzleSchemaSQLite } from "./serializer/sqliteSerializer";
3
+ export { sqlitePushIntrospect } from "./cli/commands/sqliteIntrospect";
4
+ export { pgPushIntrospect } from "./cli/commands/pgIntrospect";
5
+ export { DrizzleORMPgClient, TursoSqlite } from "./drivers";
package/utils-studio.d.ts CHANGED
@@ -2,4 +2,4 @@ export { toDrizzle as drizzleSchemaPg } from "./serializer/pgSerializer";
2
2
  export { toDrizzle as drizzleSchemaSQLite } from "./serializer/sqliteSerializer";
3
3
  export { sqlitePushIntrospect } from "./cli/commands/sqliteIntrospect";
4
4
  export { pgPushIntrospect } from "./cli/commands/pgIntrospect";
5
- export { DrizzleORMPgClient } from "./drivers";
5
+ export { DrizzleORMPgClient, TursoSqlite } from "./drivers";
package/utils-studio.js CHANGED
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env node
2
1
  var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -2109,7 +2108,7 @@ var require_brace_expansion = __commonJS({
2109
2108
  });
2110
2109
 
2111
2110
  // src/drivers/index.ts
2112
- var import_drizzle_orm3, DrizzleDbClient, DrizzleORMPgClient;
2111
+ var import_drizzle_orm3, DrizzleDbClient, DrizzleORMPgClient, TursoSqlite;
2113
2112
  var init_drivers = __esm({
2114
2113
  "src/drivers/index.ts"() {
2115
2114
  import_drizzle_orm3 = require("drizzle-orm");
@@ -2128,6 +2127,15 @@ var init_drivers = __esm({
2128
2127
  return res.rows;
2129
2128
  }
2130
2129
  };
2130
+ TursoSqlite = class extends DrizzleDbClient {
2131
+ async run(query) {
2132
+ await this.db.execute(query);
2133
+ }
2134
+ async query(query) {
2135
+ const res = await this.db.execute(query);
2136
+ return res.rows;
2137
+ }
2138
+ };
2131
2139
  }
2132
2140
  });
2133
2141
 
@@ -2135,6 +2143,7 @@ var init_drivers = __esm({
2135
2143
  var utils_studio_exports = {};
2136
2144
  __export(utils_studio_exports, {
2137
2145
  DrizzleORMPgClient: () => DrizzleORMPgClient,
2146
+ TursoSqlite: () => TursoSqlite,
2138
2147
  drizzleSchemaPg: () => toDrizzle,
2139
2148
  drizzleSchemaSQLite: () => toDrizzle2,
2140
2149
  pgPushIntrospect: () => pgPushIntrospect,
@@ -3360,6 +3369,7 @@ init_drivers();
3360
3369
  // Annotate the CommonJS export names for ESM import in node:
3361
3370
  0 && (module.exports = {
3362
3371
  DrizzleORMPgClient,
3372
+ TursoSqlite,
3363
3373
  drizzleSchemaPg,
3364
3374
  drizzleSchemaSQLite,
3365
3375
  pgPushIntrospect,