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