@devkong/cli 0.0.55 → 0.0.57
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/index.js +2634 -813
- package/package.json +1 -1
- package/packages/kong-spec/src/index.d.ts +2 -2
- package/packages/kong-spec/src/lib/kongSpec.d.ts +34 -7
- package/packages/kong-spec/src/lib/kongSpecBuild.d.ts +2 -1
- package/packages/kong-spec/src/lib/kongSpecDoc.d.ts +2 -2
- package/packages/kong-spec/src/lib/kongSpecUtils.d.ts +13 -5
- package/packages/kong-ts/src/index.d.ts +6 -4
- package/packages/kong-ts/src/lib/cron.d.ts +4 -0
- package/packages/kong-ts/src/lib/guard.d.ts +1 -0
- package/packages/kong-ts/src/lib/interval.d.ts +1 -0
- package/packages/kong-ts/src/lib/jq.d.ts +4 -4
- package/packages/kong-ts/src/lib/text.d.ts +2 -0
- package/packages/kong-ts/src/lib/timezone.d.ts +1 -0
- package/packages/kong-ts-contract/src/index.d.ts +1 -0
- package/packages/kong-ts-contract/src/lib/appProcessData.d.ts +13 -0
package/index.js
CHANGED
|
@@ -33,6 +33,1066 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
+
// node_modules/cronstrue/dist/cronstrue.js
|
|
37
|
+
var require_cronstrue = __commonJS({
|
|
38
|
+
"node_modules/cronstrue/dist/cronstrue.js"(exports2, module2) {
|
|
39
|
+
(function webpackUniversalModuleDefinition(root, factory2) {
|
|
40
|
+
if (typeof exports2 === "object" && typeof module2 === "object")
|
|
41
|
+
module2.exports = factory2();
|
|
42
|
+
else if (typeof define === "function" && define.amd)
|
|
43
|
+
define("cronstrue", [], factory2);
|
|
44
|
+
else if (typeof exports2 === "object")
|
|
45
|
+
exports2["cronstrue"] = factory2();
|
|
46
|
+
else
|
|
47
|
+
root["cronstrue"] = factory2();
|
|
48
|
+
})(globalThis, () => {
|
|
49
|
+
return (
|
|
50
|
+
/******/
|
|
51
|
+
(() => {
|
|
52
|
+
"use strict";
|
|
53
|
+
var __webpack_modules__ = {
|
|
54
|
+
/***/
|
|
55
|
+
949(__unused_webpack_module, exports3, __webpack_require__2) {
|
|
56
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
57
|
+
exports3.CronParser = void 0;
|
|
58
|
+
var rangeValidator_1 = __webpack_require__2(515);
|
|
59
|
+
var CronParser2 = (function() {
|
|
60
|
+
function CronParser3(expression, dayOfWeekStartIndexZero, monthStartIndexZero) {
|
|
61
|
+
if (dayOfWeekStartIndexZero === void 0) {
|
|
62
|
+
dayOfWeekStartIndexZero = true;
|
|
63
|
+
}
|
|
64
|
+
if (monthStartIndexZero === void 0) {
|
|
65
|
+
monthStartIndexZero = false;
|
|
66
|
+
}
|
|
67
|
+
this.expression = expression;
|
|
68
|
+
this.dayOfWeekStartIndexZero = dayOfWeekStartIndexZero;
|
|
69
|
+
this.monthStartIndexZero = monthStartIndexZero;
|
|
70
|
+
}
|
|
71
|
+
CronParser3.prototype.parse = function() {
|
|
72
|
+
var _a;
|
|
73
|
+
var parsed;
|
|
74
|
+
var expression = (_a = this.expression) !== null && _a !== void 0 ? _a : "";
|
|
75
|
+
if (expression === "@reboot") {
|
|
76
|
+
parsed = ["@reboot", "", "", "", "", "", ""];
|
|
77
|
+
return parsed;
|
|
78
|
+
} else if (expression.startsWith("@")) {
|
|
79
|
+
var special = this.parseSpecial(this.expression);
|
|
80
|
+
parsed = this.extractParts(special);
|
|
81
|
+
} else {
|
|
82
|
+
parsed = this.extractParts(this.expression);
|
|
83
|
+
}
|
|
84
|
+
this.normalize(parsed);
|
|
85
|
+
this.validate(parsed);
|
|
86
|
+
return parsed;
|
|
87
|
+
};
|
|
88
|
+
CronParser3.prototype.parseSpecial = function(expression) {
|
|
89
|
+
var specialExpressions = {
|
|
90
|
+
"@yearly": "0 0 1 1 *",
|
|
91
|
+
"@annually": "0 0 1 1 *",
|
|
92
|
+
"@monthly": "0 0 1 * *",
|
|
93
|
+
"@weekly": "0 0 * * 0",
|
|
94
|
+
"@daily": "0 0 * * *",
|
|
95
|
+
"@midnight": "0 0 * * *",
|
|
96
|
+
"@hourly": "0 * * * *",
|
|
97
|
+
"@reboot": "@reboot"
|
|
98
|
+
};
|
|
99
|
+
var special = specialExpressions[expression];
|
|
100
|
+
if (!special) {
|
|
101
|
+
throw new Error("Unknown special expression.");
|
|
102
|
+
}
|
|
103
|
+
return special;
|
|
104
|
+
};
|
|
105
|
+
CronParser3.prototype.extractParts = function(expression) {
|
|
106
|
+
if (!this.expression) {
|
|
107
|
+
throw new Error("cron expression is empty");
|
|
108
|
+
}
|
|
109
|
+
var parsed = expression.trim().split(/[ ]+/);
|
|
110
|
+
for (var i = 0; i < parsed.length; i++) {
|
|
111
|
+
if (parsed[i].includes(",")) {
|
|
112
|
+
var arrayElement = parsed[i].split(",").map(function(item) {
|
|
113
|
+
return item.trim();
|
|
114
|
+
}).filter(function(item) {
|
|
115
|
+
return item !== "";
|
|
116
|
+
}).map(function(item) {
|
|
117
|
+
return !isNaN(Number(item)) ? Number(item) : item;
|
|
118
|
+
}).filter(function(item) {
|
|
119
|
+
return item !== null && item !== "";
|
|
120
|
+
});
|
|
121
|
+
if (arrayElement.length === 0) {
|
|
122
|
+
arrayElement.push("*");
|
|
123
|
+
}
|
|
124
|
+
arrayElement.sort(function(a, b) {
|
|
125
|
+
return a !== null && b !== null ? a - b : 0;
|
|
126
|
+
});
|
|
127
|
+
parsed[i] = arrayElement.map(function(item) {
|
|
128
|
+
return item !== null ? item.toString() : "";
|
|
129
|
+
}).join(",");
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (parsed.length < 5) {
|
|
133
|
+
throw new Error("Expression has only ".concat(parsed.length, " part").concat(parsed.length == 1 ? "" : "s", ". At least 5 parts are required."));
|
|
134
|
+
} else if (parsed.length == 5) {
|
|
135
|
+
parsed.unshift("");
|
|
136
|
+
parsed.push("");
|
|
137
|
+
} else if (parsed.length == 6) {
|
|
138
|
+
var isYearWithNoSecondsPart = /\d{4}$/.test(parsed[5]) || parsed[4] == "?" || parsed[2] == "?";
|
|
139
|
+
if (isYearWithNoSecondsPart) {
|
|
140
|
+
parsed.unshift("");
|
|
141
|
+
} else {
|
|
142
|
+
parsed.push("");
|
|
143
|
+
}
|
|
144
|
+
} else if (parsed.length > 7) {
|
|
145
|
+
throw new Error("Expression has ".concat(parsed.length, " parts; too many!"));
|
|
146
|
+
}
|
|
147
|
+
return parsed;
|
|
148
|
+
};
|
|
149
|
+
CronParser3.prototype.normalize = function(expressionParts) {
|
|
150
|
+
var _this = this;
|
|
151
|
+
expressionParts[3] = expressionParts[3].replace("?", "*");
|
|
152
|
+
expressionParts[5] = expressionParts[5].replace("?", "*");
|
|
153
|
+
expressionParts[2] = expressionParts[2].replace("?", "*");
|
|
154
|
+
if (expressionParts[0].indexOf("0/") == 0) {
|
|
155
|
+
expressionParts[0] = expressionParts[0].replace("0/", "*/");
|
|
156
|
+
}
|
|
157
|
+
if (expressionParts[1].indexOf("0/") == 0) {
|
|
158
|
+
expressionParts[1] = expressionParts[1].replace("0/", "*/");
|
|
159
|
+
}
|
|
160
|
+
if (expressionParts[2].indexOf("0/") == 0) {
|
|
161
|
+
expressionParts[2] = expressionParts[2].replace("0/", "*/");
|
|
162
|
+
}
|
|
163
|
+
if (expressionParts[3].indexOf("1/") == 0) {
|
|
164
|
+
expressionParts[3] = expressionParts[3].replace("1/", "*/");
|
|
165
|
+
}
|
|
166
|
+
if (expressionParts[4].indexOf("1/") == 0) {
|
|
167
|
+
expressionParts[4] = expressionParts[4].replace("1/", "*/");
|
|
168
|
+
}
|
|
169
|
+
if (expressionParts[6].indexOf("1/") == 0) {
|
|
170
|
+
expressionParts[6] = expressionParts[6].replace("1/", "*/");
|
|
171
|
+
}
|
|
172
|
+
expressionParts[5] = expressionParts[5].replace(/(^\d)|([^#/\s]\d)/g, function(t) {
|
|
173
|
+
var dowDigits = t.replace(/\D/, "");
|
|
174
|
+
var dowDigitsAdjusted = dowDigits;
|
|
175
|
+
if (_this.dayOfWeekStartIndexZero) {
|
|
176
|
+
if (dowDigits == "7") {
|
|
177
|
+
dowDigitsAdjusted = "0";
|
|
178
|
+
}
|
|
179
|
+
} else {
|
|
180
|
+
dowDigitsAdjusted = (parseInt(dowDigits) - 1).toString();
|
|
181
|
+
}
|
|
182
|
+
return t.replace(dowDigits, dowDigitsAdjusted);
|
|
183
|
+
});
|
|
184
|
+
if (expressionParts[5] == "L") {
|
|
185
|
+
expressionParts[5] = "6";
|
|
186
|
+
}
|
|
187
|
+
if (expressionParts[3] == "?") {
|
|
188
|
+
expressionParts[3] = "*";
|
|
189
|
+
}
|
|
190
|
+
if (expressionParts[3].indexOf("W") > -1 && (expressionParts[3].indexOf(",") > -1 || expressionParts[3].indexOf("-") > -1)) {
|
|
191
|
+
throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");
|
|
192
|
+
}
|
|
193
|
+
var days = {
|
|
194
|
+
SUN: 0,
|
|
195
|
+
MON: 1,
|
|
196
|
+
TUE: 2,
|
|
197
|
+
WED: 3,
|
|
198
|
+
THU: 4,
|
|
199
|
+
FRI: 5,
|
|
200
|
+
SAT: 6
|
|
201
|
+
};
|
|
202
|
+
for (var day in days) {
|
|
203
|
+
expressionParts[5] = expressionParts[5].replace(new RegExp(day, "gi"), days[day].toString());
|
|
204
|
+
}
|
|
205
|
+
expressionParts[4] = expressionParts[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g, function(t) {
|
|
206
|
+
var dowDigits = t.replace(/\D/, "");
|
|
207
|
+
var dowDigitsAdjusted = dowDigits;
|
|
208
|
+
if (_this.monthStartIndexZero) {
|
|
209
|
+
dowDigitsAdjusted = (parseInt(dowDigits) + 1).toString();
|
|
210
|
+
}
|
|
211
|
+
return t.replace(dowDigits, dowDigitsAdjusted);
|
|
212
|
+
});
|
|
213
|
+
var months = {
|
|
214
|
+
JAN: 1,
|
|
215
|
+
FEB: 2,
|
|
216
|
+
MAR: 3,
|
|
217
|
+
APR: 4,
|
|
218
|
+
MAY: 5,
|
|
219
|
+
JUN: 6,
|
|
220
|
+
JUL: 7,
|
|
221
|
+
AUG: 8,
|
|
222
|
+
SEP: 9,
|
|
223
|
+
OCT: 10,
|
|
224
|
+
NOV: 11,
|
|
225
|
+
DEC: 12
|
|
226
|
+
};
|
|
227
|
+
for (var month in months) {
|
|
228
|
+
expressionParts[4] = expressionParts[4].replace(new RegExp(month, "gi"), months[month].toString());
|
|
229
|
+
}
|
|
230
|
+
if (expressionParts[0] == "0") {
|
|
231
|
+
expressionParts[0] = "";
|
|
232
|
+
}
|
|
233
|
+
if (!/\*|\-|\,|\//.test(expressionParts[2]) && (/\*|\//.test(expressionParts[1]) || /\*|\//.test(expressionParts[0]))) {
|
|
234
|
+
expressionParts[2] += "-".concat(expressionParts[2]);
|
|
235
|
+
}
|
|
236
|
+
for (var i = 0; i < expressionParts.length; i++) {
|
|
237
|
+
if (expressionParts[i].indexOf(",") != -1) {
|
|
238
|
+
expressionParts[i] = expressionParts[i].split(",").filter(function(str) {
|
|
239
|
+
return str !== "";
|
|
240
|
+
}).join(",") || "*";
|
|
241
|
+
}
|
|
242
|
+
if (expressionParts[i] == "*/1") {
|
|
243
|
+
expressionParts[i] = "*";
|
|
244
|
+
}
|
|
245
|
+
if (expressionParts[i].indexOf("/") > -1 && !/^\*|\-|\,/.test(expressionParts[i])) {
|
|
246
|
+
var stepRangeThrough = null;
|
|
247
|
+
switch (i) {
|
|
248
|
+
case 4:
|
|
249
|
+
stepRangeThrough = "12";
|
|
250
|
+
break;
|
|
251
|
+
case 5:
|
|
252
|
+
stepRangeThrough = "6";
|
|
253
|
+
break;
|
|
254
|
+
case 6:
|
|
255
|
+
stepRangeThrough = "9999";
|
|
256
|
+
break;
|
|
257
|
+
default:
|
|
258
|
+
stepRangeThrough = null;
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
if (stepRangeThrough !== null) {
|
|
262
|
+
var parts = expressionParts[i].split("/");
|
|
263
|
+
expressionParts[i] = "".concat(parts[0], "-").concat(stepRangeThrough, "/").concat(parts[1]);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
CronParser3.prototype.validate = function(parsed) {
|
|
269
|
+
var standardCronPartCharacters = "0-9,\\-*/";
|
|
270
|
+
this.validateOnlyExpectedCharactersFound(parsed[0], standardCronPartCharacters);
|
|
271
|
+
this.validateOnlyExpectedCharactersFound(parsed[1], standardCronPartCharacters);
|
|
272
|
+
this.validateOnlyExpectedCharactersFound(parsed[2], standardCronPartCharacters);
|
|
273
|
+
this.validateOnlyExpectedCharactersFound(parsed[3], "0-9,\\-*/LW");
|
|
274
|
+
this.validateOnlyExpectedCharactersFound(parsed[4], standardCronPartCharacters);
|
|
275
|
+
this.validateOnlyExpectedCharactersFound(parsed[5], "0-9,\\-*/L#");
|
|
276
|
+
this.validateOnlyExpectedCharactersFound(parsed[6], standardCronPartCharacters);
|
|
277
|
+
this.validateAnyRanges(parsed);
|
|
278
|
+
};
|
|
279
|
+
CronParser3.prototype.validateAnyRanges = function(parsed) {
|
|
280
|
+
rangeValidator_1.default.secondRange(parsed[0]);
|
|
281
|
+
rangeValidator_1.default.minuteRange(parsed[1]);
|
|
282
|
+
rangeValidator_1.default.hourRange(parsed[2]);
|
|
283
|
+
rangeValidator_1.default.dayOfMonthRange(parsed[3]);
|
|
284
|
+
rangeValidator_1.default.monthRange(parsed[4], this.monthStartIndexZero);
|
|
285
|
+
rangeValidator_1.default.dayOfWeekRange(parsed[5], this.dayOfWeekStartIndexZero);
|
|
286
|
+
};
|
|
287
|
+
CronParser3.prototype.validateOnlyExpectedCharactersFound = function(cronPart, allowedCharsExpression) {
|
|
288
|
+
var invalidChars = cronPart.match(new RegExp("[^".concat(allowedCharsExpression, "]+"), "gi"));
|
|
289
|
+
if (invalidChars && invalidChars.length) {
|
|
290
|
+
throw new Error("Expression contains invalid values: '".concat(invalidChars.toString(), "'"));
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
return CronParser3;
|
|
294
|
+
})();
|
|
295
|
+
exports3.CronParser = CronParser2;
|
|
296
|
+
},
|
|
297
|
+
/***/
|
|
298
|
+
333(__unused_webpack_module, exports3, __webpack_require__2) {
|
|
299
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
300
|
+
exports3.ExpressionDescriptor = void 0;
|
|
301
|
+
var stringUtilities_1 = __webpack_require__2(823);
|
|
302
|
+
var cronParser_1 = __webpack_require__2(949);
|
|
303
|
+
var ExpressionDescriptor = (function() {
|
|
304
|
+
function ExpressionDescriptor2(expression, options) {
|
|
305
|
+
this.expression = expression;
|
|
306
|
+
this.options = options;
|
|
307
|
+
this.expressionParts = new Array(5);
|
|
308
|
+
if (!this.options.locale && ExpressionDescriptor2.defaultLocale) {
|
|
309
|
+
this.options.locale = ExpressionDescriptor2.defaultLocale;
|
|
310
|
+
}
|
|
311
|
+
if (!ExpressionDescriptor2.locales[this.options.locale]) {
|
|
312
|
+
var fallBackLocale = Object.keys(ExpressionDescriptor2.locales)[0];
|
|
313
|
+
console.warn("Locale '".concat(this.options.locale, "' could not be found; falling back to '").concat(fallBackLocale, "'."));
|
|
314
|
+
this.options.locale = fallBackLocale;
|
|
315
|
+
}
|
|
316
|
+
this.i18n = ExpressionDescriptor2.locales[this.options.locale];
|
|
317
|
+
if (options.use24HourTimeFormat === void 0) {
|
|
318
|
+
options.use24HourTimeFormat = this.i18n.use24HourTimeFormatByDefault();
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
ExpressionDescriptor2.toString = function(expression, _a) {
|
|
322
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.throwExceptionOnParseError, throwExceptionOnParseError = _c === void 0 ? true : _c, _d = _b.verbose, verbose = _d === void 0 ? false : _d, _e = _b.dayOfWeekStartIndexZero, dayOfWeekStartIndexZero = _e === void 0 ? true : _e, _f = _b.monthStartIndexZero, monthStartIndexZero = _f === void 0 ? false : _f, use24HourTimeFormat = _b.use24HourTimeFormat, _g = _b.locale, locale = _g === void 0 ? null : _g, _h = _b.logicalAndDayFields, logicalAndDayFields = _h === void 0 ? false : _h;
|
|
323
|
+
var options = {
|
|
324
|
+
throwExceptionOnParseError,
|
|
325
|
+
verbose,
|
|
326
|
+
dayOfWeekStartIndexZero,
|
|
327
|
+
monthStartIndexZero,
|
|
328
|
+
use24HourTimeFormat,
|
|
329
|
+
locale,
|
|
330
|
+
logicalAndDayFields
|
|
331
|
+
};
|
|
332
|
+
if (options.tzOffset) {
|
|
333
|
+
console.warn("'tzOffset' option has been deprecated and is no longer supported.");
|
|
334
|
+
}
|
|
335
|
+
var descripter = new ExpressionDescriptor2(expression, options);
|
|
336
|
+
return descripter.getFullDescription();
|
|
337
|
+
};
|
|
338
|
+
ExpressionDescriptor2.initialize = function(localesLoader, defaultLocale) {
|
|
339
|
+
if (defaultLocale === void 0) {
|
|
340
|
+
defaultLocale = "en";
|
|
341
|
+
}
|
|
342
|
+
ExpressionDescriptor2.specialCharacters = ["/", "-", ",", "*"];
|
|
343
|
+
ExpressionDescriptor2.defaultLocale = defaultLocale;
|
|
344
|
+
localesLoader.load(ExpressionDescriptor2.locales);
|
|
345
|
+
};
|
|
346
|
+
ExpressionDescriptor2.prototype.getFullDescription = function() {
|
|
347
|
+
var _a, _b;
|
|
348
|
+
var description = "";
|
|
349
|
+
try {
|
|
350
|
+
var parser = new cronParser_1.CronParser(this.expression, this.options.dayOfWeekStartIndexZero, this.options.monthStartIndexZero);
|
|
351
|
+
this.expressionParts = parser.parse();
|
|
352
|
+
if (this.expressionParts[0] === "@reboot") {
|
|
353
|
+
return ((_b = (_a = this.i18n).atReboot) === null || _b === void 0 ? void 0 : _b.call(_a)) || "Run once, at startup";
|
|
354
|
+
}
|
|
355
|
+
var timeSegment = this.getTimeOfDayDescription();
|
|
356
|
+
var dayOfMonthDesc = this.getDayOfMonthDescription();
|
|
357
|
+
var monthDesc = this.getMonthDescription();
|
|
358
|
+
var dayOfWeekDesc = this.getDayOfWeekDescription();
|
|
359
|
+
var yearDesc = this.getYearDescription();
|
|
360
|
+
description += timeSegment + dayOfMonthDesc + dayOfWeekDesc + monthDesc + yearDesc;
|
|
361
|
+
description = this.transformVerbosity(description, !!this.options.verbose);
|
|
362
|
+
description = description.charAt(0).toLocaleUpperCase() + description.substr(1);
|
|
363
|
+
} catch (ex) {
|
|
364
|
+
if (!this.options.throwExceptionOnParseError) {
|
|
365
|
+
description = this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();
|
|
366
|
+
} else {
|
|
367
|
+
throw "".concat(ex);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return description;
|
|
371
|
+
};
|
|
372
|
+
ExpressionDescriptor2.prototype.getTimeOfDayDescription = function() {
|
|
373
|
+
var secondsExpression = this.expressionParts[0];
|
|
374
|
+
var minuteExpression = this.expressionParts[1];
|
|
375
|
+
var hourExpression = this.expressionParts[2];
|
|
376
|
+
var description = "";
|
|
377
|
+
if (!stringUtilities_1.StringUtilities.containsAny(minuteExpression, ExpressionDescriptor2.specialCharacters) && !stringUtilities_1.StringUtilities.containsAny(hourExpression, ExpressionDescriptor2.specialCharacters) && !stringUtilities_1.StringUtilities.containsAny(secondsExpression, ExpressionDescriptor2.specialCharacters)) {
|
|
378
|
+
description += this.i18n.atSpace() + this.formatTime(hourExpression, minuteExpression, secondsExpression);
|
|
379
|
+
} else if (!secondsExpression && minuteExpression.indexOf("-") > -1 && !(minuteExpression.indexOf(",") > -1) && !(minuteExpression.indexOf("/") > -1) && !stringUtilities_1.StringUtilities.containsAny(hourExpression, ExpressionDescriptor2.specialCharacters)) {
|
|
380
|
+
var minuteParts = minuteExpression.split("-");
|
|
381
|
+
description += stringUtilities_1.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(), this.formatTime(hourExpression, minuteParts[0], ""), this.formatTime(hourExpression, minuteParts[1], ""));
|
|
382
|
+
} else if (!secondsExpression && hourExpression.indexOf(",") > -1 && hourExpression.indexOf("-") == -1 && hourExpression.indexOf("/") == -1 && !stringUtilities_1.StringUtilities.containsAny(minuteExpression, ExpressionDescriptor2.specialCharacters)) {
|
|
383
|
+
var hourParts = hourExpression.split(",");
|
|
384
|
+
description += this.i18n.at();
|
|
385
|
+
for (var i = 0; i < hourParts.length; i++) {
|
|
386
|
+
description += " ";
|
|
387
|
+
description += this.formatTime(hourParts[i], minuteExpression, "");
|
|
388
|
+
if (i < hourParts.length - 2) {
|
|
389
|
+
description += ",";
|
|
390
|
+
}
|
|
391
|
+
if (i == hourParts.length - 2) {
|
|
392
|
+
description += this.i18n.spaceAnd();
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
} else {
|
|
396
|
+
var secondsDescription = this.getSecondsDescription();
|
|
397
|
+
var minutesDescription = this.getMinutesDescription();
|
|
398
|
+
var hoursDescription = this.getHoursDescription();
|
|
399
|
+
description += secondsDescription;
|
|
400
|
+
if (description && minutesDescription) {
|
|
401
|
+
description += ", ";
|
|
402
|
+
}
|
|
403
|
+
description += minutesDescription;
|
|
404
|
+
if (minutesDescription === hoursDescription) {
|
|
405
|
+
return description;
|
|
406
|
+
}
|
|
407
|
+
if (description && hoursDescription) {
|
|
408
|
+
description += ", ";
|
|
409
|
+
}
|
|
410
|
+
description += hoursDescription;
|
|
411
|
+
}
|
|
412
|
+
return description;
|
|
413
|
+
};
|
|
414
|
+
ExpressionDescriptor2.prototype.getSecondsDescription = function() {
|
|
415
|
+
var _this = this;
|
|
416
|
+
var description = this.getSegmentDescription(this.expressionParts[0], this.i18n.everySecond(), function(s) {
|
|
417
|
+
return s;
|
|
418
|
+
}, function(s) {
|
|
419
|
+
return stringUtilities_1.StringUtilities.format(_this.i18n.everyX0Seconds(s), s);
|
|
420
|
+
}, function(s) {
|
|
421
|
+
return _this.i18n.secondsX0ThroughX1PastTheMinute();
|
|
422
|
+
}, function(s) {
|
|
423
|
+
return s == "0" ? "" : parseInt(s) < 20 ? _this.i18n.atX0SecondsPastTheMinute(s) : _this.i18n.atX0SecondsPastTheMinuteGt20() || _this.i18n.atX0SecondsPastTheMinute(s);
|
|
424
|
+
});
|
|
425
|
+
return description;
|
|
426
|
+
};
|
|
427
|
+
ExpressionDescriptor2.prototype.getMinutesDescription = function() {
|
|
428
|
+
var _this = this;
|
|
429
|
+
var secondsExpression = this.expressionParts[0];
|
|
430
|
+
var hourExpression = this.expressionParts[2];
|
|
431
|
+
var description = this.getSegmentDescription(this.expressionParts[1], this.i18n.everyMinute(), function(s) {
|
|
432
|
+
return s;
|
|
433
|
+
}, function(s) {
|
|
434
|
+
return stringUtilities_1.StringUtilities.format(_this.i18n.everyX0Minutes(s), s);
|
|
435
|
+
}, function(s) {
|
|
436
|
+
return _this.i18n.minutesX0ThroughX1PastTheHour();
|
|
437
|
+
}, function(s) {
|
|
438
|
+
var _a, _b;
|
|
439
|
+
try {
|
|
440
|
+
return s == "0" && hourExpression.indexOf("/") == -1 && secondsExpression == "" ? _this.i18n.everyHour() : s == "0" ? ((_b = (_a = _this.i18n).onTheHour) === null || _b === void 0 ? void 0 : _b.call(_a)) || _this.i18n.atX0MinutesPastTheHour(s) : parseInt(s) < 20 ? _this.i18n.atX0MinutesPastTheHour(s) : _this.i18n.atX0MinutesPastTheHourGt20() || _this.i18n.atX0MinutesPastTheHour(s);
|
|
441
|
+
} catch (e) {
|
|
442
|
+
return _this.i18n.atX0MinutesPastTheHour(s);
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
return description;
|
|
446
|
+
};
|
|
447
|
+
ExpressionDescriptor2.prototype.getHoursDescription = function() {
|
|
448
|
+
var _this = this;
|
|
449
|
+
var expression = this.expressionParts[2];
|
|
450
|
+
var hourIndex = 0;
|
|
451
|
+
var rangeEndValues = [];
|
|
452
|
+
expression.split("/")[0].split(",").forEach(function(range) {
|
|
453
|
+
var rangeParts = range.split("-");
|
|
454
|
+
if (rangeParts.length === 2) {
|
|
455
|
+
rangeEndValues.push({ value: rangeParts[1], index: hourIndex + 1 });
|
|
456
|
+
}
|
|
457
|
+
hourIndex += rangeParts.length;
|
|
458
|
+
});
|
|
459
|
+
var evaluationIndex = 0;
|
|
460
|
+
var description = this.getSegmentDescription(expression, this.i18n.everyHour(), function(s) {
|
|
461
|
+
var match2 = rangeEndValues.find(function(r) {
|
|
462
|
+
return r.value === s && r.index === evaluationIndex;
|
|
463
|
+
});
|
|
464
|
+
var isRangeEndWithNonZeroMinute = match2 && _this.expressionParts[1] !== "0";
|
|
465
|
+
evaluationIndex++;
|
|
466
|
+
return isRangeEndWithNonZeroMinute ? _this.formatTime(s, "59", "") : _this.formatTime(s, "0", "");
|
|
467
|
+
}, function(s) {
|
|
468
|
+
return stringUtilities_1.StringUtilities.format(_this.i18n.everyX0Hours(s), s);
|
|
469
|
+
}, function(s) {
|
|
470
|
+
return _this.i18n.betweenX0AndX1();
|
|
471
|
+
}, function(s) {
|
|
472
|
+
return _this.i18n.atX0();
|
|
473
|
+
});
|
|
474
|
+
return description;
|
|
475
|
+
};
|
|
476
|
+
ExpressionDescriptor2.prototype.getDayOfWeekDescription = function() {
|
|
477
|
+
var _this = this;
|
|
478
|
+
var daysOfWeekNames = this.i18n.daysOfTheWeek();
|
|
479
|
+
var description = null;
|
|
480
|
+
if (this.expressionParts[5] == "*") {
|
|
481
|
+
description = "";
|
|
482
|
+
} else {
|
|
483
|
+
description = this.getSegmentDescription(this.expressionParts[5], this.i18n.commaEveryDay(), function(s, form) {
|
|
484
|
+
var exp = s;
|
|
485
|
+
if (s.indexOf("#") > -1) {
|
|
486
|
+
exp = s.substring(0, s.indexOf("#"));
|
|
487
|
+
} else if (s.indexOf("L") > -1) {
|
|
488
|
+
exp = exp.replace("L", "");
|
|
489
|
+
}
|
|
490
|
+
var parsedExp = parseInt(exp);
|
|
491
|
+
var description2 = _this.i18n.daysOfTheWeekInCase ? _this.i18n.daysOfTheWeekInCase(form)[parsedExp] : daysOfWeekNames[parsedExp];
|
|
492
|
+
if (s.indexOf("#") > -1) {
|
|
493
|
+
var dayOfWeekOfMonthDescription = null;
|
|
494
|
+
var dayOfWeekOfMonthNumber = s.substring(s.indexOf("#") + 1);
|
|
495
|
+
var dayOfWeekNumber = s.substring(0, s.indexOf("#"));
|
|
496
|
+
switch (dayOfWeekOfMonthNumber) {
|
|
497
|
+
case "1":
|
|
498
|
+
dayOfWeekOfMonthDescription = _this.i18n.first(dayOfWeekNumber);
|
|
499
|
+
break;
|
|
500
|
+
case "2":
|
|
501
|
+
dayOfWeekOfMonthDescription = _this.i18n.second(dayOfWeekNumber);
|
|
502
|
+
break;
|
|
503
|
+
case "3":
|
|
504
|
+
dayOfWeekOfMonthDescription = _this.i18n.third(dayOfWeekNumber);
|
|
505
|
+
break;
|
|
506
|
+
case "4":
|
|
507
|
+
dayOfWeekOfMonthDescription = _this.i18n.fourth(dayOfWeekNumber);
|
|
508
|
+
break;
|
|
509
|
+
case "5":
|
|
510
|
+
dayOfWeekOfMonthDescription = _this.i18n.fifth(dayOfWeekNumber);
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
description2 = dayOfWeekOfMonthDescription + " " + description2;
|
|
514
|
+
}
|
|
515
|
+
return description2;
|
|
516
|
+
}, function(s) {
|
|
517
|
+
if (parseInt(s) == 1) {
|
|
518
|
+
return "";
|
|
519
|
+
} else {
|
|
520
|
+
return stringUtilities_1.StringUtilities.format(_this.i18n.commaEveryX0DaysOfTheWeek(s), s);
|
|
521
|
+
}
|
|
522
|
+
}, function(s) {
|
|
523
|
+
var beginFrom = s.substring(0, s.indexOf("-"));
|
|
524
|
+
var domSpecified = _this.expressionParts[3] != "*";
|
|
525
|
+
return domSpecified ? _this.i18n.commaAndX0ThroughX1(beginFrom) : _this.i18n.commaX0ThroughX1(beginFrom);
|
|
526
|
+
}, function(s) {
|
|
527
|
+
var format4 = null;
|
|
528
|
+
if (s.indexOf("#") > -1) {
|
|
529
|
+
var dayOfWeekOfMonthNumber = s.substring(s.indexOf("#") + 1);
|
|
530
|
+
var dayOfWeek = s.substring(0, s.indexOf("#"));
|
|
531
|
+
format4 = _this.i18n.commaOnThe(dayOfWeekOfMonthNumber, dayOfWeek).trim() + _this.i18n.spaceX0OfTheMonth();
|
|
532
|
+
} else if (s.indexOf("L") > -1) {
|
|
533
|
+
format4 = _this.i18n.commaOnTheLastX0OfTheMonth(s.replace("L", ""));
|
|
534
|
+
} else {
|
|
535
|
+
var domSpecified = _this.expressionParts[3] != "*";
|
|
536
|
+
if (!domSpecified) {
|
|
537
|
+
format4 = _this.i18n.commaOnlyOnX0(s);
|
|
538
|
+
} else if (_this.options.logicalAndDayFields) {
|
|
539
|
+
format4 = _this.i18n.commaOnlyOnX0(s);
|
|
540
|
+
} else {
|
|
541
|
+
format4 = _this.i18n.commaAndOnX0();
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
return format4;
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
return description;
|
|
548
|
+
};
|
|
549
|
+
ExpressionDescriptor2.prototype.getMonthDescription = function() {
|
|
550
|
+
var _this = this;
|
|
551
|
+
var monthNames = this.i18n.monthsOfTheYear();
|
|
552
|
+
var description = this.getSegmentDescription(this.expressionParts[4], "", function(s, form) {
|
|
553
|
+
return form && _this.i18n.monthsOfTheYearInCase ? _this.i18n.monthsOfTheYearInCase(form)[parseInt(s) - 1] : monthNames[parseInt(s) - 1];
|
|
554
|
+
}, function(s) {
|
|
555
|
+
if (parseInt(s) == 1) {
|
|
556
|
+
return "";
|
|
557
|
+
} else {
|
|
558
|
+
return stringUtilities_1.StringUtilities.format(_this.i18n.commaEveryX0Months(s), s);
|
|
559
|
+
}
|
|
560
|
+
}, function(s) {
|
|
561
|
+
return _this.i18n.commaMonthX0ThroughMonthX1() || _this.i18n.commaX0ThroughX1();
|
|
562
|
+
}, function(s) {
|
|
563
|
+
return _this.i18n.commaOnlyInMonthX0 ? _this.i18n.commaOnlyInMonthX0() : _this.i18n.commaOnlyInX0();
|
|
564
|
+
});
|
|
565
|
+
return description;
|
|
566
|
+
};
|
|
567
|
+
ExpressionDescriptor2.prototype.getDayOfMonthDescription = function() {
|
|
568
|
+
var _this = this;
|
|
569
|
+
var description = null;
|
|
570
|
+
var expression = this.expressionParts[3];
|
|
571
|
+
switch (expression) {
|
|
572
|
+
case "L":
|
|
573
|
+
description = this.i18n.commaOnTheLastDayOfTheMonth();
|
|
574
|
+
break;
|
|
575
|
+
case "WL":
|
|
576
|
+
case "LW":
|
|
577
|
+
description = this.i18n.commaOnTheLastWeekdayOfTheMonth();
|
|
578
|
+
break;
|
|
579
|
+
default:
|
|
580
|
+
var weekDayNumberMatches = expression.match(/(\d{1,2}W)|(W\d{1,2})/);
|
|
581
|
+
if (weekDayNumberMatches) {
|
|
582
|
+
var dayNumber = parseInt(weekDayNumberMatches[0].replace("W", ""));
|
|
583
|
+
var dayString = dayNumber == 1 ? this.i18n.firstWeekday() : stringUtilities_1.StringUtilities.format(this.i18n.weekdayNearestDayX0(), dayNumber.toString());
|
|
584
|
+
description = stringUtilities_1.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(), dayString);
|
|
585
|
+
break;
|
|
586
|
+
} else {
|
|
587
|
+
var lastDayOffSetMatches = expression.match(/L-(\d{1,2})/);
|
|
588
|
+
if (lastDayOffSetMatches) {
|
|
589
|
+
var offSetDays = lastDayOffSetMatches[1];
|
|
590
|
+
description = stringUtilities_1.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(offSetDays), offSetDays);
|
|
591
|
+
break;
|
|
592
|
+
} else if (expression == "*" && this.expressionParts[5] != "*") {
|
|
593
|
+
return "";
|
|
594
|
+
} else {
|
|
595
|
+
description = this.getSegmentDescription(expression, this.i18n.commaEveryDay(), function(s) {
|
|
596
|
+
return s == "L" ? _this.i18n.lastDay() : _this.i18n.dayX0 ? stringUtilities_1.StringUtilities.format(_this.i18n.dayX0(), s) : s;
|
|
597
|
+
}, function(s) {
|
|
598
|
+
return s == "1" ? _this.i18n.commaEveryDay() : _this.i18n.commaEveryX0Days(s);
|
|
599
|
+
}, function(s) {
|
|
600
|
+
return _this.i18n.commaBetweenDayX0AndX1OfTheMonth(s);
|
|
601
|
+
}, function(s) {
|
|
602
|
+
return _this.i18n.commaOnDayX0OfTheMonth(s);
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
break;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
return description;
|
|
609
|
+
};
|
|
610
|
+
ExpressionDescriptor2.prototype.getYearDescription = function() {
|
|
611
|
+
var _this = this;
|
|
612
|
+
var description = this.getSegmentDescription(this.expressionParts[6], "", function(s) {
|
|
613
|
+
return /^\d+$/.test(s) ? new Date(parseInt(s), 1).getFullYear().toString() : s;
|
|
614
|
+
}, function(s) {
|
|
615
|
+
return stringUtilities_1.StringUtilities.format(_this.i18n.commaEveryX0Years(s), s);
|
|
616
|
+
}, function(s) {
|
|
617
|
+
return _this.i18n.commaYearX0ThroughYearX1() || _this.i18n.commaX0ThroughX1();
|
|
618
|
+
}, function(s) {
|
|
619
|
+
return _this.i18n.commaOnlyInYearX0 ? _this.i18n.commaOnlyInYearX0() : _this.i18n.commaOnlyInX0();
|
|
620
|
+
});
|
|
621
|
+
return description;
|
|
622
|
+
};
|
|
623
|
+
ExpressionDescriptor2.prototype.getSegmentDescription = function(expression, allDescription, getSingleItemDescription, getIncrementDescriptionFormat, getRangeDescriptionFormat, getDescriptionFormat) {
|
|
624
|
+
var description = null;
|
|
625
|
+
var doesExpressionContainIncrement = expression.indexOf("/") > -1;
|
|
626
|
+
var doesExpressionContainRange = expression.indexOf("-") > -1;
|
|
627
|
+
var doesExpressionContainMultipleValues = expression.indexOf(",") > -1;
|
|
628
|
+
if (!expression) {
|
|
629
|
+
description = "";
|
|
630
|
+
} else if (expression === "*") {
|
|
631
|
+
description = allDescription;
|
|
632
|
+
} else if (!doesExpressionContainIncrement && !doesExpressionContainRange && !doesExpressionContainMultipleValues) {
|
|
633
|
+
description = stringUtilities_1.StringUtilities.format(getDescriptionFormat(expression), getSingleItemDescription(expression));
|
|
634
|
+
} else if (doesExpressionContainMultipleValues) {
|
|
635
|
+
var segments = expression.split(",");
|
|
636
|
+
var descriptionContent = "";
|
|
637
|
+
for (var i = 0; i < segments.length; i++) {
|
|
638
|
+
if (i > 0 && segments.length > 2) {
|
|
639
|
+
descriptionContent += ",";
|
|
640
|
+
if (i < segments.length - 1) {
|
|
641
|
+
descriptionContent += " ";
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
if (i > 0 && segments.length > 1 && (i == segments.length - 1 || segments.length == 2)) {
|
|
645
|
+
descriptionContent += "".concat(this.i18n.spaceAnd(), " ");
|
|
646
|
+
}
|
|
647
|
+
if (segments[i].indexOf("/") > -1 || segments[i].indexOf("-") > -1) {
|
|
648
|
+
var isSegmentRangeWithoutIncrement = segments[i].indexOf("-") > -1 && segments[i].indexOf("/") == -1;
|
|
649
|
+
var currentDescriptionContent = this.getSegmentDescription(segments[i], allDescription, getSingleItemDescription, getIncrementDescriptionFormat, isSegmentRangeWithoutIncrement ? this.i18n.commaX0ThroughX1 : getRangeDescriptionFormat, getDescriptionFormat);
|
|
650
|
+
if (isSegmentRangeWithoutIncrement) {
|
|
651
|
+
currentDescriptionContent = currentDescriptionContent.replace(", ", "");
|
|
652
|
+
}
|
|
653
|
+
descriptionContent += currentDescriptionContent;
|
|
654
|
+
} else if (!doesExpressionContainIncrement) {
|
|
655
|
+
descriptionContent += getSingleItemDescription(segments[i]);
|
|
656
|
+
} else {
|
|
657
|
+
var segmentDescription = this.getSegmentDescription(segments[i], allDescription, getSingleItemDescription, getIncrementDescriptionFormat, getRangeDescriptionFormat, getDescriptionFormat);
|
|
658
|
+
if (segmentDescription && segmentDescription.startsWith(", ")) {
|
|
659
|
+
segmentDescription = segmentDescription.substring(2);
|
|
660
|
+
}
|
|
661
|
+
descriptionContent += segmentDescription;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
if (!doesExpressionContainIncrement) {
|
|
665
|
+
description = stringUtilities_1.StringUtilities.format(getDescriptionFormat(expression), descriptionContent);
|
|
666
|
+
} else {
|
|
667
|
+
description = descriptionContent;
|
|
668
|
+
}
|
|
669
|
+
} else if (doesExpressionContainIncrement) {
|
|
670
|
+
var segments = expression.split("/");
|
|
671
|
+
description = stringUtilities_1.StringUtilities.format(getIncrementDescriptionFormat(segments[1]), segments[1]);
|
|
672
|
+
if (segments[0].indexOf("-") > -1) {
|
|
673
|
+
var rangeSegmentDescription = this.generateRangeSegmentDescription(segments[0], getRangeDescriptionFormat, getSingleItemDescription);
|
|
674
|
+
if (rangeSegmentDescription.indexOf(", ") != 0) {
|
|
675
|
+
description += ", ";
|
|
676
|
+
}
|
|
677
|
+
description += rangeSegmentDescription;
|
|
678
|
+
} else if (segments[0].indexOf("*") == -1) {
|
|
679
|
+
var rangeItemDescription = stringUtilities_1.StringUtilities.format(getDescriptionFormat(segments[0]), getSingleItemDescription(segments[0]));
|
|
680
|
+
rangeItemDescription = rangeItemDescription.replace(", ", "");
|
|
681
|
+
description += stringUtilities_1.StringUtilities.format(this.i18n.commaStartingX0(), rangeItemDescription);
|
|
682
|
+
}
|
|
683
|
+
} else if (doesExpressionContainRange) {
|
|
684
|
+
description = this.generateRangeSegmentDescription(expression, getRangeDescriptionFormat, getSingleItemDescription);
|
|
685
|
+
}
|
|
686
|
+
return description;
|
|
687
|
+
};
|
|
688
|
+
ExpressionDescriptor2.prototype.generateRangeSegmentDescription = function(rangeExpression, getRangeDescriptionFormat, getSingleItemDescription) {
|
|
689
|
+
var description = "";
|
|
690
|
+
var rangeSegments = rangeExpression.split("-");
|
|
691
|
+
var rangeSegment1Description = getSingleItemDescription(rangeSegments[0], 1);
|
|
692
|
+
var rangeSegment2Description = getSingleItemDescription(rangeSegments[1], 2);
|
|
693
|
+
var rangeDescriptionFormat = getRangeDescriptionFormat(rangeExpression);
|
|
694
|
+
description += stringUtilities_1.StringUtilities.format(rangeDescriptionFormat, rangeSegment1Description, rangeSegment2Description);
|
|
695
|
+
return description;
|
|
696
|
+
};
|
|
697
|
+
ExpressionDescriptor2.prototype.formatTime = function(hourExpression, minuteExpression, secondExpression) {
|
|
698
|
+
var hourOffset = 0;
|
|
699
|
+
var minuteOffset = 0;
|
|
700
|
+
var hour = parseInt(hourExpression) + hourOffset;
|
|
701
|
+
var minute = parseInt(minuteExpression) + minuteOffset;
|
|
702
|
+
if (minute >= 60) {
|
|
703
|
+
minute -= 60;
|
|
704
|
+
hour += 1;
|
|
705
|
+
} else if (minute < 0) {
|
|
706
|
+
minute += 60;
|
|
707
|
+
hour -= 1;
|
|
708
|
+
}
|
|
709
|
+
if (hour >= 24) {
|
|
710
|
+
hour = hour - 24;
|
|
711
|
+
} else if (hour < 0) {
|
|
712
|
+
hour = 24 + hour;
|
|
713
|
+
}
|
|
714
|
+
var period = "";
|
|
715
|
+
var setPeriodBeforeTime = false;
|
|
716
|
+
if (!this.options.use24HourTimeFormat) {
|
|
717
|
+
setPeriodBeforeTime = !!(this.i18n.setPeriodBeforeTime && this.i18n.setPeriodBeforeTime());
|
|
718
|
+
period = setPeriodBeforeTime ? "".concat(this.getPeriod(hour), " ") : " ".concat(this.getPeriod(hour));
|
|
719
|
+
if (hour > 12) {
|
|
720
|
+
hour -= 12;
|
|
721
|
+
}
|
|
722
|
+
if (hour === 0) {
|
|
723
|
+
hour = 12;
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
var second = "";
|
|
727
|
+
if (secondExpression) {
|
|
728
|
+
second = ":".concat(("00" + secondExpression).substring(secondExpression.length));
|
|
729
|
+
}
|
|
730
|
+
return "".concat(setPeriodBeforeTime ? period : "").concat(("00" + hour.toString()).substring(hour.toString().length), ":").concat(("00" + minute.toString()).substring(minute.toString().length)).concat(second).concat(!setPeriodBeforeTime ? period : "");
|
|
731
|
+
};
|
|
732
|
+
ExpressionDescriptor2.prototype.transformVerbosity = function(description, useVerboseFormat) {
|
|
733
|
+
if (!useVerboseFormat) {
|
|
734
|
+
description = description.replace(new RegExp(", ".concat(this.i18n.everyMinute()), "g"), "");
|
|
735
|
+
description = description.replace(new RegExp(", ".concat(this.i18n.everyHour()), "g"), "");
|
|
736
|
+
description = description.replace(new RegExp(this.i18n.commaEveryDay(), "g"), "");
|
|
737
|
+
description = description.replace(/\, ?$/, "");
|
|
738
|
+
if (this.i18n.conciseVerbosityReplacements) {
|
|
739
|
+
for (var _i = 0, _a = Object.entries(this.i18n.conciseVerbosityReplacements()); _i < _a.length; _i++) {
|
|
740
|
+
var _b = _a[_i], key = _b[0], value = _b[1];
|
|
741
|
+
description = description.replace(new RegExp(key, "g"), value);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
return description;
|
|
746
|
+
};
|
|
747
|
+
ExpressionDescriptor2.prototype.getPeriod = function(hour) {
|
|
748
|
+
return hour >= 12 ? this.i18n.pm && this.i18n.pm() || "PM" : this.i18n.am && this.i18n.am() || "AM";
|
|
749
|
+
};
|
|
750
|
+
ExpressionDescriptor2.locales = {};
|
|
751
|
+
return ExpressionDescriptor2;
|
|
752
|
+
})();
|
|
753
|
+
exports3.ExpressionDescriptor = ExpressionDescriptor;
|
|
754
|
+
},
|
|
755
|
+
/***/
|
|
756
|
+
747(__unused_webpack_module, exports3, __webpack_require__2) {
|
|
757
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
758
|
+
exports3.enLocaleLoader = void 0;
|
|
759
|
+
var en_1 = __webpack_require__2(486);
|
|
760
|
+
var enLocaleLoader = (function() {
|
|
761
|
+
function enLocaleLoader2() {
|
|
762
|
+
}
|
|
763
|
+
enLocaleLoader2.prototype.load = function(availableLocales) {
|
|
764
|
+
availableLocales["en"] = new en_1.en();
|
|
765
|
+
};
|
|
766
|
+
return enLocaleLoader2;
|
|
767
|
+
})();
|
|
768
|
+
exports3.enLocaleLoader = enLocaleLoader;
|
|
769
|
+
},
|
|
770
|
+
/***/
|
|
771
|
+
486(__unused_webpack_module, exports3) {
|
|
772
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
773
|
+
exports3.en = void 0;
|
|
774
|
+
var en = (function() {
|
|
775
|
+
function en2() {
|
|
776
|
+
}
|
|
777
|
+
en2.prototype.atX0SecondsPastTheMinuteGt20 = function() {
|
|
778
|
+
return null;
|
|
779
|
+
};
|
|
780
|
+
en2.prototype.atX0MinutesPastTheHourGt20 = function() {
|
|
781
|
+
return null;
|
|
782
|
+
};
|
|
783
|
+
en2.prototype.commaMonthX0ThroughMonthX1 = function() {
|
|
784
|
+
return null;
|
|
785
|
+
};
|
|
786
|
+
en2.prototype.commaYearX0ThroughYearX1 = function() {
|
|
787
|
+
return null;
|
|
788
|
+
};
|
|
789
|
+
en2.prototype.use24HourTimeFormatByDefault = function() {
|
|
790
|
+
return false;
|
|
791
|
+
};
|
|
792
|
+
en2.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function() {
|
|
793
|
+
return "An error occurred when generating the expression description. Check the cron expression syntax.";
|
|
794
|
+
};
|
|
795
|
+
en2.prototype.everyMinute = function() {
|
|
796
|
+
return "every minute";
|
|
797
|
+
};
|
|
798
|
+
en2.prototype.everyHour = function() {
|
|
799
|
+
return "every hour";
|
|
800
|
+
};
|
|
801
|
+
en2.prototype.atSpace = function() {
|
|
802
|
+
return "At ";
|
|
803
|
+
};
|
|
804
|
+
en2.prototype.everyMinuteBetweenX0AndX1 = function() {
|
|
805
|
+
return "Every minute between %s and %s";
|
|
806
|
+
};
|
|
807
|
+
en2.prototype.at = function() {
|
|
808
|
+
return "At";
|
|
809
|
+
};
|
|
810
|
+
en2.prototype.spaceAnd = function() {
|
|
811
|
+
return " and";
|
|
812
|
+
};
|
|
813
|
+
en2.prototype.everySecond = function() {
|
|
814
|
+
return "every second";
|
|
815
|
+
};
|
|
816
|
+
en2.prototype.everyX0Seconds = function() {
|
|
817
|
+
return "every %s seconds";
|
|
818
|
+
};
|
|
819
|
+
en2.prototype.secondsX0ThroughX1PastTheMinute = function() {
|
|
820
|
+
return "seconds %s through %s past the minute";
|
|
821
|
+
};
|
|
822
|
+
en2.prototype.atX0SecondsPastTheMinute = function() {
|
|
823
|
+
return "at %s seconds past the minute";
|
|
824
|
+
};
|
|
825
|
+
en2.prototype.everyX0Minutes = function() {
|
|
826
|
+
return "every %s minutes";
|
|
827
|
+
};
|
|
828
|
+
en2.prototype.minutesX0ThroughX1PastTheHour = function() {
|
|
829
|
+
return "minutes %s through %s past the hour";
|
|
830
|
+
};
|
|
831
|
+
en2.prototype.atX0MinutesPastTheHour = function() {
|
|
832
|
+
return "at %s minutes past the hour";
|
|
833
|
+
};
|
|
834
|
+
en2.prototype.everyX0Hours = function() {
|
|
835
|
+
return "every %s hours";
|
|
836
|
+
};
|
|
837
|
+
en2.prototype.betweenX0AndX1 = function() {
|
|
838
|
+
return "between %s and %s";
|
|
839
|
+
};
|
|
840
|
+
en2.prototype.atX0 = function() {
|
|
841
|
+
return "at %s";
|
|
842
|
+
};
|
|
843
|
+
en2.prototype.commaEveryDay = function() {
|
|
844
|
+
return ", every day";
|
|
845
|
+
};
|
|
846
|
+
en2.prototype.commaEveryX0DaysOfTheWeek = function() {
|
|
847
|
+
return ", every %s days of the week";
|
|
848
|
+
};
|
|
849
|
+
en2.prototype.commaX0ThroughX1 = function() {
|
|
850
|
+
return ", %s through %s";
|
|
851
|
+
};
|
|
852
|
+
en2.prototype.commaAndX0ThroughX1 = function() {
|
|
853
|
+
return ", %s through %s";
|
|
854
|
+
};
|
|
855
|
+
en2.prototype.first = function() {
|
|
856
|
+
return "first";
|
|
857
|
+
};
|
|
858
|
+
en2.prototype.second = function() {
|
|
859
|
+
return "second";
|
|
860
|
+
};
|
|
861
|
+
en2.prototype.third = function() {
|
|
862
|
+
return "third";
|
|
863
|
+
};
|
|
864
|
+
en2.prototype.fourth = function() {
|
|
865
|
+
return "fourth";
|
|
866
|
+
};
|
|
867
|
+
en2.prototype.fifth = function() {
|
|
868
|
+
return "fifth";
|
|
869
|
+
};
|
|
870
|
+
en2.prototype.commaOnThe = function() {
|
|
871
|
+
return ", on the ";
|
|
872
|
+
};
|
|
873
|
+
en2.prototype.spaceX0OfTheMonth = function() {
|
|
874
|
+
return " %s of the month";
|
|
875
|
+
};
|
|
876
|
+
en2.prototype.lastDay = function() {
|
|
877
|
+
return "the last day";
|
|
878
|
+
};
|
|
879
|
+
en2.prototype.commaOnTheLastX0OfTheMonth = function() {
|
|
880
|
+
return ", on the last %s of the month";
|
|
881
|
+
};
|
|
882
|
+
en2.prototype.commaOnlyOnX0 = function() {
|
|
883
|
+
return ", only on %s";
|
|
884
|
+
};
|
|
885
|
+
en2.prototype.commaAndOnX0 = function() {
|
|
886
|
+
return ", and on %s";
|
|
887
|
+
};
|
|
888
|
+
en2.prototype.commaEveryX0Months = function() {
|
|
889
|
+
return ", every %s months";
|
|
890
|
+
};
|
|
891
|
+
en2.prototype.commaOnlyInX0 = function() {
|
|
892
|
+
return ", only in %s";
|
|
893
|
+
};
|
|
894
|
+
en2.prototype.commaOnTheLastDayOfTheMonth = function() {
|
|
895
|
+
return ", on the last day of the month";
|
|
896
|
+
};
|
|
897
|
+
en2.prototype.commaOnTheLastWeekdayOfTheMonth = function() {
|
|
898
|
+
return ", on the last weekday of the month";
|
|
899
|
+
};
|
|
900
|
+
en2.prototype.commaDaysBeforeTheLastDayOfTheMonth = function() {
|
|
901
|
+
return ", %s days before the last day of the month";
|
|
902
|
+
};
|
|
903
|
+
en2.prototype.firstWeekday = function() {
|
|
904
|
+
return "first weekday";
|
|
905
|
+
};
|
|
906
|
+
en2.prototype.weekdayNearestDayX0 = function() {
|
|
907
|
+
return "weekday nearest day %s";
|
|
908
|
+
};
|
|
909
|
+
en2.prototype.commaOnTheX0OfTheMonth = function() {
|
|
910
|
+
return ", on the %s of the month";
|
|
911
|
+
};
|
|
912
|
+
en2.prototype.commaEveryX0Days = function() {
|
|
913
|
+
return ", every %s days in a month";
|
|
914
|
+
};
|
|
915
|
+
en2.prototype.commaBetweenDayX0AndX1OfTheMonth = function() {
|
|
916
|
+
return ", between day %s and %s of the month";
|
|
917
|
+
};
|
|
918
|
+
en2.prototype.commaOnDayX0OfTheMonth = function() {
|
|
919
|
+
return ", on day %s of the month";
|
|
920
|
+
};
|
|
921
|
+
en2.prototype.commaEveryHour = function() {
|
|
922
|
+
return ", every hour";
|
|
923
|
+
};
|
|
924
|
+
en2.prototype.commaEveryX0Years = function() {
|
|
925
|
+
return ", every %s years";
|
|
926
|
+
};
|
|
927
|
+
en2.prototype.commaStartingX0 = function() {
|
|
928
|
+
return ", starting %s";
|
|
929
|
+
};
|
|
930
|
+
en2.prototype.daysOfTheWeek = function() {
|
|
931
|
+
return ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
932
|
+
};
|
|
933
|
+
en2.prototype.monthsOfTheYear = function() {
|
|
934
|
+
return [
|
|
935
|
+
"January",
|
|
936
|
+
"February",
|
|
937
|
+
"March",
|
|
938
|
+
"April",
|
|
939
|
+
"May",
|
|
940
|
+
"June",
|
|
941
|
+
"July",
|
|
942
|
+
"August",
|
|
943
|
+
"September",
|
|
944
|
+
"October",
|
|
945
|
+
"November",
|
|
946
|
+
"December"
|
|
947
|
+
];
|
|
948
|
+
};
|
|
949
|
+
en2.prototype.atReboot = function() {
|
|
950
|
+
return "Run once, at startup";
|
|
951
|
+
};
|
|
952
|
+
en2.prototype.onTheHour = function() {
|
|
953
|
+
return "on the hour";
|
|
954
|
+
};
|
|
955
|
+
return en2;
|
|
956
|
+
})();
|
|
957
|
+
exports3.en = en;
|
|
958
|
+
},
|
|
959
|
+
/***/
|
|
960
|
+
515(__unused_webpack_module, exports3) {
|
|
961
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
962
|
+
function assert(value, message2) {
|
|
963
|
+
if (!value) {
|
|
964
|
+
throw new Error(message2);
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
var RangeValidator = (function() {
|
|
968
|
+
function RangeValidator2() {
|
|
969
|
+
}
|
|
970
|
+
RangeValidator2.secondRange = function(parse) {
|
|
971
|
+
var parsed = parse.split(",");
|
|
972
|
+
for (var i = 0; i < parsed.length; i++) {
|
|
973
|
+
if (!isNaN(parseInt(parsed[i], 10))) {
|
|
974
|
+
var second = parseInt(parsed[i], 10);
|
|
975
|
+
assert(second >= 0 && second <= 59, "seconds part must be >= 0 and <= 59");
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
};
|
|
979
|
+
RangeValidator2.minuteRange = function(parse) {
|
|
980
|
+
var parsed = parse.split(",");
|
|
981
|
+
for (var i = 0; i < parsed.length; i++) {
|
|
982
|
+
if (!isNaN(parseInt(parsed[i], 10))) {
|
|
983
|
+
var minute = parseInt(parsed[i], 10);
|
|
984
|
+
assert(minute >= 0 && minute <= 59, "minutes part must be >= 0 and <= 59");
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
};
|
|
988
|
+
RangeValidator2.hourRange = function(parse) {
|
|
989
|
+
var parsed = parse.split(",");
|
|
990
|
+
for (var i = 0; i < parsed.length; i++) {
|
|
991
|
+
if (!isNaN(parseInt(parsed[i], 10))) {
|
|
992
|
+
var hour = parseInt(parsed[i], 10);
|
|
993
|
+
assert(hour >= 0 && hour <= 23, "hours part must be >= 0 and <= 23");
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
};
|
|
997
|
+
RangeValidator2.dayOfMonthRange = function(parse) {
|
|
998
|
+
var parsed = parse.split(",");
|
|
999
|
+
for (var i = 0; i < parsed.length; i++) {
|
|
1000
|
+
if (!isNaN(parseInt(parsed[i], 10))) {
|
|
1001
|
+
var dayOfMonth = parseInt(parsed[i], 10);
|
|
1002
|
+
assert(dayOfMonth >= 1 && dayOfMonth <= 31, "DOM part must be >= 1 and <= 31");
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
};
|
|
1006
|
+
RangeValidator2.monthRange = function(parse, monthStartIndexZero) {
|
|
1007
|
+
var parsed = parse.split(",");
|
|
1008
|
+
for (var i = 0; i < parsed.length; i++) {
|
|
1009
|
+
if (!isNaN(parseInt(parsed[i], 10))) {
|
|
1010
|
+
var month = parseInt(parsed[i], 10);
|
|
1011
|
+
assert(month >= 1 && month <= 12, monthStartIndexZero ? "month part must be >= 0 and <= 11" : "month part must be >= 1 and <= 12");
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
};
|
|
1015
|
+
RangeValidator2.dayOfWeekRange = function(parse, dayOfWeekStartIndexZero) {
|
|
1016
|
+
var parsed = parse.split(",");
|
|
1017
|
+
for (var i = 0; i < parsed.length; i++) {
|
|
1018
|
+
if (!isNaN(parseInt(parsed[i], 10))) {
|
|
1019
|
+
var dayOfWeek = parseInt(parsed[i], 10);
|
|
1020
|
+
assert(dayOfWeek >= 0 && dayOfWeek <= 6, dayOfWeekStartIndexZero ? "DOW part must be >= 0 and <= 6" : "DOW part must be >= 1 and <= 7");
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
};
|
|
1024
|
+
return RangeValidator2;
|
|
1025
|
+
})();
|
|
1026
|
+
exports3["default"] = RangeValidator;
|
|
1027
|
+
},
|
|
1028
|
+
/***/
|
|
1029
|
+
823(__unused_webpack_module, exports3) {
|
|
1030
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
1031
|
+
exports3.StringUtilities = void 0;
|
|
1032
|
+
var StringUtilities = (function() {
|
|
1033
|
+
function StringUtilities2() {
|
|
1034
|
+
}
|
|
1035
|
+
StringUtilities2.format = function(template2) {
|
|
1036
|
+
var values = [];
|
|
1037
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1038
|
+
values[_i - 1] = arguments[_i];
|
|
1039
|
+
}
|
|
1040
|
+
return template2.replace(/%s/g, function(substring) {
|
|
1041
|
+
var args = [];
|
|
1042
|
+
for (var _i2 = 1; _i2 < arguments.length; _i2++) {
|
|
1043
|
+
args[_i2 - 1] = arguments[_i2];
|
|
1044
|
+
}
|
|
1045
|
+
return values.shift();
|
|
1046
|
+
});
|
|
1047
|
+
};
|
|
1048
|
+
StringUtilities2.containsAny = function(text, searchStrings) {
|
|
1049
|
+
return searchStrings.some(function(c) {
|
|
1050
|
+
return text.indexOf(c) > -1;
|
|
1051
|
+
});
|
|
1052
|
+
};
|
|
1053
|
+
return StringUtilities2;
|
|
1054
|
+
})();
|
|
1055
|
+
exports3.StringUtilities = StringUtilities;
|
|
1056
|
+
}
|
|
1057
|
+
/******/
|
|
1058
|
+
};
|
|
1059
|
+
var __webpack_module_cache__ = {};
|
|
1060
|
+
function __webpack_require__(moduleId) {
|
|
1061
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
1062
|
+
if (cachedModule !== void 0) {
|
|
1063
|
+
return cachedModule.exports;
|
|
1064
|
+
}
|
|
1065
|
+
var module3 = __webpack_module_cache__[moduleId] = {
|
|
1066
|
+
/******/
|
|
1067
|
+
// no module.id needed
|
|
1068
|
+
/******/
|
|
1069
|
+
// no module.loaded needed
|
|
1070
|
+
/******/
|
|
1071
|
+
exports: {}
|
|
1072
|
+
/******/
|
|
1073
|
+
};
|
|
1074
|
+
__webpack_modules__[moduleId](module3, module3.exports, __webpack_require__);
|
|
1075
|
+
return module3.exports;
|
|
1076
|
+
}
|
|
1077
|
+
var __webpack_exports__ = {};
|
|
1078
|
+
(() => {
|
|
1079
|
+
var exports3 = __webpack_exports__;
|
|
1080
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
1081
|
+
exports3.toString = void 0;
|
|
1082
|
+
var expressionDescriptor_1 = __webpack_require__(333);
|
|
1083
|
+
var enLocaleLoader_1 = __webpack_require__(747);
|
|
1084
|
+
expressionDescriptor_1.ExpressionDescriptor.initialize(new enLocaleLoader_1.enLocaleLoader());
|
|
1085
|
+
exports3["default"] = expressionDescriptor_1.ExpressionDescriptor;
|
|
1086
|
+
var cronstrue_toString = expressionDescriptor_1.ExpressionDescriptor.toString;
|
|
1087
|
+
exports3.toString = cronstrue_toString;
|
|
1088
|
+
})();
|
|
1089
|
+
return __webpack_exports__;
|
|
1090
|
+
})()
|
|
1091
|
+
);
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1094
|
+
});
|
|
1095
|
+
|
|
36
1096
|
// node_modules/commander/lib/error.js
|
|
37
1097
|
var require_error = __commonJS({
|
|
38
1098
|
"node_modules/commander/lib/error.js"(exports2) {
|
|
@@ -3532,7 +4592,7 @@ var require_main = __commonJS({
|
|
|
3532
4592
|
"node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
3533
4593
|
var fs5 = require("fs");
|
|
3534
4594
|
var path7 = require("path");
|
|
3535
|
-
var
|
|
4595
|
+
var os3 = require("os");
|
|
3536
4596
|
var crypto2 = require("crypto");
|
|
3537
4597
|
var packageJson = require_package();
|
|
3538
4598
|
var version = packageJson.version;
|
|
@@ -3688,7 +4748,7 @@ var require_main = __commonJS({
|
|
|
3688
4748
|
return null;
|
|
3689
4749
|
}
|
|
3690
4750
|
function _resolveHome(envPath) {
|
|
3691
|
-
return envPath[0] === "~" ? path7.join(
|
|
4751
|
+
return envPath[0] === "~" ? path7.join(os3.homedir(), envPath.slice(1)) : envPath;
|
|
3692
4752
|
}
|
|
3693
4753
|
function _configVault(options) {
|
|
3694
4754
|
const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
@@ -13681,55 +14741,54 @@ var require_lib5 = __commonJS({
|
|
|
13681
14741
|
var Buffer2 = require_safer().Buffer;
|
|
13682
14742
|
var bomHandling = require_bom_handling();
|
|
13683
14743
|
var mergeModules = require_merge_exports();
|
|
13684
|
-
|
|
13685
|
-
|
|
13686
|
-
|
|
13687
|
-
|
|
13688
|
-
iconv2.encode = function encode3(str, encoding, options) {
|
|
14744
|
+
module2.exports.encodings = null;
|
|
14745
|
+
module2.exports.defaultCharUnicode = "\uFFFD";
|
|
14746
|
+
module2.exports.defaultCharSingleByte = "?";
|
|
14747
|
+
module2.exports.encode = function encode3(str, encoding, options) {
|
|
13689
14748
|
str = "" + (str || "");
|
|
13690
|
-
var encoder =
|
|
14749
|
+
var encoder = module2.exports.getEncoder(encoding, options);
|
|
13691
14750
|
var res = encoder.write(str);
|
|
13692
14751
|
var trail = encoder.end();
|
|
13693
14752
|
return trail && trail.length > 0 ? Buffer2.concat([res, trail]) : res;
|
|
13694
14753
|
};
|
|
13695
|
-
|
|
14754
|
+
module2.exports.decode = function decode(buf, encoding, options) {
|
|
13696
14755
|
if (typeof buf === "string") {
|
|
13697
|
-
if (!
|
|
14756
|
+
if (!module2.exports.skipDecodeWarning) {
|
|
13698
14757
|
console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding");
|
|
13699
|
-
|
|
14758
|
+
module2.exports.skipDecodeWarning = true;
|
|
13700
14759
|
}
|
|
13701
14760
|
buf = Buffer2.from("" + (buf || ""), "binary");
|
|
13702
14761
|
}
|
|
13703
|
-
var decoder =
|
|
14762
|
+
var decoder = module2.exports.getDecoder(encoding, options);
|
|
13704
14763
|
var res = decoder.write(buf);
|
|
13705
14764
|
var trail = decoder.end();
|
|
13706
14765
|
return trail ? res + trail : res;
|
|
13707
14766
|
};
|
|
13708
|
-
|
|
14767
|
+
module2.exports.encodingExists = function encodingExists(enc) {
|
|
13709
14768
|
try {
|
|
13710
|
-
|
|
14769
|
+
module2.exports.getCodec(enc);
|
|
13711
14770
|
return true;
|
|
13712
14771
|
} catch (e) {
|
|
13713
14772
|
return false;
|
|
13714
14773
|
}
|
|
13715
14774
|
};
|
|
13716
|
-
|
|
13717
|
-
|
|
13718
|
-
|
|
13719
|
-
|
|
13720
|
-
if (!
|
|
14775
|
+
module2.exports.toEncoding = module2.exports.encode;
|
|
14776
|
+
module2.exports.fromEncoding = module2.exports.decode;
|
|
14777
|
+
module2.exports._codecDataCache = { __proto__: null };
|
|
14778
|
+
module2.exports.getCodec = function getCodec(encoding) {
|
|
14779
|
+
if (!module2.exports.encodings) {
|
|
13721
14780
|
var raw = require_encodings();
|
|
13722
|
-
|
|
13723
|
-
mergeModules(
|
|
14781
|
+
module2.exports.encodings = { __proto__: null };
|
|
14782
|
+
mergeModules(module2.exports.encodings, raw);
|
|
13724
14783
|
}
|
|
13725
|
-
var enc =
|
|
14784
|
+
var enc = module2.exports._canonicalizeEncoding(encoding);
|
|
13726
14785
|
var codecOptions = {};
|
|
13727
14786
|
while (true) {
|
|
13728
|
-
var codec =
|
|
14787
|
+
var codec = module2.exports._codecDataCache[enc];
|
|
13729
14788
|
if (codec) {
|
|
13730
14789
|
return codec;
|
|
13731
14790
|
}
|
|
13732
|
-
var codecDef =
|
|
14791
|
+
var codecDef = module2.exports.encodings[enc];
|
|
13733
14792
|
switch (typeof codecDef) {
|
|
13734
14793
|
case "string":
|
|
13735
14794
|
enc = codecDef;
|
|
@@ -13747,47 +14806,47 @@ var require_lib5 = __commonJS({
|
|
|
13747
14806
|
if (!codecOptions.encodingName) {
|
|
13748
14807
|
codecOptions.encodingName = enc;
|
|
13749
14808
|
}
|
|
13750
|
-
codec = new codecDef(codecOptions,
|
|
13751
|
-
|
|
14809
|
+
codec = new codecDef(codecOptions, module2.exports);
|
|
14810
|
+
module2.exports._codecDataCache[codecOptions.encodingName] = codec;
|
|
13752
14811
|
return codec;
|
|
13753
14812
|
default:
|
|
13754
14813
|
throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '" + enc + "')");
|
|
13755
14814
|
}
|
|
13756
14815
|
}
|
|
13757
14816
|
};
|
|
13758
|
-
|
|
14817
|
+
module2.exports._canonicalizeEncoding = function(encoding) {
|
|
13759
14818
|
return ("" + encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, "");
|
|
13760
14819
|
};
|
|
13761
|
-
|
|
13762
|
-
var codec =
|
|
14820
|
+
module2.exports.getEncoder = function getEncoder(encoding, options) {
|
|
14821
|
+
var codec = module2.exports.getCodec(encoding);
|
|
13763
14822
|
var encoder = new codec.encoder(options, codec);
|
|
13764
14823
|
if (codec.bomAware && options && options.addBOM) {
|
|
13765
14824
|
encoder = new bomHandling.PrependBOM(encoder, options);
|
|
13766
14825
|
}
|
|
13767
14826
|
return encoder;
|
|
13768
14827
|
};
|
|
13769
|
-
|
|
13770
|
-
var codec =
|
|
14828
|
+
module2.exports.getDecoder = function getDecoder(encoding, options) {
|
|
14829
|
+
var codec = module2.exports.getCodec(encoding);
|
|
13771
14830
|
var decoder = new codec.decoder(options, codec);
|
|
13772
14831
|
if (codec.bomAware && !(options && options.stripBOM === false)) {
|
|
13773
14832
|
decoder = new bomHandling.StripBOM(decoder, options);
|
|
13774
14833
|
}
|
|
13775
14834
|
return decoder;
|
|
13776
14835
|
};
|
|
13777
|
-
|
|
13778
|
-
if (
|
|
14836
|
+
module2.exports.enableStreamingAPI = function enableStreamingAPI(streamModule2) {
|
|
14837
|
+
if (module2.exports.supportsStreams) {
|
|
13779
14838
|
return;
|
|
13780
14839
|
}
|
|
13781
14840
|
var streams = require_streams()(streamModule2);
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
|
|
13785
|
-
return new
|
|
14841
|
+
module2.exports.IconvLiteEncoderStream = streams.IconvLiteEncoderStream;
|
|
14842
|
+
module2.exports.IconvLiteDecoderStream = streams.IconvLiteDecoderStream;
|
|
14843
|
+
module2.exports.encodeStream = function encodeStream(encoding, options) {
|
|
14844
|
+
return new module2.exports.IconvLiteEncoderStream(module2.exports.getEncoder(encoding, options), options);
|
|
13786
14845
|
};
|
|
13787
|
-
|
|
13788
|
-
return new
|
|
14846
|
+
module2.exports.decodeStream = function decodeStream(encoding, options) {
|
|
14847
|
+
return new module2.exports.IconvLiteDecoderStream(module2.exports.getDecoder(encoding, options), options);
|
|
13789
14848
|
};
|
|
13790
|
-
|
|
14849
|
+
module2.exports.supportsStreams = true;
|
|
13791
14850
|
};
|
|
13792
14851
|
var streamModule;
|
|
13793
14852
|
try {
|
|
@@ -13795,9 +14854,9 @@ var require_lib5 = __commonJS({
|
|
|
13795
14854
|
} catch (e) {
|
|
13796
14855
|
}
|
|
13797
14856
|
if (streamModule && streamModule.Transform) {
|
|
13798
|
-
|
|
14857
|
+
module2.exports.enableStreamingAPI(streamModule);
|
|
13799
14858
|
} else {
|
|
13800
|
-
|
|
14859
|
+
module2.exports.encodeStream = module2.exports.decodeStream = function() {
|
|
13801
14860
|
throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.");
|
|
13802
14861
|
};
|
|
13803
14862
|
}
|
|
@@ -33577,7 +34636,7 @@ var require_form_data = __commonJS({
|
|
|
33577
34636
|
FormData3.prototype.toString = function() {
|
|
33578
34637
|
return "[object FormData]";
|
|
33579
34638
|
};
|
|
33580
|
-
setToStringTag(FormData3, "FormData");
|
|
34639
|
+
setToStringTag(FormData3.prototype, "FormData");
|
|
33581
34640
|
module2.exports = FormData3;
|
|
33582
34641
|
}
|
|
33583
34642
|
});
|
|
@@ -34132,7 +35191,7 @@ var require_has_flag = __commonJS({
|
|
|
34132
35191
|
var require_supports_color = __commonJS({
|
|
34133
35192
|
"node_modules/supports-color/index.js"(exports2, module2) {
|
|
34134
35193
|
"use strict";
|
|
34135
|
-
var
|
|
35194
|
+
var os3 = require("os");
|
|
34136
35195
|
var tty2 = require("tty");
|
|
34137
35196
|
var hasFlag = require_has_flag();
|
|
34138
35197
|
var { env: env2 } = process;
|
|
@@ -34180,7 +35239,7 @@ var require_supports_color = __commonJS({
|
|
|
34180
35239
|
return min;
|
|
34181
35240
|
}
|
|
34182
35241
|
if (process.platform === "win32") {
|
|
34183
|
-
const osRelease =
|
|
35242
|
+
const osRelease = os3.release().split(".");
|
|
34184
35243
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
34185
35244
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
34186
35245
|
}
|
|
@@ -38687,11 +39746,11 @@ var require_clone = __commonJS({
|
|
|
38687
39746
|
"node_modules/clone/clone.js"(exports2, module2) {
|
|
38688
39747
|
var clone4 = (function() {
|
|
38689
39748
|
"use strict";
|
|
38690
|
-
function clone5(parent, circular, depth,
|
|
39749
|
+
function clone5(parent, circular, depth, prototype2) {
|
|
38691
39750
|
var filter3;
|
|
38692
39751
|
if (typeof circular === "object") {
|
|
38693
39752
|
depth = circular.depth;
|
|
38694
|
-
|
|
39753
|
+
prototype2 = circular.prototype;
|
|
38695
39754
|
filter3 = circular.filter;
|
|
38696
39755
|
circular = circular.circular;
|
|
38697
39756
|
}
|
|
@@ -38728,12 +39787,12 @@ var require_clone = __commonJS({
|
|
|
38728
39787
|
parent2.copy(child);
|
|
38729
39788
|
return child;
|
|
38730
39789
|
} else {
|
|
38731
|
-
if (typeof
|
|
39790
|
+
if (typeof prototype2 == "undefined") {
|
|
38732
39791
|
proto = Object.getPrototypeOf(parent2);
|
|
38733
39792
|
child = Object.create(proto);
|
|
38734
39793
|
} else {
|
|
38735
|
-
child = Object.create(
|
|
38736
|
-
proto =
|
|
39794
|
+
child = Object.create(prototype2);
|
|
39795
|
+
proto = prototype2;
|
|
38737
39796
|
}
|
|
38738
39797
|
}
|
|
38739
39798
|
if (circular) {
|
|
@@ -42469,8 +43528,18 @@ var require_error_utils = __commonJS({
|
|
|
42469
43528
|
"node_modules/create-nx-workspace/src/utils/error-utils.js"(exports2) {
|
|
42470
43529
|
"use strict";
|
|
42471
43530
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
42472
|
-
exports2.CreateNxWorkspaceError = void 0;
|
|
43531
|
+
exports2.CreateNxWorkspaceError = exports2.CnwError = void 0;
|
|
42473
43532
|
exports2.mapErrorToBodyLines = mapErrorToBodyLines;
|
|
43533
|
+
var CnwError = class extends Error {
|
|
43534
|
+
constructor(code, message2, logFile, exitCode) {
|
|
43535
|
+
super(message2);
|
|
43536
|
+
this.code = code;
|
|
43537
|
+
this.logFile = logFile;
|
|
43538
|
+
this.exitCode = exitCode;
|
|
43539
|
+
this.name = "CnwError";
|
|
43540
|
+
}
|
|
43541
|
+
};
|
|
43542
|
+
exports2.CnwError = CnwError;
|
|
42474
43543
|
var CreateNxWorkspaceError = class extends Error {
|
|
42475
43544
|
constructor(logMessage, code, logFile) {
|
|
42476
43545
|
super(logMessage);
|
|
@@ -42490,7 +43559,7 @@ var require_error_utils = __commonJS({
|
|
|
42490
43559
|
}
|
|
42491
43560
|
return lines2;
|
|
42492
43561
|
}
|
|
42493
|
-
const lines = error instanceof CreateNxWorkspaceError ? [`Exit code: ${error.code}`, `Log file: ${error.logFile}`] : [];
|
|
43562
|
+
const lines = error instanceof CreateNxWorkspaceError ? [`Exit code: ${error.code}`, `Log file: ${error.logFile}`] : error instanceof CnwError && error.logFile ? [`Log file: ${error.logFile}`] : [];
|
|
42494
43563
|
if (process.env.NX_VERBOSE_LOGGING === "true") {
|
|
42495
43564
|
lines.push(`Error: ${error.message}`);
|
|
42496
43565
|
lines.push(`Stack: ${error.stack}`);
|
|
@@ -42572,165 +43641,6 @@ ${stderr}`);
|
|
|
42572
43641
|
}
|
|
42573
43642
|
});
|
|
42574
43643
|
|
|
42575
|
-
// node_modules/create-nx-workspace/src/utils/ci/is-ci.js
|
|
42576
|
-
var require_is_ci = __commonJS({
|
|
42577
|
-
"node_modules/create-nx-workspace/src/utils/ci/is-ci.js"(exports2) {
|
|
42578
|
-
"use strict";
|
|
42579
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
42580
|
-
exports2.isCI = isCI2;
|
|
42581
|
-
function isCI2() {
|
|
42582
|
-
return process.env.CI && process.env.CI !== "false" || process.env.TF_BUILD === "true" || process.env.GITHUB_ACTIONS === "true" || process.env.BUILDKITE === "true" || process.env.CIRCLECI === "true" || process.env.CIRRUS_CI === "true" || process.env.TRAVIS === "true" || !!process.env["bamboo.buildKey"] || !!process.env.CODEBUILD_BUILD_ID || !!process.env.GITLAB_CI || !!process.env.HEROKU_TEST_RUN_ID || !!process.env.BUILD_ID || !!process.env.BUILD_BUILDID || !!process.env.TEAMCITY_VERSION;
|
|
42583
|
-
}
|
|
42584
|
-
}
|
|
42585
|
-
});
|
|
42586
|
-
|
|
42587
|
-
// node_modules/create-nx-workspace/src/utils/output.js
|
|
42588
|
-
var require_output = __commonJS({
|
|
42589
|
-
"node_modules/create-nx-workspace/src/utils/output.js"(exports2) {
|
|
42590
|
-
"use strict";
|
|
42591
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
42592
|
-
exports2.output = exports2.CLIOutput = void 0;
|
|
42593
|
-
var chalk = require_source();
|
|
42594
|
-
var os_1 = require("os");
|
|
42595
|
-
var is_ci_1 = require_is_ci();
|
|
42596
|
-
if ((0, is_ci_1.isCI)()) {
|
|
42597
|
-
chalk.level = 0;
|
|
42598
|
-
}
|
|
42599
|
-
var CLIOutput = class {
|
|
42600
|
-
constructor(real = true) {
|
|
42601
|
-
this.real = real;
|
|
42602
|
-
this.outstream = this.real ? process.stdout : new FakeStdout();
|
|
42603
|
-
this.colors = {
|
|
42604
|
-
gray: chalk.gray,
|
|
42605
|
-
green: chalk.green,
|
|
42606
|
-
red: chalk.red,
|
|
42607
|
-
cyan: chalk.cyan,
|
|
42608
|
-
white: chalk.white
|
|
42609
|
-
};
|
|
42610
|
-
this.bold = chalk.bold;
|
|
42611
|
-
this.underline = chalk.underline;
|
|
42612
|
-
this.dim = chalk.dim;
|
|
42613
|
-
this.cliName = "NX";
|
|
42614
|
-
}
|
|
42615
|
-
/**
|
|
42616
|
-
* Longer dash character which forms more of a continuous line when place side to side
|
|
42617
|
-
* with itself, unlike the standard dash character
|
|
42618
|
-
*/
|
|
42619
|
-
get VERTICAL_SEPARATOR() {
|
|
42620
|
-
let divider = "";
|
|
42621
|
-
for (let i = 0; i < process.stdout.columns - 1; i++) {
|
|
42622
|
-
divider += "\u2014";
|
|
42623
|
-
}
|
|
42624
|
-
return divider;
|
|
42625
|
-
}
|
|
42626
|
-
writeToStdOut(str) {
|
|
42627
|
-
this.outstream.write(str);
|
|
42628
|
-
}
|
|
42629
|
-
writeOutputTitle({ color: color2, title }) {
|
|
42630
|
-
this.writeToStdOut(`${this.applyCLIPrefix(color2, title)}${os_1.EOL}`);
|
|
42631
|
-
}
|
|
42632
|
-
writeOptionalOutputBody(bodyLines) {
|
|
42633
|
-
if (!bodyLines) {
|
|
42634
|
-
return;
|
|
42635
|
-
}
|
|
42636
|
-
this.addNewline();
|
|
42637
|
-
bodyLines.forEach((bodyLine) => this.writeToStdOut(`${bodyLine}${os_1.EOL}`));
|
|
42638
|
-
}
|
|
42639
|
-
setCliName(name) {
|
|
42640
|
-
this.cliName = name;
|
|
42641
|
-
}
|
|
42642
|
-
applyCLIPrefix(color2 = "cyan", text) {
|
|
42643
|
-
let cliPrefix = "";
|
|
42644
|
-
if (chalk[color2]) {
|
|
42645
|
-
cliPrefix = chalk.reset.inverse.bold[color2](` ${this.cliName} `);
|
|
42646
|
-
} else {
|
|
42647
|
-
cliPrefix = chalk.reset.inverse.bold.keyword(color2)(` ${this.cliName} `);
|
|
42648
|
-
}
|
|
42649
|
-
return `${cliPrefix} ${text}`;
|
|
42650
|
-
}
|
|
42651
|
-
addNewline() {
|
|
42652
|
-
this.writeToStdOut(os_1.EOL);
|
|
42653
|
-
}
|
|
42654
|
-
addVerticalSeparator(color2 = "gray") {
|
|
42655
|
-
this.addNewline();
|
|
42656
|
-
this.addVerticalSeparatorWithoutNewLines(color2);
|
|
42657
|
-
this.addNewline();
|
|
42658
|
-
}
|
|
42659
|
-
addVerticalSeparatorWithoutNewLines(color2 = "gray") {
|
|
42660
|
-
this.writeToStdOut(`${chalk.dim[color2](this.VERTICAL_SEPARATOR)}${os_1.EOL}`);
|
|
42661
|
-
}
|
|
42662
|
-
error({ title, bodyLines }) {
|
|
42663
|
-
this.addNewline();
|
|
42664
|
-
this.writeOutputTitle({
|
|
42665
|
-
color: "red",
|
|
42666
|
-
title: chalk.red(title)
|
|
42667
|
-
});
|
|
42668
|
-
this.writeOptionalOutputBody(bodyLines);
|
|
42669
|
-
this.addNewline();
|
|
42670
|
-
}
|
|
42671
|
-
warn({ title, bodyLines }) {
|
|
42672
|
-
this.addNewline();
|
|
42673
|
-
this.writeOutputTitle({
|
|
42674
|
-
color: "yellow",
|
|
42675
|
-
title: chalk.yellow(title)
|
|
42676
|
-
});
|
|
42677
|
-
this.writeOptionalOutputBody(bodyLines);
|
|
42678
|
-
this.addNewline();
|
|
42679
|
-
}
|
|
42680
|
-
note({ title, bodyLines }) {
|
|
42681
|
-
this.addNewline();
|
|
42682
|
-
this.writeOutputTitle({
|
|
42683
|
-
color: "orange",
|
|
42684
|
-
title: chalk.keyword("orange")(title)
|
|
42685
|
-
});
|
|
42686
|
-
this.writeOptionalOutputBody(bodyLines);
|
|
42687
|
-
this.addNewline();
|
|
42688
|
-
}
|
|
42689
|
-
success({ title, bodyLines }) {
|
|
42690
|
-
this.addNewline();
|
|
42691
|
-
this.writeOutputTitle({
|
|
42692
|
-
color: "green",
|
|
42693
|
-
title: chalk.green(title)
|
|
42694
|
-
});
|
|
42695
|
-
this.writeOptionalOutputBody(bodyLines);
|
|
42696
|
-
}
|
|
42697
|
-
logSingleLine(message2) {
|
|
42698
|
-
this.addNewline();
|
|
42699
|
-
this.writeOutputTitle({
|
|
42700
|
-
color: "gray",
|
|
42701
|
-
title: message2
|
|
42702
|
-
});
|
|
42703
|
-
this.addNewline();
|
|
42704
|
-
}
|
|
42705
|
-
log({ title, bodyLines, color: color2 }) {
|
|
42706
|
-
this.addNewline();
|
|
42707
|
-
this.writeOutputTitle({
|
|
42708
|
-
color: "cyan",
|
|
42709
|
-
title: color2 ? chalk[color2](title) : title
|
|
42710
|
-
});
|
|
42711
|
-
this.writeOptionalOutputBody(bodyLines);
|
|
42712
|
-
this.addNewline();
|
|
42713
|
-
}
|
|
42714
|
-
getOutput() {
|
|
42715
|
-
return this.outstream.toString();
|
|
42716
|
-
}
|
|
42717
|
-
};
|
|
42718
|
-
exports2.CLIOutput = CLIOutput;
|
|
42719
|
-
exports2.output = new CLIOutput();
|
|
42720
|
-
var FakeStdout = class {
|
|
42721
|
-
constructor() {
|
|
42722
|
-
this.content = "";
|
|
42723
|
-
}
|
|
42724
|
-
write(str) {
|
|
42725
|
-
this.content += str;
|
|
42726
|
-
}
|
|
42727
|
-
toString() {
|
|
42728
|
-
return this.content;
|
|
42729
|
-
}
|
|
42730
|
-
};
|
|
42731
|
-
}
|
|
42732
|
-
});
|
|
42733
|
-
|
|
42734
43644
|
// node_modules/create-nx-workspace/src/utils/package-manager.js
|
|
42735
43645
|
var require_package_manager = __commonJS({
|
|
42736
43646
|
"node_modules/create-nx-workspace/src/utils/package-manager.js"(exports2) {
|
|
@@ -42740,6 +43650,10 @@ var require_package_manager = __commonJS({
|
|
|
42740
43650
|
exports2.detectPackageManager = detectPackageManager;
|
|
42741
43651
|
exports2.getPackageManagerCommand = getPackageManagerCommand;
|
|
42742
43652
|
exports2.generatePackageManagerFiles = generatePackageManagerFiles;
|
|
43653
|
+
exports2.workspacesToPnpmYaml = workspacesToPnpmYaml;
|
|
43654
|
+
exports2.convertStarToWorkspaceProtocol = convertStarToWorkspaceProtocol;
|
|
43655
|
+
exports2.findAllWorkspacePackageJsons = findAllWorkspacePackageJsons;
|
|
43656
|
+
exports2.findWorkspacePackages = findWorkspacePackages;
|
|
42743
43657
|
exports2.getPackageManagerVersion = getPackageManagerVersion;
|
|
42744
43658
|
exports2.detectInvokedPackageManager = detectInvokedPackageManager;
|
|
42745
43659
|
var node_child_process_1 = require("node:child_process");
|
|
@@ -42793,14 +43707,108 @@ var require_package_manager = __commonJS({
|
|
|
42793
43707
|
function generatePackageManagerFiles(root, packageManager = detectPackageManager()) {
|
|
42794
43708
|
const [pmMajor] = getPackageManagerVersion(packageManager).split(".");
|
|
42795
43709
|
switch (packageManager) {
|
|
43710
|
+
case "pnpm":
|
|
43711
|
+
convertToWorkspaceYaml(root);
|
|
43712
|
+
convertStarToWorkspaceProtocol(root);
|
|
43713
|
+
break;
|
|
42796
43714
|
case "yarn":
|
|
42797
43715
|
if (+pmMajor >= 2) {
|
|
42798
43716
|
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, ".yarnrc.yml"), "nodeLinker: node-modules\nenableScripts: false");
|
|
42799
43717
|
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, "yarn.lock"), "");
|
|
42800
43718
|
}
|
|
43719
|
+
convertStarToWorkspaceProtocol(root);
|
|
43720
|
+
break;
|
|
43721
|
+
case "bun":
|
|
43722
|
+
convertStarToWorkspaceProtocol(root);
|
|
42801
43723
|
break;
|
|
42802
43724
|
}
|
|
42803
43725
|
}
|
|
43726
|
+
function workspacesToPnpmYaml(workspaces) {
|
|
43727
|
+
return `packages:
|
|
43728
|
+
${workspaces.map((p) => ` - '${p}'`).join("\n")}
|
|
43729
|
+
`;
|
|
43730
|
+
}
|
|
43731
|
+
function convertToWorkspaceYaml(root) {
|
|
43732
|
+
const packageJsonPath = (0, node_path_1.join)(root, "package.json");
|
|
43733
|
+
if (!(0, node_fs_1.existsSync)(packageJsonPath)) {
|
|
43734
|
+
return;
|
|
43735
|
+
}
|
|
43736
|
+
const packageJson = JSON.parse((0, node_fs_1.readFileSync)(packageJsonPath, "utf-8"));
|
|
43737
|
+
const workspaces = packageJson.workspaces;
|
|
43738
|
+
if (!workspaces || workspaces.length === 0) {
|
|
43739
|
+
return;
|
|
43740
|
+
}
|
|
43741
|
+
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, "pnpm-workspace.yaml"), workspacesToPnpmYaml(workspaces));
|
|
43742
|
+
delete packageJson.workspaces;
|
|
43743
|
+
(0, node_fs_1.writeFileSync)(packageJsonPath, JSON.stringify(packageJson, null, 2) + "\n");
|
|
43744
|
+
}
|
|
43745
|
+
function convertStarToWorkspaceProtocol(root) {
|
|
43746
|
+
for (const pkgJsonPath of findAllWorkspacePackageJsons(root)) {
|
|
43747
|
+
try {
|
|
43748
|
+
const pkgJson = JSON.parse((0, node_fs_1.readFileSync)(pkgJsonPath, "utf-8"));
|
|
43749
|
+
let updated = false;
|
|
43750
|
+
for (const deps of [pkgJson.dependencies, pkgJson.devDependencies]) {
|
|
43751
|
+
if (!deps)
|
|
43752
|
+
continue;
|
|
43753
|
+
for (const [dep, version] of Object.entries(deps)) {
|
|
43754
|
+
if (version === "*") {
|
|
43755
|
+
deps[dep] = "workspace:*";
|
|
43756
|
+
updated = true;
|
|
43757
|
+
}
|
|
43758
|
+
}
|
|
43759
|
+
}
|
|
43760
|
+
if (updated) {
|
|
43761
|
+
(0, node_fs_1.writeFileSync)(pkgJsonPath, JSON.stringify(pkgJson, null, 2) + "\n");
|
|
43762
|
+
}
|
|
43763
|
+
} catch {
|
|
43764
|
+
}
|
|
43765
|
+
}
|
|
43766
|
+
}
|
|
43767
|
+
function findAllWorkspacePackageJsons(root, maxDepth = 2) {
|
|
43768
|
+
const results = [];
|
|
43769
|
+
for (const dir of ["packages", "libs", "apps"]) {
|
|
43770
|
+
const fullPath = (0, node_path_1.join)(root, dir);
|
|
43771
|
+
if ((0, node_fs_1.existsSync)(fullPath)) {
|
|
43772
|
+
findPackageJsonsRecursive(fullPath, 1, maxDepth, results);
|
|
43773
|
+
}
|
|
43774
|
+
}
|
|
43775
|
+
return results;
|
|
43776
|
+
}
|
|
43777
|
+
function findPackageJsonsRecursive(dir, currentDepth, maxDepth, results) {
|
|
43778
|
+
if (currentDepth > maxDepth) {
|
|
43779
|
+
return;
|
|
43780
|
+
}
|
|
43781
|
+
try {
|
|
43782
|
+
const entries = (0, node_fs_1.readdirSync)(dir, { withFileTypes: true });
|
|
43783
|
+
for (const entry of entries) {
|
|
43784
|
+
if (!entry.isDirectory())
|
|
43785
|
+
continue;
|
|
43786
|
+
const entryPath = (0, node_path_1.join)(dir, entry.name);
|
|
43787
|
+
const pkgJsonPath = (0, node_path_1.join)(entryPath, "package.json");
|
|
43788
|
+
if ((0, node_fs_1.existsSync)(pkgJsonPath)) {
|
|
43789
|
+
results.push(pkgJsonPath);
|
|
43790
|
+
}
|
|
43791
|
+
if (currentDepth < maxDepth) {
|
|
43792
|
+
findPackageJsonsRecursive(entryPath, currentDepth + 1, maxDepth, results);
|
|
43793
|
+
}
|
|
43794
|
+
}
|
|
43795
|
+
} catch {
|
|
43796
|
+
}
|
|
43797
|
+
}
|
|
43798
|
+
function findWorkspacePackages(root) {
|
|
43799
|
+
const packages = [];
|
|
43800
|
+
const packageJsonPaths = findAllWorkspacePackageJsons(root);
|
|
43801
|
+
for (const pkgJsonPath of packageJsonPaths) {
|
|
43802
|
+
try {
|
|
43803
|
+
const pkgJson = JSON.parse((0, node_fs_1.readFileSync)(pkgJsonPath, "utf-8"));
|
|
43804
|
+
if (pkgJson.name) {
|
|
43805
|
+
packages.push(pkgJson.name);
|
|
43806
|
+
}
|
|
43807
|
+
} catch {
|
|
43808
|
+
}
|
|
43809
|
+
}
|
|
43810
|
+
return packages.sort();
|
|
43811
|
+
}
|
|
42804
43812
|
var pmVersionCache = /* @__PURE__ */ new Map();
|
|
42805
43813
|
function getPackageManagerVersion(packageManager, cwd = process.cwd()) {
|
|
42806
43814
|
if (pmVersionCache.has(packageManager)) {
|
|
@@ -42992,7 +44000,6 @@ var require_create_empty_workspace = __commonJS({
|
|
|
42992
44000
|
var path_1 = require("path");
|
|
42993
44001
|
var child_process_utils_1 = require_child_process_utils();
|
|
42994
44002
|
var error_utils_1 = require_error_utils();
|
|
42995
|
-
var output_1 = require_output();
|
|
42996
44003
|
var package_manager_1 = require_package_manager();
|
|
42997
44004
|
var unparse_1 = require_unparse();
|
|
42998
44005
|
async function createEmptyWorkspace(tmpDir, name, packageManager, options) {
|
|
@@ -43021,15 +44028,8 @@ var require_create_empty_workspace = __commonJS({
|
|
|
43021
44028
|
workspaceSetupSpinner.succeed(`Successfully created the workspace: ${directory}`);
|
|
43022
44029
|
} catch (e) {
|
|
43023
44030
|
workspaceSetupSpinner.fail();
|
|
43024
|
-
|
|
43025
|
-
|
|
43026
|
-
title: `Failed to create a workspace.`,
|
|
43027
|
-
bodyLines: (0, error_utils_1.mapErrorToBodyLines)(e)
|
|
43028
|
-
});
|
|
43029
|
-
} else {
|
|
43030
|
-
console.error(e);
|
|
43031
|
-
}
|
|
43032
|
-
process.exit(1);
|
|
44031
|
+
const message2 = e instanceof Error ? e.message : String(e);
|
|
44032
|
+
throw new error_utils_1.CnwError("WORKSPACE_CREATION_FAILED", `Failed to create a workspace: ${message2}`);
|
|
43033
44033
|
} finally {
|
|
43034
44034
|
workspaceSetupSpinner.stop();
|
|
43035
44035
|
}
|
|
@@ -43044,7 +44044,7 @@ var require_create_preset = __commonJS({
|
|
|
43044
44044
|
"use strict";
|
|
43045
44045
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
43046
44046
|
exports2.createPreset = createPreset;
|
|
43047
|
-
var
|
|
44047
|
+
var error_utils_1 = require_error_utils();
|
|
43048
44048
|
var package_manager_1 = require_package_manager();
|
|
43049
44049
|
var child_process_utils_1 = require_child_process_utils();
|
|
43050
44050
|
var unparse_1 = require_unparse();
|
|
@@ -43075,11 +44075,7 @@ var require_create_preset = __commonJS({
|
|
|
43075
44075
|
args2.push("nx", `--nxWorkspaceRoot=${nxWorkspaceRoot}`, ...command.split(" "));
|
|
43076
44076
|
await (0, child_process_utils_1.spawnAndWait)(exec4, args2, directory);
|
|
43077
44077
|
} catch (e) {
|
|
43078
|
-
|
|
43079
|
-
title: `Failed to apply preset: ${preset}`,
|
|
43080
|
-
bodyLines: ["See above"]
|
|
43081
|
-
});
|
|
43082
|
-
process.exit(1);
|
|
44078
|
+
throw new error_utils_1.CnwError("PRESET_FAILED", `Failed to apply preset: ${preset}`);
|
|
43083
44079
|
}
|
|
43084
44080
|
}
|
|
43085
44081
|
}
|
|
@@ -43089,15 +44085,15 @@ var require_create_preset = __commonJS({
|
|
|
43089
44085
|
var require_tmp = __commonJS({
|
|
43090
44086
|
"node_modules/tmp/lib/tmp.js"(exports2, module2) {
|
|
43091
44087
|
var fs5 = require("fs");
|
|
43092
|
-
var
|
|
44088
|
+
var os3 = require("os");
|
|
43093
44089
|
var path7 = require("path");
|
|
43094
44090
|
var crypto2 = require("crypto");
|
|
43095
|
-
var _c = { fs: fs5.constants, os:
|
|
44091
|
+
var _c = { fs: fs5.constants, os: os3.constants };
|
|
43096
44092
|
var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
43097
44093
|
var TEMPLATE_PATTERN = /XXXXXX/;
|
|
43098
44094
|
var DEFAULT_TRIES = 3;
|
|
43099
44095
|
var CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR);
|
|
43100
|
-
var IS_WIN32 =
|
|
44096
|
+
var IS_WIN32 = os3.platform() === "win32";
|
|
43101
44097
|
var EBADF = _c.EBADF || _c.os.errno.EBADF;
|
|
43102
44098
|
var ENOENT = _c.ENOENT || _c.os.errno.ENOENT;
|
|
43103
44099
|
var DIR_MODE = 448;
|
|
@@ -43420,10 +44416,10 @@ var require_tmp = __commonJS({
|
|
|
43420
44416
|
_gracefulCleanup = true;
|
|
43421
44417
|
}
|
|
43422
44418
|
function _getTmpDir(options, cb) {
|
|
43423
|
-
return fs5.realpath(options && options.tmpdir ||
|
|
44419
|
+
return fs5.realpath(options && options.tmpdir || os3.tmpdir(), cb);
|
|
43424
44420
|
}
|
|
43425
44421
|
function _getTmpDirSync(options) {
|
|
43426
|
-
return fs5.realpathSync(options && options.tmpdir ||
|
|
44422
|
+
return fs5.realpathSync(options && options.tmpdir || os3.tmpdir());
|
|
43427
44423
|
}
|
|
43428
44424
|
process.addListener(EXIT, _garbageCollector);
|
|
43429
44425
|
Object.defineProperty(module2.exports, "tmpdir", {
|
|
@@ -43448,9 +44444,9 @@ var require_package2 = __commonJS({
|
|
|
43448
44444
|
"node_modules/create-nx-workspace/package.json"(exports2, module2) {
|
|
43449
44445
|
module2.exports = {
|
|
43450
44446
|
name: "create-nx-workspace",
|
|
43451
|
-
version: "22.2
|
|
44447
|
+
version: "22.5.2",
|
|
43452
44448
|
private: false,
|
|
43453
|
-
description: "Smart
|
|
44449
|
+
description: "Smart Monorepos \xB7 Fast Builds",
|
|
43454
44450
|
repository: {
|
|
43455
44451
|
type: "git",
|
|
43456
44452
|
url: "https://github.com/nrwl/nx.git",
|
|
@@ -43519,7 +44515,6 @@ var require_create_sandbox = __commonJS({
|
|
|
43519
44515
|
var path_1 = require("path");
|
|
43520
44516
|
var package_manager_1 = require_package_manager();
|
|
43521
44517
|
var child_process_utils_1 = require_child_process_utils();
|
|
43522
|
-
var output_1 = require_output();
|
|
43523
44518
|
var nx_version_1 = require_nx_version();
|
|
43524
44519
|
var error_utils_1 = require_error_utils();
|
|
43525
44520
|
async function createSandbox(packageManager) {
|
|
@@ -43542,15 +44537,8 @@ var require_create_sandbox = __commonJS({
|
|
|
43542
44537
|
installSpinner.succeed();
|
|
43543
44538
|
} catch (e) {
|
|
43544
44539
|
installSpinner.fail();
|
|
43545
|
-
|
|
43546
|
-
|
|
43547
|
-
title: `Failed to install dependencies`,
|
|
43548
|
-
bodyLines: (0, error_utils_1.mapErrorToBodyLines)(e)
|
|
43549
|
-
});
|
|
43550
|
-
} else {
|
|
43551
|
-
console.error(e);
|
|
43552
|
-
}
|
|
43553
|
-
process.exit(1);
|
|
44540
|
+
const message2 = e instanceof Error ? e.message : String(e);
|
|
44541
|
+
throw new error_utils_1.CnwError("SANDBOX_FAILED", `Failed to install dependencies: ${message2}`);
|
|
43554
44542
|
} finally {
|
|
43555
44543
|
installSpinner.stop();
|
|
43556
44544
|
}
|
|
@@ -43568,7 +44556,6 @@ var require_setup_ci = __commonJS({
|
|
|
43568
44556
|
var ora = require_ora();
|
|
43569
44557
|
var child_process_utils_1 = require_child_process_utils();
|
|
43570
44558
|
var error_utils_1 = require_error_utils();
|
|
43571
|
-
var output_1 = require_output();
|
|
43572
44559
|
var package_manager_1 = require_package_manager();
|
|
43573
44560
|
async function setupCI(directory, ci, packageManager) {
|
|
43574
44561
|
const ciSpinner = ora(`Generating CI workflow`).start();
|
|
@@ -43579,15 +44566,8 @@ var require_setup_ci = __commonJS({
|
|
|
43579
44566
|
return res;
|
|
43580
44567
|
} catch (e) {
|
|
43581
44568
|
ciSpinner.fail();
|
|
43582
|
-
|
|
43583
|
-
|
|
43584
|
-
title: `Failed to generate CI workflow`,
|
|
43585
|
-
bodyLines: (0, error_utils_1.mapErrorToBodyLines)(e)
|
|
43586
|
-
});
|
|
43587
|
-
} else {
|
|
43588
|
-
console.error(e);
|
|
43589
|
-
}
|
|
43590
|
-
process.exit(1);
|
|
44569
|
+
const message2 = e instanceof Error ? e.message : String(e);
|
|
44570
|
+
throw new error_utils_1.CnwError("CI_WORKFLOW_FAILED", `Failed to generate CI workflow: ${message2}`);
|
|
43591
44571
|
} finally {
|
|
43592
44572
|
ciSpinner.stop();
|
|
43593
44573
|
}
|
|
@@ -43613,6 +44593,172 @@ var require_default_base = __commonJS({
|
|
|
43613
44593
|
}
|
|
43614
44594
|
});
|
|
43615
44595
|
|
|
44596
|
+
// node_modules/create-nx-workspace/src/utils/ci/is-ci.js
|
|
44597
|
+
var require_is_ci = __commonJS({
|
|
44598
|
+
"node_modules/create-nx-workspace/src/utils/ci/is-ci.js"(exports2) {
|
|
44599
|
+
"use strict";
|
|
44600
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
44601
|
+
exports2.isCI = isCI2;
|
|
44602
|
+
function isCI2() {
|
|
44603
|
+
return process.env.CI && process.env.CI !== "false" || process.env.TF_BUILD === "true" || process.env.GITHUB_ACTIONS === "true" || process.env.BUILDKITE === "true" || process.env.CIRCLECI === "true" || process.env.CIRRUS_CI === "true" || process.env.TRAVIS === "true" || !!process.env["bamboo.buildKey"] || !!process.env.CODEBUILD_BUILD_ID || !!process.env.GITLAB_CI || !!process.env.HEROKU_TEST_RUN_ID || !!process.env.BUILD_ID || !!process.env.BUILD_BUILDID || !!process.env.TEAMCITY_VERSION;
|
|
44604
|
+
}
|
|
44605
|
+
}
|
|
44606
|
+
});
|
|
44607
|
+
|
|
44608
|
+
// node_modules/create-nx-workspace/src/utils/output.js
|
|
44609
|
+
var require_output = __commonJS({
|
|
44610
|
+
"node_modules/create-nx-workspace/src/utils/output.js"(exports2) {
|
|
44611
|
+
"use strict";
|
|
44612
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
44613
|
+
exports2.output = exports2.CLIOutput = void 0;
|
|
44614
|
+
var chalk = require_source();
|
|
44615
|
+
var os_1 = require("os");
|
|
44616
|
+
var is_ci_1 = require_is_ci();
|
|
44617
|
+
if ((0, is_ci_1.isCI)()) {
|
|
44618
|
+
chalk.level = 0;
|
|
44619
|
+
}
|
|
44620
|
+
var CLIOutput = class {
|
|
44621
|
+
constructor(real = true) {
|
|
44622
|
+
this.real = real;
|
|
44623
|
+
this.outstream = this.real ? process.stdout : new FakeStdout();
|
|
44624
|
+
this.colors = {
|
|
44625
|
+
gray: chalk.gray,
|
|
44626
|
+
green: chalk.green,
|
|
44627
|
+
red: chalk.red,
|
|
44628
|
+
cyan: chalk.cyan,
|
|
44629
|
+
white: chalk.white
|
|
44630
|
+
};
|
|
44631
|
+
this.bold = chalk.bold;
|
|
44632
|
+
this.underline = chalk.underline;
|
|
44633
|
+
this.dim = chalk.dim;
|
|
44634
|
+
this.cliName = "NX";
|
|
44635
|
+
}
|
|
44636
|
+
/**
|
|
44637
|
+
* Longer dash character which forms more of a continuous line when place side to side
|
|
44638
|
+
* with itself, unlike the standard dash character
|
|
44639
|
+
*/
|
|
44640
|
+
get VERTICAL_SEPARATOR() {
|
|
44641
|
+
let divider = "";
|
|
44642
|
+
for (let i = 0; i < process.stdout.columns - 1; i++) {
|
|
44643
|
+
divider += "\u2014";
|
|
44644
|
+
}
|
|
44645
|
+
return divider;
|
|
44646
|
+
}
|
|
44647
|
+
writeToStdOut(str) {
|
|
44648
|
+
this.outstream.write(str);
|
|
44649
|
+
}
|
|
44650
|
+
writeOutputTitle({ color: color2, title }) {
|
|
44651
|
+
this.writeToStdOut(`${this.applyCLIPrefix(color2, title)}${os_1.EOL}`);
|
|
44652
|
+
}
|
|
44653
|
+
writeOptionalOutputBody(bodyLines) {
|
|
44654
|
+
if (!bodyLines) {
|
|
44655
|
+
return;
|
|
44656
|
+
}
|
|
44657
|
+
this.addNewline();
|
|
44658
|
+
bodyLines.forEach((bodyLine) => this.writeToStdOut(`${bodyLine}${os_1.EOL}`));
|
|
44659
|
+
}
|
|
44660
|
+
setCliName(name) {
|
|
44661
|
+
this.cliName = name;
|
|
44662
|
+
}
|
|
44663
|
+
applyCLIPrefix(color2 = "cyan", text) {
|
|
44664
|
+
let cliPrefix = "";
|
|
44665
|
+
if (chalk[color2]) {
|
|
44666
|
+
cliPrefix = chalk.reset.inverse.bold[color2](` ${this.cliName} `);
|
|
44667
|
+
} else {
|
|
44668
|
+
cliPrefix = chalk.reset.inverse.bold.keyword(color2)(` ${this.cliName} `);
|
|
44669
|
+
}
|
|
44670
|
+
return `${cliPrefix} ${text}`;
|
|
44671
|
+
}
|
|
44672
|
+
addNewline() {
|
|
44673
|
+
this.writeToStdOut(os_1.EOL);
|
|
44674
|
+
}
|
|
44675
|
+
/**
|
|
44676
|
+
* Write lines directly without CLI prefix/badge.
|
|
44677
|
+
* Used for banner output when no title is needed.
|
|
44678
|
+
*/
|
|
44679
|
+
writeLines(lines) {
|
|
44680
|
+
lines.forEach((line) => this.writeToStdOut(`${line}${os_1.EOL}`));
|
|
44681
|
+
}
|
|
44682
|
+
addVerticalSeparator(color2 = "gray") {
|
|
44683
|
+
this.addNewline();
|
|
44684
|
+
this.addVerticalSeparatorWithoutNewLines(color2);
|
|
44685
|
+
this.addNewline();
|
|
44686
|
+
}
|
|
44687
|
+
addVerticalSeparatorWithoutNewLines(color2 = "gray") {
|
|
44688
|
+
this.writeToStdOut(`${chalk.dim[color2](this.VERTICAL_SEPARATOR)}${os_1.EOL}`);
|
|
44689
|
+
}
|
|
44690
|
+
error({ title, bodyLines }) {
|
|
44691
|
+
this.addNewline();
|
|
44692
|
+
this.writeOutputTitle({
|
|
44693
|
+
color: "red",
|
|
44694
|
+
title: chalk.red(title)
|
|
44695
|
+
});
|
|
44696
|
+
this.writeOptionalOutputBody(bodyLines);
|
|
44697
|
+
this.addNewline();
|
|
44698
|
+
}
|
|
44699
|
+
warn({ title, bodyLines }) {
|
|
44700
|
+
this.addNewline();
|
|
44701
|
+
this.writeOutputTitle({
|
|
44702
|
+
color: "yellow",
|
|
44703
|
+
title: chalk.yellow(title)
|
|
44704
|
+
});
|
|
44705
|
+
this.writeOptionalOutputBody(bodyLines);
|
|
44706
|
+
this.addNewline();
|
|
44707
|
+
}
|
|
44708
|
+
note({ title, bodyLines }) {
|
|
44709
|
+
this.addNewline();
|
|
44710
|
+
this.writeOutputTitle({
|
|
44711
|
+
color: "orange",
|
|
44712
|
+
title: chalk.keyword("orange")(title)
|
|
44713
|
+
});
|
|
44714
|
+
this.writeOptionalOutputBody(bodyLines);
|
|
44715
|
+
this.addNewline();
|
|
44716
|
+
}
|
|
44717
|
+
success({ title, bodyLines }) {
|
|
44718
|
+
this.addNewline();
|
|
44719
|
+
this.writeOutputTitle({
|
|
44720
|
+
color: "green",
|
|
44721
|
+
title: chalk.green(title)
|
|
44722
|
+
});
|
|
44723
|
+
this.writeOptionalOutputBody(bodyLines);
|
|
44724
|
+
}
|
|
44725
|
+
logSingleLine(message2) {
|
|
44726
|
+
this.addNewline();
|
|
44727
|
+
this.writeOutputTitle({
|
|
44728
|
+
color: "gray",
|
|
44729
|
+
title: message2
|
|
44730
|
+
});
|
|
44731
|
+
this.addNewline();
|
|
44732
|
+
}
|
|
44733
|
+
log({ title, bodyLines, color: color2 }) {
|
|
44734
|
+
this.addNewline();
|
|
44735
|
+
this.writeOutputTitle({
|
|
44736
|
+
color: "cyan",
|
|
44737
|
+
title: color2 ? chalk[color2](title) : title
|
|
44738
|
+
});
|
|
44739
|
+
this.writeOptionalOutputBody(bodyLines);
|
|
44740
|
+
this.addNewline();
|
|
44741
|
+
}
|
|
44742
|
+
getOutput() {
|
|
44743
|
+
return this.outstream.toString();
|
|
44744
|
+
}
|
|
44745
|
+
};
|
|
44746
|
+
exports2.CLIOutput = CLIOutput;
|
|
44747
|
+
exports2.output = new CLIOutput();
|
|
44748
|
+
var FakeStdout = class {
|
|
44749
|
+
constructor() {
|
|
44750
|
+
this.content = "";
|
|
44751
|
+
}
|
|
44752
|
+
write(str) {
|
|
44753
|
+
this.content += str;
|
|
44754
|
+
}
|
|
44755
|
+
toString() {
|
|
44756
|
+
return this.content;
|
|
44757
|
+
}
|
|
44758
|
+
};
|
|
44759
|
+
}
|
|
44760
|
+
});
|
|
44761
|
+
|
|
43616
44762
|
// node_modules/ansi-colors/symbols.js
|
|
43617
44763
|
var require_symbols = __commonJS({
|
|
43618
44764
|
"node_modules/ansi-colors/symbols.js"(exports2, module2) {
|
|
@@ -44232,7 +45378,7 @@ var require_keypress = __commonJS({
|
|
|
44232
45378
|
/* misc. */
|
|
44233
45379
|
"[Z": "tab"
|
|
44234
45380
|
};
|
|
44235
|
-
function
|
|
45381
|
+
function isShiftKey2(code) {
|
|
44236
45382
|
return ["[a", "[b", "[c", "[d", "[e", "[2$", "[3$", "[5$", "[6$", "[7$", "[8$", "[Z"].includes(code);
|
|
44237
45383
|
}
|
|
44238
45384
|
function isCtrlKey(code) {
|
|
@@ -44304,7 +45450,7 @@ var require_keypress = __commonJS({
|
|
|
44304
45450
|
key.shift = !!(modifier & 1);
|
|
44305
45451
|
key.code = code;
|
|
44306
45452
|
key.name = keyName[code];
|
|
44307
|
-
key.shift =
|
|
45453
|
+
key.shift = isShiftKey2(code) || key.shift;
|
|
44308
45454
|
key.ctrl = isCtrlKey(code) || key.ctrl;
|
|
44309
45455
|
}
|
|
44310
45456
|
return key;
|
|
@@ -48064,8 +49210,11 @@ var require_git = __commonJS({
|
|
|
48064
49210
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
48065
49211
|
exports2.GitHubPushSkippedError = exports2.VcsPushStatus = void 0;
|
|
48066
49212
|
exports2.checkGitVersion = checkGitVersion;
|
|
49213
|
+
exports2.isGitAvailable = isGitAvailable;
|
|
49214
|
+
exports2.isGhCliAvailable = isGhCliAvailable;
|
|
48067
49215
|
exports2.initializeGitRepo = initializeGitRepo;
|
|
48068
49216
|
exports2.pushToGitHub = pushToGitHub;
|
|
49217
|
+
var child_process_1 = require("child_process");
|
|
48069
49218
|
var default_base_1 = require_default_base();
|
|
48070
49219
|
var output_1 = require_output();
|
|
48071
49220
|
var child_process_utils_1 = require_child_process_utils();
|
|
@@ -48094,6 +49243,22 @@ var require_git = __commonJS({
|
|
|
48094
49243
|
return null;
|
|
48095
49244
|
}
|
|
48096
49245
|
}
|
|
49246
|
+
function isGitAvailable() {
|
|
49247
|
+
try {
|
|
49248
|
+
(0, child_process_1.execSync)("git --version", { stdio: "ignore" });
|
|
49249
|
+
return true;
|
|
49250
|
+
} catch {
|
|
49251
|
+
return false;
|
|
49252
|
+
}
|
|
49253
|
+
}
|
|
49254
|
+
function isGhCliAvailable() {
|
|
49255
|
+
try {
|
|
49256
|
+
(0, child_process_1.execSync)("gh --version", { stdio: "ignore" });
|
|
49257
|
+
return true;
|
|
49258
|
+
} catch {
|
|
49259
|
+
return false;
|
|
49260
|
+
}
|
|
49261
|
+
}
|
|
48097
49262
|
async function getGitHubUsername(directory) {
|
|
48098
49263
|
const result = await (0, child_process_utils_1.execAndWait)("gh api user --jq .login", directory);
|
|
48099
49264
|
const username = result.stdout.trim();
|
|
@@ -48231,18 +49396,8 @@ ${options.connectUrl}
|
|
|
48231
49396
|
});
|
|
48232
49397
|
return VcsPushStatus.PushedToVcs;
|
|
48233
49398
|
} catch (e) {
|
|
48234
|
-
const
|
|
48235
|
-
|
|
48236
|
-
const title = e instanceof GitHubPushSkippedError || e?.code === 127 ? "Push your workspace to GitHub." : "Could not push. Push repo to complete setup.";
|
|
48237
|
-
const createRepoUrl = `https://github.com/new?name=${encodeURIComponent(options.name)}`;
|
|
48238
|
-
output_1.output.log({
|
|
48239
|
-
title,
|
|
48240
|
-
bodyLines: isVerbose ? [
|
|
48241
|
-
`Go to ${createRepoUrl} and push this workspace.`,
|
|
48242
|
-
"Error details:",
|
|
48243
|
-
errorMessage
|
|
48244
|
-
] : [`Go to ${createRepoUrl} and push this workspace.`]
|
|
48245
|
-
});
|
|
49399
|
+
const title = e instanceof GitHubPushSkippedError || e?.code === 127 ? "Push your workspace to GitHub." : "Could not push.";
|
|
49400
|
+
output_1.output.log({ title });
|
|
48246
49401
|
return VcsPushStatus.FailedToPushToVcs;
|
|
48247
49402
|
}
|
|
48248
49403
|
}
|
|
@@ -48257,13 +49412,34 @@ var require_messages = __commonJS({
|
|
|
48257
49412
|
exports2.getCompletionMessage = getCompletionMessage;
|
|
48258
49413
|
exports2.getSkippedCloudMessage = getSkippedCloudMessage;
|
|
48259
49414
|
var git_1 = require_git();
|
|
48260
|
-
function
|
|
49415
|
+
function generateSimpleBanner(url2) {
|
|
49416
|
+
const content = `Finish your set up here: ${url2}`;
|
|
49417
|
+
const innerWidth = content.length + 6;
|
|
49418
|
+
const horizontalBorder = "+" + "-".repeat(innerWidth) + "+";
|
|
49419
|
+
const emptyLine = "|" + " ".repeat(innerWidth) + "|";
|
|
49420
|
+
const contentLine = "| " + content + " |";
|
|
49421
|
+
return [
|
|
49422
|
+
horizontalBorder,
|
|
49423
|
+
emptyLine,
|
|
49424
|
+
contentLine,
|
|
49425
|
+
emptyLine,
|
|
49426
|
+
horizontalBorder
|
|
49427
|
+
];
|
|
49428
|
+
}
|
|
49429
|
+
function getBannerLines(variant, url2) {
|
|
49430
|
+
if (variant === "2") {
|
|
49431
|
+
return generateSimpleBanner(url2);
|
|
49432
|
+
}
|
|
49433
|
+
return [];
|
|
49434
|
+
}
|
|
49435
|
+
function getSetupMessage(url2, pushedToVcs, workspaceName) {
|
|
49436
|
+
const githubUrl = workspaceName ? `https://github.com/new?name=${encodeURIComponent(workspaceName)}` : "https://github.com/new";
|
|
48261
49437
|
if (pushedToVcs === git_1.VcsPushStatus.PushedToVcs) {
|
|
48262
49438
|
return url2 ? `Go to Nx Cloud and finish the setup: ${url2}` : "Return to Nx Cloud and finish the setup.";
|
|
48263
49439
|
}
|
|
48264
49440
|
const action = url2 ? "go" : "return";
|
|
48265
49441
|
const urlSuffix = url2 ? `: ${url2}` : ".";
|
|
48266
|
-
return `Push your repo, then ${action} to Nx Cloud and finish the setup${urlSuffix}`;
|
|
49442
|
+
return `Push your repo (${githubUrl}), then ${action} to Nx Cloud and finish the setup${urlSuffix}`;
|
|
48267
49443
|
}
|
|
48268
49444
|
var completionMessages = {
|
|
48269
49445
|
"ci-setup": {
|
|
@@ -48276,11 +49452,24 @@ var require_messages = __commonJS({
|
|
|
48276
49452
|
title: "Your platform setup is almost complete."
|
|
48277
49453
|
}
|
|
48278
49454
|
};
|
|
48279
|
-
function getCompletionMessage(completionMessageKey, url2, pushedToVcs) {
|
|
49455
|
+
function getCompletionMessage(completionMessageKey, url2, pushedToVcs, workspaceName, bannerVariant) {
|
|
48280
49456
|
const key = completionMessageKey ?? "ci-setup";
|
|
49457
|
+
const messageConfig = completionMessages[key];
|
|
49458
|
+
const variant = bannerVariant ?? "0";
|
|
49459
|
+
const title = variant === "2" ? "" : messageConfig.title;
|
|
49460
|
+
if (variant !== "0" && url2) {
|
|
49461
|
+
const bannerLines = getBannerLines(variant, url2);
|
|
49462
|
+
if (bannerLines.length > 0) {
|
|
49463
|
+
return {
|
|
49464
|
+
title,
|
|
49465
|
+
bodyLines: [...bannerLines, ""]
|
|
49466
|
+
};
|
|
49467
|
+
}
|
|
49468
|
+
}
|
|
49469
|
+
const bodyLines = [getSetupMessage(url2, pushedToVcs, workspaceName)];
|
|
48281
49470
|
return {
|
|
48282
|
-
title
|
|
48283
|
-
bodyLines
|
|
49471
|
+
title,
|
|
49472
|
+
bodyLines
|
|
48284
49473
|
};
|
|
48285
49474
|
}
|
|
48286
49475
|
function getSkippedCloudMessage() {
|
|
@@ -48368,8 +49557,8 @@ var require_axios = __commonJS({
|
|
|
48368
49557
|
if (kindOf2(val) !== "object") {
|
|
48369
49558
|
return false;
|
|
48370
49559
|
}
|
|
48371
|
-
const
|
|
48372
|
-
return (
|
|
49560
|
+
const prototype3 = getPrototypeOf2(val);
|
|
49561
|
+
return (prototype3 === null || prototype3 === Object.prototype || Object.getPrototypeOf(prototype3) === null) && !(toStringTag2 in val) && !(iterator2 in val);
|
|
48373
49562
|
};
|
|
48374
49563
|
var isEmptyObject2 = (val) => {
|
|
48375
49564
|
if (!isObject2(val) || isBuffer2(val)) {
|
|
@@ -48392,7 +49581,12 @@ var require_axios = __commonJS({
|
|
|
48392
49581
|
kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
|
|
48393
49582
|
};
|
|
48394
49583
|
var isURLSearchParams2 = kindOfTest2("URLSearchParams");
|
|
48395
|
-
var [isReadableStream2, isRequest2, isResponse2, isHeaders2] = [
|
|
49584
|
+
var [isReadableStream2, isRequest2, isResponse2, isHeaders2] = [
|
|
49585
|
+
"ReadableStream",
|
|
49586
|
+
"Request",
|
|
49587
|
+
"Response",
|
|
49588
|
+
"Headers"
|
|
49589
|
+
].map(kindOfTest2);
|
|
48396
49590
|
var trim3 = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
48397
49591
|
function forEach2(obj, fn, { allOwnKeys = false } = {}) {
|
|
48398
49592
|
if (obj === null || typeof obj === "undefined") {
|
|
@@ -48445,6 +49639,9 @@ var require_axios = __commonJS({
|
|
|
48445
49639
|
const { caseless, skipUndefined } = isContextDefined2(this) && this || {};
|
|
48446
49640
|
const result = {};
|
|
48447
49641
|
const assignValue = (val, key) => {
|
|
49642
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
49643
|
+
return;
|
|
49644
|
+
}
|
|
48448
49645
|
const targetKey = caseless && findKey3(result, key) || key;
|
|
48449
49646
|
if (isPlainObject3(result[targetKey]) && isPlainObject3(val)) {
|
|
48450
49647
|
result[targetKey] = merge3(result[targetKey], val);
|
|
@@ -48462,13 +49659,27 @@ var require_axios = __commonJS({
|
|
|
48462
49659
|
return result;
|
|
48463
49660
|
}
|
|
48464
49661
|
var extend2 = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
48465
|
-
forEach2(
|
|
48466
|
-
|
|
48467
|
-
|
|
48468
|
-
|
|
48469
|
-
|
|
48470
|
-
|
|
48471
|
-
|
|
49662
|
+
forEach2(
|
|
49663
|
+
b,
|
|
49664
|
+
(val, key) => {
|
|
49665
|
+
if (thisArg && isFunction$1(val)) {
|
|
49666
|
+
Object.defineProperty(a, key, {
|
|
49667
|
+
value: bind2(val, thisArg),
|
|
49668
|
+
writable: true,
|
|
49669
|
+
enumerable: true,
|
|
49670
|
+
configurable: true
|
|
49671
|
+
});
|
|
49672
|
+
} else {
|
|
49673
|
+
Object.defineProperty(a, key, {
|
|
49674
|
+
value: val,
|
|
49675
|
+
writable: true,
|
|
49676
|
+
enumerable: true,
|
|
49677
|
+
configurable: true
|
|
49678
|
+
});
|
|
49679
|
+
}
|
|
49680
|
+
},
|
|
49681
|
+
{ allOwnKeys }
|
|
49682
|
+
);
|
|
48472
49683
|
return a;
|
|
48473
49684
|
};
|
|
48474
49685
|
var stripBOM2 = (content) => {
|
|
@@ -48477,9 +49688,17 @@ var require_axios = __commonJS({
|
|
|
48477
49688
|
}
|
|
48478
49689
|
return content;
|
|
48479
49690
|
};
|
|
48480
|
-
var inherits2 = (constructor, superConstructor, props,
|
|
48481
|
-
constructor.prototype = Object.create(
|
|
48482
|
-
|
|
49691
|
+
var inherits2 = (constructor, superConstructor, props, descriptors) => {
|
|
49692
|
+
constructor.prototype = Object.create(
|
|
49693
|
+
superConstructor.prototype,
|
|
49694
|
+
descriptors
|
|
49695
|
+
);
|
|
49696
|
+
Object.defineProperty(constructor.prototype, "constructor", {
|
|
49697
|
+
value: constructor,
|
|
49698
|
+
writable: true,
|
|
49699
|
+
enumerable: false,
|
|
49700
|
+
configurable: true
|
|
49701
|
+
});
|
|
48483
49702
|
Object.defineProperty(constructor, "super", {
|
|
48484
49703
|
value: superConstructor.prototype
|
|
48485
49704
|
});
|
|
@@ -48550,19 +49769,16 @@ var require_axios = __commonJS({
|
|
|
48550
49769
|
};
|
|
48551
49770
|
var isHTMLForm2 = kindOfTest2("HTMLFormElement");
|
|
48552
49771
|
var toCamelCase2 = (str) => {
|
|
48553
|
-
return str.toLowerCase().replace(
|
|
48554
|
-
|
|
48555
|
-
|
|
48556
|
-
return p1.toUpperCase() + p2;
|
|
48557
|
-
}
|
|
48558
|
-
);
|
|
49772
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
49773
|
+
return p1.toUpperCase() + p2;
|
|
49774
|
+
});
|
|
48559
49775
|
};
|
|
48560
49776
|
var hasOwnProperty2 = (({ hasOwnProperty: hasOwnProperty3 }) => (obj, prop) => hasOwnProperty3.call(obj, prop))(Object.prototype);
|
|
48561
49777
|
var isRegExp2 = kindOfTest2("RegExp");
|
|
48562
49778
|
var reduceDescriptors2 = (obj, reducer) => {
|
|
48563
|
-
const
|
|
49779
|
+
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
48564
49780
|
const reducedDescriptors = {};
|
|
48565
|
-
forEach2(
|
|
49781
|
+
forEach2(descriptors, (descriptor, name) => {
|
|
48566
49782
|
let ret;
|
|
48567
49783
|
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
|
48568
49784
|
reducedDescriptors[name] = ret || descriptor;
|
|
@@ -48639,20 +49855,21 @@ var require_axios = __commonJS({
|
|
|
48639
49855
|
return setImmediate;
|
|
48640
49856
|
}
|
|
48641
49857
|
return postMessageSupported ? ((token, callbacks) => {
|
|
48642
|
-
_global2.addEventListener(
|
|
48643
|
-
|
|
48644
|
-
|
|
48645
|
-
|
|
48646
|
-
|
|
49858
|
+
_global2.addEventListener(
|
|
49859
|
+
"message",
|
|
49860
|
+
({ source, data }) => {
|
|
49861
|
+
if (source === _global2 && data === token) {
|
|
49862
|
+
callbacks.length && callbacks.shift()();
|
|
49863
|
+
}
|
|
49864
|
+
},
|
|
49865
|
+
false
|
|
49866
|
+
);
|
|
48647
49867
|
return (cb) => {
|
|
48648
49868
|
callbacks.push(cb);
|
|
48649
49869
|
_global2.postMessage(token, "*");
|
|
48650
49870
|
};
|
|
48651
49871
|
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
48652
|
-
})(
|
|
48653
|
-
typeof setImmediate === "function",
|
|
48654
|
-
isFunction$1(_global2.postMessage)
|
|
48655
|
-
);
|
|
49872
|
+
})(typeof setImmediate === "function", isFunction$1(_global2.postMessage));
|
|
48656
49873
|
var asap2 = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global2) : typeof process !== "undefined" && process.nextTick || _setImmediate2;
|
|
48657
49874
|
var isIterable2 = (thing) => thing != null && isFunction$1(thing[iterator2]);
|
|
48658
49875
|
var utils$1 = {
|
|
@@ -48715,25 +49932,38 @@ var require_axios = __commonJS({
|
|
|
48715
49932
|
asap: asap2,
|
|
48716
49933
|
isIterable: isIterable2
|
|
48717
49934
|
};
|
|
48718
|
-
|
|
48719
|
-
|
|
48720
|
-
|
|
48721
|
-
|
|
48722
|
-
|
|
48723
|
-
|
|
49935
|
+
var AxiosError3 = class _AxiosError extends Error {
|
|
49936
|
+
static from(error, code, config, request, response, customProps) {
|
|
49937
|
+
const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
|
|
49938
|
+
axiosError.cause = error;
|
|
49939
|
+
axiosError.name = error.name;
|
|
49940
|
+
customProps && Object.assign(axiosError, customProps);
|
|
49941
|
+
return axiosError;
|
|
48724
49942
|
}
|
|
48725
|
-
|
|
48726
|
-
|
|
48727
|
-
|
|
48728
|
-
|
|
48729
|
-
|
|
48730
|
-
|
|
48731
|
-
|
|
48732
|
-
|
|
49943
|
+
/**
|
|
49944
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
49945
|
+
*
|
|
49946
|
+
* @param {string} message The error message.
|
|
49947
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
49948
|
+
* @param {Object} [config] The config.
|
|
49949
|
+
* @param {Object} [request] The request.
|
|
49950
|
+
* @param {Object} [response] The response.
|
|
49951
|
+
*
|
|
49952
|
+
* @returns {Error} The created error.
|
|
49953
|
+
*/
|
|
49954
|
+
constructor(message2, code, config, request, response) {
|
|
49955
|
+
super(message2);
|
|
49956
|
+
this.name = "AxiosError";
|
|
49957
|
+
this.isAxiosError = true;
|
|
49958
|
+
code && (this.code = code);
|
|
49959
|
+
config && (this.config = config);
|
|
49960
|
+
request && (this.request = request);
|
|
49961
|
+
if (response) {
|
|
49962
|
+
this.response = response;
|
|
49963
|
+
this.status = response.status;
|
|
49964
|
+
}
|
|
48733
49965
|
}
|
|
48734
|
-
|
|
48735
|
-
utils$1.inherits(AxiosError3, Error, {
|
|
48736
|
-
toJSON: function toJSON2() {
|
|
49966
|
+
toJSON() {
|
|
48737
49967
|
return {
|
|
48738
49968
|
// Standard
|
|
48739
49969
|
message: this.message,
|
|
@@ -48752,45 +49982,20 @@ var require_axios = __commonJS({
|
|
|
48752
49982
|
status: this.status
|
|
48753
49983
|
};
|
|
48754
49984
|
}
|
|
48755
|
-
});
|
|
48756
|
-
var prototype$1 = AxiosError3.prototype;
|
|
48757
|
-
var descriptors2 = {};
|
|
48758
|
-
[
|
|
48759
|
-
"ERR_BAD_OPTION_VALUE",
|
|
48760
|
-
"ERR_BAD_OPTION",
|
|
48761
|
-
"ECONNABORTED",
|
|
48762
|
-
"ETIMEDOUT",
|
|
48763
|
-
"ERR_NETWORK",
|
|
48764
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
48765
|
-
"ERR_DEPRECATED",
|
|
48766
|
-
"ERR_BAD_RESPONSE",
|
|
48767
|
-
"ERR_BAD_REQUEST",
|
|
48768
|
-
"ERR_CANCELED",
|
|
48769
|
-
"ERR_NOT_SUPPORT",
|
|
48770
|
-
"ERR_INVALID_URL"
|
|
48771
|
-
// eslint-disable-next-line func-names
|
|
48772
|
-
].forEach((code) => {
|
|
48773
|
-
descriptors2[code] = { value: code };
|
|
48774
|
-
});
|
|
48775
|
-
Object.defineProperties(AxiosError3, descriptors2);
|
|
48776
|
-
Object.defineProperty(prototype$1, "isAxiosError", { value: true });
|
|
48777
|
-
AxiosError3.from = (error, code, config, request, response, customProps) => {
|
|
48778
|
-
const axiosError = Object.create(prototype$1);
|
|
48779
|
-
utils$1.toFlatObject(error, axiosError, function filter3(obj) {
|
|
48780
|
-
return obj !== Error.prototype;
|
|
48781
|
-
}, (prop) => {
|
|
48782
|
-
return prop !== "isAxiosError";
|
|
48783
|
-
});
|
|
48784
|
-
const msg = error && error.message ? error.message : "Error";
|
|
48785
|
-
const errCode = code == null && error ? error.code : code;
|
|
48786
|
-
AxiosError3.call(axiosError, msg, errCode, config, request, response);
|
|
48787
|
-
if (error && axiosError.cause == null) {
|
|
48788
|
-
Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
|
|
48789
|
-
}
|
|
48790
|
-
axiosError.name = error && error.name || "Error";
|
|
48791
|
-
customProps && Object.assign(axiosError, customProps);
|
|
48792
|
-
return axiosError;
|
|
48793
49985
|
};
|
|
49986
|
+
AxiosError3.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
49987
|
+
AxiosError3.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
49988
|
+
AxiosError3.ECONNABORTED = "ECONNABORTED";
|
|
49989
|
+
AxiosError3.ETIMEDOUT = "ETIMEDOUT";
|
|
49990
|
+
AxiosError3.ERR_NETWORK = "ERR_NETWORK";
|
|
49991
|
+
AxiosError3.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
49992
|
+
AxiosError3.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
49993
|
+
AxiosError3.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
49994
|
+
AxiosError3.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
49995
|
+
AxiosError3.ERR_CANCELED = "ERR_CANCELED";
|
|
49996
|
+
AxiosError3.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
49997
|
+
AxiosError3.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
49998
|
+
var AxiosError$1 = AxiosError3;
|
|
48794
49999
|
function isVisitable2(thing) {
|
|
48795
50000
|
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
48796
50001
|
}
|
|
@@ -48840,7 +50045,7 @@ var require_axios = __commonJS({
|
|
|
48840
50045
|
return value.toString();
|
|
48841
50046
|
}
|
|
48842
50047
|
if (!useBlob && utils$1.isBlob(value)) {
|
|
48843
|
-
throw new
|
|
50048
|
+
throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
|
|
48844
50049
|
}
|
|
48845
50050
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
48846
50051
|
return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
|
|
@@ -48921,11 +50126,11 @@ var require_axios = __commonJS({
|
|
|
48921
50126
|
this._pairs = [];
|
|
48922
50127
|
params && toFormData3(params, this, options);
|
|
48923
50128
|
}
|
|
48924
|
-
var
|
|
48925
|
-
|
|
50129
|
+
var prototype2 = AxiosURLSearchParams2.prototype;
|
|
50130
|
+
prototype2.append = function append2(name, value) {
|
|
48926
50131
|
this._pairs.push([name, value]);
|
|
48927
50132
|
};
|
|
48928
|
-
|
|
50133
|
+
prototype2.toString = function toString4(encoder) {
|
|
48929
50134
|
const _encode = encoder ? function(value) {
|
|
48930
50135
|
return encoder.call(this, value, encode$1);
|
|
48931
50136
|
} : encode$1;
|
|
@@ -48941,17 +50146,15 @@ var require_axios = __commonJS({
|
|
|
48941
50146
|
return url3;
|
|
48942
50147
|
}
|
|
48943
50148
|
const _encode = options && options.encode || encode3;
|
|
48944
|
-
|
|
48945
|
-
options
|
|
48946
|
-
|
|
48947
|
-
|
|
48948
|
-
}
|
|
48949
|
-
const serializeFn = options && options.serialize;
|
|
50149
|
+
const _options = utils$1.isFunction(options) ? {
|
|
50150
|
+
serialize: options
|
|
50151
|
+
} : options;
|
|
50152
|
+
const serializeFn = _options && _options.serialize;
|
|
48950
50153
|
let serializedParams;
|
|
48951
50154
|
if (serializeFn) {
|
|
48952
|
-
serializedParams = serializeFn(params,
|
|
50155
|
+
serializedParams = serializeFn(params, _options);
|
|
48953
50156
|
} else {
|
|
48954
|
-
serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams2(params,
|
|
50157
|
+
serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams2(params, _options).toString(_encode);
|
|
48955
50158
|
}
|
|
48956
50159
|
if (serializedParams) {
|
|
48957
50160
|
const hashmarkIndex = url3.indexOf("#");
|
|
@@ -48971,6 +50174,7 @@ var require_axios = __commonJS({
|
|
|
48971
50174
|
*
|
|
48972
50175
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
48973
50176
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
50177
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
48974
50178
|
*
|
|
48975
50179
|
* @return {Number} An ID used to remove interceptor later
|
|
48976
50180
|
*/
|
|
@@ -49027,7 +50231,8 @@ var require_axios = __commonJS({
|
|
|
49027
50231
|
var transitionalDefaults = {
|
|
49028
50232
|
silentJSONParsing: true,
|
|
49029
50233
|
forcedJSONParsing: true,
|
|
49030
|
-
clarifyTimeoutError: false
|
|
50234
|
+
clarifyTimeoutError: false,
|
|
50235
|
+
legacyInterceptorReqResOrdering: true
|
|
49031
50236
|
};
|
|
49032
50237
|
var URLSearchParams = url__default["default"].URLSearchParams;
|
|
49033
50238
|
var ALPHA2 = "abcdefghijklmnopqrstuvwxyz";
|
|
@@ -49212,7 +50417,7 @@ var require_axios = __commonJS({
|
|
|
49212
50417
|
} catch (e) {
|
|
49213
50418
|
if (strictJSONParsing) {
|
|
49214
50419
|
if (e.name === "SyntaxError") {
|
|
49215
|
-
throw
|
|
50420
|
+
throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
|
|
49216
50421
|
}
|
|
49217
50422
|
throw e;
|
|
49218
50423
|
}
|
|
@@ -49493,11 +50698,11 @@ var require_axios = __commonJS({
|
|
|
49493
50698
|
accessors: {}
|
|
49494
50699
|
};
|
|
49495
50700
|
const accessors = internals.accessors;
|
|
49496
|
-
const
|
|
50701
|
+
const prototype3 = this.prototype;
|
|
49497
50702
|
function defineAccessor(_header) {
|
|
49498
50703
|
const lHeader = normalizeHeader2(_header);
|
|
49499
50704
|
if (!accessors[lHeader]) {
|
|
49500
|
-
buildAccessors2(
|
|
50705
|
+
buildAccessors2(prototype3, _header);
|
|
49501
50706
|
accessors[lHeader] = true;
|
|
49502
50707
|
}
|
|
49503
50708
|
}
|
|
@@ -49531,21 +50736,31 @@ var require_axios = __commonJS({
|
|
|
49531
50736
|
function isCancel3(value) {
|
|
49532
50737
|
return !!(value && value.__CANCEL__);
|
|
49533
50738
|
}
|
|
49534
|
-
|
|
49535
|
-
|
|
49536
|
-
|
|
49537
|
-
|
|
49538
|
-
|
|
49539
|
-
|
|
49540
|
-
|
|
50739
|
+
var CanceledError3 = class extends AxiosError$1 {
|
|
50740
|
+
/**
|
|
50741
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
50742
|
+
*
|
|
50743
|
+
* @param {string=} message The message.
|
|
50744
|
+
* @param {Object=} config The config.
|
|
50745
|
+
* @param {Object=} request The request.
|
|
50746
|
+
*
|
|
50747
|
+
* @returns {CanceledError} The created error.
|
|
50748
|
+
*/
|
|
50749
|
+
constructor(message2, config, request) {
|
|
50750
|
+
super(message2 == null ? "canceled" : message2, AxiosError$1.ERR_CANCELED, config, request);
|
|
50751
|
+
this.name = "CanceledError";
|
|
50752
|
+
this.__CANCEL__ = true;
|
|
50753
|
+
}
|
|
50754
|
+
};
|
|
50755
|
+
var CanceledError$1 = CanceledError3;
|
|
49541
50756
|
function settle2(resolve2, reject, response) {
|
|
49542
50757
|
const validateStatus2 = response.config.validateStatus;
|
|
49543
50758
|
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
49544
50759
|
resolve2(response);
|
|
49545
50760
|
} else {
|
|
49546
|
-
reject(new
|
|
50761
|
+
reject(new AxiosError$1(
|
|
49547
50762
|
"Request failed with status code " + response.status,
|
|
49548
|
-
[
|
|
50763
|
+
[AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
49549
50764
|
response.config,
|
|
49550
50765
|
response.request,
|
|
49551
50766
|
response
|
|
@@ -49553,6 +50768,9 @@ var require_axios = __commonJS({
|
|
|
49553
50768
|
}
|
|
49554
50769
|
}
|
|
49555
50770
|
function isAbsoluteURL2(url3) {
|
|
50771
|
+
if (typeof url3 !== "string") {
|
|
50772
|
+
return false;
|
|
50773
|
+
}
|
|
49556
50774
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url3);
|
|
49557
50775
|
}
|
|
49558
50776
|
function combineURLs2(baseURL, relativeURL) {
|
|
@@ -49565,7 +50783,7 @@ var require_axios = __commonJS({
|
|
|
49565
50783
|
}
|
|
49566
50784
|
return requestedURL;
|
|
49567
50785
|
}
|
|
49568
|
-
var VERSION3 = "1.13.
|
|
50786
|
+
var VERSION3 = "1.13.5";
|
|
49569
50787
|
function parseProtocol2(url3) {
|
|
49570
50788
|
const match2 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url3);
|
|
49571
50789
|
return match2 && match2[1] || "";
|
|
@@ -49581,7 +50799,7 @@ var require_axios = __commonJS({
|
|
|
49581
50799
|
uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
|
|
49582
50800
|
const match2 = DATA_URL_PATTERN2.exec(uri);
|
|
49583
50801
|
if (!match2) {
|
|
49584
|
-
throw new
|
|
50802
|
+
throw new AxiosError$1("Invalid URL", AxiosError$1.ERR_INVALID_URL);
|
|
49585
50803
|
}
|
|
49586
50804
|
const mime = match2[1];
|
|
49587
50805
|
const isBase64 = match2[2];
|
|
@@ -49589,13 +50807,13 @@ var require_axios = __commonJS({
|
|
|
49589
50807
|
const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? "base64" : "utf8");
|
|
49590
50808
|
if (asBlob) {
|
|
49591
50809
|
if (!_Blob) {
|
|
49592
|
-
throw new
|
|
50810
|
+
throw new AxiosError$1("Blob is not supported", AxiosError$1.ERR_NOT_SUPPORT);
|
|
49593
50811
|
}
|
|
49594
50812
|
return new _Blob([buffer], { type: mime });
|
|
49595
50813
|
}
|
|
49596
50814
|
return buffer;
|
|
49597
50815
|
}
|
|
49598
|
-
throw new
|
|
50816
|
+
throw new AxiosError$1("Unsupported protocol " + protocol, AxiosError$1.ERR_NOT_SUPPORT);
|
|
49599
50817
|
}
|
|
49600
50818
|
var kInternals2 = Symbol("internals");
|
|
49601
50819
|
var AxiosTransformStream2 = class extends stream__default["default"].Transform {
|
|
@@ -50087,8 +51305,11 @@ var require_axios = __commonJS({
|
|
|
50087
51305
|
proxy2.auth = (proxy2.username || "") + ":" + (proxy2.password || "");
|
|
50088
51306
|
}
|
|
50089
51307
|
if (proxy2.auth) {
|
|
50090
|
-
|
|
51308
|
+
const validProxyAuth = Boolean(proxy2.auth.username || proxy2.auth.password);
|
|
51309
|
+
if (validProxyAuth) {
|
|
50091
51310
|
proxy2.auth = (proxy2.auth.username || "") + ":" + (proxy2.auth.password || "");
|
|
51311
|
+
} else if (typeof proxy2.auth === "object") {
|
|
51312
|
+
throw new AxiosError$1("Invalid proxy authorization", AxiosError$1.ERR_BAD_OPTION, { proxy: proxy2 });
|
|
50092
51313
|
}
|
|
50093
51314
|
const base64 = Buffer.from(proxy2.auth, "utf8").toString("base64");
|
|
50094
51315
|
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
@@ -50140,7 +51361,7 @@ var require_axios = __commonJS({
|
|
|
50140
51361
|
var buildAddressEntry2 = (address, family) => resolveFamily2(utils$1.isObject(address) ? address : { address, family });
|
|
50141
51362
|
var http2Transport2 = {
|
|
50142
51363
|
request(options, cb) {
|
|
50143
|
-
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
|
|
51364
|
+
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
|
|
50144
51365
|
const { http2Options, headers } = options;
|
|
50145
51366
|
const session = http2Sessions2.getSession(authority, http2Options);
|
|
50146
51367
|
const {
|
|
@@ -50201,7 +51422,7 @@ var require_axios = __commonJS({
|
|
|
50201
51422
|
const abortEmitter = new events.EventEmitter();
|
|
50202
51423
|
function abort(reason) {
|
|
50203
51424
|
try {
|
|
50204
|
-
abortEmitter.emit("abort", !reason || reason.type ? new
|
|
51425
|
+
abortEmitter.emit("abort", !reason || reason.type ? new CanceledError$1(null, config, req) : reason);
|
|
50205
51426
|
} catch (err) {
|
|
50206
51427
|
console.warn("emit error", err);
|
|
50207
51428
|
}
|
|
@@ -50247,9 +51468,9 @@ var require_axios = __commonJS({
|
|
|
50247
51468
|
const dataUrl = String(config.url || fullPath || "");
|
|
50248
51469
|
const estimated = estimateDataURLDecodedBytes2(dataUrl);
|
|
50249
51470
|
if (estimated > config.maxContentLength) {
|
|
50250
|
-
return reject(new
|
|
51471
|
+
return reject(new AxiosError$1(
|
|
50251
51472
|
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
50252
|
-
|
|
51473
|
+
AxiosError$1.ERR_BAD_RESPONSE,
|
|
50253
51474
|
config
|
|
50254
51475
|
));
|
|
50255
51476
|
}
|
|
@@ -50268,7 +51489,7 @@ var require_axios = __commonJS({
|
|
|
50268
51489
|
Blob: config.env && config.env.Blob
|
|
50269
51490
|
});
|
|
50270
51491
|
} catch (err) {
|
|
50271
|
-
throw
|
|
51492
|
+
throw AxiosError$1.from(err, AxiosError$1.ERR_BAD_REQUEST, config);
|
|
50272
51493
|
}
|
|
50273
51494
|
if (responseType === "text") {
|
|
50274
51495
|
convertedData = convertedData.toString(responseEncoding);
|
|
@@ -50287,9 +51508,9 @@ var require_axios = __commonJS({
|
|
|
50287
51508
|
});
|
|
50288
51509
|
}
|
|
50289
51510
|
if (supportedProtocols2.indexOf(protocol) === -1) {
|
|
50290
|
-
return reject(new
|
|
51511
|
+
return reject(new AxiosError$1(
|
|
50291
51512
|
"Unsupported protocol " + protocol,
|
|
50292
|
-
|
|
51513
|
+
AxiosError$1.ERR_BAD_REQUEST,
|
|
50293
51514
|
config
|
|
50294
51515
|
));
|
|
50295
51516
|
}
|
|
@@ -50327,17 +51548,17 @@ var require_axios = __commonJS({
|
|
|
50327
51548
|
} else if (utils$1.isString(data)) {
|
|
50328
51549
|
data = Buffer.from(data, "utf-8");
|
|
50329
51550
|
} else {
|
|
50330
|
-
return reject(new
|
|
51551
|
+
return reject(new AxiosError$1(
|
|
50331
51552
|
"Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
|
|
50332
|
-
|
|
51553
|
+
AxiosError$1.ERR_BAD_REQUEST,
|
|
50333
51554
|
config
|
|
50334
51555
|
));
|
|
50335
51556
|
}
|
|
50336
51557
|
headers.setContentLength(data.length, false);
|
|
50337
51558
|
if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
|
|
50338
|
-
return reject(new
|
|
51559
|
+
return reject(new AxiosError$1(
|
|
50339
51560
|
"Request body larger than maxBodyLength limit",
|
|
50340
|
-
|
|
51561
|
+
AxiosError$1.ERR_BAD_REQUEST,
|
|
50341
51562
|
config
|
|
50342
51563
|
));
|
|
50343
51564
|
}
|
|
@@ -50507,9 +51728,9 @@ var require_axios = __commonJS({
|
|
|
50507
51728
|
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
50508
51729
|
rejected = true;
|
|
50509
51730
|
responseStream.destroy();
|
|
50510
|
-
abort(new
|
|
51731
|
+
abort(new AxiosError$1(
|
|
50511
51732
|
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
50512
|
-
|
|
51733
|
+
AxiosError$1.ERR_BAD_RESPONSE,
|
|
50513
51734
|
config,
|
|
50514
51735
|
lastRequest
|
|
50515
51736
|
));
|
|
@@ -50519,9 +51740,9 @@ var require_axios = __commonJS({
|
|
|
50519
51740
|
if (rejected) {
|
|
50520
51741
|
return;
|
|
50521
51742
|
}
|
|
50522
|
-
const err = new
|
|
51743
|
+
const err = new AxiosError$1(
|
|
50523
51744
|
"stream has been aborted",
|
|
50524
|
-
|
|
51745
|
+
AxiosError$1.ERR_BAD_RESPONSE,
|
|
50525
51746
|
config,
|
|
50526
51747
|
lastRequest
|
|
50527
51748
|
);
|
|
@@ -50530,7 +51751,7 @@ var require_axios = __commonJS({
|
|
|
50530
51751
|
});
|
|
50531
51752
|
responseStream.on("error", function handleStreamError(err) {
|
|
50532
51753
|
if (req.destroyed) return;
|
|
50533
|
-
reject(
|
|
51754
|
+
reject(AxiosError$1.from(err, null, config, lastRequest));
|
|
50534
51755
|
});
|
|
50535
51756
|
responseStream.on("end", function handleStreamEnd() {
|
|
50536
51757
|
try {
|
|
@@ -50543,7 +51764,7 @@ var require_axios = __commonJS({
|
|
|
50543
51764
|
}
|
|
50544
51765
|
response.data = responseData;
|
|
50545
51766
|
} catch (err) {
|
|
50546
|
-
return reject(
|
|
51767
|
+
return reject(AxiosError$1.from(err, null, config, response.request, response));
|
|
50547
51768
|
}
|
|
50548
51769
|
settle2(resolve2, reject, response);
|
|
50549
51770
|
});
|
|
@@ -50563,7 +51784,7 @@ var require_axios = __commonJS({
|
|
|
50563
51784
|
}
|
|
50564
51785
|
});
|
|
50565
51786
|
req.on("error", function handleRequestError(err) {
|
|
50566
|
-
reject(
|
|
51787
|
+
reject(AxiosError$1.from(err, null, config, req));
|
|
50567
51788
|
});
|
|
50568
51789
|
req.on("socket", function handleRequestSocket(socket) {
|
|
50569
51790
|
socket.setKeepAlive(true, 1e3 * 60);
|
|
@@ -50571,9 +51792,9 @@ var require_axios = __commonJS({
|
|
|
50571
51792
|
if (config.timeout) {
|
|
50572
51793
|
const timeout = parseInt(config.timeout, 10);
|
|
50573
51794
|
if (Number.isNaN(timeout)) {
|
|
50574
|
-
abort(new
|
|
51795
|
+
abort(new AxiosError$1(
|
|
50575
51796
|
"error trying to parse `config.timeout` to int",
|
|
50576
|
-
|
|
51797
|
+
AxiosError$1.ERR_BAD_OPTION_VALUE,
|
|
50577
51798
|
config,
|
|
50578
51799
|
req
|
|
50579
51800
|
));
|
|
@@ -50586,9 +51807,9 @@ var require_axios = __commonJS({
|
|
|
50586
51807
|
if (config.timeoutErrorMessage) {
|
|
50587
51808
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
50588
51809
|
}
|
|
50589
|
-
abort(new
|
|
51810
|
+
abort(new AxiosError$1(
|
|
50590
51811
|
timeoutErrorMessage,
|
|
50591
|
-
transitional2.clarifyTimeoutError ?
|
|
51812
|
+
transitional2.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
|
|
50592
51813
|
config,
|
|
50593
51814
|
req
|
|
50594
51815
|
));
|
|
@@ -50608,7 +51829,7 @@ var require_axios = __commonJS({
|
|
|
50608
51829
|
});
|
|
50609
51830
|
data.on("close", () => {
|
|
50610
51831
|
if (!ended && !errored) {
|
|
50611
|
-
abort(new
|
|
51832
|
+
abort(new CanceledError$1("Request stream has been aborted", config, req));
|
|
50612
51833
|
}
|
|
50613
51834
|
});
|
|
50614
51835
|
data.pipe(req);
|
|
@@ -50740,11 +51961,16 @@ var require_axios = __commonJS({
|
|
|
50740
51961
|
validateStatus: mergeDirectKeys,
|
|
50741
51962
|
headers: (a, b, prop) => mergeDeepProperties(headersToObject2(a), headersToObject2(b), prop, true)
|
|
50742
51963
|
};
|
|
50743
|
-
utils$1.forEach(
|
|
50744
|
-
|
|
50745
|
-
|
|
50746
|
-
|
|
50747
|
-
|
|
51964
|
+
utils$1.forEach(
|
|
51965
|
+
Object.keys({ ...config1, ...config2 }),
|
|
51966
|
+
function computeConfigValue(prop) {
|
|
51967
|
+
if (prop === "__proto__" || prop === "constructor" || prop === "prototype")
|
|
51968
|
+
return;
|
|
51969
|
+
const merge4 = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
51970
|
+
const configValue = merge4(config1[prop], config2[prop], prop);
|
|
51971
|
+
utils$1.isUndefined(configValue) && merge4 !== mergeDirectKeys || (config[prop] = configValue);
|
|
51972
|
+
}
|
|
51973
|
+
);
|
|
50748
51974
|
return config;
|
|
50749
51975
|
}
|
|
50750
51976
|
var resolveConfig = (config) => {
|
|
@@ -50843,12 +52069,12 @@ var require_axios = __commonJS({
|
|
|
50843
52069
|
if (!request) {
|
|
50844
52070
|
return;
|
|
50845
52071
|
}
|
|
50846
|
-
reject(new
|
|
52072
|
+
reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
|
|
50847
52073
|
request = null;
|
|
50848
52074
|
};
|
|
50849
52075
|
request.onerror = function handleError(event) {
|
|
50850
52076
|
const msg = event && event.message ? event.message : "Network Error";
|
|
50851
|
-
const err = new
|
|
52077
|
+
const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
|
|
50852
52078
|
err.event = event || null;
|
|
50853
52079
|
reject(err);
|
|
50854
52080
|
request = null;
|
|
@@ -50859,9 +52085,9 @@ var require_axios = __commonJS({
|
|
|
50859
52085
|
if (_config.timeoutErrorMessage) {
|
|
50860
52086
|
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
50861
52087
|
}
|
|
50862
|
-
reject(new
|
|
52088
|
+
reject(new AxiosError$1(
|
|
50863
52089
|
timeoutErrorMessage,
|
|
50864
|
-
transitional2.clarifyTimeoutError ?
|
|
52090
|
+
transitional2.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
|
|
50865
52091
|
config,
|
|
50866
52092
|
request
|
|
50867
52093
|
));
|
|
@@ -50893,7 +52119,7 @@ var require_axios = __commonJS({
|
|
|
50893
52119
|
if (!request) {
|
|
50894
52120
|
return;
|
|
50895
52121
|
}
|
|
50896
|
-
reject(!cancel || cancel.type ? new
|
|
52122
|
+
reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
|
|
50897
52123
|
request.abort();
|
|
50898
52124
|
request = null;
|
|
50899
52125
|
};
|
|
@@ -50904,7 +52130,7 @@ var require_axios = __commonJS({
|
|
|
50904
52130
|
}
|
|
50905
52131
|
const protocol = parseProtocol2(_config.url);
|
|
50906
52132
|
if (protocol && platform3.protocols.indexOf(protocol) === -1) {
|
|
50907
|
-
reject(new
|
|
52133
|
+
reject(new AxiosError$1("Unsupported protocol " + protocol + ":", AxiosError$1.ERR_BAD_REQUEST, config));
|
|
50908
52134
|
return;
|
|
50909
52135
|
}
|
|
50910
52136
|
request.send(requestData || null);
|
|
@@ -50920,12 +52146,12 @@ var require_axios = __commonJS({
|
|
|
50920
52146
|
aborted = true;
|
|
50921
52147
|
unsubscribe();
|
|
50922
52148
|
const err = reason instanceof Error ? reason : this.reason;
|
|
50923
|
-
controller.abort(err instanceof
|
|
52149
|
+
controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
|
|
50924
52150
|
}
|
|
50925
52151
|
};
|
|
50926
52152
|
let timer = timeout && setTimeout(() => {
|
|
50927
52153
|
timer = null;
|
|
50928
|
-
onabort(new
|
|
52154
|
+
onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
|
|
50929
52155
|
}, timeout);
|
|
50930
52156
|
const unsubscribe = () => {
|
|
50931
52157
|
if (signals3) {
|
|
@@ -51072,7 +52298,7 @@ var require_axios = __commonJS({
|
|
|
51072
52298
|
if (method) {
|
|
51073
52299
|
return method.call(res);
|
|
51074
52300
|
}
|
|
51075
|
-
throw new
|
|
52301
|
+
throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
|
|
51076
52302
|
});
|
|
51077
52303
|
});
|
|
51078
52304
|
})();
|
|
@@ -51197,13 +52423,13 @@ var require_axios = __commonJS({
|
|
|
51197
52423
|
unsubscribe && unsubscribe();
|
|
51198
52424
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
51199
52425
|
throw Object.assign(
|
|
51200
|
-
new
|
|
52426
|
+
new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request, err && err.response),
|
|
51201
52427
|
{
|
|
51202
52428
|
cause: err.cause || err
|
|
51203
52429
|
}
|
|
51204
52430
|
);
|
|
51205
52431
|
}
|
|
51206
|
-
throw
|
|
52432
|
+
throw AxiosError$1.from(err, err && err.code, config, request, err && err.response);
|
|
51207
52433
|
}
|
|
51208
52434
|
};
|
|
51209
52435
|
};
|
|
@@ -51257,7 +52483,7 @@ var require_axios = __commonJS({
|
|
|
51257
52483
|
if (!isResolvedHandle2(nameOrAdapter)) {
|
|
51258
52484
|
adapter2 = knownAdapters2[(id = String(nameOrAdapter)).toLowerCase()];
|
|
51259
52485
|
if (adapter2 === void 0) {
|
|
51260
|
-
throw new
|
|
52486
|
+
throw new AxiosError$1(`Unknown adapter '${id}'`);
|
|
51261
52487
|
}
|
|
51262
52488
|
}
|
|
51263
52489
|
if (adapter2 && (utils$1.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
|
|
@@ -51270,7 +52496,7 @@ var require_axios = __commonJS({
|
|
|
51270
52496
|
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
51271
52497
|
);
|
|
51272
52498
|
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason2).join("\n") : " " + renderReason2(reasons[0]) : "as no adapter specified";
|
|
51273
|
-
throw new
|
|
52499
|
+
throw new AxiosError$1(
|
|
51274
52500
|
`There is no suitable adapter to dispatch the request ` + s,
|
|
51275
52501
|
"ERR_NOT_SUPPORT"
|
|
51276
52502
|
);
|
|
@@ -51294,7 +52520,7 @@ var require_axios = __commonJS({
|
|
|
51294
52520
|
config.cancelToken.throwIfRequested();
|
|
51295
52521
|
}
|
|
51296
52522
|
if (config.signal && config.signal.aborted) {
|
|
51297
|
-
throw new
|
|
52523
|
+
throw new CanceledError$1(null, config);
|
|
51298
52524
|
}
|
|
51299
52525
|
}
|
|
51300
52526
|
function dispatchRequest2(config) {
|
|
@@ -51345,9 +52571,9 @@ var require_axios = __commonJS({
|
|
|
51345
52571
|
}
|
|
51346
52572
|
return (value, opt, opts) => {
|
|
51347
52573
|
if (validator2 === false) {
|
|
51348
|
-
throw new
|
|
52574
|
+
throw new AxiosError$1(
|
|
51349
52575
|
formatMessage(opt, " has been removed" + (version ? " in " + version : "")),
|
|
51350
|
-
|
|
52576
|
+
AxiosError$1.ERR_DEPRECATED
|
|
51351
52577
|
);
|
|
51352
52578
|
}
|
|
51353
52579
|
if (version && !deprecatedWarnings2[opt]) {
|
|
@@ -51370,7 +52596,7 @@ var require_axios = __commonJS({
|
|
|
51370
52596
|
};
|
|
51371
52597
|
function assertOptions2(options, schema, allowUnknown) {
|
|
51372
52598
|
if (typeof options !== "object") {
|
|
51373
|
-
throw new
|
|
52599
|
+
throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
|
|
51374
52600
|
}
|
|
51375
52601
|
const keys = Object.keys(options);
|
|
51376
52602
|
let i = keys.length;
|
|
@@ -51381,12 +52607,12 @@ var require_axios = __commonJS({
|
|
|
51381
52607
|
const value = options[opt];
|
|
51382
52608
|
const result = value === void 0 || validator2(value, opt, options);
|
|
51383
52609
|
if (result !== true) {
|
|
51384
|
-
throw new
|
|
52610
|
+
throw new AxiosError$1("option " + opt + " must be " + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
|
|
51385
52611
|
}
|
|
51386
52612
|
continue;
|
|
51387
52613
|
}
|
|
51388
52614
|
if (allowUnknown !== true) {
|
|
51389
|
-
throw new
|
|
52615
|
+
throw new AxiosError$1("Unknown option " + opt, AxiosError$1.ERR_BAD_OPTION);
|
|
51390
52616
|
}
|
|
51391
52617
|
}
|
|
51392
52618
|
}
|
|
@@ -51444,7 +52670,8 @@ var require_axios = __commonJS({
|
|
|
51444
52670
|
validator.assertOptions(transitional2, {
|
|
51445
52671
|
silentJSONParsing: validators3.transitional(validators3.boolean),
|
|
51446
52672
|
forcedJSONParsing: validators3.transitional(validators3.boolean),
|
|
51447
|
-
clarifyTimeoutError: validators3.transitional(validators3.boolean)
|
|
52673
|
+
clarifyTimeoutError: validators3.transitional(validators3.boolean),
|
|
52674
|
+
legacyInterceptorReqResOrdering: validators3.transitional(validators3.boolean)
|
|
51448
52675
|
}, false);
|
|
51449
52676
|
}
|
|
51450
52677
|
if (paramsSerializer != null) {
|
|
@@ -51488,7 +52715,13 @@ var require_axios = __commonJS({
|
|
|
51488
52715
|
return;
|
|
51489
52716
|
}
|
|
51490
52717
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
51491
|
-
|
|
52718
|
+
const transitional3 = config.transitional || transitionalDefaults;
|
|
52719
|
+
const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering;
|
|
52720
|
+
if (legacyInterceptorReqResOrdering) {
|
|
52721
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
52722
|
+
} else {
|
|
52723
|
+
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
52724
|
+
}
|
|
51492
52725
|
});
|
|
51493
52726
|
const responseInterceptorChain = [];
|
|
51494
52727
|
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
@@ -51597,7 +52830,7 @@ var require_axios = __commonJS({
|
|
|
51597
52830
|
if (token.reason) {
|
|
51598
52831
|
return;
|
|
51599
52832
|
}
|
|
51600
|
-
token.reason = new
|
|
52833
|
+
token.reason = new CanceledError$1(message2, config, request);
|
|
51601
52834
|
resolvePromise(token.reason);
|
|
51602
52835
|
});
|
|
51603
52836
|
}
|
|
@@ -51755,12 +52988,12 @@ var require_axios = __commonJS({
|
|
|
51755
52988
|
}
|
|
51756
52989
|
var axios2 = createInstance2(defaults$1);
|
|
51757
52990
|
axios2.Axios = Axios$1;
|
|
51758
|
-
axios2.CanceledError =
|
|
52991
|
+
axios2.CanceledError = CanceledError$1;
|
|
51759
52992
|
axios2.CancelToken = CancelToken$1;
|
|
51760
52993
|
axios2.isCancel = isCancel3;
|
|
51761
52994
|
axios2.VERSION = VERSION3;
|
|
51762
52995
|
axios2.toFormData = toFormData3;
|
|
51763
|
-
axios2.AxiosError =
|
|
52996
|
+
axios2.AxiosError = AxiosError$1;
|
|
51764
52997
|
axios2.Cancel = axios2.CanceledError;
|
|
51765
52998
|
axios2.all = function all3(promises) {
|
|
51766
52999
|
return Promise.all(promises);
|
|
@@ -51783,8 +53016,11 @@ var require_ab_testing = __commonJS({
|
|
|
51783
53016
|
"use strict";
|
|
51784
53017
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
51785
53018
|
exports2.messages = exports2.PromptMessages = exports2.NxCloudChoices = void 0;
|
|
51786
|
-
exports2.shouldUseTemplateFlow = shouldUseTemplateFlow;
|
|
51787
53019
|
exports2.getFlowVariant = getFlowVariant;
|
|
53020
|
+
exports2.getCompletionMessageKeyForVariant = getCompletionMessageKeyForVariant;
|
|
53021
|
+
exports2.shouldShowCloudPrompt = shouldShowCloudPrompt;
|
|
53022
|
+
exports2.isEnterpriseCloudUrl = isEnterpriseCloudUrl;
|
|
53023
|
+
exports2.getBannerVariant = getBannerVariant;
|
|
51788
53024
|
exports2.recordStat = recordStat;
|
|
51789
53025
|
var node_child_process_1 = require("node:child_process");
|
|
51790
53026
|
var node_fs_1 = require("node:fs");
|
|
@@ -51799,10 +53035,15 @@ var require_ab_testing = __commonJS({
|
|
|
51799
53035
|
if (!(0, node_fs_1.existsSync)(FLOW_VARIANT_CACHE_FILE))
|
|
51800
53036
|
return null;
|
|
51801
53037
|
const stats = (0, node_fs_1.statSync)(FLOW_VARIANT_CACHE_FILE);
|
|
51802
|
-
if (Date.now() - stats.mtimeMs > FLOW_VARIANT_EXPIRY_MS)
|
|
53038
|
+
if (Date.now() - stats.mtimeMs > FLOW_VARIANT_EXPIRY_MS) {
|
|
53039
|
+
try {
|
|
53040
|
+
(0, node_fs_1.unlinkSync)(FLOW_VARIANT_CACHE_FILE);
|
|
53041
|
+
} catch {
|
|
53042
|
+
}
|
|
51803
53043
|
return null;
|
|
53044
|
+
}
|
|
51804
53045
|
const value = (0, node_fs_1.readFileSync)(FLOW_VARIANT_CACHE_FILE, "utf-8").trim();
|
|
51805
|
-
return
|
|
53046
|
+
return ["0", "1", "2"].includes(value) ? value : null;
|
|
51806
53047
|
} catch {
|
|
51807
53048
|
return null;
|
|
51808
53049
|
}
|
|
@@ -51813,28 +53054,60 @@ var require_ab_testing = __commonJS({
|
|
|
51813
53054
|
} catch {
|
|
51814
53055
|
}
|
|
51815
53056
|
}
|
|
53057
|
+
function selectRandomVariant() {
|
|
53058
|
+
const rand = Math.random();
|
|
53059
|
+
if (rand < 1 / 3)
|
|
53060
|
+
return "0";
|
|
53061
|
+
if (rand < 2 / 3)
|
|
53062
|
+
return "1";
|
|
53063
|
+
return "2";
|
|
53064
|
+
}
|
|
51816
53065
|
function getFlowVariantInternal() {
|
|
51817
53066
|
if (flowVariantCache)
|
|
51818
53067
|
return flowVariantCache;
|
|
51819
|
-
const variant = process.env.NX_CNW_FLOW_VARIANT ?? readCachedFlowVariant() ?? (
|
|
53068
|
+
const variant = process.env.NX_CNW_FLOW_VARIANT ?? readCachedFlowVariant() ?? selectRandomVariant();
|
|
51820
53069
|
flowVariantCache = variant;
|
|
51821
53070
|
if (!process.env.NX_CNW_FLOW_VARIANT && !(0, node_fs_1.existsSync)(FLOW_VARIANT_CACHE_FILE)) {
|
|
51822
53071
|
writeCachedFlowVariant(variant);
|
|
51823
53072
|
}
|
|
51824
53073
|
return variant;
|
|
51825
53074
|
}
|
|
51826
|
-
function
|
|
53075
|
+
function getFlowVariant() {
|
|
51827
53076
|
if (process.env.NX_GENERATE_DOCS_PROCESS === "true") {
|
|
51828
|
-
|
|
53077
|
+
return "0";
|
|
53078
|
+
}
|
|
53079
|
+
return flowVariantCache ?? getFlowVariantInternal();
|
|
53080
|
+
}
|
|
53081
|
+
function getCompletionMessageKeyForVariant() {
|
|
53082
|
+
return "platform-setup";
|
|
53083
|
+
}
|
|
53084
|
+
function shouldShowCloudPrompt() {
|
|
53085
|
+
return false;
|
|
53086
|
+
}
|
|
53087
|
+
var STANDARD_NX_CLOUD_HOSTS = [
|
|
53088
|
+
"cloud.nx.app",
|
|
53089
|
+
"eu.nx.app",
|
|
53090
|
+
"staging.nx.app",
|
|
53091
|
+
"snapshot.nx.app"
|
|
53092
|
+
];
|
|
53093
|
+
function isEnterpriseCloudUrl(cloudUrl) {
|
|
53094
|
+
if (!cloudUrl)
|
|
53095
|
+
return false;
|
|
53096
|
+
try {
|
|
53097
|
+
const url2 = new URL(cloudUrl);
|
|
53098
|
+
return !STANDARD_NX_CLOUD_HOSTS.includes(url2.hostname);
|
|
53099
|
+
} catch {
|
|
51829
53100
|
return false;
|
|
51830
53101
|
}
|
|
51831
|
-
return getFlowVariantInternal() === "1";
|
|
51832
53102
|
}
|
|
51833
|
-
function
|
|
53103
|
+
function getBannerVariant(cloudUrl) {
|
|
53104
|
+
if (isEnterpriseCloudUrl(cloudUrl)) {
|
|
53105
|
+
return "0";
|
|
53106
|
+
}
|
|
51834
53107
|
if (process.env.NX_GENERATE_DOCS_PROCESS === "true") {
|
|
51835
53108
|
return "0";
|
|
51836
53109
|
}
|
|
51837
|
-
return
|
|
53110
|
+
return "2";
|
|
51838
53111
|
}
|
|
51839
53112
|
exports2.NxCloudChoices = [
|
|
51840
53113
|
"github",
|
|
@@ -51870,66 +53143,65 @@ var require_ab_testing = __commonJS({
|
|
|
51870
53143
|
],
|
|
51871
53144
|
/**
|
|
51872
53145
|
* These messages are a fallback for setting up CI as well as when migrating major versions
|
|
53146
|
+
* Locked to "full platform" messaging (CLOUD-4235)
|
|
51873
53147
|
*/
|
|
51874
53148
|
setupNxCloud: [
|
|
51875
53149
|
{
|
|
51876
|
-
code: "
|
|
51877
|
-
message:
|
|
53150
|
+
code: "cloud-v2-full-platform-visit",
|
|
53151
|
+
message: "Try the full Nx platform?",
|
|
51878
53152
|
initial: 0,
|
|
51879
53153
|
choices: [
|
|
51880
53154
|
{ value: "yes", name: "Yes" },
|
|
51881
|
-
{
|
|
51882
|
-
value: "skip",
|
|
51883
|
-
name: "No - I would not like remote caching"
|
|
51884
|
-
}
|
|
53155
|
+
{ value: "skip", name: "Skip" }
|
|
51885
53156
|
],
|
|
51886
|
-
footer: "\
|
|
51887
|
-
hint: `
|
|
51888
|
-
(can be disabled any time).`,
|
|
53157
|
+
footer: "\nAutomatically fix broken PRs, 70% faster CI: https://nx.dev/nx-cloud",
|
|
51889
53158
|
fallback: void 0,
|
|
51890
|
-
completionMessage: "
|
|
53159
|
+
completionMessage: "platform-setup"
|
|
51891
53160
|
}
|
|
51892
53161
|
],
|
|
51893
53162
|
/**
|
|
51894
53163
|
* Simplified Cloud prompt for template flow
|
|
51895
53164
|
*/
|
|
51896
53165
|
setupNxCloudV2: [
|
|
51897
|
-
{
|
|
51898
|
-
|
|
51899
|
-
|
|
51900
|
-
|
|
51901
|
-
|
|
51902
|
-
|
|
51903
|
-
|
|
51904
|
-
|
|
51905
|
-
|
|
51906
|
-
|
|
51907
|
-
|
|
51908
|
-
|
|
51909
|
-
|
|
51910
|
-
|
|
51911
|
-
|
|
51912
|
-
|
|
51913
|
-
|
|
51914
|
-
|
|
51915
|
-
|
|
51916
|
-
|
|
51917
|
-
|
|
51918
|
-
|
|
51919
|
-
|
|
51920
|
-
|
|
51921
|
-
|
|
51922
|
-
|
|
51923
|
-
|
|
51924
|
-
|
|
51925
|
-
|
|
51926
|
-
|
|
51927
|
-
|
|
51928
|
-
|
|
51929
|
-
|
|
51930
|
-
|
|
51931
|
-
|
|
51932
|
-
|
|
53166
|
+
//{
|
|
53167
|
+
// code: 'cloud-v2-remote-cache-visit',
|
|
53168
|
+
// message: 'Enable remote caching with Nx Cloud?',
|
|
53169
|
+
// initial: 0,
|
|
53170
|
+
// choices: [
|
|
53171
|
+
// { value: 'yes', name: 'Yes' },
|
|
53172
|
+
// { value: 'skip', name: 'Skip' },
|
|
53173
|
+
// ],
|
|
53174
|
+
// footer:
|
|
53175
|
+
// '\nRemote caching makes your builds faster for development and in CI: https://nx.dev/ci/features/remote-cache',
|
|
53176
|
+
// fallback: undefined,
|
|
53177
|
+
// completionMessage: 'cache-setup',
|
|
53178
|
+
//},
|
|
53179
|
+
//{
|
|
53180
|
+
// code: 'cloud-v2-fast-ci-visit',
|
|
53181
|
+
// message: 'Speed up CI and reduce compute costs with Nx Cloud?',
|
|
53182
|
+
// initial: 0,
|
|
53183
|
+
// choices: [
|
|
53184
|
+
// { value: 'yes', name: 'Yes' },
|
|
53185
|
+
// { value: 'skip', name: 'Skip' },
|
|
53186
|
+
// ],
|
|
53187
|
+
// footer:
|
|
53188
|
+
// '\n70% faster CI, 60% less compute, Automatically fix broken PRs: https://nx.dev/nx-cloud',
|
|
53189
|
+
// fallback: undefined,
|
|
53190
|
+
// completionMessage: 'ci-setup',
|
|
53191
|
+
//},
|
|
53192
|
+
//{
|
|
53193
|
+
// code: 'cloud-v2-green-prs-visit',
|
|
53194
|
+
// message: 'Get to green PRs faster with Nx Cloud?',
|
|
53195
|
+
// initial: 0,
|
|
53196
|
+
// choices: [
|
|
53197
|
+
// { value: 'yes', name: 'Yes' },
|
|
53198
|
+
// { value: 'skip', name: 'Skip' },
|
|
53199
|
+
// ],
|
|
53200
|
+
// footer:
|
|
53201
|
+
// '\nAutomatically fix broken PRs, 70% faster CI: https://nx.dev/nx-cloud',
|
|
53202
|
+
// fallback: undefined,
|
|
53203
|
+
// completionMessage: 'ci-setup',
|
|
53204
|
+
//},
|
|
51933
53205
|
{
|
|
51934
53206
|
code: "cloud-v2-full-platform-visit",
|
|
51935
53207
|
message: "Try the full Nx platform?",
|
|
@@ -51976,27 +53248,24 @@ var require_ab_testing = __commonJS({
|
|
|
51976
53248
|
};
|
|
51977
53249
|
exports2.PromptMessages = PromptMessages;
|
|
51978
53250
|
exports2.messages = new PromptMessages();
|
|
53251
|
+
function getCloudUrl() {
|
|
53252
|
+
const url2 = process.env.NX_CLOUD_API || process.env.NRWL_API || "https://cloud.nx.app";
|
|
53253
|
+
return url2[url2.length - 1] === "/" ? url2.slice(0, -1) : url2;
|
|
53254
|
+
}
|
|
51979
53255
|
async function recordStat(opts) {
|
|
51980
53256
|
try {
|
|
51981
53257
|
if (!shouldRecordStats()) {
|
|
51982
53258
|
return;
|
|
51983
53259
|
}
|
|
51984
|
-
const { getCloudUrl: getCloudUrl2 } = require(require.resolve(
|
|
51985
|
-
"nx/src/nx-cloud/utilities/get-cloud-options",
|
|
51986
|
-
{
|
|
51987
|
-
paths: [opts.directory]
|
|
51988
|
-
}
|
|
51989
|
-
// nx-ignore-next-line
|
|
51990
|
-
));
|
|
51991
53260
|
const axios2 = require_axios();
|
|
51992
53261
|
await (axios2["default"] ?? axios2).create({
|
|
51993
|
-
baseURL:
|
|
53262
|
+
baseURL: getCloudUrl(),
|
|
51994
53263
|
timeout: 400
|
|
51995
53264
|
}).post("/nx-cloud/stats", {
|
|
51996
53265
|
command: opts.command,
|
|
51997
53266
|
isCI: (0, is_ci_1.isCI)(),
|
|
51998
53267
|
useCloud: opts.useCloud,
|
|
51999
|
-
meta:
|
|
53268
|
+
meta: JSON.stringify({ nxVersion: opts.nxVersion, ...opts.meta })
|
|
52000
53269
|
});
|
|
52001
53270
|
} catch (e) {
|
|
52002
53271
|
if (process.env.NX_VERBOSE_LOGGING === "true") {
|
|
@@ -52032,6 +53301,7 @@ var require_nx_cloud = __commonJS({
|
|
|
52032
53301
|
var output_1 = require_output();
|
|
52033
53302
|
var messages_1 = require_messages();
|
|
52034
53303
|
var ab_testing_1 = require_ab_testing();
|
|
53304
|
+
var nx_version_1 = require_nx_version();
|
|
52035
53305
|
var ora = require_ora();
|
|
52036
53306
|
async function connectToNxCloudForTemplate(directory, installationSource, useGitHub) {
|
|
52037
53307
|
const { connectToNxCloud } = require(require.resolve(
|
|
@@ -52064,7 +53334,7 @@ var require_nx_cloud = __commonJS({
|
|
|
52064
53334
|
// nx-ignore-next-line
|
|
52065
53335
|
));
|
|
52066
53336
|
const { accessToken, nxCloudId } = getCloudOptions(directory);
|
|
52067
|
-
nxCloudSpinner.succeed("Nx Cloud
|
|
53337
|
+
nxCloudSpinner.succeed("Nx Cloud configuration was successfully added");
|
|
52068
53338
|
return accessToken || nxCloudId;
|
|
52069
53339
|
}
|
|
52070
53340
|
async function createNxCloudOnboardingUrl(nxCloud, token, directory, useGitHub) {
|
|
@@ -52076,17 +53346,22 @@ var require_nx_cloud = __commonJS({
|
|
|
52076
53346
|
// nx-ignore-next-line
|
|
52077
53347
|
));
|
|
52078
53348
|
const source = nxCloud === "yes" ? "create-nx-workspace-success-cache-setup" : "create-nx-workspace-success-ci-setup";
|
|
52079
|
-
const
|
|
52080
|
-
|
|
52081
|
-
|
|
52082
|
-
|
|
52083
|
-
const meta = `${prefix}-${code}`;
|
|
53349
|
+
const meta = JSON.stringify({
|
|
53350
|
+
variant: (0, ab_testing_1.getFlowVariant)(),
|
|
53351
|
+
nxVersion: nx_version_1.nxVersion
|
|
53352
|
+
});
|
|
52084
53353
|
return createNxCloudOnboardingURL(source, token, meta, false, useGitHub ?? (nxCloud === "yes" || nxCloud === "github" || nxCloud === "circleci"), directory);
|
|
52085
53354
|
}
|
|
52086
|
-
async function getNxCloudInfo(connectCloudUrl, pushedToVcs, completionMessageKey) {
|
|
53355
|
+
async function getNxCloudInfo(connectCloudUrl, pushedToVcs, completionMessageKey, workspaceName) {
|
|
52087
53356
|
const out = new output_1.CLIOutput(false);
|
|
52088
|
-
const
|
|
52089
|
-
|
|
53357
|
+
const bannerVariant = (0, ab_testing_1.getBannerVariant)(connectCloudUrl);
|
|
53358
|
+
const message2 = (0, messages_1.getCompletionMessage)(completionMessageKey, connectCloudUrl, pushedToVcs, workspaceName, bannerVariant);
|
|
53359
|
+
if (!message2.title) {
|
|
53360
|
+
out.addNewline();
|
|
53361
|
+
out.writeLines(message2.bodyLines ?? []);
|
|
53362
|
+
} else {
|
|
53363
|
+
out.success(message2);
|
|
53364
|
+
}
|
|
52090
53365
|
return out.getOutput();
|
|
52091
53366
|
}
|
|
52092
53367
|
function getSkippedNxCloudInfo() {
|
|
@@ -52242,11 +53517,10 @@ var require_clone_template = __commonJS({
|
|
|
52242
53517
|
var fs_1 = require("fs");
|
|
52243
53518
|
var promises_1 = require("fs/promises");
|
|
52244
53519
|
var path_1 = require("path");
|
|
52245
|
-
var output_1 = require_output();
|
|
52246
53520
|
var error_utils_1 = require_error_utils();
|
|
52247
53521
|
async function cloneTemplate(templateUrl, targetDirectory) {
|
|
52248
53522
|
if ((0, fs_1.existsSync)(targetDirectory)) {
|
|
52249
|
-
throw new
|
|
53523
|
+
throw new error_utils_1.CnwError("DIRECTORY_EXISTS", `The directory '${targetDirectory}' already exists. Choose a different name or remove the existing directory.`);
|
|
52250
53524
|
}
|
|
52251
53525
|
try {
|
|
52252
53526
|
await (0, child_process_utils_1.execAndWait)(`git clone --depth 1 "${templateUrl}" "${targetDirectory}"`, process.cwd());
|
|
@@ -52255,17 +53529,269 @@ var require_clone_template = __commonJS({
|
|
|
52255
53529
|
await (0, promises_1.rm)(gitDir, { recursive: true, force: true });
|
|
52256
53530
|
}
|
|
52257
53531
|
} catch (e) {
|
|
52258
|
-
|
|
52259
|
-
|
|
52260
|
-
|
|
52261
|
-
|
|
53532
|
+
const message2 = e instanceof Error ? e.message : String(e);
|
|
53533
|
+
throw new error_utils_1.CnwError("TEMPLATE_CLONE_FAILED", `Failed to create starter workspace: ${message2}`);
|
|
53534
|
+
}
|
|
53535
|
+
}
|
|
53536
|
+
}
|
|
53537
|
+
});
|
|
53538
|
+
|
|
53539
|
+
// node_modules/create-nx-workspace/src/utils/template/update-readme.js
|
|
53540
|
+
var require_update_readme = __commonJS({
|
|
53541
|
+
"node_modules/create-nx-workspace/src/utils/template/update-readme.js"(exports2) {
|
|
53542
|
+
"use strict";
|
|
53543
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
53544
|
+
exports2.updateReadmeContent = updateReadmeContent;
|
|
53545
|
+
exports2.addConnectUrlToReadme = addConnectUrlToReadme;
|
|
53546
|
+
exports2.amendOrCommitReadme = amendOrCommitReadme;
|
|
53547
|
+
var node_fs_1 = require("node:fs");
|
|
53548
|
+
var path_1 = require("path");
|
|
53549
|
+
var child_process_utils_1 = require_child_process_utils();
|
|
53550
|
+
var BEGIN_MARKER = "<!-- BEGIN: nx-cloud -->";
|
|
53551
|
+
var END_MARKER = "<!-- END: nx-cloud -->";
|
|
53552
|
+
var CLOUD_SETUP_SECTION = `## Finish your Nx platform setup
|
|
53553
|
+
|
|
53554
|
+
\u{1F680} [Finish setting up your workspace]({{CONNECT_URL}}) to get faster builds with remote caching, distributed task execution, and self-healing CI. [Learn more about Nx Cloud](https://nx.dev/ci/intro/why-nx-cloud).
|
|
53555
|
+
`;
|
|
53556
|
+
function updateReadmeContent(readmeContent, connectUrl) {
|
|
53557
|
+
const beginIndex = readmeContent.indexOf(BEGIN_MARKER);
|
|
53558
|
+
const endIndex = readmeContent.indexOf(END_MARKER);
|
|
53559
|
+
if (beginIndex === -1 || endIndex === -1 || beginIndex >= endIndex) {
|
|
53560
|
+
return readmeContent;
|
|
53561
|
+
}
|
|
53562
|
+
if (!connectUrl) {
|
|
53563
|
+
const contentStart = beginIndex + BEGIN_MARKER.length;
|
|
53564
|
+
const contentStartSkipNewline = readmeContent[contentStart] === "\n" ? contentStart + 1 : contentStart;
|
|
53565
|
+
const content = readmeContent.slice(contentStartSkipNewline, endIndex);
|
|
53566
|
+
const afterEnd2 = endIndex + END_MARKER.length;
|
|
53567
|
+
const skipTrailing = readmeContent[afterEnd2] === "\n" ? afterEnd2 + 1 : afterEnd2;
|
|
53568
|
+
return readmeContent.slice(0, beginIndex) + content + readmeContent.slice(skipTrailing);
|
|
53569
|
+
}
|
|
53570
|
+
const section = CLOUD_SETUP_SECTION.replace("{{CONNECT_URL}}", connectUrl);
|
|
53571
|
+
const afterEnd = endIndex + END_MARKER.length;
|
|
53572
|
+
const skipNewline = readmeContent[afterEnd] === "\n" ? afterEnd + 1 : afterEnd;
|
|
53573
|
+
return readmeContent.slice(0, beginIndex) + section + readmeContent.slice(skipNewline);
|
|
53574
|
+
}
|
|
53575
|
+
function addConnectUrlToReadme(directory, connectUrl) {
|
|
53576
|
+
const readmePath = (0, path_1.join)(directory, "README.md");
|
|
53577
|
+
if (!(0, node_fs_1.existsSync)(readmePath)) {
|
|
53578
|
+
return false;
|
|
53579
|
+
}
|
|
53580
|
+
const content = (0, node_fs_1.readFileSync)(readmePath, "utf-8");
|
|
53581
|
+
const updated = updateReadmeContent(content, connectUrl);
|
|
53582
|
+
if (updated !== content) {
|
|
53583
|
+
(0, node_fs_1.writeFileSync)(readmePath, updated);
|
|
53584
|
+
return true;
|
|
53585
|
+
}
|
|
53586
|
+
return false;
|
|
53587
|
+
}
|
|
53588
|
+
async function amendOrCommitReadme(directory, alreadyPushed) {
|
|
53589
|
+
await (0, child_process_utils_1.execAndWait)("git add README.md", directory);
|
|
53590
|
+
if (alreadyPushed) {
|
|
53591
|
+
await (0, child_process_utils_1.execAndWait)('git commit -m "chore: add Nx Cloud setup link to README"', directory);
|
|
53592
|
+
await (0, child_process_utils_1.execAndWait)("git push", directory);
|
|
53593
|
+
} else {
|
|
53594
|
+
try {
|
|
53595
|
+
await (0, child_process_utils_1.execAndWait)("git commit --amend --no-edit", directory);
|
|
53596
|
+
} catch {
|
|
53597
|
+
}
|
|
53598
|
+
}
|
|
53599
|
+
}
|
|
53600
|
+
}
|
|
53601
|
+
});
|
|
53602
|
+
|
|
53603
|
+
// node_modules/create-nx-workspace/src/utils/ai/ai-output.js
|
|
53604
|
+
var require_ai_output = __commonJS({
|
|
53605
|
+
"node_modules/create-nx-workspace/src/utils/ai/ai-output.js"(exports2) {
|
|
53606
|
+
"use strict";
|
|
53607
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
53608
|
+
exports2.SUGGESTED_WORKSPACE_NAME = void 0;
|
|
53609
|
+
exports2.isAiAgent = isAiAgent;
|
|
53610
|
+
exports2.isClaudeCode = isClaudeCode;
|
|
53611
|
+
exports2.isOpenCode = isOpenCode;
|
|
53612
|
+
exports2.isReplitAi = isReplitAi;
|
|
53613
|
+
exports2.isCursorAi = isCursorAi;
|
|
53614
|
+
exports2.writeAiOutput = writeAiOutput;
|
|
53615
|
+
exports2.logProgress = logProgress;
|
|
53616
|
+
exports2.buildTemplateRequiredResult = buildTemplateRequiredResult;
|
|
53617
|
+
exports2.buildSuccessResult = buildSuccessResult;
|
|
53618
|
+
exports2.buildErrorResult = buildErrorResult;
|
|
53619
|
+
var _isAiAgent = null;
|
|
53620
|
+
function isAiAgent() {
|
|
53621
|
+
if (_isAiAgent === null) {
|
|
53622
|
+
_isAiAgent = isClaudeCode() || isOpenCode() || isReplitAi() || isCursorAi();
|
|
53623
|
+
}
|
|
53624
|
+
return _isAiAgent;
|
|
53625
|
+
}
|
|
53626
|
+
function isClaudeCode() {
|
|
53627
|
+
return !!process.env.CLAUDECODE || !!process.env.CLAUDE_CODE;
|
|
53628
|
+
}
|
|
53629
|
+
function isOpenCode() {
|
|
53630
|
+
return !!process.env.OPENCODE;
|
|
53631
|
+
}
|
|
53632
|
+
function isReplitAi() {
|
|
53633
|
+
return !!process.env.REPL_ID;
|
|
53634
|
+
}
|
|
53635
|
+
function isCursorAi() {
|
|
53636
|
+
const pagerMatches = process.env.PAGER === "head -n 10000 | cat";
|
|
53637
|
+
const hasCursorTraceId = !!process.env.CURSOR_TRACE_ID;
|
|
53638
|
+
const hasComposerNoInteraction = !!process.env.COMPOSER_NO_INTERACTION;
|
|
53639
|
+
return pagerMatches && hasCursorTraceId && hasComposerNoInteraction;
|
|
53640
|
+
}
|
|
53641
|
+
function writeAiOutput(message2) {
|
|
53642
|
+
if (isAiAgent()) {
|
|
53643
|
+
process.stdout.write(JSON.stringify(message2) + "\n");
|
|
53644
|
+
if (message2.stage === "complete" && "success" in message2 && message2.success) {
|
|
53645
|
+
const successMsg = message2;
|
|
53646
|
+
const steps = successMsg.userNextSteps.steps;
|
|
53647
|
+
let plainText = "\n---USER_NEXT_STEPS---\n";
|
|
53648
|
+
plainText += "[DISPLAY] Show the user these next steps to complete setup:\n\n";
|
|
53649
|
+
steps.forEach((step, i) => {
|
|
53650
|
+
plainText += `${i + 1}. ${step.title}`;
|
|
53651
|
+
if (step.url) {
|
|
53652
|
+
plainText += `: ${step.url}`;
|
|
53653
|
+
}
|
|
53654
|
+
if (step.note) {
|
|
53655
|
+
plainText += `
|
|
53656
|
+
${step.note}`;
|
|
53657
|
+
}
|
|
53658
|
+
plainText += "\n";
|
|
52262
53659
|
});
|
|
52263
|
-
|
|
52264
|
-
|
|
53660
|
+
plainText += "---END---\n";
|
|
53661
|
+
process.stdout.write(plainText);
|
|
52265
53662
|
}
|
|
52266
|
-
process.exit(1);
|
|
52267
53663
|
}
|
|
52268
53664
|
}
|
|
53665
|
+
function logProgress(stage, message2) {
|
|
53666
|
+
writeAiOutput({ stage, message: message2 });
|
|
53667
|
+
}
|
|
53668
|
+
function buildTemplateRequiredResult(workspaceName) {
|
|
53669
|
+
const name = workspaceName || exports2.SUGGESTED_WORKSPACE_NAME;
|
|
53670
|
+
return {
|
|
53671
|
+
stage: "needs_input",
|
|
53672
|
+
success: false,
|
|
53673
|
+
title: "Template Selection Required",
|
|
53674
|
+
message: "Ask the user which workspace type they want, then run again with --template. If the directory exists, append a number (e.g., my-nx-repo-2).",
|
|
53675
|
+
suggestedName: name,
|
|
53676
|
+
templates: [
|
|
53677
|
+
{
|
|
53678
|
+
name: "Empty Monorepo",
|
|
53679
|
+
value: "nrwl/empty-template",
|
|
53680
|
+
description: "Minimal workspace to build on - best for custom setups or learning Nx."
|
|
53681
|
+
},
|
|
53682
|
+
{
|
|
53683
|
+
name: "React Fullstack",
|
|
53684
|
+
value: "nrwl/react-template",
|
|
53685
|
+
description: "Complete React + Express monorepo with examples and best practices."
|
|
53686
|
+
},
|
|
53687
|
+
{
|
|
53688
|
+
name: "Angular Fullstack",
|
|
53689
|
+
value: "nrwl/angular-template",
|
|
53690
|
+
description: "Complete Angular + Express monorepo with examples."
|
|
53691
|
+
},
|
|
53692
|
+
{
|
|
53693
|
+
name: "TypeScript/npm Packages",
|
|
53694
|
+
value: "nrwl/typescript-template",
|
|
53695
|
+
description: "For building and publishing npm packages."
|
|
53696
|
+
}
|
|
53697
|
+
],
|
|
53698
|
+
recommendedTemplate: "nrwl/empty-template",
|
|
53699
|
+
exampleCommand: `npx create-nx-workspace@latest ${name} --template=nrwl/empty-template`,
|
|
53700
|
+
docsGettingStarted: "https://nx.dev/getting-started/intro"
|
|
53701
|
+
};
|
|
53702
|
+
}
|
|
53703
|
+
function buildSuccessResult(options) {
|
|
53704
|
+
const { workspacePath, workspaceName, template: template2, preset, nxCloudConnectUrl, nxCloudError } = options;
|
|
53705
|
+
const resultData = {
|
|
53706
|
+
title: "Nx Workspace Created Successfully",
|
|
53707
|
+
workspacePath,
|
|
53708
|
+
workspaceName
|
|
53709
|
+
};
|
|
53710
|
+
if (template2) {
|
|
53711
|
+
resultData.template = template2;
|
|
53712
|
+
}
|
|
53713
|
+
if (preset) {
|
|
53714
|
+
resultData.preset = preset;
|
|
53715
|
+
}
|
|
53716
|
+
const steps = [];
|
|
53717
|
+
if (nxCloudConnectUrl) {
|
|
53718
|
+
steps.push({
|
|
53719
|
+
title: "Connect to Nx Cloud (Recommended)",
|
|
53720
|
+
url: nxCloudConnectUrl,
|
|
53721
|
+
note: "Complete setup to enable remote caching and CI insights"
|
|
53722
|
+
});
|
|
53723
|
+
}
|
|
53724
|
+
const userNextSteps = {
|
|
53725
|
+
description: "CRITICAL: Show the user these exact steps to complete setup.",
|
|
53726
|
+
steps
|
|
53727
|
+
};
|
|
53728
|
+
const successResult = {
|
|
53729
|
+
stage: "complete",
|
|
53730
|
+
success: true,
|
|
53731
|
+
result: resultData,
|
|
53732
|
+
userNextSteps,
|
|
53733
|
+
docs: {
|
|
53734
|
+
gettingStarted: "https://nx.dev/getting-started/intro",
|
|
53735
|
+
nxCloud: "https://nx.dev/ci/intro/why-nx-cloud"
|
|
53736
|
+
}
|
|
53737
|
+
};
|
|
53738
|
+
if (nxCloudError) {
|
|
53739
|
+
successResult.nxCloudError = nxCloudError;
|
|
53740
|
+
}
|
|
53741
|
+
return successResult;
|
|
53742
|
+
}
|
|
53743
|
+
function buildErrorResult(error, errorCode, errorLogPath) {
|
|
53744
|
+
const hints = getErrorHints(errorCode);
|
|
53745
|
+
return {
|
|
53746
|
+
stage: "error",
|
|
53747
|
+
success: false,
|
|
53748
|
+
title: "Workspace Creation Failed",
|
|
53749
|
+
error,
|
|
53750
|
+
errorCode,
|
|
53751
|
+
hints,
|
|
53752
|
+
errorLogPath,
|
|
53753
|
+
docsGettingStarted: "https://nx.dev/getting-started/intro"
|
|
53754
|
+
};
|
|
53755
|
+
}
|
|
53756
|
+
function getErrorHints(errorCode) {
|
|
53757
|
+
switch (errorCode) {
|
|
53758
|
+
case "DIRECTORY_EXISTS":
|
|
53759
|
+
return [
|
|
53760
|
+
"Choose a different workspace name",
|
|
53761
|
+
"Remove the existing directory with 'rm -rf <directory>'"
|
|
53762
|
+
];
|
|
53763
|
+
case "INVALID_FOLDER_NAME":
|
|
53764
|
+
return [
|
|
53765
|
+
"Workspace names must start with a letter",
|
|
53766
|
+
"Examples of valid names: myapp, MyApp, my-app, my_app"
|
|
53767
|
+
];
|
|
53768
|
+
case "INVALID_PRESET":
|
|
53769
|
+
return [
|
|
53770
|
+
"Check the preset name spelling",
|
|
53771
|
+
"Run with --help to see available presets",
|
|
53772
|
+
"Use --template for template-based workspaces"
|
|
53773
|
+
];
|
|
53774
|
+
case "NETWORK_ERROR":
|
|
53775
|
+
return [
|
|
53776
|
+
"Check your internet connection",
|
|
53777
|
+
"Try again in a few moments",
|
|
53778
|
+
"Check if npm/yarn registry is accessible"
|
|
53779
|
+
];
|
|
53780
|
+
case "PACKAGE_INSTALL_ERROR":
|
|
53781
|
+
return [
|
|
53782
|
+
"Check your package manager is installed correctly",
|
|
53783
|
+
"Try clearing npm/yarn cache",
|
|
53784
|
+
"Check for conflicting global packages"
|
|
53785
|
+
];
|
|
53786
|
+
default:
|
|
53787
|
+
return [
|
|
53788
|
+
"Check the error message for details",
|
|
53789
|
+
"Visit https://nx.dev/getting-started/intro for documentation",
|
|
53790
|
+
"Report issues at https://github.com/nrwl/nx/issues"
|
|
53791
|
+
];
|
|
53792
|
+
}
|
|
53793
|
+
}
|
|
53794
|
+
exports2.SUGGESTED_WORKSPACE_NAME = "my-nx-repo";
|
|
52269
53795
|
}
|
|
52270
53796
|
});
|
|
52271
53797
|
|
|
@@ -52277,6 +53803,7 @@ var require_create_workspace = __commonJS({
|
|
|
52277
53803
|
exports2.getInterruptedWorkspaceState = getInterruptedWorkspaceState;
|
|
52278
53804
|
exports2.createWorkspace = createWorkspace2;
|
|
52279
53805
|
exports2.extractConnectUrl = extractConnectUrl;
|
|
53806
|
+
var node_fs_1 = require("node:fs");
|
|
52280
53807
|
var path_1 = require("path");
|
|
52281
53808
|
var create_empty_workspace_1 = require_create_empty_workspace();
|
|
52282
53809
|
var create_preset_1 = require_create_preset();
|
|
@@ -52289,7 +53816,10 @@ var require_create_workspace = __commonJS({
|
|
|
52289
53816
|
var get_third_party_preset_1 = require_get_third_party_preset();
|
|
52290
53817
|
var preset_1 = require_preset();
|
|
52291
53818
|
var clone_template_1 = require_clone_template();
|
|
53819
|
+
var update_readme_1 = require_update_readme();
|
|
52292
53820
|
var child_process_utils_1 = require_child_process_utils();
|
|
53821
|
+
var package_manager_1 = require_package_manager();
|
|
53822
|
+
var ai_output_1 = require_ai_output();
|
|
52293
53823
|
var workspaceDirectory;
|
|
52294
53824
|
var cloudConnectUrl;
|
|
52295
53825
|
function getInterruptedWorkspaceState() {
|
|
@@ -52307,27 +53837,57 @@ var require_create_workspace = __commonJS({
|
|
|
52307
53837
|
const templateUrl = `https://github.com/${options.template}`;
|
|
52308
53838
|
const workingDir = process.cwd().replace(/\\/g, "/");
|
|
52309
53839
|
directory = (0, path_1.join)(workingDir, name);
|
|
52310
|
-
const
|
|
52311
|
-
|
|
53840
|
+
const aiMode = (0, ai_output_1.isAiAgent)();
|
|
53841
|
+
let workspaceSetupSpinner;
|
|
53842
|
+
if (aiMode) {
|
|
53843
|
+
(0, ai_output_1.logProgress)("cloning", `Cloning template ${options.template}...`);
|
|
53844
|
+
} else {
|
|
53845
|
+
const ora = require_ora();
|
|
53846
|
+
workspaceSetupSpinner = ora(`Creating workspace from template`).start();
|
|
53847
|
+
}
|
|
52312
53848
|
try {
|
|
52313
53849
|
await (0, clone_template_1.cloneTemplate)(templateUrl, name);
|
|
52314
|
-
|
|
53850
|
+
const npmLockPath = (0, path_1.join)(directory, "package-lock.json");
|
|
53851
|
+
if ((0, node_fs_1.existsSync)(npmLockPath)) {
|
|
53852
|
+
(0, node_fs_1.unlinkSync)(npmLockPath);
|
|
53853
|
+
}
|
|
53854
|
+
(0, package_manager_1.generatePackageManagerFiles)(directory, packageManager);
|
|
53855
|
+
if (aiMode) {
|
|
53856
|
+
(0, ai_output_1.logProgress)("installing", `Installing dependencies with ${packageManager}...`);
|
|
53857
|
+
}
|
|
53858
|
+
const pmc = (0, package_manager_1.getPackageManagerCommand)(packageManager);
|
|
53859
|
+
if (pmc.preInstall) {
|
|
53860
|
+
await (0, child_process_utils_1.execAndWait)(pmc.preInstall, directory);
|
|
53861
|
+
}
|
|
53862
|
+
await (0, child_process_utils_1.execAndWait)(pmc.install, directory);
|
|
52315
53863
|
workspaceDirectory = directory;
|
|
52316
|
-
|
|
53864
|
+
if (aiMode) {
|
|
53865
|
+
(0, ai_output_1.logProgress)("configuring", `Successfully created the workspace: ${directory}`);
|
|
53866
|
+
} else {
|
|
53867
|
+
workspaceSetupSpinner.succeed(`Successfully created the workspace: ${directory}`);
|
|
53868
|
+
}
|
|
52317
53869
|
} catch (e) {
|
|
52318
|
-
|
|
53870
|
+
if (!aiMode) {
|
|
53871
|
+
workspaceSetupSpinner.fail();
|
|
53872
|
+
}
|
|
52319
53873
|
throw e;
|
|
52320
53874
|
}
|
|
52321
|
-
if (nxCloud !== "skip") {
|
|
53875
|
+
if (nxCloud !== "skip" && !options.skipCloudConnect) {
|
|
52322
53876
|
await (0, nx_cloud_1.connectToNxCloudForTemplate)(directory, "create-nx-workspace", useGitHub);
|
|
52323
53877
|
}
|
|
52324
53878
|
} else {
|
|
53879
|
+
if (!preset) {
|
|
53880
|
+
throw new Error("Preset is required when not using a template. Please provide --preset or --template.");
|
|
53881
|
+
}
|
|
52325
53882
|
const tmpDir = await (0, create_sandbox_1.createSandbox)(packageManager);
|
|
52326
53883
|
const workspaceGlobs = getWorkspaceGlobsFromPreset(preset);
|
|
52327
53884
|
directory = await (0, create_empty_workspace_1.createEmptyWorkspace)(tmpDir, name, packageManager, {
|
|
52328
53885
|
...options,
|
|
52329
53886
|
preset,
|
|
52330
|
-
workspaceGlobs
|
|
53887
|
+
workspaceGlobs,
|
|
53888
|
+
// We want new workspaces to have a short URL to finish Cloud onboarding, but not have nxCloudId set up since it will be handled as part of the onboarding flow.
|
|
53889
|
+
// This is skipping nxCloudId for the "custom" flow.
|
|
53890
|
+
nxCloud: "skip"
|
|
52331
53891
|
});
|
|
52332
53892
|
workspaceDirectory = directory;
|
|
52333
53893
|
const thirdPartyPackageName = (0, get_third_party_preset_1.getPackageNameFromThirdPartyPreset)(preset);
|
|
@@ -52336,14 +53896,19 @@ var require_create_workspace = __commonJS({
|
|
|
52336
53896
|
}
|
|
52337
53897
|
}
|
|
52338
53898
|
const isTemplate = !!options.template;
|
|
52339
|
-
if (nxCloud !== "skip" && !isTemplate
|
|
52340
|
-
|
|
53899
|
+
if (nxCloud !== "skip" && !isTemplate) {
|
|
53900
|
+
const ciProvider = nxCloud === "yes" ? "github" : nxCloud;
|
|
53901
|
+
await (0, setup_ci_1.setupCI)(directory, ciProvider, packageManager);
|
|
52341
53902
|
}
|
|
52342
53903
|
let pushedToVcs = git_1.VcsPushStatus.SkippedGit;
|
|
52343
53904
|
if (!skipGit) {
|
|
53905
|
+
const aiMode = (0, ai_output_1.isAiAgent)();
|
|
53906
|
+
if (aiMode) {
|
|
53907
|
+
(0, ai_output_1.logProgress)("initializing", "Initializing git repository...");
|
|
53908
|
+
}
|
|
52344
53909
|
try {
|
|
52345
53910
|
await (0, git_1.initializeGitRepo)(directory, { defaultBase, commit });
|
|
52346
|
-
if (commit && !skipGitHubPush && (nxCloud === "github" ||
|
|
53911
|
+
if (commit && !skipGitHubPush && (nxCloud === "github" || nxCloud === "yes")) {
|
|
52347
53912
|
pushedToVcs = await (0, git_1.pushToGitHub)(directory, {
|
|
52348
53913
|
skipGitHubPush,
|
|
52349
53914
|
name,
|
|
@@ -52353,10 +53918,12 @@ var require_create_workspace = __commonJS({
|
|
|
52353
53918
|
}
|
|
52354
53919
|
} catch (e) {
|
|
52355
53920
|
if (e instanceof Error) {
|
|
52356
|
-
|
|
52357
|
-
|
|
52358
|
-
|
|
52359
|
-
|
|
53921
|
+
if (!aiMode) {
|
|
53922
|
+
output_1.output.error({
|
|
53923
|
+
title: "Could not initialize git repository",
|
|
53924
|
+
bodyLines: (0, error_utils_1.mapErrorToBodyLines)(e)
|
|
53925
|
+
});
|
|
53926
|
+
}
|
|
52360
53927
|
} else {
|
|
52361
53928
|
console.error(e);
|
|
52362
53929
|
}
|
|
@@ -52365,17 +53932,34 @@ var require_create_workspace = __commonJS({
|
|
|
52365
53932
|
let connectUrl;
|
|
52366
53933
|
let nxCloudInfo;
|
|
52367
53934
|
if (nxCloud !== "skip") {
|
|
52368
|
-
const
|
|
53935
|
+
const aiModeForCloud = (0, ai_output_1.isAiAgent)();
|
|
53936
|
+
if (aiModeForCloud) {
|
|
53937
|
+
(0, ai_output_1.logProgress)("configuring", "Configuring Nx Cloud...");
|
|
53938
|
+
}
|
|
53939
|
+
const token = options.skipCloudConnect ? void 0 : (0, nx_cloud_1.readNxCloudToken)(directory);
|
|
52369
53940
|
connectUrl = await (0, nx_cloud_1.createNxCloudOnboardingUrl)(nxCloud, token, directory, useGitHub);
|
|
52370
53941
|
cloudConnectUrl = connectUrl;
|
|
52371
|
-
|
|
53942
|
+
if (isTemplate) {
|
|
53943
|
+
const readmeUpdated = (0, update_readme_1.addConnectUrlToReadme)(directory, connectUrl);
|
|
53944
|
+
if (readmeUpdated && !skipGit && commit) {
|
|
53945
|
+
const alreadyPushed = pushedToVcs === git_1.VcsPushStatus.PushedToVcs;
|
|
53946
|
+
await (0, update_readme_1.amendOrCommitReadme)(directory, alreadyPushed);
|
|
53947
|
+
}
|
|
53948
|
+
}
|
|
53949
|
+
nxCloudInfo = await (0, nx_cloud_1.getNxCloudInfo)(connectUrl, pushedToVcs, options.completionMessageKey, name);
|
|
52372
53950
|
} else if (isTemplate && nxCloud === "skip") {
|
|
53951
|
+
const readmeUpdated = (0, update_readme_1.addConnectUrlToReadme)(directory, void 0);
|
|
53952
|
+
if (readmeUpdated && !skipGit && commit) {
|
|
53953
|
+
const alreadyPushed = pushedToVcs === git_1.VcsPushStatus.PushedToVcs;
|
|
53954
|
+
await (0, update_readme_1.amendOrCommitReadme)(directory, alreadyPushed);
|
|
53955
|
+
}
|
|
52373
53956
|
nxCloudInfo = (0, nx_cloud_1.getSkippedNxCloudInfo)();
|
|
52374
53957
|
}
|
|
52375
53958
|
return {
|
|
52376
53959
|
nxCloudInfo,
|
|
52377
53960
|
directory,
|
|
52378
|
-
pushedToVcs
|
|
53961
|
+
pushedToVcs,
|
|
53962
|
+
connectUrl
|
|
52379
53963
|
};
|
|
52380
53964
|
}
|
|
52381
53965
|
function extractConnectUrl(text) {
|
|
@@ -57110,6 +58694,7 @@ var require_pattern = __commonJS({
|
|
|
57110
58694
|
"use strict";
|
|
57111
58695
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
57112
58696
|
var code_1 = require_code2();
|
|
58697
|
+
var util_1 = require_util3();
|
|
57113
58698
|
var codegen_1 = require_codegen();
|
|
57114
58699
|
var error = {
|
|
57115
58700
|
message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
|
|
@@ -57122,10 +58707,18 @@ var require_pattern = __commonJS({
|
|
|
57122
58707
|
$data: true,
|
|
57123
58708
|
error,
|
|
57124
58709
|
code(cxt) {
|
|
57125
|
-
const { data, $data, schema, schemaCode, it } = cxt;
|
|
58710
|
+
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
57126
58711
|
const u = it.opts.unicodeRegExp ? "u" : "";
|
|
57127
|
-
|
|
57128
|
-
|
|
58712
|
+
if ($data) {
|
|
58713
|
+
const { regExp } = it.opts.code;
|
|
58714
|
+
const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
|
|
58715
|
+
const valid = gen.let("valid");
|
|
58716
|
+
gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
|
|
58717
|
+
cxt.fail$data((0, codegen_1._)`!${valid}`);
|
|
58718
|
+
} else {
|
|
58719
|
+
const regExp = (0, code_1.usePattern)(cxt, schema);
|
|
58720
|
+
cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
|
|
58721
|
+
}
|
|
57129
58722
|
}
|
|
57130
58723
|
};
|
|
57131
58724
|
exports2.default = def;
|
|
@@ -59269,10 +60862,11 @@ __export(base_exports, {
|
|
|
59269
60862
|
scrollUp: () => scrollUp,
|
|
59270
60863
|
setCwd: () => setCwd
|
|
59271
60864
|
});
|
|
59272
|
-
var import_node_process2, ESC2, OSC, BEL, SEP, isTerminalApp, isWindows3, cwdFunction, cursorTo2, cursorMove, cursorUp2, cursorDown2, cursorForward, cursorBackward, cursorLeft2, cursorSavePosition, cursorRestorePosition, cursorGetPosition, cursorNextLine, cursorPrevLine, cursorHide2, cursorShow2, eraseLines2, eraseEndLine, eraseStartLine, eraseLine2, eraseDown, eraseUp, eraseScreen, scrollUp, scrollDown, clearScreen, clearViewport, clearTerminal, enterAlternativeScreen, exitAlternativeScreen, beep, link, image, iTerm, ConEmu, setCwd;
|
|
60865
|
+
var import_node_process2, import_node_os2, ESC2, OSC, BEL, SEP, isTerminalApp, isWindows3, isTmux, cwdFunction, wrapOsc, cursorTo2, cursorMove, cursorUp2, cursorDown2, cursorForward, cursorBackward, cursorLeft2, cursorSavePosition, cursorRestorePosition, cursorGetPosition, cursorNextLine, cursorPrevLine, cursorHide2, cursorShow2, eraseLines2, eraseEndLine, eraseStartLine, eraseLine2, eraseDown, eraseUp, eraseScreen, scrollUp, scrollDown, clearScreen, clearViewport, isOldWindows, clearTerminal, enterAlternativeScreen, exitAlternativeScreen, beep, link, image, iTerm, ConEmu, setCwd;
|
|
59273
60866
|
var init_base = __esm({
|
|
59274
60867
|
"node_modules/log-update/node_modules/ansi-escapes/base.js"() {
|
|
59275
60868
|
import_node_process2 = __toESM(require("node:process"), 1);
|
|
60869
|
+
import_node_os2 = __toESM(require("node:os"), 1);
|
|
59276
60870
|
init_environment();
|
|
59277
60871
|
ESC2 = "\x1B[";
|
|
59278
60872
|
OSC = "\x1B]";
|
|
@@ -59280,9 +60874,16 @@ var init_base = __esm({
|
|
|
59280
60874
|
SEP = ";";
|
|
59281
60875
|
isTerminalApp = !isBrowser && import_node_process2.default.env.TERM_PROGRAM === "Apple_Terminal";
|
|
59282
60876
|
isWindows3 = !isBrowser && import_node_process2.default.platform === "win32";
|
|
60877
|
+
isTmux = !isBrowser && (import_node_process2.default.env.TERM?.startsWith("screen") || import_node_process2.default.env.TERM?.startsWith("tmux") || import_node_process2.default.env.TMUX !== void 0);
|
|
59283
60878
|
cwdFunction = isBrowser ? () => {
|
|
59284
60879
|
throw new Error("`process.cwd()` only works in Node.js, not the browser.");
|
|
59285
60880
|
} : import_node_process2.default.cwd;
|
|
60881
|
+
wrapOsc = (sequence) => {
|
|
60882
|
+
if (isTmux) {
|
|
60883
|
+
return "\x1BPtmux;" + sequence.replaceAll("\x1B", "\x1B\x1B") + "\x1B\\";
|
|
60884
|
+
}
|
|
60885
|
+
return sequence;
|
|
60886
|
+
};
|
|
59286
60887
|
cursorTo2 = (x, y) => {
|
|
59287
60888
|
if (typeof x !== "number") {
|
|
59288
60889
|
throw new TypeError("The `x` argument is required");
|
|
@@ -59341,24 +60942,30 @@ var init_base = __esm({
|
|
|
59341
60942
|
scrollDown = ESC2 + "T";
|
|
59342
60943
|
clearScreen = "\x1Bc";
|
|
59343
60944
|
clearViewport = `${eraseScreen}${ESC2}H`;
|
|
59344
|
-
|
|
60945
|
+
isOldWindows = () => {
|
|
60946
|
+
if (isBrowser || !isWindows3) {
|
|
60947
|
+
return false;
|
|
60948
|
+
}
|
|
60949
|
+
const parts = import_node_os2.default.release().split(".");
|
|
60950
|
+
const major = Number(parts[0]);
|
|
60951
|
+
const build = Number(parts[2] ?? 0);
|
|
60952
|
+
if (major < 10) {
|
|
60953
|
+
return true;
|
|
60954
|
+
}
|
|
60955
|
+
if (major === 10 && build < 10586) {
|
|
60956
|
+
return true;
|
|
60957
|
+
}
|
|
60958
|
+
return false;
|
|
60959
|
+
};
|
|
60960
|
+
clearTerminal = isOldWindows() ? `${eraseScreen}${ESC2}0f` : `${eraseScreen}${ESC2}3J${ESC2}H`;
|
|
59345
60961
|
enterAlternativeScreen = ESC2 + "?1049h";
|
|
59346
60962
|
exitAlternativeScreen = ESC2 + "?1049l";
|
|
59347
60963
|
beep = BEL;
|
|
59348
|
-
link = (text, url2) =>
|
|
59349
|
-
OSC
|
|
59350
|
-
|
|
59351
|
-
|
|
59352
|
-
|
|
59353
|
-
url2,
|
|
59354
|
-
BEL,
|
|
59355
|
-
text,
|
|
59356
|
-
OSC,
|
|
59357
|
-
"8",
|
|
59358
|
-
SEP,
|
|
59359
|
-
SEP,
|
|
59360
|
-
BEL
|
|
59361
|
-
].join("");
|
|
60964
|
+
link = (text, url2) => {
|
|
60965
|
+
const openLink = wrapOsc(`${OSC}8${SEP}${SEP}${url2}${BEL}`);
|
|
60966
|
+
const closeLink = wrapOsc(`${OSC}8${SEP}${SEP}${BEL}`);
|
|
60967
|
+
return openLink + text + closeLink;
|
|
60968
|
+
};
|
|
59362
60969
|
image = (data, options = {}) => {
|
|
59363
60970
|
let returnValue = `${OSC}1337;File=inline=1`;
|
|
59364
60971
|
if (options.width) {
|
|
@@ -59371,10 +60978,10 @@ var init_base = __esm({
|
|
|
59371
60978
|
returnValue += ";preserveAspectRatio=0";
|
|
59372
60979
|
}
|
|
59373
60980
|
const imageBuffer = Buffer.from(data);
|
|
59374
|
-
return returnValue + `;size=${imageBuffer.byteLength}:` + imageBuffer.toString("base64") + BEL;
|
|
60981
|
+
return wrapOsc(returnValue + `;size=${imageBuffer.byteLength}:` + imageBuffer.toString("base64") + BEL);
|
|
59375
60982
|
};
|
|
59376
60983
|
iTerm = {
|
|
59377
|
-
setCwd: (cwd = cwdFunction()) => `${OSC}50;CurrentDir=${cwd}${BEL}
|
|
60984
|
+
setCwd: (cwd = cwdFunction()) => wrapOsc(`${OSC}50;CurrentDir=${cwd}${BEL}`),
|
|
59378
60985
|
annotation(message2, options = {}) {
|
|
59379
60986
|
let returnValue = `${OSC}1337;`;
|
|
59380
60987
|
const hasX = options.x !== void 0;
|
|
@@ -59389,11 +60996,11 @@ var init_base = __esm({
|
|
|
59389
60996
|
} else {
|
|
59390
60997
|
returnValue += message2;
|
|
59391
60998
|
}
|
|
59392
|
-
return returnValue + BEL;
|
|
60999
|
+
return wrapOsc(returnValue + BEL);
|
|
59393
61000
|
}
|
|
59394
61001
|
};
|
|
59395
61002
|
ConEmu = {
|
|
59396
|
-
setCwd: (cwd = cwdFunction()) => `${OSC}9;9;${cwd}${BEL}`
|
|
61003
|
+
setCwd: (cwd = cwdFunction()) => wrapOsc(`${OSC}9;9;${cwd}${BEL}`)
|
|
59397
61004
|
};
|
|
59398
61005
|
setCwd = (cwd = cwdFunction()) => iTerm.setCwd(cwd) + ConEmu.setCwd(cwd);
|
|
59399
61006
|
}
|
|
@@ -60614,29 +62221,77 @@ __export(log_update_exports, {
|
|
|
60614
62221
|
default: () => log_update_default,
|
|
60615
62222
|
logUpdateStderr: () => logUpdateStderr
|
|
60616
62223
|
});
|
|
60617
|
-
function createLogUpdate(stream4, { showCursor = false } = {}) {
|
|
62224
|
+
function createLogUpdate(stream4, { showCursor = false, defaultWidth, defaultHeight } = {}) {
|
|
60618
62225
|
let previousLineCount = 0;
|
|
60619
|
-
let previousWidth = getWidth(stream4);
|
|
62226
|
+
let previousWidth = getWidth(stream4, defaultWidth);
|
|
60620
62227
|
let previousOutput = "";
|
|
62228
|
+
const computeFrame = (text, width) => {
|
|
62229
|
+
const textString = String(text);
|
|
62230
|
+
const raw = textString.endsWith("\n") ? textString : `${textString}
|
|
62231
|
+
`;
|
|
62232
|
+
const wrapped = wrapAnsi2(raw, width, { trim: false, hard: true, wordWrap: false });
|
|
62233
|
+
const { text: clippedText, wasClipped } = fitToTerminalHeight(stream4, wrapped, defaultHeight);
|
|
62234
|
+
const lines = clippedText === "" ? [] : clippedText.split("\n");
|
|
62235
|
+
return { wrapped: clippedText, lines, wasClipped };
|
|
62236
|
+
};
|
|
60621
62237
|
const reset2 = () => {
|
|
60622
62238
|
previousOutput = "";
|
|
60623
|
-
previousWidth = getWidth(stream4);
|
|
62239
|
+
previousWidth = getWidth(stream4, defaultWidth);
|
|
60624
62240
|
previousLineCount = 0;
|
|
60625
62241
|
};
|
|
60626
62242
|
const render = (...arguments_) => {
|
|
60627
62243
|
if (!showCursor) {
|
|
60628
62244
|
cli_cursor_default.hide();
|
|
60629
62245
|
}
|
|
60630
|
-
|
|
60631
|
-
const
|
|
60632
|
-
if (
|
|
62246
|
+
const width = getWidth(stream4, defaultWidth);
|
|
62247
|
+
const { wrapped, lines, wasClipped } = computeFrame(arguments_.join(" "), width);
|
|
62248
|
+
if (lines.length === 0) {
|
|
62249
|
+
previousOutput = wrapped;
|
|
62250
|
+
previousWidth = width;
|
|
62251
|
+
previousLineCount = 0;
|
|
62252
|
+
return;
|
|
62253
|
+
}
|
|
62254
|
+
if (wrapped === previousOutput && previousWidth === width) {
|
|
60633
62255
|
return;
|
|
60634
62256
|
}
|
|
60635
|
-
|
|
62257
|
+
if (previousLineCount === 0) {
|
|
62258
|
+
stream4.write(wrapped);
|
|
62259
|
+
previousOutput = wrapped;
|
|
62260
|
+
previousWidth = width;
|
|
62261
|
+
previousLineCount = lines.length;
|
|
62262
|
+
return;
|
|
62263
|
+
}
|
|
62264
|
+
if (previousWidth !== width || wasClipped) {
|
|
62265
|
+
stream4.write(base_exports.eraseLines(previousLineCount) + wrapped);
|
|
62266
|
+
previousOutput = wrapped;
|
|
62267
|
+
previousWidth = width;
|
|
62268
|
+
previousLineCount = lines.length;
|
|
62269
|
+
return;
|
|
62270
|
+
}
|
|
62271
|
+
const previousLines = previousOutput === "" ? [] : previousOutput.split("\n");
|
|
62272
|
+
const { start, endPrevious, endNext } = diffFrames(previousLines, lines);
|
|
62273
|
+
if (start === lines.length && previousLineCount === lines.length) {
|
|
62274
|
+
return;
|
|
62275
|
+
}
|
|
62276
|
+
if (start === 0) {
|
|
62277
|
+
stream4.write(base_exports.eraseLines(previousLineCount) + wrapped);
|
|
62278
|
+
previousOutput = wrapped;
|
|
62279
|
+
previousWidth = width;
|
|
62280
|
+
previousLineCount = lines.length;
|
|
62281
|
+
return;
|
|
62282
|
+
}
|
|
62283
|
+
const patch = buildPatch({
|
|
62284
|
+
prevCount: previousLineCount,
|
|
62285
|
+
start,
|
|
62286
|
+
endPrevious,
|
|
62287
|
+
endNext,
|
|
62288
|
+
nextLines: lines,
|
|
62289
|
+
nextWrappedEndsWithNewline: wrapped.endsWith("\n")
|
|
62290
|
+
});
|
|
62291
|
+
stream4.write(patch);
|
|
62292
|
+
previousOutput = wrapped;
|
|
60636
62293
|
previousWidth = width;
|
|
60637
|
-
|
|
60638
|
-
stream4.write(base_exports.eraseLines(previousLineCount) + output);
|
|
60639
|
-
previousLineCount = output.split("\n").length;
|
|
62294
|
+
previousLineCount = lines.length;
|
|
60640
62295
|
};
|
|
60641
62296
|
render.clear = () => {
|
|
60642
62297
|
stream4.write(base_exports.eraseLines(previousLineCount));
|
|
@@ -60648,9 +62303,20 @@ function createLogUpdate(stream4, { showCursor = false } = {}) {
|
|
|
60648
62303
|
cli_cursor_default.show();
|
|
60649
62304
|
}
|
|
60650
62305
|
};
|
|
62306
|
+
render.persist = (...arguments_) => {
|
|
62307
|
+
if (previousLineCount > 0) {
|
|
62308
|
+
stream4.write(base_exports.eraseLines(previousLineCount));
|
|
62309
|
+
previousLineCount = 0;
|
|
62310
|
+
}
|
|
62311
|
+
const text = `${arguments_.join(" ")}`;
|
|
62312
|
+
const width = getWidth(stream4, defaultWidth);
|
|
62313
|
+
const { wrapped: wrappedText } = computeFrame(text, width);
|
|
62314
|
+
stream4.write(wrappedText);
|
|
62315
|
+
reset2();
|
|
62316
|
+
};
|
|
60651
62317
|
return render;
|
|
60652
62318
|
}
|
|
60653
|
-
var import_node_process5,
|
|
62319
|
+
var import_node_process5, getWidth, fitToTerminalHeight, diffFrames, buildPatch, logUpdate, log_update_default, logUpdateStderr;
|
|
60654
62320
|
var init_log_update = __esm({
|
|
60655
62321
|
"node_modules/log-update/index.js"() {
|
|
60656
62322
|
import_node_process5 = __toESM(require("node:process"), 1);
|
|
@@ -60659,13 +62325,91 @@ var init_log_update = __esm({
|
|
|
60659
62325
|
init_wrap_ansi();
|
|
60660
62326
|
init_slice_ansi();
|
|
60661
62327
|
init_strip_ansi();
|
|
60662
|
-
|
|
60663
|
-
|
|
60664
|
-
|
|
60665
|
-
|
|
60666
|
-
|
|
60667
|
-
|
|
60668
|
-
|
|
62328
|
+
getWidth = (stream4, defaultWidth) => stream4.columns ?? defaultWidth ?? 80;
|
|
62329
|
+
fitToTerminalHeight = (stream4, wrappedText, defaultHeight) => {
|
|
62330
|
+
const terminalHeight = stream4.rows ?? defaultHeight ?? 24;
|
|
62331
|
+
if (terminalHeight === void 0) {
|
|
62332
|
+
return { text: wrappedText, wasClipped: false };
|
|
62333
|
+
}
|
|
62334
|
+
if (terminalHeight === 0) {
|
|
62335
|
+
return { text: "", wasClipped: wrappedText !== "" };
|
|
62336
|
+
}
|
|
62337
|
+
const unstyled = stripAnsi2(wrappedText);
|
|
62338
|
+
const newlineCount = [...unstyled].filter((character) => character === "\n").length;
|
|
62339
|
+
const linesCount = newlineCount + 1;
|
|
62340
|
+
const toRemove = Math.max(0, linesCount - terminalHeight);
|
|
62341
|
+
if (toRemove === 0) {
|
|
62342
|
+
return { text: wrappedText, wasClipped: false };
|
|
62343
|
+
}
|
|
62344
|
+
let seen = 0;
|
|
62345
|
+
let cut = 0;
|
|
62346
|
+
for (const [index, character] of [...unstyled].entries()) {
|
|
62347
|
+
if (character === "\n") {
|
|
62348
|
+
seen++;
|
|
62349
|
+
if (seen === toRemove) {
|
|
62350
|
+
cut = index + 1;
|
|
62351
|
+
break;
|
|
62352
|
+
}
|
|
62353
|
+
}
|
|
62354
|
+
}
|
|
62355
|
+
return { text: sliceAnsi(wrappedText, cut), wasClipped: true };
|
|
62356
|
+
};
|
|
62357
|
+
diffFrames = (previousLines, nextLines) => {
|
|
62358
|
+
let start = 0;
|
|
62359
|
+
for (; start < previousLines.length && start < nextLines.length; start++) {
|
|
62360
|
+
if (previousLines[start] !== nextLines[start]) {
|
|
62361
|
+
break;
|
|
62362
|
+
}
|
|
62363
|
+
}
|
|
62364
|
+
let endPrevious = previousLines.length - 1;
|
|
62365
|
+
let endNext = nextLines.length - 1;
|
|
62366
|
+
while (endPrevious >= start && endNext >= start && previousLines[endPrevious] === nextLines[endNext]) {
|
|
62367
|
+
endPrevious--;
|
|
62368
|
+
endNext--;
|
|
62369
|
+
}
|
|
62370
|
+
return { start, endPrevious, endNext };
|
|
62371
|
+
};
|
|
62372
|
+
buildPatch = ({
|
|
62373
|
+
prevCount,
|
|
62374
|
+
start,
|
|
62375
|
+
endPrevious,
|
|
62376
|
+
endNext,
|
|
62377
|
+
nextLines,
|
|
62378
|
+
nextWrappedEndsWithNewline
|
|
62379
|
+
}) => {
|
|
62380
|
+
let sequence = "";
|
|
62381
|
+
const upCount = Math.max(0, prevCount - 1 - start);
|
|
62382
|
+
if (upCount > 0) {
|
|
62383
|
+
sequence += base_exports.cursorUp(upCount);
|
|
62384
|
+
}
|
|
62385
|
+
sequence += base_exports.cursorLeft;
|
|
62386
|
+
const linesToClear = Math.max(0, endPrevious - start + 1);
|
|
62387
|
+
for (let index = 0; index < linesToClear; index++) {
|
|
62388
|
+
sequence += base_exports.eraseLine;
|
|
62389
|
+
if (index < linesToClear - 1) {
|
|
62390
|
+
sequence += base_exports.cursorDown();
|
|
62391
|
+
}
|
|
62392
|
+
}
|
|
62393
|
+
if (linesToClear > 1) {
|
|
62394
|
+
sequence += base_exports.cursorUp(linesToClear - 1);
|
|
62395
|
+
}
|
|
62396
|
+
sequence += base_exports.cursorLeft;
|
|
62397
|
+
const wroteSlice = nextLines.slice(start, endNext + 1);
|
|
62398
|
+
if (wroteSlice.length > 0) {
|
|
62399
|
+
const chunk = wroteSlice.join("\n");
|
|
62400
|
+
sequence += chunk;
|
|
62401
|
+
sequence += base_exports.eraseEndLine;
|
|
62402
|
+
if (nextWrappedEndsWithNewline && !chunk.endsWith("\n")) {
|
|
62403
|
+
sequence += "\n";
|
|
62404
|
+
}
|
|
62405
|
+
}
|
|
62406
|
+
const currentLine = start + wroteSlice.length;
|
|
62407
|
+
const finalLine = nextLines.length - 1;
|
|
62408
|
+
const downCount = finalLine - currentLine;
|
|
62409
|
+
if (downCount > 0) {
|
|
62410
|
+
sequence += base_exports.cursorDown(downCount);
|
|
62411
|
+
}
|
|
62412
|
+
return sequence;
|
|
60669
62413
|
};
|
|
60670
62414
|
logUpdate = createLogUpdate(import_node_process5.default.stdout);
|
|
60671
62415
|
log_update_default = logUpdate;
|
|
@@ -62184,7 +63928,7 @@ var wordPattern = new RegExp(
|
|
|
62184
63928
|
|
|
62185
63929
|
// packages/kong-ts/src/lib/utils.ts
|
|
62186
63930
|
function isEmpty(value) {
|
|
62187
|
-
return value === void 0 || value === "";
|
|
63931
|
+
return value === void 0 || value.trim() === "";
|
|
62188
63932
|
}
|
|
62189
63933
|
|
|
62190
63934
|
// node_modules/json-schema-faker/dist/vendor.js
|
|
@@ -68561,9 +70305,9 @@ ${indent2}${str}`;
|
|
|
68561
70305
|
}
|
|
68562
70306
|
var Node2 = class {
|
|
68563
70307
|
};
|
|
68564
|
-
function
|
|
70308
|
+
function toJSON(value, arg, ctx) {
|
|
68565
70309
|
if (Array.isArray(value))
|
|
68566
|
-
return value.map((v, i) =>
|
|
70310
|
+
return value.map((v, i) => toJSON(v, String(i), ctx));
|
|
68567
70311
|
if (value && typeof value.toJSON === "function") {
|
|
68568
70312
|
const anchor = ctx && ctx.anchors && ctx.anchors.get(value);
|
|
68569
70313
|
if (anchor)
|
|
@@ -68586,7 +70330,7 @@ ${indent2}${str}`;
|
|
|
68586
70330
|
this.value = value;
|
|
68587
70331
|
}
|
|
68588
70332
|
toJSON(arg, ctx) {
|
|
68589
|
-
return ctx && ctx.keep ? this.value :
|
|
70333
|
+
return ctx && ctx.keep ? this.value : toJSON(this.value, arg, ctx);
|
|
68590
70334
|
}
|
|
68591
70335
|
toString() {
|
|
68592
70336
|
return String(this.value);
|
|
@@ -68817,7 +70561,7 @@ ${indent2}${s}` : "\n";
|
|
|
68817
70561
|
ctx.onCreate(seq);
|
|
68818
70562
|
let i = 0;
|
|
68819
70563
|
for (const item of this.items)
|
|
68820
|
-
seq.push(
|
|
70564
|
+
seq.push(toJSON(item, String(i++), ctx));
|
|
68821
70565
|
return seq;
|
|
68822
70566
|
}
|
|
68823
70567
|
toString(ctx, onComment, onChompKeep) {
|
|
@@ -68872,15 +70616,15 @@ ${indent2}${s}` : "\n";
|
|
|
68872
70616
|
}
|
|
68873
70617
|
}
|
|
68874
70618
|
addToJSMap(ctx, map) {
|
|
68875
|
-
const key =
|
|
70619
|
+
const key = toJSON(this.key, "", ctx);
|
|
68876
70620
|
if (map instanceof Map) {
|
|
68877
|
-
const value =
|
|
70621
|
+
const value = toJSON(this.value, key, ctx);
|
|
68878
70622
|
map.set(key, value);
|
|
68879
70623
|
} else if (map instanceof Set) {
|
|
68880
70624
|
map.add(key);
|
|
68881
70625
|
} else {
|
|
68882
70626
|
const stringKey = stringifyKey(this.key, key, ctx);
|
|
68883
|
-
const value =
|
|
70627
|
+
const value = toJSON(this.value, stringKey, ctx);
|
|
68884
70628
|
if (stringKey in map)
|
|
68885
70629
|
Object.defineProperty(map, stringKey, {
|
|
68886
70630
|
value,
|
|
@@ -69043,7 +70787,7 @@ ${ctx.indent}`;
|
|
|
69043
70787
|
}
|
|
69044
70788
|
toJSON(arg, ctx) {
|
|
69045
70789
|
if (!ctx)
|
|
69046
|
-
return
|
|
70790
|
+
return toJSON(this.source, arg, ctx);
|
|
69047
70791
|
const {
|
|
69048
70792
|
anchors,
|
|
69049
70793
|
maxAliasCount
|
|
@@ -70511,7 +72255,7 @@ ${ca}` : ca;
|
|
|
70511
72255
|
exports2.strOptions = strOptions2;
|
|
70512
72256
|
exports2.stringifyNumber = stringifyNumber;
|
|
70513
72257
|
exports2.stringifyString = stringifyString;
|
|
70514
|
-
exports2.toJSON =
|
|
72258
|
+
exports2.toJSON = toJSON;
|
|
70515
72259
|
}
|
|
70516
72260
|
});
|
|
70517
72261
|
var require_warnings_1000a372 = __commonJS2({
|
|
@@ -75557,6 +77301,9 @@ var globalThisPolyfill = (function() {
|
|
|
75557
77301
|
}
|
|
75558
77302
|
})();
|
|
75559
77303
|
|
|
77304
|
+
// packages/kong-ts/src/lib/cron.ts
|
|
77305
|
+
var import_cronstrue = __toESM(require_cronstrue());
|
|
77306
|
+
|
|
75560
77307
|
// packages/kong-ts/src/lib/jq.ts
|
|
75561
77308
|
function jqFilter(value) {
|
|
75562
77309
|
return value;
|
|
@@ -75663,11 +77410,11 @@ function isRecord(value) {
|
|
|
75663
77410
|
if (constructor === void 0) {
|
|
75664
77411
|
return true;
|
|
75665
77412
|
}
|
|
75666
|
-
const
|
|
75667
|
-
if (
|
|
77413
|
+
const prototype2 = constructor.prototype;
|
|
77414
|
+
if (prototype2 === null || typeof prototype2 !== "object" || !validRecordToStringValues.includes(Object.prototype.toString.call(prototype2))) {
|
|
75668
77415
|
return false;
|
|
75669
77416
|
}
|
|
75670
|
-
if (!
|
|
77417
|
+
if (!prototype2.hasOwnProperty("isPrototypeOf")) {
|
|
75671
77418
|
return false;
|
|
75672
77419
|
}
|
|
75673
77420
|
return true;
|
|
@@ -78168,6 +79915,11 @@ var dist_default7 = createPrompt((config, done) => {
|
|
|
78168
79915
|
// node_modules/@inquirer/rawlist/dist/index.js
|
|
78169
79916
|
var import_node_util6 = require("node:util");
|
|
78170
79917
|
var numberRegex = /\d+/;
|
|
79918
|
+
var rawlistTheme = {
|
|
79919
|
+
style: {
|
|
79920
|
+
description: (text) => (0, import_node_util6.styleText)("cyan", text)
|
|
79921
|
+
}
|
|
79922
|
+
};
|
|
78171
79923
|
function isSelectableChoice(choice) {
|
|
78172
79924
|
return choice != null && !Separator.isSeparator(choice);
|
|
78173
79925
|
}
|
|
@@ -78177,11 +79929,12 @@ function normalizeChoices3(choices) {
|
|
|
78177
79929
|
if (Separator.isSeparator(choice))
|
|
78178
79930
|
return choice;
|
|
78179
79931
|
index += 1;
|
|
78180
|
-
if (typeof choice === "
|
|
79932
|
+
if (typeof choice !== "object" || choice === null || !("value" in choice)) {
|
|
79933
|
+
const name2 = String(choice);
|
|
78181
79934
|
return {
|
|
78182
79935
|
value: choice,
|
|
78183
|
-
name:
|
|
78184
|
-
short:
|
|
79936
|
+
name: name2,
|
|
79937
|
+
short: name2,
|
|
78185
79938
|
key: String(index)
|
|
78186
79939
|
};
|
|
78187
79940
|
}
|
|
@@ -78190,7 +79943,8 @@ function normalizeChoices3(choices) {
|
|
|
78190
79943
|
value: choice.value,
|
|
78191
79944
|
name,
|
|
78192
79945
|
short: choice.short ?? name,
|
|
78193
|
-
key: choice.key ?? String(index)
|
|
79946
|
+
key: choice.key ?? String(index),
|
|
79947
|
+
description: choice.description
|
|
78194
79948
|
};
|
|
78195
79949
|
});
|
|
78196
79950
|
}
|
|
@@ -78208,9 +79962,12 @@ var dist_default8 = createPrompt((config, done) => {
|
|
|
78208
79962
|
const { loop = true } = config;
|
|
78209
79963
|
const choices = useMemo(() => normalizeChoices3(config.choices), [config.choices]);
|
|
78210
79964
|
const [status, setStatus] = useState("idle");
|
|
78211
|
-
const [value, setValue] = useState(
|
|
79965
|
+
const [value, setValue] = useState(() => {
|
|
79966
|
+
const defaultChoice = config.default == null ? void 0 : choices.find((choice) => isSelectableChoice(choice) && choice.value === config.default);
|
|
79967
|
+
return defaultChoice?.key ?? "";
|
|
79968
|
+
});
|
|
78212
79969
|
const [errorMsg, setError] = useState();
|
|
78213
|
-
const theme = makeTheme(config.theme);
|
|
79970
|
+
const theme = makeTheme(rawlistTheme, config.theme);
|
|
78214
79971
|
const prefix = usePrefix({ status, theme });
|
|
78215
79972
|
const bounds = useMemo(() => {
|
|
78216
79973
|
const first = choices.findIndex(isSelectableChoice);
|
|
@@ -78222,11 +79979,11 @@ var dist_default8 = createPrompt((config, done) => {
|
|
|
78222
79979
|
}, [choices]);
|
|
78223
79980
|
useKeypress((key, rl) => {
|
|
78224
79981
|
if (isEnterKey(key)) {
|
|
78225
|
-
const [
|
|
78226
|
-
if (isSelectableChoice(
|
|
78227
|
-
setValue(
|
|
79982
|
+
const [selectedChoice2] = getSelectedChoice(value, choices);
|
|
79983
|
+
if (isSelectableChoice(selectedChoice2)) {
|
|
79984
|
+
setValue(selectedChoice2.short);
|
|
78228
79985
|
setStatus("done");
|
|
78229
|
-
done(
|
|
79986
|
+
done(selectedChoice2.value);
|
|
78230
79987
|
} else if (value === "") {
|
|
78231
79988
|
setError("Please input a value");
|
|
78232
79989
|
} else {
|
|
@@ -78234,8 +79991,8 @@ var dist_default8 = createPrompt((config, done) => {
|
|
|
78234
79991
|
}
|
|
78235
79992
|
} else if (isUpKey(key) || isDownKey(key)) {
|
|
78236
79993
|
rl.clearLine(0);
|
|
78237
|
-
const [
|
|
78238
|
-
if (!
|
|
79994
|
+
const [selectedChoice2, active] = getSelectedChoice(value, choices);
|
|
79995
|
+
if (!selectedChoice2) {
|
|
78239
79996
|
const firstChoice = isDownKey(key) ? choices.find(isSelectableChoice) : choices.findLast(isSelectableChoice);
|
|
78240
79997
|
setValue(firstChoice.key);
|
|
78241
79998
|
} else if (loop || isUpKey(key) && active !== bounds.first || isDownKey(key) && active !== bounds.last) {
|
|
@@ -78260,7 +80017,7 @@ var dist_default8 = createPrompt((config, done) => {
|
|
|
78260
80017
|
return ` ${choice.separator}`;
|
|
78261
80018
|
}
|
|
78262
80019
|
const line = ` ${choice.key}) ${choice.name}`;
|
|
78263
|
-
if (choice.key === value
|
|
80020
|
+
if (choice.key === value) {
|
|
78264
80021
|
return theme.style.highlight(line);
|
|
78265
80022
|
}
|
|
78266
80023
|
return line;
|
|
@@ -78269,9 +80026,14 @@ var dist_default8 = createPrompt((config, done) => {
|
|
|
78269
80026
|
if (errorMsg) {
|
|
78270
80027
|
error = theme.style.error(errorMsg);
|
|
78271
80028
|
}
|
|
80029
|
+
const [selectedChoice] = getSelectedChoice(value, choices);
|
|
80030
|
+
let description = "";
|
|
80031
|
+
if (!errorMsg && selectedChoice?.description) {
|
|
80032
|
+
description = theme.style.description(selectedChoice.description);
|
|
80033
|
+
}
|
|
78272
80034
|
return [
|
|
78273
80035
|
`${prefix} ${message2} ${value}`,
|
|
78274
|
-
[choicesStr, error].filter(Boolean).join("\n")
|
|
80036
|
+
[choicesStr, error, description].filter(Boolean).join("\n")
|
|
78275
80037
|
];
|
|
78276
80038
|
});
|
|
78277
80039
|
|
|
@@ -78370,6 +80132,7 @@ var dist_default10 = createPrompt((config, done) => {
|
|
|
78370
80132
|
const [searchTerm, setSearchTerm] = useState("");
|
|
78371
80133
|
const [searchResults, setSearchResults] = useState([]);
|
|
78372
80134
|
const [searchError, setSearchError] = useState();
|
|
80135
|
+
const defaultApplied = useRef(false);
|
|
78373
80136
|
const prefix = usePrefix({ status, theme });
|
|
78374
80137
|
const bounds = useMemo(() => {
|
|
78375
80138
|
const first = searchResults.findIndex(isSelectable2);
|
|
@@ -78387,9 +80150,16 @@ var dist_default10 = createPrompt((config, done) => {
|
|
|
78387
80150
|
signal: controller.signal
|
|
78388
80151
|
});
|
|
78389
80152
|
if (!controller.signal.aborted) {
|
|
78390
|
-
|
|
80153
|
+
const normalized = normalizeChoices4(results);
|
|
80154
|
+
let initialActive;
|
|
80155
|
+
if (!defaultApplied.current && "default" in config) {
|
|
80156
|
+
const defaultIndex = normalized.findIndex((item) => isSelectable2(item) && item.value === config.default);
|
|
80157
|
+
initialActive = defaultIndex === -1 ? void 0 : defaultIndex;
|
|
80158
|
+
defaultApplied.current = true;
|
|
80159
|
+
}
|
|
80160
|
+
setActive(initialActive);
|
|
78391
80161
|
setSearchError(void 0);
|
|
78392
|
-
setSearchResults(
|
|
80162
|
+
setSearchResults(normalized);
|
|
78393
80163
|
setStatus("idle");
|
|
78394
80164
|
}
|
|
78395
80165
|
} catch (error2) {
|
|
@@ -78505,11 +80275,12 @@ function normalizeChoices5(choices) {
|
|
|
78505
80275
|
return choices.map((choice) => {
|
|
78506
80276
|
if (Separator.isSeparator(choice))
|
|
78507
80277
|
return choice;
|
|
78508
|
-
if (typeof choice === "
|
|
80278
|
+
if (typeof choice !== "object" || choice === null || !("value" in choice)) {
|
|
80279
|
+
const name2 = String(choice);
|
|
78509
80280
|
return {
|
|
78510
80281
|
value: choice,
|
|
78511
|
-
name:
|
|
78512
|
-
short:
|
|
80282
|
+
name: name2,
|
|
80283
|
+
short: name2,
|
|
78513
80284
|
disabled: false
|
|
78514
80285
|
};
|
|
78515
80286
|
}
|
|
@@ -78765,12 +80536,19 @@ var PromptsRunner = class {
|
|
|
78765
80536
|
return choiceObj;
|
|
78766
80537
|
});
|
|
78767
80538
|
}
|
|
78768
|
-
|
|
80539
|
+
const wrappedQuestion = Object.assign({}, question, {
|
|
78769
80540
|
message: message2,
|
|
78770
80541
|
default: defaultValue,
|
|
78771
80542
|
choices,
|
|
78772
80543
|
type: question.type in this.prompts ? question.type : "input"
|
|
78773
80544
|
});
|
|
80545
|
+
if (question.validate) {
|
|
80546
|
+
const originalValidate = question.validate;
|
|
80547
|
+
wrappedQuestion.validate = (value) => {
|
|
80548
|
+
return originalValidate(value, this.answers);
|
|
80549
|
+
};
|
|
80550
|
+
}
|
|
80551
|
+
return wrappedQuestion;
|
|
78774
80552
|
};
|
|
78775
80553
|
fetchAnswer = async (rawQuestion) => {
|
|
78776
80554
|
const question = await this.prepareQuestion(rawQuestion);
|
|
@@ -78955,8 +80733,8 @@ var isPlainObject2 = (val) => {
|
|
|
78955
80733
|
if (kindOf(val) !== "object") {
|
|
78956
80734
|
return false;
|
|
78957
80735
|
}
|
|
78958
|
-
const
|
|
78959
|
-
return (
|
|
80736
|
+
const prototype2 = getPrototypeOf(val);
|
|
80737
|
+
return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
|
|
78960
80738
|
};
|
|
78961
80739
|
var isEmptyObject = (val) => {
|
|
78962
80740
|
if (!isObject(val) || isBuffer(val)) {
|
|
@@ -78979,7 +80757,12 @@ var isFormData = (thing) => {
|
|
|
78979
80757
|
kind === "object" && isFunction2(thing.toString) && thing.toString() === "[object FormData]"));
|
|
78980
80758
|
};
|
|
78981
80759
|
var isURLSearchParams = kindOfTest("URLSearchParams");
|
|
78982
|
-
var [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
80760
|
+
var [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
80761
|
+
"ReadableStream",
|
|
80762
|
+
"Request",
|
|
80763
|
+
"Response",
|
|
80764
|
+
"Headers"
|
|
80765
|
+
].map(kindOfTest);
|
|
78983
80766
|
var trim2 = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
78984
80767
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
78985
80768
|
if (obj === null || typeof obj === "undefined") {
|
|
@@ -79032,6 +80815,9 @@ function merge2() {
|
|
|
79032
80815
|
const { caseless, skipUndefined } = isContextDefined(this) && this || {};
|
|
79033
80816
|
const result = {};
|
|
79034
80817
|
const assignValue = (val, key) => {
|
|
80818
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
80819
|
+
return;
|
|
80820
|
+
}
|
|
79035
80821
|
const targetKey = caseless && findKey2(result, key) || key;
|
|
79036
80822
|
if (isPlainObject2(result[targetKey]) && isPlainObject2(val)) {
|
|
79037
80823
|
result[targetKey] = merge2(result[targetKey], val);
|
|
@@ -79049,13 +80835,27 @@ function merge2() {
|
|
|
79049
80835
|
return result;
|
|
79050
80836
|
}
|
|
79051
80837
|
var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
79052
|
-
forEach(
|
|
79053
|
-
|
|
79054
|
-
|
|
79055
|
-
|
|
79056
|
-
|
|
79057
|
-
|
|
79058
|
-
|
|
80838
|
+
forEach(
|
|
80839
|
+
b,
|
|
80840
|
+
(val, key) => {
|
|
80841
|
+
if (thisArg && isFunction2(val)) {
|
|
80842
|
+
Object.defineProperty(a, key, {
|
|
80843
|
+
value: bind(val, thisArg),
|
|
80844
|
+
writable: true,
|
|
80845
|
+
enumerable: true,
|
|
80846
|
+
configurable: true
|
|
80847
|
+
});
|
|
80848
|
+
} else {
|
|
80849
|
+
Object.defineProperty(a, key, {
|
|
80850
|
+
value: val,
|
|
80851
|
+
writable: true,
|
|
80852
|
+
enumerable: true,
|
|
80853
|
+
configurable: true
|
|
80854
|
+
});
|
|
80855
|
+
}
|
|
80856
|
+
},
|
|
80857
|
+
{ allOwnKeys }
|
|
80858
|
+
);
|
|
79059
80859
|
return a;
|
|
79060
80860
|
};
|
|
79061
80861
|
var stripBOM = (content) => {
|
|
@@ -79064,9 +80864,17 @@ var stripBOM = (content) => {
|
|
|
79064
80864
|
}
|
|
79065
80865
|
return content;
|
|
79066
80866
|
};
|
|
79067
|
-
var inherits = (constructor, superConstructor, props,
|
|
79068
|
-
constructor.prototype = Object.create(
|
|
79069
|
-
|
|
80867
|
+
var inherits = (constructor, superConstructor, props, descriptors) => {
|
|
80868
|
+
constructor.prototype = Object.create(
|
|
80869
|
+
superConstructor.prototype,
|
|
80870
|
+
descriptors
|
|
80871
|
+
);
|
|
80872
|
+
Object.defineProperty(constructor.prototype, "constructor", {
|
|
80873
|
+
value: constructor,
|
|
80874
|
+
writable: true,
|
|
80875
|
+
enumerable: false,
|
|
80876
|
+
configurable: true
|
|
80877
|
+
});
|
|
79070
80878
|
Object.defineProperty(constructor, "super", {
|
|
79071
80879
|
value: superConstructor.prototype
|
|
79072
80880
|
});
|
|
@@ -79137,19 +80945,16 @@ var matchAll = (regExp, str) => {
|
|
|
79137
80945
|
};
|
|
79138
80946
|
var isHTMLForm = kindOfTest("HTMLFormElement");
|
|
79139
80947
|
var toCamelCase = (str) => {
|
|
79140
|
-
return str.toLowerCase().replace(
|
|
79141
|
-
|
|
79142
|
-
|
|
79143
|
-
return p1.toUpperCase() + p2;
|
|
79144
|
-
}
|
|
79145
|
-
);
|
|
80948
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
80949
|
+
return p1.toUpperCase() + p2;
|
|
80950
|
+
});
|
|
79146
80951
|
};
|
|
79147
80952
|
var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
79148
80953
|
var isRegExp = kindOfTest("RegExp");
|
|
79149
80954
|
var reduceDescriptors = (obj, reducer) => {
|
|
79150
|
-
const
|
|
80955
|
+
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
79151
80956
|
const reducedDescriptors = {};
|
|
79152
|
-
forEach(
|
|
80957
|
+
forEach(descriptors, (descriptor, name) => {
|
|
79153
80958
|
let ret;
|
|
79154
80959
|
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
|
79155
80960
|
reducedDescriptors[name] = ret || descriptor;
|
|
@@ -79226,20 +81031,21 @@ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
79226
81031
|
return setImmediate;
|
|
79227
81032
|
}
|
|
79228
81033
|
return postMessageSupported ? ((token, callbacks) => {
|
|
79229
|
-
_global.addEventListener(
|
|
79230
|
-
|
|
79231
|
-
|
|
79232
|
-
|
|
79233
|
-
|
|
81034
|
+
_global.addEventListener(
|
|
81035
|
+
"message",
|
|
81036
|
+
({ source, data }) => {
|
|
81037
|
+
if (source === _global && data === token) {
|
|
81038
|
+
callbacks.length && callbacks.shift()();
|
|
81039
|
+
}
|
|
81040
|
+
},
|
|
81041
|
+
false
|
|
81042
|
+
);
|
|
79234
81043
|
return (cb) => {
|
|
79235
81044
|
callbacks.push(cb);
|
|
79236
81045
|
_global.postMessage(token, "*");
|
|
79237
81046
|
};
|
|
79238
81047
|
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
79239
|
-
})(
|
|
79240
|
-
typeof setImmediate === "function",
|
|
79241
|
-
isFunction2(_global.postMessage)
|
|
79242
|
-
);
|
|
81048
|
+
})(typeof setImmediate === "function", isFunction2(_global.postMessage));
|
|
79243
81049
|
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
79244
81050
|
var isIterable = (thing) => thing != null && isFunction2(thing[iterator]);
|
|
79245
81051
|
var utils_default2 = {
|
|
@@ -79304,25 +81110,38 @@ var utils_default2 = {
|
|
|
79304
81110
|
};
|
|
79305
81111
|
|
|
79306
81112
|
// node_modules/axios/lib/core/AxiosError.js
|
|
79307
|
-
|
|
79308
|
-
|
|
79309
|
-
|
|
79310
|
-
|
|
79311
|
-
|
|
79312
|
-
|
|
81113
|
+
var AxiosError = class _AxiosError extends Error {
|
|
81114
|
+
static from(error, code, config, request, response, customProps) {
|
|
81115
|
+
const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
|
|
81116
|
+
axiosError.cause = error;
|
|
81117
|
+
axiosError.name = error.name;
|
|
81118
|
+
customProps && Object.assign(axiosError, customProps);
|
|
81119
|
+
return axiosError;
|
|
79313
81120
|
}
|
|
79314
|
-
|
|
79315
|
-
|
|
79316
|
-
|
|
79317
|
-
|
|
79318
|
-
|
|
79319
|
-
|
|
79320
|
-
|
|
79321
|
-
|
|
79322
|
-
|
|
79323
|
-
}
|
|
79324
|
-
|
|
79325
|
-
|
|
81121
|
+
/**
|
|
81122
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
81123
|
+
*
|
|
81124
|
+
* @param {string} message The error message.
|
|
81125
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
81126
|
+
* @param {Object} [config] The config.
|
|
81127
|
+
* @param {Object} [request] The request.
|
|
81128
|
+
* @param {Object} [response] The response.
|
|
81129
|
+
*
|
|
81130
|
+
* @returns {Error} The created error.
|
|
81131
|
+
*/
|
|
81132
|
+
constructor(message2, code, config, request, response) {
|
|
81133
|
+
super(message2);
|
|
81134
|
+
this.name = "AxiosError";
|
|
81135
|
+
this.isAxiosError = true;
|
|
81136
|
+
code && (this.code = code);
|
|
81137
|
+
config && (this.config = config);
|
|
81138
|
+
request && (this.request = request);
|
|
81139
|
+
if (response) {
|
|
81140
|
+
this.response = response;
|
|
81141
|
+
this.status = response.status;
|
|
81142
|
+
}
|
|
81143
|
+
}
|
|
81144
|
+
toJSON() {
|
|
79326
81145
|
return {
|
|
79327
81146
|
// Standard
|
|
79328
81147
|
message: this.message,
|
|
@@ -79341,45 +81160,19 @@ utils_default2.inherits(AxiosError, Error, {
|
|
|
79341
81160
|
status: this.status
|
|
79342
81161
|
};
|
|
79343
81162
|
}
|
|
79344
|
-
});
|
|
79345
|
-
var prototype = AxiosError.prototype;
|
|
79346
|
-
var descriptors = {};
|
|
79347
|
-
[
|
|
79348
|
-
"ERR_BAD_OPTION_VALUE",
|
|
79349
|
-
"ERR_BAD_OPTION",
|
|
79350
|
-
"ECONNABORTED",
|
|
79351
|
-
"ETIMEDOUT",
|
|
79352
|
-
"ERR_NETWORK",
|
|
79353
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
79354
|
-
"ERR_DEPRECATED",
|
|
79355
|
-
"ERR_BAD_RESPONSE",
|
|
79356
|
-
"ERR_BAD_REQUEST",
|
|
79357
|
-
"ERR_CANCELED",
|
|
79358
|
-
"ERR_NOT_SUPPORT",
|
|
79359
|
-
"ERR_INVALID_URL"
|
|
79360
|
-
// eslint-disable-next-line func-names
|
|
79361
|
-
].forEach((code) => {
|
|
79362
|
-
descriptors[code] = { value: code };
|
|
79363
|
-
});
|
|
79364
|
-
Object.defineProperties(AxiosError, descriptors);
|
|
79365
|
-
Object.defineProperty(prototype, "isAxiosError", { value: true });
|
|
79366
|
-
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
79367
|
-
const axiosError = Object.create(prototype);
|
|
79368
|
-
utils_default2.toFlatObject(error, axiosError, function filter3(obj) {
|
|
79369
|
-
return obj !== Error.prototype;
|
|
79370
|
-
}, (prop) => {
|
|
79371
|
-
return prop !== "isAxiosError";
|
|
79372
|
-
});
|
|
79373
|
-
const msg = error && error.message ? error.message : "Error";
|
|
79374
|
-
const errCode = code == null && error ? error.code : code;
|
|
79375
|
-
AxiosError.call(axiosError, msg, errCode, config, request, response);
|
|
79376
|
-
if (error && axiosError.cause == null) {
|
|
79377
|
-
Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
|
|
79378
|
-
}
|
|
79379
|
-
axiosError.name = error && error.name || "Error";
|
|
79380
|
-
customProps && Object.assign(axiosError, customProps);
|
|
79381
|
-
return axiosError;
|
|
79382
81163
|
};
|
|
81164
|
+
AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
81165
|
+
AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
81166
|
+
AxiosError.ECONNABORTED = "ECONNABORTED";
|
|
81167
|
+
AxiosError.ETIMEDOUT = "ETIMEDOUT";
|
|
81168
|
+
AxiosError.ERR_NETWORK = "ERR_NETWORK";
|
|
81169
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
81170
|
+
AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
81171
|
+
AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
81172
|
+
AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
81173
|
+
AxiosError.ERR_CANCELED = "ERR_CANCELED";
|
|
81174
|
+
AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
81175
|
+
AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
79383
81176
|
var AxiosError_default = AxiosError;
|
|
79384
81177
|
|
|
79385
81178
|
// node_modules/axios/lib/platform/node/classes/FormData.js
|
|
@@ -79520,11 +81313,11 @@ function AxiosURLSearchParams(params, options) {
|
|
|
79520
81313
|
this._pairs = [];
|
|
79521
81314
|
params && toFormData_default(params, this, options);
|
|
79522
81315
|
}
|
|
79523
|
-
var
|
|
79524
|
-
|
|
81316
|
+
var prototype = AxiosURLSearchParams.prototype;
|
|
81317
|
+
prototype.append = function append(name, value) {
|
|
79525
81318
|
this._pairs.push([name, value]);
|
|
79526
81319
|
};
|
|
79527
|
-
|
|
81320
|
+
prototype.toString = function toString2(encoder) {
|
|
79528
81321
|
const _encode = encoder ? function(value) {
|
|
79529
81322
|
return encoder.call(this, value, encode);
|
|
79530
81323
|
} : encode;
|
|
@@ -79543,17 +81336,15 @@ function buildURL(url2, params, options) {
|
|
|
79543
81336
|
return url2;
|
|
79544
81337
|
}
|
|
79545
81338
|
const _encode = options && options.encode || encode2;
|
|
79546
|
-
|
|
79547
|
-
options
|
|
79548
|
-
|
|
79549
|
-
|
|
79550
|
-
}
|
|
79551
|
-
const serializeFn = options && options.serialize;
|
|
81339
|
+
const _options = utils_default2.isFunction(options) ? {
|
|
81340
|
+
serialize: options
|
|
81341
|
+
} : options;
|
|
81342
|
+
const serializeFn = _options && _options.serialize;
|
|
79552
81343
|
let serializedParams;
|
|
79553
81344
|
if (serializeFn) {
|
|
79554
|
-
serializedParams = serializeFn(params,
|
|
81345
|
+
serializedParams = serializeFn(params, _options);
|
|
79555
81346
|
} else {
|
|
79556
|
-
serializedParams = utils_default2.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params,
|
|
81347
|
+
serializedParams = utils_default2.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, _options).toString(_encode);
|
|
79557
81348
|
}
|
|
79558
81349
|
if (serializedParams) {
|
|
79559
81350
|
const hashmarkIndex = url2.indexOf("#");
|
|
@@ -79575,6 +81366,7 @@ var InterceptorManager = class {
|
|
|
79575
81366
|
*
|
|
79576
81367
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
79577
81368
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
81369
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
79578
81370
|
*
|
|
79579
81371
|
* @return {Number} An ID used to remove interceptor later
|
|
79580
81372
|
*/
|
|
@@ -79633,7 +81425,8 @@ var InterceptorManager_default = InterceptorManager;
|
|
|
79633
81425
|
var transitional_default = {
|
|
79634
81426
|
silentJSONParsing: true,
|
|
79635
81427
|
forcedJSONParsing: true,
|
|
79636
|
-
clarifyTimeoutError: false
|
|
81428
|
+
clarifyTimeoutError: false,
|
|
81429
|
+
legacyInterceptorReqResOrdering: true
|
|
79637
81430
|
};
|
|
79638
81431
|
|
|
79639
81432
|
// node_modules/axios/lib/platform/node/index.js
|
|
@@ -80122,11 +81915,11 @@ var AxiosHeaders = class {
|
|
|
80122
81915
|
accessors: {}
|
|
80123
81916
|
};
|
|
80124
81917
|
const accessors = internals.accessors;
|
|
80125
|
-
const
|
|
81918
|
+
const prototype2 = this.prototype;
|
|
80126
81919
|
function defineAccessor(_header) {
|
|
80127
81920
|
const lHeader = normalizeHeader(_header);
|
|
80128
81921
|
if (!accessors[lHeader]) {
|
|
80129
|
-
buildAccessors(
|
|
81922
|
+
buildAccessors(prototype2, _header);
|
|
80130
81923
|
accessors[lHeader] = true;
|
|
80131
81924
|
}
|
|
80132
81925
|
}
|
|
@@ -80166,13 +81959,22 @@ function isCancel(value) {
|
|
|
80166
81959
|
}
|
|
80167
81960
|
|
|
80168
81961
|
// node_modules/axios/lib/cancel/CanceledError.js
|
|
80169
|
-
|
|
80170
|
-
|
|
80171
|
-
|
|
80172
|
-
|
|
80173
|
-
|
|
80174
|
-
|
|
80175
|
-
}
|
|
81962
|
+
var CanceledError = class extends AxiosError_default {
|
|
81963
|
+
/**
|
|
81964
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
81965
|
+
*
|
|
81966
|
+
* @param {string=} message The message.
|
|
81967
|
+
* @param {Object=} config The config.
|
|
81968
|
+
* @param {Object=} request The request.
|
|
81969
|
+
*
|
|
81970
|
+
* @returns {CanceledError} The created error.
|
|
81971
|
+
*/
|
|
81972
|
+
constructor(message2, config, request) {
|
|
81973
|
+
super(message2 == null ? "canceled" : message2, AxiosError_default.ERR_CANCELED, config, request);
|
|
81974
|
+
this.name = "CanceledError";
|
|
81975
|
+
this.__CANCEL__ = true;
|
|
81976
|
+
}
|
|
81977
|
+
};
|
|
80176
81978
|
var CanceledError_default = CanceledError;
|
|
80177
81979
|
|
|
80178
81980
|
// node_modules/axios/lib/core/settle.js
|
|
@@ -80193,6 +81995,9 @@ function settle(resolve2, reject, response) {
|
|
|
80193
81995
|
|
|
80194
81996
|
// node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
80195
81997
|
function isAbsoluteURL(url2) {
|
|
81998
|
+
if (typeof url2 !== "string") {
|
|
81999
|
+
return false;
|
|
82000
|
+
}
|
|
80196
82001
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
|
|
80197
82002
|
}
|
|
80198
82003
|
|
|
@@ -80220,7 +82025,7 @@ var import_follow_redirects = __toESM(require_follow_redirects(), 1);
|
|
|
80220
82025
|
var import_zlib = __toESM(require("zlib"), 1);
|
|
80221
82026
|
|
|
80222
82027
|
// node_modules/axios/lib/env/data.js
|
|
80223
|
-
var VERSION = "1.13.
|
|
82028
|
+
var VERSION = "1.13.5";
|
|
80224
82029
|
|
|
80225
82030
|
// node_modules/axios/lib/helpers/parseProtocol.js
|
|
80226
82031
|
function parseProtocol(url2) {
|
|
@@ -80780,8 +82585,11 @@ function setProxy(options, configProxy, location2) {
|
|
|
80780
82585
|
proxy2.auth = (proxy2.username || "") + ":" + (proxy2.password || "");
|
|
80781
82586
|
}
|
|
80782
82587
|
if (proxy2.auth) {
|
|
80783
|
-
|
|
82588
|
+
const validProxyAuth = Boolean(proxy2.auth.username || proxy2.auth.password);
|
|
82589
|
+
if (validProxyAuth) {
|
|
80784
82590
|
proxy2.auth = (proxy2.auth.username || "") + ":" + (proxy2.auth.password || "");
|
|
82591
|
+
} else if (typeof proxy2.auth === "object") {
|
|
82592
|
+
throw new AxiosError_default("Invalid proxy authorization", AxiosError_default.ERR_BAD_OPTION, { proxy: proxy2 });
|
|
80785
82593
|
}
|
|
80786
82594
|
const base64 = Buffer.from(proxy2.auth, "utf8").toString("base64");
|
|
80787
82595
|
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
@@ -80833,7 +82641,7 @@ var resolveFamily = ({ address, family }) => {
|
|
|
80833
82641
|
var buildAddressEntry = (address, family) => resolveFamily(utils_default2.isObject(address) ? address : { address, family });
|
|
80834
82642
|
var http2Transport = {
|
|
80835
82643
|
request(options, cb) {
|
|
80836
|
-
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
|
|
82644
|
+
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
|
|
80837
82645
|
const { http2Options, headers } = options;
|
|
80838
82646
|
const session = http2Sessions.getSession(authority, http2Options);
|
|
80839
82647
|
const {
|
|
@@ -81439,11 +83247,16 @@ function mergeConfig(config1, config2) {
|
|
|
81439
83247
|
validateStatus: mergeDirectKeys,
|
|
81440
83248
|
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
81441
83249
|
};
|
|
81442
|
-
utils_default2.forEach(
|
|
81443
|
-
|
|
81444
|
-
|
|
81445
|
-
|
|
81446
|
-
|
|
83250
|
+
utils_default2.forEach(
|
|
83251
|
+
Object.keys({ ...config1, ...config2 }),
|
|
83252
|
+
function computeConfigValue(prop) {
|
|
83253
|
+
if (prop === "__proto__" || prop === "constructor" || prop === "prototype")
|
|
83254
|
+
return;
|
|
83255
|
+
const merge3 = utils_default2.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
83256
|
+
const configValue = merge3(config1[prop], config2[prop], prop);
|
|
83257
|
+
utils_default2.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config[prop] = configValue);
|
|
83258
|
+
}
|
|
83259
|
+
);
|
|
81447
83260
|
return config;
|
|
81448
83261
|
}
|
|
81449
83262
|
|
|
@@ -81630,7 +83443,7 @@ var composeSignals = (signals3, timeout) => {
|
|
|
81630
83443
|
};
|
|
81631
83444
|
let timer = timeout && setTimeout(() => {
|
|
81632
83445
|
timer = null;
|
|
81633
|
-
onabort(new AxiosError_default(`timeout ${timeout}
|
|
83446
|
+
onabort(new AxiosError_default(`timeout of ${timeout}ms exceeded`, AxiosError_default.ETIMEDOUT));
|
|
81634
83447
|
}, timeout);
|
|
81635
83448
|
const unsubscribe = () => {
|
|
81636
83449
|
if (signals3) {
|
|
@@ -81906,13 +83719,13 @@ var factory = (env2) => {
|
|
|
81906
83719
|
unsubscribe && unsubscribe();
|
|
81907
83720
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
81908
83721
|
throw Object.assign(
|
|
81909
|
-
new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request),
|
|
83722
|
+
new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request, err && err.response),
|
|
81910
83723
|
{
|
|
81911
83724
|
cause: err.cause || err
|
|
81912
83725
|
}
|
|
81913
83726
|
);
|
|
81914
83727
|
}
|
|
81915
|
-
throw AxiosError_default.from(err, err && err.code, config, request);
|
|
83728
|
+
throw AxiosError_default.from(err, err && err.code, config, request, err && err.response);
|
|
81916
83729
|
}
|
|
81917
83730
|
};
|
|
81918
83731
|
};
|
|
@@ -82161,7 +83974,8 @@ var Axios = class {
|
|
|
82161
83974
|
validator_default.assertOptions(transitional2, {
|
|
82162
83975
|
silentJSONParsing: validators2.transitional(validators2.boolean),
|
|
82163
83976
|
forcedJSONParsing: validators2.transitional(validators2.boolean),
|
|
82164
|
-
clarifyTimeoutError: validators2.transitional(validators2.boolean)
|
|
83977
|
+
clarifyTimeoutError: validators2.transitional(validators2.boolean),
|
|
83978
|
+
legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
|
|
82165
83979
|
}, false);
|
|
82166
83980
|
}
|
|
82167
83981
|
if (paramsSerializer != null) {
|
|
@@ -82205,7 +84019,13 @@ var Axios = class {
|
|
|
82205
84019
|
return;
|
|
82206
84020
|
}
|
|
82207
84021
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
82208
|
-
|
|
84022
|
+
const transitional3 = config.transitional || transitional_default;
|
|
84023
|
+
const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering;
|
|
84024
|
+
if (legacyInterceptorReqResOrdering) {
|
|
84025
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
84026
|
+
} else {
|
|
84027
|
+
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
84028
|
+
}
|
|
82209
84029
|
});
|
|
82210
84030
|
const responseInterceptorChain = [];
|
|
82211
84031
|
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
@@ -83776,7 +85596,7 @@ var {
|
|
|
83776
85596
|
bgWhiteBright
|
|
83777
85597
|
} = createColors();
|
|
83778
85598
|
|
|
83779
|
-
// node_modules/listr2/dist/index.
|
|
85599
|
+
// node_modules/listr2/dist/index.mjs
|
|
83780
85600
|
var import_util3 = require("util");
|
|
83781
85601
|
var import_os2 = require("os");
|
|
83782
85602
|
var import_string_decoder = require("string_decoder");
|
|
@@ -83788,56 +85608,56 @@ var ANSI_ESCAPE_CODES = {
|
|
|
83788
85608
|
CURSOR_HIDE: ANSI_ESCAPE + "?25l",
|
|
83789
85609
|
CURSOR_SHOW: ANSI_ESCAPE + "?25h"
|
|
83790
85610
|
};
|
|
83791
|
-
var ListrEnvironmentVariables = /* @__PURE__ */ (function(
|
|
83792
|
-
|
|
83793
|
-
|
|
83794
|
-
|
|
83795
|
-
|
|
83796
|
-
return
|
|
85611
|
+
var ListrEnvironmentVariables = /* @__PURE__ */ (function(ListrEnvironmentVariables2) {
|
|
85612
|
+
ListrEnvironmentVariables2["FORCE_UNICODE"] = "LISTR_FORCE_UNICODE";
|
|
85613
|
+
ListrEnvironmentVariables2["FORCE_TTY"] = "LISTR_FORCE_TTY";
|
|
85614
|
+
ListrEnvironmentVariables2["DISABLE_COLOR"] = "NO_COLOR";
|
|
85615
|
+
ListrEnvironmentVariables2["FORCE_COLOR"] = "FORCE_COLOR";
|
|
85616
|
+
return ListrEnvironmentVariables2;
|
|
83797
85617
|
})({});
|
|
83798
|
-
var ListrErrorTypes = /* @__PURE__ */ (function(
|
|
83799
|
-
|
|
83800
|
-
|
|
83801
|
-
|
|
83802
|
-
|
|
83803
|
-
|
|
83804
|
-
return
|
|
85618
|
+
var ListrErrorTypes = /* @__PURE__ */ (function(ListrErrorTypes2) {
|
|
85619
|
+
ListrErrorTypes2["WILL_RETRY"] = "WILL_RETRY";
|
|
85620
|
+
ListrErrorTypes2["WILL_ROLLBACK"] = "WILL_ROLLBACK";
|
|
85621
|
+
ListrErrorTypes2["HAS_FAILED_TO_ROLLBACK"] = "HAS_FAILED_TO_ROLLBACK";
|
|
85622
|
+
ListrErrorTypes2["HAS_FAILED"] = "HAS_FAILED";
|
|
85623
|
+
ListrErrorTypes2["HAS_FAILED_WITHOUT_ERROR"] = "HAS_FAILED_WITHOUT_ERROR";
|
|
85624
|
+
return ListrErrorTypes2;
|
|
83805
85625
|
})({});
|
|
83806
|
-
var ListrEventType = /* @__PURE__ */ (function(
|
|
83807
|
-
|
|
83808
|
-
return
|
|
85626
|
+
var ListrEventType = /* @__PURE__ */ (function(ListrEventType2) {
|
|
85627
|
+
ListrEventType2["SHOULD_REFRESH_RENDER"] = "SHOUD_REFRESH_RENDER";
|
|
85628
|
+
return ListrEventType2;
|
|
83809
85629
|
})({});
|
|
83810
|
-
var ListrRendererSelection = /* @__PURE__ */ (function(
|
|
83811
|
-
|
|
83812
|
-
|
|
83813
|
-
|
|
83814
|
-
return
|
|
85630
|
+
var ListrRendererSelection = /* @__PURE__ */ (function(ListrRendererSelection2) {
|
|
85631
|
+
ListrRendererSelection2["PRIMARY"] = "PRIMARY";
|
|
85632
|
+
ListrRendererSelection2["SECONDARY"] = "SECONDARY";
|
|
85633
|
+
ListrRendererSelection2["SILENT"] = "SILENT";
|
|
85634
|
+
return ListrRendererSelection2;
|
|
83815
85635
|
})({});
|
|
83816
|
-
var ListrTaskEventType = /* @__PURE__ */ (function(
|
|
83817
|
-
|
|
83818
|
-
|
|
83819
|
-
|
|
83820
|
-
|
|
83821
|
-
|
|
83822
|
-
|
|
83823
|
-
|
|
83824
|
-
|
|
83825
|
-
return
|
|
85636
|
+
var ListrTaskEventType = /* @__PURE__ */ (function(ListrTaskEventType2) {
|
|
85637
|
+
ListrTaskEventType2["TITLE"] = "TITLE";
|
|
85638
|
+
ListrTaskEventType2["STATE"] = "STATE";
|
|
85639
|
+
ListrTaskEventType2["ENABLED"] = "ENABLED";
|
|
85640
|
+
ListrTaskEventType2["SUBTASK"] = "SUBTASK";
|
|
85641
|
+
ListrTaskEventType2["PROMPT"] = "PROMPT";
|
|
85642
|
+
ListrTaskEventType2["OUTPUT"] = "OUTPUT";
|
|
85643
|
+
ListrTaskEventType2["MESSAGE"] = "MESSAGE";
|
|
85644
|
+
ListrTaskEventType2["CLOSED"] = "CLOSED";
|
|
85645
|
+
return ListrTaskEventType2;
|
|
83826
85646
|
})({});
|
|
83827
|
-
var ListrTaskState = /* @__PURE__ */ (function(
|
|
83828
|
-
|
|
83829
|
-
|
|
83830
|
-
|
|
83831
|
-
|
|
83832
|
-
|
|
83833
|
-
|
|
83834
|
-
|
|
83835
|
-
|
|
83836
|
-
|
|
83837
|
-
|
|
83838
|
-
|
|
83839
|
-
|
|
83840
|
-
return
|
|
85647
|
+
var ListrTaskState = /* @__PURE__ */ (function(ListrTaskState2) {
|
|
85648
|
+
ListrTaskState2["WAITING"] = "WAITING";
|
|
85649
|
+
ListrTaskState2["STARTED"] = "STARTED";
|
|
85650
|
+
ListrTaskState2["COMPLETED"] = "COMPLETED";
|
|
85651
|
+
ListrTaskState2["FAILED"] = "FAILED";
|
|
85652
|
+
ListrTaskState2["SKIPPED"] = "SKIPPED";
|
|
85653
|
+
ListrTaskState2["ROLLING_BACK"] = "ROLLING_BACK";
|
|
85654
|
+
ListrTaskState2["ROLLED_BACK"] = "ROLLED_BACK";
|
|
85655
|
+
ListrTaskState2["RETRY"] = "RETRY";
|
|
85656
|
+
ListrTaskState2["PAUSED"] = "PAUSED";
|
|
85657
|
+
ListrTaskState2["PROMPT"] = "PROMPT";
|
|
85658
|
+
ListrTaskState2["PROMPT_COMPLETED"] = "PROMPT_COMPLETED";
|
|
85659
|
+
ListrTaskState2["PROMPT_FAILED"] = "PROMPT_FAILED";
|
|
85660
|
+
return ListrTaskState2;
|
|
83841
85661
|
})({});
|
|
83842
85662
|
var EventManager = class {
|
|
83843
85663
|
emitter = new eventemitter3_default();
|
|
@@ -83897,21 +85717,21 @@ var FIGURES_FALLBACK = {
|
|
|
83897
85717
|
squareSmallFilled: "\u25A0"
|
|
83898
85718
|
};
|
|
83899
85719
|
var figures2 = isUnicodeSupported2() ? FIGURES_MAIN : FIGURES_FALLBACK;
|
|
83900
|
-
function splat(message2, ...
|
|
83901
|
-
return (0, import_util3.format)(String(message2), ...
|
|
85720
|
+
function splat(message2, ...splat2) {
|
|
85721
|
+
return (0, import_util3.format)(String(message2), ...splat2);
|
|
83902
85722
|
}
|
|
83903
|
-
var ListrLogLevels = /* @__PURE__ */ (function(
|
|
83904
|
-
|
|
83905
|
-
|
|
83906
|
-
|
|
83907
|
-
|
|
83908
|
-
|
|
83909
|
-
|
|
83910
|
-
|
|
83911
|
-
|
|
83912
|
-
|
|
83913
|
-
|
|
83914
|
-
return
|
|
85723
|
+
var ListrLogLevels = /* @__PURE__ */ (function(ListrLogLevels2) {
|
|
85724
|
+
ListrLogLevels2["STARTED"] = "STARTED";
|
|
85725
|
+
ListrLogLevels2["COMPLETED"] = "COMPLETED";
|
|
85726
|
+
ListrLogLevels2["FAILED"] = "FAILED";
|
|
85727
|
+
ListrLogLevels2["SKIPPED"] = "SKIPPED";
|
|
85728
|
+
ListrLogLevels2["OUTPUT"] = "OUTPUT";
|
|
85729
|
+
ListrLogLevels2["TITLE"] = "TITLE";
|
|
85730
|
+
ListrLogLevels2["ROLLBACK"] = "ROLLBACK";
|
|
85731
|
+
ListrLogLevels2["RETRY"] = "RETRY";
|
|
85732
|
+
ListrLogLevels2["PROMPT"] = "PROMPT";
|
|
85733
|
+
ListrLogLevels2["PAUSED"] = "PAUSED";
|
|
85734
|
+
return ListrLogLevels2;
|
|
83915
85735
|
})({});
|
|
83916
85736
|
var LISTR_LOGGER_STYLE = {
|
|
83917
85737
|
icon: {
|
|
@@ -84126,7 +85946,7 @@ var ProcessOutput = class {
|
|
|
84126
85946
|
const output = Object.entries(this.stream).map(([name, stream4]) => ({
|
|
84127
85947
|
name,
|
|
84128
85948
|
buffer: stream4.release()
|
|
84129
|
-
})).filter((
|
|
85949
|
+
})).filter((output2) => this.options.dump.includes(output2.name)).flatMap((output2) => output2.buffer).sort((a, b) => a.time - b.time).map((message2) => {
|
|
84130
85950
|
return {
|
|
84131
85951
|
...message2,
|
|
84132
85952
|
entry: cleanseAnsi(message2.entry)
|
|
@@ -84197,25 +86017,26 @@ var Spinner = class {
|
|
|
84197
86017
|
}
|
|
84198
86018
|
stop() {
|
|
84199
86019
|
clearInterval(this.id);
|
|
86020
|
+
this.id = void 0;
|
|
84200
86021
|
}
|
|
84201
86022
|
};
|
|
84202
|
-
var ListrDefaultRendererLogLevels = /* @__PURE__ */ (function(
|
|
84203
|
-
|
|
84204
|
-
|
|
84205
|
-
|
|
84206
|
-
|
|
84207
|
-
|
|
84208
|
-
|
|
84209
|
-
|
|
84210
|
-
|
|
84211
|
-
|
|
84212
|
-
|
|
84213
|
-
|
|
84214
|
-
|
|
84215
|
-
|
|
84216
|
-
|
|
84217
|
-
|
|
84218
|
-
return
|
|
86023
|
+
var ListrDefaultRendererLogLevels = /* @__PURE__ */ (function(ListrDefaultRendererLogLevels2) {
|
|
86024
|
+
ListrDefaultRendererLogLevels2["SKIPPED_WITH_COLLAPSE"] = "SKIPPED_WITH_COLLAPSE";
|
|
86025
|
+
ListrDefaultRendererLogLevels2["SKIPPED_WITHOUT_COLLAPSE"] = "SKIPPED_WITHOUT_COLLAPSE";
|
|
86026
|
+
ListrDefaultRendererLogLevels2["OUTPUT"] = "OUTPUT";
|
|
86027
|
+
ListrDefaultRendererLogLevels2["OUTPUT_WITH_BOTTOMBAR"] = "OUTPUT_WITH_BOTTOMBAR";
|
|
86028
|
+
ListrDefaultRendererLogLevels2["PENDING"] = "PENDING";
|
|
86029
|
+
ListrDefaultRendererLogLevels2["COMPLETED"] = "COMPLETED";
|
|
86030
|
+
ListrDefaultRendererLogLevels2["COMPLETED_WITH_FAILED_SUBTASKS"] = "COMPLETED_WITH_FAILED_SUBTASKS";
|
|
86031
|
+
ListrDefaultRendererLogLevels2["COMPLETED_WITH_FAILED_SISTER_TASKS"] = "COMPLETED_WITH_SISTER_TASKS_FAILED";
|
|
86032
|
+
ListrDefaultRendererLogLevels2["RETRY"] = "RETRY";
|
|
86033
|
+
ListrDefaultRendererLogLevels2["ROLLING_BACK"] = "ROLLING_BACK";
|
|
86034
|
+
ListrDefaultRendererLogLevels2["ROLLED_BACK"] = "ROLLED_BACK";
|
|
86035
|
+
ListrDefaultRendererLogLevels2["FAILED"] = "FAILED";
|
|
86036
|
+
ListrDefaultRendererLogLevels2["FAILED_WITH_FAILED_SUBTASKS"] = "FAILED_WITH_SUBTASKS";
|
|
86037
|
+
ListrDefaultRendererLogLevels2["WAITING"] = "WAITING";
|
|
86038
|
+
ListrDefaultRendererLogLevels2["PAUSED"] = "PAUSED";
|
|
86039
|
+
return ListrDefaultRendererLogLevels2;
|
|
84219
86040
|
})({});
|
|
84220
86041
|
var LISTR_DEFAULT_RENDERER_STYLE = {
|
|
84221
86042
|
icon: {
|
|
@@ -84455,7 +86276,7 @@ var DefaultRenderer = class DefaultRenderer2 {
|
|
|
84455
86276
|
this.activePrompt = task.id;
|
|
84456
86277
|
}
|
|
84457
86278
|
}
|
|
84458
|
-
if (task.hasTitle()) if (!(tasks.some((
|
|
86279
|
+
if (task.hasTitle()) if (!(tasks.some((task2) => task2.hasFailed()) && !task.hasFailed() && task.options.exitOnError !== false && !(task.isCompleted() || task.isSkipped()))) if (task.hasFailed() && rendererOptions.collapseErrors) output.push(...this.format(!task.hasSubtasks() && task.message.error && rendererOptions.showErrorMessage ? task.message.error : task.title, this.style(task), level));
|
|
84459
86280
|
else if (task.isSkipped() && rendererOptions.collapseSkips) output.push(...this.format(this.logger.suffix(task.message.skip && rendererOptions.showSkipMessage ? task.message.skip : task.title, {
|
|
84460
86281
|
field: ListrLogLevels.SKIPPED,
|
|
84461
86282
|
condition: rendererOptions.suffixSkips,
|
|
@@ -86299,7 +88120,7 @@ tmp/lib/tmp.js:
|
|
|
86299
88120
|
*)
|
|
86300
88121
|
|
|
86301
88122
|
axios/dist/node/axios.cjs:
|
|
86302
|
-
(*! Axios v1.13.
|
|
88123
|
+
(*! Axios v1.13.5 Copyright (c) 2026 Matt Zabriskie and contributors *)
|
|
86303
88124
|
|
|
86304
88125
|
json-schema-faker/dist/vendor.js:
|
|
86305
88126
|
(*!
|