@zenstackhq/cli 3.3.0-beta.3 → 3.3.0-beta.4

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.cjs CHANGED
@@ -243,7 +243,7 @@ function execPrisma(args, options) {
243
243
  execPackage(`prisma ${args}`, _options);
244
244
  return;
245
245
  }
246
- execSync(`node ${prismaPath} ${args}`, _options);
246
+ execSync(`node "${prismaPath}" ${args}`, _options);
247
247
  }
248
248
  __name(execPrisma, "execPrisma");
249
249
 
@@ -930,20 +930,23 @@ function handleSubProcessError2(err) {
930
930
  __name(handleSubProcessError2, "handleSubProcessError");
931
931
 
932
932
  // src/actions/proxy.ts
933
- var import_ast3 = require("@zenstackhq/language/ast");
934
933
  var import_language4 = require("@zenstackhq/language");
934
+ var import_ast3 = require("@zenstackhq/language/ast");
935
935
  var import_utils2 = require("@zenstackhq/language/utils");
936
- var import_sqlite = require("@zenstackhq/orm/dialects/sqlite");
937
- var import_postgres = require("@zenstackhq/orm/dialects/postgres");
938
- var import_better_sqlite3 = __toESM(require("better-sqlite3"), 1);
939
- var import_pg = require("pg");
940
- var import_node_path9 = __toESM(require("path"), 1);
941
936
  var import_orm = require("@zenstackhq/orm");
937
+ var import_mysql = require("@zenstackhq/orm/dialects/mysql");
938
+ var import_postgres = require("@zenstackhq/orm/dialects/postgres");
939
+ var import_sqlite = require("@zenstackhq/orm/dialects/sqlite");
942
940
  var import_api = require("@zenstackhq/server/api");
943
941
  var import_express = require("@zenstackhq/server/express");
944
- var import_express2 = __toESM(require("express"), 1);
942
+ var import_better_sqlite3 = __toESM(require("better-sqlite3"), 1);
945
943
  var import_colors9 = __toESM(require("colors"), 1);
944
+ var import_cors = __toESM(require("cors"), 1);
945
+ var import_express2 = __toESM(require("express"), 1);
946
946
  var import_jiti2 = require("jiti");
947
+ var import_mysql2 = require("mysql2");
948
+ var import_node_path9 = __toESM(require("path"), 1);
949
+ var import_pg = require("pg");
947
950
 
948
951
  // src/utils/version-utils.ts
949
952
  var import_colors8 = __toESM(require("colors"), 1);
@@ -995,7 +998,6 @@ async function getLatestVersion() {
995
998
  __name(getLatestVersion, "getLatestVersion");
996
999
 
997
1000
  // src/actions/proxy.ts
998
- var import_cors = __toESM(require("cors"), 1);
999
1001
  var import_meta3 = {};
1000
1002
  async function run9(options) {
1001
1003
  const schemaFile = getSchemaFile(options.schema);
@@ -1079,6 +1081,11 @@ function createDialect(provider, databaseUrl, outputPath) {
1079
1081
  connectionString: databaseUrl
1080
1082
  })
1081
1083
  });
1084
+ case "mysql":
1085
+ console.log(import_colors9.default.gray(`Connecting to MySQL database at: ${databaseUrl}`));
1086
+ return new import_mysql.MysqlDialect({
1087
+ pool: (0, import_mysql2.createPool)(databaseUrl)
1088
+ });
1082
1089
  default:
1083
1090
  throw new CliError(`Unsupported database provider: ${provider}`);
1084
1091
  }