@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.js
CHANGED
|
@@ -35,9 +35,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
35
35
|
mod
|
|
36
36
|
));
|
|
37
37
|
|
|
38
|
-
// ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+
|
|
38
|
+
// ../../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/esm_shims.js
|
|
39
39
|
var init_esm_shims = __esm({
|
|
40
|
-
"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+
|
|
40
|
+
"../../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/esm_shims.js"() {
|
|
41
41
|
"use strict";
|
|
42
42
|
}
|
|
43
43
|
});
|
|
@@ -2638,9 +2638,10 @@ __name(normalizeString, "normalizeString");
|
|
|
2638
2638
|
|
|
2639
2639
|
// ../string-format/src/lower-case-first.ts
|
|
2640
2640
|
init_esm_shims();
|
|
2641
|
-
|
|
2641
|
+
function lowerCaseFirst(input) {
|
|
2642
2642
|
return input ? input.charAt(0).toLowerCase() + input.slice(1) : input;
|
|
2643
|
-
}
|
|
2643
|
+
}
|
|
2644
|
+
__name(lowerCaseFirst, "lowerCaseFirst");
|
|
2644
2645
|
|
|
2645
2646
|
// src/prisma-generator.ts
|
|
2646
2647
|
var import_pluralize = __toESM(require_pluralize(), 1);
|
|
@@ -6915,12 +6916,31 @@ init_esm_shims();
|
|
|
6915
6916
|
var EMPTY_STRING = "";
|
|
6916
6917
|
var $NestedValue = Symbol("NestedValue");
|
|
6917
6918
|
|
|
6919
|
+
// ../path/src/file-path-fns.ts
|
|
6920
|
+
import { relative } from "node:path";
|
|
6921
|
+
|
|
6918
6922
|
// ../path/src/correct-path.ts
|
|
6919
6923
|
init_esm_shims();
|
|
6920
6924
|
|
|
6921
6925
|
// ../path/src/is-file.ts
|
|
6922
6926
|
init_esm_shims();
|
|
6923
6927
|
import { lstatSync, statSync } from "node:fs";
|
|
6928
|
+
|
|
6929
|
+
// ../path/src/regex.ts
|
|
6930
|
+
init_esm_shims();
|
|
6931
|
+
var DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
|
|
6932
|
+
var DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
|
|
6933
|
+
var UNC_REGEX = /^[/\\]{2}/;
|
|
6934
|
+
var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
|
|
6935
|
+
|
|
6936
|
+
// ../path/src/slash.ts
|
|
6937
|
+
init_esm_shims();
|
|
6938
|
+
function slash(str) {
|
|
6939
|
+
return str.replace(/\\/g, "/");
|
|
6940
|
+
}
|
|
6941
|
+
__name(slash, "slash");
|
|
6942
|
+
|
|
6943
|
+
// ../path/src/is-file.ts
|
|
6924
6944
|
function isFile(path6, additionalPath) {
|
|
6925
6945
|
return Boolean(statSync(additionalPath ? joinPaths(additionalPath, path6) : path6, {
|
|
6926
6946
|
throwIfNoEntry: false
|
|
@@ -6934,29 +6954,26 @@ function isDirectory(path6, additionalPath) {
|
|
|
6934
6954
|
}
|
|
6935
6955
|
__name(isDirectory, "isDirectory");
|
|
6936
6956
|
function isAbsolutePath(path6) {
|
|
6937
|
-
return
|
|
6957
|
+
return ABSOLUTE_PATH_REGEX.test(slash(path6));
|
|
6938
6958
|
}
|
|
6939
6959
|
__name(isAbsolutePath, "isAbsolutePath");
|
|
6940
6960
|
|
|
6941
6961
|
// ../path/src/correct-path.ts
|
|
6942
|
-
var _DRIVE_LETTER_START_RE2 = /^[A-Z]:\//i;
|
|
6943
6962
|
function normalizeWindowsPath2(input = "") {
|
|
6944
6963
|
if (!input) {
|
|
6945
6964
|
return input;
|
|
6946
6965
|
}
|
|
6947
|
-
return input
|
|
6966
|
+
return slash(input).replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
|
|
6948
6967
|
}
|
|
6949
6968
|
__name(normalizeWindowsPath2, "normalizeWindowsPath");
|
|
6950
|
-
var _UNC_REGEX2 = /^[/\\]{2}/;
|
|
6951
|
-
var _DRIVE_LETTER_RE2 = /^[A-Z]:$/i;
|
|
6952
6969
|
function correctPath(path6) {
|
|
6953
6970
|
if (!path6 || path6.length === 0) {
|
|
6954
6971
|
return ".";
|
|
6955
6972
|
}
|
|
6956
6973
|
path6 = normalizeWindowsPath2(path6);
|
|
6957
|
-
const isUNCPath = path6.match(
|
|
6974
|
+
const isUNCPath = path6.match(UNC_REGEX);
|
|
6958
6975
|
const isPathAbsolute = isAbsolutePath(path6);
|
|
6959
|
-
const trailingSeparator = path6
|
|
6976
|
+
const trailingSeparator = path6.endsWith("/");
|
|
6960
6977
|
path6 = normalizeString2(path6, !isPathAbsolute);
|
|
6961
6978
|
if (path6.length === 0) {
|
|
6962
6979
|
if (isPathAbsolute) {
|
|
@@ -6967,7 +6984,7 @@ function correctPath(path6) {
|
|
|
6967
6984
|
if (trailingSeparator) {
|
|
6968
6985
|
path6 += "/";
|
|
6969
6986
|
}
|
|
6970
|
-
if (
|
|
6987
|
+
if (DRIVE_LETTER_REGEX.test(path6)) {
|
|
6971
6988
|
path6 += "/";
|
|
6972
6989
|
}
|
|
6973
6990
|
if (isUNCPath) {
|
|
@@ -6976,7 +6993,7 @@ function correctPath(path6) {
|
|
|
6976
6993
|
}
|
|
6977
6994
|
return `//${path6}`;
|
|
6978
6995
|
}
|
|
6979
|
-
return isPathAbsolute && !
|
|
6996
|
+
return !path6.startsWith("/") && isPathAbsolute && !DRIVE_LETTER_REGEX.test(path6) ? `/${path6}` : path6;
|
|
6980
6997
|
}
|
|
6981
6998
|
__name(correctPath, "correctPath");
|
|
6982
6999
|
function normalizeString2(path6, allowAboveRoot) {
|
|
@@ -7044,65 +7061,28 @@ __name(normalizeString2, "normalizeString");
|
|
|
7044
7061
|
// ../path/src/get-workspace-root.ts
|
|
7045
7062
|
init_esm_shims();
|
|
7046
7063
|
|
|
7047
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
7048
|
-
init_esm_shims();
|
|
7049
|
-
|
|
7050
|
-
// ../../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
|
|
7051
|
-
init_esm_shims();
|
|
7052
|
-
|
|
7053
|
-
// ../../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
|
|
7054
|
-
init_esm_shims();
|
|
7055
|
-
|
|
7056
|
-
// ../../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
|
|
7064
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/index.js
|
|
7057
7065
|
init_esm_shims();
|
|
7058
|
-
var __defProp2 = Object.defineProperty;
|
|
7059
|
-
var __name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name", {
|
|
7060
|
-
value,
|
|
7061
|
-
configurable: true
|
|
7062
|
-
}), "__name");
|
|
7063
|
-
|
|
7064
|
-
// ../../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
|
|
7065
|
-
import { existsSync as existsSync2 } from "node:fs";
|
|
7066
|
-
import { join } from "node:path";
|
|
7067
|
-
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
7068
|
-
var depth = 0;
|
|
7069
|
-
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
7070
|
-
const _startPath = startPath ?? process.cwd();
|
|
7071
|
-
if (endDirectoryNames.some((endDirName) => existsSync2(join(_startPath, endDirName)))) {
|
|
7072
|
-
return _startPath;
|
|
7073
|
-
}
|
|
7074
|
-
if (endFileNames.some((endFileName) => existsSync2(join(_startPath, endFileName)))) {
|
|
7075
|
-
return _startPath;
|
|
7076
|
-
}
|
|
7077
|
-
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
7078
|
-
const parent = join(_startPath, "..");
|
|
7079
|
-
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
7080
|
-
}
|
|
7081
|
-
return void 0;
|
|
7082
|
-
}
|
|
7083
|
-
__name(findFolderUp, "findFolderUp");
|
|
7084
|
-
__name2(findFolderUp, "findFolderUp");
|
|
7085
7066
|
|
|
7086
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
7067
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
|
|
7087
7068
|
init_esm_shims();
|
|
7088
|
-
var
|
|
7069
|
+
var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
|
|
7089
7070
|
function normalizeWindowsPath3(input = "") {
|
|
7090
7071
|
if (!input) {
|
|
7091
7072
|
return input;
|
|
7092
7073
|
}
|
|
7093
|
-
return input.replace(/\\/g, "/").replace(
|
|
7074
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE2, (r) => r.toUpperCase());
|
|
7094
7075
|
}
|
|
7095
7076
|
__name(normalizeWindowsPath3, "normalizeWindowsPath");
|
|
7096
|
-
|
|
7097
|
-
var _UNC_REGEX3 = /^[/\\]{2}/;
|
|
7077
|
+
var _UNC_REGEX2 = /^[/\\]{2}/;
|
|
7098
7078
|
var _IS_ABSOLUTE_RE2 = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
7099
|
-
var
|
|
7100
|
-
var correctPaths2 = /* @__PURE__ */
|
|
7079
|
+
var _DRIVE_LETTER_RE2 = /^[A-Za-z]:$/;
|
|
7080
|
+
var correctPaths2 = /* @__PURE__ */ __name(function(path6) {
|
|
7101
7081
|
if (!path6 || path6.length === 0) {
|
|
7102
7082
|
return ".";
|
|
7103
7083
|
}
|
|
7104
7084
|
path6 = normalizeWindowsPath3(path6);
|
|
7105
|
-
const isUNCPath = path6.match(
|
|
7085
|
+
const isUNCPath = path6.match(_UNC_REGEX2);
|
|
7106
7086
|
const isPathAbsolute = isAbsolute2(path6);
|
|
7107
7087
|
const trailingSeparator = path6[path6.length - 1] === "/";
|
|
7108
7088
|
path6 = normalizeString3(path6, !isPathAbsolute);
|
|
@@ -7115,7 +7095,7 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
|
|
|
7115
7095
|
if (trailingSeparator) {
|
|
7116
7096
|
path6 += "/";
|
|
7117
7097
|
}
|
|
7118
|
-
if (
|
|
7098
|
+
if (_DRIVE_LETTER_RE2.test(path6)) {
|
|
7119
7099
|
path6 += "/";
|
|
7120
7100
|
}
|
|
7121
7101
|
if (isUNCPath) {
|
|
@@ -7126,14 +7106,6 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
|
|
|
7126
7106
|
}
|
|
7127
7107
|
return isPathAbsolute && !isAbsolute2(path6) ? `/${path6}` : path6;
|
|
7128
7108
|
}, "correctPaths");
|
|
7129
|
-
function cwd() {
|
|
7130
|
-
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
7131
|
-
return process.cwd().replace(/\\/g, "/");
|
|
7132
|
-
}
|
|
7133
|
-
return "/";
|
|
7134
|
-
}
|
|
7135
|
-
__name(cwd, "cwd");
|
|
7136
|
-
__name2(cwd, "cwd");
|
|
7137
7109
|
function normalizeString3(path6, allowAboveRoot) {
|
|
7138
7110
|
let res = "";
|
|
7139
7111
|
let lastSegmentLength = 0;
|
|
@@ -7195,12 +7167,36 @@ function normalizeString3(path6, allowAboveRoot) {
|
|
|
7195
7167
|
return res;
|
|
7196
7168
|
}
|
|
7197
7169
|
__name(normalizeString3, "normalizeString");
|
|
7198
|
-
|
|
7199
|
-
var isAbsolute2 = /* @__PURE__ */ __name2(function(p) {
|
|
7170
|
+
var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
|
|
7200
7171
|
return _IS_ABSOLUTE_RE2.test(p);
|
|
7201
7172
|
}, "isAbsolute");
|
|
7202
7173
|
|
|
7203
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
7174
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
|
|
7175
|
+
init_esm_shims();
|
|
7176
|
+
|
|
7177
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-RWBPUJIZ.js
|
|
7178
|
+
init_esm_shims();
|
|
7179
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
7180
|
+
import { join } from "node:path";
|
|
7181
|
+
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
7182
|
+
var depth = 0;
|
|
7183
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
7184
|
+
const _startPath = startPath ?? process.cwd();
|
|
7185
|
+
if (endDirectoryNames.some((endDirName) => existsSync2(join(_startPath, endDirName)))) {
|
|
7186
|
+
return _startPath;
|
|
7187
|
+
}
|
|
7188
|
+
if (endFileNames.some((endFileName) => existsSync2(join(_startPath, endFileName)))) {
|
|
7189
|
+
return _startPath;
|
|
7190
|
+
}
|
|
7191
|
+
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
7192
|
+
const parent = join(_startPath, "..");
|
|
7193
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
7194
|
+
}
|
|
7195
|
+
return void 0;
|
|
7196
|
+
}
|
|
7197
|
+
__name(findFolderUp, "findFolderUp");
|
|
7198
|
+
|
|
7199
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
|
|
7204
7200
|
var rootFiles = [
|
|
7205
7201
|
"storm-workspace.json",
|
|
7206
7202
|
"storm-workspace.json",
|
|
@@ -7250,31 +7246,19 @@ function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
|
7250
7246
|
return correctPaths2(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
7251
7247
|
}
|
|
7252
7248
|
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
7253
|
-
__name2(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
7254
|
-
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
7255
|
-
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
7256
|
-
if (!result) {
|
|
7257
|
-
throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
|
|
7258
|
-
${rootFiles.join("\n")}
|
|
7259
|
-
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
|
|
7260
|
-
}
|
|
7261
|
-
return result;
|
|
7262
|
-
}
|
|
7263
|
-
__name(findWorkspaceRoot, "findWorkspaceRoot");
|
|
7264
|
-
__name2(findWorkspaceRoot, "findWorkspaceRoot");
|
|
7265
7249
|
|
|
7266
7250
|
// ../path/src/get-parent-path.ts
|
|
7267
7251
|
init_esm_shims();
|
|
7268
7252
|
var resolveParentPath = /* @__PURE__ */ __name((path6) => {
|
|
7269
7253
|
return resolvePaths(path6, "..");
|
|
7270
7254
|
}, "resolveParentPath");
|
|
7271
|
-
var getParentPath = /* @__PURE__ */ __name((name,
|
|
7255
|
+
var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
|
|
7272
7256
|
const ignoreCase = options?.ignoreCase ?? true;
|
|
7273
7257
|
const skipCwd = options?.skipCwd ?? false;
|
|
7274
7258
|
const targetType = options?.targetType ?? "both";
|
|
7275
|
-
let dir =
|
|
7259
|
+
let dir = cwd;
|
|
7276
7260
|
if (skipCwd) {
|
|
7277
|
-
dir = resolveParentPath(
|
|
7261
|
+
dir = resolveParentPath(cwd);
|
|
7278
7262
|
}
|
|
7279
7263
|
let names = Array.isArray(name) ? name : [
|
|
7280
7264
|
name
|
|
@@ -7371,12 +7355,12 @@ function findFilePath(filePath) {
|
|
|
7371
7355
|
}), "");
|
|
7372
7356
|
}
|
|
7373
7357
|
__name(findFilePath, "findFilePath");
|
|
7374
|
-
function resolvePath(path6,
|
|
7358
|
+
function resolvePath(path6, cwd = getWorkspaceRoot()) {
|
|
7375
7359
|
const paths = normalizeWindowsPath2(path6).split("/");
|
|
7376
7360
|
let resolvedPath = "";
|
|
7377
7361
|
let resolvedAbsolute = false;
|
|
7378
7362
|
for (let index = paths.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
7379
|
-
const path7 = index >= 0 ? paths[index] :
|
|
7363
|
+
const path7 = index >= 0 ? paths[index] : cwd;
|
|
7380
7364
|
if (!path7 || path7.length === 0) {
|
|
7381
7365
|
continue;
|
|
7382
7366
|
}
|
|
@@ -7395,25 +7379,7 @@ function resolvePaths(...paths) {
|
|
|
7395
7379
|
}
|
|
7396
7380
|
__name(resolvePaths, "resolvePaths");
|
|
7397
7381
|
function relativePath(from, to) {
|
|
7398
|
-
|
|
7399
|
-
const _to = resolvePath(to).replace(/^\/([A-Z]:)?$/i, "$1").split("/");
|
|
7400
|
-
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
7401
|
-
return _to.join("/");
|
|
7402
|
-
}
|
|
7403
|
-
const _fromCopy = [
|
|
7404
|
-
..._from
|
|
7405
|
-
];
|
|
7406
|
-
for (const segment of _fromCopy) {
|
|
7407
|
-
if (_to[0] !== segment) {
|
|
7408
|
-
break;
|
|
7409
|
-
}
|
|
7410
|
-
_from.shift();
|
|
7411
|
-
_to.shift();
|
|
7412
|
-
}
|
|
7413
|
-
return [
|
|
7414
|
-
..._from.map(() => ".."),
|
|
7415
|
-
..._to
|
|
7416
|
-
].join("/");
|
|
7382
|
+
return relative(from.replace(/\/$/, ""), to.replace(/\/$/, ""));
|
|
7417
7383
|
}
|
|
7418
7384
|
__name(relativePath, "relativePath");
|
|
7419
7385
|
|
|
@@ -7448,61 +7414,217 @@ init_esm_shims();
|
|
|
7448
7414
|
// ../string-format/src/acronyms.ts
|
|
7449
7415
|
init_esm_shims();
|
|
7450
7416
|
var ACRONYMS = [
|
|
7417
|
+
"3D",
|
|
7418
|
+
"4D",
|
|
7419
|
+
"5G",
|
|
7420
|
+
"6G",
|
|
7421
|
+
"7G",
|
|
7422
|
+
"8G",
|
|
7423
|
+
"ACID",
|
|
7424
|
+
"AES",
|
|
7425
|
+
"AI",
|
|
7426
|
+
"AJAX",
|
|
7451
7427
|
"API",
|
|
7428
|
+
"AR",
|
|
7429
|
+
"ASCII",
|
|
7430
|
+
"B2B",
|
|
7431
|
+
"B2C",
|
|
7432
|
+
"BFF",
|
|
7433
|
+
"BI",
|
|
7434
|
+
"BIOS",
|
|
7435
|
+
"BGP",
|
|
7436
|
+
"BOM",
|
|
7437
|
+
"BYOD",
|
|
7438
|
+
"C2C",
|
|
7439
|
+
"CAGR",
|
|
7440
|
+
"CAPTCHA",
|
|
7441
|
+
"CD",
|
|
7442
|
+
"CDN",
|
|
7443
|
+
"CDP",
|
|
7444
|
+
"CI",
|
|
7445
|
+
"CI/CD",
|
|
7446
|
+
"CIAM",
|
|
7447
|
+
"CICD",
|
|
7448
|
+
"CLI",
|
|
7449
|
+
"CMDB",
|
|
7450
|
+
"CORS",
|
|
7452
7451
|
"CPU",
|
|
7452
|
+
"CRUD",
|
|
7453
|
+
"CSR",
|
|
7453
7454
|
"CSS",
|
|
7455
|
+
"CX",
|
|
7456
|
+
"DAG",
|
|
7457
|
+
"DBMS",
|
|
7458
|
+
"DDoS",
|
|
7454
7459
|
"DNS",
|
|
7460
|
+
"DNSSEC",
|
|
7461
|
+
"DOM",
|
|
7462
|
+
"DR",
|
|
7463
|
+
"DRM",
|
|
7464
|
+
"DWH",
|
|
7465
|
+
"E2E",
|
|
7466
|
+
"EAI",
|
|
7467
|
+
"EKS",
|
|
7455
7468
|
"EOF",
|
|
7469
|
+
"EOD",
|
|
7470
|
+
"ETC",
|
|
7471
|
+
"ETL",
|
|
7472
|
+
"EULA",
|
|
7473
|
+
"FIDO",
|
|
7474
|
+
"FQDN",
|
|
7475
|
+
"FTP",
|
|
7476
|
+
"FaaS",
|
|
7477
|
+
"GDPR",
|
|
7478
|
+
"GCP",
|
|
7479
|
+
"GPU",
|
|
7456
7480
|
"GUID",
|
|
7481
|
+
"GUI",
|
|
7482
|
+
"GZIP",
|
|
7483
|
+
"HCI",
|
|
7484
|
+
"HDD",
|
|
7485
|
+
"HDFS",
|
|
7486
|
+
"HIPAA",
|
|
7487
|
+
"HMAC",
|
|
7488
|
+
"HOTP",
|
|
7489
|
+
"HSM",
|
|
7457
7490
|
"HTML",
|
|
7458
7491
|
"HTTP",
|
|
7492
|
+
"HTTP/2",
|
|
7493
|
+
"HTTP/2.0",
|
|
7494
|
+
"HTTP/3",
|
|
7495
|
+
"HTTP/3.0",
|
|
7496
|
+
"HTTP2",
|
|
7459
7497
|
"HTTPS",
|
|
7498
|
+
"HTTPS/2",
|
|
7499
|
+
"HTTPS/3",
|
|
7500
|
+
"HTTPS3",
|
|
7501
|
+
"IAM",
|
|
7502
|
+
"IAMM",
|
|
7503
|
+
"IAMT",
|
|
7504
|
+
"IaaS",
|
|
7460
7505
|
"ID",
|
|
7506
|
+
"IMAP",
|
|
7461
7507
|
"IP",
|
|
7508
|
+
"IPFS",
|
|
7509
|
+
"IoT",
|
|
7462
7510
|
"JSON",
|
|
7511
|
+
"JSONP",
|
|
7512
|
+
"JWT",
|
|
7513
|
+
"K8s",
|
|
7514
|
+
"KMS",
|
|
7515
|
+
"KPI",
|
|
7516
|
+
"LAN",
|
|
7463
7517
|
"LHS",
|
|
7518
|
+
"LXC",
|
|
7519
|
+
"MFA",
|
|
7520
|
+
"ML",
|
|
7521
|
+
"MLOps",
|
|
7522
|
+
"MVC",
|
|
7523
|
+
"MVP",
|
|
7524
|
+
"NAS",
|
|
7525
|
+
"NAT",
|
|
7526
|
+
"NDA",
|
|
7527
|
+
"NFS",
|
|
7528
|
+
"NIST",
|
|
7529
|
+
"NLP",
|
|
7530
|
+
"NPS",
|
|
7531
|
+
"OCR",
|
|
7464
7532
|
"OEM",
|
|
7533
|
+
"OKR",
|
|
7534
|
+
"OLAP",
|
|
7535
|
+
"OLTP",
|
|
7536
|
+
"OOP",
|
|
7537
|
+
"ORM",
|
|
7538
|
+
"OS",
|
|
7539
|
+
"OTP",
|
|
7540
|
+
"P2P",
|
|
7541
|
+
"PDP",
|
|
7542
|
+
"PaaS",
|
|
7543
|
+
"PCI",
|
|
7544
|
+
"PKI",
|
|
7465
7545
|
"PP",
|
|
7546
|
+
"PWA",
|
|
7547
|
+
"PX",
|
|
7466
7548
|
"QA",
|
|
7549
|
+
"RAID",
|
|
7467
7550
|
"RAM",
|
|
7551
|
+
"RDS",
|
|
7552
|
+
"REST",
|
|
7468
7553
|
"RHS",
|
|
7469
7554
|
"RPC",
|
|
7555
|
+
"RPA",
|
|
7556
|
+
"RUM",
|
|
7470
7557
|
"RSS",
|
|
7558
|
+
"SAN",
|
|
7559
|
+
"SASE",
|
|
7560
|
+
"SDLC",
|
|
7561
|
+
"SDK",
|
|
7562
|
+
"SEO",
|
|
7563
|
+
"SFTP",
|
|
7564
|
+
"SIEM",
|
|
7471
7565
|
"SLA",
|
|
7566
|
+
"SMB",
|
|
7472
7567
|
"SMTP",
|
|
7568
|
+
"SOAP",
|
|
7569
|
+
"SOC",
|
|
7570
|
+
"SOA",
|
|
7571
|
+
"SPDY",
|
|
7572
|
+
"SPF",
|
|
7473
7573
|
"SQL",
|
|
7574
|
+
"SRV",
|
|
7575
|
+
"SRE",
|
|
7474
7576
|
"SSH",
|
|
7577
|
+
"SSDL",
|
|
7578
|
+
"SSO",
|
|
7475
7579
|
"SSL",
|
|
7476
|
-
"
|
|
7580
|
+
"SSR",
|
|
7581
|
+
"TDD",
|
|
7582
|
+
"TLD",
|
|
7477
7583
|
"TLS",
|
|
7584
|
+
"TLS1.3",
|
|
7585
|
+
"TOTP",
|
|
7478
7586
|
"TRPC",
|
|
7479
7587
|
"TTL",
|
|
7480
7588
|
"UDP",
|
|
7481
7589
|
"UI",
|
|
7482
7590
|
"UID",
|
|
7483
|
-
"UUID",
|
|
7484
7591
|
"URI",
|
|
7485
7592
|
"URL",
|
|
7486
7593
|
"UTF",
|
|
7594
|
+
"UUID",
|
|
7595
|
+
"UX",
|
|
7487
7596
|
"VM",
|
|
7597
|
+
"VLAN",
|
|
7598
|
+
"VPN",
|
|
7599
|
+
"VR",
|
|
7600
|
+
"WAF",
|
|
7601
|
+
"WAN",
|
|
7602
|
+
"WLAN",
|
|
7603
|
+
"WPA",
|
|
7604
|
+
"XACML",
|
|
7488
7605
|
"XML",
|
|
7606
|
+
"XSRF",
|
|
7489
7607
|
"XSS",
|
|
7490
|
-
"
|
|
7608
|
+
"XR",
|
|
7609
|
+
"YAML",
|
|
7610
|
+
"ZTA"
|
|
7491
7611
|
];
|
|
7492
7612
|
|
|
7493
7613
|
// ../string-format/src/upper-case-first.ts
|
|
7494
7614
|
init_esm_shims();
|
|
7495
|
-
|
|
7615
|
+
function upperCaseFirst(input) {
|
|
7496
7616
|
return input ? input.charAt(0).toUpperCase() + input.slice(1) : input;
|
|
7497
|
-
}
|
|
7617
|
+
}
|
|
7618
|
+
__name(upperCaseFirst, "upperCaseFirst");
|
|
7498
7619
|
|
|
7499
7620
|
// ../string-format/src/title-case.ts
|
|
7500
|
-
|
|
7621
|
+
function titleCase(input) {
|
|
7501
7622
|
if (!input) {
|
|
7502
|
-
return
|
|
7623
|
+
return input;
|
|
7503
7624
|
}
|
|
7504
|
-
return input.split(/(?=[A-Z])|[\s._-]/).map((s) => s.trim()).filter(Boolean).map((s) => ACRONYMS.
|
|
7505
|
-
}
|
|
7625
|
+
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(" ");
|
|
7626
|
+
}
|
|
7627
|
+
__name(titleCase, "titleCase");
|
|
7506
7628
|
|
|
7507
7629
|
// ../type-checks/src/is-string.ts
|
|
7508
7630
|
init_esm_shims();
|
|
@@ -7550,7 +7672,8 @@ var linux = /* @__PURE__ */ __name((orgId) => {
|
|
|
7550
7672
|
cache: joinPaths(process.env.XDG_CACHE_HOME || joinPaths(homedir, ".cache"), orgId),
|
|
7551
7673
|
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
7552
7674
|
log: joinPaths(process.env.XDG_STATE_HOME || joinPaths(homedir, ".local", "state"), orgId),
|
|
7553
|
-
|
|
7675
|
+
// https://devenv.sh/files-and-variables/#devenv_root
|
|
7676
|
+
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)
|
|
7554
7677
|
};
|
|
7555
7678
|
}, "linux");
|
|
7556
7679
|
function getEnvPaths(options = {}) {
|
|
@@ -7569,16 +7692,16 @@ function getEnvPaths(options = {}) {
|
|
|
7569
7692
|
} else {
|
|
7570
7693
|
result = linux(orgId);
|
|
7571
7694
|
}
|
|
7572
|
-
if (process.env.
|
|
7573
|
-
result.data = process.env.
|
|
7574
|
-
} else if (process.env.
|
|
7575
|
-
result.config = process.env.
|
|
7576
|
-
} else if (process.env.
|
|
7577
|
-
result.cache = process.env.
|
|
7578
|
-
} else if (process.env.
|
|
7579
|
-
result.log = process.env.
|
|
7580
|
-
} else if (process.env.
|
|
7581
|
-
result.temp = process.env.
|
|
7695
|
+
if (process.env.STORM_DATA_DIR) {
|
|
7696
|
+
result.data = process.env.STORM_DATA_DIR;
|
|
7697
|
+
} else if (process.env.STORM_CONFIG_DIR) {
|
|
7698
|
+
result.config = process.env.STORM_CONFIG_DIR;
|
|
7699
|
+
} else if (process.env.STORM_CACHE_DIR) {
|
|
7700
|
+
result.cache = process.env.STORM_CACHE_DIR;
|
|
7701
|
+
} else if (process.env.STORM_LOG_DIR) {
|
|
7702
|
+
result.log = process.env.STORM_LOG_DIR;
|
|
7703
|
+
} else if (process.env.STORM_TEMP_DIR) {
|
|
7704
|
+
result.temp = process.env.STORM_TEMP_DIR;
|
|
7582
7705
|
}
|
|
7583
7706
|
if (options.workspaceRoot) {
|
|
7584
7707
|
result.cache ??= joinPaths(options.workspaceRoot, "node_modules", ".cache", orgId);
|
|
@@ -10262,6 +10385,75 @@ var registerCustom = SuperJSON.registerCustom;
|
|
|
10262
10385
|
var registerSymbol = SuperJSON.registerSymbol;
|
|
10263
10386
|
var allowErrorProps = SuperJSON.allowErrorProps;
|
|
10264
10387
|
|
|
10388
|
+
// ../json/src/utils/parse.ts
|
|
10389
|
+
init_esm_shims();
|
|
10390
|
+
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*:/;
|
|
10391
|
+
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*:/;
|
|
10392
|
+
var JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(?:\.\d{1,17})?(?:E[+-]?\d+)?\s*$/i;
|
|
10393
|
+
function jsonParseTransform(key, value) {
|
|
10394
|
+
if (key === "__proto__" || key === "constructor" && value && typeof value === "object" && "prototype" in value) {
|
|
10395
|
+
console.warn(`Dropping "${key}" key to prevent prototype pollution.`);
|
|
10396
|
+
return;
|
|
10397
|
+
}
|
|
10398
|
+
return value;
|
|
10399
|
+
}
|
|
10400
|
+
__name(jsonParseTransform, "jsonParseTransform");
|
|
10401
|
+
function parse4(value, options = {}) {
|
|
10402
|
+
if (typeof value !== "string") {
|
|
10403
|
+
return value;
|
|
10404
|
+
}
|
|
10405
|
+
if (value[0] === '"' && value[value.length - 1] === '"' && !value.includes("\\")) {
|
|
10406
|
+
return value.slice(1, -1);
|
|
10407
|
+
}
|
|
10408
|
+
const _value = value.trim();
|
|
10409
|
+
if (_value.length <= 9) {
|
|
10410
|
+
switch (_value.toLowerCase()) {
|
|
10411
|
+
case "true": {
|
|
10412
|
+
return true;
|
|
10413
|
+
}
|
|
10414
|
+
case "false": {
|
|
10415
|
+
return false;
|
|
10416
|
+
}
|
|
10417
|
+
case "undefined": {
|
|
10418
|
+
return void 0;
|
|
10419
|
+
}
|
|
10420
|
+
case "null": {
|
|
10421
|
+
return null;
|
|
10422
|
+
}
|
|
10423
|
+
case "nan": {
|
|
10424
|
+
return Number.NaN;
|
|
10425
|
+
}
|
|
10426
|
+
case "infinity": {
|
|
10427
|
+
return Number.POSITIVE_INFINITY;
|
|
10428
|
+
}
|
|
10429
|
+
case "-infinity": {
|
|
10430
|
+
return Number.NEGATIVE_INFINITY;
|
|
10431
|
+
}
|
|
10432
|
+
}
|
|
10433
|
+
}
|
|
10434
|
+
if (!JsonSigRx.test(value)) {
|
|
10435
|
+
if (options.strict) {
|
|
10436
|
+
throw new Error("Invalid JSON");
|
|
10437
|
+
}
|
|
10438
|
+
return value;
|
|
10439
|
+
}
|
|
10440
|
+
try {
|
|
10441
|
+
if (suspectProtoRx.test(value) || suspectConstructorRx.test(value)) {
|
|
10442
|
+
if (options.strict) {
|
|
10443
|
+
throw new Error("Possible prototype pollution");
|
|
10444
|
+
}
|
|
10445
|
+
return JSON.parse(value, jsonParseTransform);
|
|
10446
|
+
}
|
|
10447
|
+
return JSON.parse(value);
|
|
10448
|
+
} catch (error) {
|
|
10449
|
+
if (options.strict) {
|
|
10450
|
+
throw error;
|
|
10451
|
+
}
|
|
10452
|
+
return value;
|
|
10453
|
+
}
|
|
10454
|
+
}
|
|
10455
|
+
__name(parse4, "parse");
|
|
10456
|
+
|
|
10265
10457
|
// ../json/src/utils/parse-error.ts
|
|
10266
10458
|
init_esm_shims();
|
|
10267
10459
|
|
|
@@ -10468,7 +10660,47 @@ var isNumber2 = /* @__PURE__ */ __name((value) => {
|
|
|
10468
10660
|
}
|
|
10469
10661
|
}, "isNumber");
|
|
10470
10662
|
|
|
10663
|
+
// ../type-checks/src/is-undefined.ts
|
|
10664
|
+
init_esm_shims();
|
|
10665
|
+
var isUndefined3 = /* @__PURE__ */ __name((value) => {
|
|
10666
|
+
return value === void 0;
|
|
10667
|
+
}, "isUndefined");
|
|
10668
|
+
|
|
10471
10669
|
// ../json/src/utils/stringify.ts
|
|
10670
|
+
var invalidKeyChars = [
|
|
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
|
+
"]",
|
|
10699
|
+
"(",
|
|
10700
|
+
")",
|
|
10701
|
+
"<",
|
|
10702
|
+
">"
|
|
10703
|
+
];
|
|
10472
10704
|
var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
10473
10705
|
const space = isNumber2(spacing) ? " ".repeat(spacing) : spacing;
|
|
10474
10706
|
switch (value) {
|
|
@@ -10476,7 +10708,7 @@ var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
|
10476
10708
|
return "null";
|
|
10477
10709
|
}
|
|
10478
10710
|
case void 0: {
|
|
10479
|
-
return "undefined";
|
|
10711
|
+
return '"undefined"';
|
|
10480
10712
|
}
|
|
10481
10713
|
case true: {
|
|
10482
10714
|
return "true";
|
|
@@ -10484,6 +10716,12 @@ var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
|
10484
10716
|
case false: {
|
|
10485
10717
|
return "false";
|
|
10486
10718
|
}
|
|
10719
|
+
case Number.POSITIVE_INFINITY: {
|
|
10720
|
+
return "infinity";
|
|
10721
|
+
}
|
|
10722
|
+
case Number.NEGATIVE_INFINITY: {
|
|
10723
|
+
return "-infinity";
|
|
10724
|
+
}
|
|
10487
10725
|
}
|
|
10488
10726
|
if (Array.isArray(value)) {
|
|
10489
10727
|
return `[${space}${value.map((v) => stringify2(v, space)).join(`,${space}`)}${space}]`;
|
|
@@ -10499,8 +10737,8 @@ var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
|
10499
10737
|
return JSON.stringify(value);
|
|
10500
10738
|
}
|
|
10501
10739
|
case "object": {
|
|
10502
|
-
const keys = Object.keys(value);
|
|
10503
|
-
return `{${space}${keys.map((
|
|
10740
|
+
const keys = Object.keys(value).filter((key) => !isUndefined3(value[key]));
|
|
10741
|
+
return `{${space}${keys.map((key) => `${invalidKeyChars.some((invalidKeyChar) => key.includes(invalidKeyChar)) ? `"${key}"` : key}: ${space}${stringify2(value[key], space)}`).join(`,${space}`)}${space}}`;
|
|
10504
10742
|
}
|
|
10505
10743
|
default:
|
|
10506
10744
|
return "null";
|
|
@@ -10527,8 +10765,6 @@ var StormJSON = class _StormJSON extends SuperJSON {
|
|
|
10527
10765
|
}
|
|
10528
10766
|
/**
|
|
10529
10767
|
* Serialize the given value with superjson
|
|
10530
|
-
*
|
|
10531
|
-
*
|
|
10532
10768
|
*/
|
|
10533
10769
|
static serialize(object) {
|
|
10534
10770
|
return _StormJSON.instance.serialize(object);
|
|
@@ -10540,32 +10776,23 @@ var StormJSON = class _StormJSON extends SuperJSON {
|
|
|
10540
10776
|
* @returns The parsed data
|
|
10541
10777
|
*/
|
|
10542
10778
|
static parse(value) {
|
|
10543
|
-
return
|
|
10779
|
+
return parse4(value);
|
|
10544
10780
|
}
|
|
10545
10781
|
/**
|
|
10546
10782
|
* Serializes the given data to a JSON string.
|
|
10547
10783
|
* By default the JSON string is formatted with a 2 space indentation to be easy readable.
|
|
10548
10784
|
*
|
|
10549
10785
|
* @param value - Object which should be serialized to JSON
|
|
10550
|
-
* @param
|
|
10786
|
+
* @param _options - JSON serialize options
|
|
10551
10787
|
* @returns the formatted JSON representation of the object
|
|
10552
10788
|
*/
|
|
10553
|
-
static stringify(value,
|
|
10789
|
+
static stringify(value, _options) {
|
|
10554
10790
|
const customTransformer = _StormJSON.instance.customTransformerRegistry.findApplicable(value);
|
|
10555
10791
|
let result = value;
|
|
10556
|
-
if (customTransformer) {
|
|
10792
|
+
if (customTransformer && customTransformer.isApplicable(value)) {
|
|
10557
10793
|
result = customTransformer.serialize(result);
|
|
10558
10794
|
}
|
|
10559
|
-
return stringify2(result
|
|
10560
|
-
}
|
|
10561
|
-
/**
|
|
10562
|
-
* Stringify the given value with superjson
|
|
10563
|
-
*
|
|
10564
|
-
* @param obj - The object to stringify
|
|
10565
|
-
* @returns The stringified object
|
|
10566
|
-
*/
|
|
10567
|
-
static stringifyBase(obj) {
|
|
10568
|
-
return _StormJSON.instance.stringify(obj);
|
|
10795
|
+
return stringify2(result);
|
|
10569
10796
|
}
|
|
10570
10797
|
/**
|
|
10571
10798
|
* Parses the given JSON string and returns the object the JSON content represents.
|
|
@@ -10635,13 +10862,13 @@ StormJSON.instance.registerCustom({
|
|
|
10635
10862
|
|
|
10636
10863
|
// ../fs/src/write-file.ts
|
|
10637
10864
|
import { writeFile as writeFileFs } from "node:fs/promises";
|
|
10638
|
-
var writeFile = /* @__PURE__ */ __name(async (filePath, content, options) => {
|
|
10865
|
+
var writeFile = /* @__PURE__ */ __name(async (filePath, content = "", options = {}) => {
|
|
10639
10866
|
if (!filePath) {
|
|
10640
10867
|
throw new Error("No file path provided to read data");
|
|
10641
10868
|
}
|
|
10642
10869
|
const directory = findFilePath(correctPath(filePath));
|
|
10643
10870
|
if (!existsSync(directory)) {
|
|
10644
|
-
if (options
|
|
10871
|
+
if (options.createDirectory !== false) {
|
|
10645
10872
|
await createDirectory(directory);
|
|
10646
10873
|
} else {
|
|
10647
10874
|
throw new Error(`Directory ${directory} does not exist`);
|