@stryke/prisma-trpc-generator 0.11.11 → 0.11.12

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.
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
  mod
31
31
  ));
32
32
 
33
- // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+_3224746ec47d1b8fe4ee6bf9861e331d/node_modules/tsup/assets/cjs_shims.js
33
+ // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+_59b77ee1c3f80f02138262a51f241204/node_modules/tsup/assets/cjs_shims.js
34
34
  var init_cjs_shims = __esm({
35
- "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+_3224746ec47d1b8fe4ee6bf9861e331d/node_modules/tsup/assets/cjs_shims.js"() {
35
+ "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+_59b77ee1c3f80f02138262a51f241204/node_modules/tsup/assets/cjs_shims.js"() {
36
36
  "use strict";
37
37
  }
38
38
  });
@@ -2639,7 +2639,7 @@ function lowerCaseFirst(input) {
2639
2639
  __name(lowerCaseFirst, "lowerCaseFirst");
2640
2640
 
2641
2641
  // src/prisma-generator.ts
2642
- var import_node_path6 = __toESM(require("node:path"), 1);
2642
+ var import_node_path7 = __toESM(require("node:path"), 1);
2643
2643
  var import_pluralize = __toESM(require_pluralize(), 1);
2644
2644
 
2645
2645
  // src/config.ts
@@ -6911,12 +6911,31 @@ init_cjs_shims();
6911
6911
  var EMPTY_STRING = "";
6912
6912
  var $NestedValue = Symbol("NestedValue");
6913
6913
 
6914
+ // ../path/src/file-path-fns.ts
6915
+ var import_node_path2 = require("node:path");
6916
+
6914
6917
  // ../path/src/correct-path.ts
6915
6918
  init_cjs_shims();
6916
6919
 
6917
6920
  // ../path/src/is-file.ts
6918
6921
  init_cjs_shims();
6919
6922
  var import_node_fs2 = require("node:fs");
6923
+
6924
+ // ../path/src/regex.ts
6925
+ init_cjs_shims();
6926
+ var DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
6927
+ var DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
6928
+ var UNC_REGEX = /^[/\\]{2}/;
6929
+ var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
6930
+
6931
+ // ../path/src/slash.ts
6932
+ init_cjs_shims();
6933
+ function slash(str) {
6934
+ return str.replace(/\\/g, "/");
6935
+ }
6936
+ __name(slash, "slash");
6937
+
6938
+ // ../path/src/is-file.ts
6920
6939
  function isFile(path6, additionalPath) {
6921
6940
  return Boolean((0, import_node_fs2.statSync)(additionalPath ? joinPaths(additionalPath, path6) : path6, {
6922
6941
  throwIfNoEntry: false
@@ -6930,29 +6949,26 @@ function isDirectory(path6, additionalPath) {
6930
6949
  }
6931
6950
  __name(isDirectory, "isDirectory");
6932
6951
  function isAbsolutePath(path6) {
6933
- return !/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i.test(path6);
6952
+ return ABSOLUTE_PATH_REGEX.test(slash(path6));
6934
6953
  }
6935
6954
  __name(isAbsolutePath, "isAbsolutePath");
6936
6955
 
6937
6956
  // ../path/src/correct-path.ts
6938
- var _DRIVE_LETTER_START_RE2 = /^[A-Z]:\//i;
6939
6957
  function normalizeWindowsPath2(input = "") {
6940
6958
  if (!input) {
6941
6959
  return input;
6942
6960
  }
6943
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE2, (r) => r.toUpperCase());
6961
+ return slash(input).replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
6944
6962
  }
6945
6963
  __name(normalizeWindowsPath2, "normalizeWindowsPath");
6946
- var _UNC_REGEX2 = /^[/\\]{2}/;
6947
- var _DRIVE_LETTER_RE2 = /^[A-Z]:$/i;
6948
6964
  function correctPath(path6) {
6949
6965
  if (!path6 || path6.length === 0) {
6950
6966
  return ".";
6951
6967
  }
6952
6968
  path6 = normalizeWindowsPath2(path6);
6953
- const isUNCPath = path6.match(_UNC_REGEX2);
6969
+ const isUNCPath = path6.match(UNC_REGEX);
6954
6970
  const isPathAbsolute = isAbsolutePath(path6);
6955
- const trailingSeparator = path6[path6.length - 1] === "/";
6971
+ const trailingSeparator = path6.endsWith("/");
6956
6972
  path6 = normalizeString2(path6, !isPathAbsolute);
6957
6973
  if (path6.length === 0) {
6958
6974
  if (isPathAbsolute) {
@@ -6963,7 +6979,7 @@ function correctPath(path6) {
6963
6979
  if (trailingSeparator) {
6964
6980
  path6 += "/";
6965
6981
  }
6966
- if (_DRIVE_LETTER_RE2.test(path6)) {
6982
+ if (DRIVE_LETTER_REGEX.test(path6)) {
6967
6983
  path6 += "/";
6968
6984
  }
6969
6985
  if (isUNCPath) {
@@ -6972,7 +6988,7 @@ function correctPath(path6) {
6972
6988
  }
6973
6989
  return `//${path6}`;
6974
6990
  }
6975
- return isPathAbsolute && !isAbsolutePath(path6) ? `/${path6}` : path6;
6991
+ return !path6.startsWith("/") && isPathAbsolute && !DRIVE_LETTER_REGEX.test(path6) ? `/${path6}` : path6;
6976
6992
  }
6977
6993
  __name(correctPath, "correctPath");
6978
6994
  function normalizeString2(path6, allowAboveRoot) {
@@ -7040,65 +7056,28 @@ __name(normalizeString2, "normalizeString");
7040
7056
  // ../path/src/get-workspace-root.ts
7041
7057
  init_cjs_shims();
7042
7058
 
7043
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/index.js
7059
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/index.js
7044
7060
  init_cjs_shims();
7045
7061
 
7046
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-K6PUXRK3.js
7047
- init_cjs_shims();
7048
-
7049
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-NQFXB5CV.js
7050
- init_cjs_shims();
7051
-
7052
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-SHUYVCID.js
7053
- init_cjs_shims();
7054
- var __defProp2 = Object.defineProperty;
7055
- var __name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name", {
7056
- value,
7057
- configurable: true
7058
- }), "__name");
7059
-
7060
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-NQFXB5CV.js
7061
- var import_node_fs3 = require("node:fs");
7062
- var import_node_path = require("node:path");
7063
- var MAX_PATH_SEARCH_DEPTH = 30;
7064
- var depth = 0;
7065
- function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
7066
- const _startPath = startPath ?? process.cwd();
7067
- if (endDirectoryNames.some((endDirName) => (0, import_node_fs3.existsSync)((0, import_node_path.join)(_startPath, endDirName)))) {
7068
- return _startPath;
7069
- }
7070
- if (endFileNames.some((endFileName) => (0, import_node_fs3.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
7071
- return _startPath;
7072
- }
7073
- if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
7074
- const parent = (0, import_node_path.join)(_startPath, "..");
7075
- return findFolderUp(parent, endFileNames, endDirectoryNames);
7076
- }
7077
- return void 0;
7078
- }
7079
- __name(findFolderUp, "findFolderUp");
7080
- __name2(findFolderUp, "findFolderUp");
7081
-
7082
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-D6E6GZD2.js
7062
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
7083
7063
  init_cjs_shims();
7084
- var _DRIVE_LETTER_START_RE3 = /^[A-Za-z]:\//;
7064
+ var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
7085
7065
  function normalizeWindowsPath3(input = "") {
7086
7066
  if (!input) {
7087
7067
  return input;
7088
7068
  }
7089
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE3, (r) => r.toUpperCase());
7069
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE2, (r) => r.toUpperCase());
7090
7070
  }
7091
7071
  __name(normalizeWindowsPath3, "normalizeWindowsPath");
7092
- __name2(normalizeWindowsPath3, "normalizeWindowsPath");
7093
- var _UNC_REGEX3 = /^[/\\]{2}/;
7072
+ var _UNC_REGEX2 = /^[/\\]{2}/;
7094
7073
  var _IS_ABSOLUTE_RE2 = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
7095
- var _DRIVE_LETTER_RE3 = /^[A-Za-z]:$/;
7096
- var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
7074
+ var _DRIVE_LETTER_RE2 = /^[A-Za-z]:$/;
7075
+ var correctPaths2 = /* @__PURE__ */ __name(function(path6) {
7097
7076
  if (!path6 || path6.length === 0) {
7098
7077
  return ".";
7099
7078
  }
7100
7079
  path6 = normalizeWindowsPath3(path6);
7101
- const isUNCPath = path6.match(_UNC_REGEX3);
7080
+ const isUNCPath = path6.match(_UNC_REGEX2);
7102
7081
  const isPathAbsolute = isAbsolute2(path6);
7103
7082
  const trailingSeparator = path6[path6.length - 1] === "/";
7104
7083
  path6 = normalizeString3(path6, !isPathAbsolute);
@@ -7111,7 +7090,7 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
7111
7090
  if (trailingSeparator) {
7112
7091
  path6 += "/";
7113
7092
  }
7114
- if (_DRIVE_LETTER_RE3.test(path6)) {
7093
+ if (_DRIVE_LETTER_RE2.test(path6)) {
7115
7094
  path6 += "/";
7116
7095
  }
7117
7096
  if (isUNCPath) {
@@ -7122,14 +7101,6 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
7122
7101
  }
7123
7102
  return isPathAbsolute && !isAbsolute2(path6) ? `/${path6}` : path6;
7124
7103
  }, "correctPaths");
7125
- function cwd() {
7126
- if (typeof process !== "undefined" && typeof process.cwd === "function") {
7127
- return process.cwd().replace(/\\/g, "/");
7128
- }
7129
- return "/";
7130
- }
7131
- __name(cwd, "cwd");
7132
- __name2(cwd, "cwd");
7133
7104
  function normalizeString3(path6, allowAboveRoot) {
7134
7105
  let res = "";
7135
7106
  let lastSegmentLength = 0;
@@ -7191,12 +7162,36 @@ function normalizeString3(path6, allowAboveRoot) {
7191
7162
  return res;
7192
7163
  }
7193
7164
  __name(normalizeString3, "normalizeString");
7194
- __name2(normalizeString3, "normalizeString");
7195
- var isAbsolute2 = /* @__PURE__ */ __name2(function(p) {
7165
+ var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
7196
7166
  return _IS_ABSOLUTE_RE2.test(p);
7197
7167
  }, "isAbsolute");
7198
7168
 
7199
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-K6PUXRK3.js
7169
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
7170
+ init_cjs_shims();
7171
+
7172
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-RWBPUJIZ.js
7173
+ init_cjs_shims();
7174
+ var import_node_fs3 = require("node:fs");
7175
+ var import_node_path = require("node:path");
7176
+ var MAX_PATH_SEARCH_DEPTH = 30;
7177
+ var depth = 0;
7178
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
7179
+ const _startPath = startPath ?? process.cwd();
7180
+ if (endDirectoryNames.some((endDirName) => (0, import_node_fs3.existsSync)((0, import_node_path.join)(_startPath, endDirName)))) {
7181
+ return _startPath;
7182
+ }
7183
+ if (endFileNames.some((endFileName) => (0, import_node_fs3.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
7184
+ return _startPath;
7185
+ }
7186
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
7187
+ const parent = (0, import_node_path.join)(_startPath, "..");
7188
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
7189
+ }
7190
+ return void 0;
7191
+ }
7192
+ __name(findFolderUp, "findFolderUp");
7193
+
7194
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
7200
7195
  var rootFiles = [
7201
7196
  "storm-workspace.json",
7202
7197
  "storm-workspace.json",
@@ -7246,31 +7241,19 @@ function findWorkspaceRootSafe(pathInsideMonorepo) {
7246
7241
  return correctPaths2(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
7247
7242
  }
7248
7243
  __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
7249
- __name2(findWorkspaceRootSafe, "findWorkspaceRootSafe");
7250
- function findWorkspaceRoot(pathInsideMonorepo) {
7251
- const result = findWorkspaceRootSafe(pathInsideMonorepo);
7252
- if (!result) {
7253
- throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
7254
- ${rootFiles.join("\n")}
7255
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
7256
- }
7257
- return result;
7258
- }
7259
- __name(findWorkspaceRoot, "findWorkspaceRoot");
7260
- __name2(findWorkspaceRoot, "findWorkspaceRoot");
7261
7244
 
7262
7245
  // ../path/src/get-parent-path.ts
7263
7246
  init_cjs_shims();
7264
7247
  var resolveParentPath = /* @__PURE__ */ __name((path6) => {
7265
7248
  return resolvePaths(path6, "..");
7266
7249
  }, "resolveParentPath");
7267
- var getParentPath = /* @__PURE__ */ __name((name, cwd2, options) => {
7250
+ var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
7268
7251
  const ignoreCase = options?.ignoreCase ?? true;
7269
7252
  const skipCwd = options?.skipCwd ?? false;
7270
7253
  const targetType = options?.targetType ?? "both";
7271
- let dir = cwd2;
7254
+ let dir = cwd;
7272
7255
  if (skipCwd) {
7273
- dir = resolveParentPath(cwd2);
7256
+ dir = resolveParentPath(cwd);
7274
7257
  }
7275
7258
  let names = Array.isArray(name) ? name : [
7276
7259
  name
@@ -7367,12 +7350,12 @@ function findFilePath(filePath) {
7367
7350
  }), "");
7368
7351
  }
7369
7352
  __name(findFilePath, "findFilePath");
7370
- function resolvePath(path6, cwd2 = getWorkspaceRoot()) {
7353
+ function resolvePath(path6, cwd = getWorkspaceRoot()) {
7371
7354
  const paths = normalizeWindowsPath2(path6).split("/");
7372
7355
  let resolvedPath = "";
7373
7356
  let resolvedAbsolute = false;
7374
7357
  for (let index = paths.length - 1; index >= -1 && !resolvedAbsolute; index--) {
7375
- const path7 = index >= 0 ? paths[index] : cwd2;
7358
+ const path7 = index >= 0 ? paths[index] : cwd;
7376
7359
  if (!path7 || path7.length === 0) {
7377
7360
  continue;
7378
7361
  }
@@ -7391,25 +7374,7 @@ function resolvePaths(...paths) {
7391
7374
  }
7392
7375
  __name(resolvePaths, "resolvePaths");
7393
7376
  function relativePath(from, to) {
7394
- const _from = resolvePath(from).replace(/^\/([A-Z]:)?$/i, "$1").split("/");
7395
- const _to = resolvePath(to).replace(/^\/([A-Z]:)?$/i, "$1").split("/");
7396
- if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
7397
- return _to.join("/");
7398
- }
7399
- const _fromCopy = [
7400
- ..._from
7401
- ];
7402
- for (const segment of _fromCopy) {
7403
- if (_to[0] !== segment) {
7404
- break;
7405
- }
7406
- _from.shift();
7407
- _to.shift();
7408
- }
7409
- return [
7410
- ..._from.map(() => ".."),
7411
- ..._to
7412
- ].join("/");
7377
+ return (0, import_node_path2.relative)(from.replace(/\/$/, ""), to.replace(/\/$/, ""));
7413
7378
  }
7414
7379
  __name(relativePath, "relativePath");
7415
7380
 
@@ -7444,46 +7409,200 @@ init_cjs_shims();
7444
7409
  // ../string-format/src/acronyms.ts
7445
7410
  init_cjs_shims();
7446
7411
  var ACRONYMS = [
7412
+ "3D",
7413
+ "4D",
7414
+ "5G",
7415
+ "6G",
7416
+ "7G",
7417
+ "8G",
7418
+ "ACID",
7419
+ "AES",
7420
+ "AI",
7421
+ "AJAX",
7447
7422
  "API",
7423
+ "AR",
7424
+ "ASCII",
7425
+ "B2B",
7426
+ "B2C",
7427
+ "BFF",
7428
+ "BI",
7429
+ "BIOS",
7430
+ "BGP",
7431
+ "BOM",
7432
+ "BYOD",
7433
+ "C2C",
7434
+ "CAGR",
7435
+ "CAPTCHA",
7436
+ "CD",
7437
+ "CDN",
7438
+ "CDP",
7439
+ "CI",
7440
+ "CI/CD",
7441
+ "CIAM",
7442
+ "CICD",
7443
+ "CLI",
7444
+ "CMDB",
7445
+ "CORS",
7448
7446
  "CPU",
7447
+ "CRUD",
7448
+ "CSR",
7449
7449
  "CSS",
7450
+ "CX",
7451
+ "DAG",
7452
+ "DBMS",
7453
+ "DDoS",
7450
7454
  "DNS",
7455
+ "DNSSEC",
7456
+ "DOM",
7457
+ "DR",
7458
+ "DRM",
7459
+ "DWH",
7460
+ "E2E",
7461
+ "EAI",
7462
+ "EKS",
7451
7463
  "EOF",
7464
+ "EOD",
7465
+ "ETC",
7466
+ "ETL",
7467
+ "EULA",
7468
+ "FIDO",
7469
+ "FQDN",
7470
+ "FTP",
7471
+ "FaaS",
7472
+ "GDPR",
7473
+ "GCP",
7474
+ "GPU",
7452
7475
  "GUID",
7476
+ "GUI",
7477
+ "GZIP",
7478
+ "HCI",
7479
+ "HDD",
7480
+ "HDFS",
7481
+ "HIPAA",
7482
+ "HMAC",
7483
+ "HOTP",
7484
+ "HSM",
7453
7485
  "HTML",
7454
7486
  "HTTP",
7487
+ "HTTP/2",
7488
+ "HTTP/2.0",
7489
+ "HTTP/3",
7490
+ "HTTP/3.0",
7491
+ "HTTP2",
7455
7492
  "HTTPS",
7493
+ "HTTPS/2",
7494
+ "HTTPS/3",
7495
+ "HTTPS3",
7496
+ "IAM",
7497
+ "IAMM",
7498
+ "IAMT",
7499
+ "IaaS",
7456
7500
  "ID",
7501
+ "IMAP",
7457
7502
  "IP",
7503
+ "IPFS",
7504
+ "IoT",
7458
7505
  "JSON",
7506
+ "JSONP",
7507
+ "JWT",
7508
+ "K8s",
7509
+ "KMS",
7510
+ "KPI",
7511
+ "LAN",
7459
7512
  "LHS",
7513
+ "LXC",
7514
+ "MFA",
7515
+ "ML",
7516
+ "MLOps",
7517
+ "MVC",
7518
+ "MVP",
7519
+ "NAS",
7520
+ "NAT",
7521
+ "NDA",
7522
+ "NFS",
7523
+ "NIST",
7524
+ "NLP",
7525
+ "NPS",
7526
+ "OCR",
7460
7527
  "OEM",
7528
+ "OKR",
7529
+ "OLAP",
7530
+ "OLTP",
7531
+ "OOP",
7532
+ "ORM",
7533
+ "OS",
7534
+ "OTP",
7535
+ "P2P",
7536
+ "PDP",
7537
+ "PaaS",
7538
+ "PCI",
7539
+ "PKI",
7461
7540
  "PP",
7541
+ "PWA",
7542
+ "PX",
7462
7543
  "QA",
7544
+ "RAID",
7463
7545
  "RAM",
7546
+ "RDS",
7547
+ "REST",
7464
7548
  "RHS",
7465
7549
  "RPC",
7550
+ "RPA",
7551
+ "RUM",
7466
7552
  "RSS",
7553
+ "SAN",
7554
+ "SASE",
7555
+ "SDLC",
7556
+ "SDK",
7557
+ "SEO",
7558
+ "SFTP",
7559
+ "SIEM",
7467
7560
  "SLA",
7561
+ "SMB",
7468
7562
  "SMTP",
7563
+ "SOAP",
7564
+ "SOC",
7565
+ "SOA",
7566
+ "SPDY",
7567
+ "SPF",
7469
7568
  "SQL",
7569
+ "SRV",
7570
+ "SRE",
7470
7571
  "SSH",
7572
+ "SSDL",
7573
+ "SSO",
7471
7574
  "SSL",
7472
- "TCP",
7575
+ "SSR",
7576
+ "TDD",
7577
+ "TLD",
7473
7578
  "TLS",
7579
+ "TLS1.3",
7580
+ "TOTP",
7474
7581
  "TRPC",
7475
7582
  "TTL",
7476
7583
  "UDP",
7477
7584
  "UI",
7478
7585
  "UID",
7479
- "UUID",
7480
7586
  "URI",
7481
7587
  "URL",
7482
7588
  "UTF",
7589
+ "UUID",
7590
+ "UX",
7483
7591
  "VM",
7592
+ "VLAN",
7593
+ "VPN",
7594
+ "VR",
7595
+ "WAF",
7596
+ "WAN",
7597
+ "WLAN",
7598
+ "WPA",
7599
+ "XACML",
7484
7600
  "XML",
7601
+ "XSRF",
7485
7602
  "XSS",
7486
- "XSRF"
7603
+ "XR",
7604
+ "YAML",
7605
+ "ZTA"
7487
7606
  ];
7488
7607
 
7489
7608
  // ../string-format/src/upper-case-first.ts
@@ -7498,7 +7617,7 @@ function titleCase(input) {
7498
7617
  if (!input) {
7499
7618
  return input;
7500
7619
  }
7501
- return input.split(/(?=[A-Z])|[\s._-]/).map((s) => s.trim()).filter(Boolean).map((s) => ACRONYMS.includes(s) ? s.toUpperCase() : upperCaseFirst(s.toLowerCase())).join(" ");
7620
+ return input.split(/(?=[A-Z])|[\s._-]/).map((s) => s.trim()).filter(Boolean).map((s) => ACRONYMS.find((a) => a.toUpperCase() === s.toUpperCase()) || upperCaseFirst(s.toLowerCase())).join(" ");
7502
7621
  }
7503
7622
  __name(titleCase, "titleCase");
7504
7623
 
@@ -7514,7 +7633,7 @@ var isString = /* @__PURE__ */ __name((value) => {
7514
7633
 
7515
7634
  // ../env/src/get-env-paths.ts
7516
7635
  var import_node_os = __toESM(require("node:os"), 1);
7517
- var import_node_path2 = __toESM(require("node:path"), 1);
7636
+ var import_node_path3 = __toESM(require("node:path"), 1);
7518
7637
  var homedir = import_node_os.default.homedir();
7519
7638
  var tmpdir = import_node_os.default.tmpdir();
7520
7639
  var macos = /* @__PURE__ */ __name((orgId) => {
@@ -7541,14 +7660,15 @@ var windows = /* @__PURE__ */ __name((orgId) => {
7541
7660
  };
7542
7661
  }, "windows");
7543
7662
  var linux = /* @__PURE__ */ __name((orgId) => {
7544
- const username = import_node_path2.default.basename(homedir);
7663
+ const username = import_node_path3.default.basename(homedir);
7545
7664
  return {
7546
7665
  data: joinPaths(process.env.XDG_DATA_HOME || joinPaths(homedir, ".local", "share"), orgId),
7547
7666
  config: joinPaths(process.env.XDG_CONFIG_HOME || joinPaths(homedir, ".config"), orgId),
7548
7667
  cache: joinPaths(process.env.XDG_CACHE_HOME || joinPaths(homedir, ".cache"), orgId),
7549
7668
  // https://wiki.debian.org/XDGBaseDirectorySpecification#state
7550
7669
  log: joinPaths(process.env.XDG_STATE_HOME || joinPaths(homedir, ".local", "state"), orgId),
7551
- temp: joinPaths(tmpdir, username, orgId)
7670
+ // https://devenv.sh/files-and-variables/#devenv_root
7671
+ temp: process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR ? joinPaths(process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR, orgId) : joinPaths(tmpdir, username, orgId)
7552
7672
  };
7553
7673
  }, "linux");
7554
7674
  function getEnvPaths(options = {}) {
@@ -7567,16 +7687,16 @@ function getEnvPaths(options = {}) {
7567
7687
  } else {
7568
7688
  result = linux(orgId);
7569
7689
  }
7570
- if (process.env.STORM_DATA_DIRECTORY) {
7571
- result.data = process.env.STORM_DATA_DIRECTORY;
7572
- } else if (process.env.STORM_CONFIG_DIRECTORY) {
7573
- result.config = process.env.STORM_CONFIG_DIRECTORY;
7574
- } else if (process.env.STORM_CACHE_DIRECTORY) {
7575
- result.cache = process.env.STORM_CACHE_DIRECTORY;
7576
- } else if (process.env.STORM_LOG_DIRECTORY) {
7577
- result.log = process.env.STORM_LOG_DIRECTORY;
7578
- } else if (process.env.STORM_TEMP_DIRECTORY) {
7579
- result.temp = process.env.STORM_TEMP_DIRECTORY;
7690
+ if (process.env.STORM_DATA_DIR) {
7691
+ result.data = process.env.STORM_DATA_DIR;
7692
+ } else if (process.env.STORM_CONFIG_DIR) {
7693
+ result.config = process.env.STORM_CONFIG_DIR;
7694
+ } else if (process.env.STORM_CACHE_DIR) {
7695
+ result.cache = process.env.STORM_CACHE_DIR;
7696
+ } else if (process.env.STORM_LOG_DIR) {
7697
+ result.log = process.env.STORM_LOG_DIR;
7698
+ } else if (process.env.STORM_TEMP_DIR) {
7699
+ result.temp = process.env.STORM_TEMP_DIR;
7580
7700
  }
7581
7701
  if (options.workspaceRoot) {
7582
7702
  result.cache ??= joinPaths(options.workspaceRoot, "node_modules", ".cache", orgId);
@@ -7624,7 +7744,7 @@ __name(getPrismaGeneratorHelper, "getPrismaGeneratorHelper");
7624
7744
 
7625
7745
  // src/zod/model-helpers.ts
7626
7746
  init_cjs_shims();
7627
- var import_node_path3 = __toESM(require("node:path"), 1);
7747
+ var import_node_path4 = __toESM(require("node:path"), 1);
7628
7748
  var import_ts_morph2 = require("ts-morph");
7629
7749
 
7630
7750
  // src/zod/docs-helpers.ts
@@ -7734,7 +7854,7 @@ var writeImportsForModel = /* @__PURE__ */ __name(async (model, sourceFile, conf
7734
7854
  importList.push({
7735
7855
  kind: import_ts_morph2.StructureKind.ImportDeclaration,
7736
7856
  namespaceImport: "imports",
7737
- moduleSpecifier: dotSlash(import_node_path3.default.relative(outputPath, import_node_path3.default.resolve(import_node_path3.default.dirname(options.schemaPath), config.imports)))
7857
+ moduleSpecifier: dotSlash(import_node_path4.default.relative(outputPath, import_node_path4.default.resolve(import_node_path4.default.dirname(options.schemaPath), config.imports)))
7738
7858
  });
7739
7859
  }
7740
7860
  if (config.useDecimalJs && model.fields.some((f) => f.type === "Decimal")) {
@@ -7749,7 +7869,7 @@ var writeImportsForModel = /* @__PURE__ */ __name(async (model, sourceFile, conf
7749
7869
  const enumFields = model.fields.filter((f) => f.kind === "enum");
7750
7870
  const relationFields = model.fields.filter((f) => f.kind === "object");
7751
7871
  const clientPath = options.otherGenerators.find((each) => each.provider.value === "prisma-client-js").output.value;
7752
- const relativePath2 = import_node_path3.default.relative(outputPath, clientPath);
7872
+ const relativePath2 = import_node_path4.default.relative(outputPath, clientPath);
7753
7873
  if (enumFields.length > 0) {
7754
7874
  importList.push({
7755
7875
  kind: import_ts_morph2.StructureKind.ImportDeclaration,
@@ -10535,7 +10655,47 @@ var isNumber2 = /* @__PURE__ */ __name((value) => {
10535
10655
  }
10536
10656
  }, "isNumber");
10537
10657
 
10658
+ // ../type-checks/src/is-undefined.ts
10659
+ init_cjs_shims();
10660
+ var isUndefined3 = /* @__PURE__ */ __name((value) => {
10661
+ return value === void 0;
10662
+ }, "isUndefined");
10663
+
10538
10664
  // ../json/src/utils/stringify.ts
10665
+ var invalidKeyChars = [
10666
+ "@",
10667
+ "/",
10668
+ "#",
10669
+ "$",
10670
+ " ",
10671
+ ":",
10672
+ ";",
10673
+ ",",
10674
+ ".",
10675
+ "!",
10676
+ "?",
10677
+ "&",
10678
+ "=",
10679
+ "+",
10680
+ "-",
10681
+ "*",
10682
+ "%",
10683
+ "^",
10684
+ "~",
10685
+ "|",
10686
+ "\\",
10687
+ '"',
10688
+ "'",
10689
+ "`",
10690
+ "{",
10691
+ "}",
10692
+ "[",
10693
+ "]",
10694
+ "(",
10695
+ ")",
10696
+ "<",
10697
+ ">"
10698
+ ];
10539
10699
  var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
10540
10700
  const space = isNumber2(spacing) ? " ".repeat(spacing) : spacing;
10541
10701
  switch (value) {
@@ -10572,8 +10732,8 @@ var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
10572
10732
  return JSON.stringify(value);
10573
10733
  }
10574
10734
  case "object": {
10575
- const keys = Object.keys(value);
10576
- return `{${space}${keys.map((k) => `${k}: ${space}${stringify2(value[k], space)}`).join(`,${space}`)}${space}}`;
10735
+ const keys = Object.keys(value).filter((key) => !isUndefined3(value[key]));
10736
+ return `{${space}${keys.map((key) => `${invalidKeyChars.some((invalidKeyChar) => key.includes(invalidKeyChar)) ? `"${key}"` : key}: ${space}${stringify2(value[key], space)}`).join(`,${space}`)}${space}}`;
10577
10737
  }
10578
10738
  default:
10579
10739
  return "null";
@@ -10713,7 +10873,7 @@ var writeFile = /* @__PURE__ */ __name(async (filePath, content = "", options =
10713
10873
  }, "writeFile");
10714
10874
 
10715
10875
  // src/utils/write-file-safely.ts
10716
- var import_node_path4 = __toESM(require("node:path"), 1);
10876
+ var import_node_path5 = __toESM(require("node:path"), 1);
10717
10877
 
10718
10878
  // src/utils/format-file.ts
10719
10879
  init_cjs_shims();
@@ -10757,7 +10917,7 @@ var writeFileSafely = /* @__PURE__ */ __name(async (writeLocation, content, addT
10757
10917
  }, "writeFileSafely");
10758
10918
  var writeIndexFile = /* @__PURE__ */ __name(async (indexPath) => {
10759
10919
  const rows = Array.from(indexExports).map((filePath) => {
10760
- let relativePath2 = import_node_path4.default.relative(import_node_path4.default.dirname(indexPath), filePath);
10920
+ let relativePath2 = import_node_path5.default.relative(import_node_path5.default.dirname(indexPath), filePath);
10761
10921
  if (relativePath2.endsWith(".ts")) {
10762
10922
  relativePath2 = relativePath2.slice(0, relativePath2.lastIndexOf(".ts"));
10763
10923
  }
@@ -10935,7 +11095,7 @@ init_cjs_shims();
10935
11095
 
10936
11096
  // src/zod/transformer.ts
10937
11097
  init_cjs_shims();
10938
- var import_node_path5 = __toESM(require("node:path"), 1);
11098
+ var import_node_path6 = __toESM(require("node:path"), 1);
10939
11099
 
10940
11100
  // src/zod/mongodb-helpers.ts
10941
11101
  init_cjs_shims();
@@ -11045,13 +11205,13 @@ var Transformer = class _Transformer {
11045
11205
  this.isCustomPrismaClientOutputPath = prismaClientCustomPath !== "@prisma/client";
11046
11206
  }
11047
11207
  static async generateIndex() {
11048
- const indexPath = import_node_path5.default.join(_Transformer.outputPath, "schemas/index.ts");
11208
+ const indexPath = import_node_path6.default.join(_Transformer.outputPath, "schemas/index.ts");
11049
11209
  await writeIndexFile(indexPath);
11050
11210
  }
11051
11211
  async generateEnumSchemas() {
11052
11212
  for (const enumType2 of this.enumTypes) {
11053
11213
  const { name, values } = enumType2;
11054
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/enums/${lowerCaseFirst(name)}.schema.ts`), `${this.generateImportZodStatement()}
11214
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/enums/${lowerCaseFirst(name)}.schema.ts`), `${this.generateImportZodStatement()}
11055
11215
  ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.stringify(values)})`)}`);
11056
11216
  }
11057
11217
  }
@@ -11065,7 +11225,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11065
11225
  const zodObjectSchemaFields = this.generateObjectSchemaFields();
11066
11226
  const objectSchema = this.prepareObjectSchema(zodObjectSchemaFields);
11067
11227
  const objectSchemaName = this.resolveObjectSchemaName();
11068
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/objects/${lowerCaseFirst(objectSchemaName)}.schema.ts`), objectSchema);
11228
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/objects/${lowerCaseFirst(objectSchemaName)}.schema.ts`), objectSchema);
11069
11229
  }
11070
11230
  generateObjectSchemaFields() {
11071
11231
  const zodObjectSchemaFields = this.fields.map((field) => this.generateObjectSchemaField(field)).flatMap((item) => item).map((item) => {
@@ -11199,9 +11359,9 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11199
11359
  generateImportPrismaStatement() {
11200
11360
  let prismaClientImportPath;
11201
11361
  if (_Transformer.isCustomPrismaClientOutputPath) {
11202
- const fromPath = import_node_path5.default.join(_Transformer.outputPath, "schemas", "objects");
11362
+ const fromPath = import_node_path6.default.join(_Transformer.outputPath, "schemas", "objects");
11203
11363
  const toPath = _Transformer.prismaClientOutputPath;
11204
- const relativePathFromOutputToPrismaClient = import_node_path5.default.relative(fromPath, toPath).split(import_node_path5.default.sep).join(import_node_path5.default.posix.sep);
11364
+ const relativePathFromOutputToPrismaClient = import_node_path6.default.relative(fromPath, toPath).split(import_node_path6.default.sep).join(import_node_path6.default.posix.sep);
11205
11365
  prismaClientImportPath = relativePathFromOutputToPrismaClient;
11206
11366
  } else {
11207
11367
  prismaClientImportPath = _Transformer.prismaClientOutputPath;
@@ -11331,7 +11491,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11331
11491
  includeImport,
11332
11492
  `import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
11333
11493
  ];
11334
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/${findUnique}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}FindUnique`, `z.object({ ${selectZodSchemaLine} ${includeZodSchemaLine} where: ${modelName}WhereUniqueInputObjectSchema })`)}`);
11494
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/${findUnique}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}FindUnique`, `z.object({ ${selectZodSchemaLine} ${includeZodSchemaLine} where: ${modelName}WhereUniqueInputObjectSchema })`)}`);
11335
11495
  }
11336
11496
  if (findFirst) {
11337
11497
  const imports = [
@@ -11342,7 +11502,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11342
11502
  `import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`,
11343
11503
  `import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
11344
11504
  ];
11345
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/${findFirst}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}FindFirst`, `z.object({ ${selectZodSchemaLine} ${includeZodSchemaLine} ${orderByZodSchemaLine} where: ${modelName}WhereInputObjectSchema.optional(), cursor: ${modelName}WhereUniqueInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), distinct: z.array(${modelName}ScalarFieldEnumSchema).optional() })`)}`);
11505
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/${findFirst}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}FindFirst`, `z.object({ ${selectZodSchemaLine} ${includeZodSchemaLine} ${orderByZodSchemaLine} where: ${modelName}WhereInputObjectSchema.optional(), cursor: ${modelName}WhereUniqueInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), distinct: z.array(${modelName}ScalarFieldEnumSchema).optional() })`)}`);
11346
11506
  }
11347
11507
  if (findMany) {
11348
11508
  const imports = [
@@ -11353,7 +11513,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11353
11513
  `import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`,
11354
11514
  `import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
11355
11515
  ];
11356
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/${findMany}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}FindMany`, `z.object({ ${selectZodSchemaLineLazy} ${includeZodSchemaLineLazy} ${orderByZodSchemaLine} where: ${modelName}WhereInputObjectSchema.optional(), cursor: ${modelName}WhereUniqueInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), distinct: z.array(${modelName}ScalarFieldEnumSchema).optional() })`)}`);
11516
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/${findMany}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}FindMany`, `z.object({ ${selectZodSchemaLineLazy} ${includeZodSchemaLineLazy} ${orderByZodSchemaLine} where: ${modelName}WhereInputObjectSchema.optional(), cursor: ${modelName}WhereUniqueInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), distinct: z.array(${modelName}ScalarFieldEnumSchema).optional() })`)}`);
11357
11517
  }
11358
11518
  if (createOne) {
11359
11519
  const imports = [
@@ -11362,19 +11522,19 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11362
11522
  `import { ${modelName}CreateInputObjectSchema } from './objects/${modelName}CreateInput.schema'`,
11363
11523
  `import { ${modelName}UncheckedCreateInputObjectSchema } from './objects/${modelName}UncheckedCreateInput.schema'`
11364
11524
  ];
11365
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/${createOne}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}CreateOne`, `z.object({ ${selectZodSchemaLine} ${includeZodSchemaLine} data: z.union([${modelName}CreateInputObjectSchema, ${modelName}UncheckedCreateInputObjectSchema]) })`)}`);
11525
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/${createOne}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}CreateOne`, `z.object({ ${selectZodSchemaLine} ${includeZodSchemaLine} data: z.union([${modelName}CreateInputObjectSchema, ${modelName}UncheckedCreateInputObjectSchema]) })`)}`);
11366
11526
  }
11367
11527
  if (createMany) {
11368
11528
  const imports = [
11369
11529
  `import { ${modelName}CreateManyInputObjectSchema } from './objects/${modelName}CreateManyInput.schema'`
11370
11530
  ];
11371
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/${createMany}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}CreateMany`, `z.object({ data: z.union([ ${modelName}CreateManyInputObjectSchema, z.array(${modelName}CreateManyInputObjectSchema) ]), ${_Transformer.provider === "mongodb" || _Transformer.provider === "sqlserver" ? "" : "skipDuplicates: z.boolean().optional()"} })`)}`);
11531
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/${createMany}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}CreateMany`, `z.object({ data: z.union([ ${modelName}CreateManyInputObjectSchema, z.array(${modelName}CreateManyInputObjectSchema) ]), ${_Transformer.provider === "mongodb" || _Transformer.provider === "sqlserver" ? "" : "skipDuplicates: z.boolean().optional()"} })`)}`);
11372
11532
  }
11373
11533
  if (createManyAndReturn) {
11374
11534
  const imports = [
11375
11535
  `import { ${modelName}CreateManyAndReturnInputObjectSchema } from './objects/${modelName}CreateManyAndReturnInput.schema'`
11376
11536
  ];
11377
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/${createManyAndReturn}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}CreateManyAndReturn`, `z.object({ data: z.union([ ${modelName}CreateManyAndReturnInputObjectSchema, z.array(${modelName}CreateManyAndReturnInputObjectSchema) ]), ${_Transformer.provider === "mongodb" || _Transformer.provider === "sqlserver" ? "" : "skipDuplicates: z.boolean().optional()"} })`)}`);
11537
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/${createManyAndReturn}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}CreateManyAndReturn`, `z.object({ data: z.union([ ${modelName}CreateManyAndReturnInputObjectSchema, z.array(${modelName}CreateManyAndReturnInputObjectSchema) ]), ${_Transformer.provider === "mongodb" || _Transformer.provider === "sqlserver" ? "" : "skipDuplicates: z.boolean().optional()"} })`)}`);
11378
11538
  }
11379
11539
  if (deleteOne) {
11380
11540
  const imports = [
@@ -11382,13 +11542,13 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11382
11542
  includeImport,
11383
11543
  `import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
11384
11544
  ];
11385
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/${deleteOne}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}DeleteOne`, `z.object({ ${selectZodSchemaLine} ${includeZodSchemaLine} where: ${modelName}WhereUniqueInputObjectSchema })`)}`);
11545
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/${deleteOne}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}DeleteOne`, `z.object({ ${selectZodSchemaLine} ${includeZodSchemaLine} where: ${modelName}WhereUniqueInputObjectSchema })`)}`);
11386
11546
  }
11387
11547
  if (deleteMany) {
11388
11548
  const imports = [
11389
11549
  `import { ${modelName}WhereInputObjectSchema } from './objects/${modelName}WhereInput.schema'`
11390
11550
  ];
11391
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/${deleteMany}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}DeleteMany`, `z.object({ where: ${modelName}WhereInputObjectSchema.optional() })`)}`);
11551
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/${deleteMany}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}DeleteMany`, `z.object({ where: ${modelName}WhereInputObjectSchema.optional() })`)}`);
11392
11552
  }
11393
11553
  if (updateOne) {
11394
11554
  const imports = [
@@ -11398,20 +11558,20 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11398
11558
  `import { ${modelName}UncheckedUpdateInputObjectSchema } from './objects/${modelName}UncheckedUpdateInput.schema'`,
11399
11559
  `import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
11400
11560
  ];
11401
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/${updateOne}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}UpdateOne`, `z.object({ ${selectZodSchemaLine} ${includeZodSchemaLine} data: z.union([${modelName}UpdateInputObjectSchema, ${modelName}UncheckedUpdateInputObjectSchema]), where: ${modelName}WhereUniqueInputObjectSchema })`)}`);
11561
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/${updateOne}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}UpdateOne`, `z.object({ ${selectZodSchemaLine} ${includeZodSchemaLine} data: z.union([${modelName}UpdateInputObjectSchema, ${modelName}UncheckedUpdateInputObjectSchema]), where: ${modelName}WhereUniqueInputObjectSchema })`)}`);
11402
11562
  }
11403
11563
  if (updateMany) {
11404
11564
  const imports = [
11405
11565
  `import { ${modelName}UpdateManyMutationInputObjectSchema } from './objects/${modelName}UpdateManyMutationInput.schema'`,
11406
11566
  `import { ${modelName}WhereInputObjectSchema } from './objects/${modelName}WhereInput.schema'`
11407
11567
  ];
11408
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/${updateMany}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}UpdateMany`, `z.object({ data: ${modelName}UpdateManyMutationInputObjectSchema, where: ${modelName}WhereInputObjectSchema.optional() })`)}`);
11568
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/${updateMany}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}UpdateMany`, `z.object({ data: ${modelName}UpdateManyMutationInputObjectSchema, where: ${modelName}WhereInputObjectSchema.optional() })`)}`);
11409
11569
  }
11410
11570
  if (updateManyAndReturn) {
11411
11571
  const imports = [
11412
11572
  `import { ${modelName}UpdateManyAndReturnInputObjectSchema } from './objects/${modelName}UpdateManyAndReturnInput.schema'`
11413
11573
  ];
11414
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/${updateManyAndReturn}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}UpdateManyAndReturn`, `z.object({ data: z.union([ ${modelName}UpdateManyAndReturnInputObjectSchema, z.array(${modelName}UpdateManyAndReturnInputObjectSchema) ]), ${_Transformer.provider === "mongodb" || _Transformer.provider === "sqlserver" ? "" : "skipDuplicates: z.boolean().optional()"} })`)}`);
11574
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/${updateManyAndReturn}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}UpdateManyAndReturn`, `z.object({ data: z.union([ ${modelName}UpdateManyAndReturnInputObjectSchema, z.array(${modelName}UpdateManyAndReturnInputObjectSchema) ]), ${_Transformer.provider === "mongodb" || _Transformer.provider === "sqlserver" ? "" : "skipDuplicates: z.boolean().optional()"} })`)}`);
11415
11575
  }
11416
11576
  if (upsertOne) {
11417
11577
  const imports = [
@@ -11423,7 +11583,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11423
11583
  `import { ${modelName}UpdateInputObjectSchema } from './objects/${modelName}UpdateInput.schema'`,
11424
11584
  `import { ${modelName}UncheckedUpdateInputObjectSchema } from './objects/${modelName}UncheckedUpdateInput.schema'`
11425
11585
  ];
11426
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/${upsertOne}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}Upsert`, `z.object({ ${selectZodSchemaLine} ${includeZodSchemaLine} where: ${modelName}WhereUniqueInputObjectSchema, create: z.union([ ${modelName}CreateInputObjectSchema, ${modelName}UncheckedCreateInputObjectSchema ]), update: z.union([ ${modelName}UpdateInputObjectSchema, ${modelName}UncheckedUpdateInputObjectSchema ]) })`)}`);
11586
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/${upsertOne}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}Upsert`, `z.object({ ${selectZodSchemaLine} ${includeZodSchemaLine} where: ${modelName}WhereUniqueInputObjectSchema, create: z.union([ ${modelName}CreateInputObjectSchema, ${modelName}UncheckedCreateInputObjectSchema ]), update: z.union([ ${modelName}UpdateInputObjectSchema, ${modelName}UncheckedUpdateInputObjectSchema ]) })`)}`);
11427
11587
  }
11428
11588
  if (aggregate) {
11429
11589
  const imports = [
@@ -11454,7 +11614,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11454
11614
  aggregateOperations.push(`_sum: ${modelName}SumAggregateInputObjectSchema.optional()`);
11455
11615
  }
11456
11616
  }
11457
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/${aggregate}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}Aggregate`, `z.object({ ${orderByZodSchemaLine} where: ${modelName}WhereInputObjectSchema.optional(), cursor: ${modelName}WhereUniqueInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), ${aggregateOperations.join(", ")} })`)}`);
11617
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/${aggregate}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}Aggregate`, `z.object({ ${orderByZodSchemaLine} where: ${modelName}WhereInputObjectSchema.optional(), cursor: ${modelName}WhereUniqueInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), ${aggregateOperations.join(", ")} })`)}`);
11458
11618
  }
11459
11619
  if (groupBy) {
11460
11620
  const imports = [
@@ -11463,7 +11623,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11463
11623
  `import { ${modelName}ScalarWhereWithAggregatesInputObjectSchema } from './objects/${modelName}ScalarWhereWithAggregatesInput.schema'`,
11464
11624
  `import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
11465
11625
  ];
11466
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/${groupBy}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}GroupBy`, `z.object({ where: ${modelName}WhereInputObjectSchema.optional(), orderBy: z.union([${modelName}OrderByWithAggregationInputObjectSchema, ${modelName}OrderByWithAggregationInputObjectSchema.array()]).optional(), having: ${modelName}ScalarWhereWithAggregatesInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), by: z.array(${modelName}ScalarFieldEnumSchema) })`)}`);
11626
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/${groupBy}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}GroupBy`, `z.object({ where: ${modelName}WhereInputObjectSchema.optional(), orderBy: z.union([${modelName}OrderByWithAggregationInputObjectSchema, ${modelName}OrderByWithAggregationInputObjectSchema.array()]).optional(), having: ${modelName}ScalarWhereWithAggregatesInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), by: z.array(${modelName}ScalarFieldEnumSchema) })`)}`);
11467
11627
  }
11468
11628
  }
11469
11629
  }
@@ -12021,12 +12181,12 @@ ${JSON.stringify(config)}`);
12021
12181
  }
12022
12182
  resolveModelsComments(models, hiddenModels);
12023
12183
  consoleLog("Generating tRPC export file");
12024
- const trpcExports = project.createSourceFile(import_node_path6.default.resolve(outputDir, "trpc.ts"), void 0, {
12184
+ const trpcExports = project.createSourceFile(import_node_path7.default.resolve(outputDir, "trpc.ts"), void 0, {
12025
12185
  overwrite: true
12026
12186
  });
12027
12187
  await generateTRPCExports(trpcExports, config, options, outputDir);
12028
12188
  consoleLog("Generating tRPC app router");
12029
- const appRouter = project.createSourceFile(import_node_path6.default.resolve(outputDir, "routers", `index.ts`), void 0, {
12189
+ const appRouter = project.createSourceFile(import_node_path7.default.resolve(outputDir, "routers", `index.ts`), void 0, {
12030
12190
  overwrite: true
12031
12191
  });
12032
12192
  consoleLog("Generating tRPC router imports");
@@ -12055,7 +12215,7 @@ ${JSON.stringify(config)}`);
12055
12215
  const plural = (0, import_pluralize.default)(lowerCaseFirst(model));
12056
12216
  consoleLog(`Generating tRPC router for model ${model}`);
12057
12217
  generateRouterImport(appRouter, plural, model);
12058
- const modelRouter = project.createSourceFile(import_node_path6.default.resolve(outputDir, "routers", `${lowerCaseFirst(model)}.router.ts`), void 0, {
12218
+ const modelRouter = project.createSourceFile(import_node_path7.default.resolve(outputDir, "routers", `${lowerCaseFirst(model)}.router.ts`), void 0, {
12059
12219
  overwrite: true
12060
12220
  });
12061
12221
  generateCreateRouterImport({