drizzle-kit 0.20.2-fbfd197 → 0.20.3

Sign up to get free protection for your applications and to get access to all the features.
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.3",
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-fbfd197",
3
+ "version": "0.20.3",
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
@@ -2109,7 +2109,7 @@ var require_brace_expansion = __commonJS({
2109
2109
  });
2110
2110
 
2111
2111
  // src/drivers/index.ts
2112
- var import_drizzle_orm3, DrizzleDbClient, DrizzleORMPgClient;
2112
+ var import_drizzle_orm3, DrizzleDbClient, DrizzleORMPgClient, TursoSqlite;
2113
2113
  var init_drivers = __esm({
2114
2114
  "src/drivers/index.ts"() {
2115
2115
  import_drizzle_orm3 = require("drizzle-orm");
@@ -2128,6 +2128,15 @@ var init_drivers = __esm({
2128
2128
  return res.rows;
2129
2129
  }
2130
2130
  };
2131
+ TursoSqlite = class extends DrizzleDbClient {
2132
+ async run(query) {
2133
+ await this.db.execute(query);
2134
+ }
2135
+ async query(query) {
2136
+ const res = await this.db.execute(query);
2137
+ return res.rows;
2138
+ }
2139
+ };
2131
2140
  }
2132
2141
  });
2133
2142
 
@@ -2135,6 +2144,7 @@ var init_drivers = __esm({
2135
2144
  var utils_studio_exports = {};
2136
2145
  __export(utils_studio_exports, {
2137
2146
  DrizzleORMPgClient: () => DrizzleORMPgClient,
2147
+ TursoSqlite: () => TursoSqlite,
2138
2148
  drizzleSchemaPg: () => toDrizzle,
2139
2149
  drizzleSchemaSQLite: () => toDrizzle2,
2140
2150
  pgPushIntrospect: () => pgPushIntrospect,
@@ -3360,6 +3370,7 @@ init_drivers();
3360
3370
  // Annotate the CommonJS export names for ESM import in node:
3361
3371
  0 && (module.exports = {
3362
3372
  DrizzleORMPgClient,
3373
+ TursoSqlite,
3363
3374
  drizzleSchemaPg,
3364
3375
  drizzleSchemaSQLite,
3365
3376
  pgPushIntrospect,