@stryke/prisma-trpc-generator 0.11.10 → 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/README.md +1 -1
- package/dist/generator.cjs +405 -178
- package/dist/generator.js +374 -147
- package/dist/index.cjs +405 -178
- package/dist/index.js +374 -147
- package/package.json +1 -1
package/dist/generator.cjs
CHANGED
|
@@ -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+
|
|
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+
|
|
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
|
});
|
|
@@ -2633,12 +2633,13 @@ __name(normalizeString, "normalizeString");
|
|
|
2633
2633
|
|
|
2634
2634
|
// ../string-format/src/lower-case-first.ts
|
|
2635
2635
|
init_cjs_shims();
|
|
2636
|
-
|
|
2636
|
+
function lowerCaseFirst(input) {
|
|
2637
2637
|
return input ? input.charAt(0).toLowerCase() + input.slice(1) : input;
|
|
2638
|
-
}
|
|
2638
|
+
}
|
|
2639
|
+
__name(lowerCaseFirst, "lowerCaseFirst");
|
|
2639
2640
|
|
|
2640
2641
|
// src/prisma-generator.ts
|
|
2641
|
-
var
|
|
2642
|
+
var import_node_path7 = __toESM(require("node:path"), 1);
|
|
2642
2643
|
var import_pluralize = __toESM(require_pluralize(), 1);
|
|
2643
2644
|
|
|
2644
2645
|
// src/config.ts
|
|
@@ -6910,12 +6911,31 @@ init_cjs_shims();
|
|
|
6910
6911
|
var EMPTY_STRING = "";
|
|
6911
6912
|
var $NestedValue = Symbol("NestedValue");
|
|
6912
6913
|
|
|
6914
|
+
// ../path/src/file-path-fns.ts
|
|
6915
|
+
var import_node_path2 = require("node:path");
|
|
6916
|
+
|
|
6913
6917
|
// ../path/src/correct-path.ts
|
|
6914
6918
|
init_cjs_shims();
|
|
6915
6919
|
|
|
6916
6920
|
// ../path/src/is-file.ts
|
|
6917
6921
|
init_cjs_shims();
|
|
6918
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
|
|
6919
6939
|
function isFile(path6, additionalPath) {
|
|
6920
6940
|
return Boolean((0, import_node_fs2.statSync)(additionalPath ? joinPaths(additionalPath, path6) : path6, {
|
|
6921
6941
|
throwIfNoEntry: false
|
|
@@ -6929,29 +6949,26 @@ function isDirectory(path6, additionalPath) {
|
|
|
6929
6949
|
}
|
|
6930
6950
|
__name(isDirectory, "isDirectory");
|
|
6931
6951
|
function isAbsolutePath(path6) {
|
|
6932
|
-
return
|
|
6952
|
+
return ABSOLUTE_PATH_REGEX.test(slash(path6));
|
|
6933
6953
|
}
|
|
6934
6954
|
__name(isAbsolutePath, "isAbsolutePath");
|
|
6935
6955
|
|
|
6936
6956
|
// ../path/src/correct-path.ts
|
|
6937
|
-
var _DRIVE_LETTER_START_RE2 = /^[A-Z]:\//i;
|
|
6938
6957
|
function normalizeWindowsPath2(input = "") {
|
|
6939
6958
|
if (!input) {
|
|
6940
6959
|
return input;
|
|
6941
6960
|
}
|
|
6942
|
-
return input
|
|
6961
|
+
return slash(input).replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
|
|
6943
6962
|
}
|
|
6944
6963
|
__name(normalizeWindowsPath2, "normalizeWindowsPath");
|
|
6945
|
-
var _UNC_REGEX2 = /^[/\\]{2}/;
|
|
6946
|
-
var _DRIVE_LETTER_RE2 = /^[A-Z]:$/i;
|
|
6947
6964
|
function correctPath(path6) {
|
|
6948
6965
|
if (!path6 || path6.length === 0) {
|
|
6949
6966
|
return ".";
|
|
6950
6967
|
}
|
|
6951
6968
|
path6 = normalizeWindowsPath2(path6);
|
|
6952
|
-
const isUNCPath = path6.match(
|
|
6969
|
+
const isUNCPath = path6.match(UNC_REGEX);
|
|
6953
6970
|
const isPathAbsolute = isAbsolutePath(path6);
|
|
6954
|
-
const trailingSeparator = path6
|
|
6971
|
+
const trailingSeparator = path6.endsWith("/");
|
|
6955
6972
|
path6 = normalizeString2(path6, !isPathAbsolute);
|
|
6956
6973
|
if (path6.length === 0) {
|
|
6957
6974
|
if (isPathAbsolute) {
|
|
@@ -6962,7 +6979,7 @@ function correctPath(path6) {
|
|
|
6962
6979
|
if (trailingSeparator) {
|
|
6963
6980
|
path6 += "/";
|
|
6964
6981
|
}
|
|
6965
|
-
if (
|
|
6982
|
+
if (DRIVE_LETTER_REGEX.test(path6)) {
|
|
6966
6983
|
path6 += "/";
|
|
6967
6984
|
}
|
|
6968
6985
|
if (isUNCPath) {
|
|
@@ -6971,7 +6988,7 @@ function correctPath(path6) {
|
|
|
6971
6988
|
}
|
|
6972
6989
|
return `//${path6}`;
|
|
6973
6990
|
}
|
|
6974
|
-
return isPathAbsolute && !
|
|
6991
|
+
return !path6.startsWith("/") && isPathAbsolute && !DRIVE_LETTER_REGEX.test(path6) ? `/${path6}` : path6;
|
|
6975
6992
|
}
|
|
6976
6993
|
__name(correctPath, "correctPath");
|
|
6977
6994
|
function normalizeString2(path6, allowAboveRoot) {
|
|
@@ -7039,65 +7056,28 @@ __name(normalizeString2, "normalizeString");
|
|
|
7039
7056
|
// ../path/src/get-workspace-root.ts
|
|
7040
7057
|
init_cjs_shims();
|
|
7041
7058
|
|
|
7042
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
7043
|
-
init_cjs_shims();
|
|
7044
|
-
|
|
7045
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.160.6_@storm-software+config@1.110.6/node_modules/@storm-software/config-tools/dist/chunk-K6PUXRK3.js
|
|
7046
|
-
init_cjs_shims();
|
|
7047
|
-
|
|
7048
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.160.6_@storm-software+config@1.110.6/node_modules/@storm-software/config-tools/dist/chunk-NQFXB5CV.js
|
|
7049
|
-
init_cjs_shims();
|
|
7050
|
-
|
|
7051
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.160.6_@storm-software+config@1.110.6/node_modules/@storm-software/config-tools/dist/chunk-SHUYVCID.js
|
|
7059
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/index.js
|
|
7052
7060
|
init_cjs_shims();
|
|
7053
|
-
var __defProp2 = Object.defineProperty;
|
|
7054
|
-
var __name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name", {
|
|
7055
|
-
value,
|
|
7056
|
-
configurable: true
|
|
7057
|
-
}), "__name");
|
|
7058
|
-
|
|
7059
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.160.6_@storm-software+config@1.110.6/node_modules/@storm-software/config-tools/dist/chunk-NQFXB5CV.js
|
|
7060
|
-
var import_node_fs3 = require("node:fs");
|
|
7061
|
-
var import_node_path = require("node:path");
|
|
7062
|
-
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
7063
|
-
var depth = 0;
|
|
7064
|
-
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
7065
|
-
const _startPath = startPath ?? process.cwd();
|
|
7066
|
-
if (endDirectoryNames.some((endDirName) => (0, import_node_fs3.existsSync)((0, import_node_path.join)(_startPath, endDirName)))) {
|
|
7067
|
-
return _startPath;
|
|
7068
|
-
}
|
|
7069
|
-
if (endFileNames.some((endFileName) => (0, import_node_fs3.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
|
|
7070
|
-
return _startPath;
|
|
7071
|
-
}
|
|
7072
|
-
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
7073
|
-
const parent = (0, import_node_path.join)(_startPath, "..");
|
|
7074
|
-
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
7075
|
-
}
|
|
7076
|
-
return void 0;
|
|
7077
|
-
}
|
|
7078
|
-
__name(findFolderUp, "findFolderUp");
|
|
7079
|
-
__name2(findFolderUp, "findFolderUp");
|
|
7080
7061
|
|
|
7081
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
7062
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
|
|
7082
7063
|
init_cjs_shims();
|
|
7083
|
-
var
|
|
7064
|
+
var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
|
|
7084
7065
|
function normalizeWindowsPath3(input = "") {
|
|
7085
7066
|
if (!input) {
|
|
7086
7067
|
return input;
|
|
7087
7068
|
}
|
|
7088
|
-
return input.replace(/\\/g, "/").replace(
|
|
7069
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE2, (r) => r.toUpperCase());
|
|
7089
7070
|
}
|
|
7090
7071
|
__name(normalizeWindowsPath3, "normalizeWindowsPath");
|
|
7091
|
-
|
|
7092
|
-
var _UNC_REGEX3 = /^[/\\]{2}/;
|
|
7072
|
+
var _UNC_REGEX2 = /^[/\\]{2}/;
|
|
7093
7073
|
var _IS_ABSOLUTE_RE2 = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
7094
|
-
var
|
|
7095
|
-
var correctPaths2 = /* @__PURE__ */
|
|
7074
|
+
var _DRIVE_LETTER_RE2 = /^[A-Za-z]:$/;
|
|
7075
|
+
var correctPaths2 = /* @__PURE__ */ __name(function(path6) {
|
|
7096
7076
|
if (!path6 || path6.length === 0) {
|
|
7097
7077
|
return ".";
|
|
7098
7078
|
}
|
|
7099
7079
|
path6 = normalizeWindowsPath3(path6);
|
|
7100
|
-
const isUNCPath = path6.match(
|
|
7080
|
+
const isUNCPath = path6.match(_UNC_REGEX2);
|
|
7101
7081
|
const isPathAbsolute = isAbsolute2(path6);
|
|
7102
7082
|
const trailingSeparator = path6[path6.length - 1] === "/";
|
|
7103
7083
|
path6 = normalizeString3(path6, !isPathAbsolute);
|
|
@@ -7110,7 +7090,7 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
|
|
|
7110
7090
|
if (trailingSeparator) {
|
|
7111
7091
|
path6 += "/";
|
|
7112
7092
|
}
|
|
7113
|
-
if (
|
|
7093
|
+
if (_DRIVE_LETTER_RE2.test(path6)) {
|
|
7114
7094
|
path6 += "/";
|
|
7115
7095
|
}
|
|
7116
7096
|
if (isUNCPath) {
|
|
@@ -7121,14 +7101,6 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
|
|
|
7121
7101
|
}
|
|
7122
7102
|
return isPathAbsolute && !isAbsolute2(path6) ? `/${path6}` : path6;
|
|
7123
7103
|
}, "correctPaths");
|
|
7124
|
-
function cwd() {
|
|
7125
|
-
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
7126
|
-
return process.cwd().replace(/\\/g, "/");
|
|
7127
|
-
}
|
|
7128
|
-
return "/";
|
|
7129
|
-
}
|
|
7130
|
-
__name(cwd, "cwd");
|
|
7131
|
-
__name2(cwd, "cwd");
|
|
7132
7104
|
function normalizeString3(path6, allowAboveRoot) {
|
|
7133
7105
|
let res = "";
|
|
7134
7106
|
let lastSegmentLength = 0;
|
|
@@ -7190,12 +7162,36 @@ function normalizeString3(path6, allowAboveRoot) {
|
|
|
7190
7162
|
return res;
|
|
7191
7163
|
}
|
|
7192
7164
|
__name(normalizeString3, "normalizeString");
|
|
7193
|
-
|
|
7194
|
-
var isAbsolute2 = /* @__PURE__ */ __name2(function(p) {
|
|
7165
|
+
var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
|
|
7195
7166
|
return _IS_ABSOLUTE_RE2.test(p);
|
|
7196
7167
|
}, "isAbsolute");
|
|
7197
7168
|
|
|
7198
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
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
|
|
7199
7195
|
var rootFiles = [
|
|
7200
7196
|
"storm-workspace.json",
|
|
7201
7197
|
"storm-workspace.json",
|
|
@@ -7245,31 +7241,19 @@ function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
|
7245
7241
|
return correctPaths2(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
7246
7242
|
}
|
|
7247
7243
|
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
7248
|
-
__name2(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
7249
|
-
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
7250
|
-
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
7251
|
-
if (!result) {
|
|
7252
|
-
throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
|
|
7253
|
-
${rootFiles.join("\n")}
|
|
7254
|
-
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
|
|
7255
|
-
}
|
|
7256
|
-
return result;
|
|
7257
|
-
}
|
|
7258
|
-
__name(findWorkspaceRoot, "findWorkspaceRoot");
|
|
7259
|
-
__name2(findWorkspaceRoot, "findWorkspaceRoot");
|
|
7260
7244
|
|
|
7261
7245
|
// ../path/src/get-parent-path.ts
|
|
7262
7246
|
init_cjs_shims();
|
|
7263
7247
|
var resolveParentPath = /* @__PURE__ */ __name((path6) => {
|
|
7264
7248
|
return resolvePaths(path6, "..");
|
|
7265
7249
|
}, "resolveParentPath");
|
|
7266
|
-
var getParentPath = /* @__PURE__ */ __name((name,
|
|
7250
|
+
var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
|
|
7267
7251
|
const ignoreCase = options?.ignoreCase ?? true;
|
|
7268
7252
|
const skipCwd = options?.skipCwd ?? false;
|
|
7269
7253
|
const targetType = options?.targetType ?? "both";
|
|
7270
|
-
let dir =
|
|
7254
|
+
let dir = cwd;
|
|
7271
7255
|
if (skipCwd) {
|
|
7272
|
-
dir = resolveParentPath(
|
|
7256
|
+
dir = resolveParentPath(cwd);
|
|
7273
7257
|
}
|
|
7274
7258
|
let names = Array.isArray(name) ? name : [
|
|
7275
7259
|
name
|
|
@@ -7366,12 +7350,12 @@ function findFilePath(filePath) {
|
|
|
7366
7350
|
}), "");
|
|
7367
7351
|
}
|
|
7368
7352
|
__name(findFilePath, "findFilePath");
|
|
7369
|
-
function resolvePath(path6,
|
|
7353
|
+
function resolvePath(path6, cwd = getWorkspaceRoot()) {
|
|
7370
7354
|
const paths = normalizeWindowsPath2(path6).split("/");
|
|
7371
7355
|
let resolvedPath = "";
|
|
7372
7356
|
let resolvedAbsolute = false;
|
|
7373
7357
|
for (let index = paths.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
7374
|
-
const path7 = index >= 0 ? paths[index] :
|
|
7358
|
+
const path7 = index >= 0 ? paths[index] : cwd;
|
|
7375
7359
|
if (!path7 || path7.length === 0) {
|
|
7376
7360
|
continue;
|
|
7377
7361
|
}
|
|
@@ -7390,25 +7374,7 @@ function resolvePaths(...paths) {
|
|
|
7390
7374
|
}
|
|
7391
7375
|
__name(resolvePaths, "resolvePaths");
|
|
7392
7376
|
function relativePath(from, to) {
|
|
7393
|
-
|
|
7394
|
-
const _to = resolvePath(to).replace(/^\/([A-Z]:)?$/i, "$1").split("/");
|
|
7395
|
-
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
7396
|
-
return _to.join("/");
|
|
7397
|
-
}
|
|
7398
|
-
const _fromCopy = [
|
|
7399
|
-
..._from
|
|
7400
|
-
];
|
|
7401
|
-
for (const segment of _fromCopy) {
|
|
7402
|
-
if (_to[0] !== segment) {
|
|
7403
|
-
break;
|
|
7404
|
-
}
|
|
7405
|
-
_from.shift();
|
|
7406
|
-
_to.shift();
|
|
7407
|
-
}
|
|
7408
|
-
return [
|
|
7409
|
-
..._from.map(() => ".."),
|
|
7410
|
-
..._to
|
|
7411
|
-
].join("/");
|
|
7377
|
+
return (0, import_node_path2.relative)(from.replace(/\/$/, ""), to.replace(/\/$/, ""));
|
|
7412
7378
|
}
|
|
7413
7379
|
__name(relativePath, "relativePath");
|
|
7414
7380
|
|
|
@@ -7443,61 +7409,217 @@ init_cjs_shims();
|
|
|
7443
7409
|
// ../string-format/src/acronyms.ts
|
|
7444
7410
|
init_cjs_shims();
|
|
7445
7411
|
var ACRONYMS = [
|
|
7412
|
+
"3D",
|
|
7413
|
+
"4D",
|
|
7414
|
+
"5G",
|
|
7415
|
+
"6G",
|
|
7416
|
+
"7G",
|
|
7417
|
+
"8G",
|
|
7418
|
+
"ACID",
|
|
7419
|
+
"AES",
|
|
7420
|
+
"AI",
|
|
7421
|
+
"AJAX",
|
|
7446
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",
|
|
7447
7446
|
"CPU",
|
|
7447
|
+
"CRUD",
|
|
7448
|
+
"CSR",
|
|
7448
7449
|
"CSS",
|
|
7450
|
+
"CX",
|
|
7451
|
+
"DAG",
|
|
7452
|
+
"DBMS",
|
|
7453
|
+
"DDoS",
|
|
7449
7454
|
"DNS",
|
|
7455
|
+
"DNSSEC",
|
|
7456
|
+
"DOM",
|
|
7457
|
+
"DR",
|
|
7458
|
+
"DRM",
|
|
7459
|
+
"DWH",
|
|
7460
|
+
"E2E",
|
|
7461
|
+
"EAI",
|
|
7462
|
+
"EKS",
|
|
7450
7463
|
"EOF",
|
|
7464
|
+
"EOD",
|
|
7465
|
+
"ETC",
|
|
7466
|
+
"ETL",
|
|
7467
|
+
"EULA",
|
|
7468
|
+
"FIDO",
|
|
7469
|
+
"FQDN",
|
|
7470
|
+
"FTP",
|
|
7471
|
+
"FaaS",
|
|
7472
|
+
"GDPR",
|
|
7473
|
+
"GCP",
|
|
7474
|
+
"GPU",
|
|
7451
7475
|
"GUID",
|
|
7476
|
+
"GUI",
|
|
7477
|
+
"GZIP",
|
|
7478
|
+
"HCI",
|
|
7479
|
+
"HDD",
|
|
7480
|
+
"HDFS",
|
|
7481
|
+
"HIPAA",
|
|
7482
|
+
"HMAC",
|
|
7483
|
+
"HOTP",
|
|
7484
|
+
"HSM",
|
|
7452
7485
|
"HTML",
|
|
7453
7486
|
"HTTP",
|
|
7487
|
+
"HTTP/2",
|
|
7488
|
+
"HTTP/2.0",
|
|
7489
|
+
"HTTP/3",
|
|
7490
|
+
"HTTP/3.0",
|
|
7491
|
+
"HTTP2",
|
|
7454
7492
|
"HTTPS",
|
|
7493
|
+
"HTTPS/2",
|
|
7494
|
+
"HTTPS/3",
|
|
7495
|
+
"HTTPS3",
|
|
7496
|
+
"IAM",
|
|
7497
|
+
"IAMM",
|
|
7498
|
+
"IAMT",
|
|
7499
|
+
"IaaS",
|
|
7455
7500
|
"ID",
|
|
7501
|
+
"IMAP",
|
|
7456
7502
|
"IP",
|
|
7503
|
+
"IPFS",
|
|
7504
|
+
"IoT",
|
|
7457
7505
|
"JSON",
|
|
7506
|
+
"JSONP",
|
|
7507
|
+
"JWT",
|
|
7508
|
+
"K8s",
|
|
7509
|
+
"KMS",
|
|
7510
|
+
"KPI",
|
|
7511
|
+
"LAN",
|
|
7458
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",
|
|
7459
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",
|
|
7460
7540
|
"PP",
|
|
7541
|
+
"PWA",
|
|
7542
|
+
"PX",
|
|
7461
7543
|
"QA",
|
|
7544
|
+
"RAID",
|
|
7462
7545
|
"RAM",
|
|
7546
|
+
"RDS",
|
|
7547
|
+
"REST",
|
|
7463
7548
|
"RHS",
|
|
7464
7549
|
"RPC",
|
|
7550
|
+
"RPA",
|
|
7551
|
+
"RUM",
|
|
7465
7552
|
"RSS",
|
|
7553
|
+
"SAN",
|
|
7554
|
+
"SASE",
|
|
7555
|
+
"SDLC",
|
|
7556
|
+
"SDK",
|
|
7557
|
+
"SEO",
|
|
7558
|
+
"SFTP",
|
|
7559
|
+
"SIEM",
|
|
7466
7560
|
"SLA",
|
|
7561
|
+
"SMB",
|
|
7467
7562
|
"SMTP",
|
|
7563
|
+
"SOAP",
|
|
7564
|
+
"SOC",
|
|
7565
|
+
"SOA",
|
|
7566
|
+
"SPDY",
|
|
7567
|
+
"SPF",
|
|
7468
7568
|
"SQL",
|
|
7569
|
+
"SRV",
|
|
7570
|
+
"SRE",
|
|
7469
7571
|
"SSH",
|
|
7572
|
+
"SSDL",
|
|
7573
|
+
"SSO",
|
|
7470
7574
|
"SSL",
|
|
7471
|
-
"
|
|
7575
|
+
"SSR",
|
|
7576
|
+
"TDD",
|
|
7577
|
+
"TLD",
|
|
7472
7578
|
"TLS",
|
|
7579
|
+
"TLS1.3",
|
|
7580
|
+
"TOTP",
|
|
7473
7581
|
"TRPC",
|
|
7474
7582
|
"TTL",
|
|
7475
7583
|
"UDP",
|
|
7476
7584
|
"UI",
|
|
7477
7585
|
"UID",
|
|
7478
|
-
"UUID",
|
|
7479
7586
|
"URI",
|
|
7480
7587
|
"URL",
|
|
7481
7588
|
"UTF",
|
|
7589
|
+
"UUID",
|
|
7590
|
+
"UX",
|
|
7482
7591
|
"VM",
|
|
7592
|
+
"VLAN",
|
|
7593
|
+
"VPN",
|
|
7594
|
+
"VR",
|
|
7595
|
+
"WAF",
|
|
7596
|
+
"WAN",
|
|
7597
|
+
"WLAN",
|
|
7598
|
+
"WPA",
|
|
7599
|
+
"XACML",
|
|
7483
7600
|
"XML",
|
|
7601
|
+
"XSRF",
|
|
7484
7602
|
"XSS",
|
|
7485
|
-
"
|
|
7603
|
+
"XR",
|
|
7604
|
+
"YAML",
|
|
7605
|
+
"ZTA"
|
|
7486
7606
|
];
|
|
7487
7607
|
|
|
7488
7608
|
// ../string-format/src/upper-case-first.ts
|
|
7489
7609
|
init_cjs_shims();
|
|
7490
|
-
|
|
7610
|
+
function upperCaseFirst(input) {
|
|
7491
7611
|
return input ? input.charAt(0).toUpperCase() + input.slice(1) : input;
|
|
7492
|
-
}
|
|
7612
|
+
}
|
|
7613
|
+
__name(upperCaseFirst, "upperCaseFirst");
|
|
7493
7614
|
|
|
7494
7615
|
// ../string-format/src/title-case.ts
|
|
7495
|
-
|
|
7616
|
+
function titleCase(input) {
|
|
7496
7617
|
if (!input) {
|
|
7497
|
-
return
|
|
7618
|
+
return input;
|
|
7498
7619
|
}
|
|
7499
|
-
return input.split(/(?=[A-Z])|[\s._-]/).map((s) => s.trim()).filter(Boolean).map((s) => ACRONYMS.
|
|
7500
|
-
}
|
|
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(" ");
|
|
7621
|
+
}
|
|
7622
|
+
__name(titleCase, "titleCase");
|
|
7501
7623
|
|
|
7502
7624
|
// ../type-checks/src/is-string.ts
|
|
7503
7625
|
init_cjs_shims();
|
|
@@ -7511,7 +7633,7 @@ var isString = /* @__PURE__ */ __name((value) => {
|
|
|
7511
7633
|
|
|
7512
7634
|
// ../env/src/get-env-paths.ts
|
|
7513
7635
|
var import_node_os = __toESM(require("node:os"), 1);
|
|
7514
|
-
var
|
|
7636
|
+
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
7515
7637
|
var homedir = import_node_os.default.homedir();
|
|
7516
7638
|
var tmpdir = import_node_os.default.tmpdir();
|
|
7517
7639
|
var macos = /* @__PURE__ */ __name((orgId) => {
|
|
@@ -7538,14 +7660,15 @@ var windows = /* @__PURE__ */ __name((orgId) => {
|
|
|
7538
7660
|
};
|
|
7539
7661
|
}, "windows");
|
|
7540
7662
|
var linux = /* @__PURE__ */ __name((orgId) => {
|
|
7541
|
-
const username =
|
|
7663
|
+
const username = import_node_path3.default.basename(homedir);
|
|
7542
7664
|
return {
|
|
7543
7665
|
data: joinPaths(process.env.XDG_DATA_HOME || joinPaths(homedir, ".local", "share"), orgId),
|
|
7544
7666
|
config: joinPaths(process.env.XDG_CONFIG_HOME || joinPaths(homedir, ".config"), orgId),
|
|
7545
7667
|
cache: joinPaths(process.env.XDG_CACHE_HOME || joinPaths(homedir, ".cache"), orgId),
|
|
7546
7668
|
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
7547
7669
|
log: joinPaths(process.env.XDG_STATE_HOME || joinPaths(homedir, ".local", "state"), orgId),
|
|
7548
|
-
|
|
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)
|
|
7549
7672
|
};
|
|
7550
7673
|
}, "linux");
|
|
7551
7674
|
function getEnvPaths(options = {}) {
|
|
@@ -7564,16 +7687,16 @@ function getEnvPaths(options = {}) {
|
|
|
7564
7687
|
} else {
|
|
7565
7688
|
result = linux(orgId);
|
|
7566
7689
|
}
|
|
7567
|
-
if (process.env.
|
|
7568
|
-
result.data = process.env.
|
|
7569
|
-
} else if (process.env.
|
|
7570
|
-
result.config = process.env.
|
|
7571
|
-
} else if (process.env.
|
|
7572
|
-
result.cache = process.env.
|
|
7573
|
-
} else if (process.env.
|
|
7574
|
-
result.log = process.env.
|
|
7575
|
-
} else if (process.env.
|
|
7576
|
-
result.temp = process.env.
|
|
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;
|
|
7577
7700
|
}
|
|
7578
7701
|
if (options.workspaceRoot) {
|
|
7579
7702
|
result.cache ??= joinPaths(options.workspaceRoot, "node_modules", ".cache", orgId);
|
|
@@ -7621,7 +7744,7 @@ __name(getPrismaGeneratorHelper, "getPrismaGeneratorHelper");
|
|
|
7621
7744
|
|
|
7622
7745
|
// src/zod/model-helpers.ts
|
|
7623
7746
|
init_cjs_shims();
|
|
7624
|
-
var
|
|
7747
|
+
var import_node_path4 = __toESM(require("node:path"), 1);
|
|
7625
7748
|
var import_ts_morph2 = require("ts-morph");
|
|
7626
7749
|
|
|
7627
7750
|
// src/zod/docs-helpers.ts
|
|
@@ -7731,7 +7854,7 @@ var writeImportsForModel = /* @__PURE__ */ __name(async (model, sourceFile, conf
|
|
|
7731
7854
|
importList.push({
|
|
7732
7855
|
kind: import_ts_morph2.StructureKind.ImportDeclaration,
|
|
7733
7856
|
namespaceImport: "imports",
|
|
7734
|
-
moduleSpecifier: dotSlash(
|
|
7857
|
+
moduleSpecifier: dotSlash(import_node_path4.default.relative(outputPath, import_node_path4.default.resolve(import_node_path4.default.dirname(options.schemaPath), config.imports)))
|
|
7735
7858
|
});
|
|
7736
7859
|
}
|
|
7737
7860
|
if (config.useDecimalJs && model.fields.some((f) => f.type === "Decimal")) {
|
|
@@ -7746,7 +7869,7 @@ var writeImportsForModel = /* @__PURE__ */ __name(async (model, sourceFile, conf
|
|
|
7746
7869
|
const enumFields = model.fields.filter((f) => f.kind === "enum");
|
|
7747
7870
|
const relationFields = model.fields.filter((f) => f.kind === "object");
|
|
7748
7871
|
const clientPath = options.otherGenerators.find((each) => each.provider.value === "prisma-client-js").output.value;
|
|
7749
|
-
const relativePath2 =
|
|
7872
|
+
const relativePath2 = import_node_path4.default.relative(outputPath, clientPath);
|
|
7750
7873
|
if (enumFields.length > 0) {
|
|
7751
7874
|
importList.push({
|
|
7752
7875
|
kind: import_ts_morph2.StructureKind.ImportDeclaration,
|
|
@@ -10257,6 +10380,75 @@ var registerCustom = SuperJSON.registerCustom;
|
|
|
10257
10380
|
var registerSymbol = SuperJSON.registerSymbol;
|
|
10258
10381
|
var allowErrorProps = SuperJSON.allowErrorProps;
|
|
10259
10382
|
|
|
10383
|
+
// ../json/src/utils/parse.ts
|
|
10384
|
+
init_cjs_shims();
|
|
10385
|
+
var suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
|
|
10386
|
+
var suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
|
10387
|
+
var JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(?:\.\d{1,17})?(?:E[+-]?\d+)?\s*$/i;
|
|
10388
|
+
function jsonParseTransform(key, value) {
|
|
10389
|
+
if (key === "__proto__" || key === "constructor" && value && typeof value === "object" && "prototype" in value) {
|
|
10390
|
+
console.warn(`Dropping "${key}" key to prevent prototype pollution.`);
|
|
10391
|
+
return;
|
|
10392
|
+
}
|
|
10393
|
+
return value;
|
|
10394
|
+
}
|
|
10395
|
+
__name(jsonParseTransform, "jsonParseTransform");
|
|
10396
|
+
function parse4(value, options = {}) {
|
|
10397
|
+
if (typeof value !== "string") {
|
|
10398
|
+
return value;
|
|
10399
|
+
}
|
|
10400
|
+
if (value[0] === '"' && value[value.length - 1] === '"' && !value.includes("\\")) {
|
|
10401
|
+
return value.slice(1, -1);
|
|
10402
|
+
}
|
|
10403
|
+
const _value = value.trim();
|
|
10404
|
+
if (_value.length <= 9) {
|
|
10405
|
+
switch (_value.toLowerCase()) {
|
|
10406
|
+
case "true": {
|
|
10407
|
+
return true;
|
|
10408
|
+
}
|
|
10409
|
+
case "false": {
|
|
10410
|
+
return false;
|
|
10411
|
+
}
|
|
10412
|
+
case "undefined": {
|
|
10413
|
+
return void 0;
|
|
10414
|
+
}
|
|
10415
|
+
case "null": {
|
|
10416
|
+
return null;
|
|
10417
|
+
}
|
|
10418
|
+
case "nan": {
|
|
10419
|
+
return Number.NaN;
|
|
10420
|
+
}
|
|
10421
|
+
case "infinity": {
|
|
10422
|
+
return Number.POSITIVE_INFINITY;
|
|
10423
|
+
}
|
|
10424
|
+
case "-infinity": {
|
|
10425
|
+
return Number.NEGATIVE_INFINITY;
|
|
10426
|
+
}
|
|
10427
|
+
}
|
|
10428
|
+
}
|
|
10429
|
+
if (!JsonSigRx.test(value)) {
|
|
10430
|
+
if (options.strict) {
|
|
10431
|
+
throw new Error("Invalid JSON");
|
|
10432
|
+
}
|
|
10433
|
+
return value;
|
|
10434
|
+
}
|
|
10435
|
+
try {
|
|
10436
|
+
if (suspectProtoRx.test(value) || suspectConstructorRx.test(value)) {
|
|
10437
|
+
if (options.strict) {
|
|
10438
|
+
throw new Error("Possible prototype pollution");
|
|
10439
|
+
}
|
|
10440
|
+
return JSON.parse(value, jsonParseTransform);
|
|
10441
|
+
}
|
|
10442
|
+
return JSON.parse(value);
|
|
10443
|
+
} catch (error) {
|
|
10444
|
+
if (options.strict) {
|
|
10445
|
+
throw error;
|
|
10446
|
+
}
|
|
10447
|
+
return value;
|
|
10448
|
+
}
|
|
10449
|
+
}
|
|
10450
|
+
__name(parse4, "parse");
|
|
10451
|
+
|
|
10260
10452
|
// ../json/src/utils/parse-error.ts
|
|
10261
10453
|
init_cjs_shims();
|
|
10262
10454
|
|
|
@@ -10463,7 +10655,47 @@ var isNumber2 = /* @__PURE__ */ __name((value) => {
|
|
|
10463
10655
|
}
|
|
10464
10656
|
}, "isNumber");
|
|
10465
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
|
+
|
|
10466
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
|
+
];
|
|
10467
10699
|
var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
10468
10700
|
const space = isNumber2(spacing) ? " ".repeat(spacing) : spacing;
|
|
10469
10701
|
switch (value) {
|
|
@@ -10471,7 +10703,7 @@ var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
|
10471
10703
|
return "null";
|
|
10472
10704
|
}
|
|
10473
10705
|
case void 0: {
|
|
10474
|
-
return "undefined";
|
|
10706
|
+
return '"undefined"';
|
|
10475
10707
|
}
|
|
10476
10708
|
case true: {
|
|
10477
10709
|
return "true";
|
|
@@ -10479,6 +10711,12 @@ var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
|
10479
10711
|
case false: {
|
|
10480
10712
|
return "false";
|
|
10481
10713
|
}
|
|
10714
|
+
case Number.POSITIVE_INFINITY: {
|
|
10715
|
+
return "infinity";
|
|
10716
|
+
}
|
|
10717
|
+
case Number.NEGATIVE_INFINITY: {
|
|
10718
|
+
return "-infinity";
|
|
10719
|
+
}
|
|
10482
10720
|
}
|
|
10483
10721
|
if (Array.isArray(value)) {
|
|
10484
10722
|
return `[${space}${value.map((v) => stringify2(v, space)).join(`,${space}`)}${space}]`;
|
|
@@ -10494,8 +10732,8 @@ var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
|
10494
10732
|
return JSON.stringify(value);
|
|
10495
10733
|
}
|
|
10496
10734
|
case "object": {
|
|
10497
|
-
const keys = Object.keys(value);
|
|
10498
|
-
return `{${space}${keys.map((
|
|
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}}`;
|
|
10499
10737
|
}
|
|
10500
10738
|
default:
|
|
10501
10739
|
return "null";
|
|
@@ -10522,8 +10760,6 @@ var StormJSON = class _StormJSON extends SuperJSON {
|
|
|
10522
10760
|
}
|
|
10523
10761
|
/**
|
|
10524
10762
|
* Serialize the given value with superjson
|
|
10525
|
-
*
|
|
10526
|
-
*
|
|
10527
10763
|
*/
|
|
10528
10764
|
static serialize(object) {
|
|
10529
10765
|
return _StormJSON.instance.serialize(object);
|
|
@@ -10535,32 +10771,23 @@ var StormJSON = class _StormJSON extends SuperJSON {
|
|
|
10535
10771
|
* @returns The parsed data
|
|
10536
10772
|
*/
|
|
10537
10773
|
static parse(value) {
|
|
10538
|
-
return
|
|
10774
|
+
return parse4(value);
|
|
10539
10775
|
}
|
|
10540
10776
|
/**
|
|
10541
10777
|
* Serializes the given data to a JSON string.
|
|
10542
10778
|
* By default the JSON string is formatted with a 2 space indentation to be easy readable.
|
|
10543
10779
|
*
|
|
10544
10780
|
* @param value - Object which should be serialized to JSON
|
|
10545
|
-
* @param
|
|
10781
|
+
* @param _options - JSON serialize options
|
|
10546
10782
|
* @returns the formatted JSON representation of the object
|
|
10547
10783
|
*/
|
|
10548
|
-
static stringify(value,
|
|
10784
|
+
static stringify(value, _options) {
|
|
10549
10785
|
const customTransformer = _StormJSON.instance.customTransformerRegistry.findApplicable(value);
|
|
10550
10786
|
let result = value;
|
|
10551
|
-
if (customTransformer) {
|
|
10787
|
+
if (customTransformer && customTransformer.isApplicable(value)) {
|
|
10552
10788
|
result = customTransformer.serialize(result);
|
|
10553
10789
|
}
|
|
10554
|
-
return stringify2(result
|
|
10555
|
-
}
|
|
10556
|
-
/**
|
|
10557
|
-
* Stringify the given value with superjson
|
|
10558
|
-
*
|
|
10559
|
-
* @param obj - The object to stringify
|
|
10560
|
-
* @returns The stringified object
|
|
10561
|
-
*/
|
|
10562
|
-
static stringifyBase(obj) {
|
|
10563
|
-
return _StormJSON.instance.stringify(obj);
|
|
10790
|
+
return stringify2(result);
|
|
10564
10791
|
}
|
|
10565
10792
|
/**
|
|
10566
10793
|
* Parses the given JSON string and returns the object the JSON content represents.
|
|
@@ -10630,13 +10857,13 @@ StormJSON.instance.registerCustom({
|
|
|
10630
10857
|
|
|
10631
10858
|
// ../fs/src/write-file.ts
|
|
10632
10859
|
var import_promises3 = require("node:fs/promises");
|
|
10633
|
-
var writeFile = /* @__PURE__ */ __name(async (filePath, content, options) => {
|
|
10860
|
+
var writeFile = /* @__PURE__ */ __name(async (filePath, content = "", options = {}) => {
|
|
10634
10861
|
if (!filePath) {
|
|
10635
10862
|
throw new Error("No file path provided to read data");
|
|
10636
10863
|
}
|
|
10637
10864
|
const directory = findFilePath(correctPath(filePath));
|
|
10638
10865
|
if (!existsSync(directory)) {
|
|
10639
|
-
if (options
|
|
10866
|
+
if (options.createDirectory !== false) {
|
|
10640
10867
|
await createDirectory(directory);
|
|
10641
10868
|
} else {
|
|
10642
10869
|
throw new Error(`Directory ${directory} does not exist`);
|
|
@@ -10646,7 +10873,7 @@ var writeFile = /* @__PURE__ */ __name(async (filePath, content, options) => {
|
|
|
10646
10873
|
}, "writeFile");
|
|
10647
10874
|
|
|
10648
10875
|
// src/utils/write-file-safely.ts
|
|
10649
|
-
var
|
|
10876
|
+
var import_node_path5 = __toESM(require("node:path"), 1);
|
|
10650
10877
|
|
|
10651
10878
|
// src/utils/format-file.ts
|
|
10652
10879
|
init_cjs_shims();
|
|
@@ -10690,7 +10917,7 @@ var writeFileSafely = /* @__PURE__ */ __name(async (writeLocation, content, addT
|
|
|
10690
10917
|
}, "writeFileSafely");
|
|
10691
10918
|
var writeIndexFile = /* @__PURE__ */ __name(async (indexPath) => {
|
|
10692
10919
|
const rows = Array.from(indexExports).map((filePath) => {
|
|
10693
|
-
let relativePath2 =
|
|
10920
|
+
let relativePath2 = import_node_path5.default.relative(import_node_path5.default.dirname(indexPath), filePath);
|
|
10694
10921
|
if (relativePath2.endsWith(".ts")) {
|
|
10695
10922
|
relativePath2 = relativePath2.slice(0, relativePath2.lastIndexOf(".ts"));
|
|
10696
10923
|
}
|
|
@@ -10868,7 +11095,7 @@ init_cjs_shims();
|
|
|
10868
11095
|
|
|
10869
11096
|
// src/zod/transformer.ts
|
|
10870
11097
|
init_cjs_shims();
|
|
10871
|
-
var
|
|
11098
|
+
var import_node_path6 = __toESM(require("node:path"), 1);
|
|
10872
11099
|
|
|
10873
11100
|
// src/zod/mongodb-helpers.ts
|
|
10874
11101
|
init_cjs_shims();
|
|
@@ -10978,13 +11205,13 @@ var Transformer = class _Transformer {
|
|
|
10978
11205
|
this.isCustomPrismaClientOutputPath = prismaClientCustomPath !== "@prisma/client";
|
|
10979
11206
|
}
|
|
10980
11207
|
static async generateIndex() {
|
|
10981
|
-
const indexPath =
|
|
11208
|
+
const indexPath = import_node_path6.default.join(_Transformer.outputPath, "schemas/index.ts");
|
|
10982
11209
|
await writeIndexFile(indexPath);
|
|
10983
11210
|
}
|
|
10984
11211
|
async generateEnumSchemas() {
|
|
10985
11212
|
for (const enumType2 of this.enumTypes) {
|
|
10986
11213
|
const { name, values } = enumType2;
|
|
10987
|
-
await writeFileSafely(
|
|
11214
|
+
await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/enums/${lowerCaseFirst(name)}.schema.ts`), `${this.generateImportZodStatement()}
|
|
10988
11215
|
${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.stringify(values)})`)}`);
|
|
10989
11216
|
}
|
|
10990
11217
|
}
|
|
@@ -10998,7 +11225,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
10998
11225
|
const zodObjectSchemaFields = this.generateObjectSchemaFields();
|
|
10999
11226
|
const objectSchema = this.prepareObjectSchema(zodObjectSchemaFields);
|
|
11000
11227
|
const objectSchemaName = this.resolveObjectSchemaName();
|
|
11001
|
-
await writeFileSafely(
|
|
11228
|
+
await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/objects/${lowerCaseFirst(objectSchemaName)}.schema.ts`), objectSchema);
|
|
11002
11229
|
}
|
|
11003
11230
|
generateObjectSchemaFields() {
|
|
11004
11231
|
const zodObjectSchemaFields = this.fields.map((field) => this.generateObjectSchemaField(field)).flatMap((item) => item).map((item) => {
|
|
@@ -11132,9 +11359,9 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11132
11359
|
generateImportPrismaStatement() {
|
|
11133
11360
|
let prismaClientImportPath;
|
|
11134
11361
|
if (_Transformer.isCustomPrismaClientOutputPath) {
|
|
11135
|
-
const fromPath =
|
|
11362
|
+
const fromPath = import_node_path6.default.join(_Transformer.outputPath, "schemas", "objects");
|
|
11136
11363
|
const toPath = _Transformer.prismaClientOutputPath;
|
|
11137
|
-
const relativePathFromOutputToPrismaClient =
|
|
11364
|
+
const relativePathFromOutputToPrismaClient = import_node_path6.default.relative(fromPath, toPath).split(import_node_path6.default.sep).join(import_node_path6.default.posix.sep);
|
|
11138
11365
|
prismaClientImportPath = relativePathFromOutputToPrismaClient;
|
|
11139
11366
|
} else {
|
|
11140
11367
|
prismaClientImportPath = _Transformer.prismaClientOutputPath;
|
|
@@ -11264,7 +11491,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11264
11491
|
includeImport,
|
|
11265
11492
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
|
|
11266
11493
|
];
|
|
11267
|
-
await writeFileSafely(
|
|
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 })`)}`);
|
|
11268
11495
|
}
|
|
11269
11496
|
if (findFirst) {
|
|
11270
11497
|
const imports = [
|
|
@@ -11275,7 +11502,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11275
11502
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`,
|
|
11276
11503
|
`import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
|
|
11277
11504
|
];
|
|
11278
|
-
await writeFileSafely(
|
|
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() })`)}`);
|
|
11279
11506
|
}
|
|
11280
11507
|
if (findMany) {
|
|
11281
11508
|
const imports = [
|
|
@@ -11286,7 +11513,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11286
11513
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`,
|
|
11287
11514
|
`import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
|
|
11288
11515
|
];
|
|
11289
|
-
await writeFileSafely(
|
|
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() })`)}`);
|
|
11290
11517
|
}
|
|
11291
11518
|
if (createOne) {
|
|
11292
11519
|
const imports = [
|
|
@@ -11295,19 +11522,19 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11295
11522
|
`import { ${modelName}CreateInputObjectSchema } from './objects/${modelName}CreateInput.schema'`,
|
|
11296
11523
|
`import { ${modelName}UncheckedCreateInputObjectSchema } from './objects/${modelName}UncheckedCreateInput.schema'`
|
|
11297
11524
|
];
|
|
11298
|
-
await writeFileSafely(
|
|
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]) })`)}`);
|
|
11299
11526
|
}
|
|
11300
11527
|
if (createMany) {
|
|
11301
11528
|
const imports = [
|
|
11302
11529
|
`import { ${modelName}CreateManyInputObjectSchema } from './objects/${modelName}CreateManyInput.schema'`
|
|
11303
11530
|
];
|
|
11304
|
-
await writeFileSafely(
|
|
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()"} })`)}`);
|
|
11305
11532
|
}
|
|
11306
11533
|
if (createManyAndReturn) {
|
|
11307
11534
|
const imports = [
|
|
11308
11535
|
`import { ${modelName}CreateManyAndReturnInputObjectSchema } from './objects/${modelName}CreateManyAndReturnInput.schema'`
|
|
11309
11536
|
];
|
|
11310
|
-
await writeFileSafely(
|
|
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()"} })`)}`);
|
|
11311
11538
|
}
|
|
11312
11539
|
if (deleteOne) {
|
|
11313
11540
|
const imports = [
|
|
@@ -11315,13 +11542,13 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11315
11542
|
includeImport,
|
|
11316
11543
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
|
|
11317
11544
|
];
|
|
11318
|
-
await writeFileSafely(
|
|
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 })`)}`);
|
|
11319
11546
|
}
|
|
11320
11547
|
if (deleteMany) {
|
|
11321
11548
|
const imports = [
|
|
11322
11549
|
`import { ${modelName}WhereInputObjectSchema } from './objects/${modelName}WhereInput.schema'`
|
|
11323
11550
|
];
|
|
11324
|
-
await writeFileSafely(
|
|
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() })`)}`);
|
|
11325
11552
|
}
|
|
11326
11553
|
if (updateOne) {
|
|
11327
11554
|
const imports = [
|
|
@@ -11331,20 +11558,20 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11331
11558
|
`import { ${modelName}UncheckedUpdateInputObjectSchema } from './objects/${modelName}UncheckedUpdateInput.schema'`,
|
|
11332
11559
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
|
|
11333
11560
|
];
|
|
11334
|
-
await writeFileSafely(
|
|
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 })`)}`);
|
|
11335
11562
|
}
|
|
11336
11563
|
if (updateMany) {
|
|
11337
11564
|
const imports = [
|
|
11338
11565
|
`import { ${modelName}UpdateManyMutationInputObjectSchema } from './objects/${modelName}UpdateManyMutationInput.schema'`,
|
|
11339
11566
|
`import { ${modelName}WhereInputObjectSchema } from './objects/${modelName}WhereInput.schema'`
|
|
11340
11567
|
];
|
|
11341
|
-
await writeFileSafely(
|
|
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() })`)}`);
|
|
11342
11569
|
}
|
|
11343
11570
|
if (updateManyAndReturn) {
|
|
11344
11571
|
const imports = [
|
|
11345
11572
|
`import { ${modelName}UpdateManyAndReturnInputObjectSchema } from './objects/${modelName}UpdateManyAndReturnInput.schema'`
|
|
11346
11573
|
];
|
|
11347
|
-
await writeFileSafely(
|
|
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()"} })`)}`);
|
|
11348
11575
|
}
|
|
11349
11576
|
if (upsertOne) {
|
|
11350
11577
|
const imports = [
|
|
@@ -11356,7 +11583,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11356
11583
|
`import { ${modelName}UpdateInputObjectSchema } from './objects/${modelName}UpdateInput.schema'`,
|
|
11357
11584
|
`import { ${modelName}UncheckedUpdateInputObjectSchema } from './objects/${modelName}UncheckedUpdateInput.schema'`
|
|
11358
11585
|
];
|
|
11359
|
-
await writeFileSafely(
|
|
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 ]) })`)}`);
|
|
11360
11587
|
}
|
|
11361
11588
|
if (aggregate) {
|
|
11362
11589
|
const imports = [
|
|
@@ -11387,7 +11614,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11387
11614
|
aggregateOperations.push(`_sum: ${modelName}SumAggregateInputObjectSchema.optional()`);
|
|
11388
11615
|
}
|
|
11389
11616
|
}
|
|
11390
|
-
await writeFileSafely(
|
|
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(", ")} })`)}`);
|
|
11391
11618
|
}
|
|
11392
11619
|
if (groupBy) {
|
|
11393
11620
|
const imports = [
|
|
@@ -11396,7 +11623,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11396
11623
|
`import { ${modelName}ScalarWhereWithAggregatesInputObjectSchema } from './objects/${modelName}ScalarWhereWithAggregatesInput.schema'`,
|
|
11397
11624
|
`import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
|
|
11398
11625
|
];
|
|
11399
|
-
await writeFileSafely(
|
|
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) })`)}`);
|
|
11400
11627
|
}
|
|
11401
11628
|
}
|
|
11402
11629
|
}
|
|
@@ -11954,12 +12181,12 @@ ${JSON.stringify(config)}`);
|
|
|
11954
12181
|
}
|
|
11955
12182
|
resolveModelsComments(models, hiddenModels);
|
|
11956
12183
|
consoleLog("Generating tRPC export file");
|
|
11957
|
-
const trpcExports = project.createSourceFile(
|
|
12184
|
+
const trpcExports = project.createSourceFile(import_node_path7.default.resolve(outputDir, "trpc.ts"), void 0, {
|
|
11958
12185
|
overwrite: true
|
|
11959
12186
|
});
|
|
11960
12187
|
await generateTRPCExports(trpcExports, config, options, outputDir);
|
|
11961
12188
|
consoleLog("Generating tRPC app router");
|
|
11962
|
-
const appRouter = project.createSourceFile(
|
|
12189
|
+
const appRouter = project.createSourceFile(import_node_path7.default.resolve(outputDir, "routers", `index.ts`), void 0, {
|
|
11963
12190
|
overwrite: true
|
|
11964
12191
|
});
|
|
11965
12192
|
consoleLog("Generating tRPC router imports");
|
|
@@ -11988,7 +12215,7 @@ ${JSON.stringify(config)}`);
|
|
|
11988
12215
|
const plural = (0, import_pluralize.default)(lowerCaseFirst(model));
|
|
11989
12216
|
consoleLog(`Generating tRPC router for model ${model}`);
|
|
11990
12217
|
generateRouterImport(appRouter, plural, model);
|
|
11991
|
-
const modelRouter = project.createSourceFile(
|
|
12218
|
+
const modelRouter = project.createSourceFile(import_node_path7.default.resolve(outputDir, "routers", `${lowerCaseFirst(model)}.router.ts`), void 0, {
|
|
11992
12219
|
overwrite: true
|
|
11993
12220
|
});
|
|
11994
12221
|
generateCreateRouterImport({
|