keycloakify 10.0.0-rc.10 → 10.0.0-rc.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/bin/246.index.js +466 -0
  2. package/bin/420.index.js +508 -0
  3. package/bin/509.index.js +438 -0
  4. package/bin/772.index.js +1524 -0
  5. package/bin/copy-keycloak-resources-to-public.d.ts +4 -0
  6. package/bin/copy-keycloak-resources-to-public.js +72 -0
  7. package/bin/copy-keycloak-resources-to-public.js.map +1 -0
  8. package/bin/download-builtin-keycloak-theme.d.ts +4 -0
  9. package/bin/download-builtin-keycloak-theme.js +76 -0
  10. package/bin/download-builtin-keycloak-theme.js.map +1 -0
  11. package/bin/eject-keycloak-page.d.ts +5 -0
  12. package/bin/eject-keycloak-page.js +201 -0
  13. package/bin/eject-keycloak-page.js.map +1 -0
  14. package/bin/initialize-email-theme.d.ts +4 -0
  15. package/bin/initialize-email-theme.js +121 -0
  16. package/bin/initialize-email-theme.js.map +1 -0
  17. package/bin/keycloakify/buildJars/buildJar.d.ts +15 -0
  18. package/bin/keycloakify/buildJars/buildJar.js +213 -0
  19. package/bin/keycloakify/buildJars/buildJar.js.map +1 -0
  20. package/bin/keycloakify/buildJars/buildJars.d.ts +7 -0
  21. package/bin/keycloakify/buildJars/buildJars.js +104 -0
  22. package/bin/keycloakify/buildJars/buildJars.js.map +1 -0
  23. package/bin/keycloakify/buildJars/extensionVersions.d.ts +12 -0
  24. package/bin/keycloakify/buildJars/extensionVersions.js +7 -0
  25. package/bin/keycloakify/buildJars/extensionVersions.js.map +1 -0
  26. package/bin/keycloakify/buildJars/generatePom.d.ts +13 -0
  27. package/bin/keycloakify/buildJars/generatePom.js +95 -0
  28. package/bin/keycloakify/buildJars/generatePom.js.map +1 -0
  29. package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.d.ts +7 -0
  30. package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.js +57 -0
  31. package/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.js.map +1 -0
  32. package/bin/keycloakify/buildJars/index.d.ts +1 -0
  33. package/bin/keycloakify/buildJars/index.js +18 -0
  34. package/bin/keycloakify/buildJars/index.js.map +1 -0
  35. package/bin/keycloakify/generateFtl/generateFtl.d.ts +23 -0
  36. package/bin/keycloakify/generateFtl/generateFtl.js +170 -0
  37. package/bin/keycloakify/generateFtl/generateFtl.js.map +1 -0
  38. package/bin/keycloakify/generateFtl/index.d.ts +1 -0
  39. package/bin/keycloakify/generateFtl/index.js +18 -0
  40. package/bin/keycloakify/generateFtl/index.js.map +1 -0
  41. package/bin/keycloakify/generateSrcMainResources/bringInAccountV1.d.ts +9 -0
  42. package/bin/keycloakify/generateSrcMainResources/bringInAccountV1.js +153 -0
  43. package/bin/keycloakify/generateSrcMainResources/bringInAccountV1.js.map +1 -0
  44. package/bin/keycloakify/generateSrcMainResources/generateMessageProperties.d.ts +8 -0
  45. package/bin/keycloakify/generateSrcMainResources/generateMessageProperties.js +271 -0
  46. package/bin/keycloakify/generateSrcMainResources/generateMessageProperties.js.map +1 -0
  47. package/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.d.ts +7 -0
  48. package/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.js +109 -0
  49. package/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.js.map +1 -0
  50. package/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForMainTheme.d.ts +17 -0
  51. package/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForMainTheme.js +341 -0
  52. package/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForMainTheme.js.map +1 -0
  53. package/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.d.ts +8 -0
  54. package/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.js +47 -0
  55. package/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.js.map +1 -0
  56. package/bin/keycloakify/generateSrcMainResources/index.d.ts +1 -0
  57. package/bin/keycloakify/generateSrcMainResources/index.js +18 -0
  58. package/bin/keycloakify/generateSrcMainResources/index.js.map +1 -0
  59. package/bin/keycloakify/generateSrcMainResources/readExtraPageNames.d.ts +5 -0
  60. package/bin/keycloakify/generateSrcMainResources/readExtraPageNames.js +105 -0
  61. package/bin/keycloakify/generateSrcMainResources/readExtraPageNames.js.map +1 -0
  62. package/bin/keycloakify/generateSrcMainResources/readFieldNameUsage.d.ts +6 -0
  63. package/bin/keycloakify/generateSrcMainResources/readFieldNameUsage.js +142 -0
  64. package/bin/keycloakify/generateSrcMainResources/readFieldNameUsage.js.map +1 -0
  65. package/bin/keycloakify/generateStartKeycloakTestingContainer.d.ts +13 -0
  66. package/bin/keycloakify/generateStartKeycloakTestingContainer.js +86 -0
  67. package/bin/keycloakify/generateStartKeycloakTestingContainer.js.map +1 -0
  68. package/bin/keycloakify/index.d.ts +1 -0
  69. package/bin/keycloakify/index.js +18 -0
  70. package/bin/keycloakify/index.js.map +1 -0
  71. package/bin/keycloakify/keycloakify.d.ts +4 -0
  72. package/bin/keycloakify/keycloakify.js +152 -0
  73. package/bin/keycloakify/keycloakify.js.map +1 -0
  74. package/bin/keycloakify/replacers/replaceImportsInCssCode.d.ts +15 -0
  75. package/bin/keycloakify/replacers/replaceImportsInCssCode.js +88 -0
  76. package/bin/keycloakify/replacers/replaceImportsInCssCode.js.map +1 -0
  77. package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.d.ts +9 -0
  78. package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.js +38 -0
  79. package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.js.map +1 -0
  80. package/bin/keycloakify/replacers/replaceImportsInJsCode/index.d.ts +1 -0
  81. package/bin/keycloakify/replacers/replaceImportsInJsCode/index.js +18 -0
  82. package/bin/keycloakify/replacers/replaceImportsInJsCode/index.js.map +1 -0
  83. package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.d.ts +12 -0
  84. package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.js +70 -0
  85. package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.js.map +1 -0
  86. package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.d.ts +13 -0
  87. package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.js +95 -0
  88. package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.js.map +1 -0
  89. package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.d.ts +12 -0
  90. package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.js +103 -0
  91. package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.js.map +1 -0
  92. package/bin/main.d.ts +4 -0
  93. package/bin/main.js +9332 -6975
  94. package/bin/main.js.map +1 -0
  95. package/bin/main.original.js +287 -0
  96. package/bin/shared/KeycloakVersionRange.d.ts +5 -0
  97. package/bin/shared/KeycloakVersionRange.js +3 -0
  98. package/bin/shared/KeycloakVersionRange.js.map +1 -0
  99. package/bin/shared/buildOptions.d.ts +40 -0
  100. package/bin/shared/buildOptions.js +214 -0
  101. package/bin/shared/buildOptions.js.map +1 -0
  102. package/bin/shared/constants.d.ts +16 -0
  103. package/bin/shared/constants.js +60 -0
  104. package/bin/shared/constants.js.map +1 -0
  105. package/bin/shared/copyKeycloakResourcesToPublic.d.ts +8 -0
  106. package/bin/shared/copyKeycloakResourcesToPublic.js +177 -0
  107. package/bin/shared/copyKeycloakResourcesToPublic.js.map +1 -0
  108. package/bin/shared/downloadAndUnzip.d.ts +16 -0
  109. package/bin/shared/downloadAndUnzip.js +255 -0
  110. package/bin/shared/downloadAndUnzip.js.map +1 -0
  111. package/bin/shared/downloadBuiltinKeycloakTheme.d.ts +9 -0
  112. package/bin/shared/downloadBuiltinKeycloakTheme.js +316 -0
  113. package/bin/shared/downloadBuiltinKeycloakTheme.js.map +1 -0
  114. package/bin/shared/downloadKeycloakStaticResources.d.ts +11 -0
  115. package/bin/shared/downloadKeycloakStaticResources.js +102 -0
  116. package/bin/shared/downloadKeycloakStaticResources.js.map +1 -0
  117. package/bin/shared/getJarFileBasename.d.ts +6 -0
  118. package/bin/shared/getJarFileBasename.js +10 -0
  119. package/bin/shared/getJarFileBasename.js.map +1 -0
  120. package/bin/shared/getThemeSrcDirPath.d.ts +6 -0
  121. package/bin/shared/getThemeSrcDirPath.js +123 -0
  122. package/bin/shared/getThemeSrcDirPath.js.map +1 -0
  123. package/bin/shared/metaInfKeycloakThemes.d.ts +17 -0
  124. package/bin/shared/metaInfKeycloakThemes.js +51 -0
  125. package/bin/shared/metaInfKeycloakThemes.js.map +1 -0
  126. package/bin/shared/promptKeycloakVersion.d.ts +6 -0
  127. package/bin/shared/promptKeycloakVersion.js +159 -0
  128. package/bin/shared/promptKeycloakVersion.js.map +1 -0
  129. package/bin/start-keycloak.d.ts +8 -0
  130. package/bin/start-keycloak.js +287 -0
  131. package/bin/start-keycloak.js.map +1 -0
  132. package/bin/tools/OptionalIfCanBeUndefined.d.ts +14 -0
  133. package/bin/tools/OptionalIfCanBeUndefined.js +3 -0
  134. package/bin/tools/OptionalIfCanBeUndefined.js.map +1 -0
  135. package/bin/tools/SemVer.d.ts +26 -0
  136. package/bin/tools/SemVer.js +119 -0
  137. package/bin/tools/SemVer.js.map +1 -0
  138. package/bin/tools/String.prototype.replaceAll.d.ts +1 -0
  139. package/bin/tools/String.prototype.replaceAll.js +29 -0
  140. package/bin/tools/String.prototype.replaceAll.js.map +1 -0
  141. package/bin/tools/crawl.d.ts +5 -0
  142. package/bin/tools/crawl.js +74 -0
  143. package/bin/tools/crawl.js.map +1 -0
  144. package/bin/tools/crc32.d.ts +9 -0
  145. package/bin/tools/crc32.js +64 -0
  146. package/bin/tools/crc32.js.map +1 -0
  147. package/bin/tools/deflate.d.ts +24 -0
  148. package/bin/tools/deflate.js +164 -0
  149. package/bin/tools/deflate.js.map +1 -0
  150. package/bin/tools/fetchProxyOptions.d.ts +5 -0
  151. package/bin/tools/fetchProxyOptions.js +172 -0
  152. package/bin/tools/fetchProxyOptions.js.map +1 -0
  153. package/bin/tools/fs.existsAsync.d.ts +1 -0
  154. package/bin/tools/fs.existsAsync.js +86 -0
  155. package/bin/tools/fs.existsAsync.js.map +1 -0
  156. package/bin/tools/fs.rm.d.ts +8 -0
  157. package/bin/tools/fs.rm.js +151 -0
  158. package/bin/tools/fs.rm.js.map +1 -0
  159. package/bin/tools/fs.rmSync.d.ts +8 -0
  160. package/bin/tools/fs.rmSync.js +58 -0
  161. package/bin/tools/fs.rmSync.js.map +1 -0
  162. package/bin/tools/getAbsoluteAndInOsFormatPath.d.ts +4 -0
  163. package/bin/tools/getAbsoluteAndInOsFormatPath.js +44 -0
  164. package/bin/tools/getAbsoluteAndInOsFormatPath.js.map +1 -0
  165. package/bin/tools/getNpmWorkspaceRootDirPath.d.ts +5 -0
  166. package/bin/tools/getNpmWorkspaceRootDirPath.js +74 -0
  167. package/bin/tools/getNpmWorkspaceRootDirPath.js.map +1 -0
  168. package/bin/tools/getThisCodebaseRootDirPath.d.ts +1 -0
  169. package/bin/tools/getThisCodebaseRootDirPath.js +43 -0
  170. package/bin/tools/getThisCodebaseRootDirPath.js.map +1 -0
  171. package/bin/tools/isInside.d.ts +4 -0
  172. package/bin/tools/isInside.js +10 -0
  173. package/bin/tools/isInside.js.map +1 -0
  174. package/bin/tools/kebabCaseToSnakeCase.d.ts +1 -0
  175. package/bin/tools/kebabCaseToSnakeCase.js +35 -0
  176. package/bin/tools/kebabCaseToSnakeCase.js.map +1 -0
  177. package/bin/tools/octokit-addons/getLatestsSemVersionedTag.d.ts +14 -0
  178. package/bin/tools/octokit-addons/getLatestsSemVersionedTag.js +116 -0
  179. package/bin/tools/octokit-addons/getLatestsSemVersionedTag.js.map +1 -0
  180. package/bin/tools/octokit-addons/listTags.d.ts +13 -0
  181. package/bin/tools/octokit-addons/listTags.js +155 -0
  182. package/bin/tools/octokit-addons/listTags.js.map +1 -0
  183. package/bin/tools/partitionPromiseSettledResults.d.ts +2 -0
  184. package/bin/tools/partitionPromiseSettledResults.js +41 -0
  185. package/bin/tools/partitionPromiseSettledResults.js.map +1 -0
  186. package/bin/tools/readThisNpmPackageVersion.d.ts +1 -0
  187. package/bin/tools/readThisNpmPackageVersion.js +37 -0
  188. package/bin/tools/readThisNpmPackageVersion.js.map +1 -0
  189. package/bin/tools/tee.d.ts +3 -0
  190. package/bin/tools/tee.js +37 -0
  191. package/bin/tools/tee.js.map +1 -0
  192. package/bin/tools/transformCodebase.d.ts +20 -0
  193. package/bin/tools/transformCodebase.js +97 -0
  194. package/bin/tools/transformCodebase.js.map +1 -0
  195. package/bin/tools/trimIndent.d.ts +5 -0
  196. package/bin/tools/trimIndent.js +82 -0
  197. package/bin/tools/trimIndent.js.map +1 -0
  198. package/bin/tools/unzip.d.ts +2 -0
  199. package/bin/tools/unzip.js +274 -0
  200. package/bin/tools/unzip.js.map +1 -0
  201. package/bin/tsconfig.tsbuildinfo +1 -0
  202. package/package.json +9732 -680
  203. package/tsconfig.tsbuildinfo +1 -0
  204. package/vite-plugin/index.d.ts +1 -0
  205. package/vite-plugin/index.js +50866 -0
  206. package/vite-plugin/index.original.js +17 -0
  207. package/vite-plugin/tsconfig.tsbuildinfo +1 -0
  208. package/vite-plugin/vite-plugin.d.ts +5 -0
  209. package/vite-plugin/vite-plugin.js +136 -0
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
29
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
49
+ var __read = (this && this.__read) || function (o, n) {
50
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
51
+ if (!m) return o;
52
+ var i = m.call(o), r, ar = [], e;
53
+ try {
54
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
55
+ }
56
+ catch (error) { e = { error: error }; }
57
+ finally {
58
+ try {
59
+ if (r && !r.done && (m = i["return"])) m.call(i);
60
+ }
61
+ finally { if (e) throw e.error; }
62
+ }
63
+ return ar;
64
+ };
65
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
66
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
67
+ if (ar || !(i in from)) {
68
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
69
+ ar[i] = from[i];
70
+ }
71
+ }
72
+ return to.concat(ar || Array.prototype.slice.call(from));
73
+ };
74
+ Object.defineProperty(exports, "__esModule", { value: true });
75
+ exports.getProxyFetchOptions = void 0;
76
+ var child_process_1 = require("child_process");
77
+ var promises_1 = require("fs/promises");
78
+ var util_1 = require("util");
79
+ function ensureArray(arg0) {
80
+ return Array.isArray(arg0) ? arg0 : typeof arg0 === "undefined" ? [] : [arg0];
81
+ }
82
+ function ensureSingleOrNone(arg0) {
83
+ if (!Array.isArray(arg0))
84
+ return arg0;
85
+ if (arg0.length === 0)
86
+ return undefined;
87
+ if (arg0.length === 1)
88
+ return arg0[0];
89
+ throw new Error("Illegal configuration, expected a single value but found multiple: " + arg0.map(String).join(", "));
90
+ }
91
+ /**
92
+ * Get npm configuration as map
93
+ */
94
+ function getNmpConfig(params) {
95
+ return __awaiter(this, void 0, void 0, function () {
96
+ var npmWorkspaceRootDirPath, exec, stdout, npmConfigReducer;
97
+ return __generator(this, function (_a) {
98
+ switch (_a.label) {
99
+ case 0:
100
+ npmWorkspaceRootDirPath = params.npmWorkspaceRootDirPath;
101
+ exec = (0, util_1.promisify)(child_process_1.exec);
102
+ return [4 /*yield*/, exec("npm config get", { "encoding": "utf8", "cwd": npmWorkspaceRootDirPath }).then(function (_a) {
103
+ var stdout = _a.stdout;
104
+ return stdout;
105
+ })];
106
+ case 1:
107
+ stdout = _a.sent();
108
+ npmConfigReducer = function (cfg, _a) {
109
+ var _b, _c;
110
+ var _d = __read(_a, 2), key = _d[0], value = _d[1];
111
+ return key in cfg ? __assign(__assign({}, cfg), (_b = {}, _b[key] = __spreadArray(__spreadArray([], __read(ensureArray(cfg[key])), false), [value], false), _b)) : __assign(__assign({}, cfg), (_c = {}, _c[key] = value, _c));
112
+ };
113
+ return [2 /*return*/, stdout
114
+ .split("\n")
115
+ .filter(function (line) { return !line.startsWith(";"); })
116
+ .map(function (line) { return line.trim(); })
117
+ .map(function (line) { return line.split("=", 2); })
118
+ .reduce(npmConfigReducer, {})];
119
+ }
120
+ });
121
+ });
122
+ }
123
+ function getProxyFetchOptions(params) {
124
+ return __awaiter(this, void 0, void 0, function () {
125
+ function maybeBoolean(arg0) {
126
+ return typeof arg0 === "undefined" ? undefined : Boolean(arg0);
127
+ }
128
+ var npmWorkspaceRootDirPath, cfg, proxy, noProxy, strictSSL, cert, ca, cafile, _a, _b, _c, _d;
129
+ var _this = this;
130
+ var _e, _f, _g;
131
+ return __generator(this, function (_h) {
132
+ switch (_h.label) {
133
+ case 0:
134
+ npmWorkspaceRootDirPath = params.npmWorkspaceRootDirPath;
135
+ return [4 /*yield*/, getNmpConfig({ npmWorkspaceRootDirPath: npmWorkspaceRootDirPath })];
136
+ case 1:
137
+ cfg = _h.sent();
138
+ proxy = ensureSingleOrNone((_e = cfg["https-proxy"]) !== null && _e !== void 0 ? _e : cfg["proxy"]);
139
+ noProxy = (_f = cfg["noproxy"]) !== null && _f !== void 0 ? _f : cfg["no-proxy"];
140
+ strictSSL = maybeBoolean(ensureSingleOrNone(cfg["strict-ssl"]));
141
+ cert = cfg["cert"];
142
+ ca = ensureArray((_g = cfg["ca"]) !== null && _g !== void 0 ? _g : cfg["ca[]"]);
143
+ cafile = ensureSingleOrNone(cfg["cafile"]);
144
+ if (!(typeof cafile !== "undefined" && cafile !== "null")) return [3 /*break*/, 3];
145
+ _b = (_a = ca.push).apply;
146
+ _c = [ca];
147
+ _d = [[]];
148
+ return [4 /*yield*/, (function () { return __awaiter(_this, void 0, void 0, function () {
149
+ function chunks(arr, size) {
150
+ if (size === void 0) { size = 2; }
151
+ return arr.map(function (_, i) { return i % size == 0 && arr.slice(i, i + size); }).filter(Boolean);
152
+ }
153
+ var cafileContent;
154
+ return __generator(this, function (_a) {
155
+ switch (_a.label) {
156
+ case 0: return [4 /*yield*/, (0, promises_1.readFile)(cafile, "utf-8")];
157
+ case 1:
158
+ cafileContent = _a.sent();
159
+ return [2 /*return*/, chunks(cafileContent.split(/(-----END CERTIFICATE-----)/), 2).map(function (ca) { return ca.join("").replace(/^\n/, "").replace(/\n/g, "\\n"); })];
160
+ }
161
+ });
162
+ }); })()];
163
+ case 2:
164
+ _b.apply(_a, _c.concat([__spreadArray.apply(void 0, _d.concat([__read.apply(void 0, [(_h.sent())]), false]))]));
165
+ _h.label = 3;
166
+ case 3: return [2 /*return*/, { proxy: proxy, noProxy: noProxy, strictSSL: strictSSL, cert: cert, "ca": ca.length === 0 ? undefined : ca }];
167
+ }
168
+ });
169
+ });
170
+ }
171
+ exports.getProxyFetchOptions = getProxyFetchOptions;
172
+ //# sourceMappingURL=fetchProxyOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchProxyOptions.js","sourceRoot":"","sources":["../../src/bin/tools/fetchProxyOptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqD;AACrD,wCAAuC;AAEvC,6BAAiC;AAEjC,SAAS,WAAW,CAAI,IAAa;IACjC,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC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AAO,MAAM,KAAK,WAAW,IAAI,MAAM,KAAK,MAAM,CAAA,EAAlD,wBAAkD;yBAClD,CAAA,KAAA,EAAE,CAAC,IAAI,CAAA;0BAAP,EAAE;;oBACM,qBAAM,CAAC;4BACP,SAAS,MAAM,CAAI,GAAQ,EAAE,IAAgB;gCAAhB,qBAAA,EAAA,QAAgB;gCACzC,OAAO,GAAG,CAAC,GAAG,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,EAAvC,CAAuC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAU,CAAC;4BAC/F,CAAC;;;;4CAEqB,qBAAM,IAAA,mBAAQ,EAAC,MAAM,EAAE,OAAO,CAAC,EAAA;;wCAA/C,aAAa,GAAG,SAA+B;wCACrD,sBAAO,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,EAApD,CAAoD,CAAC,EAAC;;;6BACxI,CAAC,EAAE,EAAA;;oBARR,qFACO,CAAC,SAOA,CAAC,gBACP;;wBAGN,sBAAO,EAAE,KAAK,OAAA,EAAE,OAAO,SAAA,EAAE,SAAS,WAAA,EAAE,IAAI,MAAA,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,EAAC;;;;CACtF;AA/BD,oDA+BC"}
@@ -0,0 +1 @@
1
+ export declare function existsAsync(path: string): Promise<boolean>;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __generator = (this && this.__generator) || function (thisArg, body) {
35
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
+ function verb(n) { return function (v) { return step([n, v]); }; }
38
+ function step(op) {
39
+ if (f) throw new TypeError("Generator is already executing.");
40
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
41
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
42
+ if (y = 0, t) op = [op[0] & 2, t.value];
43
+ switch (op[0]) {
44
+ case 0: case 1: t = op; break;
45
+ case 4: _.label++; return { value: op[1], done: false };
46
+ case 5: _.label++; y = op[1]; op = [0]; continue;
47
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
48
+ default:
49
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
50
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
51
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
53
+ if (t[2]) _.ops.pop();
54
+ _.trys.pop(); continue;
55
+ }
56
+ op = body.call(thisArg, _);
57
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
58
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
59
+ }
60
+ };
61
+ Object.defineProperty(exports, "__esModule", { value: true });
62
+ exports.existsAsync = void 0;
63
+ var fs = __importStar(require("fs/promises"));
64
+ function existsAsync(path) {
65
+ return __awaiter(this, void 0, void 0, function () {
66
+ var error_1;
67
+ return __generator(this, function (_a) {
68
+ switch (_a.label) {
69
+ case 0:
70
+ _a.trys.push([0, 2, , 3]);
71
+ return [4 /*yield*/, fs.stat(path)];
72
+ case 1:
73
+ _a.sent();
74
+ return [2 /*return*/, true];
75
+ case 2:
76
+ error_1 = _a.sent();
77
+ if (error_1.code === "ENOENT")
78
+ return [2 /*return*/, false];
79
+ throw error_1;
80
+ case 3: return [2 /*return*/];
81
+ }
82
+ });
83
+ });
84
+ }
85
+ exports.existsAsync = existsAsync;
86
+ //# sourceMappingURL=fs.existsAsync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs.existsAsync.js","sourceRoot":"","sources":["../../src/bin/tools/fs.existsAsync.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAkC;AAElC,SAAsB,WAAW,CAAC,IAAY;;;;;;;oBAEtC,qBAAM,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAA;;oBAAnB,SAAmB,CAAC;oBACpB,sBAAO,IAAI,EAAC;;;oBAEZ,IAAK,OAAkC,CAAC,IAAI,KAAK,QAAQ;wBAAE,sBAAO,KAAK,EAAC;oBACxE,MAAM,OAAK,CAAC;;;;;CAEnB;AARD,kCAQC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Polyfill of fs.rm(dirPath, { "recursive": true })
3
+ * For older version of Node
4
+ */
5
+ export declare function rm(dirPath: string, options: {
6
+ recursive: true;
7
+ force?: true;
8
+ }): Promise<void>;
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __generator = (this && this.__generator) || function (thisArg, body) {
35
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
+ function verb(n) { return function (v) { return step([n, v]); }; }
38
+ function step(op) {
39
+ if (f) throw new TypeError("Generator is already executing.");
40
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
41
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
42
+ if (y = 0, t) op = [op[0] & 2, t.value];
43
+ switch (op[0]) {
44
+ case 0: case 1: t = op; break;
45
+ case 4: _.label++; return { value: op[1], done: false };
46
+ case 5: _.label++; y = op[1]; op = [0]; continue;
47
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
48
+ default:
49
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
50
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
51
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
53
+ if (t[2]) _.ops.pop();
54
+ _.trys.pop(); continue;
55
+ }
56
+ op = body.call(thisArg, _);
57
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
58
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
59
+ }
60
+ };
61
+ Object.defineProperty(exports, "__esModule", { value: true });
62
+ exports.rm = void 0;
63
+ var fs = __importStar(require("fs/promises"));
64
+ var path_1 = require("path");
65
+ var SemVer_1 = require("./SemVer");
66
+ /**
67
+ * Polyfill of fs.rm(dirPath, { "recursive": true })
68
+ * For older version of Node
69
+ */
70
+ function rm(dirPath, options) {
71
+ return __awaiter(this, void 0, void 0, function () {
72
+ var _a, force, _b, removeDir_rec;
73
+ var _this = this;
74
+ return __generator(this, function (_c) {
75
+ switch (_c.label) {
76
+ case 0:
77
+ if (SemVer_1.SemVer.compare(SemVer_1.SemVer.parse(process.version), SemVer_1.SemVer.parse("14.14.0")) > 0) {
78
+ return [2 /*return*/, fs.rm(dirPath, options)];
79
+ }
80
+ _a = options.force, force = _a === void 0 ? true : _a;
81
+ _b = force;
82
+ if (!_b) return [3 /*break*/, 2];
83
+ return [4 /*yield*/, checkDirExists(dirPath)];
84
+ case 1:
85
+ _b = !(_c.sent());
86
+ _c.label = 2;
87
+ case 2:
88
+ if (_b) {
89
+ return [2 /*return*/];
90
+ }
91
+ removeDir_rec = function (dirPath) { return __awaiter(_this, void 0, void 0, function () {
92
+ var _a, _b;
93
+ var _this = this;
94
+ return __generator(this, function (_c) {
95
+ switch (_c.label) {
96
+ case 0:
97
+ _b = (_a = Promise).all;
98
+ return [4 /*yield*/, fs.readdir(dirPath)];
99
+ case 1: return [2 /*return*/, _b.apply(_a, [(_c.sent()).map(function (basename) { return __awaiter(_this, void 0, void 0, function () {
100
+ var fileOrDirpath;
101
+ return __generator(this, function (_a) {
102
+ switch (_a.label) {
103
+ case 0:
104
+ fileOrDirpath = (0, path_1.join)(dirPath, basename);
105
+ return [4 /*yield*/, fs.lstat(fileOrDirpath)];
106
+ case 1:
107
+ if (!(_a.sent()).isDirectory()) return [3 /*break*/, 3];
108
+ return [4 /*yield*/, removeDir_rec(fileOrDirpath)];
109
+ case 2:
110
+ _a.sent();
111
+ return [3 /*break*/, 5];
112
+ case 3: return [4 /*yield*/, fs.unlink(fileOrDirpath)];
113
+ case 4:
114
+ _a.sent();
115
+ _a.label = 5;
116
+ case 5: return [2 /*return*/];
117
+ }
118
+ });
119
+ }); })])];
120
+ }
121
+ });
122
+ }); };
123
+ return [4 /*yield*/, removeDir_rec(dirPath)];
124
+ case 3:
125
+ _c.sent();
126
+ return [2 /*return*/];
127
+ }
128
+ });
129
+ });
130
+ }
131
+ exports.rm = rm;
132
+ function checkDirExists(dirPath) {
133
+ return __awaiter(this, void 0, void 0, function () {
134
+ var _a;
135
+ return __generator(this, function (_b) {
136
+ switch (_b.label) {
137
+ case 0:
138
+ _b.trys.push([0, 2, , 3]);
139
+ return [4 /*yield*/, fs.access(dirPath, fs.constants.F_OK)];
140
+ case 1:
141
+ _b.sent();
142
+ return [2 /*return*/, true];
143
+ case 2:
144
+ _a = _b.sent();
145
+ return [2 /*return*/, false];
146
+ case 3: return [2 /*return*/];
147
+ }
148
+ });
149
+ });
150
+ }
151
+ //# sourceMappingURL=fs.rm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs.rm.js","sourceRoot":"","sources":["../../src/bin/tools/fs.rm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAkC;AAClC,6BAAwC;AACxC,mCAAkC;AAElC;;;GAGG;AACH,SAAsB,EAAE,CAAC,OAAe,EAAE,OAA0C;;;;;;;oBAChF,IAAI,eAAM,CAAC,OAAO,CAAC,eAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,eAAM,CA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,SAA2C,CAAC;oBAC5C,sBAAO,IAAI,EAAC;;;oBAEZ,sBAAO,KAAK,EAAC;;;;;CAEpB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Polyfill of fs.rmSync(dirPath, { "recursive": true })
3
+ * For older version of Node
4
+ */
5
+ export declare function rmSync(dirPath: string, options: {
6
+ recursive: true;
7
+ force?: true;
8
+ }): void;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.rmSync = void 0;
27
+ var fs = __importStar(require("fs"));
28
+ var path_1 = require("path");
29
+ var SemVer_1 = require("./SemVer");
30
+ /**
31
+ * Polyfill of fs.rmSync(dirPath, { "recursive": true })
32
+ * For older version of Node
33
+ */
34
+ function rmSync(dirPath, options) {
35
+ if (SemVer_1.SemVer.compare(SemVer_1.SemVer.parse(process.version), SemVer_1.SemVer.parse("14.14.0")) > 0) {
36
+ fs.rmSync(dirPath, options);
37
+ return;
38
+ }
39
+ var _a = options.force, force = _a === void 0 ? true : _a;
40
+ if (force && !fs.existsSync(dirPath)) {
41
+ return;
42
+ }
43
+ var removeDir_rec = function (dirPath) {
44
+ return fs.readdirSync(dirPath).forEach(function (basename) {
45
+ var fileOrDirPath = (0, path_1.join)(dirPath, basename);
46
+ if (fs.lstatSync(fileOrDirPath).isDirectory()) {
47
+ removeDir_rec(fileOrDirPath);
48
+ return;
49
+ }
50
+ else {
51
+ fs.unlinkSync(fileOrDirPath);
52
+ }
53
+ });
54
+ };
55
+ removeDir_rec(dirPath);
56
+ }
57
+ exports.rmSync = rmSync;
58
+ //# sourceMappingURL=fs.rmSync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs.rmSync.js","sourceRoot":"","sources":["../../src/bin/tools/fs.rmSync.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyB;AACzB,6BAAwC;AACxC,mCAAkC;AAElC;;;GAGG;AACH,SAAgB,MAAM,CAAC,OAAe,EAAE,OAA0C;IAC9E,IAAI,eAAM,CAAC,OAAO,CAAC,eAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,eAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7E,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,OAAO;IACX,CAAC;IAEO,IAAA,KAAiB,OAAO,MAAZ,EAAZ,KAAK,mBAAG,IAAI,KAAA,CAAa;IAEjC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACnC,OAAO;IACX,CAAC;IAED,IAAM,aAAa,GAAG,UAAC,OAAe;QAClC,OAAA,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAA,QAAQ;YACpC,IAAM,aAAa,GAAG,IAAA,WAAQ,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAElD,IAAI,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;gBAC5C,aAAa,CAAC,aAAa,CAAC,CAAC;gBAC7B,OAAO;YACX,CAAC;iBAAM,CAAC;gBACJ,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;YACjC,CAAC;QACL,CAAC,CAAC;IATF,CASE,CAAC;IAEP,aAAa,CAAC,OAAO,CAAC,CAAC;AAC3B,CAAC;AAzBD,wBAyBC"}
@@ -0,0 +1,4 @@
1
+ export declare function getAbsoluteAndInOsFormatPath(params: {
2
+ pathIsh: string;
3
+ cwd: string;
4
+ }): string;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.getAbsoluteAndInOsFormatPath = void 0;
27
+ var path_1 = require("path");
28
+ var os = __importStar(require("os"));
29
+ function getAbsoluteAndInOsFormatPath(params) {
30
+ var pathIsh = params.pathIsh, cwd = params.cwd;
31
+ var pathOut = pathIsh;
32
+ pathOut = pathOut.replace(/\//g, path_1.sep);
33
+ if (pathOut.startsWith("~")) {
34
+ pathOut = pathOut.replace("~", os.homedir());
35
+ }
36
+ pathOut = pathOut.endsWith(path_1.sep) ? pathOut.slice(0, -1) : pathOut;
37
+ if (!(0, path_1.isAbsolute)(pathOut)) {
38
+ pathOut = (0, path_1.join)(cwd, pathOut);
39
+ }
40
+ pathOut = (0, path_1.resolve)(pathOut);
41
+ return pathOut;
42
+ }
43
+ exports.getAbsoluteAndInOsFormatPath = getAbsoluteAndInOsFormatPath;
44
+ //# sourceMappingURL=getAbsoluteAndInOsFormatPath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAbsoluteAndInOsFormatPath.js","sourceRoot":"","sources":["../../src/bin/tools/getAbsoluteAndInOsFormatPath.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA8G;AAC9G,qCAAyB;AAEzB,SAAgB,4BAA4B,CAAC,MAAwC;IACzE,IAAA,OAAO,GAAU,MAAM,QAAhB,EAAE,GAAG,GAAK,MAAM,IAAX,CAAY;IAEhC,IAAI,OAAO,GAAG,OAAO,CAAC;IAEtB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,UAAO,CAAC,CAAC;IAE1C,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1B,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAErE,IAAI,CAAC,IAAA,iBAAc,EAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,OAAO,GAAG,IAAA,WAAQ,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,GAAG,IAAA,cAAW,EAAC,OAAO,CAAC,CAAC;IAE/B,OAAO,OAAO,CAAC;AACnB,CAAC;AApBD,oEAoBC"}
@@ -0,0 +1,5 @@
1
+ export declare function getNpmWorkspaceRootDirPath(params: {
2
+ reactAppRootDirPath: string;
3
+ }): {
4
+ npmWorkspaceRootDirPath: string;
5
+ };
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __read = (this && this.__read) || function (o, n) {
26
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
27
+ if (!m) return o;
28
+ var i = m.call(o), r, ar = [], e;
29
+ try {
30
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
31
+ }
32
+ catch (error) { e = { error: error }; }
33
+ finally {
34
+ try {
35
+ if (r && !r.done && (m = i["return"])) m.call(i);
36
+ }
37
+ finally { if (e) throw e.error; }
38
+ }
39
+ return ar;
40
+ };
41
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
42
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
43
+ if (ar || !(i in from)) {
44
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
45
+ ar[i] = from[i];
46
+ }
47
+ }
48
+ return to.concat(ar || Array.prototype.slice.call(from));
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.getNpmWorkspaceRootDirPath = void 0;
52
+ var child_process = __importStar(require("child_process"));
53
+ var path_1 = require("path");
54
+ var assert_1 = require("tsafe/assert");
55
+ function getNpmWorkspaceRootDirPath(params) {
56
+ var reactAppRootDirPath = params.reactAppRootDirPath;
57
+ var npmWorkspaceRootDirPath = (function callee(depth) {
58
+ var cwd = (0, path_1.resolve)(path_1.join.apply(void 0, __spreadArray([], __read(__spreadArray([reactAppRootDirPath], __read(Array(depth).fill("..")), false)), false)));
59
+ try {
60
+ child_process.execSync("npm config get", { cwd: cwd, "stdio": "ignore" });
61
+ }
62
+ catch (error) {
63
+ if (String(error).includes("ENOWORKSPACES")) {
64
+ (0, assert_1.assert)(cwd !== path_1.sep, "NPM workspace not found");
65
+ return callee(depth + 1);
66
+ }
67
+ throw error;
68
+ }
69
+ return cwd;
70
+ })(0);
71
+ return { npmWorkspaceRootDirPath: npmWorkspaceRootDirPath };
72
+ }
73
+ exports.getNpmWorkspaceRootDirPath = getNpmWorkspaceRootDirPath;
74
+ //# sourceMappingURL=getNpmWorkspaceRootDirPath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getNpmWorkspaceRootDirPath.js","sourceRoot":"","sources":["../../src/bin/tools/getNpmWorkspaceRootDirPath.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA+C;AAC/C,6BAAgF;AAChF,uCAAsC;AAEtC,SAAgB,0BAA0B,CAAC,MAAuC;IACtE,IAAA,mBAAmB,GAAK,MAAM,oBAAX,CAAY;IAEvC,IAAM,uBAAuB,GAAG,CAAC,SAAS,MAAM,CAAC,KAAa;QAC1D,IAAM,GAAG,GAAG,IAAA,cAAW,EAAC,WAAQ,uDAAK,mBAAmB,UAAK,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAG,CAAC;QAExF,IAAI,CAAC;YACD,aAAa,CAAC,QAAQ,CAAC,gBAAgB,EAAE,EAAE,GAAG,KAAA,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QACzE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;gBAC1C,IAAA,eAAM,EAAC,GAAG,KAAK,UAAO,EAAE,yBAAyB,CAAC,CAAC;gBAEnD,OAAO,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC7B,CAAC;YAED,MAAM,KAAK,CAAC;QAChB,CAAC;QAED,OAAO,GAAG,CAAC;IACf,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEN,OAAO,EAAE,uBAAuB,yBAAA,EAAE,CAAC;AACvC,CAAC;AAtBD,gEAsBC"}