drizzle-kit 0.27.2 → 0.28.0-842fab3

Sign up to get free protection for your applications and to get access to all the features.
package/index.d.mts CHANGED
@@ -1,287 +1,2 @@
1
- import { ConnectionOptions } from 'tls';
2
- import { P as Prefix, D as Driver } from './common-DYjgLS6u.mjs';
3
-
4
- declare const dialects: readonly ["postgresql", "mysql", "sqlite", "turso"];
5
- type Dialect = (typeof dialects)[number];
6
-
7
- type SslOptions = {
8
- pfx?: string;
9
- key?: string;
10
- passphrase?: string;
11
- cert?: string;
12
- ca?: string | string[];
13
- crl?: string | string[];
14
- ciphers?: string;
15
- rejectUnauthorized?: boolean;
16
- };
17
- type Verify<T, U extends T> = U;
18
- /**
19
- * **You are currently using version 0.21.0+ of drizzle-kit. If you have just upgraded to this version, please make sure to read the changelog to understand what changes have been made and what
20
- * adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**
21
- *
22
- * **Config** usage:
23
- *
24
- * `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
25
- * *Possible values*: `postgresql`, `mysql`, `sqlite`
26
- *
27
- * See https://orm.drizzle.team/kit-docs/config-reference#dialect
28
- *
29
- * ---
30
- * `schema` - param lets you define where your schema file/files live.
31
- * You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.
32
- *
33
- * See https://orm.drizzle.team/kit-docs/config-reference#schema
34
- *
35
- * ---
36
- * `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations
37
- *
38
- * See https://orm.drizzle.team/kit-docs/config-reference#out
39
- *
40
- * ---
41
- * `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
42
- * *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
43
- * 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
44
- *
45
- * See https://orm.drizzle.team/kit-docs/config-reference#driver
46
- *
47
- * ---
48
- *
49
- * `dbCredentials` - an object to define your connection to the database. For more info please check the docs
50
- *
51
- * See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials
52
- *
53
- * ---
54
- *
55
- * `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.
56
- * By default, all information about executed migrations will be stored in the database inside
57
- * the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.
58
- * However, you can configure where to store those records.
59
- *
60
- * See https://orm.drizzle.team/kit-docs/config-reference#migrations
61
- *
62
- * ---
63
- *
64
- * `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
65
- * It’s optional and true by default, it’s necessary to properly apply migrations on databases,
66
- * that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite) and
67
- * Drizzle ORM has to apply them sequentially one by one.
68
- *
69
- * See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
70
- *
71
- * ---
72
- *
73
- * `tablesFilters` - param lets you filter tables with glob syntax for db push command.
74
- * It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.
75
- *
76
- * How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema
77
- *
78
- * See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters
79
- *
80
- * ---
81
- *
82
- * `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.
83
- * This parameter accepts a single schema as a string or an array of schemas as strings.
84
- * No glob pattern is supported here. By default, drizzle will use the public schema for both commands,
85
- * but you can add any schema you need.
86
- *
87
- * For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and
88
- * drizzle schema that are a part of the my_schema schema.
89
- *
90
- * See https://orm.drizzle.team/kit-docs/config-reference#schemafilter
91
- *
92
- * ---
93
- *
94
- * `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.
95
- *
96
- * > Note: This command will only print the statements that should be executed.
97
- * To approve them before applying, please refer to the `strict` command.
98
- *
99
- * See https://orm.drizzle.team/kit-docs/config-reference#verbose
100
- *
101
- * ---
102
- *
103
- * `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,
104
- * either to execute all statements needed to sync your schema with the database or not.
105
- *
106
- * See https://orm.drizzle.team/kit-docs/config-reference#strict
107
- */
108
- type Config = {
109
- dialect: Dialect;
110
- out?: string;
111
- breakpoints?: boolean;
112
- tablesFilter?: string | string[];
113
- extensionsFilters?: 'postgis'[];
114
- schemaFilter?: string | string[];
115
- schema?: string | string[];
116
- verbose?: boolean;
117
- strict?: boolean;
118
- casing?: 'camelCase' | 'snake_case';
119
- migrations?: {
120
- table?: string;
121
- schema?: string;
122
- prefix?: Prefix;
123
- };
124
- introspect?: {
125
- casing: 'camel' | 'preserve';
126
- };
127
- entities?: {
128
- roles?: boolean | {
129
- provider?: 'supabase' | 'neon' | string & {};
130
- exclude?: string[];
131
- include?: string[];
132
- };
133
- };
134
- } & ({
135
- dialect: Verify<Dialect, 'turso'>;
136
- dbCredentials: {
137
- url: string;
138
- authToken?: string;
139
- };
140
- } | {
141
- dialect: Verify<Dialect, 'sqlite'>;
142
- dbCredentials: {
143
- url: string;
144
- };
145
- } | {
146
- dialect: Verify<Dialect, 'postgresql'>;
147
- dbCredentials: ({
148
- host: string;
149
- port?: number;
150
- user?: string;
151
- password?: string;
152
- database: string;
153
- ssl?: boolean | 'require' | 'allow' | 'prefer' | 'verify-full' | ConnectionOptions;
154
- } & {}) | {
155
- url: string;
156
- };
157
- } | {
158
- dialect: Verify<Dialect, 'postgresql'>;
159
- driver: Verify<Driver, 'aws-data-api'>;
160
- dbCredentials: {
161
- database: string;
162
- secretArn: string;
163
- resourceArn: string;
164
- };
165
- } | {
166
- dialect: Verify<Dialect, 'postgresql'>;
167
- driver: Verify<Driver, 'pglite'>;
168
- dbCredentials: {
169
- url: string;
170
- };
171
- } | {
172
- dialect: Verify<Dialect, 'mysql'>;
173
- dbCredentials: {
174
- host: string;
175
- port?: number;
176
- user?: string;
177
- password?: string;
178
- database: string;
179
- ssl?: string | SslOptions;
180
- } | {
181
- url: string;
182
- };
183
- } | {
184
- dialect: Verify<Dialect, 'sqlite'>;
185
- driver: Verify<Driver, 'd1-http'>;
186
- dbCredentials: {
187
- accountId: string;
188
- databaseId: string;
189
- token: string;
190
- };
191
- } | {
192
- dialect: Verify<Dialect, 'sqlite'>;
193
- driver: Verify<Driver, 'expo'>;
194
- } | {});
195
- /**
196
- * **You are currently using version 0.21.0+ of drizzle-kit. If you have just upgraded to this version, please make sure to read the changelog to understand what changes have been made and what
197
- * adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**
198
- *
199
- * **Config** usage:
200
- *
201
- * `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
202
- * *Possible values*: `postgresql`, `mysql`, `sqlite`
203
- *
204
- * See https://orm.drizzle.team/kit-docs/config-reference#dialect
205
- *
206
- * ---
207
- * `schema` - param lets you define where your schema file/files live.
208
- * You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.
209
- *
210
- * See https://orm.drizzle.team/kit-docs/config-reference#schema
211
- *
212
- * ---
213
- * `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations
214
- *
215
- * See https://orm.drizzle.team/kit-docs/config-reference#out
216
- *
217
- * ---
218
- * `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
219
- * *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
220
- * 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
221
- *
222
- * See https://orm.drizzle.team/kit-docs/config-reference#driver
223
- *
224
- * ---
225
- *
226
- * `dbCredentials` - an object to define your connection to the database. For more info please check the docs
227
- *
228
- * See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials
229
- *
230
- * ---
231
- *
232
- * `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.
233
- * By default, all information about executed migrations will be stored in the database inside
234
- * the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.
235
- * However, you can configure where to store those records.
236
- *
237
- * See https://orm.drizzle.team/kit-docs/config-reference#migrations
238
- *
239
- * ---
240
- *
241
- * `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
242
- * It’s optional and true by default, it’s necessary to properly apply migrations on databases,
243
- * that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite) and
244
- * Drizzle ORM has to apply them sequentially one by one.
245
- *
246
- * See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
247
- *
248
- * ---
249
- *
250
- * `tablesFilters` - param lets you filter tables with glob syntax for db push command.
251
- * It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.
252
- *
253
- * How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema
254
- *
255
- * See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters
256
- *
257
- * ---
258
- *
259
- * `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.
260
- * This parameter accepts a single schema as a string or an array of schemas as strings.
261
- * No glob pattern is supported here. By default, drizzle will use the public schema for both commands,
262
- * but you can add any schema you need.
263
- *
264
- * For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and
265
- * drizzle schema that are a part of the my_schema schema.
266
- *
267
- * See https://orm.drizzle.team/kit-docs/config-reference#schemafilter
268
- *
269
- * ---
270
- *
271
- * `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.
272
- *
273
- * > Note: This command will only print the statements that should be executed.
274
- * To approve them before applying, please refer to the `strict` command.
275
- *
276
- * See https://orm.drizzle.team/kit-docs/config-reference#verbose
277
- *
278
- * ---
279
- *
280
- * `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,
281
- * either to execute all statements needed to sync your schema with the database or not.
282
- *
283
- * See https://orm.drizzle.team/kit-docs/config-reference#strict
284
- */
285
- declare function defineConfig(config: Config): Config;
286
-
287
- export { type Config, defineConfig };
1
+ import 'tls';
2
+ export { a as Config, d as defineConfig } from './index-BfiZoTqG.mjs';
package/index.d.ts CHANGED
@@ -1,287 +1,2 @@
1
- import { ConnectionOptions } from 'tls';
2
- import { P as Prefix, D as Driver } from './common-DYjgLS6u.js';
3
-
4
- declare const dialects: readonly ["postgresql", "mysql", "sqlite", "turso"];
5
- type Dialect = (typeof dialects)[number];
6
-
7
- type SslOptions = {
8
- pfx?: string;
9
- key?: string;
10
- passphrase?: string;
11
- cert?: string;
12
- ca?: string | string[];
13
- crl?: string | string[];
14
- ciphers?: string;
15
- rejectUnauthorized?: boolean;
16
- };
17
- type Verify<T, U extends T> = U;
18
- /**
19
- * **You are currently using version 0.21.0+ of drizzle-kit. If you have just upgraded to this version, please make sure to read the changelog to understand what changes have been made and what
20
- * adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**
21
- *
22
- * **Config** usage:
23
- *
24
- * `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
25
- * *Possible values*: `postgresql`, `mysql`, `sqlite`
26
- *
27
- * See https://orm.drizzle.team/kit-docs/config-reference#dialect
28
- *
29
- * ---
30
- * `schema` - param lets you define where your schema file/files live.
31
- * You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.
32
- *
33
- * See https://orm.drizzle.team/kit-docs/config-reference#schema
34
- *
35
- * ---
36
- * `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations
37
- *
38
- * See https://orm.drizzle.team/kit-docs/config-reference#out
39
- *
40
- * ---
41
- * `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
42
- * *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
43
- * 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
44
- *
45
- * See https://orm.drizzle.team/kit-docs/config-reference#driver
46
- *
47
- * ---
48
- *
49
- * `dbCredentials` - an object to define your connection to the database. For more info please check the docs
50
- *
51
- * See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials
52
- *
53
- * ---
54
- *
55
- * `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.
56
- * By default, all information about executed migrations will be stored in the database inside
57
- * the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.
58
- * However, you can configure where to store those records.
59
- *
60
- * See https://orm.drizzle.team/kit-docs/config-reference#migrations
61
- *
62
- * ---
63
- *
64
- * `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
65
- * It’s optional and true by default, it’s necessary to properly apply migrations on databases,
66
- * that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite) and
67
- * Drizzle ORM has to apply them sequentially one by one.
68
- *
69
- * See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
70
- *
71
- * ---
72
- *
73
- * `tablesFilters` - param lets you filter tables with glob syntax for db push command.
74
- * It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.
75
- *
76
- * How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema
77
- *
78
- * See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters
79
- *
80
- * ---
81
- *
82
- * `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.
83
- * This parameter accepts a single schema as a string or an array of schemas as strings.
84
- * No glob pattern is supported here. By default, drizzle will use the public schema for both commands,
85
- * but you can add any schema you need.
86
- *
87
- * For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and
88
- * drizzle schema that are a part of the my_schema schema.
89
- *
90
- * See https://orm.drizzle.team/kit-docs/config-reference#schemafilter
91
- *
92
- * ---
93
- *
94
- * `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.
95
- *
96
- * > Note: This command will only print the statements that should be executed.
97
- * To approve them before applying, please refer to the `strict` command.
98
- *
99
- * See https://orm.drizzle.team/kit-docs/config-reference#verbose
100
- *
101
- * ---
102
- *
103
- * `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,
104
- * either to execute all statements needed to sync your schema with the database or not.
105
- *
106
- * See https://orm.drizzle.team/kit-docs/config-reference#strict
107
- */
108
- type Config = {
109
- dialect: Dialect;
110
- out?: string;
111
- breakpoints?: boolean;
112
- tablesFilter?: string | string[];
113
- extensionsFilters?: 'postgis'[];
114
- schemaFilter?: string | string[];
115
- schema?: string | string[];
116
- verbose?: boolean;
117
- strict?: boolean;
118
- casing?: 'camelCase' | 'snake_case';
119
- migrations?: {
120
- table?: string;
121
- schema?: string;
122
- prefix?: Prefix;
123
- };
124
- introspect?: {
125
- casing: 'camel' | 'preserve';
126
- };
127
- entities?: {
128
- roles?: boolean | {
129
- provider?: 'supabase' | 'neon' | string & {};
130
- exclude?: string[];
131
- include?: string[];
132
- };
133
- };
134
- } & ({
135
- dialect: Verify<Dialect, 'turso'>;
136
- dbCredentials: {
137
- url: string;
138
- authToken?: string;
139
- };
140
- } | {
141
- dialect: Verify<Dialect, 'sqlite'>;
142
- dbCredentials: {
143
- url: string;
144
- };
145
- } | {
146
- dialect: Verify<Dialect, 'postgresql'>;
147
- dbCredentials: ({
148
- host: string;
149
- port?: number;
150
- user?: string;
151
- password?: string;
152
- database: string;
153
- ssl?: boolean | 'require' | 'allow' | 'prefer' | 'verify-full' | ConnectionOptions;
154
- } & {}) | {
155
- url: string;
156
- };
157
- } | {
158
- dialect: Verify<Dialect, 'postgresql'>;
159
- driver: Verify<Driver, 'aws-data-api'>;
160
- dbCredentials: {
161
- database: string;
162
- secretArn: string;
163
- resourceArn: string;
164
- };
165
- } | {
166
- dialect: Verify<Dialect, 'postgresql'>;
167
- driver: Verify<Driver, 'pglite'>;
168
- dbCredentials: {
169
- url: string;
170
- };
171
- } | {
172
- dialect: Verify<Dialect, 'mysql'>;
173
- dbCredentials: {
174
- host: string;
175
- port?: number;
176
- user?: string;
177
- password?: string;
178
- database: string;
179
- ssl?: string | SslOptions;
180
- } | {
181
- url: string;
182
- };
183
- } | {
184
- dialect: Verify<Dialect, 'sqlite'>;
185
- driver: Verify<Driver, 'd1-http'>;
186
- dbCredentials: {
187
- accountId: string;
188
- databaseId: string;
189
- token: string;
190
- };
191
- } | {
192
- dialect: Verify<Dialect, 'sqlite'>;
193
- driver: Verify<Driver, 'expo'>;
194
- } | {});
195
- /**
196
- * **You are currently using version 0.21.0+ of drizzle-kit. If you have just upgraded to this version, please make sure to read the changelog to understand what changes have been made and what
197
- * adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**
198
- *
199
- * **Config** usage:
200
- *
201
- * `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
202
- * *Possible values*: `postgresql`, `mysql`, `sqlite`
203
- *
204
- * See https://orm.drizzle.team/kit-docs/config-reference#dialect
205
- *
206
- * ---
207
- * `schema` - param lets you define where your schema file/files live.
208
- * You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.
209
- *
210
- * See https://orm.drizzle.team/kit-docs/config-reference#schema
211
- *
212
- * ---
213
- * `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations
214
- *
215
- * See https://orm.drizzle.team/kit-docs/config-reference#out
216
- *
217
- * ---
218
- * `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
219
- * *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
220
- * 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
221
- *
222
- * See https://orm.drizzle.team/kit-docs/config-reference#driver
223
- *
224
- * ---
225
- *
226
- * `dbCredentials` - an object to define your connection to the database. For more info please check the docs
227
- *
228
- * See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials
229
- *
230
- * ---
231
- *
232
- * `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.
233
- * By default, all information about executed migrations will be stored in the database inside
234
- * the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.
235
- * However, you can configure where to store those records.
236
- *
237
- * See https://orm.drizzle.team/kit-docs/config-reference#migrations
238
- *
239
- * ---
240
- *
241
- * `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
242
- * It’s optional and true by default, it’s necessary to properly apply migrations on databases,
243
- * that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite) and
244
- * Drizzle ORM has to apply them sequentially one by one.
245
- *
246
- * See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
247
- *
248
- * ---
249
- *
250
- * `tablesFilters` - param lets you filter tables with glob syntax for db push command.
251
- * It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.
252
- *
253
- * How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema
254
- *
255
- * See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters
256
- *
257
- * ---
258
- *
259
- * `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.
260
- * This parameter accepts a single schema as a string or an array of schemas as strings.
261
- * No glob pattern is supported here. By default, drizzle will use the public schema for both commands,
262
- * but you can add any schema you need.
263
- *
264
- * For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and
265
- * drizzle schema that are a part of the my_schema schema.
266
- *
267
- * See https://orm.drizzle.team/kit-docs/config-reference#schemafilter
268
- *
269
- * ---
270
- *
271
- * `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.
272
- *
273
- * > Note: This command will only print the statements that should be executed.
274
- * To approve them before applying, please refer to the `strict` command.
275
- *
276
- * See https://orm.drizzle.team/kit-docs/config-reference#verbose
277
- *
278
- * ---
279
- *
280
- * `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,
281
- * either to execute all statements needed to sync your schema with the database or not.
282
- *
283
- * See https://orm.drizzle.team/kit-docs/config-reference#strict
284
- */
285
- declare function defineConfig(config: Config): Config;
286
-
287
- export { type Config, defineConfig };
1
+ import 'tls';
2
+ export { a as Config, d as defineConfig } from './index-BfiZoTqG.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.27.2",
3
+ "version": "0.28.0-842fab3",
4
4
  "homepage": "https://orm.drizzle.team",
5
5
  "keywords": [
6
6
  "drizzle",
@@ -62,6 +62,7 @@
62
62
  "@types/dockerode": "^3.3.28",
63
63
  "@types/glob": "^8.1.0",
64
64
  "@types/json-diff": "^1.0.3",
65
+ "@types/micromatch": "^4.0.9",
65
66
  "@types/minimatch": "^5.1.2",
66
67
  "@types/node": "^18.11.15",
67
68
  "@types/pg": "^8.10.7",
@@ -92,9 +93,11 @@
92
93
  "hanji": "^0.0.5",
93
94
  "hono": "^4.1.5",
94
95
  "json-diff": "1.0.6",
96
+ "micromatch": "^4.0.8",
95
97
  "minimatch": "^7.4.3",
96
98
  "mysql2": "3.3.3",
97
99
  "node-fetch": "^3.3.2",
100
+ "ohm-js": "^17.1.0",
98
101
  "pg": "^8.11.5",
99
102
  "pluralize": "^8.0.0",
100
103
  "postgres": "^3.4.4",
package/utils.js CHANGED
@@ -568,6 +568,7 @@ __export(utils_exports, {
568
568
  columnRenameKey: () => columnRenameKey,
569
569
  copy: () => copy,
570
570
  dryJournal: () => dryJournal,
571
+ escapeSingleQuotes: () => escapeSingleQuotes,
571
572
  findAddedAndRemoved: () => findAddedAndRemoved,
572
573
  isPgArrayType: () => isPgArrayType,
573
574
  kloudMeta: () => kloudMeta,
@@ -579,6 +580,7 @@ __export(utils_exports, {
579
580
  prepareOutFolder: () => prepareOutFolder,
580
581
  schemaRenameKey: () => schemaRenameKey,
581
582
  tableRenameKey: () => tableRenameKey,
583
+ unescapeSingleQuotes: () => unescapeSingleQuotes,
582
584
  validateWithReport: () => validateWithReport
583
585
  });
584
586
  module.exports = __toCommonJS(utils_exports);
@@ -5877,12 +5879,20 @@ function findAddedAndRemoved(columnNames1, columnNames2) {
5877
5879
  const removedColumns = columnNames1.filter((it) => !set2.has(it));
5878
5880
  return { addedColumns, removedColumns };
5879
5881
  }
5882
+ function escapeSingleQuotes(str) {
5883
+ return str.replace(/'/g, "''");
5884
+ }
5885
+ function unescapeSingleQuotes(str, ignoreFirstAndLastChar) {
5886
+ const regex = ignoreFirstAndLastChar ? /(?<!^)'(?!$)/g : /'/g;
5887
+ return str.replace(/''/g, "'").replace(regex, "\\'");
5888
+ }
5880
5889
  // Annotate the CommonJS export names for ESM import in node:
5881
5890
  0 && (module.exports = {
5882
5891
  assertV1OutFolder,
5883
5892
  columnRenameKey,
5884
5893
  copy,
5885
5894
  dryJournal,
5895
+ escapeSingleQuotes,
5886
5896
  findAddedAndRemoved,
5887
5897
  isPgArrayType,
5888
5898
  kloudMeta,
@@ -5894,5 +5904,6 @@ function findAddedAndRemoved(columnNames1, columnNames2) {
5894
5904
  prepareOutFolder,
5895
5905
  schemaRenameKey,
5896
5906
  tableRenameKey,
5907
+ unescapeSingleQuotes,
5897
5908
  validateWithReport
5898
5909
  });
package/utils.mjs CHANGED
@@ -5856,11 +5856,19 @@ function findAddedAndRemoved(columnNames1, columnNames2) {
5856
5856
  const removedColumns = columnNames1.filter((it) => !set2.has(it));
5857
5857
  return { addedColumns, removedColumns };
5858
5858
  }
5859
+ function escapeSingleQuotes(str) {
5860
+ return str.replace(/'/g, "''");
5861
+ }
5862
+ function unescapeSingleQuotes(str, ignoreFirstAndLastChar) {
5863
+ const regex = ignoreFirstAndLastChar ? /(?<!^)'(?!$)/g : /'/g;
5864
+ return str.replace(/''/g, "'").replace(regex, "\\'");
5865
+ }
5859
5866
  export {
5860
5867
  assertV1OutFolder,
5861
5868
  columnRenameKey,
5862
5869
  copy,
5863
5870
  dryJournal,
5871
+ escapeSingleQuotes,
5864
5872
  findAddedAndRemoved,
5865
5873
  isPgArrayType,
5866
5874
  kloudMeta,
@@ -5872,5 +5880,6 @@ export {
5872
5880
  prepareOutFolder,
5873
5881
  schemaRenameKey,
5874
5882
  tableRenameKey,
5883
+ unescapeSingleQuotes,
5875
5884
  validateWithReport
5876
5885
  };
@@ -1,8 +0,0 @@
1
- declare const prefixes: readonly ["index", "timestamp", "supabase", "unix", "none"];
2
- type Prefix = (typeof prefixes)[number];
3
- declare const casingTypes: readonly ["snake_case", "camelCase"];
4
- type CasingType = (typeof casingTypes)[number];
5
- declare const drivers: readonly ["d1-http", "expo", "aws-data-api", "pglite"];
6
- type Driver = (typeof drivers)[number];
7
-
8
- export type { CasingType as C, Driver as D, Prefix as P };