@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.
package/dist/index.cjs CHANGED
@@ -29,9 +29,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  mod
30
30
  ));
31
31
 
32
- // ../../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
32
+ // ../../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
33
33
  var init_cjs_shims = __esm({
34
- "../../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"() {
34
+ "../../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"() {
35
35
  "use strict";
36
36
  }
37
37
  });
@@ -2635,7 +2635,7 @@ function lowerCaseFirst(input) {
2635
2635
  __name(lowerCaseFirst, "lowerCaseFirst");
2636
2636
 
2637
2637
  // src/prisma-generator.ts
2638
- var import_node_path6 = __toESM(require("node:path"), 1);
2638
+ var import_node_path7 = __toESM(require("node:path"), 1);
2639
2639
  var import_pluralize = __toESM(require_pluralize(), 1);
2640
2640
 
2641
2641
  // src/config.ts
@@ -6907,12 +6907,31 @@ init_cjs_shims();
6907
6907
  var EMPTY_STRING = "";
6908
6908
  var $NestedValue = Symbol("NestedValue");
6909
6909
 
6910
+ // ../path/src/file-path-fns.ts
6911
+ var import_node_path2 = require("node:path");
6912
+
6910
6913
  // ../path/src/correct-path.ts
6911
6914
  init_cjs_shims();
6912
6915
 
6913
6916
  // ../path/src/is-file.ts
6914
6917
  init_cjs_shims();
6915
6918
  var import_node_fs2 = require("node:fs");
6919
+
6920
+ // ../path/src/regex.ts
6921
+ init_cjs_shims();
6922
+ var DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
6923
+ var DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
6924
+ var UNC_REGEX = /^[/\\]{2}/;
6925
+ var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
6926
+
6927
+ // ../path/src/slash.ts
6928
+ init_cjs_shims();
6929
+ function slash(str) {
6930
+ return str.replace(/\\/g, "/");
6931
+ }
6932
+ __name(slash, "slash");
6933
+
6934
+ // ../path/src/is-file.ts
6916
6935
  function isFile(path6, additionalPath) {
6917
6936
  return Boolean((0, import_node_fs2.statSync)(additionalPath ? joinPaths(additionalPath, path6) : path6, {
6918
6937
  throwIfNoEntry: false
@@ -6926,29 +6945,26 @@ function isDirectory(path6, additionalPath) {
6926
6945
  }
6927
6946
  __name(isDirectory, "isDirectory");
6928
6947
  function isAbsolutePath(path6) {
6929
- return !/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i.test(path6);
6948
+ return ABSOLUTE_PATH_REGEX.test(slash(path6));
6930
6949
  }
6931
6950
  __name(isAbsolutePath, "isAbsolutePath");
6932
6951
 
6933
6952
  // ../path/src/correct-path.ts
6934
- var _DRIVE_LETTER_START_RE2 = /^[A-Z]:\//i;
6935
6953
  function normalizeWindowsPath2(input = "") {
6936
6954
  if (!input) {
6937
6955
  return input;
6938
6956
  }
6939
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE2, (r) => r.toUpperCase());
6957
+ return slash(input).replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
6940
6958
  }
6941
6959
  __name(normalizeWindowsPath2, "normalizeWindowsPath");
6942
- var _UNC_REGEX2 = /^[/\\]{2}/;
6943
- var _DRIVE_LETTER_RE2 = /^[A-Z]:$/i;
6944
6960
  function correctPath(path6) {
6945
6961
  if (!path6 || path6.length === 0) {
6946
6962
  return ".";
6947
6963
  }
6948
6964
  path6 = normalizeWindowsPath2(path6);
6949
- const isUNCPath = path6.match(_UNC_REGEX2);
6965
+ const isUNCPath = path6.match(UNC_REGEX);
6950
6966
  const isPathAbsolute = isAbsolutePath(path6);
6951
- const trailingSeparator = path6[path6.length - 1] === "/";
6967
+ const trailingSeparator = path6.endsWith("/");
6952
6968
  path6 = normalizeString2(path6, !isPathAbsolute);
6953
6969
  if (path6.length === 0) {
6954
6970
  if (isPathAbsolute) {
@@ -6959,7 +6975,7 @@ function correctPath(path6) {
6959
6975
  if (trailingSeparator) {
6960
6976
  path6 += "/";
6961
6977
  }
6962
- if (_DRIVE_LETTER_RE2.test(path6)) {
6978
+ if (DRIVE_LETTER_REGEX.test(path6)) {
6963
6979
  path6 += "/";
6964
6980
  }
6965
6981
  if (isUNCPath) {
@@ -6968,7 +6984,7 @@ function correctPath(path6) {
6968
6984
  }
6969
6985
  return `//${path6}`;
6970
6986
  }
6971
- return isPathAbsolute && !isAbsolutePath(path6) ? `/${path6}` : path6;
6987
+ return !path6.startsWith("/") && isPathAbsolute && !DRIVE_LETTER_REGEX.test(path6) ? `/${path6}` : path6;
6972
6988
  }
6973
6989
  __name(correctPath, "correctPath");
6974
6990
  function normalizeString2(path6, allowAboveRoot) {
@@ -7036,65 +7052,28 @@ __name(normalizeString2, "normalizeString");
7036
7052
  // ../path/src/get-workspace-root.ts
7037
7053
  init_cjs_shims();
7038
7054
 
7039
- // ../../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
7055
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/index.js
7040
7056
  init_cjs_shims();
7041
7057
 
7042
- // ../../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
7043
- init_cjs_shims();
7044
-
7045
- // ../../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
7046
- init_cjs_shims();
7047
-
7048
- // ../../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
7049
- init_cjs_shims();
7050
- var __defProp2 = Object.defineProperty;
7051
- var __name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name", {
7052
- value,
7053
- configurable: true
7054
- }), "__name");
7055
-
7056
- // ../../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
7057
- var import_node_fs3 = require("node:fs");
7058
- var import_node_path = require("node:path");
7059
- var MAX_PATH_SEARCH_DEPTH = 30;
7060
- var depth = 0;
7061
- function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
7062
- const _startPath = startPath ?? process.cwd();
7063
- if (endDirectoryNames.some((endDirName) => (0, import_node_fs3.existsSync)((0, import_node_path.join)(_startPath, endDirName)))) {
7064
- return _startPath;
7065
- }
7066
- if (endFileNames.some((endFileName) => (0, import_node_fs3.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
7067
- return _startPath;
7068
- }
7069
- if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
7070
- const parent = (0, import_node_path.join)(_startPath, "..");
7071
- return findFolderUp(parent, endFileNames, endDirectoryNames);
7072
- }
7073
- return void 0;
7074
- }
7075
- __name(findFolderUp, "findFolderUp");
7076
- __name2(findFolderUp, "findFolderUp");
7077
-
7078
- // ../../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
7058
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
7079
7059
  init_cjs_shims();
7080
- var _DRIVE_LETTER_START_RE3 = /^[A-Za-z]:\//;
7060
+ var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
7081
7061
  function normalizeWindowsPath3(input = "") {
7082
7062
  if (!input) {
7083
7063
  return input;
7084
7064
  }
7085
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE3, (r) => r.toUpperCase());
7065
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE2, (r) => r.toUpperCase());
7086
7066
  }
7087
7067
  __name(normalizeWindowsPath3, "normalizeWindowsPath");
7088
- __name2(normalizeWindowsPath3, "normalizeWindowsPath");
7089
- var _UNC_REGEX3 = /^[/\\]{2}/;
7068
+ var _UNC_REGEX2 = /^[/\\]{2}/;
7090
7069
  var _IS_ABSOLUTE_RE2 = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
7091
- var _DRIVE_LETTER_RE3 = /^[A-Za-z]:$/;
7092
- var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
7070
+ var _DRIVE_LETTER_RE2 = /^[A-Za-z]:$/;
7071
+ var correctPaths2 = /* @__PURE__ */ __name(function(path6) {
7093
7072
  if (!path6 || path6.length === 0) {
7094
7073
  return ".";
7095
7074
  }
7096
7075
  path6 = normalizeWindowsPath3(path6);
7097
- const isUNCPath = path6.match(_UNC_REGEX3);
7076
+ const isUNCPath = path6.match(_UNC_REGEX2);
7098
7077
  const isPathAbsolute = isAbsolute2(path6);
7099
7078
  const trailingSeparator = path6[path6.length - 1] === "/";
7100
7079
  path6 = normalizeString3(path6, !isPathAbsolute);
@@ -7107,7 +7086,7 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
7107
7086
  if (trailingSeparator) {
7108
7087
  path6 += "/";
7109
7088
  }
7110
- if (_DRIVE_LETTER_RE3.test(path6)) {
7089
+ if (_DRIVE_LETTER_RE2.test(path6)) {
7111
7090
  path6 += "/";
7112
7091
  }
7113
7092
  if (isUNCPath) {
@@ -7118,14 +7097,6 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
7118
7097
  }
7119
7098
  return isPathAbsolute && !isAbsolute2(path6) ? `/${path6}` : path6;
7120
7099
  }, "correctPaths");
7121
- function cwd() {
7122
- if (typeof process !== "undefined" && typeof process.cwd === "function") {
7123
- return process.cwd().replace(/\\/g, "/");
7124
- }
7125
- return "/";
7126
- }
7127
- __name(cwd, "cwd");
7128
- __name2(cwd, "cwd");
7129
7100
  function normalizeString3(path6, allowAboveRoot) {
7130
7101
  let res = "";
7131
7102
  let lastSegmentLength = 0;
@@ -7187,12 +7158,36 @@ function normalizeString3(path6, allowAboveRoot) {
7187
7158
  return res;
7188
7159
  }
7189
7160
  __name(normalizeString3, "normalizeString");
7190
- __name2(normalizeString3, "normalizeString");
7191
- var isAbsolute2 = /* @__PURE__ */ __name2(function(p) {
7161
+ var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
7192
7162
  return _IS_ABSOLUTE_RE2.test(p);
7193
7163
  }, "isAbsolute");
7194
7164
 
7195
- // ../../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
7165
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
7166
+ init_cjs_shims();
7167
+
7168
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-RWBPUJIZ.js
7169
+ init_cjs_shims();
7170
+ var import_node_fs3 = require("node:fs");
7171
+ var import_node_path = require("node:path");
7172
+ var MAX_PATH_SEARCH_DEPTH = 30;
7173
+ var depth = 0;
7174
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
7175
+ const _startPath = startPath ?? process.cwd();
7176
+ if (endDirectoryNames.some((endDirName) => (0, import_node_fs3.existsSync)((0, import_node_path.join)(_startPath, endDirName)))) {
7177
+ return _startPath;
7178
+ }
7179
+ if (endFileNames.some((endFileName) => (0, import_node_fs3.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
7180
+ return _startPath;
7181
+ }
7182
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
7183
+ const parent = (0, import_node_path.join)(_startPath, "..");
7184
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
7185
+ }
7186
+ return void 0;
7187
+ }
7188
+ __name(findFolderUp, "findFolderUp");
7189
+
7190
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
7196
7191
  var rootFiles = [
7197
7192
  "storm-workspace.json",
7198
7193
  "storm-workspace.json",
@@ -7242,31 +7237,19 @@ function findWorkspaceRootSafe(pathInsideMonorepo) {
7242
7237
  return correctPaths2(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
7243
7238
  }
7244
7239
  __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
7245
- __name2(findWorkspaceRootSafe, "findWorkspaceRootSafe");
7246
- function findWorkspaceRoot(pathInsideMonorepo) {
7247
- const result = findWorkspaceRootSafe(pathInsideMonorepo);
7248
- if (!result) {
7249
- throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
7250
- ${rootFiles.join("\n")}
7251
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
7252
- }
7253
- return result;
7254
- }
7255
- __name(findWorkspaceRoot, "findWorkspaceRoot");
7256
- __name2(findWorkspaceRoot, "findWorkspaceRoot");
7257
7240
 
7258
7241
  // ../path/src/get-parent-path.ts
7259
7242
  init_cjs_shims();
7260
7243
  var resolveParentPath = /* @__PURE__ */ __name((path6) => {
7261
7244
  return resolvePaths(path6, "..");
7262
7245
  }, "resolveParentPath");
7263
- var getParentPath = /* @__PURE__ */ __name((name, cwd2, options) => {
7246
+ var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
7264
7247
  const ignoreCase = options?.ignoreCase ?? true;
7265
7248
  const skipCwd = options?.skipCwd ?? false;
7266
7249
  const targetType = options?.targetType ?? "both";
7267
- let dir = cwd2;
7250
+ let dir = cwd;
7268
7251
  if (skipCwd) {
7269
- dir = resolveParentPath(cwd2);
7252
+ dir = resolveParentPath(cwd);
7270
7253
  }
7271
7254
  let names = Array.isArray(name) ? name : [
7272
7255
  name
@@ -7363,12 +7346,12 @@ function findFilePath(filePath) {
7363
7346
  }), "");
7364
7347
  }
7365
7348
  __name(findFilePath, "findFilePath");
7366
- function resolvePath(path6, cwd2 = getWorkspaceRoot()) {
7349
+ function resolvePath(path6, cwd = getWorkspaceRoot()) {
7367
7350
  const paths = normalizeWindowsPath2(path6).split("/");
7368
7351
  let resolvedPath = "";
7369
7352
  let resolvedAbsolute = false;
7370
7353
  for (let index = paths.length - 1; index >= -1 && !resolvedAbsolute; index--) {
7371
- const path7 = index >= 0 ? paths[index] : cwd2;
7354
+ const path7 = index >= 0 ? paths[index] : cwd;
7372
7355
  if (!path7 || path7.length === 0) {
7373
7356
  continue;
7374
7357
  }
@@ -7387,25 +7370,7 @@ function resolvePaths(...paths) {
7387
7370
  }
7388
7371
  __name(resolvePaths, "resolvePaths");
7389
7372
  function relativePath(from, to) {
7390
- const _from = resolvePath(from).replace(/^\/([A-Z]:)?$/i, "$1").split("/");
7391
- const _to = resolvePath(to).replace(/^\/([A-Z]:)?$/i, "$1").split("/");
7392
- if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
7393
- return _to.join("/");
7394
- }
7395
- const _fromCopy = [
7396
- ..._from
7397
- ];
7398
- for (const segment of _fromCopy) {
7399
- if (_to[0] !== segment) {
7400
- break;
7401
- }
7402
- _from.shift();
7403
- _to.shift();
7404
- }
7405
- return [
7406
- ..._from.map(() => ".."),
7407
- ..._to
7408
- ].join("/");
7373
+ return (0, import_node_path2.relative)(from.replace(/\/$/, ""), to.replace(/\/$/, ""));
7409
7374
  }
7410
7375
  __name(relativePath, "relativePath");
7411
7376
 
@@ -7440,46 +7405,200 @@ init_cjs_shims();
7440
7405
  // ../string-format/src/acronyms.ts
7441
7406
  init_cjs_shims();
7442
7407
  var ACRONYMS = [
7408
+ "3D",
7409
+ "4D",
7410
+ "5G",
7411
+ "6G",
7412
+ "7G",
7413
+ "8G",
7414
+ "ACID",
7415
+ "AES",
7416
+ "AI",
7417
+ "AJAX",
7443
7418
  "API",
7419
+ "AR",
7420
+ "ASCII",
7421
+ "B2B",
7422
+ "B2C",
7423
+ "BFF",
7424
+ "BI",
7425
+ "BIOS",
7426
+ "BGP",
7427
+ "BOM",
7428
+ "BYOD",
7429
+ "C2C",
7430
+ "CAGR",
7431
+ "CAPTCHA",
7432
+ "CD",
7433
+ "CDN",
7434
+ "CDP",
7435
+ "CI",
7436
+ "CI/CD",
7437
+ "CIAM",
7438
+ "CICD",
7439
+ "CLI",
7440
+ "CMDB",
7441
+ "CORS",
7444
7442
  "CPU",
7443
+ "CRUD",
7444
+ "CSR",
7445
7445
  "CSS",
7446
+ "CX",
7447
+ "DAG",
7448
+ "DBMS",
7449
+ "DDoS",
7446
7450
  "DNS",
7451
+ "DNSSEC",
7452
+ "DOM",
7453
+ "DR",
7454
+ "DRM",
7455
+ "DWH",
7456
+ "E2E",
7457
+ "EAI",
7458
+ "EKS",
7447
7459
  "EOF",
7460
+ "EOD",
7461
+ "ETC",
7462
+ "ETL",
7463
+ "EULA",
7464
+ "FIDO",
7465
+ "FQDN",
7466
+ "FTP",
7467
+ "FaaS",
7468
+ "GDPR",
7469
+ "GCP",
7470
+ "GPU",
7448
7471
  "GUID",
7472
+ "GUI",
7473
+ "GZIP",
7474
+ "HCI",
7475
+ "HDD",
7476
+ "HDFS",
7477
+ "HIPAA",
7478
+ "HMAC",
7479
+ "HOTP",
7480
+ "HSM",
7449
7481
  "HTML",
7450
7482
  "HTTP",
7483
+ "HTTP/2",
7484
+ "HTTP/2.0",
7485
+ "HTTP/3",
7486
+ "HTTP/3.0",
7487
+ "HTTP2",
7451
7488
  "HTTPS",
7489
+ "HTTPS/2",
7490
+ "HTTPS/3",
7491
+ "HTTPS3",
7492
+ "IAM",
7493
+ "IAMM",
7494
+ "IAMT",
7495
+ "IaaS",
7452
7496
  "ID",
7497
+ "IMAP",
7453
7498
  "IP",
7499
+ "IPFS",
7500
+ "IoT",
7454
7501
  "JSON",
7502
+ "JSONP",
7503
+ "JWT",
7504
+ "K8s",
7505
+ "KMS",
7506
+ "KPI",
7507
+ "LAN",
7455
7508
  "LHS",
7509
+ "LXC",
7510
+ "MFA",
7511
+ "ML",
7512
+ "MLOps",
7513
+ "MVC",
7514
+ "MVP",
7515
+ "NAS",
7516
+ "NAT",
7517
+ "NDA",
7518
+ "NFS",
7519
+ "NIST",
7520
+ "NLP",
7521
+ "NPS",
7522
+ "OCR",
7456
7523
  "OEM",
7524
+ "OKR",
7525
+ "OLAP",
7526
+ "OLTP",
7527
+ "OOP",
7528
+ "ORM",
7529
+ "OS",
7530
+ "OTP",
7531
+ "P2P",
7532
+ "PDP",
7533
+ "PaaS",
7534
+ "PCI",
7535
+ "PKI",
7457
7536
  "PP",
7537
+ "PWA",
7538
+ "PX",
7458
7539
  "QA",
7540
+ "RAID",
7459
7541
  "RAM",
7542
+ "RDS",
7543
+ "REST",
7460
7544
  "RHS",
7461
7545
  "RPC",
7546
+ "RPA",
7547
+ "RUM",
7462
7548
  "RSS",
7549
+ "SAN",
7550
+ "SASE",
7551
+ "SDLC",
7552
+ "SDK",
7553
+ "SEO",
7554
+ "SFTP",
7555
+ "SIEM",
7463
7556
  "SLA",
7557
+ "SMB",
7464
7558
  "SMTP",
7559
+ "SOAP",
7560
+ "SOC",
7561
+ "SOA",
7562
+ "SPDY",
7563
+ "SPF",
7465
7564
  "SQL",
7565
+ "SRV",
7566
+ "SRE",
7466
7567
  "SSH",
7568
+ "SSDL",
7569
+ "SSO",
7467
7570
  "SSL",
7468
- "TCP",
7571
+ "SSR",
7572
+ "TDD",
7573
+ "TLD",
7469
7574
  "TLS",
7575
+ "TLS1.3",
7576
+ "TOTP",
7470
7577
  "TRPC",
7471
7578
  "TTL",
7472
7579
  "UDP",
7473
7580
  "UI",
7474
7581
  "UID",
7475
- "UUID",
7476
7582
  "URI",
7477
7583
  "URL",
7478
7584
  "UTF",
7585
+ "UUID",
7586
+ "UX",
7479
7587
  "VM",
7588
+ "VLAN",
7589
+ "VPN",
7590
+ "VR",
7591
+ "WAF",
7592
+ "WAN",
7593
+ "WLAN",
7594
+ "WPA",
7595
+ "XACML",
7480
7596
  "XML",
7597
+ "XSRF",
7481
7598
  "XSS",
7482
- "XSRF"
7599
+ "XR",
7600
+ "YAML",
7601
+ "ZTA"
7483
7602
  ];
7484
7603
 
7485
7604
  // ../string-format/src/upper-case-first.ts
@@ -7494,7 +7613,7 @@ function titleCase(input) {
7494
7613
  if (!input) {
7495
7614
  return input;
7496
7615
  }
7497
- return input.split(/(?=[A-Z])|[\s._-]/).map((s) => s.trim()).filter(Boolean).map((s) => ACRONYMS.includes(s) ? s.toUpperCase() : upperCaseFirst(s.toLowerCase())).join(" ");
7616
+ 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(" ");
7498
7617
  }
7499
7618
  __name(titleCase, "titleCase");
7500
7619
 
@@ -7510,7 +7629,7 @@ var isString = /* @__PURE__ */ __name((value) => {
7510
7629
 
7511
7630
  // ../env/src/get-env-paths.ts
7512
7631
  var import_node_os = __toESM(require("node:os"), 1);
7513
- var import_node_path2 = __toESM(require("node:path"), 1);
7632
+ var import_node_path3 = __toESM(require("node:path"), 1);
7514
7633
  var homedir = import_node_os.default.homedir();
7515
7634
  var tmpdir = import_node_os.default.tmpdir();
7516
7635
  var macos = /* @__PURE__ */ __name((orgId) => {
@@ -7537,14 +7656,15 @@ var windows = /* @__PURE__ */ __name((orgId) => {
7537
7656
  };
7538
7657
  }, "windows");
7539
7658
  var linux = /* @__PURE__ */ __name((orgId) => {
7540
- const username = import_node_path2.default.basename(homedir);
7659
+ const username = import_node_path3.default.basename(homedir);
7541
7660
  return {
7542
7661
  data: joinPaths(process.env.XDG_DATA_HOME || joinPaths(homedir, ".local", "share"), orgId),
7543
7662
  config: joinPaths(process.env.XDG_CONFIG_HOME || joinPaths(homedir, ".config"), orgId),
7544
7663
  cache: joinPaths(process.env.XDG_CACHE_HOME || joinPaths(homedir, ".cache"), orgId),
7545
7664
  // https://wiki.debian.org/XDGBaseDirectorySpecification#state
7546
7665
  log: joinPaths(process.env.XDG_STATE_HOME || joinPaths(homedir, ".local", "state"), orgId),
7547
- temp: joinPaths(tmpdir, username, orgId)
7666
+ // https://devenv.sh/files-and-variables/#devenv_root
7667
+ 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)
7548
7668
  };
7549
7669
  }, "linux");
7550
7670
  function getEnvPaths(options = {}) {
@@ -7563,16 +7683,16 @@ function getEnvPaths(options = {}) {
7563
7683
  } else {
7564
7684
  result = linux(orgId);
7565
7685
  }
7566
- if (process.env.STORM_DATA_DIRECTORY) {
7567
- result.data = process.env.STORM_DATA_DIRECTORY;
7568
- } else if (process.env.STORM_CONFIG_DIRECTORY) {
7569
- result.config = process.env.STORM_CONFIG_DIRECTORY;
7570
- } else if (process.env.STORM_CACHE_DIRECTORY) {
7571
- result.cache = process.env.STORM_CACHE_DIRECTORY;
7572
- } else if (process.env.STORM_LOG_DIRECTORY) {
7573
- result.log = process.env.STORM_LOG_DIRECTORY;
7574
- } else if (process.env.STORM_TEMP_DIRECTORY) {
7575
- result.temp = process.env.STORM_TEMP_DIRECTORY;
7686
+ if (process.env.STORM_DATA_DIR) {
7687
+ result.data = process.env.STORM_DATA_DIR;
7688
+ } else if (process.env.STORM_CONFIG_DIR) {
7689
+ result.config = process.env.STORM_CONFIG_DIR;
7690
+ } else if (process.env.STORM_CACHE_DIR) {
7691
+ result.cache = process.env.STORM_CACHE_DIR;
7692
+ } else if (process.env.STORM_LOG_DIR) {
7693
+ result.log = process.env.STORM_LOG_DIR;
7694
+ } else if (process.env.STORM_TEMP_DIR) {
7695
+ result.temp = process.env.STORM_TEMP_DIR;
7576
7696
  }
7577
7697
  if (options.workspaceRoot) {
7578
7698
  result.cache ??= joinPaths(options.workspaceRoot, "node_modules", ".cache", orgId);
@@ -7620,7 +7740,7 @@ __name(getPrismaGeneratorHelper, "getPrismaGeneratorHelper");
7620
7740
 
7621
7741
  // src/zod/model-helpers.ts
7622
7742
  init_cjs_shims();
7623
- var import_node_path3 = __toESM(require("node:path"), 1);
7743
+ var import_node_path4 = __toESM(require("node:path"), 1);
7624
7744
  var import_ts_morph2 = require("ts-morph");
7625
7745
 
7626
7746
  // src/zod/docs-helpers.ts
@@ -7730,7 +7850,7 @@ var writeImportsForModel = /* @__PURE__ */ __name(async (model, sourceFile, conf
7730
7850
  importList.push({
7731
7851
  kind: import_ts_morph2.StructureKind.ImportDeclaration,
7732
7852
  namespaceImport: "imports",
7733
- moduleSpecifier: dotSlash(import_node_path3.default.relative(outputPath, import_node_path3.default.resolve(import_node_path3.default.dirname(options.schemaPath), config.imports)))
7853
+ moduleSpecifier: dotSlash(import_node_path4.default.relative(outputPath, import_node_path4.default.resolve(import_node_path4.default.dirname(options.schemaPath), config.imports)))
7734
7854
  });
7735
7855
  }
7736
7856
  if (config.useDecimalJs && model.fields.some((f) => f.type === "Decimal")) {
@@ -7745,7 +7865,7 @@ var writeImportsForModel = /* @__PURE__ */ __name(async (model, sourceFile, conf
7745
7865
  const enumFields = model.fields.filter((f) => f.kind === "enum");
7746
7866
  const relationFields = model.fields.filter((f) => f.kind === "object");
7747
7867
  const clientPath = options.otherGenerators.find((each) => each.provider.value === "prisma-client-js").output.value;
7748
- const relativePath2 = import_node_path3.default.relative(outputPath, clientPath);
7868
+ const relativePath2 = import_node_path4.default.relative(outputPath, clientPath);
7749
7869
  if (enumFields.length > 0) {
7750
7870
  importList.push({
7751
7871
  kind: import_ts_morph2.StructureKind.ImportDeclaration,
@@ -10531,7 +10651,47 @@ var isNumber2 = /* @__PURE__ */ __name((value) => {
10531
10651
  }
10532
10652
  }, "isNumber");
10533
10653
 
10654
+ // ../type-checks/src/is-undefined.ts
10655
+ init_cjs_shims();
10656
+ var isUndefined3 = /* @__PURE__ */ __name((value) => {
10657
+ return value === void 0;
10658
+ }, "isUndefined");
10659
+
10534
10660
  // ../json/src/utils/stringify.ts
10661
+ var invalidKeyChars = [
10662
+ "@",
10663
+ "/",
10664
+ "#",
10665
+ "$",
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
+ ];
10535
10695
  var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
10536
10696
  const space = isNumber2(spacing) ? " ".repeat(spacing) : spacing;
10537
10697
  switch (value) {
@@ -10568,8 +10728,8 @@ var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
10568
10728
  return JSON.stringify(value);
10569
10729
  }
10570
10730
  case "object": {
10571
- const keys = Object.keys(value);
10572
- return `{${space}${keys.map((k) => `${k}: ${space}${stringify2(value[k], space)}`).join(`,${space}`)}${space}}`;
10731
+ const keys = Object.keys(value).filter((key) => !isUndefined3(value[key]));
10732
+ return `{${space}${keys.map((key) => `${invalidKeyChars.some((invalidKeyChar) => key.includes(invalidKeyChar)) ? `"${key}"` : key}: ${space}${stringify2(value[key], space)}`).join(`,${space}`)}${space}}`;
10573
10733
  }
10574
10734
  default:
10575
10735
  return "null";
@@ -10709,7 +10869,7 @@ var writeFile = /* @__PURE__ */ __name(async (filePath, content = "", options =
10709
10869
  }, "writeFile");
10710
10870
 
10711
10871
  // src/utils/write-file-safely.ts
10712
- var import_node_path4 = __toESM(require("node:path"), 1);
10872
+ var import_node_path5 = __toESM(require("node:path"), 1);
10713
10873
 
10714
10874
  // src/utils/format-file.ts
10715
10875
  init_cjs_shims();
@@ -10753,7 +10913,7 @@ var writeFileSafely = /* @__PURE__ */ __name(async (writeLocation, content, addT
10753
10913
  }, "writeFileSafely");
10754
10914
  var writeIndexFile = /* @__PURE__ */ __name(async (indexPath) => {
10755
10915
  const rows = Array.from(indexExports).map((filePath) => {
10756
- let relativePath2 = import_node_path4.default.relative(import_node_path4.default.dirname(indexPath), filePath);
10916
+ let relativePath2 = import_node_path5.default.relative(import_node_path5.default.dirname(indexPath), filePath);
10757
10917
  if (relativePath2.endsWith(".ts")) {
10758
10918
  relativePath2 = relativePath2.slice(0, relativePath2.lastIndexOf(".ts"));
10759
10919
  }
@@ -10931,7 +11091,7 @@ init_cjs_shims();
10931
11091
 
10932
11092
  // src/zod/transformer.ts
10933
11093
  init_cjs_shims();
10934
- var import_node_path5 = __toESM(require("node:path"), 1);
11094
+ var import_node_path6 = __toESM(require("node:path"), 1);
10935
11095
 
10936
11096
  // src/zod/mongodb-helpers.ts
10937
11097
  init_cjs_shims();
@@ -11041,13 +11201,13 @@ var Transformer = class _Transformer {
11041
11201
  this.isCustomPrismaClientOutputPath = prismaClientCustomPath !== "@prisma/client";
11042
11202
  }
11043
11203
  static async generateIndex() {
11044
- const indexPath = import_node_path5.default.join(_Transformer.outputPath, "schemas/index.ts");
11204
+ const indexPath = import_node_path6.default.join(_Transformer.outputPath, "schemas/index.ts");
11045
11205
  await writeIndexFile(indexPath);
11046
11206
  }
11047
11207
  async generateEnumSchemas() {
11048
11208
  for (const enumType2 of this.enumTypes) {
11049
11209
  const { name, values } = enumType2;
11050
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/enums/${lowerCaseFirst(name)}.schema.ts`), `${this.generateImportZodStatement()}
11210
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/enums/${lowerCaseFirst(name)}.schema.ts`), `${this.generateImportZodStatement()}
11051
11211
  ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.stringify(values)})`)}`);
11052
11212
  }
11053
11213
  }
@@ -11061,7 +11221,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11061
11221
  const zodObjectSchemaFields = this.generateObjectSchemaFields();
11062
11222
  const objectSchema = this.prepareObjectSchema(zodObjectSchemaFields);
11063
11223
  const objectSchemaName = this.resolveObjectSchemaName();
11064
- await writeFileSafely(import_node_path5.default.join(_Transformer.outputPath, `schemas/objects/${lowerCaseFirst(objectSchemaName)}.schema.ts`), objectSchema);
11224
+ await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/objects/${lowerCaseFirst(objectSchemaName)}.schema.ts`), objectSchema);
11065
11225
  }
11066
11226
  generateObjectSchemaFields() {
11067
11227
  const zodObjectSchemaFields = this.fields.map((field) => this.generateObjectSchemaField(field)).flatMap((item) => item).map((item) => {
@@ -11195,9 +11355,9 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11195
11355
  generateImportPrismaStatement() {
11196
11356
  let prismaClientImportPath;
11197
11357
  if (_Transformer.isCustomPrismaClientOutputPath) {
11198
- const fromPath = import_node_path5.default.join(_Transformer.outputPath, "schemas", "objects");
11358
+ const fromPath = import_node_path6.default.join(_Transformer.outputPath, "schemas", "objects");
11199
11359
  const toPath = _Transformer.prismaClientOutputPath;
11200
- const relativePathFromOutputToPrismaClient = import_node_path5.default.relative(fromPath, toPath).split(import_node_path5.default.sep).join(import_node_path5.default.posix.sep);
11360
+ const relativePathFromOutputToPrismaClient = import_node_path6.default.relative(fromPath, toPath).split(import_node_path6.default.sep).join(import_node_path6.default.posix.sep);
11201
11361
  prismaClientImportPath = relativePathFromOutputToPrismaClient;
11202
11362
  } else {
11203
11363
  prismaClientImportPath = _Transformer.prismaClientOutputPath;
@@ -11327,7 +11487,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11327
11487
  includeImport,
11328
11488
  `import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
11329
11489
  ];
11330
- 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 })`)}`);
11490
+ 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 })`)}`);
11331
11491
  }
11332
11492
  if (findFirst) {
11333
11493
  const imports = [
@@ -11338,7 +11498,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11338
11498
  `import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`,
11339
11499
  `import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
11340
11500
  ];
11341
- 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() })`)}`);
11501
+ 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() })`)}`);
11342
11502
  }
11343
11503
  if (findMany) {
11344
11504
  const imports = [
@@ -11349,7 +11509,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11349
11509
  `import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`,
11350
11510
  `import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
11351
11511
  ];
11352
- 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() })`)}`);
11512
+ 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() })`)}`);
11353
11513
  }
11354
11514
  if (createOne) {
11355
11515
  const imports = [
@@ -11358,19 +11518,19 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11358
11518
  `import { ${modelName}CreateInputObjectSchema } from './objects/${modelName}CreateInput.schema'`,
11359
11519
  `import { ${modelName}UncheckedCreateInputObjectSchema } from './objects/${modelName}UncheckedCreateInput.schema'`
11360
11520
  ];
11361
- 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]) })`)}`);
11521
+ 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]) })`)}`);
11362
11522
  }
11363
11523
  if (createMany) {
11364
11524
  const imports = [
11365
11525
  `import { ${modelName}CreateManyInputObjectSchema } from './objects/${modelName}CreateManyInput.schema'`
11366
11526
  ];
11367
- 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()"} })`)}`);
11527
+ 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()"} })`)}`);
11368
11528
  }
11369
11529
  if (createManyAndReturn) {
11370
11530
  const imports = [
11371
11531
  `import { ${modelName}CreateManyAndReturnInputObjectSchema } from './objects/${modelName}CreateManyAndReturnInput.schema'`
11372
11532
  ];
11373
- 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()"} })`)}`);
11533
+ 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()"} })`)}`);
11374
11534
  }
11375
11535
  if (deleteOne) {
11376
11536
  const imports = [
@@ -11378,13 +11538,13 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11378
11538
  includeImport,
11379
11539
  `import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
11380
11540
  ];
11381
- 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 })`)}`);
11541
+ 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 })`)}`);
11382
11542
  }
11383
11543
  if (deleteMany) {
11384
11544
  const imports = [
11385
11545
  `import { ${modelName}WhereInputObjectSchema } from './objects/${modelName}WhereInput.schema'`
11386
11546
  ];
11387
- 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() })`)}`);
11547
+ 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() })`)}`);
11388
11548
  }
11389
11549
  if (updateOne) {
11390
11550
  const imports = [
@@ -11394,20 +11554,20 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11394
11554
  `import { ${modelName}UncheckedUpdateInputObjectSchema } from './objects/${modelName}UncheckedUpdateInput.schema'`,
11395
11555
  `import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
11396
11556
  ];
11397
- 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 })`)}`);
11557
+ 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 })`)}`);
11398
11558
  }
11399
11559
  if (updateMany) {
11400
11560
  const imports = [
11401
11561
  `import { ${modelName}UpdateManyMutationInputObjectSchema } from './objects/${modelName}UpdateManyMutationInput.schema'`,
11402
11562
  `import { ${modelName}WhereInputObjectSchema } from './objects/${modelName}WhereInput.schema'`
11403
11563
  ];
11404
- 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() })`)}`);
11564
+ 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() })`)}`);
11405
11565
  }
11406
11566
  if (updateManyAndReturn) {
11407
11567
  const imports = [
11408
11568
  `import { ${modelName}UpdateManyAndReturnInputObjectSchema } from './objects/${modelName}UpdateManyAndReturnInput.schema'`
11409
11569
  ];
11410
- 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()"} })`)}`);
11570
+ 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()"} })`)}`);
11411
11571
  }
11412
11572
  if (upsertOne) {
11413
11573
  const imports = [
@@ -11419,7 +11579,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11419
11579
  `import { ${modelName}UpdateInputObjectSchema } from './objects/${modelName}UpdateInput.schema'`,
11420
11580
  `import { ${modelName}UncheckedUpdateInputObjectSchema } from './objects/${modelName}UncheckedUpdateInput.schema'`
11421
11581
  ];
11422
- 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 ]) })`)}`);
11582
+ 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 ]) })`)}`);
11423
11583
  }
11424
11584
  if (aggregate) {
11425
11585
  const imports = [
@@ -11450,7 +11610,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11450
11610
  aggregateOperations.push(`_sum: ${modelName}SumAggregateInputObjectSchema.optional()`);
11451
11611
  }
11452
11612
  }
11453
- 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(", ")} })`)}`);
11613
+ 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(", ")} })`)}`);
11454
11614
  }
11455
11615
  if (groupBy) {
11456
11616
  const imports = [
@@ -11459,7 +11619,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
11459
11619
  `import { ${modelName}ScalarWhereWithAggregatesInputObjectSchema } from './objects/${modelName}ScalarWhereWithAggregatesInput.schema'`,
11460
11620
  `import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
11461
11621
  ];
11462
- 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) })`)}`);
11622
+ 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) })`)}`);
11463
11623
  }
11464
11624
  }
11465
11625
  }
@@ -12017,12 +12177,12 @@ ${JSON.stringify(config)}`);
12017
12177
  }
12018
12178
  resolveModelsComments(models, hiddenModels);
12019
12179
  consoleLog("Generating tRPC export file");
12020
- const trpcExports = project.createSourceFile(import_node_path6.default.resolve(outputDir, "trpc.ts"), void 0, {
12180
+ const trpcExports = project.createSourceFile(import_node_path7.default.resolve(outputDir, "trpc.ts"), void 0, {
12021
12181
  overwrite: true
12022
12182
  });
12023
12183
  await generateTRPCExports(trpcExports, config, options, outputDir);
12024
12184
  consoleLog("Generating tRPC app router");
12025
- const appRouter = project.createSourceFile(import_node_path6.default.resolve(outputDir, "routers", `index.ts`), void 0, {
12185
+ const appRouter = project.createSourceFile(import_node_path7.default.resolve(outputDir, "routers", `index.ts`), void 0, {
12026
12186
  overwrite: true
12027
12187
  });
12028
12188
  consoleLog("Generating tRPC router imports");
@@ -12051,7 +12211,7 @@ ${JSON.stringify(config)}`);
12051
12211
  const plural = (0, import_pluralize.default)(lowerCaseFirst(model));
12052
12212
  consoleLog(`Generating tRPC router for model ${model}`);
12053
12213
  generateRouterImport(appRouter, plural, model);
12054
- const modelRouter = project.createSourceFile(import_node_path6.default.resolve(outputDir, "routers", `${lowerCaseFirst(model)}.router.ts`), void 0, {
12214
+ const modelRouter = project.createSourceFile(import_node_path7.default.resolve(outputDir, "routers", `${lowerCaseFirst(model)}.router.ts`), void 0, {
12055
12215
  overwrite: true
12056
12216
  });
12057
12217
  generateCreateRouterImport({