drizzle-kit 0.18.0-9c3e0b3 → 0.18.0-a7a8954

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.
Files changed (2) hide show
  1. package/index.js +40 -54
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -590,7 +590,7 @@ var require_command = __commonJS({
590
590
  var EventEmitter = require("events").EventEmitter;
591
591
  var childProcess = require("child_process");
592
592
  var path3 = require("path");
593
- var fs7 = require("fs");
593
+ var fs6 = require("fs");
594
594
  var process3 = require("process");
595
595
  var { Argument: Argument2, humanReadableArgName } = require_argument();
596
596
  var { CommanderError: CommanderError2 } = require_error();
@@ -1021,11 +1021,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1021
1021
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1022
1022
  function findFile(baseDir, baseName) {
1023
1023
  const localBin = path3.resolve(baseDir, baseName);
1024
- if (fs7.existsSync(localBin))
1024
+ if (fs6.existsSync(localBin))
1025
1025
  return localBin;
1026
1026
  if (sourceExt.includes(path3.extname(baseName)))
1027
1027
  return void 0;
1028
- const foundExt = sourceExt.find((ext2) => fs7.existsSync(`${localBin}${ext2}`));
1028
+ const foundExt = sourceExt.find((ext2) => fs6.existsSync(`${localBin}${ext2}`));
1029
1029
  if (foundExt)
1030
1030
  return `${localBin}${foundExt}`;
1031
1031
  return void 0;
@@ -1037,7 +1037,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1037
1037
  if (this._scriptPath) {
1038
1038
  let resolvedScriptPath;
1039
1039
  try {
1040
- resolvedScriptPath = fs7.realpathSync(this._scriptPath);
1040
+ resolvedScriptPath = fs6.realpathSync(this._scriptPath);
1041
1041
  } catch (err2) {
1042
1042
  resolvedScriptPath = this._scriptPath;
1043
1043
  }
@@ -18243,31 +18243,31 @@ var require_node2 = __commonJS({
18243
18243
  var configAbsolutePath = walkForTsConfig(cwd);
18244
18244
  return configAbsolutePath ? path3.resolve(configAbsolutePath) : void 0;
18245
18245
  }
18246
- function walkForTsConfig(directory, existsSync5) {
18247
- if (existsSync5 === void 0) {
18248
- existsSync5 = fs32.existsSync;
18246
+ function walkForTsConfig(directory, existsSync4) {
18247
+ if (existsSync4 === void 0) {
18248
+ existsSync4 = fs32.existsSync;
18249
18249
  }
18250
18250
  var configPath = path3.join(directory, "./tsconfig.json");
18251
- if (existsSync5(configPath)) {
18251
+ if (existsSync4(configPath)) {
18252
18252
  return configPath;
18253
18253
  }
18254
18254
  var parentDirectory = path3.join(directory, "../");
18255
18255
  if (directory === parentDirectory) {
18256
18256
  return void 0;
18257
18257
  }
18258
- return walkForTsConfig(parentDirectory, existsSync5);
18258
+ return walkForTsConfig(parentDirectory, existsSync4);
18259
18259
  }
18260
18260
  exports2.walkForTsConfig = walkForTsConfig;
18261
- function loadTsconfig(configFilePath, existsSync5, readFileSync4) {
18262
- if (existsSync5 === void 0) {
18263
- existsSync5 = fs32.existsSync;
18261
+ function loadTsconfig(configFilePath, existsSync4, readFileSync4) {
18262
+ if (existsSync4 === void 0) {
18263
+ existsSync4 = fs32.existsSync;
18264
18264
  }
18265
18265
  if (readFileSync4 === void 0) {
18266
18266
  readFileSync4 = function(filename) {
18267
18267
  return fs32.readFileSync(filename, "utf8");
18268
18268
  };
18269
18269
  }
18270
- if (!existsSync5(configFilePath)) {
18270
+ if (!existsSync4(configFilePath)) {
18271
18271
  return void 0;
18272
18272
  }
18273
18273
  var configString = readFileSync4(configFilePath);
@@ -18280,10 +18280,10 @@ var require_node2 = __commonJS({
18280
18280
  }
18281
18281
  var currentDir = path3.dirname(configFilePath);
18282
18282
  var extendedConfigPath = path3.join(currentDir, extendedConfig);
18283
- if (extendedConfig.indexOf("/") !== -1 && extendedConfig.indexOf(".") !== -1 && !existsSync5(extendedConfigPath)) {
18283
+ if (extendedConfig.indexOf("/") !== -1 && extendedConfig.indexOf(".") !== -1 && !existsSync4(extendedConfigPath)) {
18284
18284
  extendedConfigPath = path3.join(currentDir, "node_modules", extendedConfig);
18285
18285
  }
18286
- var base = loadTsconfig(extendedConfigPath, existsSync5, readFileSync4) || {};
18286
+ var base = loadTsconfig(extendedConfigPath, existsSync4, readFileSync4) || {};
18287
18287
  if (base.compilerOptions && base.compilerOptions.baseUrl) {
18288
18288
  var extendsDir = path3.dirname(extendedConfig);
18289
18289
  base.compilerOptions.baseUrl = path3.join(extendsDir, base.compilerOptions.baseUrl);
@@ -18925,7 +18925,7 @@ var require_old = __commonJS({
18925
18925
  "node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports) {
18926
18926
  var pathModule = require("path");
18927
18927
  var isWindows = process.platform === "win32";
18928
- var fs7 = require("fs");
18928
+ var fs6 = require("fs");
18929
18929
  var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
18930
18930
  function rethrow() {
18931
18931
  var callback;
@@ -18990,7 +18990,7 @@ var require_old = __commonJS({
18990
18990
  base = m[0];
18991
18991
  previous = "";
18992
18992
  if (isWindows && !knownHard[base]) {
18993
- fs7.lstatSync(base);
18993
+ fs6.lstatSync(base);
18994
18994
  knownHard[base] = true;
18995
18995
  }
18996
18996
  }
@@ -19008,7 +19008,7 @@ var require_old = __commonJS({
19008
19008
  if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
19009
19009
  resolvedLink = cache[base];
19010
19010
  } else {
19011
- var stat = fs7.lstatSync(base);
19011
+ var stat = fs6.lstatSync(base);
19012
19012
  if (!stat.isSymbolicLink()) {
19013
19013
  knownHard[base] = true;
19014
19014
  if (cache)
@@ -19023,8 +19023,8 @@ var require_old = __commonJS({
19023
19023
  }
19024
19024
  }
19025
19025
  if (linkTarget === null) {
19026
- fs7.statSync(base);
19027
- linkTarget = fs7.readlinkSync(base);
19026
+ fs6.statSync(base);
19027
+ linkTarget = fs6.readlinkSync(base);
19028
19028
  }
19029
19029
  resolvedLink = pathModule.resolve(previous, linkTarget);
19030
19030
  if (cache)
@@ -19061,7 +19061,7 @@ var require_old = __commonJS({
19061
19061
  base = m[0];
19062
19062
  previous = "";
19063
19063
  if (isWindows && !knownHard[base]) {
19064
- fs7.lstat(base, function(err2) {
19064
+ fs6.lstat(base, function(err2) {
19065
19065
  if (err2)
19066
19066
  return cb(err2);
19067
19067
  knownHard[base] = true;
@@ -19089,7 +19089,7 @@ var require_old = __commonJS({
19089
19089
  if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
19090
19090
  return gotResolvedLink(cache[base]);
19091
19091
  }
19092
- return fs7.lstat(base, gotStat);
19092
+ return fs6.lstat(base, gotStat);
19093
19093
  }
19094
19094
  function gotStat(err2, stat) {
19095
19095
  if (err2)
@@ -19106,10 +19106,10 @@ var require_old = __commonJS({
19106
19106
  return gotTarget(null, seenLinks[id], base);
19107
19107
  }
19108
19108
  }
19109
- fs7.stat(base, function(err3) {
19109
+ fs6.stat(base, function(err3) {
19110
19110
  if (err3)
19111
19111
  return cb(err3);
19112
- fs7.readlink(base, function(err4, target) {
19112
+ fs6.readlink(base, function(err4, target) {
19113
19113
  if (!isWindows)
19114
19114
  seenLinks[id] = target;
19115
19115
  gotTarget(err4, target);
@@ -19141,9 +19141,9 @@ var require_fs = __commonJS({
19141
19141
  realpath.realpathSync = realpathSync;
19142
19142
  realpath.monkeypatch = monkeypatch;
19143
19143
  realpath.unmonkeypatch = unmonkeypatch;
19144
- var fs7 = require("fs");
19145
- var origRealpath = fs7.realpath;
19146
- var origRealpathSync = fs7.realpathSync;
19144
+ var fs6 = require("fs");
19145
+ var origRealpath = fs6.realpath;
19146
+ var origRealpathSync = fs6.realpathSync;
19147
19147
  var version = process.version;
19148
19148
  var ok = /^v[0-5]\./.test(version);
19149
19149
  var old = require_old();
@@ -19181,12 +19181,12 @@ var require_fs = __commonJS({
19181
19181
  }
19182
19182
  }
19183
19183
  function monkeypatch() {
19184
- fs7.realpath = realpath;
19185
- fs7.realpathSync = realpathSync;
19184
+ fs6.realpath = realpath;
19185
+ fs6.realpathSync = realpathSync;
19186
19186
  }
19187
19187
  function unmonkeypatch() {
19188
- fs7.realpath = origRealpath;
19189
- fs7.realpathSync = origRealpathSync;
19188
+ fs6.realpath = origRealpath;
19189
+ fs6.realpathSync = origRealpathSync;
19190
19190
  }
19191
19191
  }
19192
19192
  });
@@ -20036,7 +20036,7 @@ var require_common2 = __commonJS({
20036
20036
  function ownProp(obj, field) {
20037
20037
  return Object.prototype.hasOwnProperty.call(obj, field);
20038
20038
  }
20039
- var fs7 = require("fs");
20039
+ var fs6 = require("fs");
20040
20040
  var path3 = require("path");
20041
20041
  var minimatch2 = require_minimatch();
20042
20042
  var isAbsolute = require("path").isAbsolute;
@@ -20095,7 +20095,7 @@ var require_common2 = __commonJS({
20095
20095
  self2.stat = !!options.stat;
20096
20096
  self2.noprocess = !!options.noprocess;
20097
20097
  self2.absolute = !!options.absolute;
20098
- self2.fs = options.fs || fs7;
20098
+ self2.fs = options.fs || fs6;
20099
20099
  self2.maxLength = options.maxLength || Infinity;
20100
20100
  self2.cache = options.cache || /* @__PURE__ */ Object.create(null);
20101
20101
  self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null);
@@ -47087,15 +47087,15 @@ var require_lib3 = __commonJS({
47087
47087
  "node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/index.js"(exports, module2) {
47088
47088
  "use strict";
47089
47089
  var path3 = require("path");
47090
- var fs7 = require("fs");
47090
+ var fs6 = require("fs");
47091
47091
  var helper = require_helper();
47092
47092
  module2.exports = function(connInfo, cb) {
47093
47093
  var file = helper.getFileName();
47094
- fs7.stat(file, function(err2, stat) {
47094
+ fs6.stat(file, function(err2, stat) {
47095
47095
  if (err2 || !helper.usePgPass(stat, file)) {
47096
47096
  return cb(void 0);
47097
47097
  }
47098
- var st = fs7.createReadStream(file);
47098
+ var st = fs6.createReadStream(file);
47099
47099
  helper.getPassword(connInfo, st, cb);
47100
47100
  });
47101
47101
  };
@@ -47143,7 +47143,7 @@ var require_pg_connection_string = __commonJS({
47143
47143
  "node_modules/.pnpm/pg-connection-string@2.5.0/node_modules/pg-connection-string/index.js"(exports, module2) {
47144
47144
  "use strict";
47145
47145
  var url = require("url");
47146
- var fs7 = require("fs");
47146
+ var fs6 = require("fs");
47147
47147
  function parse(str) {
47148
47148
  if (str.charAt(0) === "/") {
47149
47149
  var config = str.split(" ");
@@ -47192,13 +47192,13 @@ var require_pg_connection_string = __commonJS({
47192
47192
  config.ssl = {};
47193
47193
  }
47194
47194
  if (config.sslcert) {
47195
- config.ssl.cert = fs7.readFileSync(config.sslcert).toString();
47195
+ config.ssl.cert = fs6.readFileSync(config.sslcert).toString();
47196
47196
  }
47197
47197
  if (config.sslkey) {
47198
- config.ssl.key = fs7.readFileSync(config.sslkey).toString();
47198
+ config.ssl.key = fs6.readFileSync(config.sslkey).toString();
47199
47199
  }
47200
47200
  if (config.sslrootcert) {
47201
- config.ssl.ca = fs7.readFileSync(config.sslrootcert).toString();
47201
+ config.ssl.ca = fs6.readFileSync(config.sslrootcert).toString();
47202
47202
  }
47203
47203
  switch (config.sslmode) {
47204
47204
  case "disable": {
@@ -51042,7 +51042,6 @@ var logSuggestionsAndReturn = async ({
51042
51042
  };
51043
51043
 
51044
51044
  // src/cli/index.ts
51045
- var fs6 = __toESM(require("fs"));
51046
51045
  var printVersions = () => {
51047
51046
  console.log(`${source_default.gray(versions())}
51048
51047
  `);
@@ -51121,19 +51120,6 @@ var dbPushMysqlCommand = new Command("push:mysql").option(
51121
51120
  assertOrmCoreVersion();
51122
51121
  const { mysqlPushIntrospect: mysqlPushIntrospect2, connectToMySQL: connectToMySQL2 } = (init_mysqlIntrospect(), __toCommonJS(mysqlIntrospect_exports));
51123
51122
  const drizzleConfig = drizzleConfigFromFile(options.config);
51124
- if (Array.isArray(drizzleConfig.schema)) {
51125
- for (const schema5 of drizzleConfig.schema) {
51126
- if (!fs6.existsSync(schema5)) {
51127
- (0, import_hanji6.render)(`[${source_default.blue("i")}] No schema file in ${schema5} was found`);
51128
- process.exit(0);
51129
- }
51130
- }
51131
- } else {
51132
- if (!fs6.existsSync(drizzleConfig.schema)) {
51133
- (0, import_hanji6.render)(`[${source_default.blue("i")}] No schema file in ${drizzleConfig.schema} was found`);
51134
- process.exit(0);
51135
- }
51136
- }
51137
51123
  const connection = await connectToMySQL2(drizzleConfig);
51138
51124
  const filterConfig = drizzleConfig.tablesFilter;
51139
51125
  const tablesFilter = filterConfig ? typeof filterConfig === "string" ? [filterConfig] : filterConfig : [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.18.0-9c3e0b3",
3
+ "version": "0.18.0-a7a8954",
4
4
  "repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
5
5
  "author": "Drizzle Team",
6
6
  "license": "MIT",