drizzle-kit 0.20.0 → 0.20.1-56e7be6
Sign up to get free protection for your applications and to get access to all the features.
- package/{index.cjs → bin.cjs} +24 -14
- package/index.d.mts +105 -0
- package/index.js +31 -0
- package/index.mjs +7 -0
- package/package.json +18 -3
- package/utils.d.ts +1 -2
- package/utils.js +0 -5
package/{index.cjs → bin.cjs}
RENAMED
@@ -42114,7 +42114,7 @@ var require_server = __commonJS({
|
|
42114
42114
|
var EventEmitter = require("events").EventEmitter;
|
42115
42115
|
var Connection2 = require_connection2();
|
42116
42116
|
var ConnectionConfig = require_connection_config();
|
42117
|
-
var
|
42117
|
+
var Server = class extends EventEmitter {
|
42118
42118
|
constructor() {
|
42119
42119
|
super();
|
42120
42120
|
this.connections = [];
|
@@ -42137,7 +42137,7 @@ var require_server = __commonJS({
|
|
42137
42137
|
this._server.close(cb);
|
42138
42138
|
}
|
42139
42139
|
};
|
42140
|
-
module2.exports =
|
42140
|
+
module2.exports = Server;
|
42141
42141
|
}
|
42142
42142
|
});
|
42143
42143
|
|
@@ -42168,8 +42168,8 @@ var require_mysql2 = __commonJS({
|
|
42168
42168
|
exports.Pool = Pool;
|
42169
42169
|
exports.PoolCluster = PoolCluster;
|
42170
42170
|
exports.createServer = function(handler) {
|
42171
|
-
const
|
42172
|
-
const s = new
|
42171
|
+
const Server = require_server();
|
42172
|
+
const s = new Server();
|
42173
42173
|
if (handler) {
|
42174
42174
|
s.on("connection", handler);
|
42175
42175
|
}
|
@@ -60088,8 +60088,7 @@ var init_studio = __esm({
|
|
60088
60088
|
// src/cli/index.ts
|
60089
60089
|
var cli_exports = {};
|
60090
60090
|
__export(cli_exports, {
|
60091
|
-
checkSchema: () => checkSchema
|
60092
|
-
defineConfig: () => defineConfig
|
60091
|
+
checkSchema: () => checkSchema
|
60093
60092
|
});
|
60094
60093
|
module.exports = __toCommonJS(cli_exports);
|
60095
60094
|
var import_commander = require("commander");
|
@@ -60142,12 +60141,12 @@ init_source();
|
|
60142
60141
|
// package.json
|
60143
60142
|
var package_default = {
|
60144
60143
|
name: "drizzle-kit",
|
60145
|
-
version: "0.20.
|
60144
|
+
version: "0.20.1",
|
60146
60145
|
repository: "https://github.com/drizzle-team/drizzle-kit-mirror",
|
60147
60146
|
author: "Drizzle Team",
|
60148
60147
|
license: "MIT",
|
60149
60148
|
bin: {
|
60150
|
-
"drizzle-kit": "./
|
60149
|
+
"drizzle-kit": "./bin.cjs"
|
60151
60150
|
},
|
60152
60151
|
scripts: {
|
60153
60152
|
"test:pg:push": "drizzle-kit push:pg",
|
@@ -60177,7 +60176,7 @@ var package_default = {
|
|
60177
60176
|
sim: "node -r esbuild-register ./dev/simulate.ts",
|
60178
60177
|
"sim:sqlite": "node -r esbuild-register ./dev/sqlite/index.ts",
|
60179
60178
|
test: "ava test --timeout=60s",
|
60180
|
-
build: "rm -rf ./dist &&
|
60179
|
+
build: "rm -rf ./dist && tsc -p tsconfig.cli-types.json && cp dist/index.d.ts dist/index.d.mts && tsx build.ts",
|
60181
60180
|
"build:dev": "rm -rf ./dist && tsx build.dev.ts && tsc -p tsconfig.cli-types.json && chmod +x ./dist/index.cjs",
|
60182
60181
|
packit: "pnpm build && cp package.json dist/ && cd dist && pnpm pack",
|
60183
60182
|
tsc: "tsc -p tsconfig.build.json",
|
@@ -60227,6 +60226,7 @@ var package_default = {
|
|
60227
60226
|
dockerode: "^3.3.4",
|
60228
60227
|
dotenv: "^16.0.3",
|
60229
60228
|
"drizzle-orm": "0.29.0-d3b1c58",
|
60229
|
+
"esbuild-node-externals": "^1.9.0",
|
60230
60230
|
eslint: "^8.29.0",
|
60231
60231
|
"eslint-config-prettier": "^8.5.0",
|
60232
60232
|
"eslint-plugin-prettier": "^4.2.1",
|
@@ -60239,6 +60239,20 @@ var package_default = {
|
|
60239
60239
|
typescript: "^4.9.4",
|
60240
60240
|
uvu: "^0.5.6",
|
60241
60241
|
zx: "^7.2.2"
|
60242
|
+
},
|
60243
|
+
exports: {
|
60244
|
+
".": {
|
60245
|
+
import: {
|
60246
|
+
types: "./index.d.mts",
|
60247
|
+
default: "./index.mjs"
|
60248
|
+
},
|
60249
|
+
require: {
|
60250
|
+
types: "./index.d.ts",
|
60251
|
+
default: "./index.js"
|
60252
|
+
},
|
60253
|
+
types: "./index.d.mts",
|
60254
|
+
default: "./index.mjs"
|
60255
|
+
}
|
60242
60256
|
}
|
60243
60257
|
};
|
60244
60258
|
|
@@ -61653,14 +61667,10 @@ var main = async () => {
|
|
61653
61667
|
import_commander.program.addCommand(studioCommand);
|
61654
61668
|
import_commander.program.parse();
|
61655
61669
|
};
|
61656
|
-
function defineConfig(config) {
|
61657
|
-
return config;
|
61658
|
-
}
|
61659
61670
|
main();
|
61660
61671
|
// Annotate the CommonJS export names for ESM import in node:
|
61661
61672
|
0 && (module.exports = {
|
61662
|
-
checkSchema
|
61663
|
-
defineConfig
|
61673
|
+
checkSchema
|
61664
61674
|
});
|
61665
61675
|
/*! Bundled license information:
|
61666
61676
|
|
package/index.d.mts
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
export type DbConnection = {
|
2
|
+
driver: "turso";
|
3
|
+
dbCredentials: {
|
4
|
+
url: string;
|
5
|
+
authToken?: string;
|
6
|
+
};
|
7
|
+
} | {
|
8
|
+
driver: "better-sqlite";
|
9
|
+
dbCredentials: {
|
10
|
+
url: string;
|
11
|
+
};
|
12
|
+
} | {
|
13
|
+
driver: "libsql";
|
14
|
+
dbCredentials: {
|
15
|
+
url: string;
|
16
|
+
};
|
17
|
+
} | {
|
18
|
+
driver: "d1";
|
19
|
+
dbCredentials: {
|
20
|
+
wranglerConfigPath: string;
|
21
|
+
dbName: string;
|
22
|
+
};
|
23
|
+
} | {
|
24
|
+
driver: "pg";
|
25
|
+
dbCredentials: {
|
26
|
+
host: string;
|
27
|
+
port?: number;
|
28
|
+
user?: string;
|
29
|
+
password?: string;
|
30
|
+
database: string;
|
31
|
+
ssl?: boolean;
|
32
|
+
} | {
|
33
|
+
connectionString: string;
|
34
|
+
};
|
35
|
+
} | {
|
36
|
+
driver: "mysql2";
|
37
|
+
dbCredentials: {
|
38
|
+
host: string;
|
39
|
+
port?: number;
|
40
|
+
user?: string;
|
41
|
+
password?: string;
|
42
|
+
database: string;
|
43
|
+
} | {
|
44
|
+
uri: string;
|
45
|
+
};
|
46
|
+
};
|
47
|
+
export type Config = {
|
48
|
+
out?: string | undefined;
|
49
|
+
breakpoints?: boolean | undefined;
|
50
|
+
tablesFilter?: string | string[] | undefined;
|
51
|
+
schemaFilter?: string | string[] | undefined;
|
52
|
+
schema?: string | string[];
|
53
|
+
verbose?: boolean | undefined;
|
54
|
+
strict?: boolean | undefined;
|
55
|
+
} & {
|
56
|
+
introspect?: {
|
57
|
+
casing: "camel" | "preserve";
|
58
|
+
};
|
59
|
+
} & ({
|
60
|
+
driver: "turso";
|
61
|
+
dbCredentials: {
|
62
|
+
url: string;
|
63
|
+
authToken?: string;
|
64
|
+
};
|
65
|
+
} | {
|
66
|
+
driver: "better-sqlite";
|
67
|
+
dbCredentials: {
|
68
|
+
url: string;
|
69
|
+
};
|
70
|
+
} | {
|
71
|
+
driver: "libsql";
|
72
|
+
dbCredentials: {
|
73
|
+
url: string;
|
74
|
+
};
|
75
|
+
} | {
|
76
|
+
driver: "pg";
|
77
|
+
dbCredentials: {
|
78
|
+
host: string;
|
79
|
+
port?: number;
|
80
|
+
user?: string;
|
81
|
+
password?: string;
|
82
|
+
database: string;
|
83
|
+
ssl?: boolean;
|
84
|
+
} | {
|
85
|
+
connectionString: string;
|
86
|
+
};
|
87
|
+
} | {
|
88
|
+
driver: "mysql2";
|
89
|
+
dbCredentials: {
|
90
|
+
host: string;
|
91
|
+
port?: number;
|
92
|
+
user?: string;
|
93
|
+
password?: string;
|
94
|
+
database: string;
|
95
|
+
} | {
|
96
|
+
uri: string;
|
97
|
+
};
|
98
|
+
} | {
|
99
|
+
driver: "d1";
|
100
|
+
dbCredentials: {
|
101
|
+
wranglerConfigPath: string;
|
102
|
+
dbName: string;
|
103
|
+
};
|
104
|
+
} | {});
|
105
|
+
export declare function defineConfig(config: Config): Config;
|
package/index.js
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name in all)
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
8
|
+
};
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
11
|
+
for (let key of __getOwnPropNames(from))
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
14
|
+
}
|
15
|
+
return to;
|
16
|
+
};
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
+
|
19
|
+
// src/index.ts
|
20
|
+
var src_exports = {};
|
21
|
+
__export(src_exports, {
|
22
|
+
defineConfig: () => defineConfig
|
23
|
+
});
|
24
|
+
module.exports = __toCommonJS(src_exports);
|
25
|
+
function defineConfig(config) {
|
26
|
+
return config;
|
27
|
+
}
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
29
|
+
0 && (module.exports = {
|
30
|
+
defineConfig
|
31
|
+
});
|
package/index.mjs
ADDED
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.20.
|
3
|
+
"version": "0.20.1-56e7be6",
|
4
4
|
"repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
|
5
5
|
"author": "Drizzle Team",
|
6
6
|
"license": "MIT",
|
7
7
|
"bin": {
|
8
|
-
"drizzle-kit": "./
|
8
|
+
"drizzle-kit": "./bin.cjs"
|
9
9
|
},
|
10
10
|
"scripts": {
|
11
11
|
"test:pg:push": "drizzle-kit push:pg",
|
@@ -35,7 +35,7 @@
|
|
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 &&
|
38
|
+
"build": "rm -rf ./dist && tsc -p tsconfig.cli-types.json && cp dist/index.d.ts dist/index.d.mts && tsx build.ts",
|
39
39
|
"build:dev": "rm -rf ./dist && tsx build.dev.ts && tsc -p tsconfig.cli-types.json && chmod +x ./dist/index.cjs",
|
40
40
|
"packit": "pnpm build && cp package.json dist/ && cd dist && pnpm pack",
|
41
41
|
"tsc": "tsc -p tsconfig.build.json",
|
@@ -85,6 +85,7 @@
|
|
85
85
|
"dockerode": "^3.3.4",
|
86
86
|
"dotenv": "^16.0.3",
|
87
87
|
"drizzle-orm": "0.29.0-d3b1c58",
|
88
|
+
"esbuild-node-externals": "^1.9.0",
|
88
89
|
"eslint": "^8.29.0",
|
89
90
|
"eslint-config-prettier": "^8.5.0",
|
90
91
|
"eslint-plugin-prettier": "^4.2.1",
|
@@ -97,5 +98,19 @@
|
|
97
98
|
"typescript": "^4.9.4",
|
98
99
|
"uvu": "^0.5.6",
|
99
100
|
"zx": "^7.2.2"
|
101
|
+
},
|
102
|
+
"exports": {
|
103
|
+
".": {
|
104
|
+
"import": {
|
105
|
+
"types": "./index.d.mts",
|
106
|
+
"default": "./index.mjs"
|
107
|
+
},
|
108
|
+
"require": {
|
109
|
+
"types": "./index.d.ts",
|
110
|
+
"default": "./index.js"
|
111
|
+
},
|
112
|
+
"types": "./index.d.mts",
|
113
|
+
"default": "./index.mjs"
|
114
|
+
}
|
100
115
|
}
|
101
116
|
}
|
package/utils.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { Dialect } from "./schemaValidator";
|
|
2
2
|
import { NamedWithSchema } from "./cli/commands/migrate";
|
3
3
|
import { PgDatabase } from "drizzle-orm/pg-core";
|
4
4
|
import { PgSchema as PgSchemaKit } from "./serializer/pgSchema";
|
5
|
-
import {
|
5
|
+
import { DbConnection } from ".";
|
6
6
|
export declare const assertV1OutFolder: (out: string, dialect: Dialect | "{dialect}") => void;
|
7
7
|
export type Journal = {
|
8
8
|
version: string;
|
@@ -17,7 +17,6 @@ export type Journal = {
|
|
17
17
|
};
|
18
18
|
export declare const dryJournal: (dialect: Dialect) => Journal;
|
19
19
|
export declare const snapshotsPriorV4: (out: string) => string[];
|
20
|
-
export declare function defineConfig(config: Config): Config;
|
21
20
|
export declare const prepareOutFolder: (out: string, dialect: Dialect) => {
|
22
21
|
meta: string;
|
23
22
|
snapshots: string[];
|
package/utils.js
CHANGED
@@ -56894,7 +56894,6 @@ var utils_exports = {};
|
|
56894
56894
|
__export(utils_exports, {
|
56895
56895
|
assertV1OutFolder: () => assertV1OutFolder,
|
56896
56896
|
columnRenameKey: () => columnRenameKey,
|
56897
|
-
defineConfig: () => defineConfig,
|
56898
56897
|
dryJournal: () => dryJournal,
|
56899
56898
|
generateDrizzleJson: () => generateDrizzleJson,
|
56900
56899
|
generateMigration: () => generateMigration,
|
@@ -56912,9 +56911,6 @@ __export(utils_exports, {
|
|
56912
56911
|
validateWithReport: () => validateWithReport
|
56913
56912
|
});
|
56914
56913
|
module.exports = __toCommonJS(utils_exports);
|
56915
|
-
function defineConfig(config) {
|
56916
|
-
return config;
|
56917
|
-
}
|
56918
56914
|
var import_fs4, import_path3, import_crypto2, assertV1OutFolder, dryJournal, snapshotsPriorV4, prepareOutFolder2, mapValues, validatorForDialect, validateWithReport, prepareMigrationFolder, prepareMigrationMeta, schemaRenameKey, tableRenameKey, columnRenameKey, kloudMeta, statementsForDiffs, generateDrizzleJson, generateMigration, pushSchema, prepareFrom;
|
56919
56915
|
var init_utils5 = __esm({
|
56920
56916
|
"src/utils.ts"() {
|
@@ -57299,7 +57295,6 @@ init_utils5();
|
|
57299
57295
|
0 && (module.exports = {
|
57300
57296
|
assertV1OutFolder,
|
57301
57297
|
columnRenameKey,
|
57302
|
-
defineConfig,
|
57303
57298
|
dryJournal,
|
57304
57299
|
generateDrizzleJson,
|
57305
57300
|
generateMigration,
|