@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/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+
|
|
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+
|
|
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
|
});
|
|
@@ -2629,12 +2629,13 @@ __name(normalizeString, "normalizeString");
|
|
|
2629
2629
|
|
|
2630
2630
|
// ../string-format/src/lower-case-first.ts
|
|
2631
2631
|
init_cjs_shims();
|
|
2632
|
-
|
|
2632
|
+
function lowerCaseFirst(input) {
|
|
2633
2633
|
return input ? input.charAt(0).toLowerCase() + input.slice(1) : input;
|
|
2634
|
-
}
|
|
2634
|
+
}
|
|
2635
|
+
__name(lowerCaseFirst, "lowerCaseFirst");
|
|
2635
2636
|
|
|
2636
2637
|
// src/prisma-generator.ts
|
|
2637
|
-
var
|
|
2638
|
+
var import_node_path7 = __toESM(require("node:path"), 1);
|
|
2638
2639
|
var import_pluralize = __toESM(require_pluralize(), 1);
|
|
2639
2640
|
|
|
2640
2641
|
// src/config.ts
|
|
@@ -6906,12 +6907,31 @@ init_cjs_shims();
|
|
|
6906
6907
|
var EMPTY_STRING = "";
|
|
6907
6908
|
var $NestedValue = Symbol("NestedValue");
|
|
6908
6909
|
|
|
6910
|
+
// ../path/src/file-path-fns.ts
|
|
6911
|
+
var import_node_path2 = require("node:path");
|
|
6912
|
+
|
|
6909
6913
|
// ../path/src/correct-path.ts
|
|
6910
6914
|
init_cjs_shims();
|
|
6911
6915
|
|
|
6912
6916
|
// ../path/src/is-file.ts
|
|
6913
6917
|
init_cjs_shims();
|
|
6914
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
|
|
6915
6935
|
function isFile(path6, additionalPath) {
|
|
6916
6936
|
return Boolean((0, import_node_fs2.statSync)(additionalPath ? joinPaths(additionalPath, path6) : path6, {
|
|
6917
6937
|
throwIfNoEntry: false
|
|
@@ -6925,29 +6945,26 @@ function isDirectory(path6, additionalPath) {
|
|
|
6925
6945
|
}
|
|
6926
6946
|
__name(isDirectory, "isDirectory");
|
|
6927
6947
|
function isAbsolutePath(path6) {
|
|
6928
|
-
return
|
|
6948
|
+
return ABSOLUTE_PATH_REGEX.test(slash(path6));
|
|
6929
6949
|
}
|
|
6930
6950
|
__name(isAbsolutePath, "isAbsolutePath");
|
|
6931
6951
|
|
|
6932
6952
|
// ../path/src/correct-path.ts
|
|
6933
|
-
var _DRIVE_LETTER_START_RE2 = /^[A-Z]:\//i;
|
|
6934
6953
|
function normalizeWindowsPath2(input = "") {
|
|
6935
6954
|
if (!input) {
|
|
6936
6955
|
return input;
|
|
6937
6956
|
}
|
|
6938
|
-
return input
|
|
6957
|
+
return slash(input).replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
|
|
6939
6958
|
}
|
|
6940
6959
|
__name(normalizeWindowsPath2, "normalizeWindowsPath");
|
|
6941
|
-
var _UNC_REGEX2 = /^[/\\]{2}/;
|
|
6942
|
-
var _DRIVE_LETTER_RE2 = /^[A-Z]:$/i;
|
|
6943
6960
|
function correctPath(path6) {
|
|
6944
6961
|
if (!path6 || path6.length === 0) {
|
|
6945
6962
|
return ".";
|
|
6946
6963
|
}
|
|
6947
6964
|
path6 = normalizeWindowsPath2(path6);
|
|
6948
|
-
const isUNCPath = path6.match(
|
|
6965
|
+
const isUNCPath = path6.match(UNC_REGEX);
|
|
6949
6966
|
const isPathAbsolute = isAbsolutePath(path6);
|
|
6950
|
-
const trailingSeparator = path6
|
|
6967
|
+
const trailingSeparator = path6.endsWith("/");
|
|
6951
6968
|
path6 = normalizeString2(path6, !isPathAbsolute);
|
|
6952
6969
|
if (path6.length === 0) {
|
|
6953
6970
|
if (isPathAbsolute) {
|
|
@@ -6958,7 +6975,7 @@ function correctPath(path6) {
|
|
|
6958
6975
|
if (trailingSeparator) {
|
|
6959
6976
|
path6 += "/";
|
|
6960
6977
|
}
|
|
6961
|
-
if (
|
|
6978
|
+
if (DRIVE_LETTER_REGEX.test(path6)) {
|
|
6962
6979
|
path6 += "/";
|
|
6963
6980
|
}
|
|
6964
6981
|
if (isUNCPath) {
|
|
@@ -6967,7 +6984,7 @@ function correctPath(path6) {
|
|
|
6967
6984
|
}
|
|
6968
6985
|
return `//${path6}`;
|
|
6969
6986
|
}
|
|
6970
|
-
return isPathAbsolute && !
|
|
6987
|
+
return !path6.startsWith("/") && isPathAbsolute && !DRIVE_LETTER_REGEX.test(path6) ? `/${path6}` : path6;
|
|
6971
6988
|
}
|
|
6972
6989
|
__name(correctPath, "correctPath");
|
|
6973
6990
|
function normalizeString2(path6, allowAboveRoot) {
|
|
@@ -7035,65 +7052,28 @@ __name(normalizeString2, "normalizeString");
|
|
|
7035
7052
|
// ../path/src/get-workspace-root.ts
|
|
7036
7053
|
init_cjs_shims();
|
|
7037
7054
|
|
|
7038
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
7039
|
-
init_cjs_shims();
|
|
7040
|
-
|
|
7041
|
-
// ../../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
|
|
7042
|
-
init_cjs_shims();
|
|
7043
|
-
|
|
7044
|
-
// ../../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
|
|
7045
|
-
init_cjs_shims();
|
|
7046
|
-
|
|
7047
|
-
// ../../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
|
|
7055
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/index.js
|
|
7048
7056
|
init_cjs_shims();
|
|
7049
|
-
var __defProp2 = Object.defineProperty;
|
|
7050
|
-
var __name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name", {
|
|
7051
|
-
value,
|
|
7052
|
-
configurable: true
|
|
7053
|
-
}), "__name");
|
|
7054
|
-
|
|
7055
|
-
// ../../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
|
|
7056
|
-
var import_node_fs3 = require("node:fs");
|
|
7057
|
-
var import_node_path = require("node:path");
|
|
7058
|
-
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
7059
|
-
var depth = 0;
|
|
7060
|
-
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
7061
|
-
const _startPath = startPath ?? process.cwd();
|
|
7062
|
-
if (endDirectoryNames.some((endDirName) => (0, import_node_fs3.existsSync)((0, import_node_path.join)(_startPath, endDirName)))) {
|
|
7063
|
-
return _startPath;
|
|
7064
|
-
}
|
|
7065
|
-
if (endFileNames.some((endFileName) => (0, import_node_fs3.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
|
|
7066
|
-
return _startPath;
|
|
7067
|
-
}
|
|
7068
|
-
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
7069
|
-
const parent = (0, import_node_path.join)(_startPath, "..");
|
|
7070
|
-
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
7071
|
-
}
|
|
7072
|
-
return void 0;
|
|
7073
|
-
}
|
|
7074
|
-
__name(findFolderUp, "findFolderUp");
|
|
7075
|
-
__name2(findFolderUp, "findFolderUp");
|
|
7076
7057
|
|
|
7077
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
7058
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
|
|
7078
7059
|
init_cjs_shims();
|
|
7079
|
-
var
|
|
7060
|
+
var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
|
|
7080
7061
|
function normalizeWindowsPath3(input = "") {
|
|
7081
7062
|
if (!input) {
|
|
7082
7063
|
return input;
|
|
7083
7064
|
}
|
|
7084
|
-
return input.replace(/\\/g, "/").replace(
|
|
7065
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE2, (r) => r.toUpperCase());
|
|
7085
7066
|
}
|
|
7086
7067
|
__name(normalizeWindowsPath3, "normalizeWindowsPath");
|
|
7087
|
-
|
|
7088
|
-
var _UNC_REGEX3 = /^[/\\]{2}/;
|
|
7068
|
+
var _UNC_REGEX2 = /^[/\\]{2}/;
|
|
7089
7069
|
var _IS_ABSOLUTE_RE2 = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
7090
|
-
var
|
|
7091
|
-
var correctPaths2 = /* @__PURE__ */
|
|
7070
|
+
var _DRIVE_LETTER_RE2 = /^[A-Za-z]:$/;
|
|
7071
|
+
var correctPaths2 = /* @__PURE__ */ __name(function(path6) {
|
|
7092
7072
|
if (!path6 || path6.length === 0) {
|
|
7093
7073
|
return ".";
|
|
7094
7074
|
}
|
|
7095
7075
|
path6 = normalizeWindowsPath3(path6);
|
|
7096
|
-
const isUNCPath = path6.match(
|
|
7076
|
+
const isUNCPath = path6.match(_UNC_REGEX2);
|
|
7097
7077
|
const isPathAbsolute = isAbsolute2(path6);
|
|
7098
7078
|
const trailingSeparator = path6[path6.length - 1] === "/";
|
|
7099
7079
|
path6 = normalizeString3(path6, !isPathAbsolute);
|
|
@@ -7106,7 +7086,7 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
|
|
|
7106
7086
|
if (trailingSeparator) {
|
|
7107
7087
|
path6 += "/";
|
|
7108
7088
|
}
|
|
7109
|
-
if (
|
|
7089
|
+
if (_DRIVE_LETTER_RE2.test(path6)) {
|
|
7110
7090
|
path6 += "/";
|
|
7111
7091
|
}
|
|
7112
7092
|
if (isUNCPath) {
|
|
@@ -7117,14 +7097,6 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
|
|
|
7117
7097
|
}
|
|
7118
7098
|
return isPathAbsolute && !isAbsolute2(path6) ? `/${path6}` : path6;
|
|
7119
7099
|
}, "correctPaths");
|
|
7120
|
-
function cwd() {
|
|
7121
|
-
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
7122
|
-
return process.cwd().replace(/\\/g, "/");
|
|
7123
|
-
}
|
|
7124
|
-
return "/";
|
|
7125
|
-
}
|
|
7126
|
-
__name(cwd, "cwd");
|
|
7127
|
-
__name2(cwd, "cwd");
|
|
7128
7100
|
function normalizeString3(path6, allowAboveRoot) {
|
|
7129
7101
|
let res = "";
|
|
7130
7102
|
let lastSegmentLength = 0;
|
|
@@ -7186,12 +7158,36 @@ function normalizeString3(path6, allowAboveRoot) {
|
|
|
7186
7158
|
return res;
|
|
7187
7159
|
}
|
|
7188
7160
|
__name(normalizeString3, "normalizeString");
|
|
7189
|
-
|
|
7190
|
-
var isAbsolute2 = /* @__PURE__ */ __name2(function(p) {
|
|
7161
|
+
var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
|
|
7191
7162
|
return _IS_ABSOLUTE_RE2.test(p);
|
|
7192
7163
|
}, "isAbsolute");
|
|
7193
7164
|
|
|
7194
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
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
|
|
7195
7191
|
var rootFiles = [
|
|
7196
7192
|
"storm-workspace.json",
|
|
7197
7193
|
"storm-workspace.json",
|
|
@@ -7241,31 +7237,19 @@ function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
|
7241
7237
|
return correctPaths2(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
7242
7238
|
}
|
|
7243
7239
|
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
7244
|
-
__name2(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
7245
|
-
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
7246
|
-
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
7247
|
-
if (!result) {
|
|
7248
|
-
throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
|
|
7249
|
-
${rootFiles.join("\n")}
|
|
7250
|
-
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
|
|
7251
|
-
}
|
|
7252
|
-
return result;
|
|
7253
|
-
}
|
|
7254
|
-
__name(findWorkspaceRoot, "findWorkspaceRoot");
|
|
7255
|
-
__name2(findWorkspaceRoot, "findWorkspaceRoot");
|
|
7256
7240
|
|
|
7257
7241
|
// ../path/src/get-parent-path.ts
|
|
7258
7242
|
init_cjs_shims();
|
|
7259
7243
|
var resolveParentPath = /* @__PURE__ */ __name((path6) => {
|
|
7260
7244
|
return resolvePaths(path6, "..");
|
|
7261
7245
|
}, "resolveParentPath");
|
|
7262
|
-
var getParentPath = /* @__PURE__ */ __name((name,
|
|
7246
|
+
var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
|
|
7263
7247
|
const ignoreCase = options?.ignoreCase ?? true;
|
|
7264
7248
|
const skipCwd = options?.skipCwd ?? false;
|
|
7265
7249
|
const targetType = options?.targetType ?? "both";
|
|
7266
|
-
let dir =
|
|
7250
|
+
let dir = cwd;
|
|
7267
7251
|
if (skipCwd) {
|
|
7268
|
-
dir = resolveParentPath(
|
|
7252
|
+
dir = resolveParentPath(cwd);
|
|
7269
7253
|
}
|
|
7270
7254
|
let names = Array.isArray(name) ? name : [
|
|
7271
7255
|
name
|
|
@@ -7362,12 +7346,12 @@ function findFilePath(filePath) {
|
|
|
7362
7346
|
}), "");
|
|
7363
7347
|
}
|
|
7364
7348
|
__name(findFilePath, "findFilePath");
|
|
7365
|
-
function resolvePath(path6,
|
|
7349
|
+
function resolvePath(path6, cwd = getWorkspaceRoot()) {
|
|
7366
7350
|
const paths = normalizeWindowsPath2(path6).split("/");
|
|
7367
7351
|
let resolvedPath = "";
|
|
7368
7352
|
let resolvedAbsolute = false;
|
|
7369
7353
|
for (let index = paths.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
7370
|
-
const path7 = index >= 0 ? paths[index] :
|
|
7354
|
+
const path7 = index >= 0 ? paths[index] : cwd;
|
|
7371
7355
|
if (!path7 || path7.length === 0) {
|
|
7372
7356
|
continue;
|
|
7373
7357
|
}
|
|
@@ -7386,25 +7370,7 @@ function resolvePaths(...paths) {
|
|
|
7386
7370
|
}
|
|
7387
7371
|
__name(resolvePaths, "resolvePaths");
|
|
7388
7372
|
function relativePath(from, to) {
|
|
7389
|
-
|
|
7390
|
-
const _to = resolvePath(to).replace(/^\/([A-Z]:)?$/i, "$1").split("/");
|
|
7391
|
-
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
7392
|
-
return _to.join("/");
|
|
7393
|
-
}
|
|
7394
|
-
const _fromCopy = [
|
|
7395
|
-
..._from
|
|
7396
|
-
];
|
|
7397
|
-
for (const segment of _fromCopy) {
|
|
7398
|
-
if (_to[0] !== segment) {
|
|
7399
|
-
break;
|
|
7400
|
-
}
|
|
7401
|
-
_from.shift();
|
|
7402
|
-
_to.shift();
|
|
7403
|
-
}
|
|
7404
|
-
return [
|
|
7405
|
-
..._from.map(() => ".."),
|
|
7406
|
-
..._to
|
|
7407
|
-
].join("/");
|
|
7373
|
+
return (0, import_node_path2.relative)(from.replace(/\/$/, ""), to.replace(/\/$/, ""));
|
|
7408
7374
|
}
|
|
7409
7375
|
__name(relativePath, "relativePath");
|
|
7410
7376
|
|
|
@@ -7439,61 +7405,217 @@ init_cjs_shims();
|
|
|
7439
7405
|
// ../string-format/src/acronyms.ts
|
|
7440
7406
|
init_cjs_shims();
|
|
7441
7407
|
var ACRONYMS = [
|
|
7408
|
+
"3D",
|
|
7409
|
+
"4D",
|
|
7410
|
+
"5G",
|
|
7411
|
+
"6G",
|
|
7412
|
+
"7G",
|
|
7413
|
+
"8G",
|
|
7414
|
+
"ACID",
|
|
7415
|
+
"AES",
|
|
7416
|
+
"AI",
|
|
7417
|
+
"AJAX",
|
|
7442
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",
|
|
7443
7442
|
"CPU",
|
|
7443
|
+
"CRUD",
|
|
7444
|
+
"CSR",
|
|
7444
7445
|
"CSS",
|
|
7446
|
+
"CX",
|
|
7447
|
+
"DAG",
|
|
7448
|
+
"DBMS",
|
|
7449
|
+
"DDoS",
|
|
7445
7450
|
"DNS",
|
|
7451
|
+
"DNSSEC",
|
|
7452
|
+
"DOM",
|
|
7453
|
+
"DR",
|
|
7454
|
+
"DRM",
|
|
7455
|
+
"DWH",
|
|
7456
|
+
"E2E",
|
|
7457
|
+
"EAI",
|
|
7458
|
+
"EKS",
|
|
7446
7459
|
"EOF",
|
|
7460
|
+
"EOD",
|
|
7461
|
+
"ETC",
|
|
7462
|
+
"ETL",
|
|
7463
|
+
"EULA",
|
|
7464
|
+
"FIDO",
|
|
7465
|
+
"FQDN",
|
|
7466
|
+
"FTP",
|
|
7467
|
+
"FaaS",
|
|
7468
|
+
"GDPR",
|
|
7469
|
+
"GCP",
|
|
7470
|
+
"GPU",
|
|
7447
7471
|
"GUID",
|
|
7472
|
+
"GUI",
|
|
7473
|
+
"GZIP",
|
|
7474
|
+
"HCI",
|
|
7475
|
+
"HDD",
|
|
7476
|
+
"HDFS",
|
|
7477
|
+
"HIPAA",
|
|
7478
|
+
"HMAC",
|
|
7479
|
+
"HOTP",
|
|
7480
|
+
"HSM",
|
|
7448
7481
|
"HTML",
|
|
7449
7482
|
"HTTP",
|
|
7483
|
+
"HTTP/2",
|
|
7484
|
+
"HTTP/2.0",
|
|
7485
|
+
"HTTP/3",
|
|
7486
|
+
"HTTP/3.0",
|
|
7487
|
+
"HTTP2",
|
|
7450
7488
|
"HTTPS",
|
|
7489
|
+
"HTTPS/2",
|
|
7490
|
+
"HTTPS/3",
|
|
7491
|
+
"HTTPS3",
|
|
7492
|
+
"IAM",
|
|
7493
|
+
"IAMM",
|
|
7494
|
+
"IAMT",
|
|
7495
|
+
"IaaS",
|
|
7451
7496
|
"ID",
|
|
7497
|
+
"IMAP",
|
|
7452
7498
|
"IP",
|
|
7499
|
+
"IPFS",
|
|
7500
|
+
"IoT",
|
|
7453
7501
|
"JSON",
|
|
7502
|
+
"JSONP",
|
|
7503
|
+
"JWT",
|
|
7504
|
+
"K8s",
|
|
7505
|
+
"KMS",
|
|
7506
|
+
"KPI",
|
|
7507
|
+
"LAN",
|
|
7454
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",
|
|
7455
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",
|
|
7456
7536
|
"PP",
|
|
7537
|
+
"PWA",
|
|
7538
|
+
"PX",
|
|
7457
7539
|
"QA",
|
|
7540
|
+
"RAID",
|
|
7458
7541
|
"RAM",
|
|
7542
|
+
"RDS",
|
|
7543
|
+
"REST",
|
|
7459
7544
|
"RHS",
|
|
7460
7545
|
"RPC",
|
|
7546
|
+
"RPA",
|
|
7547
|
+
"RUM",
|
|
7461
7548
|
"RSS",
|
|
7549
|
+
"SAN",
|
|
7550
|
+
"SASE",
|
|
7551
|
+
"SDLC",
|
|
7552
|
+
"SDK",
|
|
7553
|
+
"SEO",
|
|
7554
|
+
"SFTP",
|
|
7555
|
+
"SIEM",
|
|
7462
7556
|
"SLA",
|
|
7557
|
+
"SMB",
|
|
7463
7558
|
"SMTP",
|
|
7559
|
+
"SOAP",
|
|
7560
|
+
"SOC",
|
|
7561
|
+
"SOA",
|
|
7562
|
+
"SPDY",
|
|
7563
|
+
"SPF",
|
|
7464
7564
|
"SQL",
|
|
7565
|
+
"SRV",
|
|
7566
|
+
"SRE",
|
|
7465
7567
|
"SSH",
|
|
7568
|
+
"SSDL",
|
|
7569
|
+
"SSO",
|
|
7466
7570
|
"SSL",
|
|
7467
|
-
"
|
|
7571
|
+
"SSR",
|
|
7572
|
+
"TDD",
|
|
7573
|
+
"TLD",
|
|
7468
7574
|
"TLS",
|
|
7575
|
+
"TLS1.3",
|
|
7576
|
+
"TOTP",
|
|
7469
7577
|
"TRPC",
|
|
7470
7578
|
"TTL",
|
|
7471
7579
|
"UDP",
|
|
7472
7580
|
"UI",
|
|
7473
7581
|
"UID",
|
|
7474
|
-
"UUID",
|
|
7475
7582
|
"URI",
|
|
7476
7583
|
"URL",
|
|
7477
7584
|
"UTF",
|
|
7585
|
+
"UUID",
|
|
7586
|
+
"UX",
|
|
7478
7587
|
"VM",
|
|
7588
|
+
"VLAN",
|
|
7589
|
+
"VPN",
|
|
7590
|
+
"VR",
|
|
7591
|
+
"WAF",
|
|
7592
|
+
"WAN",
|
|
7593
|
+
"WLAN",
|
|
7594
|
+
"WPA",
|
|
7595
|
+
"XACML",
|
|
7479
7596
|
"XML",
|
|
7597
|
+
"XSRF",
|
|
7480
7598
|
"XSS",
|
|
7481
|
-
"
|
|
7599
|
+
"XR",
|
|
7600
|
+
"YAML",
|
|
7601
|
+
"ZTA"
|
|
7482
7602
|
];
|
|
7483
7603
|
|
|
7484
7604
|
// ../string-format/src/upper-case-first.ts
|
|
7485
7605
|
init_cjs_shims();
|
|
7486
|
-
|
|
7606
|
+
function upperCaseFirst(input) {
|
|
7487
7607
|
return input ? input.charAt(0).toUpperCase() + input.slice(1) : input;
|
|
7488
|
-
}
|
|
7608
|
+
}
|
|
7609
|
+
__name(upperCaseFirst, "upperCaseFirst");
|
|
7489
7610
|
|
|
7490
7611
|
// ../string-format/src/title-case.ts
|
|
7491
|
-
|
|
7612
|
+
function titleCase(input) {
|
|
7492
7613
|
if (!input) {
|
|
7493
|
-
return
|
|
7614
|
+
return input;
|
|
7494
7615
|
}
|
|
7495
|
-
return input.split(/(?=[A-Z])|[\s._-]/).map((s) => s.trim()).filter(Boolean).map((s) => ACRONYMS.
|
|
7496
|
-
}
|
|
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(" ");
|
|
7617
|
+
}
|
|
7618
|
+
__name(titleCase, "titleCase");
|
|
7497
7619
|
|
|
7498
7620
|
// ../type-checks/src/is-string.ts
|
|
7499
7621
|
init_cjs_shims();
|
|
@@ -7507,7 +7629,7 @@ var isString = /* @__PURE__ */ __name((value) => {
|
|
|
7507
7629
|
|
|
7508
7630
|
// ../env/src/get-env-paths.ts
|
|
7509
7631
|
var import_node_os = __toESM(require("node:os"), 1);
|
|
7510
|
-
var
|
|
7632
|
+
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
7511
7633
|
var homedir = import_node_os.default.homedir();
|
|
7512
7634
|
var tmpdir = import_node_os.default.tmpdir();
|
|
7513
7635
|
var macos = /* @__PURE__ */ __name((orgId) => {
|
|
@@ -7534,14 +7656,15 @@ var windows = /* @__PURE__ */ __name((orgId) => {
|
|
|
7534
7656
|
};
|
|
7535
7657
|
}, "windows");
|
|
7536
7658
|
var linux = /* @__PURE__ */ __name((orgId) => {
|
|
7537
|
-
const username =
|
|
7659
|
+
const username = import_node_path3.default.basename(homedir);
|
|
7538
7660
|
return {
|
|
7539
7661
|
data: joinPaths(process.env.XDG_DATA_HOME || joinPaths(homedir, ".local", "share"), orgId),
|
|
7540
7662
|
config: joinPaths(process.env.XDG_CONFIG_HOME || joinPaths(homedir, ".config"), orgId),
|
|
7541
7663
|
cache: joinPaths(process.env.XDG_CACHE_HOME || joinPaths(homedir, ".cache"), orgId),
|
|
7542
7664
|
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
7543
7665
|
log: joinPaths(process.env.XDG_STATE_HOME || joinPaths(homedir, ".local", "state"), orgId),
|
|
7544
|
-
|
|
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)
|
|
7545
7668
|
};
|
|
7546
7669
|
}, "linux");
|
|
7547
7670
|
function getEnvPaths(options = {}) {
|
|
@@ -7560,16 +7683,16 @@ function getEnvPaths(options = {}) {
|
|
|
7560
7683
|
} else {
|
|
7561
7684
|
result = linux(orgId);
|
|
7562
7685
|
}
|
|
7563
|
-
if (process.env.
|
|
7564
|
-
result.data = process.env.
|
|
7565
|
-
} else if (process.env.
|
|
7566
|
-
result.config = process.env.
|
|
7567
|
-
} else if (process.env.
|
|
7568
|
-
result.cache = process.env.
|
|
7569
|
-
} else if (process.env.
|
|
7570
|
-
result.log = process.env.
|
|
7571
|
-
} else if (process.env.
|
|
7572
|
-
result.temp = process.env.
|
|
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;
|
|
7573
7696
|
}
|
|
7574
7697
|
if (options.workspaceRoot) {
|
|
7575
7698
|
result.cache ??= joinPaths(options.workspaceRoot, "node_modules", ".cache", orgId);
|
|
@@ -7617,7 +7740,7 @@ __name(getPrismaGeneratorHelper, "getPrismaGeneratorHelper");
|
|
|
7617
7740
|
|
|
7618
7741
|
// src/zod/model-helpers.ts
|
|
7619
7742
|
init_cjs_shims();
|
|
7620
|
-
var
|
|
7743
|
+
var import_node_path4 = __toESM(require("node:path"), 1);
|
|
7621
7744
|
var import_ts_morph2 = require("ts-morph");
|
|
7622
7745
|
|
|
7623
7746
|
// src/zod/docs-helpers.ts
|
|
@@ -7727,7 +7850,7 @@ var writeImportsForModel = /* @__PURE__ */ __name(async (model, sourceFile, conf
|
|
|
7727
7850
|
importList.push({
|
|
7728
7851
|
kind: import_ts_morph2.StructureKind.ImportDeclaration,
|
|
7729
7852
|
namespaceImport: "imports",
|
|
7730
|
-
moduleSpecifier: dotSlash(
|
|
7853
|
+
moduleSpecifier: dotSlash(import_node_path4.default.relative(outputPath, import_node_path4.default.resolve(import_node_path4.default.dirname(options.schemaPath), config.imports)))
|
|
7731
7854
|
});
|
|
7732
7855
|
}
|
|
7733
7856
|
if (config.useDecimalJs && model.fields.some((f) => f.type === "Decimal")) {
|
|
@@ -7742,7 +7865,7 @@ var writeImportsForModel = /* @__PURE__ */ __name(async (model, sourceFile, conf
|
|
|
7742
7865
|
const enumFields = model.fields.filter((f) => f.kind === "enum");
|
|
7743
7866
|
const relationFields = model.fields.filter((f) => f.kind === "object");
|
|
7744
7867
|
const clientPath = options.otherGenerators.find((each) => each.provider.value === "prisma-client-js").output.value;
|
|
7745
|
-
const relativePath2 =
|
|
7868
|
+
const relativePath2 = import_node_path4.default.relative(outputPath, clientPath);
|
|
7746
7869
|
if (enumFields.length > 0) {
|
|
7747
7870
|
importList.push({
|
|
7748
7871
|
kind: import_ts_morph2.StructureKind.ImportDeclaration,
|
|
@@ -10253,6 +10376,75 @@ var registerCustom = SuperJSON.registerCustom;
|
|
|
10253
10376
|
var registerSymbol = SuperJSON.registerSymbol;
|
|
10254
10377
|
var allowErrorProps = SuperJSON.allowErrorProps;
|
|
10255
10378
|
|
|
10379
|
+
// ../json/src/utils/parse.ts
|
|
10380
|
+
init_cjs_shims();
|
|
10381
|
+
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*:/;
|
|
10382
|
+
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*:/;
|
|
10383
|
+
var JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(?:\.\d{1,17})?(?:E[+-]?\d+)?\s*$/i;
|
|
10384
|
+
function jsonParseTransform(key, value) {
|
|
10385
|
+
if (key === "__proto__" || key === "constructor" && value && typeof value === "object" && "prototype" in value) {
|
|
10386
|
+
console.warn(`Dropping "${key}" key to prevent prototype pollution.`);
|
|
10387
|
+
return;
|
|
10388
|
+
}
|
|
10389
|
+
return value;
|
|
10390
|
+
}
|
|
10391
|
+
__name(jsonParseTransform, "jsonParseTransform");
|
|
10392
|
+
function parse4(value, options = {}) {
|
|
10393
|
+
if (typeof value !== "string") {
|
|
10394
|
+
return value;
|
|
10395
|
+
}
|
|
10396
|
+
if (value[0] === '"' && value[value.length - 1] === '"' && !value.includes("\\")) {
|
|
10397
|
+
return value.slice(1, -1);
|
|
10398
|
+
}
|
|
10399
|
+
const _value = value.trim();
|
|
10400
|
+
if (_value.length <= 9) {
|
|
10401
|
+
switch (_value.toLowerCase()) {
|
|
10402
|
+
case "true": {
|
|
10403
|
+
return true;
|
|
10404
|
+
}
|
|
10405
|
+
case "false": {
|
|
10406
|
+
return false;
|
|
10407
|
+
}
|
|
10408
|
+
case "undefined": {
|
|
10409
|
+
return void 0;
|
|
10410
|
+
}
|
|
10411
|
+
case "null": {
|
|
10412
|
+
return null;
|
|
10413
|
+
}
|
|
10414
|
+
case "nan": {
|
|
10415
|
+
return Number.NaN;
|
|
10416
|
+
}
|
|
10417
|
+
case "infinity": {
|
|
10418
|
+
return Number.POSITIVE_INFINITY;
|
|
10419
|
+
}
|
|
10420
|
+
case "-infinity": {
|
|
10421
|
+
return Number.NEGATIVE_INFINITY;
|
|
10422
|
+
}
|
|
10423
|
+
}
|
|
10424
|
+
}
|
|
10425
|
+
if (!JsonSigRx.test(value)) {
|
|
10426
|
+
if (options.strict) {
|
|
10427
|
+
throw new Error("Invalid JSON");
|
|
10428
|
+
}
|
|
10429
|
+
return value;
|
|
10430
|
+
}
|
|
10431
|
+
try {
|
|
10432
|
+
if (suspectProtoRx.test(value) || suspectConstructorRx.test(value)) {
|
|
10433
|
+
if (options.strict) {
|
|
10434
|
+
throw new Error("Possible prototype pollution");
|
|
10435
|
+
}
|
|
10436
|
+
return JSON.parse(value, jsonParseTransform);
|
|
10437
|
+
}
|
|
10438
|
+
return JSON.parse(value);
|
|
10439
|
+
} catch (error) {
|
|
10440
|
+
if (options.strict) {
|
|
10441
|
+
throw error;
|
|
10442
|
+
}
|
|
10443
|
+
return value;
|
|
10444
|
+
}
|
|
10445
|
+
}
|
|
10446
|
+
__name(parse4, "parse");
|
|
10447
|
+
|
|
10256
10448
|
// ../json/src/utils/parse-error.ts
|
|
10257
10449
|
init_cjs_shims();
|
|
10258
10450
|
|
|
@@ -10459,7 +10651,47 @@ var isNumber2 = /* @__PURE__ */ __name((value) => {
|
|
|
10459
10651
|
}
|
|
10460
10652
|
}, "isNumber");
|
|
10461
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
|
+
|
|
10462
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
|
+
];
|
|
10463
10695
|
var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
10464
10696
|
const space = isNumber2(spacing) ? " ".repeat(spacing) : spacing;
|
|
10465
10697
|
switch (value) {
|
|
@@ -10467,7 +10699,7 @@ var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
|
10467
10699
|
return "null";
|
|
10468
10700
|
}
|
|
10469
10701
|
case void 0: {
|
|
10470
|
-
return "undefined";
|
|
10702
|
+
return '"undefined"';
|
|
10471
10703
|
}
|
|
10472
10704
|
case true: {
|
|
10473
10705
|
return "true";
|
|
@@ -10475,6 +10707,12 @@ var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
|
10475
10707
|
case false: {
|
|
10476
10708
|
return "false";
|
|
10477
10709
|
}
|
|
10710
|
+
case Number.POSITIVE_INFINITY: {
|
|
10711
|
+
return "infinity";
|
|
10712
|
+
}
|
|
10713
|
+
case Number.NEGATIVE_INFINITY: {
|
|
10714
|
+
return "-infinity";
|
|
10715
|
+
}
|
|
10478
10716
|
}
|
|
10479
10717
|
if (Array.isArray(value)) {
|
|
10480
10718
|
return `[${space}${value.map((v) => stringify2(v, space)).join(`,${space}`)}${space}]`;
|
|
@@ -10490,8 +10728,8 @@ var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
|
10490
10728
|
return JSON.stringify(value);
|
|
10491
10729
|
}
|
|
10492
10730
|
case "object": {
|
|
10493
|
-
const keys = Object.keys(value);
|
|
10494
|
-
return `{${space}${keys.map((
|
|
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}}`;
|
|
10495
10733
|
}
|
|
10496
10734
|
default:
|
|
10497
10735
|
return "null";
|
|
@@ -10518,8 +10756,6 @@ var StormJSON = class _StormJSON extends SuperJSON {
|
|
|
10518
10756
|
}
|
|
10519
10757
|
/**
|
|
10520
10758
|
* Serialize the given value with superjson
|
|
10521
|
-
*
|
|
10522
|
-
*
|
|
10523
10759
|
*/
|
|
10524
10760
|
static serialize(object) {
|
|
10525
10761
|
return _StormJSON.instance.serialize(object);
|
|
@@ -10531,32 +10767,23 @@ var StormJSON = class _StormJSON extends SuperJSON {
|
|
|
10531
10767
|
* @returns The parsed data
|
|
10532
10768
|
*/
|
|
10533
10769
|
static parse(value) {
|
|
10534
|
-
return
|
|
10770
|
+
return parse4(value);
|
|
10535
10771
|
}
|
|
10536
10772
|
/**
|
|
10537
10773
|
* Serializes the given data to a JSON string.
|
|
10538
10774
|
* By default the JSON string is formatted with a 2 space indentation to be easy readable.
|
|
10539
10775
|
*
|
|
10540
10776
|
* @param value - Object which should be serialized to JSON
|
|
10541
|
-
* @param
|
|
10777
|
+
* @param _options - JSON serialize options
|
|
10542
10778
|
* @returns the formatted JSON representation of the object
|
|
10543
10779
|
*/
|
|
10544
|
-
static stringify(value,
|
|
10780
|
+
static stringify(value, _options) {
|
|
10545
10781
|
const customTransformer = _StormJSON.instance.customTransformerRegistry.findApplicable(value);
|
|
10546
10782
|
let result = value;
|
|
10547
|
-
if (customTransformer) {
|
|
10783
|
+
if (customTransformer && customTransformer.isApplicable(value)) {
|
|
10548
10784
|
result = customTransformer.serialize(result);
|
|
10549
10785
|
}
|
|
10550
|
-
return stringify2(result
|
|
10551
|
-
}
|
|
10552
|
-
/**
|
|
10553
|
-
* Stringify the given value with superjson
|
|
10554
|
-
*
|
|
10555
|
-
* @param obj - The object to stringify
|
|
10556
|
-
* @returns The stringified object
|
|
10557
|
-
*/
|
|
10558
|
-
static stringifyBase(obj) {
|
|
10559
|
-
return _StormJSON.instance.stringify(obj);
|
|
10786
|
+
return stringify2(result);
|
|
10560
10787
|
}
|
|
10561
10788
|
/**
|
|
10562
10789
|
* Parses the given JSON string and returns the object the JSON content represents.
|
|
@@ -10626,13 +10853,13 @@ StormJSON.instance.registerCustom({
|
|
|
10626
10853
|
|
|
10627
10854
|
// ../fs/src/write-file.ts
|
|
10628
10855
|
var import_promises3 = require("node:fs/promises");
|
|
10629
|
-
var writeFile = /* @__PURE__ */ __name(async (filePath, content, options) => {
|
|
10856
|
+
var writeFile = /* @__PURE__ */ __name(async (filePath, content = "", options = {}) => {
|
|
10630
10857
|
if (!filePath) {
|
|
10631
10858
|
throw new Error("No file path provided to read data");
|
|
10632
10859
|
}
|
|
10633
10860
|
const directory = findFilePath(correctPath(filePath));
|
|
10634
10861
|
if (!existsSync(directory)) {
|
|
10635
|
-
if (options
|
|
10862
|
+
if (options.createDirectory !== false) {
|
|
10636
10863
|
await createDirectory(directory);
|
|
10637
10864
|
} else {
|
|
10638
10865
|
throw new Error(`Directory ${directory} does not exist`);
|
|
@@ -10642,7 +10869,7 @@ var writeFile = /* @__PURE__ */ __name(async (filePath, content, options) => {
|
|
|
10642
10869
|
}, "writeFile");
|
|
10643
10870
|
|
|
10644
10871
|
// src/utils/write-file-safely.ts
|
|
10645
|
-
var
|
|
10872
|
+
var import_node_path5 = __toESM(require("node:path"), 1);
|
|
10646
10873
|
|
|
10647
10874
|
// src/utils/format-file.ts
|
|
10648
10875
|
init_cjs_shims();
|
|
@@ -10686,7 +10913,7 @@ var writeFileSafely = /* @__PURE__ */ __name(async (writeLocation, content, addT
|
|
|
10686
10913
|
}, "writeFileSafely");
|
|
10687
10914
|
var writeIndexFile = /* @__PURE__ */ __name(async (indexPath) => {
|
|
10688
10915
|
const rows = Array.from(indexExports).map((filePath) => {
|
|
10689
|
-
let relativePath2 =
|
|
10916
|
+
let relativePath2 = import_node_path5.default.relative(import_node_path5.default.dirname(indexPath), filePath);
|
|
10690
10917
|
if (relativePath2.endsWith(".ts")) {
|
|
10691
10918
|
relativePath2 = relativePath2.slice(0, relativePath2.lastIndexOf(".ts"));
|
|
10692
10919
|
}
|
|
@@ -10864,7 +11091,7 @@ init_cjs_shims();
|
|
|
10864
11091
|
|
|
10865
11092
|
// src/zod/transformer.ts
|
|
10866
11093
|
init_cjs_shims();
|
|
10867
|
-
var
|
|
11094
|
+
var import_node_path6 = __toESM(require("node:path"), 1);
|
|
10868
11095
|
|
|
10869
11096
|
// src/zod/mongodb-helpers.ts
|
|
10870
11097
|
init_cjs_shims();
|
|
@@ -10974,13 +11201,13 @@ var Transformer = class _Transformer {
|
|
|
10974
11201
|
this.isCustomPrismaClientOutputPath = prismaClientCustomPath !== "@prisma/client";
|
|
10975
11202
|
}
|
|
10976
11203
|
static async generateIndex() {
|
|
10977
|
-
const indexPath =
|
|
11204
|
+
const indexPath = import_node_path6.default.join(_Transformer.outputPath, "schemas/index.ts");
|
|
10978
11205
|
await writeIndexFile(indexPath);
|
|
10979
11206
|
}
|
|
10980
11207
|
async generateEnumSchemas() {
|
|
10981
11208
|
for (const enumType2 of this.enumTypes) {
|
|
10982
11209
|
const { name, values } = enumType2;
|
|
10983
|
-
await writeFileSafely(
|
|
11210
|
+
await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/enums/${lowerCaseFirst(name)}.schema.ts`), `${this.generateImportZodStatement()}
|
|
10984
11211
|
${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.stringify(values)})`)}`);
|
|
10985
11212
|
}
|
|
10986
11213
|
}
|
|
@@ -10994,7 +11221,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
10994
11221
|
const zodObjectSchemaFields = this.generateObjectSchemaFields();
|
|
10995
11222
|
const objectSchema = this.prepareObjectSchema(zodObjectSchemaFields);
|
|
10996
11223
|
const objectSchemaName = this.resolveObjectSchemaName();
|
|
10997
|
-
await writeFileSafely(
|
|
11224
|
+
await writeFileSafely(import_node_path6.default.join(_Transformer.outputPath, `schemas/objects/${lowerCaseFirst(objectSchemaName)}.schema.ts`), objectSchema);
|
|
10998
11225
|
}
|
|
10999
11226
|
generateObjectSchemaFields() {
|
|
11000
11227
|
const zodObjectSchemaFields = this.fields.map((field) => this.generateObjectSchemaField(field)).flatMap((item) => item).map((item) => {
|
|
@@ -11128,9 +11355,9 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11128
11355
|
generateImportPrismaStatement() {
|
|
11129
11356
|
let prismaClientImportPath;
|
|
11130
11357
|
if (_Transformer.isCustomPrismaClientOutputPath) {
|
|
11131
|
-
const fromPath =
|
|
11358
|
+
const fromPath = import_node_path6.default.join(_Transformer.outputPath, "schemas", "objects");
|
|
11132
11359
|
const toPath = _Transformer.prismaClientOutputPath;
|
|
11133
|
-
const relativePathFromOutputToPrismaClient =
|
|
11360
|
+
const relativePathFromOutputToPrismaClient = import_node_path6.default.relative(fromPath, toPath).split(import_node_path6.default.sep).join(import_node_path6.default.posix.sep);
|
|
11134
11361
|
prismaClientImportPath = relativePathFromOutputToPrismaClient;
|
|
11135
11362
|
} else {
|
|
11136
11363
|
prismaClientImportPath = _Transformer.prismaClientOutputPath;
|
|
@@ -11260,7 +11487,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11260
11487
|
includeImport,
|
|
11261
11488
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
|
|
11262
11489
|
];
|
|
11263
|
-
await writeFileSafely(
|
|
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 })`)}`);
|
|
11264
11491
|
}
|
|
11265
11492
|
if (findFirst) {
|
|
11266
11493
|
const imports = [
|
|
@@ -11271,7 +11498,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11271
11498
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`,
|
|
11272
11499
|
`import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
|
|
11273
11500
|
];
|
|
11274
|
-
await writeFileSafely(
|
|
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() })`)}`);
|
|
11275
11502
|
}
|
|
11276
11503
|
if (findMany) {
|
|
11277
11504
|
const imports = [
|
|
@@ -11282,7 +11509,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11282
11509
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`,
|
|
11283
11510
|
`import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
|
|
11284
11511
|
];
|
|
11285
|
-
await writeFileSafely(
|
|
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() })`)}`);
|
|
11286
11513
|
}
|
|
11287
11514
|
if (createOne) {
|
|
11288
11515
|
const imports = [
|
|
@@ -11291,19 +11518,19 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11291
11518
|
`import { ${modelName}CreateInputObjectSchema } from './objects/${modelName}CreateInput.schema'`,
|
|
11292
11519
|
`import { ${modelName}UncheckedCreateInputObjectSchema } from './objects/${modelName}UncheckedCreateInput.schema'`
|
|
11293
11520
|
];
|
|
11294
|
-
await writeFileSafely(
|
|
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]) })`)}`);
|
|
11295
11522
|
}
|
|
11296
11523
|
if (createMany) {
|
|
11297
11524
|
const imports = [
|
|
11298
11525
|
`import { ${modelName}CreateManyInputObjectSchema } from './objects/${modelName}CreateManyInput.schema'`
|
|
11299
11526
|
];
|
|
11300
|
-
await writeFileSafely(
|
|
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()"} })`)}`);
|
|
11301
11528
|
}
|
|
11302
11529
|
if (createManyAndReturn) {
|
|
11303
11530
|
const imports = [
|
|
11304
11531
|
`import { ${modelName}CreateManyAndReturnInputObjectSchema } from './objects/${modelName}CreateManyAndReturnInput.schema'`
|
|
11305
11532
|
];
|
|
11306
|
-
await writeFileSafely(
|
|
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()"} })`)}`);
|
|
11307
11534
|
}
|
|
11308
11535
|
if (deleteOne) {
|
|
11309
11536
|
const imports = [
|
|
@@ -11311,13 +11538,13 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11311
11538
|
includeImport,
|
|
11312
11539
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
|
|
11313
11540
|
];
|
|
11314
|
-
await writeFileSafely(
|
|
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 })`)}`);
|
|
11315
11542
|
}
|
|
11316
11543
|
if (deleteMany) {
|
|
11317
11544
|
const imports = [
|
|
11318
11545
|
`import { ${modelName}WhereInputObjectSchema } from './objects/${modelName}WhereInput.schema'`
|
|
11319
11546
|
];
|
|
11320
|
-
await writeFileSafely(
|
|
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() })`)}`);
|
|
11321
11548
|
}
|
|
11322
11549
|
if (updateOne) {
|
|
11323
11550
|
const imports = [
|
|
@@ -11327,20 +11554,20 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11327
11554
|
`import { ${modelName}UncheckedUpdateInputObjectSchema } from './objects/${modelName}UncheckedUpdateInput.schema'`,
|
|
11328
11555
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
|
|
11329
11556
|
];
|
|
11330
|
-
await writeFileSafely(
|
|
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 })`)}`);
|
|
11331
11558
|
}
|
|
11332
11559
|
if (updateMany) {
|
|
11333
11560
|
const imports = [
|
|
11334
11561
|
`import { ${modelName}UpdateManyMutationInputObjectSchema } from './objects/${modelName}UpdateManyMutationInput.schema'`,
|
|
11335
11562
|
`import { ${modelName}WhereInputObjectSchema } from './objects/${modelName}WhereInput.schema'`
|
|
11336
11563
|
];
|
|
11337
|
-
await writeFileSafely(
|
|
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() })`)}`);
|
|
11338
11565
|
}
|
|
11339
11566
|
if (updateManyAndReturn) {
|
|
11340
11567
|
const imports = [
|
|
11341
11568
|
`import { ${modelName}UpdateManyAndReturnInputObjectSchema } from './objects/${modelName}UpdateManyAndReturnInput.schema'`
|
|
11342
11569
|
];
|
|
11343
|
-
await writeFileSafely(
|
|
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()"} })`)}`);
|
|
11344
11571
|
}
|
|
11345
11572
|
if (upsertOne) {
|
|
11346
11573
|
const imports = [
|
|
@@ -11352,7 +11579,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11352
11579
|
`import { ${modelName}UpdateInputObjectSchema } from './objects/${modelName}UpdateInput.schema'`,
|
|
11353
11580
|
`import { ${modelName}UncheckedUpdateInputObjectSchema } from './objects/${modelName}UncheckedUpdateInput.schema'`
|
|
11354
11581
|
];
|
|
11355
|
-
await writeFileSafely(
|
|
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 ]) })`)}`);
|
|
11356
11583
|
}
|
|
11357
11584
|
if (aggregate) {
|
|
11358
11585
|
const imports = [
|
|
@@ -11383,7 +11610,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11383
11610
|
aggregateOperations.push(`_sum: ${modelName}SumAggregateInputObjectSchema.optional()`);
|
|
11384
11611
|
}
|
|
11385
11612
|
}
|
|
11386
|
-
await writeFileSafely(
|
|
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(", ")} })`)}`);
|
|
11387
11614
|
}
|
|
11388
11615
|
if (groupBy) {
|
|
11389
11616
|
const imports = [
|
|
@@ -11392,7 +11619,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11392
11619
|
`import { ${modelName}ScalarWhereWithAggregatesInputObjectSchema } from './objects/${modelName}ScalarWhereWithAggregatesInput.schema'`,
|
|
11393
11620
|
`import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
|
|
11394
11621
|
];
|
|
11395
|
-
await writeFileSafely(
|
|
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) })`)}`);
|
|
11396
11623
|
}
|
|
11397
11624
|
}
|
|
11398
11625
|
}
|
|
@@ -11950,12 +12177,12 @@ ${JSON.stringify(config)}`);
|
|
|
11950
12177
|
}
|
|
11951
12178
|
resolveModelsComments(models, hiddenModels);
|
|
11952
12179
|
consoleLog("Generating tRPC export file");
|
|
11953
|
-
const trpcExports = project.createSourceFile(
|
|
12180
|
+
const trpcExports = project.createSourceFile(import_node_path7.default.resolve(outputDir, "trpc.ts"), void 0, {
|
|
11954
12181
|
overwrite: true
|
|
11955
12182
|
});
|
|
11956
12183
|
await generateTRPCExports(trpcExports, config, options, outputDir);
|
|
11957
12184
|
consoleLog("Generating tRPC app router");
|
|
11958
|
-
const appRouter = project.createSourceFile(
|
|
12185
|
+
const appRouter = project.createSourceFile(import_node_path7.default.resolve(outputDir, "routers", `index.ts`), void 0, {
|
|
11959
12186
|
overwrite: true
|
|
11960
12187
|
});
|
|
11961
12188
|
consoleLog("Generating tRPC router imports");
|
|
@@ -11984,7 +12211,7 @@ ${JSON.stringify(config)}`);
|
|
|
11984
12211
|
const plural = (0, import_pluralize.default)(lowerCaseFirst(model));
|
|
11985
12212
|
consoleLog(`Generating tRPC router for model ${model}`);
|
|
11986
12213
|
generateRouterImport(appRouter, plural, model);
|
|
11987
|
-
const modelRouter = project.createSourceFile(
|
|
12214
|
+
const modelRouter = project.createSourceFile(import_node_path7.default.resolve(outputDir, "routers", `${lowerCaseFirst(model)}.router.ts`), void 0, {
|
|
11988
12215
|
overwrite: true
|
|
11989
12216
|
});
|
|
11990
12217
|
generateCreateRouterImport({
|