@stryke/prisma-trpc-generator 0.12.5 → 0.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generator.cjs +1014 -939
- package/dist/generator.js +954 -879
- package/dist/index.cjs +1014 -939
- package/dist/index.js +954 -879
- package/package.json +5 -3
package/dist/generator.cjs
CHANGED
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
mod
|
|
31
31
|
));
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.
|
|
33
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.11_@types+node@24.3.1__@swc+core@1.11.9_@swc+h_17364597a1dec0b05da9bec8ee73fa43/node_modules/tsup/assets/cjs_shims.js
|
|
34
34
|
var init_cjs_shims = __esm({
|
|
35
|
-
"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.
|
|
35
|
+
"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.11_@types+node@24.3.1__@swc+core@1.11.9_@swc+h_17364597a1dec0b05da9bec8ee73fa43/node_modules/tsup/assets/cjs_shims.js"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -676,169 +676,9 @@ init_cjs_shims();
|
|
|
676
676
|
|
|
677
677
|
// src/prisma-generator.ts
|
|
678
678
|
init_cjs_shims();
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
// ../path/src/exists.ts
|
|
684
|
-
init_cjs_shims();
|
|
685
|
-
var import_node_fs = require("node:fs");
|
|
686
|
-
var import_promises = require("node:fs/promises");
|
|
687
|
-
var existsSync = /* @__PURE__ */ __name((filePath) => {
|
|
688
|
-
return (0, import_node_fs.existsSync)(filePath);
|
|
689
|
-
}, "existsSync");
|
|
690
|
-
var exists = /* @__PURE__ */ __name(async (filePath) => {
|
|
691
|
-
return (0, import_promises.access)(filePath, import_promises.constants.F_OK).then(() => true).catch(() => false);
|
|
692
|
-
}, "exists");
|
|
693
|
-
|
|
694
|
-
// ../fs/src/helpers.ts
|
|
695
|
-
var import_promises2 = require("node:fs/promises");
|
|
696
|
-
async function createDirectory(path6) {
|
|
697
|
-
if (await exists(path6)) {
|
|
698
|
-
return;
|
|
699
|
-
}
|
|
700
|
-
return (0, import_promises2.mkdir)(path6, {
|
|
701
|
-
recursive: true
|
|
702
|
-
});
|
|
703
|
-
}
|
|
704
|
-
__name(createDirectory, "createDirectory");
|
|
705
|
-
async function removeDirectory(path6) {
|
|
706
|
-
if (!existsSync(path6)) {
|
|
707
|
-
return;
|
|
708
|
-
}
|
|
709
|
-
return (0, import_promises2.rm)(path6, {
|
|
710
|
-
recursive: true
|
|
711
|
-
});
|
|
712
|
-
}
|
|
713
|
-
__name(removeDirectory, "removeDirectory");
|
|
714
|
-
|
|
715
|
-
// ../path/src/join-paths.ts
|
|
716
|
-
init_cjs_shims();
|
|
717
|
-
var _DRIVE_LETTER_START_RE = /^[A-Z]:\//i;
|
|
718
|
-
function normalizeWindowsPath(input = "") {
|
|
719
|
-
if (!input) {
|
|
720
|
-
return input;
|
|
721
|
-
}
|
|
722
|
-
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
723
|
-
}
|
|
724
|
-
__name(normalizeWindowsPath, "normalizeWindowsPath");
|
|
725
|
-
var _UNC_REGEX = /^[/\\]{2}/;
|
|
726
|
-
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i;
|
|
727
|
-
var _DRIVE_LETTER_RE = /^[A-Z]:$/i;
|
|
728
|
-
var isAbsolute = /* @__PURE__ */ __name(function(p) {
|
|
729
|
-
return _IS_ABSOLUTE_RE.test(p);
|
|
730
|
-
}, "isAbsolute");
|
|
731
|
-
var correctPaths = /* @__PURE__ */ __name(function(path6) {
|
|
732
|
-
if (!path6 || path6.length === 0) {
|
|
733
|
-
return ".";
|
|
734
|
-
}
|
|
735
|
-
path6 = normalizeWindowsPath(path6);
|
|
736
|
-
const isUNCPath = path6.match(_UNC_REGEX);
|
|
737
|
-
const isPathAbsolute = isAbsolute(path6);
|
|
738
|
-
const trailingSeparator = path6[path6.length - 1] === "/";
|
|
739
|
-
path6 = normalizeString(path6, !isPathAbsolute);
|
|
740
|
-
if (path6.length === 0) {
|
|
741
|
-
if (isPathAbsolute) {
|
|
742
|
-
return "/";
|
|
743
|
-
}
|
|
744
|
-
return trailingSeparator ? "./" : ".";
|
|
745
|
-
}
|
|
746
|
-
if (trailingSeparator) {
|
|
747
|
-
path6 += "/";
|
|
748
|
-
}
|
|
749
|
-
if (_DRIVE_LETTER_RE.test(path6)) {
|
|
750
|
-
path6 += "/";
|
|
751
|
-
}
|
|
752
|
-
if (isUNCPath) {
|
|
753
|
-
if (!isPathAbsolute) {
|
|
754
|
-
return `//./${path6}`;
|
|
755
|
-
}
|
|
756
|
-
return `//${path6}`;
|
|
757
|
-
}
|
|
758
|
-
return isPathAbsolute && !isAbsolute(path6) ? `/${path6}` : path6;
|
|
759
|
-
}, "correctPaths");
|
|
760
|
-
var joinPaths = /* @__PURE__ */ __name(function(...segments) {
|
|
761
|
-
let path6 = "";
|
|
762
|
-
for (const seg of segments) {
|
|
763
|
-
if (!seg) {
|
|
764
|
-
continue;
|
|
765
|
-
}
|
|
766
|
-
if (path6.length > 0) {
|
|
767
|
-
const pathTrailing = path6[path6.length - 1] === "/";
|
|
768
|
-
const segLeading = seg[0] === "/";
|
|
769
|
-
const both = pathTrailing && segLeading;
|
|
770
|
-
if (both) {
|
|
771
|
-
path6 += seg.slice(1);
|
|
772
|
-
} else {
|
|
773
|
-
path6 += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
774
|
-
}
|
|
775
|
-
} else {
|
|
776
|
-
path6 += seg;
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
return correctPaths(path6);
|
|
780
|
-
}, "joinPaths");
|
|
781
|
-
function normalizeString(path6, allowAboveRoot) {
|
|
782
|
-
let res = "";
|
|
783
|
-
let lastSegmentLength = 0;
|
|
784
|
-
let lastSlash = -1;
|
|
785
|
-
let dots = 0;
|
|
786
|
-
let char = null;
|
|
787
|
-
for (let index = 0; index <= path6.length; ++index) {
|
|
788
|
-
if (index < path6.length) {
|
|
789
|
-
char = path6[index];
|
|
790
|
-
} else if (char === "/") {
|
|
791
|
-
break;
|
|
792
|
-
} else {
|
|
793
|
-
char = "/";
|
|
794
|
-
}
|
|
795
|
-
if (char === "/") {
|
|
796
|
-
if (lastSlash === index - 1 || dots === 1) {
|
|
797
|
-
} else if (dots === 2) {
|
|
798
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
799
|
-
if (res.length > 2) {
|
|
800
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
801
|
-
if (lastSlashIndex === -1) {
|
|
802
|
-
res = "";
|
|
803
|
-
lastSegmentLength = 0;
|
|
804
|
-
} else {
|
|
805
|
-
res = res.slice(0, lastSlashIndex);
|
|
806
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
807
|
-
}
|
|
808
|
-
lastSlash = index;
|
|
809
|
-
dots = 0;
|
|
810
|
-
continue;
|
|
811
|
-
} else if (res.length > 0) {
|
|
812
|
-
res = "";
|
|
813
|
-
lastSegmentLength = 0;
|
|
814
|
-
lastSlash = index;
|
|
815
|
-
dots = 0;
|
|
816
|
-
continue;
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
if (allowAboveRoot) {
|
|
820
|
-
res += res.length > 0 ? "/.." : "..";
|
|
821
|
-
lastSegmentLength = 2;
|
|
822
|
-
}
|
|
823
|
-
} else {
|
|
824
|
-
if (res.length > 0) {
|
|
825
|
-
res += `/${path6.slice(lastSlash + 1, index)}`;
|
|
826
|
-
} else {
|
|
827
|
-
res = path6.slice(lastSlash + 1, index);
|
|
828
|
-
}
|
|
829
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
830
|
-
}
|
|
831
|
-
lastSlash = index;
|
|
832
|
-
dots = 0;
|
|
833
|
-
} else if (char === "." && dots !== -1) {
|
|
834
|
-
++dots;
|
|
835
|
-
} else {
|
|
836
|
-
dots = -1;
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
return res;
|
|
840
|
-
}
|
|
841
|
-
__name(normalizeString, "normalizeString");
|
|
679
|
+
var import_exists = require("@stryke/fs/exists");
|
|
680
|
+
var import_helpers2 = require("@stryke/fs/helpers");
|
|
681
|
+
var import_join_paths4 = require("@stryke/path/join-paths");
|
|
842
682
|
|
|
843
683
|
// ../string-format/src/lower-case-first.ts
|
|
844
684
|
init_cjs_shims();
|
|
@@ -848,13 +688,13 @@ function lowerCaseFirst(input) {
|
|
|
848
688
|
__name(lowerCaseFirst, "lowerCaseFirst");
|
|
849
689
|
|
|
850
690
|
// src/prisma-generator.ts
|
|
851
|
-
var
|
|
691
|
+
var import_node_path5 = __toESM(require("node:path"), 1);
|
|
852
692
|
var import_pluralize = __toESM(require_pluralize(), 1);
|
|
853
693
|
|
|
854
694
|
// src/config.ts
|
|
855
695
|
init_cjs_shims();
|
|
856
696
|
var import_zod = require("zod");
|
|
857
|
-
var ModelAction = /* @__PURE__ */ function(ModelAction2) {
|
|
697
|
+
var ModelAction = /* @__PURE__ */ (function(ModelAction2) {
|
|
858
698
|
ModelAction2["findUnique"] = "findUnique";
|
|
859
699
|
ModelAction2["findUniqueOrThrow"] = "findUniqueOrThrow";
|
|
860
700
|
ModelAction2["findFirst"] = "findFirst";
|
|
@@ -875,7 +715,7 @@ var ModelAction = /* @__PURE__ */ function(ModelAction2) {
|
|
|
875
715
|
ModelAction2["findRaw"] = "findRaw";
|
|
876
716
|
ModelAction2["aggregateRaw"] = "aggregateRaw";
|
|
877
717
|
return ModelAction2;
|
|
878
|
-
}({});
|
|
718
|
+
})({});
|
|
879
719
|
var modelActionEnum = import_zod.z.nativeEnum(ModelAction);
|
|
880
720
|
var configBoolean = import_zod.z.string().trim().transform((value) => !value || value.toLowerCase() === "false" || value.toLowerCase() === "n" || value.toLowerCase() === "no" || value === "0" ? false : value.toLowerCase() === "true" || value.toLowerCase() === "y" || value.toLowerCase() === "yes" || value === "1" ? true : value);
|
|
881
721
|
var configSchema = import_zod.z.object({
|
|
@@ -904,468 +744,8 @@ var configSchema = import_zod.z.object({
|
|
|
904
744
|
|
|
905
745
|
// src/helpers.ts
|
|
906
746
|
init_cjs_shims();
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
init_cjs_shims();
|
|
910
|
-
|
|
911
|
-
// ../types/src/base.ts
|
|
912
|
-
init_cjs_shims();
|
|
913
|
-
var EMPTY_STRING = "";
|
|
914
|
-
var $NestedValue = Symbol("NestedValue");
|
|
915
|
-
|
|
916
|
-
// ../path/src/file-path-fns.ts
|
|
917
|
-
var import_node_path2 = require("node:path");
|
|
918
|
-
|
|
919
|
-
// ../path/src/correct-path.ts
|
|
920
|
-
init_cjs_shims();
|
|
921
|
-
|
|
922
|
-
// ../path/src/is-file.ts
|
|
923
|
-
init_cjs_shims();
|
|
924
|
-
var import_node_fs2 = require("node:fs");
|
|
925
|
-
|
|
926
|
-
// ../path/src/regex.ts
|
|
927
|
-
init_cjs_shims();
|
|
928
|
-
var DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
|
|
929
|
-
var DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
|
|
930
|
-
var UNC_REGEX = /^[/\\]{2}/;
|
|
931
|
-
var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
|
|
932
|
-
|
|
933
|
-
// ../path/src/slash.ts
|
|
934
|
-
init_cjs_shims();
|
|
935
|
-
function slash(path6) {
|
|
936
|
-
if (path6.startsWith("\\\\?\\")) {
|
|
937
|
-
return path6;
|
|
938
|
-
}
|
|
939
|
-
return path6.replace(/\\/g, "/");
|
|
940
|
-
}
|
|
941
|
-
__name(slash, "slash");
|
|
942
|
-
|
|
943
|
-
// ../path/src/is-file.ts
|
|
944
|
-
function isFile(path6, additionalPath) {
|
|
945
|
-
return Boolean((0, import_node_fs2.statSync)(additionalPath ? joinPaths(additionalPath, path6) : path6, {
|
|
946
|
-
throwIfNoEntry: false
|
|
947
|
-
})?.isFile());
|
|
948
|
-
}
|
|
949
|
-
__name(isFile, "isFile");
|
|
950
|
-
function isDirectory(path6, additionalPath) {
|
|
951
|
-
return Boolean((0, import_node_fs2.statSync)(additionalPath ? joinPaths(additionalPath, path6) : path6, {
|
|
952
|
-
throwIfNoEntry: false
|
|
953
|
-
})?.isDirectory());
|
|
954
|
-
}
|
|
955
|
-
__name(isDirectory, "isDirectory");
|
|
956
|
-
function isAbsolutePath(path6) {
|
|
957
|
-
return ABSOLUTE_PATH_REGEX.test(slash(path6));
|
|
958
|
-
}
|
|
959
|
-
__name(isAbsolutePath, "isAbsolutePath");
|
|
960
|
-
|
|
961
|
-
// ../path/src/correct-path.ts
|
|
962
|
-
function normalizeWindowsPath2(input = "") {
|
|
963
|
-
if (!input) {
|
|
964
|
-
return input;
|
|
965
|
-
}
|
|
966
|
-
return slash(input).replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
|
|
967
|
-
}
|
|
968
|
-
__name(normalizeWindowsPath2, "normalizeWindowsPath");
|
|
969
|
-
function correctPath(path6) {
|
|
970
|
-
if (!path6 || path6.length === 0) {
|
|
971
|
-
return ".";
|
|
972
|
-
}
|
|
973
|
-
path6 = normalizeWindowsPath2(path6);
|
|
974
|
-
const isUNCPath = path6.match(UNC_REGEX);
|
|
975
|
-
const isPathAbsolute = isAbsolutePath(path6);
|
|
976
|
-
const trailingSeparator = path6.endsWith("/");
|
|
977
|
-
path6 = normalizeString2(path6, !isPathAbsolute);
|
|
978
|
-
if (path6.length === 0) {
|
|
979
|
-
if (isPathAbsolute) {
|
|
980
|
-
return "/";
|
|
981
|
-
}
|
|
982
|
-
return trailingSeparator ? "./" : ".";
|
|
983
|
-
}
|
|
984
|
-
if (trailingSeparator) {
|
|
985
|
-
path6 += "/";
|
|
986
|
-
}
|
|
987
|
-
if (DRIVE_LETTER_REGEX.test(path6)) {
|
|
988
|
-
path6 += "/";
|
|
989
|
-
}
|
|
990
|
-
if (isUNCPath) {
|
|
991
|
-
if (!isPathAbsolute) {
|
|
992
|
-
return `//./${path6}`;
|
|
993
|
-
}
|
|
994
|
-
return `//${path6}`;
|
|
995
|
-
}
|
|
996
|
-
return !path6.startsWith("/") && isPathAbsolute && !DRIVE_LETTER_REGEX.test(path6) ? `/${path6}` : path6;
|
|
997
|
-
}
|
|
998
|
-
__name(correctPath, "correctPath");
|
|
999
|
-
function normalizeString2(path6, allowAboveRoot) {
|
|
1000
|
-
let res = "";
|
|
1001
|
-
let lastSegmentLength = 0;
|
|
1002
|
-
let lastSlash = -1;
|
|
1003
|
-
let dots = 0;
|
|
1004
|
-
let char = null;
|
|
1005
|
-
for (let index = 0; index <= path6.length; ++index) {
|
|
1006
|
-
if (index < path6.length) {
|
|
1007
|
-
char = path6[index];
|
|
1008
|
-
} else if (char === "/") {
|
|
1009
|
-
break;
|
|
1010
|
-
} else {
|
|
1011
|
-
char = "/";
|
|
1012
|
-
}
|
|
1013
|
-
if (char === "/") {
|
|
1014
|
-
if (lastSlash === index - 1 || dots === 1) {
|
|
1015
|
-
} else if (dots === 2) {
|
|
1016
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
1017
|
-
if (res.length > 2) {
|
|
1018
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
1019
|
-
if (lastSlashIndex === -1) {
|
|
1020
|
-
res = "";
|
|
1021
|
-
lastSegmentLength = 0;
|
|
1022
|
-
} else {
|
|
1023
|
-
res = res.slice(0, lastSlashIndex);
|
|
1024
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
1025
|
-
}
|
|
1026
|
-
lastSlash = index;
|
|
1027
|
-
dots = 0;
|
|
1028
|
-
continue;
|
|
1029
|
-
} else if (res.length > 0) {
|
|
1030
|
-
res = "";
|
|
1031
|
-
lastSegmentLength = 0;
|
|
1032
|
-
lastSlash = index;
|
|
1033
|
-
dots = 0;
|
|
1034
|
-
continue;
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
if (allowAboveRoot) {
|
|
1038
|
-
res += res.length > 0 ? "/.." : "..";
|
|
1039
|
-
lastSegmentLength = 2;
|
|
1040
|
-
}
|
|
1041
|
-
} else {
|
|
1042
|
-
if (res.length > 0) {
|
|
1043
|
-
res += `/${path6.slice(lastSlash + 1, index)}`;
|
|
1044
|
-
} else {
|
|
1045
|
-
res = path6.slice(lastSlash + 1, index);
|
|
1046
|
-
}
|
|
1047
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
1048
|
-
}
|
|
1049
|
-
lastSlash = index;
|
|
1050
|
-
dots = 0;
|
|
1051
|
-
} else if (char === "." && dots !== -1) {
|
|
1052
|
-
++dots;
|
|
1053
|
-
} else {
|
|
1054
|
-
dots = -1;
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
return res;
|
|
1058
|
-
}
|
|
1059
|
-
__name(normalizeString2, "normalizeString");
|
|
1060
|
-
|
|
1061
|
-
// ../path/src/get-workspace-root.ts
|
|
1062
|
-
init_cjs_shims();
|
|
1063
|
-
|
|
1064
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.180.2/node_modules/@storm-software/config-tools/dist/index.js
|
|
1065
|
-
init_cjs_shims();
|
|
1066
|
-
|
|
1067
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.180.2/node_modules/@storm-software/config-tools/dist/chunk-SZXSPLS6.js
|
|
1068
|
-
init_cjs_shims();
|
|
1069
|
-
|
|
1070
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.180.2/node_modules/@storm-software/config-tools/dist/chunk-6JBGUE4A.js
|
|
1071
|
-
init_cjs_shims();
|
|
1072
|
-
var import_node_fs3 = require("node:fs");
|
|
1073
|
-
var import_node_path = require("node:path");
|
|
1074
|
-
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
1075
|
-
var depth = 0;
|
|
1076
|
-
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
1077
|
-
const _startPath = startPath ?? process.cwd();
|
|
1078
|
-
if (endDirectoryNames.some((endDirName) => (0, import_node_fs3.existsSync)((0, import_node_path.join)(_startPath, endDirName)))) {
|
|
1079
|
-
return _startPath;
|
|
1080
|
-
}
|
|
1081
|
-
if (endFileNames.some((endFileName) => (0, import_node_fs3.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
|
|
1082
|
-
return _startPath;
|
|
1083
|
-
}
|
|
1084
|
-
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
1085
|
-
const parent = (0, import_node_path.join)(_startPath, "..");
|
|
1086
|
-
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
1087
|
-
}
|
|
1088
|
-
return void 0;
|
|
1089
|
-
}
|
|
1090
|
-
__name(findFolderUp, "findFolderUp");
|
|
1091
|
-
|
|
1092
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.180.2/node_modules/@storm-software/config-tools/dist/chunk-7IMLZPZF.js
|
|
1093
|
-
init_cjs_shims();
|
|
1094
|
-
var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
|
|
1095
|
-
function normalizeWindowsPath3(input = "") {
|
|
1096
|
-
if (!input) {
|
|
1097
|
-
return input;
|
|
1098
|
-
}
|
|
1099
|
-
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE2, (r) => r.toUpperCase());
|
|
1100
|
-
}
|
|
1101
|
-
__name(normalizeWindowsPath3, "normalizeWindowsPath");
|
|
1102
|
-
var _UNC_REGEX2 = /^[/\\]{2}/;
|
|
1103
|
-
var _IS_ABSOLUTE_RE2 = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
1104
|
-
var _DRIVE_LETTER_RE2 = /^[A-Za-z]:$/;
|
|
1105
|
-
var correctPaths2 = /* @__PURE__ */ __name(function(path6) {
|
|
1106
|
-
if (!path6 || path6.length === 0) {
|
|
1107
|
-
return ".";
|
|
1108
|
-
}
|
|
1109
|
-
path6 = normalizeWindowsPath3(path6);
|
|
1110
|
-
const isUNCPath = path6.match(_UNC_REGEX2);
|
|
1111
|
-
const isPathAbsolute = isAbsolute2(path6);
|
|
1112
|
-
const trailingSeparator = path6[path6.length - 1] === "/";
|
|
1113
|
-
path6 = normalizeString3(path6, !isPathAbsolute);
|
|
1114
|
-
if (path6.length === 0) {
|
|
1115
|
-
if (isPathAbsolute) {
|
|
1116
|
-
return "/";
|
|
1117
|
-
}
|
|
1118
|
-
return trailingSeparator ? "./" : ".";
|
|
1119
|
-
}
|
|
1120
|
-
if (trailingSeparator) {
|
|
1121
|
-
path6 += "/";
|
|
1122
|
-
}
|
|
1123
|
-
if (_DRIVE_LETTER_RE2.test(path6)) {
|
|
1124
|
-
path6 += "/";
|
|
1125
|
-
}
|
|
1126
|
-
if (isUNCPath) {
|
|
1127
|
-
if (!isPathAbsolute) {
|
|
1128
|
-
return `//./${path6}`;
|
|
1129
|
-
}
|
|
1130
|
-
return `//${path6}`;
|
|
1131
|
-
}
|
|
1132
|
-
return isPathAbsolute && !isAbsolute2(path6) ? `/${path6}` : path6;
|
|
1133
|
-
}, "correctPaths");
|
|
1134
|
-
function normalizeString3(path6, allowAboveRoot) {
|
|
1135
|
-
let res = "";
|
|
1136
|
-
let lastSegmentLength = 0;
|
|
1137
|
-
let lastSlash = -1;
|
|
1138
|
-
let dots = 0;
|
|
1139
|
-
let char = null;
|
|
1140
|
-
for (let index = 0; index <= path6.length; ++index) {
|
|
1141
|
-
if (index < path6.length) {
|
|
1142
|
-
char = path6[index];
|
|
1143
|
-
} else if (char === "/") {
|
|
1144
|
-
break;
|
|
1145
|
-
} else {
|
|
1146
|
-
char = "/";
|
|
1147
|
-
}
|
|
1148
|
-
if (char === "/") {
|
|
1149
|
-
if (lastSlash === index - 1 || dots === 1) {
|
|
1150
|
-
} else if (dots === 2) {
|
|
1151
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
1152
|
-
if (res.length > 2) {
|
|
1153
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
1154
|
-
if (lastSlashIndex === -1) {
|
|
1155
|
-
res = "";
|
|
1156
|
-
lastSegmentLength = 0;
|
|
1157
|
-
} else {
|
|
1158
|
-
res = res.slice(0, lastSlashIndex);
|
|
1159
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
1160
|
-
}
|
|
1161
|
-
lastSlash = index;
|
|
1162
|
-
dots = 0;
|
|
1163
|
-
continue;
|
|
1164
|
-
} else if (res.length > 0) {
|
|
1165
|
-
res = "";
|
|
1166
|
-
lastSegmentLength = 0;
|
|
1167
|
-
lastSlash = index;
|
|
1168
|
-
dots = 0;
|
|
1169
|
-
continue;
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
if (allowAboveRoot) {
|
|
1173
|
-
res += res.length > 0 ? "/.." : "..";
|
|
1174
|
-
lastSegmentLength = 2;
|
|
1175
|
-
}
|
|
1176
|
-
} else {
|
|
1177
|
-
if (res.length > 0) {
|
|
1178
|
-
res += `/${path6.slice(lastSlash + 1, index)}`;
|
|
1179
|
-
} else {
|
|
1180
|
-
res = path6.slice(lastSlash + 1, index);
|
|
1181
|
-
}
|
|
1182
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
1183
|
-
}
|
|
1184
|
-
lastSlash = index;
|
|
1185
|
-
dots = 0;
|
|
1186
|
-
} else if (char === "." && dots !== -1) {
|
|
1187
|
-
++dots;
|
|
1188
|
-
} else {
|
|
1189
|
-
dots = -1;
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
return res;
|
|
1193
|
-
}
|
|
1194
|
-
__name(normalizeString3, "normalizeString");
|
|
1195
|
-
var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
|
|
1196
|
-
return _IS_ABSOLUTE_RE2.test(p);
|
|
1197
|
-
}, "isAbsolute");
|
|
1198
|
-
|
|
1199
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.180.2/node_modules/@storm-software/config-tools/dist/chunk-SZXSPLS6.js
|
|
1200
|
-
var rootFiles = [
|
|
1201
|
-
"storm-workspace.json",
|
|
1202
|
-
"storm-workspace.yaml",
|
|
1203
|
-
"storm-workspace.yml",
|
|
1204
|
-
"storm-workspace.js",
|
|
1205
|
-
"storm-workspace.ts",
|
|
1206
|
-
".storm-workspace.json",
|
|
1207
|
-
".storm-workspace.yaml",
|
|
1208
|
-
".storm-workspace.yml",
|
|
1209
|
-
".storm-workspace.js",
|
|
1210
|
-
".storm-workspace.ts",
|
|
1211
|
-
"lerna.json",
|
|
1212
|
-
"nx.json",
|
|
1213
|
-
"turbo.json",
|
|
1214
|
-
"npm-workspace.json",
|
|
1215
|
-
"yarn-workspace.json",
|
|
1216
|
-
"pnpm-workspace.json",
|
|
1217
|
-
"npm-workspace.yaml",
|
|
1218
|
-
"yarn-workspace.yaml",
|
|
1219
|
-
"pnpm-workspace.yaml",
|
|
1220
|
-
"npm-workspace.yml",
|
|
1221
|
-
"yarn-workspace.yml",
|
|
1222
|
-
"pnpm-workspace.yml",
|
|
1223
|
-
"npm-lock.json",
|
|
1224
|
-
"yarn-lock.json",
|
|
1225
|
-
"pnpm-lock.json",
|
|
1226
|
-
"npm-lock.yaml",
|
|
1227
|
-
"yarn-lock.yaml",
|
|
1228
|
-
"pnpm-lock.yaml",
|
|
1229
|
-
"npm-lock.yml",
|
|
1230
|
-
"yarn-lock.yml",
|
|
1231
|
-
"pnpm-lock.yml",
|
|
1232
|
-
"bun.lockb"
|
|
1233
|
-
];
|
|
1234
|
-
var rootDirectories = [
|
|
1235
|
-
".storm-workspace",
|
|
1236
|
-
".nx",
|
|
1237
|
-
".github",
|
|
1238
|
-
".vscode",
|
|
1239
|
-
".verdaccio"
|
|
1240
|
-
];
|
|
1241
|
-
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
1242
|
-
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
1243
|
-
return correctPaths2(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
|
|
1244
|
-
}
|
|
1245
|
-
return correctPaths2(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
1246
|
-
}
|
|
1247
|
-
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
1248
|
-
|
|
1249
|
-
// ../path/src/get-parent-path.ts
|
|
1250
|
-
init_cjs_shims();
|
|
1251
|
-
var resolveParentPath = /* @__PURE__ */ __name((path6, count = 1) => {
|
|
1252
|
-
let parentPath = path6.replaceAll(/\/+$/g, "");
|
|
1253
|
-
for (let i = 0; i < count; i++) {
|
|
1254
|
-
parentPath = joinPaths(parentPath, "..");
|
|
1255
|
-
}
|
|
1256
|
-
return parentPath;
|
|
1257
|
-
}, "resolveParentPath");
|
|
1258
|
-
var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
|
|
1259
|
-
const ignoreCase = options?.ignoreCase ?? true;
|
|
1260
|
-
const skipCwd = options?.skipCwd ?? false;
|
|
1261
|
-
const targetType = options?.targetType ?? "both";
|
|
1262
|
-
let dir = cwd;
|
|
1263
|
-
if (skipCwd) {
|
|
1264
|
-
dir = resolveParentPath(cwd);
|
|
1265
|
-
}
|
|
1266
|
-
let names = Array.isArray(name) ? name : [
|
|
1267
|
-
name
|
|
1268
|
-
];
|
|
1269
|
-
if (ignoreCase) {
|
|
1270
|
-
names = names.map((name2) => name2.toLowerCase());
|
|
1271
|
-
}
|
|
1272
|
-
while (true) {
|
|
1273
|
-
const target = names.find((name2) => isFile(joinPaths(dir, name2)) && (targetType === "file" || targetType === "both") || isDirectory(joinPaths(dir, name2)) && (targetType === "directory" || targetType === "both"));
|
|
1274
|
-
if (target) {
|
|
1275
|
-
return joinPaths(dir, target);
|
|
1276
|
-
}
|
|
1277
|
-
const parentDir = resolveParentPath(dir);
|
|
1278
|
-
if (parentDir === dir) {
|
|
1279
|
-
return void 0;
|
|
1280
|
-
}
|
|
1281
|
-
dir = parentDir;
|
|
1282
|
-
}
|
|
1283
|
-
}, "getParentPath");
|
|
1284
|
-
|
|
1285
|
-
// ../path/src/is-root-dir.ts
|
|
1286
|
-
init_cjs_shims();
|
|
1287
|
-
var isSystemRoot = /* @__PURE__ */ __name((dir) => {
|
|
1288
|
-
return Boolean(dir === "/" || dir === "c:\\" || dir === "C:\\");
|
|
1289
|
-
}, "isSystemRoot");
|
|
1290
|
-
|
|
1291
|
-
// ../path/src/get-workspace-root.ts
|
|
1292
|
-
var WORKSPACE_ROOT_CONTENT = [
|
|
1293
|
-
"package-lock.json",
|
|
1294
|
-
"yarn.lock",
|
|
1295
|
-
"pnpm-lock.yaml",
|
|
1296
|
-
"bun.lock",
|
|
1297
|
-
"nx.json",
|
|
1298
|
-
"knip.json",
|
|
1299
|
-
"pnpm-workspace.yaml",
|
|
1300
|
-
"LICENSE",
|
|
1301
|
-
".all-contributorsrc",
|
|
1302
|
-
".whitesource",
|
|
1303
|
-
"syncpack.config.js",
|
|
1304
|
-
"syncpack.json",
|
|
1305
|
-
"socket.yaml",
|
|
1306
|
-
"lefthook.yaml",
|
|
1307
|
-
".npmrc",
|
|
1308
|
-
".log4brains.yml",
|
|
1309
|
-
".huskyrc",
|
|
1310
|
-
".husky",
|
|
1311
|
-
".lintstagedrc",
|
|
1312
|
-
".commitlintrc",
|
|
1313
|
-
"lefthook.yml",
|
|
1314
|
-
".github",
|
|
1315
|
-
".nx",
|
|
1316
|
-
".vscode",
|
|
1317
|
-
"patches"
|
|
1318
|
-
];
|
|
1319
|
-
function getWorkspaceRoot(dir = process.cwd()) {
|
|
1320
|
-
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
1321
|
-
return process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH;
|
|
1322
|
-
}
|
|
1323
|
-
const root = findWorkspaceRootSafe(dir);
|
|
1324
|
-
if (root) {
|
|
1325
|
-
return root;
|
|
1326
|
-
}
|
|
1327
|
-
let result = getParentPath(WORKSPACE_ROOT_CONTENT, dir);
|
|
1328
|
-
if (result) {
|
|
1329
|
-
return result;
|
|
1330
|
-
}
|
|
1331
|
-
result = dir;
|
|
1332
|
-
while (result && !isSystemRoot(result)) {
|
|
1333
|
-
result = getParentPath("storm-workspace.json", result, {
|
|
1334
|
-
skipCwd: true
|
|
1335
|
-
});
|
|
1336
|
-
if (result) {
|
|
1337
|
-
return result;
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
return dir;
|
|
1341
|
-
}
|
|
1342
|
-
__name(getWorkspaceRoot, "getWorkspaceRoot");
|
|
1343
|
-
|
|
1344
|
-
// ../path/src/file-path-fns.ts
|
|
1345
|
-
function findFileName(filePath, options = {}) {
|
|
1346
|
-
const { requireExtension = false, withExtension = true } = options;
|
|
1347
|
-
const result = normalizeWindowsPath2(filePath)?.split(filePath?.includes("\\") ? "\\" : "/")?.pop() ?? "";
|
|
1348
|
-
if (requireExtension === true && !result.includes(".")) {
|
|
1349
|
-
return EMPTY_STRING;
|
|
1350
|
-
}
|
|
1351
|
-
if (withExtension === false && result.includes(".")) {
|
|
1352
|
-
return result.substring(0, result.lastIndexOf(".")) || EMPTY_STRING;
|
|
1353
|
-
}
|
|
1354
|
-
return result;
|
|
1355
|
-
}
|
|
1356
|
-
__name(findFileName, "findFileName");
|
|
1357
|
-
function findFilePath(filePath) {
|
|
1358
|
-
const normalizedPath = normalizeWindowsPath2(filePath);
|
|
1359
|
-
const result = normalizedPath.replace(findFileName(normalizedPath, {
|
|
1360
|
-
requireExtension: true
|
|
1361
|
-
}), "");
|
|
1362
|
-
return result === "/" ? result : result.replace(/\/$/, "");
|
|
1363
|
-
}
|
|
1364
|
-
__name(findFilePath, "findFilePath");
|
|
1365
|
-
function relativePath(from, to, withEndSlash = false) {
|
|
1366
|
-
return (0, import_node_path2.relative)(withEndSlash !== true ? from.replace(/\/$/, "") : from, withEndSlash !== true ? to.replace(/\/$/, "") : to);
|
|
1367
|
-
}
|
|
1368
|
-
__name(relativePath, "relativePath");
|
|
747
|
+
var import_file_path_fns = require("@stryke/path/file-path-fns");
|
|
748
|
+
var import_join_paths3 = require("@stryke/path/join-paths");
|
|
1369
749
|
|
|
1370
750
|
// src/project.ts
|
|
1371
751
|
init_cjs_shims();
|
|
@@ -1391,214 +771,910 @@ init_cjs_shims();
|
|
|
1391
771
|
|
|
1392
772
|
// ../env/src/get-env-paths.ts
|
|
1393
773
|
init_cjs_shims();
|
|
774
|
+
var import_join_paths = require("@stryke/path/join-paths");
|
|
1394
775
|
|
|
1395
776
|
// ../string-format/src/title-case.ts
|
|
1396
777
|
init_cjs_shims();
|
|
1397
778
|
|
|
1398
779
|
// ../string-format/src/acronyms.ts
|
|
1399
780
|
init_cjs_shims();
|
|
1400
|
-
var ACRONYMS =
|
|
1401
|
-
"
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
"
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
"
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
"
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
"
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
"
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
"
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
"
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
"
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
"
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
"
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
"
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
"
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
"
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
"
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
"
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
"
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
"
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
"
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
"
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
"
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
"
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
"
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
"
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
"
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
"
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
"
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
"
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
"
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
"
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
"
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
"
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
"
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
"
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
"
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
"
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
"
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
"
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
"
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
"
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
"
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
"
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
"
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
"
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
"
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
"
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
"
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
"
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
"
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
"
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
"
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
"
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
"
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
"
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
"
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
"
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
"
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
"
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
"
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
"
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
"
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
"
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
"
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
"
|
|
1600
|
-
|
|
1601
|
-
|
|
781
|
+
var ACRONYMS = {
|
|
782
|
+
"2D": {
|
|
783
|
+
description: "Two-Dimensional",
|
|
784
|
+
display: "2d"
|
|
785
|
+
},
|
|
786
|
+
"3D": {
|
|
787
|
+
description: "Three-Dimensional",
|
|
788
|
+
display: "3d"
|
|
789
|
+
},
|
|
790
|
+
"4D": {
|
|
791
|
+
description: "Four-Dimensional",
|
|
792
|
+
display: "4d"
|
|
793
|
+
},
|
|
794
|
+
"5G": {
|
|
795
|
+
description: "Fifth Generation (mobile networks)"
|
|
796
|
+
},
|
|
797
|
+
"6G": {
|
|
798
|
+
description: "Sixth Generation (mobile networks)"
|
|
799
|
+
},
|
|
800
|
+
"7G": {
|
|
801
|
+
description: "Seventh Generation (mobile networks)"
|
|
802
|
+
},
|
|
803
|
+
"8G": {
|
|
804
|
+
description: "Eighth Generation (mobile networks)"
|
|
805
|
+
},
|
|
806
|
+
"ACID": {
|
|
807
|
+
description: "Atomicity, Consistency, Isolation, Durability"
|
|
808
|
+
},
|
|
809
|
+
"AITA": {
|
|
810
|
+
description: "Am I The Asshole"
|
|
811
|
+
},
|
|
812
|
+
"AES": {
|
|
813
|
+
description: "Advanced Encryption Standard"
|
|
814
|
+
},
|
|
815
|
+
"AI": {
|
|
816
|
+
description: "Artificial Intelligence"
|
|
817
|
+
},
|
|
818
|
+
"AJAX": {
|
|
819
|
+
description: "Asynchronous JavaScript and XML"
|
|
820
|
+
},
|
|
821
|
+
"API": {
|
|
822
|
+
description: "Application Programming Interface"
|
|
823
|
+
},
|
|
824
|
+
"AR": {
|
|
825
|
+
description: "Augmented Reality"
|
|
826
|
+
},
|
|
827
|
+
"ASCII": {
|
|
828
|
+
description: "American Standard Code for Information Interchange"
|
|
829
|
+
},
|
|
830
|
+
"ATF": {
|
|
831
|
+
description: "Bureau of Alcohol, Tobacco, Firearms and Explosives"
|
|
832
|
+
},
|
|
833
|
+
"ATM": {
|
|
834
|
+
description: "Automated Teller Machine"
|
|
835
|
+
},
|
|
836
|
+
"B2B": {
|
|
837
|
+
description: "Business to Business"
|
|
838
|
+
},
|
|
839
|
+
"B2C": {
|
|
840
|
+
description: "Business to Consumer"
|
|
841
|
+
},
|
|
842
|
+
"BATFE": {
|
|
843
|
+
description: "Bureau of Alcohol, Tobacco, Firearms and Explosives"
|
|
844
|
+
},
|
|
845
|
+
"BFF": {
|
|
846
|
+
description: "Best Friends Forever"
|
|
847
|
+
},
|
|
848
|
+
"BFFS": {
|
|
849
|
+
description: "Best Friends Forever (plural)"
|
|
850
|
+
},
|
|
851
|
+
"BI": {
|
|
852
|
+
description: "Business Intelligence"
|
|
853
|
+
},
|
|
854
|
+
"BIOS": {
|
|
855
|
+
description: "Basic Input/Output System"
|
|
856
|
+
},
|
|
857
|
+
"BGP": {
|
|
858
|
+
description: "Border Gateway Protocol"
|
|
859
|
+
},
|
|
860
|
+
"BOM": {
|
|
861
|
+
description: "Bill of Materials / Byte Order Mark"
|
|
862
|
+
},
|
|
863
|
+
"BYOD": {
|
|
864
|
+
description: "Bring Your Own Device"
|
|
865
|
+
},
|
|
866
|
+
"C2C": {
|
|
867
|
+
description: "Consumer to Consumer"
|
|
868
|
+
},
|
|
869
|
+
"CAGR": {
|
|
870
|
+
description: "Compound Annual Growth Rate"
|
|
871
|
+
},
|
|
872
|
+
"CAPTCHA": {
|
|
873
|
+
description: "Completely Automated Public Turing test to tell Computers and Humans Apart"
|
|
874
|
+
},
|
|
875
|
+
"CD": {
|
|
876
|
+
description: "Continuous Delivery / Compact Disc"
|
|
877
|
+
},
|
|
878
|
+
"CDN": {
|
|
879
|
+
description: "Content Delivery Network"
|
|
880
|
+
},
|
|
881
|
+
"CDP": {
|
|
882
|
+
description: "Customer Data Platform"
|
|
883
|
+
},
|
|
884
|
+
"CDT": {
|
|
885
|
+
description: "Central Daylight Time"
|
|
886
|
+
},
|
|
887
|
+
"CIA": {
|
|
888
|
+
description: "Central Intelligence Agency"
|
|
889
|
+
},
|
|
890
|
+
"CI": {
|
|
891
|
+
description: "Continuous Integration"
|
|
892
|
+
},
|
|
893
|
+
"CI/CD": {
|
|
894
|
+
description: "Continuous Integration/Continuous Delivery"
|
|
895
|
+
},
|
|
896
|
+
"CIAM": {
|
|
897
|
+
description: "Customer Identity and Access Management"
|
|
898
|
+
},
|
|
899
|
+
"CICD": {
|
|
900
|
+
description: "Continuous Integration Continuous Delivery",
|
|
901
|
+
display: "CI/CD"
|
|
902
|
+
},
|
|
903
|
+
"CLI": {
|
|
904
|
+
description: "Command Line Interface"
|
|
905
|
+
},
|
|
906
|
+
"CMDB": {
|
|
907
|
+
description: "Configuration Management Database"
|
|
908
|
+
},
|
|
909
|
+
"CORS": {
|
|
910
|
+
description: "Cross-Origin Resource Sharing"
|
|
911
|
+
},
|
|
912
|
+
"CPA": {
|
|
913
|
+
description: "Certified Public Accountant"
|
|
914
|
+
},
|
|
915
|
+
"CPU": {
|
|
916
|
+
description: "Central Processing Unit"
|
|
917
|
+
},
|
|
918
|
+
"CRUD": {
|
|
919
|
+
description: "Create, Read, Update, Delete"
|
|
920
|
+
},
|
|
921
|
+
"CSR": {
|
|
922
|
+
description: "Certificate Signing Request / Corporate Social Responsibility"
|
|
923
|
+
},
|
|
924
|
+
"CSS": {
|
|
925
|
+
description: "Cascading Style Sheets"
|
|
926
|
+
},
|
|
927
|
+
"CST": {
|
|
928
|
+
description: "Central Standard Time"
|
|
929
|
+
},
|
|
930
|
+
"CTA": {
|
|
931
|
+
description: "Call To Action"
|
|
932
|
+
},
|
|
933
|
+
"CWD": {
|
|
934
|
+
description: "Current Working Directory"
|
|
935
|
+
},
|
|
936
|
+
"CX": {
|
|
937
|
+
description: "Customer Experience"
|
|
938
|
+
},
|
|
939
|
+
"DAG": {
|
|
940
|
+
description: "Directed Acyclic Graph"
|
|
941
|
+
},
|
|
942
|
+
"DBMS": {
|
|
943
|
+
description: "Database Management System"
|
|
944
|
+
},
|
|
945
|
+
"DDOS": {
|
|
946
|
+
description: "Distributed Denial of Service",
|
|
947
|
+
display: "DDoS"
|
|
948
|
+
},
|
|
949
|
+
"DEA": {
|
|
950
|
+
description: "Drug Enforcement Administration"
|
|
951
|
+
},
|
|
952
|
+
"DEVOPS": {
|
|
953
|
+
description: "Development Operations",
|
|
954
|
+
display: "DevOps"
|
|
955
|
+
},
|
|
956
|
+
"DEVENV": {
|
|
957
|
+
description: "Devenv",
|
|
958
|
+
display: "Devenv"
|
|
959
|
+
},
|
|
960
|
+
"DOTENV": {
|
|
961
|
+
description: "Dotenv (.env)",
|
|
962
|
+
display: "Dotenv"
|
|
963
|
+
},
|
|
964
|
+
"DIRENV": {
|
|
965
|
+
description: "DirEnv",
|
|
966
|
+
display: "DirEnv"
|
|
967
|
+
},
|
|
968
|
+
"DHS": {
|
|
969
|
+
description: "Department of Homeland Security"
|
|
970
|
+
},
|
|
971
|
+
"DNC": {
|
|
972
|
+
description: "Democratic National Committee / Do Not Call"
|
|
973
|
+
},
|
|
974
|
+
"DNS": {
|
|
975
|
+
description: "Domain Name System"
|
|
976
|
+
},
|
|
977
|
+
"DNSSEC": {
|
|
978
|
+
description: "Domain Name System Security Extensions"
|
|
979
|
+
},
|
|
980
|
+
"DOD": {
|
|
981
|
+
description: "Department of Defense",
|
|
982
|
+
display: "DoD"
|
|
983
|
+
},
|
|
984
|
+
"DOJ": {
|
|
985
|
+
description: "Department of Justice",
|
|
986
|
+
display: "DoJ"
|
|
987
|
+
},
|
|
988
|
+
"DOT": {
|
|
989
|
+
description: "Department of Transportation",
|
|
990
|
+
display: "DoT"
|
|
991
|
+
},
|
|
992
|
+
"DOM": {
|
|
993
|
+
description: "Document Object Model"
|
|
994
|
+
},
|
|
995
|
+
"DR": {
|
|
996
|
+
description: "Disaster Recovery"
|
|
997
|
+
},
|
|
998
|
+
"DRM": {
|
|
999
|
+
description: "Digital Rights Management"
|
|
1000
|
+
},
|
|
1001
|
+
"DSN": {
|
|
1002
|
+
description: "Data Source Name"
|
|
1003
|
+
},
|
|
1004
|
+
"DWH": {
|
|
1005
|
+
description: "Data Warehouse"
|
|
1006
|
+
},
|
|
1007
|
+
"E2E": {
|
|
1008
|
+
description: "End to End"
|
|
1009
|
+
},
|
|
1010
|
+
"EAI": {
|
|
1011
|
+
description: "Enterprise Application Integration"
|
|
1012
|
+
},
|
|
1013
|
+
"EDT": {
|
|
1014
|
+
description: "Eastern Daylight Time"
|
|
1015
|
+
},
|
|
1016
|
+
"EEA": {
|
|
1017
|
+
description: "European Economic Area"
|
|
1018
|
+
},
|
|
1019
|
+
"EKS": {
|
|
1020
|
+
description: "Elastic Kubernetes Service"
|
|
1021
|
+
},
|
|
1022
|
+
"EOF": {
|
|
1023
|
+
description: "End Of File"
|
|
1024
|
+
},
|
|
1025
|
+
"EOD": {
|
|
1026
|
+
description: "End Of Day / Explosive Ordnance Disposal"
|
|
1027
|
+
},
|
|
1028
|
+
"EPA": {
|
|
1029
|
+
description: "Environmental Protection Agency"
|
|
1030
|
+
},
|
|
1031
|
+
"ER": {
|
|
1032
|
+
description: "Emergency Room / Entity Relationship"
|
|
1033
|
+
},
|
|
1034
|
+
"EST": {
|
|
1035
|
+
description: "Eastern Standard Time"
|
|
1036
|
+
},
|
|
1037
|
+
"ETC": {
|
|
1038
|
+
description: "Et Cetera"
|
|
1039
|
+
},
|
|
1040
|
+
"ETL": {
|
|
1041
|
+
description: "Extract, Transform, Load"
|
|
1042
|
+
},
|
|
1043
|
+
"EULA": {
|
|
1044
|
+
description: "End User License Agreement"
|
|
1045
|
+
},
|
|
1046
|
+
"FAQ": {
|
|
1047
|
+
description: "Frequently Asked Questions"
|
|
1048
|
+
},
|
|
1049
|
+
"FBI": {
|
|
1050
|
+
description: "Federal Bureau of Investigation"
|
|
1051
|
+
},
|
|
1052
|
+
"FCC": {
|
|
1053
|
+
description: "Federal Communications Commission"
|
|
1054
|
+
},
|
|
1055
|
+
"FDA": {
|
|
1056
|
+
description: "Food and Drug Administration"
|
|
1057
|
+
},
|
|
1058
|
+
"FIDO": {
|
|
1059
|
+
description: "Fast IDentity Online"
|
|
1060
|
+
},
|
|
1061
|
+
"FLOTUS": {
|
|
1062
|
+
description: "First Lady of the United States"
|
|
1063
|
+
},
|
|
1064
|
+
"FQDN": {
|
|
1065
|
+
description: "Fully Qualified Domain Name"
|
|
1066
|
+
},
|
|
1067
|
+
"FTC": {
|
|
1068
|
+
description: "Federal Trade Commission"
|
|
1069
|
+
},
|
|
1070
|
+
"FTP": {
|
|
1071
|
+
description: "File Transfer Protocol"
|
|
1072
|
+
},
|
|
1073
|
+
"FAAS": {
|
|
1074
|
+
description: "Function as a Service",
|
|
1075
|
+
display: "FaaS"
|
|
1076
|
+
},
|
|
1077
|
+
"GC": {
|
|
1078
|
+
description: "Garbage Collection"
|
|
1079
|
+
},
|
|
1080
|
+
"GCP": {
|
|
1081
|
+
description: "Google Cloud Platform"
|
|
1082
|
+
},
|
|
1083
|
+
"GDPR": {
|
|
1084
|
+
description: "General Data Protection Regulation"
|
|
1085
|
+
},
|
|
1086
|
+
"GMT": {
|
|
1087
|
+
description: "Greenwich Mean Time"
|
|
1088
|
+
},
|
|
1089
|
+
"GOP": {
|
|
1090
|
+
description: "Grand Old Party"
|
|
1091
|
+
},
|
|
1092
|
+
"GPU": {
|
|
1093
|
+
description: "Graphics Processing Unit"
|
|
1094
|
+
},
|
|
1095
|
+
"GUID": {
|
|
1096
|
+
description: "Globally Unique Identifier"
|
|
1097
|
+
},
|
|
1098
|
+
"GUI": {
|
|
1099
|
+
description: "Graphical User Interface"
|
|
1100
|
+
},
|
|
1101
|
+
"GZIP": {
|
|
1102
|
+
description: "GNU Zip"
|
|
1103
|
+
},
|
|
1104
|
+
"HCI": {
|
|
1105
|
+
description: "Human Computer Interaction / Hyper-Converged Infrastructure"
|
|
1106
|
+
},
|
|
1107
|
+
"HDD": {
|
|
1108
|
+
description: "Hard Disk Drive"
|
|
1109
|
+
},
|
|
1110
|
+
"HDFS": {
|
|
1111
|
+
description: "Hadoop Distributed File System"
|
|
1112
|
+
},
|
|
1113
|
+
"HHS": {
|
|
1114
|
+
description: "Health and Human Services"
|
|
1115
|
+
},
|
|
1116
|
+
"HIPAA": {
|
|
1117
|
+
description: "Health Insurance Portability and Accountability Act"
|
|
1118
|
+
},
|
|
1119
|
+
"HMAC": {
|
|
1120
|
+
description: "Hash-based Message Authentication Code"
|
|
1121
|
+
},
|
|
1122
|
+
"HOTP": {
|
|
1123
|
+
description: "HMAC-based One-Time Password"
|
|
1124
|
+
},
|
|
1125
|
+
"HSM": {
|
|
1126
|
+
description: "Hardware Security Module"
|
|
1127
|
+
},
|
|
1128
|
+
"HTML": {
|
|
1129
|
+
description: "HyperText Markup Language"
|
|
1130
|
+
},
|
|
1131
|
+
"HTTP": {
|
|
1132
|
+
description: "HyperText Transfer Protocol (HTTP)"
|
|
1133
|
+
},
|
|
1134
|
+
"HTTP/2": {
|
|
1135
|
+
description: "HyperText Transfer Protocol Version 2 (HTTP/2)"
|
|
1136
|
+
},
|
|
1137
|
+
"HTTP/2.0": {
|
|
1138
|
+
description: "HyperText Transfer Protocol Version 2 (HTTP/2)",
|
|
1139
|
+
display: "HTTP2"
|
|
1140
|
+
},
|
|
1141
|
+
"HTTP2": {
|
|
1142
|
+
description: "HyperText Transfer Protocol Version 2 (HTTP/2)",
|
|
1143
|
+
display: "HTTP2"
|
|
1144
|
+
},
|
|
1145
|
+
"HTTP2.0": {
|
|
1146
|
+
description: "HyperText Transfer Protocol Version 2 (HTTP/2)",
|
|
1147
|
+
display: "HTTP2"
|
|
1148
|
+
},
|
|
1149
|
+
"HTTP/3": {
|
|
1150
|
+
description: "HyperText Transfer Protocol Version 3 (HTTP/3)"
|
|
1151
|
+
},
|
|
1152
|
+
"HTTP/3.0": {
|
|
1153
|
+
description: "HyperText Transfer Protocol Version 3 (HTTP/3)",
|
|
1154
|
+
display: "HTTP3"
|
|
1155
|
+
},
|
|
1156
|
+
"HTTP3": {
|
|
1157
|
+
description: "HyperText Transfer Protocol Version 3 (HTTP/3)",
|
|
1158
|
+
display: "HTTP3"
|
|
1159
|
+
},
|
|
1160
|
+
"HTTP3.0": {
|
|
1161
|
+
description: "HyperText Transfer Protocol Version 3 (HTTP/3)",
|
|
1162
|
+
display: "HTTP3"
|
|
1163
|
+
},
|
|
1164
|
+
"HTTPS": {
|
|
1165
|
+
description: "HyperText Transfer Protocol Secure (HTTPS)"
|
|
1166
|
+
},
|
|
1167
|
+
"HTTPS/2": {
|
|
1168
|
+
description: "HyperText Transfer Protocol Secure Version 2 (HTTPS/2)"
|
|
1169
|
+
},
|
|
1170
|
+
"HTTPS/2.0": {
|
|
1171
|
+
description: "HyperText Transfer Protocol Secure Version 2 (HTTPS/2)",
|
|
1172
|
+
display: "HTTPS2"
|
|
1173
|
+
},
|
|
1174
|
+
"HTTPS2": {
|
|
1175
|
+
description: "HyperText Transfer Protocol Secure Version 2 (HTTPS/2)",
|
|
1176
|
+
display: "HTTPS2"
|
|
1177
|
+
},
|
|
1178
|
+
"HTTPS2.0": {
|
|
1179
|
+
description: "HyperText Transfer Protocol Secure Version 2 (HTTPS/2)",
|
|
1180
|
+
display: "HTTPS2"
|
|
1181
|
+
},
|
|
1182
|
+
"HTTPS/3": {
|
|
1183
|
+
description: "HyperText Transfer Protocol Secure Version 3 (HTTPS/3)"
|
|
1184
|
+
},
|
|
1185
|
+
"HTTPS/3.0": {
|
|
1186
|
+
description: "HyperText Transfer Protocol Secure Version 3 (HTTPS/3)",
|
|
1187
|
+
display: "HTTPS3"
|
|
1188
|
+
},
|
|
1189
|
+
"HTTPS3": {
|
|
1190
|
+
description: "HyperText Transfer Protocol Secure Version 3 (HTTPS/3)",
|
|
1191
|
+
display: "HTTPS3"
|
|
1192
|
+
},
|
|
1193
|
+
"HTTPS3.0": {
|
|
1194
|
+
description: "HyperText Transfer Protocol Secure Version 3 (HTTPS/3)",
|
|
1195
|
+
display: "HTTPS3"
|
|
1196
|
+
},
|
|
1197
|
+
"IAM": {
|
|
1198
|
+
description: "Identity and Access Management"
|
|
1199
|
+
},
|
|
1200
|
+
"IAMM": {
|
|
1201
|
+
description: "Identity and Access Management and Monitoring"
|
|
1202
|
+
},
|
|
1203
|
+
"IAMT": {
|
|
1204
|
+
description: "Identity and Access Management Tool"
|
|
1205
|
+
},
|
|
1206
|
+
"IAAS": {
|
|
1207
|
+
description: "Infrastructure as a Service",
|
|
1208
|
+
display: "IaaS"
|
|
1209
|
+
},
|
|
1210
|
+
"ID": {
|
|
1211
|
+
description: "Identifier",
|
|
1212
|
+
display: "Id"
|
|
1213
|
+
},
|
|
1214
|
+
"IFTTT": {
|
|
1215
|
+
description: "If This Then That"
|
|
1216
|
+
},
|
|
1217
|
+
"IMAP": {
|
|
1218
|
+
description: "Internet Message Access Protocol"
|
|
1219
|
+
},
|
|
1220
|
+
"IP": {
|
|
1221
|
+
description: "Internet Protocol"
|
|
1222
|
+
},
|
|
1223
|
+
"IPFS": {
|
|
1224
|
+
description: "InterPlanetary File System"
|
|
1225
|
+
},
|
|
1226
|
+
"IPS": {
|
|
1227
|
+
description: "Intrusion Prevention System"
|
|
1228
|
+
},
|
|
1229
|
+
"IQ": {
|
|
1230
|
+
description: "Intelligence Quotient",
|
|
1231
|
+
display: "IQ"
|
|
1232
|
+
},
|
|
1233
|
+
"IO": {
|
|
1234
|
+
description: "Input/Output"
|
|
1235
|
+
},
|
|
1236
|
+
"IOT": {
|
|
1237
|
+
description: "Internet of Things",
|
|
1238
|
+
display: "IoT"
|
|
1239
|
+
},
|
|
1240
|
+
"JSON": {
|
|
1241
|
+
description: "JavaScript Object Notation"
|
|
1242
|
+
},
|
|
1243
|
+
"JSONP": {
|
|
1244
|
+
description: "JSON with Padding"
|
|
1245
|
+
},
|
|
1246
|
+
"JWT": {
|
|
1247
|
+
description: "JSON Web Token"
|
|
1248
|
+
},
|
|
1249
|
+
"K8S": {
|
|
1250
|
+
description: "Kubernetes",
|
|
1251
|
+
display: "K8s"
|
|
1252
|
+
},
|
|
1253
|
+
"KMS": {
|
|
1254
|
+
description: "Key Management Service"
|
|
1255
|
+
},
|
|
1256
|
+
"KPI": {
|
|
1257
|
+
description: "Key Performance Indicator"
|
|
1258
|
+
},
|
|
1259
|
+
"KV": {
|
|
1260
|
+
description: "Key Value"
|
|
1261
|
+
},
|
|
1262
|
+
"LAN": {
|
|
1263
|
+
description: "Local Area Network"
|
|
1264
|
+
},
|
|
1265
|
+
"LHS": {
|
|
1266
|
+
description: "Left Hand Side"
|
|
1267
|
+
},
|
|
1268
|
+
"LPGA": {
|
|
1269
|
+
description: "Ladies Professional Golf Association"
|
|
1270
|
+
},
|
|
1271
|
+
"LXC": {
|
|
1272
|
+
description: "Linux Containers"
|
|
1273
|
+
},
|
|
1274
|
+
"MDT": {
|
|
1275
|
+
description: "Mountain Daylight Time"
|
|
1276
|
+
},
|
|
1277
|
+
"MFA": {
|
|
1278
|
+
description: "Multi-Factor Authentication"
|
|
1279
|
+
},
|
|
1280
|
+
"ML": {
|
|
1281
|
+
description: "Machine Learning"
|
|
1282
|
+
},
|
|
1283
|
+
"MLB": {
|
|
1284
|
+
description: "Major League Baseball"
|
|
1285
|
+
},
|
|
1286
|
+
"MLOps": {
|
|
1287
|
+
description: "Machine Learning Operations"
|
|
1288
|
+
},
|
|
1289
|
+
"MST": {
|
|
1290
|
+
description: "Mountain Standard Time"
|
|
1291
|
+
},
|
|
1292
|
+
"MVC": {
|
|
1293
|
+
description: "Model View Controller"
|
|
1294
|
+
},
|
|
1295
|
+
"MVP": {
|
|
1296
|
+
description: "Minimum Viable Product / Most Valuable Player"
|
|
1297
|
+
},
|
|
1298
|
+
"NAIA": {
|
|
1299
|
+
description: "National Association of Intercollegiate Athletics"
|
|
1300
|
+
},
|
|
1301
|
+
"NAS": {
|
|
1302
|
+
description: "Network Attached Storage"
|
|
1303
|
+
},
|
|
1304
|
+
"NASCAR": {
|
|
1305
|
+
description: "National Association for Stock Car Auto Racing"
|
|
1306
|
+
},
|
|
1307
|
+
"NASA": {
|
|
1308
|
+
description: "National Aeronautics and Space Administration"
|
|
1309
|
+
},
|
|
1310
|
+
"NAT": {
|
|
1311
|
+
description: "Network Address Translation"
|
|
1312
|
+
},
|
|
1313
|
+
"NBA": {
|
|
1314
|
+
description: "National Basketball Association"
|
|
1315
|
+
},
|
|
1316
|
+
"NCAA": {
|
|
1317
|
+
description: "National Collegiate Athletic Association"
|
|
1318
|
+
},
|
|
1319
|
+
"NDA": {
|
|
1320
|
+
description: "Non-Disclosure Agreement"
|
|
1321
|
+
},
|
|
1322
|
+
"NFS": {
|
|
1323
|
+
description: "Network File System"
|
|
1324
|
+
},
|
|
1325
|
+
"NHL": {
|
|
1326
|
+
description: "National Hockey League"
|
|
1327
|
+
},
|
|
1328
|
+
"NIST": {
|
|
1329
|
+
description: "National Institute of Standards and Technology"
|
|
1330
|
+
},
|
|
1331
|
+
"NLP": {
|
|
1332
|
+
description: "Natural Language Processing"
|
|
1333
|
+
},
|
|
1334
|
+
"NPS": {
|
|
1335
|
+
description: "Net Promoter Score"
|
|
1336
|
+
},
|
|
1337
|
+
"NRA": {
|
|
1338
|
+
description: "National Rifle Association"
|
|
1339
|
+
},
|
|
1340
|
+
"NSFW": {
|
|
1341
|
+
description: "Not Safe For Work"
|
|
1342
|
+
},
|
|
1343
|
+
"NX": {
|
|
1344
|
+
description: "Nx",
|
|
1345
|
+
display: "Nx"
|
|
1346
|
+
},
|
|
1347
|
+
"OCR": {
|
|
1348
|
+
description: "Optical Character Recognition"
|
|
1349
|
+
},
|
|
1350
|
+
"OEM": {
|
|
1351
|
+
description: "Original Equipment Manufacturer"
|
|
1352
|
+
},
|
|
1353
|
+
"OKR": {
|
|
1354
|
+
description: "Objectives and Key Results"
|
|
1355
|
+
},
|
|
1356
|
+
"OLAP": {
|
|
1357
|
+
description: "Online Analytical Processing"
|
|
1358
|
+
},
|
|
1359
|
+
"OLTP": {
|
|
1360
|
+
description: "Online Transaction Processing"
|
|
1361
|
+
},
|
|
1362
|
+
"OOP": {
|
|
1363
|
+
description: "Object Oriented Programming"
|
|
1364
|
+
},
|
|
1365
|
+
"ORM": {
|
|
1366
|
+
description: "Object Relational Mapping"
|
|
1367
|
+
},
|
|
1368
|
+
"OS": {
|
|
1369
|
+
description: "Operating System"
|
|
1370
|
+
},
|
|
1371
|
+
"OSS": {
|
|
1372
|
+
description: "Open Source Software"
|
|
1373
|
+
},
|
|
1374
|
+
"OSINT": {
|
|
1375
|
+
description: "Open Source Intelligence"
|
|
1376
|
+
},
|
|
1377
|
+
"OTP": {
|
|
1378
|
+
description: "One-Time Password"
|
|
1379
|
+
},
|
|
1380
|
+
"P2P": {
|
|
1381
|
+
description: "Peer to Peer"
|
|
1382
|
+
},
|
|
1383
|
+
"PDP": {
|
|
1384
|
+
description: "Policy Decision Point / Product Detail Page"
|
|
1385
|
+
},
|
|
1386
|
+
"PDT": {
|
|
1387
|
+
description: "Pacific Daylight Time"
|
|
1388
|
+
},
|
|
1389
|
+
"PGA": {
|
|
1390
|
+
description: "Professional Golfers' Association"
|
|
1391
|
+
},
|
|
1392
|
+
"POTUS": {
|
|
1393
|
+
description: "President of the United States"
|
|
1394
|
+
},
|
|
1395
|
+
"PST": {
|
|
1396
|
+
description: "Pacific Standard Time"
|
|
1397
|
+
},
|
|
1398
|
+
"PTO": {
|
|
1399
|
+
description: "Paid Time Off / Power Take-Off"
|
|
1400
|
+
},
|
|
1401
|
+
"PAAS": {
|
|
1402
|
+
description: "Platform as a Service",
|
|
1403
|
+
display: "PaaS"
|
|
1404
|
+
},
|
|
1405
|
+
"PCI": {
|
|
1406
|
+
description: "Payment Card Industry"
|
|
1407
|
+
},
|
|
1408
|
+
"PKI": {
|
|
1409
|
+
description: "Public Key Infrastructure"
|
|
1410
|
+
},
|
|
1411
|
+
"PP": {
|
|
1412
|
+
description: "Pages / PayPal / Percentage Points"
|
|
1413
|
+
},
|
|
1414
|
+
"PWA": {
|
|
1415
|
+
description: "Progressive Web App"
|
|
1416
|
+
},
|
|
1417
|
+
"PX": {
|
|
1418
|
+
description: "Pixel"
|
|
1419
|
+
},
|
|
1420
|
+
"QA": {
|
|
1421
|
+
description: "Quality Assurance"
|
|
1422
|
+
},
|
|
1423
|
+
"R2": {
|
|
1424
|
+
description: "R2"
|
|
1425
|
+
},
|
|
1426
|
+
"RAID": {
|
|
1427
|
+
description: "Redundant Array of Independent Disks"
|
|
1428
|
+
},
|
|
1429
|
+
"RAM": {
|
|
1430
|
+
description: "Random Access Memory"
|
|
1431
|
+
},
|
|
1432
|
+
"RDS": {
|
|
1433
|
+
description: "Relational Database Service"
|
|
1434
|
+
},
|
|
1435
|
+
"REST": {
|
|
1436
|
+
description: "Representational State Transfer"
|
|
1437
|
+
},
|
|
1438
|
+
"RHS": {
|
|
1439
|
+
description: "Right Hand Side"
|
|
1440
|
+
},
|
|
1441
|
+
"ROI": {
|
|
1442
|
+
description: "Return on Investment"
|
|
1443
|
+
},
|
|
1444
|
+
"RPC": {
|
|
1445
|
+
description: "Remote Procedure Call"
|
|
1446
|
+
},
|
|
1447
|
+
"RPA": {
|
|
1448
|
+
description: "Robotic Process Automation"
|
|
1449
|
+
},
|
|
1450
|
+
"RUM": {
|
|
1451
|
+
description: "Real User Monitoring"
|
|
1452
|
+
},
|
|
1453
|
+
"RSS": {
|
|
1454
|
+
description: "Really Simple Syndication"
|
|
1455
|
+
},
|
|
1456
|
+
"S3": {
|
|
1457
|
+
description: "Simple Storage Service (S3)"
|
|
1458
|
+
},
|
|
1459
|
+
"SAN": {
|
|
1460
|
+
description: "Storage Area Network"
|
|
1461
|
+
},
|
|
1462
|
+
"SASE": {
|
|
1463
|
+
description: "Secure Access Service Edge"
|
|
1464
|
+
},
|
|
1465
|
+
"SCOTUS": {
|
|
1466
|
+
description: "Supreme Court of the United States"
|
|
1467
|
+
},
|
|
1468
|
+
"SDLC": {
|
|
1469
|
+
description: "Software Development Life Cycle"
|
|
1470
|
+
},
|
|
1471
|
+
"SDK": {
|
|
1472
|
+
description: "Software Development Kit"
|
|
1473
|
+
},
|
|
1474
|
+
"SEC": {
|
|
1475
|
+
description: "Securities and Exchange Commission"
|
|
1476
|
+
},
|
|
1477
|
+
"SEO": {
|
|
1478
|
+
description: "Search Engine Optimization"
|
|
1479
|
+
},
|
|
1480
|
+
"SFTP": {
|
|
1481
|
+
description: "SSH File Transfer Protocol / Secure File Transfer Protocol"
|
|
1482
|
+
},
|
|
1483
|
+
"SIEM": {
|
|
1484
|
+
description: "Security Information and Event Management"
|
|
1485
|
+
},
|
|
1486
|
+
"SLA": {
|
|
1487
|
+
description: "Service Level Agreement"
|
|
1488
|
+
},
|
|
1489
|
+
"SMB": {
|
|
1490
|
+
description: "Server Message Block / Small and Medium Business"
|
|
1491
|
+
},
|
|
1492
|
+
"SMTP": {
|
|
1493
|
+
description: "Simple Mail Transfer Protocol"
|
|
1494
|
+
},
|
|
1495
|
+
"SOAP": {
|
|
1496
|
+
description: "Simple Object Access Protocol"
|
|
1497
|
+
},
|
|
1498
|
+
"SOC": {
|
|
1499
|
+
description: "Security Operations Center / System on Chip"
|
|
1500
|
+
},
|
|
1501
|
+
"SOA": {
|
|
1502
|
+
description: "Service Oriented Architecture"
|
|
1503
|
+
},
|
|
1504
|
+
"SPDY": {
|
|
1505
|
+
description: 'Speedy (pronounced "SPeeDY")'
|
|
1506
|
+
},
|
|
1507
|
+
"SPF": {
|
|
1508
|
+
description: "Sender Policy Framework"
|
|
1509
|
+
},
|
|
1510
|
+
"SQL": {
|
|
1511
|
+
description: "Structured Query Language"
|
|
1512
|
+
},
|
|
1513
|
+
"SRV": {
|
|
1514
|
+
description: "Service"
|
|
1515
|
+
},
|
|
1516
|
+
"SRE": {
|
|
1517
|
+
description: "Site Reliability Engineering"
|
|
1518
|
+
},
|
|
1519
|
+
"SSH": {
|
|
1520
|
+
description: "Secure Shell"
|
|
1521
|
+
},
|
|
1522
|
+
"SSDL": {
|
|
1523
|
+
description: "Secure Software Development Lifecycle"
|
|
1524
|
+
},
|
|
1525
|
+
"SSO": {
|
|
1526
|
+
description: "Single Sign-On"
|
|
1527
|
+
},
|
|
1528
|
+
"SSL": {
|
|
1529
|
+
description: "Secure Sockets Layer"
|
|
1530
|
+
},
|
|
1531
|
+
"SSR": {
|
|
1532
|
+
description: "Server Side Rendering"
|
|
1533
|
+
},
|
|
1534
|
+
"TDD": {
|
|
1535
|
+
description: "Test Driven Development"
|
|
1536
|
+
},
|
|
1537
|
+
"TLD": {
|
|
1538
|
+
description: "Top Level Domain"
|
|
1539
|
+
},
|
|
1540
|
+
"TLS": {
|
|
1541
|
+
description: "Transport Layer Security"
|
|
1542
|
+
},
|
|
1543
|
+
"TLS1.3": {
|
|
1544
|
+
description: "Transport Layer Security 1.3"
|
|
1545
|
+
},
|
|
1546
|
+
"TOTP": {
|
|
1547
|
+
description: "Time-based One-Time Password"
|
|
1548
|
+
},
|
|
1549
|
+
"TRPC": {
|
|
1550
|
+
description: "TypeScript Remote Procedure Call"
|
|
1551
|
+
},
|
|
1552
|
+
"TSA": {
|
|
1553
|
+
description: "Transportation Security Administration"
|
|
1554
|
+
},
|
|
1555
|
+
"TTL": {
|
|
1556
|
+
description: "Time To Live"
|
|
1557
|
+
},
|
|
1558
|
+
"UDP": {
|
|
1559
|
+
description: "User Datagram Protocol"
|
|
1560
|
+
},
|
|
1561
|
+
"UI": {
|
|
1562
|
+
description: "User Interface"
|
|
1563
|
+
},
|
|
1564
|
+
"UID": {
|
|
1565
|
+
description: "Unique Identifier"
|
|
1566
|
+
},
|
|
1567
|
+
"URI": {
|
|
1568
|
+
description: "Uniform Resource Identifier"
|
|
1569
|
+
},
|
|
1570
|
+
"URL": {
|
|
1571
|
+
description: "Uniform Resource Locator"
|
|
1572
|
+
},
|
|
1573
|
+
"USOPC": {
|
|
1574
|
+
description: "United States Olympic & Paralympic Committee"
|
|
1575
|
+
},
|
|
1576
|
+
"USPS": {
|
|
1577
|
+
description: "United States Postal Service"
|
|
1578
|
+
},
|
|
1579
|
+
"USTA": {
|
|
1580
|
+
description: "United States Tennis Association"
|
|
1581
|
+
},
|
|
1582
|
+
"UTF": {
|
|
1583
|
+
description: "Unicode Transformation Format"
|
|
1584
|
+
},
|
|
1585
|
+
"UTC": {
|
|
1586
|
+
description: "Coordinated Universal Time"
|
|
1587
|
+
},
|
|
1588
|
+
"UUID": {
|
|
1589
|
+
description: "Universally Unique Identifier"
|
|
1590
|
+
},
|
|
1591
|
+
"UX": {
|
|
1592
|
+
description: "User Experience"
|
|
1593
|
+
},
|
|
1594
|
+
"VM": {
|
|
1595
|
+
description: "Virtual Machine"
|
|
1596
|
+
},
|
|
1597
|
+
"VLAN": {
|
|
1598
|
+
description: "Virtual Local Area Network"
|
|
1599
|
+
},
|
|
1600
|
+
"VPN": {
|
|
1601
|
+
description: "Virtual Private Network"
|
|
1602
|
+
},
|
|
1603
|
+
"VPPA": {
|
|
1604
|
+
description: "Video Privacy Protection Act"
|
|
1605
|
+
},
|
|
1606
|
+
"VR": {
|
|
1607
|
+
description: "Virtual Reality"
|
|
1608
|
+
},
|
|
1609
|
+
"WAF": {
|
|
1610
|
+
description: "Web Application Firewall"
|
|
1611
|
+
},
|
|
1612
|
+
"WAN": {
|
|
1613
|
+
description: "Wide Area Network"
|
|
1614
|
+
},
|
|
1615
|
+
"WNBA": {
|
|
1616
|
+
description: "Women's National Basketball Association"
|
|
1617
|
+
},
|
|
1618
|
+
"WLAN": {
|
|
1619
|
+
description: "Wireless Local Area Network"
|
|
1620
|
+
},
|
|
1621
|
+
"WPA": {
|
|
1622
|
+
description: "Wi-Fi Protected Access"
|
|
1623
|
+
},
|
|
1624
|
+
"XACML": {
|
|
1625
|
+
description: "eXtensible Access Control Markup Language"
|
|
1626
|
+
},
|
|
1627
|
+
"XDG": {
|
|
1628
|
+
description: "Cross-Desktop Group"
|
|
1629
|
+
},
|
|
1630
|
+
"XML": {
|
|
1631
|
+
description: "eXtensible Markup Language"
|
|
1632
|
+
},
|
|
1633
|
+
"XSRF": {
|
|
1634
|
+
description: "Cross-Site Request Forgery"
|
|
1635
|
+
},
|
|
1636
|
+
"XSS": {
|
|
1637
|
+
description: "Cross-Site Scripting"
|
|
1638
|
+
},
|
|
1639
|
+
"XR": {
|
|
1640
|
+
description: "Extended Reality"
|
|
1641
|
+
},
|
|
1642
|
+
"YMCA": {
|
|
1643
|
+
description: "Young Men's Christian Association"
|
|
1644
|
+
},
|
|
1645
|
+
"YAML": {
|
|
1646
|
+
description: "YAML Ain't Markup Language"
|
|
1647
|
+
},
|
|
1648
|
+
"YWCA": {
|
|
1649
|
+
description: "Young Women's Christian Association"
|
|
1650
|
+
},
|
|
1651
|
+
"ZTA": {
|
|
1652
|
+
description: "Zero Trust Architecture"
|
|
1653
|
+
}
|
|
1654
|
+
};
|
|
1655
|
+
var ACRONYM_DISPLAY = Object.fromEntries(Object.entries(ACRONYMS).map(([key, value]) => [
|
|
1656
|
+
key,
|
|
1657
|
+
value.display ?? key
|
|
1658
|
+
]));
|
|
1659
|
+
var ACRONYM_DESCRIPTION = Object.fromEntries(Object.entries(ACRONYMS).map(([key, value]) => [
|
|
1660
|
+
key,
|
|
1661
|
+
value.description
|
|
1662
|
+
]));
|
|
1663
|
+
var ACRONYM_LIST = Object.keys(ACRONYMS);
|
|
1664
|
+
|
|
1665
|
+
// ../string-format/src/get-words.ts
|
|
1666
|
+
init_cjs_shims();
|
|
1667
|
+
var CASE_SPLIT_PATTERN = /[A-Z]?[a-z]+|\d+|[A-Z]+(?![a-z])/g;
|
|
1668
|
+
var RELAXED_SPLIT_PATTERN = /[A-Z/.-]?[a-z/.-]+|\d+|[A-Z/.-]+(?![a-z/.-])/g;
|
|
1669
|
+
function getWords(str, options = {}) {
|
|
1670
|
+
if (str.length > 5e3) {
|
|
1671
|
+
throw new Error("The regular expression parameter of `get-words` can't handle strings longer than 2000 characters");
|
|
1672
|
+
}
|
|
1673
|
+
return [
|
|
1674
|
+
...str.match(options.split ?? (options.relaxed ? RELAXED_SPLIT_PATTERN : CASE_SPLIT_PATTERN)) ?? []
|
|
1675
|
+
];
|
|
1676
|
+
}
|
|
1677
|
+
__name(getWords, "getWords");
|
|
1602
1678
|
|
|
1603
1679
|
// ../string-format/src/upper-case-first.ts
|
|
1604
1680
|
init_cjs_shims();
|
|
@@ -1608,13 +1684,21 @@ function upperCaseFirst(input) {
|
|
|
1608
1684
|
__name(upperCaseFirst, "upperCaseFirst");
|
|
1609
1685
|
|
|
1610
1686
|
// ../string-format/src/title-case.ts
|
|
1611
|
-
var FORMAT_MAPPING =
|
|
1612
|
-
ret[acronym.
|
|
1687
|
+
var FORMAT_MAPPING = ACRONYM_LIST.reduce((ret, acronym) => {
|
|
1688
|
+
ret[acronym.toUpperCase()] = {
|
|
1689
|
+
description: ACRONYMS[acronym]?.description || ACRONYMS[acronym]?.display || acronym,
|
|
1690
|
+
display: ACRONYMS[acronym]?.display || acronym
|
|
1691
|
+
};
|
|
1613
1692
|
return ret;
|
|
1614
1693
|
}, {
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1694
|
+
CSPELL: {
|
|
1695
|
+
description: "CSpell",
|
|
1696
|
+
display: "CSpell"
|
|
1697
|
+
},
|
|
1698
|
+
ESLINT: {
|
|
1699
|
+
description: "ESLint",
|
|
1700
|
+
display: "ESLint"
|
|
1701
|
+
}
|
|
1618
1702
|
});
|
|
1619
1703
|
var LOWER_CASE_WHEN_NOT_FIRST = [
|
|
1620
1704
|
"a",
|
|
@@ -1639,7 +1723,9 @@ function isTitleCase(input) {
|
|
|
1639
1723
|
}
|
|
1640
1724
|
const words = input.split(/[\s\-_]+/).filter(Boolean);
|
|
1641
1725
|
return words.every((word, idx) => {
|
|
1642
|
-
if (
|
|
1726
|
+
if (FORMAT_MAPPING[word.toUpperCase()]) {
|
|
1727
|
+
return true;
|
|
1728
|
+
}
|
|
1643
1729
|
if (idx > 0 && LOWER_CASE_WHEN_NOT_FIRST.includes(word.toLowerCase()) && word === word.toLowerCase()) {
|
|
1644
1730
|
return true;
|
|
1645
1731
|
}
|
|
@@ -1651,60 +1737,63 @@ function titleCase(input, options = {}) {
|
|
|
1651
1737
|
if (isTitleCase(input) || input === void 0) {
|
|
1652
1738
|
return input;
|
|
1653
1739
|
}
|
|
1654
|
-
|
|
1740
|
+
return input.split(/\s+-\s+/).map((segment) => getWords(segment).filter(Boolean).map((word, index) => {
|
|
1655
1741
|
if (!options.skipLowerCaseWhenNotFirst && LOWER_CASE_WHEN_NOT_FIRST.includes(word.toLowerCase()) && index > 0) {
|
|
1656
1742
|
return word.toLowerCase();
|
|
1657
1743
|
}
|
|
1658
|
-
if (!options.skipFormatMapping &&
|
|
1659
|
-
|
|
1744
|
+
if (!options.skipFormatMapping && FORMAT_MAPPING[word.toUpperCase()]) {
|
|
1745
|
+
if (options.useDescriptions !== false) {
|
|
1746
|
+
return FORMAT_MAPPING[word.toUpperCase()]?.description;
|
|
1747
|
+
} else {
|
|
1748
|
+
return FORMAT_MAPPING[word.toUpperCase()]?.display;
|
|
1749
|
+
}
|
|
1660
1750
|
}
|
|
1661
|
-
if (options.mapping && Object.keys(options.mapping).includes(word.
|
|
1662
|
-
return options.mapping[word.
|
|
1751
|
+
if (options.mapping && Object.keys(options.mapping).includes(word.toUpperCase())) {
|
|
1752
|
+
return options.mapping[word.toUpperCase()];
|
|
1663
1753
|
}
|
|
1664
|
-
return `${upperCaseFirst(word
|
|
1665
|
-
}).join(" ")
|
|
1666
|
-
return input.split(/\s+-\s+/).map((part) => formatSegment(part)).join(" - ");
|
|
1754
|
+
return `${upperCaseFirst(word)}`;
|
|
1755
|
+
}).join(" ")).join(" - ");
|
|
1667
1756
|
}
|
|
1668
1757
|
__name(titleCase, "titleCase");
|
|
1669
1758
|
|
|
1670
1759
|
// ../env/src/get-env-paths.ts
|
|
1671
1760
|
var import_node_os = __toESM(require("node:os"), 1);
|
|
1672
|
-
var
|
|
1761
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
1673
1762
|
var homedir = import_node_os.default.homedir();
|
|
1674
1763
|
var tmpdir = import_node_os.default.tmpdir();
|
|
1675
1764
|
var macos = /* @__PURE__ */ __name((orgId) => {
|
|
1676
|
-
const library = joinPaths(homedir, "Library");
|
|
1765
|
+
const library = (0, import_join_paths.joinPaths)(homedir, "Library");
|
|
1677
1766
|
return {
|
|
1678
|
-
data: joinPaths(library, "Application Support", orgId),
|
|
1679
|
-
config: joinPaths(library, "Preferences", orgId),
|
|
1680
|
-
cache: joinPaths(library, "Caches", orgId),
|
|
1681
|
-
log: joinPaths(library, "Logs", orgId),
|
|
1682
|
-
temp: joinPaths(tmpdir, orgId)
|
|
1767
|
+
data: (0, import_join_paths.joinPaths)(library, "Application Support", orgId),
|
|
1768
|
+
config: (0, import_join_paths.joinPaths)(library, "Preferences", orgId),
|
|
1769
|
+
cache: (0, import_join_paths.joinPaths)(library, "Caches", orgId),
|
|
1770
|
+
log: (0, import_join_paths.joinPaths)(library, "Logs", orgId),
|
|
1771
|
+
temp: (0, import_join_paths.joinPaths)(tmpdir, orgId)
|
|
1683
1772
|
};
|
|
1684
1773
|
}, "macos");
|
|
1685
1774
|
var windows = /* @__PURE__ */ __name((orgId) => {
|
|
1686
|
-
const appData = process.env.APPDATA || joinPaths(homedir, "AppData", "Roaming");
|
|
1687
|
-
const localAppData = process.env.LOCALAPPDATA || joinPaths(homedir, "AppData", "Local");
|
|
1775
|
+
const appData = process.env.APPDATA || (0, import_join_paths.joinPaths)(homedir, "AppData", "Roaming");
|
|
1776
|
+
const localAppData = process.env.LOCALAPPDATA || (0, import_join_paths.joinPaths)(homedir, "AppData", "Local");
|
|
1688
1777
|
const windowsFormattedOrgId = titleCase(orgId).trim().replace(/\s+/g, "");
|
|
1689
1778
|
return {
|
|
1690
1779
|
// Data/config/cache/log are invented by me as Windows isn't opinionated about this
|
|
1691
|
-
data: joinPaths(localAppData, windowsFormattedOrgId, "Data"),
|
|
1692
|
-
config: joinPaths(appData, windowsFormattedOrgId, "Config"),
|
|
1693
|
-
cache: joinPaths(localAppData, "Cache", orgId),
|
|
1694
|
-
log: joinPaths(localAppData, windowsFormattedOrgId, "Log"),
|
|
1695
|
-
temp: joinPaths(tmpdir, orgId)
|
|
1780
|
+
data: (0, import_join_paths.joinPaths)(localAppData, windowsFormattedOrgId, "Data"),
|
|
1781
|
+
config: (0, import_join_paths.joinPaths)(appData, windowsFormattedOrgId, "Config"),
|
|
1782
|
+
cache: (0, import_join_paths.joinPaths)(localAppData, "Cache", orgId),
|
|
1783
|
+
log: (0, import_join_paths.joinPaths)(localAppData, windowsFormattedOrgId, "Log"),
|
|
1784
|
+
temp: (0, import_join_paths.joinPaths)(tmpdir, orgId)
|
|
1696
1785
|
};
|
|
1697
1786
|
}, "windows");
|
|
1698
1787
|
var linux = /* @__PURE__ */ __name((orgId) => {
|
|
1699
|
-
const username =
|
|
1788
|
+
const username = import_node_path.default.basename(homedir);
|
|
1700
1789
|
return {
|
|
1701
|
-
data: joinPaths(process.env.XDG_DATA_HOME || joinPaths(homedir, ".local", "share"), orgId),
|
|
1702
|
-
config: joinPaths(process.env.XDG_CONFIG_HOME || joinPaths(homedir, ".config"), orgId),
|
|
1703
|
-
cache: joinPaths(process.env.XDG_CACHE_HOME || joinPaths(homedir, ".cache"), orgId),
|
|
1790
|
+
data: (0, import_join_paths.joinPaths)(process.env.XDG_DATA_HOME || (0, import_join_paths.joinPaths)(homedir, ".local", "share"), orgId),
|
|
1791
|
+
config: (0, import_join_paths.joinPaths)(process.env.XDG_CONFIG_HOME || (0, import_join_paths.joinPaths)(homedir, ".config"), orgId),
|
|
1792
|
+
cache: (0, import_join_paths.joinPaths)(process.env.XDG_CACHE_HOME || (0, import_join_paths.joinPaths)(homedir, ".cache"), orgId),
|
|
1704
1793
|
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
1705
|
-
log: joinPaths(process.env.XDG_STATE_HOME || joinPaths(homedir, ".local", "state"), orgId),
|
|
1794
|
+
log: (0, import_join_paths.joinPaths)(process.env.XDG_STATE_HOME || (0, import_join_paths.joinPaths)(homedir, ".local", "state"), orgId),
|
|
1706
1795
|
// https://devenv.sh/files-and-variables/#devenv_root
|
|
1707
|
-
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)
|
|
1796
|
+
temp: process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR ? (0, import_join_paths.joinPaths)(process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR, orgId) : (0, import_join_paths.joinPaths)(tmpdir, username, orgId)
|
|
1708
1797
|
};
|
|
1709
1798
|
}, "linux");
|
|
1710
1799
|
function getEnvPaths(options = {}) {
|
|
@@ -1735,17 +1824,17 @@ function getEnvPaths(options = {}) {
|
|
|
1735
1824
|
result.temp = process.env.STORM_TEMP_DIR;
|
|
1736
1825
|
}
|
|
1737
1826
|
if (options.workspaceRoot) {
|
|
1738
|
-
result.cache ??= joinPaths(options.workspaceRoot, "node_modules", ".cache", orgId);
|
|
1739
|
-
result.temp ??= joinPaths(options.workspaceRoot, "tmp", orgId);
|
|
1740
|
-
result.log ??= joinPaths(result.temp, "logs");
|
|
1741
|
-
result.config ??= joinPaths(options.workspaceRoot, ".config", orgId);
|
|
1827
|
+
result.cache ??= (0, import_join_paths.joinPaths)(options.workspaceRoot, "node_modules", ".cache", orgId);
|
|
1828
|
+
result.temp ??= (0, import_join_paths.joinPaths)(options.workspaceRoot, "tmp", orgId);
|
|
1829
|
+
result.log ??= (0, import_join_paths.joinPaths)(result.temp, "logs");
|
|
1830
|
+
result.config ??= (0, import_join_paths.joinPaths)(options.workspaceRoot, ".config", orgId);
|
|
1742
1831
|
}
|
|
1743
1832
|
return Object.keys(result).reduce((ret, key) => {
|
|
1744
1833
|
if (result[key]) {
|
|
1745
1834
|
const filePath = result[key];
|
|
1746
|
-
ret[key] = options.appId && options.appId !== options.orgId && options.appId !== options.nestedDir ? joinPaths(filePath, options.appId) : filePath;
|
|
1835
|
+
ret[key] = options.appId && options.appId !== options.orgId && options.appId !== options.nestedDir ? (0, import_join_paths.joinPaths)(filePath, options.appId) : filePath;
|
|
1747
1836
|
if (options.nestedDir && options.nestedDir !== options.orgId && options.nestedDir !== options.appId) {
|
|
1748
|
-
ret[key] = joinPaths(ret[key], options.nestedDir);
|
|
1837
|
+
ret[key] = (0, import_join_paths.joinPaths)(ret[key], options.nestedDir);
|
|
1749
1838
|
}
|
|
1750
1839
|
}
|
|
1751
1840
|
return ret;
|
|
@@ -1754,13 +1843,15 @@ function getEnvPaths(options = {}) {
|
|
|
1754
1843
|
__name(getEnvPaths, "getEnvPaths");
|
|
1755
1844
|
|
|
1756
1845
|
// src/utils/get-jiti.ts
|
|
1846
|
+
var import_get_workspace_root = require("@stryke/fs/get-workspace-root");
|
|
1847
|
+
var import_join_paths2 = require("@stryke/path/join-paths");
|
|
1757
1848
|
var import_jiti = require("jiti");
|
|
1758
1849
|
var jiti;
|
|
1759
1850
|
function getJiti() {
|
|
1760
1851
|
if (!jiti) {
|
|
1761
1852
|
const envPaths = getEnvPaths();
|
|
1762
|
-
jiti = (0, import_jiti.createJiti)(getWorkspaceRoot(), {
|
|
1763
|
-
fsCache: joinPaths(envPaths.cache, "jiti"),
|
|
1853
|
+
jiti = (0, import_jiti.createJiti)((0, import_get_workspace_root.getWorkspaceRoot)(), {
|
|
1854
|
+
fsCache: (0, import_join_paths2.joinPaths)(envPaths.cache, "jiti"),
|
|
1764
1855
|
interopDefault: true
|
|
1765
1856
|
});
|
|
1766
1857
|
}
|
|
@@ -1780,7 +1871,7 @@ __name(getPrismaGeneratorHelper, "getPrismaGeneratorHelper");
|
|
|
1780
1871
|
|
|
1781
1872
|
// src/zod/model-helpers.ts
|
|
1782
1873
|
init_cjs_shims();
|
|
1783
|
-
var
|
|
1874
|
+
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
1784
1875
|
var import_ts_morph2 = require("ts-morph");
|
|
1785
1876
|
|
|
1786
1877
|
// src/zod/docs-helpers.ts
|
|
@@ -1890,7 +1981,7 @@ var writeImportsForModel = /* @__PURE__ */ __name(async (model, sourceFile, conf
|
|
|
1890
1981
|
importList.push({
|
|
1891
1982
|
kind: import_ts_morph2.StructureKind.ImportDeclaration,
|
|
1892
1983
|
namespaceImport: "imports",
|
|
1893
|
-
moduleSpecifier: dotSlash(
|
|
1984
|
+
moduleSpecifier: dotSlash(import_node_path2.default.relative(outputPath, import_node_path2.default.resolve(import_node_path2.default.dirname(options.schemaPath), config.imports)))
|
|
1894
1985
|
});
|
|
1895
1986
|
}
|
|
1896
1987
|
if (config.useDecimalJs && model.fields.some((f) => f.type === "Decimal")) {
|
|
@@ -1905,7 +1996,7 @@ var writeImportsForModel = /* @__PURE__ */ __name(async (model, sourceFile, conf
|
|
|
1905
1996
|
const enumFields = model.fields.filter((f) => f.kind === "enum");
|
|
1906
1997
|
const relationFields = model.fields.filter((f) => f.kind === "object");
|
|
1907
1998
|
const clientPath = options.otherGenerators.find((each) => each.provider.value === "prisma-client-js").output.value;
|
|
1908
|
-
const relativePath2 =
|
|
1999
|
+
const relativePath2 = import_node_path2.default.relative(outputPath, clientPath);
|
|
1909
2000
|
if (enumFields.length > 0) {
|
|
1910
2001
|
importList.push({
|
|
1911
2002
|
kind: import_ts_morph2.StructureKind.ImportDeclaration,
|
|
@@ -2121,7 +2212,7 @@ var generateRouterImport = /* @__PURE__ */ __name((sourceFile, modelNamePlural,
|
|
|
2121
2212
|
async function generateTRPCExports(sourceFile, config, options, outputDir) {
|
|
2122
2213
|
if (config.withShield) {
|
|
2123
2214
|
sourceFile.addImportDeclaration({
|
|
2124
|
-
moduleSpecifier: relativePath(outputDir, joinPaths(outputDir, typeof config.withShield === "string" ? config.withShield : "shield")),
|
|
2215
|
+
moduleSpecifier: (0, import_file_path_fns.relativePath)(outputDir, (0, import_join_paths3.joinPaths)(outputDir, typeof config.withShield === "string" ? config.withShield : "shield")),
|
|
2125
2216
|
namedImports: [
|
|
2126
2217
|
"permissions"
|
|
2127
2218
|
]
|
|
@@ -2129,18 +2220,18 @@ async function generateTRPCExports(sourceFile, config, options, outputDir) {
|
|
|
2129
2220
|
}
|
|
2130
2221
|
sourceFile.addStatements(
|
|
2131
2222
|
/* ts */
|
|
2132
|
-
`import type { Context } from '${relativePath(outputDir, joinPaths(outputDir, config.contextPath))}';`
|
|
2223
|
+
`import type { Context } from '${(0, import_file_path_fns.relativePath)(outputDir, (0, import_join_paths3.joinPaths)(outputDir, config.contextPath))}';`
|
|
2133
2224
|
);
|
|
2134
2225
|
if (config.trpcOptions) {
|
|
2135
2226
|
sourceFile.addStatements(
|
|
2136
2227
|
/* ts */
|
|
2137
|
-
`import trpcOptions from '${typeof config.trpcOptions === "string" ? relativePath(outputDir, joinPaths(outputDir, config.trpcOptions)) : "./options"}';`
|
|
2228
|
+
`import trpcOptions from '${typeof config.trpcOptions === "string" ? (0, import_file_path_fns.relativePath)(outputDir, (0, import_join_paths3.joinPaths)(outputDir, config.trpcOptions)) : "./options"}';`
|
|
2138
2229
|
);
|
|
2139
2230
|
}
|
|
2140
2231
|
if (config.withNext) {
|
|
2141
2232
|
sourceFile.addStatements(
|
|
2142
2233
|
/* ts */
|
|
2143
|
-
`import { createContext } from '${relativePath(outputDir, joinPaths(outputDir, config.contextPath))}';
|
|
2234
|
+
`import { createContext } from '${(0, import_file_path_fns.relativePath)(outputDir, (0, import_join_paths3.joinPaths)(outputDir, config.contextPath))}';
|
|
2144
2235
|
import { initTRPC } from '@trpc/server';
|
|
2145
2236
|
import { createTRPCServerActionHandler } from '@stryke/trpc-next/action-handler';
|
|
2146
2237
|
import { cookies } from "next/headers";`
|
|
@@ -2173,7 +2264,7 @@ export const globalMiddleware = t.middleware(async ({ ctx, next }) => {
|
|
|
2173
2264
|
sourceFile.addStatements(
|
|
2174
2265
|
/* ts */
|
|
2175
2266
|
`
|
|
2176
|
-
import middleware from '${relativePath(outputDir, joinPaths(outputDir, typeof config.withMiddleware === "string" ? config.withMiddleware : "middleware"))}';
|
|
2267
|
+
import middleware from '${(0, import_file_path_fns.relativePath)(outputDir, (0, import_join_paths3.joinPaths)(outputDir, typeof config.withMiddleware === "string" ? config.withMiddleware : "middleware"))}';
|
|
2177
2268
|
`
|
|
2178
2269
|
);
|
|
2179
2270
|
sourceFile.addStatements(
|
|
@@ -2453,7 +2544,7 @@ var constructShield = /* @__PURE__ */ __name(async ({ queries, mutations, subscr
|
|
|
2453
2544
|
return "";
|
|
2454
2545
|
}
|
|
2455
2546
|
let shieldText = getImports("trpc-shield");
|
|
2456
|
-
shieldText += getImports("context", relativePath(outputDir, joinPaths(outputDir, config.contextPath)));
|
|
2547
|
+
shieldText += getImports("context", (0, import_file_path_fns.relativePath)(outputDir, (0, import_join_paths3.joinPaths)(outputDir, config.contextPath)));
|
|
2457
2548
|
shieldText += "\n\n";
|
|
2458
2549
|
shieldText += wrapWithExport({
|
|
2459
2550
|
shieldObjectText: wrapWithTrpcShieldCall({
|
|
@@ -2470,7 +2561,7 @@ import type {
|
|
|
2470
2561
|
DataTransformerOptions,
|
|
2471
2562
|
RootConfig
|
|
2472
2563
|
} from "@trpc/server/unstable-core-do-not-import";
|
|
2473
|
-
import type { Context } from "${relativePath(outputDir, joinPaths(outputDir, config.contextPath))}";
|
|
2564
|
+
import type { Context } from "${(0, import_file_path_fns.relativePath)(outputDir, (0, import_join_paths3.joinPaths)(outputDir, config.contextPath))}";
|
|
2474
2565
|
|
|
2475
2566
|
interface RuntimeConfigOptions<
|
|
2476
2567
|
TContext extends object,
|
|
@@ -2532,27 +2623,11 @@ var constructZodModels = /* @__PURE__ */ __name(async (models, outputPath, confi
|
|
|
2532
2623
|
|
|
2533
2624
|
// src/utils/write-file-safely.ts
|
|
2534
2625
|
init_cjs_shims();
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
var
|
|
2539
|
-
var
|
|
2540
|
-
if (!filePath) {
|
|
2541
|
-
throw new Error("No file path provided to read data");
|
|
2542
|
-
}
|
|
2543
|
-
const directory = findFilePath(correctPath(filePath));
|
|
2544
|
-
if (!existsSync(directory)) {
|
|
2545
|
-
if (options.createDirectory !== false) {
|
|
2546
|
-
await createDirectory(directory);
|
|
2547
|
-
} else {
|
|
2548
|
-
throw new Error(`Directory ${directory} does not exist`);
|
|
2549
|
-
}
|
|
2550
|
-
}
|
|
2551
|
-
return (0, import_promises3.writeFile)(filePath, content || "", options);
|
|
2552
|
-
}, "writeFile");
|
|
2553
|
-
|
|
2554
|
-
// src/utils/write-file-safely.ts
|
|
2555
|
-
var import_node_path5 = __toESM(require("node:path"), 1);
|
|
2626
|
+
var import_helpers = require("@stryke/fs/helpers");
|
|
2627
|
+
var import_write_file = require("@stryke/fs/write-file");
|
|
2628
|
+
var import_correct_path = require("@stryke/path/correct-path");
|
|
2629
|
+
var import_file_path_fns2 = require("@stryke/path/file-path-fns");
|
|
2630
|
+
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
2556
2631
|
|
|
2557
2632
|
// src/utils/format-file.ts
|
|
2558
2633
|
init_cjs_shims();
|
|
@@ -2587,20 +2662,20 @@ var addIndexExport = /* @__PURE__ */ __name((filePath) => {
|
|
|
2587
2662
|
var writeFileSafely = /* @__PURE__ */ __name(async (writeLocation, content, addToIndex = true) => {
|
|
2588
2663
|
const [fileContent] = await Promise.all([
|
|
2589
2664
|
formatFile(content),
|
|
2590
|
-
createDirectory(findFilePath(writeLocation))
|
|
2665
|
+
(0, import_helpers.createDirectory)((0, import_file_path_fns2.findFilePath)(writeLocation))
|
|
2591
2666
|
]);
|
|
2592
|
-
await writeFile(writeLocation, fileContent);
|
|
2667
|
+
await (0, import_write_file.writeFile)(writeLocation, fileContent);
|
|
2593
2668
|
if (addToIndex) {
|
|
2594
2669
|
addIndexExport(writeLocation);
|
|
2595
2670
|
}
|
|
2596
2671
|
}, "writeFileSafely");
|
|
2597
2672
|
var writeIndexFile = /* @__PURE__ */ __name(async (indexPath) => {
|
|
2598
2673
|
const rows = Array.from(indexExports).map((filePath) => {
|
|
2599
|
-
let relativePath2 =
|
|
2674
|
+
let relativePath2 = import_node_path3.default.relative(import_node_path3.default.dirname(indexPath), filePath);
|
|
2600
2675
|
if (relativePath2.endsWith(".ts")) {
|
|
2601
2676
|
relativePath2 = relativePath2.slice(0, relativePath2.lastIndexOf(".ts"));
|
|
2602
2677
|
}
|
|
2603
|
-
const normalized = correctPath(relativePath2);
|
|
2678
|
+
const normalized = (0, import_correct_path.correctPath)(relativePath2);
|
|
2604
2679
|
return `export * from './${normalized}';`;
|
|
2605
2680
|
});
|
|
2606
2681
|
rows.push("export * from './models';");
|
|
@@ -2774,7 +2849,7 @@ init_cjs_shims();
|
|
|
2774
2849
|
|
|
2775
2850
|
// src/zod/transformer.ts
|
|
2776
2851
|
init_cjs_shims();
|
|
2777
|
-
var
|
|
2852
|
+
var import_node_path4 = __toESM(require("node:path"), 1);
|
|
2778
2853
|
|
|
2779
2854
|
// src/zod/mongodb-helpers.ts
|
|
2780
2855
|
init_cjs_shims();
|
|
@@ -2884,13 +2959,13 @@ var Transformer = class _Transformer {
|
|
|
2884
2959
|
this.isCustomPrismaClientOutputPath = prismaClientCustomPath !== "@prisma/client";
|
|
2885
2960
|
}
|
|
2886
2961
|
static async generateIndex() {
|
|
2887
|
-
const indexPath =
|
|
2962
|
+
const indexPath = import_node_path4.default.join(_Transformer.outputPath, "schemas/index.ts");
|
|
2888
2963
|
await writeIndexFile(indexPath);
|
|
2889
2964
|
}
|
|
2890
2965
|
async generateEnumSchemas() {
|
|
2891
2966
|
for (const enumType of this.enumTypes) {
|
|
2892
2967
|
const { name, values } = enumType;
|
|
2893
|
-
await writeFileSafely(
|
|
2968
|
+
await writeFileSafely(import_node_path4.default.join(_Transformer.outputPath, `schemas/enums/${lowerCaseFirst(name)}.schema.ts`), `${this.generateImportZodStatement()}
|
|
2894
2969
|
${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.stringify(values)})`)}`);
|
|
2895
2970
|
}
|
|
2896
2971
|
}
|
|
@@ -2904,7 +2979,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
2904
2979
|
const zodObjectSchemaFields = this.generateObjectSchemaFields();
|
|
2905
2980
|
const objectSchema = this.prepareObjectSchema(zodObjectSchemaFields);
|
|
2906
2981
|
const objectSchemaName = this.resolveObjectSchemaName();
|
|
2907
|
-
await writeFileSafely(
|
|
2982
|
+
await writeFileSafely(import_node_path4.default.join(_Transformer.outputPath, `schemas/objects/${lowerCaseFirst(objectSchemaName)}.schema.ts`), objectSchema);
|
|
2908
2983
|
}
|
|
2909
2984
|
generateObjectSchemaFields() {
|
|
2910
2985
|
const zodObjectSchemaFields = this.fields.map((field) => this.generateObjectSchemaField(field)).flatMap((item) => item).map((item) => {
|
|
@@ -3038,9 +3113,9 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
3038
3113
|
generateImportPrismaStatement() {
|
|
3039
3114
|
let prismaClientImportPath;
|
|
3040
3115
|
if (_Transformer.isCustomPrismaClientOutputPath) {
|
|
3041
|
-
const fromPath =
|
|
3116
|
+
const fromPath = import_node_path4.default.join(_Transformer.outputPath, "schemas", "objects");
|
|
3042
3117
|
const toPath = _Transformer.prismaClientOutputPath;
|
|
3043
|
-
const relativePathFromOutputToPrismaClient =
|
|
3118
|
+
const relativePathFromOutputToPrismaClient = import_node_path4.default.relative(fromPath, toPath).split(import_node_path4.default.sep).join(import_node_path4.default.posix.sep);
|
|
3044
3119
|
prismaClientImportPath = relativePathFromOutputToPrismaClient;
|
|
3045
3120
|
} else {
|
|
3046
3121
|
prismaClientImportPath = _Transformer.prismaClientOutputPath;
|
|
@@ -3170,7 +3245,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
3170
3245
|
includeImport,
|
|
3171
3246
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
|
|
3172
3247
|
];
|
|
3173
|
-
await writeFileSafely(
|
|
3248
|
+
await writeFileSafely(import_node_path4.default.join(_Transformer.outputPath, `schemas/${findUnique}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}FindUnique`, `z.object({ ${selectZodSchemaLine} ${includeZodSchemaLine} where: ${modelName}WhereUniqueInputObjectSchema })`)}`);
|
|
3174
3249
|
}
|
|
3175
3250
|
if (findFirst) {
|
|
3176
3251
|
const imports = [
|
|
@@ -3181,7 +3256,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
3181
3256
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`,
|
|
3182
3257
|
`import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
|
|
3183
3258
|
];
|
|
3184
|
-
await writeFileSafely(
|
|
3259
|
+
await writeFileSafely(import_node_path4.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() })`)}`);
|
|
3185
3260
|
}
|
|
3186
3261
|
if (findMany) {
|
|
3187
3262
|
const imports = [
|
|
@@ -3192,7 +3267,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
3192
3267
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`,
|
|
3193
3268
|
`import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
|
|
3194
3269
|
];
|
|
3195
|
-
await writeFileSafely(
|
|
3270
|
+
await writeFileSafely(import_node_path4.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() })`)}`);
|
|
3196
3271
|
}
|
|
3197
3272
|
if (createOne) {
|
|
3198
3273
|
const imports = [
|
|
@@ -3201,19 +3276,19 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
3201
3276
|
`import { ${modelName}CreateInputObjectSchema } from './objects/${modelName}CreateInput.schema'`,
|
|
3202
3277
|
`import { ${modelName}UncheckedCreateInputObjectSchema } from './objects/${modelName}UncheckedCreateInput.schema'`
|
|
3203
3278
|
];
|
|
3204
|
-
await writeFileSafely(
|
|
3279
|
+
await writeFileSafely(import_node_path4.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]) })`)}`);
|
|
3205
3280
|
}
|
|
3206
3281
|
if (createMany) {
|
|
3207
3282
|
const imports = [
|
|
3208
3283
|
`import { ${modelName}CreateManyInputObjectSchema } from './objects/${modelName}CreateManyInput.schema'`
|
|
3209
3284
|
];
|
|
3210
|
-
await writeFileSafely(
|
|
3285
|
+
await writeFileSafely(import_node_path4.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()"} })`)}`);
|
|
3211
3286
|
}
|
|
3212
3287
|
if (createManyAndReturn) {
|
|
3213
3288
|
const imports = [
|
|
3214
3289
|
`import { ${modelName}CreateManyAndReturnInputObjectSchema } from './objects/${modelName}CreateManyAndReturnInput.schema'`
|
|
3215
3290
|
];
|
|
3216
|
-
await writeFileSafely(
|
|
3291
|
+
await writeFileSafely(import_node_path4.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()"} })`)}`);
|
|
3217
3292
|
}
|
|
3218
3293
|
if (deleteOne) {
|
|
3219
3294
|
const imports = [
|
|
@@ -3221,13 +3296,13 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
3221
3296
|
includeImport,
|
|
3222
3297
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
|
|
3223
3298
|
];
|
|
3224
|
-
await writeFileSafely(
|
|
3299
|
+
await writeFileSafely(import_node_path4.default.join(_Transformer.outputPath, `schemas/${deleteOne}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}DeleteOne`, `z.object({ ${selectZodSchemaLine} ${includeZodSchemaLine} where: ${modelName}WhereUniqueInputObjectSchema })`)}`);
|
|
3225
3300
|
}
|
|
3226
3301
|
if (deleteMany) {
|
|
3227
3302
|
const imports = [
|
|
3228
3303
|
`import { ${modelName}WhereInputObjectSchema } from './objects/${modelName}WhereInput.schema'`
|
|
3229
3304
|
];
|
|
3230
|
-
await writeFileSafely(
|
|
3305
|
+
await writeFileSafely(import_node_path4.default.join(_Transformer.outputPath, `schemas/${deleteMany}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}DeleteMany`, `z.object({ where: ${modelName}WhereInputObjectSchema.optional() })`)}`);
|
|
3231
3306
|
}
|
|
3232
3307
|
if (updateOne) {
|
|
3233
3308
|
const imports = [
|
|
@@ -3237,20 +3312,20 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
3237
3312
|
`import { ${modelName}UncheckedUpdateInputObjectSchema } from './objects/${modelName}UncheckedUpdateInput.schema'`,
|
|
3238
3313
|
`import { ${modelName}WhereUniqueInputObjectSchema } from './objects/${modelName}WhereUniqueInput.schema'`
|
|
3239
3314
|
];
|
|
3240
|
-
await writeFileSafely(
|
|
3315
|
+
await writeFileSafely(import_node_path4.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 })`)}`);
|
|
3241
3316
|
}
|
|
3242
3317
|
if (updateMany) {
|
|
3243
3318
|
const imports = [
|
|
3244
3319
|
`import { ${modelName}UpdateManyMutationInputObjectSchema } from './objects/${modelName}UpdateManyMutationInput.schema'`,
|
|
3245
3320
|
`import { ${modelName}WhereInputObjectSchema } from './objects/${modelName}WhereInput.schema'`
|
|
3246
3321
|
];
|
|
3247
|
-
await writeFileSafely(
|
|
3322
|
+
await writeFileSafely(import_node_path4.default.join(_Transformer.outputPath, `schemas/${updateMany}.schema.ts`), `${this.generateImportStatements(imports)}${this.generateExportSchemaStatement(`${modelName}UpdateMany`, `z.object({ data: ${modelName}UpdateManyMutationInputObjectSchema, where: ${modelName}WhereInputObjectSchema.optional() })`)}`);
|
|
3248
3323
|
}
|
|
3249
3324
|
if (updateManyAndReturn) {
|
|
3250
3325
|
const imports = [
|
|
3251
3326
|
`import { ${modelName}UpdateManyAndReturnInputObjectSchema } from './objects/${modelName}UpdateManyAndReturnInput.schema'`
|
|
3252
3327
|
];
|
|
3253
|
-
await writeFileSafely(
|
|
3328
|
+
await writeFileSafely(import_node_path4.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()"} })`)}`);
|
|
3254
3329
|
}
|
|
3255
3330
|
if (upsertOne) {
|
|
3256
3331
|
const imports = [
|
|
@@ -3262,7 +3337,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
3262
3337
|
`import { ${modelName}UpdateInputObjectSchema } from './objects/${modelName}UpdateInput.schema'`,
|
|
3263
3338
|
`import { ${modelName}UncheckedUpdateInputObjectSchema } from './objects/${modelName}UncheckedUpdateInput.schema'`
|
|
3264
3339
|
];
|
|
3265
|
-
await writeFileSafely(
|
|
3340
|
+
await writeFileSafely(import_node_path4.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 ]) })`)}`);
|
|
3266
3341
|
}
|
|
3267
3342
|
if (aggregate) {
|
|
3268
3343
|
const imports = [
|
|
@@ -3293,7 +3368,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
3293
3368
|
aggregateOperations.push(`_sum: ${modelName}SumAggregateInputObjectSchema.optional()`);
|
|
3294
3369
|
}
|
|
3295
3370
|
}
|
|
3296
|
-
await writeFileSafely(
|
|
3371
|
+
await writeFileSafely(import_node_path4.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(", ")} })`)}`);
|
|
3297
3372
|
}
|
|
3298
3373
|
if (groupBy) {
|
|
3299
3374
|
const imports = [
|
|
@@ -3302,7 +3377,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
3302
3377
|
`import { ${modelName}ScalarWhereWithAggregatesInputObjectSchema } from './objects/${modelName}ScalarWhereWithAggregatesInput.schema'`,
|
|
3303
3378
|
`import { ${modelName}ScalarFieldEnumSchema } from './enums/${modelName}ScalarFieldEnum.schema'`
|
|
3304
3379
|
];
|
|
3305
|
-
await writeFileSafely(
|
|
3380
|
+
await writeFileSafely(import_node_path4.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) })`)}`);
|
|
3306
3381
|
}
|
|
3307
3382
|
}
|
|
3308
3383
|
}
|
|
@@ -3756,8 +3831,8 @@ async function generate(options) {
|
|
|
3756
3831
|
consoleLog(`Using configuration parameters:
|
|
3757
3832
|
${JSON.stringify(config)}`);
|
|
3758
3833
|
consoleLog(`Preparing output directory: ${outputDir}`);
|
|
3759
|
-
await removeDirectory(outputDir);
|
|
3760
|
-
await createDirectory(outputDir);
|
|
3834
|
+
await (0, import_helpers2.removeDirectory)(outputDir);
|
|
3835
|
+
await (0, import_helpers2.createDirectory)(outputDir);
|
|
3761
3836
|
consoleLog("Finding Prisma Client generator");
|
|
3762
3837
|
const prismaClientProvider = options.otherGenerators.find((it) => internals.parseEnvValue(it.provider) === "prisma-client-js");
|
|
3763
3838
|
if (!prismaClientProvider) {
|
|
@@ -3778,12 +3853,12 @@ ${JSON.stringify(config)}`);
|
|
|
3778
3853
|
if (config.withZod !== false) {
|
|
3779
3854
|
consoleLog("Generating Zod schemas");
|
|
3780
3855
|
const zodOutputPath = internals.parseEnvValue(options.generator.output);
|
|
3781
|
-
await createDirectory(zodOutputPath);
|
|
3856
|
+
await (0, import_helpers2.createDirectory)(zodOutputPath);
|
|
3782
3857
|
Transformer.setOutputPath(zodOutputPath);
|
|
3783
3858
|
if (prismaClientProvider?.isCustomOutput) {
|
|
3784
3859
|
Transformer.setPrismaClientOutputPath(prismaClientProvider.output?.value);
|
|
3785
3860
|
}
|
|
3786
|
-
await constructZodModels(models, joinPaths(zodOutputPath, "schemas", "models"), config, options);
|
|
3861
|
+
await constructZodModels(models, (0, import_join_paths4.joinPaths)(zodOutputPath, "schemas", "models"), config, options);
|
|
3787
3862
|
resolveZodModelsComments(models, modelOperations, enumTypes, hiddenModels, hiddenFields);
|
|
3788
3863
|
await generateZodEnumSchemas(enumTypes.prisma, enumTypes.model);
|
|
3789
3864
|
const dataSource = options.datasources?.[0];
|
|
@@ -3843,9 +3918,9 @@ ${JSON.stringify(config)}`);
|
|
|
3843
3918
|
queries.sort();
|
|
3844
3919
|
mutations.sort();
|
|
3845
3920
|
subscriptions.sort();
|
|
3846
|
-
if (config.withShield && !(typeof config.withShield === "string" && (existsSync(joinPaths(outputDir, config.withShield)) || existsSync(joinPaths(outputDir, `./${config.withShield}.ts`)) || existsSync(joinPaths(outputDir, config.withShield, "./shield.ts"))))) {
|
|
3921
|
+
if (config.withShield && !(typeof config.withShield === "string" && ((0, import_exists.existsSync)((0, import_join_paths4.joinPaths)(outputDir, config.withShield)) || (0, import_exists.existsSync)((0, import_join_paths4.joinPaths)(outputDir, `./${config.withShield}.ts`)) || (0, import_exists.existsSync)((0, import_join_paths4.joinPaths)(outputDir, config.withShield, "./shield.ts"))))) {
|
|
3847
3922
|
consoleLog(`Generating tRPC Shield source file to ${outputDir}`);
|
|
3848
|
-
await writeFileSafely(joinPaths(outputDir, "./shield.ts"), await constructShield({
|
|
3923
|
+
await writeFileSafely((0, import_join_paths4.joinPaths)(outputDir, "./shield.ts"), await constructShield({
|
|
3849
3924
|
queries,
|
|
3850
3925
|
mutations,
|
|
3851
3926
|
subscriptions
|
|
@@ -3856,16 +3931,16 @@ ${JSON.stringify(config)}`);
|
|
|
3856
3931
|
consoleLog(`Generating tRPC source code for ${models.length} models`);
|
|
3857
3932
|
if (config.trpcOptions && typeof config.trpcOptions === "boolean") {
|
|
3858
3933
|
consoleLog(`Generating tRPC options source file to ${outputDir}`);
|
|
3859
|
-
await writeFileSafely(joinPaths(outputDir, "./options.ts"), constructDefaultOptions(config, options, outputDir));
|
|
3934
|
+
await writeFileSafely((0, import_join_paths4.joinPaths)(outputDir, "./options.ts"), constructDefaultOptions(config, options, outputDir));
|
|
3860
3935
|
}
|
|
3861
3936
|
resolveModelsComments(models, hiddenModels);
|
|
3862
3937
|
consoleLog("Generating tRPC export file");
|
|
3863
|
-
const trpcExports = project.createSourceFile(
|
|
3938
|
+
const trpcExports = project.createSourceFile(import_node_path5.default.resolve(outputDir, "trpc.ts"), void 0, {
|
|
3864
3939
|
overwrite: true
|
|
3865
3940
|
});
|
|
3866
3941
|
await generateTRPCExports(trpcExports, config, options, outputDir);
|
|
3867
3942
|
consoleLog("Generating tRPC app router");
|
|
3868
|
-
const appRouter = project.createSourceFile(
|
|
3943
|
+
const appRouter = project.createSourceFile(import_node_path5.default.resolve(outputDir, "routers", `index.ts`), void 0, {
|
|
3869
3944
|
overwrite: true
|
|
3870
3945
|
});
|
|
3871
3946
|
consoleLog("Generating tRPC router imports");
|
|
@@ -3894,7 +3969,7 @@ ${JSON.stringify(config)}`);
|
|
|
3894
3969
|
const plural = (0, import_pluralize.default)(lowerCaseFirst(model));
|
|
3895
3970
|
consoleLog(`Generating tRPC router for model ${model}`);
|
|
3896
3971
|
generateRouterImport(appRouter, plural, model);
|
|
3897
|
-
const modelRouter = project.createSourceFile(
|
|
3972
|
+
const modelRouter = project.createSourceFile(import_node_path5.default.resolve(outputDir, "routers", `${lowerCaseFirst(model)}.router.ts`), void 0, {
|
|
3898
3973
|
overwrite: true
|
|
3899
3974
|
});
|
|
3900
3975
|
generateCreateRouterImport({
|