rake-db 2.27.16 → 2.27.18
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/dist/index.d.ts +6 -8
- package/dist/index.js +128 -147
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -21
- package/dist/index.mjs.map +1 -1
- package/dist/node-postgres.d.ts +1 -1
- package/dist/node-postgres.js +2 -2
- package/dist/node-postgres.js.map +1 -1
- package/dist/node-postgres.mjs +1 -1
- package/dist/node-postgres.mjs.map +1 -1
- package/dist/postgres-js.d.ts +1 -1
- package/dist/postgres-js.js +2 -2
- package/dist/postgres-js.js.map +1 -1
- package/dist/postgres-js.mjs +1 -1
- package/dist/postgres-js.mjs.map +1 -1
- package/package.json +2 -10
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { defaultSchemaConfig, makeColumnTypes, escapeForMigration, ArrayColumn, DomainColumn, EnumColumn, getColumnTypes, parseTableData, escapeString, tableDataMethods, ColumnType, parseTableDataInput, UnknownColumn, raw, logParamToLogObject, createDbWithAdapter, makeColumnsByType, RawSQL, CustomTypeColumn, assignDbDataToColumn, PostgisGeographyPointColumn, pushTableDataCode, primaryKeyInnerToCode, indexInnerToCode, excludeInnerToCode, constraintInnerToCode, referencesArgsToCode, TimestampTZColumn, TimestampColumn } from 'pqb';
|
|
2
|
-
import { getStackTrace, singleQuote, isRawSQL, toSnakeCase, toCamelCase, toArray, snakeCaseKey, emptyObject, setCurrentColumnName, consumeColumnName, ColumnTypeBase, setDefaultLanguage, deepCompare, getImportPath, pathToLog, emptyArray, codeToString, addCode, quoteObjectKey, backtickQuote } from 'orchid-core';
|
|
1
|
+
import { defaultSchemaConfig, makeColumnTypes, getStackTrace, singleQuote, isRawSQL, escapeForMigration, ArrayColumn, toSnakeCase, toCamelCase, DomainColumn, toArray, EnumColumn, snakeCaseKey, getColumnTypes, parseTableData, emptyObject, escapeString, tableDataMethods, setCurrentColumnName, consumeColumnName, ColumnType, ColumnTypeBase, parseTableDataInput, UnknownColumn, setDefaultLanguage, deepCompare, raw, logParamToLogObject, createDbWithAdapter, getImportPath, pathToLog, emptyArray, colors, makeColumnsByType, RawSQL, CustomTypeColumn, assignDbDataToColumn, PostgisGeographyPointColumn, exhaustive, codeToString, addCode, quoteObjectKey, pushTableDataCode, primaryKeyInnerToCode, indexInnerToCode, excludeInnerToCode, constraintInnerToCode, referencesArgsToCode, backtickQuote, TimestampTZColumn, TimestampColumn } from 'pqb';
|
|
3
2
|
import path, { join } from 'path';
|
|
4
3
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
5
4
|
import fs, { mkdir, writeFile, readdir, stat, readFile } from 'fs/promises';
|
|
6
|
-
import 'url';
|
|
7
|
-
import 'node:path';
|
|
8
5
|
|
|
9
6
|
class RakeDbError extends Error {
|
|
10
7
|
}
|
|
@@ -3320,18 +3317,6 @@ const changeMigratedVersion = async (adapter, up, file, config) => {
|
|
|
3320
3317
|
);
|
|
3321
3318
|
};
|
|
3322
3319
|
|
|
3323
|
-
const colors = {
|
|
3324
|
-
yellow: (s) => `\x1B[33m${s}\x1B[0m`,
|
|
3325
|
-
green: (s) => `\x1B[32m${s}\x1B[0m`,
|
|
3326
|
-
red: (s) => `\x1B[31m${s}\x1B[0m`,
|
|
3327
|
-
blue: (s) => `\x1B[34m${s}\x1B[0m`,
|
|
3328
|
-
bright: (s) => `\x1B[1m${s}\x1B[0m`,
|
|
3329
|
-
blueBold: (s) => `\x1B[1m\x1B[34m${s}\x1B[0m`,
|
|
3330
|
-
yellowBold: (s) => `\x1B[1m\x1B[33m${s}\x1B[0m`,
|
|
3331
|
-
greenBold: (s) => `\x1B[1m\x1B[32m${s}\x1B[0m`,
|
|
3332
|
-
pale: (s) => `\x1B[2m${s}\x1B[0m`
|
|
3333
|
-
};
|
|
3334
|
-
|
|
3335
3320
|
const ESC = "\x1B";
|
|
3336
3321
|
const CSI = `${ESC}[`;
|
|
3337
3322
|
const cursorShow = `${CSI}?25h`;
|
|
@@ -4620,10 +4605,6 @@ const checkIfIsOuterRecursiveFkey = (data, table, references) => {
|
|
|
4620
4605
|
return false;
|
|
4621
4606
|
};
|
|
4622
4607
|
|
|
4623
|
-
const exhaustive = (_) => {
|
|
4624
|
-
throw new Error("Condition was not exhaustive");
|
|
4625
|
-
};
|
|
4626
|
-
|
|
4627
4608
|
const astToGenerateItems = (config, asts, currentSchema) => {
|
|
4628
4609
|
return asts.map((ast) => astToGenerateItem(config, ast, currentSchema));
|
|
4629
4610
|
};
|
|
@@ -4778,7 +4759,7 @@ const astToGenerateItem = (config, ast, currentSchema) => {
|
|
|
4778
4759
|
break;
|
|
4779
4760
|
}
|
|
4780
4761
|
default:
|
|
4781
|
-
exhaustive();
|
|
4762
|
+
exhaustive(ast);
|
|
4782
4763
|
}
|
|
4783
4764
|
return {
|
|
4784
4765
|
ast,
|