@fern-api/generator-cli 0.0.18 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +1973 -1715
- package/package.json +19 -23
package/dist/cli.cjs
CHANGED
|
@@ -30,578 +30,205 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
mod
|
|
31
31
|
));
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/.pnpm/
|
|
34
|
-
var
|
|
35
|
-
"../../node_modules/.pnpm/
|
|
33
|
+
// ../../node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/build/index.cjs
|
|
34
|
+
var require_build = __commonJS({
|
|
35
|
+
"../../node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/build/index.cjs"(exports2, module2) {
|
|
36
36
|
"use strict";
|
|
37
37
|
var fs2 = require("fs");
|
|
38
|
-
var
|
|
38
|
+
var util = require("util");
|
|
39
39
|
var path4 = require("path");
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
var FILE_MODE = 384;
|
|
51
|
-
var EXIT = "exit";
|
|
52
|
-
var _removeObjects = [];
|
|
53
|
-
var FN_RMDIR_SYNC = fs2.rmdirSync.bind(fs2);
|
|
54
|
-
var _gracefulCleanup = false;
|
|
55
|
-
function rimraf(dirPath, callback) {
|
|
56
|
-
return fs2.rm(dirPath, { recursive: true }, callback);
|
|
57
|
-
}
|
|
58
|
-
function FN_RIMRAF_SYNC(dirPath) {
|
|
59
|
-
return fs2.rmSync(dirPath, { recursive: true });
|
|
60
|
-
}
|
|
61
|
-
function tmpName(options, callback) {
|
|
62
|
-
const args = _parseArguments(options, callback), opts = args[0], cb = args[1];
|
|
63
|
-
try {
|
|
64
|
-
_assertAndSanitizeOptions(opts);
|
|
65
|
-
} catch (err) {
|
|
66
|
-
return cb(err);
|
|
40
|
+
var shim2;
|
|
41
|
+
var Y18N2 = class {
|
|
42
|
+
constructor(opts) {
|
|
43
|
+
opts = opts || {};
|
|
44
|
+
this.directory = opts.directory || "./locales";
|
|
45
|
+
this.updateFiles = typeof opts.updateFiles === "boolean" ? opts.updateFiles : true;
|
|
46
|
+
this.locale = opts.locale || "en";
|
|
47
|
+
this.fallbackToLanguage = typeof opts.fallbackToLanguage === "boolean" ? opts.fallbackToLanguage : true;
|
|
48
|
+
this.cache = /* @__PURE__ */ Object.create(null);
|
|
49
|
+
this.writeQueue = [];
|
|
67
50
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const name = _generateTmpName(opts);
|
|
72
|
-
fs2.stat(name, function(err) {
|
|
73
|
-
if (!err) {
|
|
74
|
-
if (tries-- > 0)
|
|
75
|
-
return _getUniqueName();
|
|
76
|
-
return cb(new Error("Could not get a unique tmp filename, max tries reached " + name));
|
|
77
|
-
}
|
|
78
|
-
cb(null, name);
|
|
79
|
-
});
|
|
80
|
-
} catch (err) {
|
|
81
|
-
cb(err);
|
|
51
|
+
__(...args) {
|
|
52
|
+
if (typeof arguments[0] !== "string") {
|
|
53
|
+
return this._taggedLiteral(arguments[0], ...arguments);
|
|
82
54
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
55
|
+
const str = args.shift();
|
|
56
|
+
let cb = function() {
|
|
57
|
+
};
|
|
58
|
+
if (typeof args[args.length - 1] === "function")
|
|
59
|
+
cb = args.pop();
|
|
60
|
+
cb = cb || function() {
|
|
61
|
+
};
|
|
62
|
+
if (!this.cache[this.locale])
|
|
63
|
+
this._readLocaleFile();
|
|
64
|
+
if (!this.cache[this.locale][str] && this.updateFiles) {
|
|
65
|
+
this.cache[this.locale][str] = str;
|
|
66
|
+
this._enqueueWrite({
|
|
67
|
+
directory: this.directory,
|
|
68
|
+
locale: this.locale,
|
|
69
|
+
cb
|
|
70
|
+
});
|
|
71
|
+
} else {
|
|
72
|
+
cb();
|
|
95
73
|
}
|
|
96
|
-
|
|
97
|
-
throw new Error("Could not get a unique tmp filename, max tries reached");
|
|
98
|
-
}
|
|
99
|
-
function file(options, callback) {
|
|
100
|
-
const args = _parseArguments(options, callback), opts = args[0], cb = args[1];
|
|
101
|
-
tmpName(opts, function _tmpNameCreated(err, name) {
|
|
102
|
-
if (err)
|
|
103
|
-
return cb(err);
|
|
104
|
-
fs2.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) {
|
|
105
|
-
if (err2)
|
|
106
|
-
return cb(err2);
|
|
107
|
-
if (opts.discardDescriptor) {
|
|
108
|
-
return fs2.close(fd, function _discardCallback(possibleErr) {
|
|
109
|
-
return cb(possibleErr, name, void 0, _prepareTmpFileRemoveCallback(name, -1, opts, false));
|
|
110
|
-
});
|
|
111
|
-
} else {
|
|
112
|
-
const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
|
|
113
|
-
cb(null, name, fd, _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, false));
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
function fileSync(options) {
|
|
119
|
-
const args = _parseArguments(options), opts = args[0];
|
|
120
|
-
const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
|
|
121
|
-
const name = tmpNameSync(opts);
|
|
122
|
-
var fd = fs2.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
|
|
123
|
-
if (opts.discardDescriptor) {
|
|
124
|
-
fs2.closeSync(fd);
|
|
125
|
-
fd = void 0;
|
|
74
|
+
return shim2.format.apply(shim2.format, [this.cache[this.locale][str] || str].concat(args));
|
|
126
75
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
if (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
function dirSync(options) {
|
|
146
|
-
const args = _parseArguments(options), opts = args[0];
|
|
147
|
-
const name = tmpNameSync(opts);
|
|
148
|
-
fs2.mkdirSync(name, opts.mode || DIR_MODE);
|
|
149
|
-
return {
|
|
150
|
-
name,
|
|
151
|
-
removeCallback: _prepareTmpDirRemoveCallback(name, opts, true)
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
function _removeFileAsync(fdPath, next) {
|
|
155
|
-
const _handler = function(err) {
|
|
156
|
-
if (err && !_isENOENT(err)) {
|
|
157
|
-
return next(err);
|
|
76
|
+
__n() {
|
|
77
|
+
const args = Array.prototype.slice.call(arguments);
|
|
78
|
+
const singular = args.shift();
|
|
79
|
+
const plural = args.shift();
|
|
80
|
+
const quantity = args.shift();
|
|
81
|
+
let cb = function() {
|
|
82
|
+
};
|
|
83
|
+
if (typeof args[args.length - 1] === "function")
|
|
84
|
+
cb = args.pop();
|
|
85
|
+
if (!this.cache[this.locale])
|
|
86
|
+
this._readLocaleFile();
|
|
87
|
+
let str = quantity === 1 ? singular : plural;
|
|
88
|
+
if (this.cache[this.locale][singular]) {
|
|
89
|
+
const entry = this.cache[this.locale][singular];
|
|
90
|
+
str = entry[quantity === 1 ? "one" : "other"];
|
|
158
91
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
if (0 <= fdPath[0])
|
|
172
|
-
fs2.closeSync(fdPath[0]);
|
|
173
|
-
} catch (e) {
|
|
174
|
-
if (!_isEBADF(e) && !_isENOENT(e))
|
|
175
|
-
throw e;
|
|
176
|
-
} finally {
|
|
177
|
-
try {
|
|
178
|
-
fs2.unlinkSync(fdPath[1]);
|
|
179
|
-
} catch (e) {
|
|
180
|
-
if (!_isENOENT(e))
|
|
181
|
-
rethrownException = e;
|
|
92
|
+
if (!this.cache[this.locale][singular] && this.updateFiles) {
|
|
93
|
+
this.cache[this.locale][singular] = {
|
|
94
|
+
one: singular,
|
|
95
|
+
other: plural
|
|
96
|
+
};
|
|
97
|
+
this._enqueueWrite({
|
|
98
|
+
directory: this.directory,
|
|
99
|
+
locale: this.locale,
|
|
100
|
+
cb
|
|
101
|
+
});
|
|
102
|
+
} else {
|
|
103
|
+
cb();
|
|
182
104
|
}
|
|
105
|
+
const values = [str];
|
|
106
|
+
if (~str.indexOf("%d"))
|
|
107
|
+
values.push(quantity);
|
|
108
|
+
return shim2.format.apply(shim2.format, values.concat(args));
|
|
183
109
|
}
|
|
184
|
-
|
|
185
|
-
|
|
110
|
+
setLocale(locale) {
|
|
111
|
+
this.locale = locale;
|
|
186
112
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
const removeFunction = opts.unsafeCleanup ? rimraf : fs2.rmdir.bind(fs2);
|
|
197
|
-
const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC;
|
|
198
|
-
const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync);
|
|
199
|
-
const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync);
|
|
200
|
-
if (!opts.keep)
|
|
201
|
-
_removeObjects.unshift(removeCallbackSync);
|
|
202
|
-
return sync ? removeCallbackSync : removeCallback;
|
|
203
|
-
}
|
|
204
|
-
function _prepareRemoveCallback(removeFunction, fileOrDirName, sync, cleanupCallbackSync) {
|
|
205
|
-
let called = false;
|
|
206
|
-
return function _cleanupCallback(next) {
|
|
207
|
-
if (!called) {
|
|
208
|
-
const toRemove = cleanupCallbackSync || _cleanupCallback;
|
|
209
|
-
const index = _removeObjects.indexOf(toRemove);
|
|
210
|
-
if (index >= 0)
|
|
211
|
-
_removeObjects.splice(index, 1);
|
|
212
|
-
called = true;
|
|
213
|
-
if (sync || removeFunction === FN_RMDIR_SYNC || removeFunction === FN_RIMRAF_SYNC) {
|
|
214
|
-
return removeFunction(fileOrDirName);
|
|
215
|
-
} else {
|
|
216
|
-
return removeFunction(fileOrDirName, next || function() {
|
|
217
|
-
});
|
|
113
|
+
getLocale() {
|
|
114
|
+
return this.locale;
|
|
115
|
+
}
|
|
116
|
+
updateLocale(obj) {
|
|
117
|
+
if (!this.cache[this.locale])
|
|
118
|
+
this._readLocaleFile();
|
|
119
|
+
for (const key in obj) {
|
|
120
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
121
|
+
this.cache[this.locale][key] = obj[key];
|
|
218
122
|
}
|
|
219
123
|
}
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
function _garbageCollector() {
|
|
223
|
-
if (!_gracefulCleanup)
|
|
224
|
-
return;
|
|
225
|
-
while (_removeObjects.length) {
|
|
226
|
-
try {
|
|
227
|
-
_removeObjects[0]();
|
|
228
|
-
} catch (e) {
|
|
229
|
-
}
|
|
230
124
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
125
|
+
_taggedLiteral(parts, ...args) {
|
|
126
|
+
let str = "";
|
|
127
|
+
parts.forEach(function(part, i) {
|
|
128
|
+
const arg = args[i + 1];
|
|
129
|
+
str += part;
|
|
130
|
+
if (typeof arg !== "undefined") {
|
|
131
|
+
str += "%s";
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
return this.__.apply(this, [str].concat([].slice.call(args, 1)));
|
|
238
135
|
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}
|
|
244
|
-
function _isBlank(s) {
|
|
245
|
-
return s === null || _isUndefined(s) || !s.trim();
|
|
246
|
-
}
|
|
247
|
-
function _isUndefined(obj) {
|
|
248
|
-
return typeof obj === "undefined";
|
|
249
|
-
}
|
|
250
|
-
function _parseArguments(options, callback) {
|
|
251
|
-
if (typeof options === "function") {
|
|
252
|
-
return [{}, options];
|
|
136
|
+
_enqueueWrite(work) {
|
|
137
|
+
this.writeQueue.push(work);
|
|
138
|
+
if (this.writeQueue.length === 1)
|
|
139
|
+
this._processWriteQueue();
|
|
253
140
|
}
|
|
254
|
-
|
|
255
|
-
|
|
141
|
+
_processWriteQueue() {
|
|
142
|
+
const _this = this;
|
|
143
|
+
const work = this.writeQueue[0];
|
|
144
|
+
const directory = work.directory;
|
|
145
|
+
const locale = work.locale;
|
|
146
|
+
const cb = work.cb;
|
|
147
|
+
const languageFile = this._resolveLocaleFile(directory, locale);
|
|
148
|
+
const serializedLocale = JSON.stringify(this.cache[locale], null, 2);
|
|
149
|
+
shim2.fs.writeFile(languageFile, serializedLocale, "utf-8", function(err) {
|
|
150
|
+
_this.writeQueue.shift();
|
|
151
|
+
if (_this.writeQueue.length > 0)
|
|
152
|
+
_this._processWriteQueue();
|
|
153
|
+
cb(err);
|
|
154
|
+
});
|
|
256
155
|
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
156
|
+
_readLocaleFile() {
|
|
157
|
+
let localeLookup = {};
|
|
158
|
+
const languageFile = this._resolveLocaleFile(this.directory, this.locale);
|
|
159
|
+
try {
|
|
160
|
+
if (shim2.fs.readFileSync) {
|
|
161
|
+
localeLookup = JSON.parse(shim2.fs.readFileSync(languageFile, "utf-8"));
|
|
162
|
+
}
|
|
163
|
+
} catch (err) {
|
|
164
|
+
if (err instanceof SyntaxError) {
|
|
165
|
+
err.message = "syntax error in " + languageFile;
|
|
166
|
+
}
|
|
167
|
+
if (err.code === "ENOENT")
|
|
168
|
+
localeLookup = {};
|
|
169
|
+
else
|
|
170
|
+
throw err;
|
|
171
|
+
}
|
|
172
|
+
this.cache[this.locale] = localeLookup;
|
|
260
173
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
return
|
|
269
|
-
const name = [
|
|
270
|
-
opts.prefix ? opts.prefix : "tmp",
|
|
271
|
-
"-",
|
|
272
|
-
process.pid,
|
|
273
|
-
"-",
|
|
274
|
-
_randomChars(12),
|
|
275
|
-
opts.postfix ? "-" + opts.postfix : ""
|
|
276
|
-
].join("");
|
|
277
|
-
return path4.join(tmpDir, opts.dir, name);
|
|
278
|
-
}
|
|
279
|
-
function _assertAndSanitizeOptions(options) {
|
|
280
|
-
options.tmpdir = _getTmpDir(options);
|
|
281
|
-
const tmpDir = options.tmpdir;
|
|
282
|
-
if (!_isUndefined(options.name))
|
|
283
|
-
_assertIsRelative(options.name, "name", tmpDir);
|
|
284
|
-
if (!_isUndefined(options.dir))
|
|
285
|
-
_assertIsRelative(options.dir, "dir", tmpDir);
|
|
286
|
-
if (!_isUndefined(options.template)) {
|
|
287
|
-
_assertIsRelative(options.template, "template", tmpDir);
|
|
288
|
-
if (!options.template.match(TEMPLATE_PATTERN))
|
|
289
|
-
throw new Error(`Invalid template, found "${options.template}".`);
|
|
174
|
+
_resolveLocaleFile(directory, locale) {
|
|
175
|
+
let file = shim2.resolve(directory, "./", locale + ".json");
|
|
176
|
+
if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf("_")) {
|
|
177
|
+
const languageFile = shim2.resolve(directory, "./", locale.split("_")[0] + ".json");
|
|
178
|
+
if (this._fileExistsSync(languageFile))
|
|
179
|
+
file = languageFile;
|
|
180
|
+
}
|
|
181
|
+
return file;
|
|
290
182
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
options.tries = _isUndefined(options.name) ? options.tries || DEFAULT_TRIES : 1;
|
|
294
|
-
options.keep = !!options.keep;
|
|
295
|
-
options.detachDescriptor = !!options.detachDescriptor;
|
|
296
|
-
options.discardDescriptor = !!options.discardDescriptor;
|
|
297
|
-
options.unsafeCleanup = !!options.unsafeCleanup;
|
|
298
|
-
options.dir = _isUndefined(options.dir) ? "" : path4.relative(tmpDir, _resolvePath(options.dir, tmpDir));
|
|
299
|
-
options.template = _isUndefined(options.template) ? void 0 : path4.relative(tmpDir, _resolvePath(options.template, tmpDir));
|
|
300
|
-
options.template = _isBlank(options.template) ? void 0 : path4.relative(options.dir, options.template);
|
|
301
|
-
options.name = _isUndefined(options.name) ? void 0 : options.name;
|
|
302
|
-
options.prefix = _isUndefined(options.prefix) ? "" : options.prefix;
|
|
303
|
-
options.postfix = _isUndefined(options.postfix) ? "" : options.postfix;
|
|
304
|
-
}
|
|
305
|
-
function _resolvePath(name, tmpDir) {
|
|
306
|
-
if (name.startsWith(tmpDir)) {
|
|
307
|
-
return path4.resolve(name);
|
|
308
|
-
} else {
|
|
309
|
-
return path4.resolve(path4.join(tmpDir, name));
|
|
183
|
+
_fileExistsSync(file) {
|
|
184
|
+
return shim2.exists(file);
|
|
310
185
|
}
|
|
186
|
+
};
|
|
187
|
+
function y18n$1(opts, _shim) {
|
|
188
|
+
shim2 = _shim;
|
|
189
|
+
const y18n4 = new Y18N2(opts);
|
|
190
|
+
return {
|
|
191
|
+
__: y18n4.__.bind(y18n4),
|
|
192
|
+
__n: y18n4.__n.bind(y18n4),
|
|
193
|
+
setLocale: y18n4.setLocale.bind(y18n4),
|
|
194
|
+
getLocale: y18n4.getLocale.bind(y18n4),
|
|
195
|
+
updateLocale: y18n4.updateLocale.bind(y18n4),
|
|
196
|
+
locale: y18n4.locale
|
|
197
|
+
};
|
|
311
198
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
199
|
+
var nodePlatformShim = {
|
|
200
|
+
fs: {
|
|
201
|
+
readFileSync: fs2.readFileSync,
|
|
202
|
+
writeFile: fs2.writeFile
|
|
203
|
+
},
|
|
204
|
+
format: util.format,
|
|
205
|
+
resolve: path4.resolve,
|
|
206
|
+
exists: (file) => {
|
|
207
|
+
try {
|
|
208
|
+
return fs2.statSync(file).isFile();
|
|
209
|
+
} catch (err) {
|
|
210
|
+
return false;
|
|
322
211
|
}
|
|
323
|
-
let resolvedPath = _resolvePath(name, tmpDir);
|
|
324
|
-
if (!resolvedPath.startsWith(tmpDir))
|
|
325
|
-
throw new Error(`${option} option must be relative to "${tmpDir}", found "${resolvedPath}".`);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
function _isEBADF(error) {
|
|
329
|
-
return _isExpectedError(error, -EBADF, "EBADF");
|
|
330
|
-
}
|
|
331
|
-
function _isENOENT(error) {
|
|
332
|
-
return _isExpectedError(error, -ENOENT, "ENOENT");
|
|
333
|
-
}
|
|
334
|
-
function _isExpectedError(error, errno, code) {
|
|
335
|
-
return IS_WIN32 ? error.code === code : error.code === code && error.errno === errno;
|
|
336
|
-
}
|
|
337
|
-
function setGracefulCleanup() {
|
|
338
|
-
_gracefulCleanup = true;
|
|
339
|
-
}
|
|
340
|
-
function _getTmpDir(options) {
|
|
341
|
-
return path4.resolve(options && options.tmpdir || os.tmpdir());
|
|
342
|
-
}
|
|
343
|
-
process.addListener(EXIT, _garbageCollector);
|
|
344
|
-
Object.defineProperty(module2.exports, "tmpdir", {
|
|
345
|
-
enumerable: true,
|
|
346
|
-
configurable: false,
|
|
347
|
-
get: function() {
|
|
348
|
-
return _getTmpDir();
|
|
349
|
-
}
|
|
350
|
-
});
|
|
351
|
-
module2.exports.dir = dir;
|
|
352
|
-
module2.exports.dirSync = dirSync;
|
|
353
|
-
module2.exports.file = file;
|
|
354
|
-
module2.exports.fileSync = fileSync;
|
|
355
|
-
module2.exports.tmpName = tmpName;
|
|
356
|
-
module2.exports.tmpNameSync = tmpNameSync;
|
|
357
|
-
module2.exports.setGracefulCleanup = setGracefulCleanup;
|
|
358
|
-
}
|
|
359
|
-
});
|
|
360
|
-
|
|
361
|
-
// ../../node_modules/.pnpm/tmp-promise@3.0.3/node_modules/tmp-promise/index.js
|
|
362
|
-
var require_tmp_promise = __commonJS({
|
|
363
|
-
"../../node_modules/.pnpm/tmp-promise@3.0.3/node_modules/tmp-promise/index.js"(exports2, module2) {
|
|
364
|
-
"use strict";
|
|
365
|
-
var { promisify } = require("util");
|
|
366
|
-
var tmp2 = require_tmp();
|
|
367
|
-
module2.exports.fileSync = tmp2.fileSync;
|
|
368
|
-
var fileWithOptions = promisify(
|
|
369
|
-
(options, cb) => tmp2.file(
|
|
370
|
-
options,
|
|
371
|
-
(err, path4, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path4, fd, cleanup: promisify(cleanup) })
|
|
372
|
-
)
|
|
373
|
-
);
|
|
374
|
-
module2.exports.file = async (options) => fileWithOptions(options);
|
|
375
|
-
module2.exports.withFile = async function withFile(fn, options) {
|
|
376
|
-
const { path: path4, fd, cleanup } = await module2.exports.file(options);
|
|
377
|
-
try {
|
|
378
|
-
return await fn({ path: path4, fd });
|
|
379
|
-
} finally {
|
|
380
|
-
await cleanup();
|
|
381
212
|
}
|
|
382
213
|
};
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
(options, cb) => tmp2.dir(
|
|
386
|
-
options,
|
|
387
|
-
(err, path4, cleanup) => err ? cb(err) : cb(void 0, { path: path4, cleanup: promisify(cleanup) })
|
|
388
|
-
)
|
|
389
|
-
);
|
|
390
|
-
module2.exports.dir = async (options) => dirWithOptions(options);
|
|
391
|
-
module2.exports.withDir = async function withDir(fn, options) {
|
|
392
|
-
const { path: path4, cleanup } = await module2.exports.dir(options);
|
|
393
|
-
try {
|
|
394
|
-
return await fn({ path: path4 });
|
|
395
|
-
} finally {
|
|
396
|
-
await cleanup();
|
|
397
|
-
}
|
|
214
|
+
var y18n3 = (opts) => {
|
|
215
|
+
return y18n$1(opts, nodePlatformShim);
|
|
398
216
|
};
|
|
399
|
-
module2.exports
|
|
400
|
-
module2.exports.tmpName = promisify(tmp2.tmpName);
|
|
401
|
-
module2.exports.tmpdir = tmp2.tmpdir;
|
|
402
|
-
module2.exports.setGracefulCleanup = tmp2.setGracefulCleanup;
|
|
217
|
+
module2.exports = y18n3;
|
|
403
218
|
}
|
|
404
219
|
});
|
|
405
220
|
|
|
406
|
-
// ../../node_modules/.pnpm/
|
|
407
|
-
var
|
|
408
|
-
"../../node_modules/.pnpm/
|
|
221
|
+
// ../../node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/index.cjs
|
|
222
|
+
var require_build2 = __commonJS({
|
|
223
|
+
"../../node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/index.cjs"(exports2, module2) {
|
|
409
224
|
"use strict";
|
|
410
|
-
var fs2 = require("fs");
|
|
411
225
|
var util = require("util");
|
|
412
226
|
var path4 = require("path");
|
|
413
|
-
var
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
this.updateFiles = typeof opts.updateFiles === "boolean" ? opts.updateFiles : true;
|
|
419
|
-
this.locale = opts.locale || "en";
|
|
420
|
-
this.fallbackToLanguage = typeof opts.fallbackToLanguage === "boolean" ? opts.fallbackToLanguage : true;
|
|
421
|
-
this.cache = /* @__PURE__ */ Object.create(null);
|
|
422
|
-
this.writeQueue = [];
|
|
423
|
-
}
|
|
424
|
-
__(...args) {
|
|
425
|
-
if (typeof arguments[0] !== "string") {
|
|
426
|
-
return this._taggedLiteral(arguments[0], ...arguments);
|
|
427
|
-
}
|
|
428
|
-
const str = args.shift();
|
|
429
|
-
let cb = function() {
|
|
430
|
-
};
|
|
431
|
-
if (typeof args[args.length - 1] === "function")
|
|
432
|
-
cb = args.pop();
|
|
433
|
-
cb = cb || function() {
|
|
434
|
-
};
|
|
435
|
-
if (!this.cache[this.locale])
|
|
436
|
-
this._readLocaleFile();
|
|
437
|
-
if (!this.cache[this.locale][str] && this.updateFiles) {
|
|
438
|
-
this.cache[this.locale][str] = str;
|
|
439
|
-
this._enqueueWrite({
|
|
440
|
-
directory: this.directory,
|
|
441
|
-
locale: this.locale,
|
|
442
|
-
cb
|
|
443
|
-
});
|
|
444
|
-
} else {
|
|
445
|
-
cb();
|
|
446
|
-
}
|
|
447
|
-
return shim2.format.apply(shim2.format, [this.cache[this.locale][str] || str].concat(args));
|
|
448
|
-
}
|
|
449
|
-
__n() {
|
|
450
|
-
const args = Array.prototype.slice.call(arguments);
|
|
451
|
-
const singular = args.shift();
|
|
452
|
-
const plural = args.shift();
|
|
453
|
-
const quantity = args.shift();
|
|
454
|
-
let cb = function() {
|
|
455
|
-
};
|
|
456
|
-
if (typeof args[args.length - 1] === "function")
|
|
457
|
-
cb = args.pop();
|
|
458
|
-
if (!this.cache[this.locale])
|
|
459
|
-
this._readLocaleFile();
|
|
460
|
-
let str = quantity === 1 ? singular : plural;
|
|
461
|
-
if (this.cache[this.locale][singular]) {
|
|
462
|
-
const entry = this.cache[this.locale][singular];
|
|
463
|
-
str = entry[quantity === 1 ? "one" : "other"];
|
|
464
|
-
}
|
|
465
|
-
if (!this.cache[this.locale][singular] && this.updateFiles) {
|
|
466
|
-
this.cache[this.locale][singular] = {
|
|
467
|
-
one: singular,
|
|
468
|
-
other: plural
|
|
469
|
-
};
|
|
470
|
-
this._enqueueWrite({
|
|
471
|
-
directory: this.directory,
|
|
472
|
-
locale: this.locale,
|
|
473
|
-
cb
|
|
474
|
-
});
|
|
475
|
-
} else {
|
|
476
|
-
cb();
|
|
477
|
-
}
|
|
478
|
-
const values = [str];
|
|
479
|
-
if (~str.indexOf("%d"))
|
|
480
|
-
values.push(quantity);
|
|
481
|
-
return shim2.format.apply(shim2.format, values.concat(args));
|
|
482
|
-
}
|
|
483
|
-
setLocale(locale) {
|
|
484
|
-
this.locale = locale;
|
|
485
|
-
}
|
|
486
|
-
getLocale() {
|
|
487
|
-
return this.locale;
|
|
488
|
-
}
|
|
489
|
-
updateLocale(obj) {
|
|
490
|
-
if (!this.cache[this.locale])
|
|
491
|
-
this._readLocaleFile();
|
|
492
|
-
for (const key in obj) {
|
|
493
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
494
|
-
this.cache[this.locale][key] = obj[key];
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
_taggedLiteral(parts, ...args) {
|
|
499
|
-
let str = "";
|
|
500
|
-
parts.forEach(function(part, i) {
|
|
501
|
-
const arg = args[i + 1];
|
|
502
|
-
str += part;
|
|
503
|
-
if (typeof arg !== "undefined") {
|
|
504
|
-
str += "%s";
|
|
505
|
-
}
|
|
506
|
-
});
|
|
507
|
-
return this.__.apply(this, [str].concat([].slice.call(args, 1)));
|
|
508
|
-
}
|
|
509
|
-
_enqueueWrite(work) {
|
|
510
|
-
this.writeQueue.push(work);
|
|
511
|
-
if (this.writeQueue.length === 1)
|
|
512
|
-
this._processWriteQueue();
|
|
513
|
-
}
|
|
514
|
-
_processWriteQueue() {
|
|
515
|
-
const _this = this;
|
|
516
|
-
const work = this.writeQueue[0];
|
|
517
|
-
const directory = work.directory;
|
|
518
|
-
const locale = work.locale;
|
|
519
|
-
const cb = work.cb;
|
|
520
|
-
const languageFile = this._resolveLocaleFile(directory, locale);
|
|
521
|
-
const serializedLocale = JSON.stringify(this.cache[locale], null, 2);
|
|
522
|
-
shim2.fs.writeFile(languageFile, serializedLocale, "utf-8", function(err) {
|
|
523
|
-
_this.writeQueue.shift();
|
|
524
|
-
if (_this.writeQueue.length > 0)
|
|
525
|
-
_this._processWriteQueue();
|
|
526
|
-
cb(err);
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
_readLocaleFile() {
|
|
530
|
-
let localeLookup = {};
|
|
531
|
-
const languageFile = this._resolveLocaleFile(this.directory, this.locale);
|
|
532
|
-
try {
|
|
533
|
-
if (shim2.fs.readFileSync) {
|
|
534
|
-
localeLookup = JSON.parse(shim2.fs.readFileSync(languageFile, "utf-8"));
|
|
535
|
-
}
|
|
536
|
-
} catch (err) {
|
|
537
|
-
if (err instanceof SyntaxError) {
|
|
538
|
-
err.message = "syntax error in " + languageFile;
|
|
539
|
-
}
|
|
540
|
-
if (err.code === "ENOENT")
|
|
541
|
-
localeLookup = {};
|
|
542
|
-
else
|
|
543
|
-
throw err;
|
|
544
|
-
}
|
|
545
|
-
this.cache[this.locale] = localeLookup;
|
|
546
|
-
}
|
|
547
|
-
_resolveLocaleFile(directory, locale) {
|
|
548
|
-
let file = shim2.resolve(directory, "./", locale + ".json");
|
|
549
|
-
if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf("_")) {
|
|
550
|
-
const languageFile = shim2.resolve(directory, "./", locale.split("_")[0] + ".json");
|
|
551
|
-
if (this._fileExistsSync(languageFile))
|
|
552
|
-
file = languageFile;
|
|
553
|
-
}
|
|
554
|
-
return file;
|
|
555
|
-
}
|
|
556
|
-
_fileExistsSync(file) {
|
|
557
|
-
return shim2.exists(file);
|
|
558
|
-
}
|
|
559
|
-
};
|
|
560
|
-
function y18n$1(opts, _shim) {
|
|
561
|
-
shim2 = _shim;
|
|
562
|
-
const y18n4 = new Y18N2(opts);
|
|
563
|
-
return {
|
|
564
|
-
__: y18n4.__.bind(y18n4),
|
|
565
|
-
__n: y18n4.__n.bind(y18n4),
|
|
566
|
-
setLocale: y18n4.setLocale.bind(y18n4),
|
|
567
|
-
getLocale: y18n4.getLocale.bind(y18n4),
|
|
568
|
-
updateLocale: y18n4.updateLocale.bind(y18n4),
|
|
569
|
-
locale: y18n4.locale
|
|
570
|
-
};
|
|
571
|
-
}
|
|
572
|
-
var nodePlatformShim = {
|
|
573
|
-
fs: {
|
|
574
|
-
readFileSync: fs2.readFileSync,
|
|
575
|
-
writeFile: fs2.writeFile
|
|
576
|
-
},
|
|
577
|
-
format: util.format,
|
|
578
|
-
resolve: path4.resolve,
|
|
579
|
-
exists: (file) => {
|
|
580
|
-
try {
|
|
581
|
-
return fs2.statSync(file).isFile();
|
|
582
|
-
} catch (err) {
|
|
583
|
-
return false;
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
|
-
var y18n3 = (opts) => {
|
|
588
|
-
return y18n$1(opts, nodePlatformShim);
|
|
589
|
-
};
|
|
590
|
-
module2.exports = y18n3;
|
|
591
|
-
}
|
|
592
|
-
});
|
|
593
|
-
|
|
594
|
-
// ../../node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/index.cjs
|
|
595
|
-
var require_build2 = __commonJS({
|
|
596
|
-
"../../node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/index.cjs"(exports2, module2) {
|
|
597
|
-
"use strict";
|
|
598
|
-
var util = require("util");
|
|
599
|
-
var path4 = require("path");
|
|
600
|
-
var fs2 = require("fs");
|
|
601
|
-
function camelCase3(str) {
|
|
602
|
-
const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
|
|
603
|
-
if (!isCamelCase) {
|
|
604
|
-
str = str.toLowerCase();
|
|
227
|
+
var fs2 = require("fs");
|
|
228
|
+
function camelCase3(str) {
|
|
229
|
+
const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
|
|
230
|
+
if (!isCamelCase) {
|
|
231
|
+
str = str.toLowerCase();
|
|
605
232
|
}
|
|
606
233
|
if (str.indexOf("-") === -1 && str.indexOf("_") === -1) {
|
|
607
234
|
return str;
|
|
@@ -1501,8 +1128,8 @@ var require_build2 = __commonJS({
|
|
|
1501
1128
|
}
|
|
1502
1129
|
}
|
|
1503
1130
|
aliasArrays.forEach(function(aliasArray) {
|
|
1504
|
-
aliasArray = aliasArray.filter(function(v, i,
|
|
1505
|
-
return
|
|
1131
|
+
aliasArray = aliasArray.filter(function(v, i, self) {
|
|
1132
|
+
return self.indexOf(v) === i;
|
|
1506
1133
|
});
|
|
1507
1134
|
const lastAlias = aliasArray.pop();
|
|
1508
1135
|
if (lastAlias !== void 0 && typeof lastAlias === "string") {
|
|
@@ -2832,18 +2459,18 @@ var require_wrap_ansi = __commonJS({
|
|
|
2832
2459
|
}
|
|
2833
2460
|
};
|
|
2834
2461
|
var stringVisibleTrimSpacesRight = (string) => {
|
|
2835
|
-
const
|
|
2836
|
-
let last2 =
|
|
2462
|
+
const words = string.split(" ");
|
|
2463
|
+
let last2 = words.length;
|
|
2837
2464
|
while (last2 > 0) {
|
|
2838
|
-
if (stringWidth(
|
|
2465
|
+
if (stringWidth(words[last2 - 1]) > 0) {
|
|
2839
2466
|
break;
|
|
2840
2467
|
}
|
|
2841
2468
|
last2--;
|
|
2842
2469
|
}
|
|
2843
|
-
if (last2 ===
|
|
2470
|
+
if (last2 === words.length) {
|
|
2844
2471
|
return string;
|
|
2845
2472
|
}
|
|
2846
|
-
return
|
|
2473
|
+
return words.slice(0, last2).join(" ") + words.slice(last2).join("");
|
|
2847
2474
|
};
|
|
2848
2475
|
var exec = (string, columns, options = {}) => {
|
|
2849
2476
|
if (options.trim !== false && string.trim() === "") {
|
|
@@ -3204,25 +2831,23 @@ var require_build3 = __commonJS({
|
|
|
3204
2831
|
}
|
|
3205
2832
|
});
|
|
3206
2833
|
|
|
3207
|
-
// ../../node_modules/.pnpm/escalade@3.
|
|
2834
|
+
// ../../node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.js
|
|
3208
2835
|
var require_sync = __commonJS({
|
|
3209
|
-
"../../node_modules/.pnpm/escalade@3.
|
|
2836
|
+
"../../node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.js"(exports2, module2) {
|
|
3210
2837
|
"use strict";
|
|
3211
|
-
var { dirname: dirname3, resolve:
|
|
2838
|
+
var { dirname: dirname3, resolve: resolve7 } = require("path");
|
|
3212
2839
|
var { readdirSync: readdirSync2, statSync: statSync3 } = require("fs");
|
|
3213
2840
|
module2.exports = function(start, callback) {
|
|
3214
|
-
let dir =
|
|
2841
|
+
let dir = resolve7(".", start);
|
|
3215
2842
|
let tmp2, stats = statSync3(dir);
|
|
3216
2843
|
if (!stats.isDirectory()) {
|
|
3217
2844
|
dir = dirname3(dir);
|
|
3218
2845
|
}
|
|
3219
2846
|
while (true) {
|
|
3220
2847
|
tmp2 = callback(dir, readdirSync2(dir));
|
|
3221
|
-
if (tmp2)
|
|
3222
|
-
return resolve6(dir, tmp2);
|
|
2848
|
+
if (tmp2) return resolve7(dir, tmp2);
|
|
3223
2849
|
dir = dirname3(tmp2 = dir);
|
|
3224
|
-
if (tmp2 === dir)
|
|
3225
|
-
break;
|
|
2850
|
+
if (tmp2 === dir) break;
|
|
3226
2851
|
}
|
|
3227
2852
|
};
|
|
3228
2853
|
}
|
|
@@ -3258,7 +2883,7 @@ var require_require_directory = __commonJS({
|
|
|
3258
2883
|
"use strict";
|
|
3259
2884
|
var fs2 = require("fs");
|
|
3260
2885
|
var join = require("path").join;
|
|
3261
|
-
var
|
|
2886
|
+
var resolve7 = require("path").resolve;
|
|
3262
2887
|
var dirname3 = require("path").dirname;
|
|
3263
2888
|
var defaultOptions2 = {
|
|
3264
2889
|
extensions: ["js", "json", "coffee"],
|
|
@@ -3292,7 +2917,7 @@ var require_require_directory = __commonJS({
|
|
|
3292
2917
|
options[prop] = defaultOptions2[prop];
|
|
3293
2918
|
}
|
|
3294
2919
|
}
|
|
3295
|
-
path4 = !path4 ? dirname3(m.filename) :
|
|
2920
|
+
path4 = !path4 ? dirname3(m.filename) : resolve7(dirname3(m.filename), path4);
|
|
3296
2921
|
fs2.readdirSync(path4).forEach(function(filename) {
|
|
3297
2922
|
var joined = join(path4, filename), files, key, obj;
|
|
3298
2923
|
if (fs2.statSync(joined).isDirectory() && options.recurse) {
|
|
@@ -3331,23 +2956,19 @@ var require_build4 = __commonJS({
|
|
|
3331
2956
|
s = h2;
|
|
3332
2957
|
let l2 = {};
|
|
3333
2958
|
if (Object.prototype.hasOwnProperty.call(t2, "extends")) {
|
|
3334
|
-
if ("string" != typeof t2.extends)
|
|
3335
|
-
return l2;
|
|
2959
|
+
if ("string" != typeof t2.extends) return l2;
|
|
3336
2960
|
const r2 = /\.json|\..*rc$/.test(t2.extends);
|
|
3337
2961
|
let h3 = null;
|
|
3338
|
-
if (r2)
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
return t2;
|
|
3347
|
-
}
|
|
2962
|
+
if (r2) h3 = function(t3, e2) {
|
|
2963
|
+
return s.path.resolve(t3, e2);
|
|
2964
|
+
}(o2, t2.extends);
|
|
2965
|
+
else try {
|
|
2966
|
+
h3 = require.resolve(t2.extends);
|
|
2967
|
+
} catch (e2) {
|
|
2968
|
+
return t2;
|
|
2969
|
+
}
|
|
3348
2970
|
!function(t3) {
|
|
3349
|
-
if (i.indexOf(t3) > -1)
|
|
3350
|
-
throw new e(`Circular extended configurations: '${t3}'.`);
|
|
2971
|
+
if (i.indexOf(t3) > -1) throw new e(`Circular extended configurations: '${t3}'.`);
|
|
3351
2972
|
}(h3), i.push(h3), l2 = r2 ? JSON.parse(s.readFileSync(h3, "utf8")) : require(t2.extends), delete t2.extends, l2 = n(l2, s.path.dirname(h3), a2, s);
|
|
3352
2973
|
}
|
|
3353
2974
|
return i = [], a2 ? r(l2, t2) : Object.assign({}, l2, t2);
|
|
@@ -3358,14 +2979,12 @@ var require_build4 = __commonJS({
|
|
|
3358
2979
|
return t3 && "object" == typeof t3 && !Array.isArray(t3);
|
|
3359
2980
|
}
|
|
3360
2981
|
Object.assign(s2, t2);
|
|
3361
|
-
for (const n2 of Object.keys(e2))
|
|
3362
|
-
i2(e2[n2]) && i2(s2[n2]) ? s2[n2] = r(t2[n2], e2[n2]) : s2[n2] = e2[n2];
|
|
2982
|
+
for (const n2 of Object.keys(e2)) i2(e2[n2]) && i2(s2[n2]) ? s2[n2] = r(t2[n2], e2[n2]) : s2[n2] = e2[n2];
|
|
3363
2983
|
return s2;
|
|
3364
2984
|
}
|
|
3365
2985
|
function o(t2) {
|
|
3366
2986
|
const e2 = t2.replace(/\s{2,}/g, " ").split(/\s+(?![^[]*]|[^<]*>)/), s2 = /\.*[\][<>]/g, i2 = e2.shift();
|
|
3367
|
-
if (!i2)
|
|
3368
|
-
throw new Error(`No command found in: ${t2}`);
|
|
2987
|
+
if (!i2) throw new Error(`No command found in: ${t2}`);
|
|
3369
2988
|
const n2 = { cmd: i2.replace(s2, ""), demanded: [], optional: [] };
|
|
3370
2989
|
return e2.forEach((t3, i3) => {
|
|
3371
2990
|
let r2 = false;
|
|
@@ -3377,20 +2996,16 @@ var require_build4 = __commonJS({
|
|
|
3377
2996
|
try {
|
|
3378
2997
|
let n2 = 0;
|
|
3379
2998
|
const [r2, a2, h2] = "object" == typeof t2 ? [{ demanded: [], optional: [] }, t2, s2] : [o(`cmd ${t2}`), s2, i2], f2 = [].slice.call(a2);
|
|
3380
|
-
for (; f2.length && void 0 === f2[f2.length - 1]; )
|
|
3381
|
-
f2.pop();
|
|
2999
|
+
for (; f2.length && void 0 === f2[f2.length - 1]; ) f2.pop();
|
|
3382
3000
|
const d2 = h2 || f2.length;
|
|
3383
|
-
if (d2 < r2.demanded.length)
|
|
3384
|
-
throw new e(`Not enough arguments provided. Expected ${r2.demanded.length} but received ${f2.length}.`);
|
|
3001
|
+
if (d2 < r2.demanded.length) throw new e(`Not enough arguments provided. Expected ${r2.demanded.length} but received ${f2.length}.`);
|
|
3385
3002
|
const u2 = r2.demanded.length + r2.optional.length;
|
|
3386
|
-
if (d2 > u2)
|
|
3387
|
-
throw new e(`Too many arguments provided. Expected max ${u2} but received ${d2}.`);
|
|
3003
|
+
if (d2 > u2) throw new e(`Too many arguments provided. Expected max ${u2} but received ${d2}.`);
|
|
3388
3004
|
r2.demanded.forEach((t3) => {
|
|
3389
3005
|
const e2 = l(f2.shift());
|
|
3390
3006
|
0 === t3.cmd.filter((t4) => t4 === e2 || "*" === t4).length && c(e2, t3.cmd, n2), n2 += 1;
|
|
3391
3007
|
}), r2.optional.forEach((t3) => {
|
|
3392
|
-
if (0 === f2.length)
|
|
3393
|
-
return;
|
|
3008
|
+
if (0 === f2.length) return;
|
|
3394
3009
|
const e2 = l(f2.shift());
|
|
3395
3010
|
0 === t3.cmd.filter((t4) => t4 === e2 || "*" === t4).length && c(e2, t3.cmd, n2), n2 += 1;
|
|
3396
3011
|
});
|
|
@@ -3432,19 +3047,14 @@ var require_build4 = __commonJS({
|
|
|
3432
3047
|
return t2.slice(m() + 1);
|
|
3433
3048
|
}, getProcessArgvBin: y });
|
|
3434
3049
|
function v(t2, e2, s2, i2) {
|
|
3435
|
-
if ("a" === s2 && !i2)
|
|
3436
|
-
|
|
3437
|
-
if ("function" == typeof e2 ? t2 !== e2 || !i2 : !e2.has(t2))
|
|
3438
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
3050
|
+
if ("a" === s2 && !i2) throw new TypeError("Private accessor was defined without a getter");
|
|
3051
|
+
if ("function" == typeof e2 ? t2 !== e2 || !i2 : !e2.has(t2)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
3439
3052
|
return "m" === s2 ? i2 : "a" === s2 ? i2.call(t2) : i2 ? i2.value : e2.get(t2);
|
|
3440
3053
|
}
|
|
3441
3054
|
function O(t2, e2, s2, i2, n2) {
|
|
3442
|
-
if ("m" === i2)
|
|
3443
|
-
|
|
3444
|
-
if ("
|
|
3445
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
3446
|
-
if ("function" == typeof e2 ? t2 !== e2 || !n2 : !e2.has(t2))
|
|
3447
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
3055
|
+
if ("m" === i2) throw new TypeError("Private method is not writable");
|
|
3056
|
+
if ("a" === i2 && !n2) throw new TypeError("Private accessor was defined without a setter");
|
|
3057
|
+
if ("function" == typeof e2 ? t2 !== e2 || !n2 : !e2.has(t2)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
3448
3058
|
return "a" === i2 ? n2.call(t2, s2) : n2 ? n2.value = s2 : e2.set(t2, s2), s2;
|
|
3449
3059
|
}
|
|
3450
3060
|
var w = class {
|
|
@@ -3454,8 +3064,7 @@ var require_build4 = __commonJS({
|
|
|
3454
3064
|
addMiddleware(t2, e2, s2 = true, i2 = false) {
|
|
3455
3065
|
if (h("<array|function> [boolean] [boolean] [boolean]", [t2, e2, s2], arguments.length), Array.isArray(t2)) {
|
|
3456
3066
|
for (let i3 = 0; i3 < t2.length; i3++) {
|
|
3457
|
-
if ("function" != typeof t2[i3])
|
|
3458
|
-
throw Error("middleware must be a function");
|
|
3067
|
+
if ("function" != typeof t2[i3]) throw Error("middleware must be a function");
|
|
3459
3068
|
const n2 = t2[i3];
|
|
3460
3069
|
n2.applyBeforeValidation = e2, n2.global = s2;
|
|
3461
3070
|
}
|
|
@@ -3489,15 +3098,12 @@ var require_build4 = __commonJS({
|
|
|
3489
3098
|
};
|
|
3490
3099
|
function C(t2, e2, s2, i2) {
|
|
3491
3100
|
return s2.reduce((t3, s3) => {
|
|
3492
|
-
if (s3.applyBeforeValidation !== i2)
|
|
3493
|
-
return t3;
|
|
3101
|
+
if (s3.applyBeforeValidation !== i2) return t3;
|
|
3494
3102
|
if (s3.mutates) {
|
|
3495
|
-
if (s3.applied)
|
|
3496
|
-
return t3;
|
|
3103
|
+
if (s3.applied) return t3;
|
|
3497
3104
|
s3.applied = true;
|
|
3498
3105
|
}
|
|
3499
|
-
if (f(t3))
|
|
3500
|
-
return t3.then((t4) => Promise.all([t4, s3(t4, e2)])).then(([t4, e3]) => Object.assign(t4, e3));
|
|
3106
|
+
if (f(t3)) return t3.then((t4) => Promise.all([t4, s3(t4, e2)])).then(([t4, e3]) => Object.assign(t4, e3));
|
|
3501
3107
|
{
|
|
3502
3108
|
const i3 = s3(t3, e2);
|
|
3503
3109
|
return f(i3) ? i3.then((e3) => Object.assign(t3, e3)) : Object.assign(t3, i3);
|
|
@@ -3525,8 +3131,7 @@ var require_build4 = __commonJS({
|
|
|
3525
3131
|
i2.visit = (t3, e3, s3) => {
|
|
3526
3132
|
const i3 = n2(t3, e3, s3);
|
|
3527
3133
|
if (i3) {
|
|
3528
|
-
if (this.requireCache.has(e3))
|
|
3529
|
-
return i3;
|
|
3134
|
+
if (this.requireCache.has(e3)) return i3;
|
|
3530
3135
|
this.requireCache.add(e3), this.addHandler(i3);
|
|
3531
3136
|
}
|
|
3532
3137
|
return i3;
|
|
@@ -3538,14 +3143,10 @@ var require_build4 = __commonJS({
|
|
|
3538
3143
|
return t3 ? t3.map((t4) => (t4.applyBeforeValidation = false, t4)) : [];
|
|
3539
3144
|
}(n2);
|
|
3540
3145
|
if (i2 = i2 || (() => {
|
|
3541
|
-
}), Array.isArray(t2))
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
[t2, ...a2] = t2;
|
|
3546
|
-
else
|
|
3547
|
-
for (const e3 of t2)
|
|
3548
|
-
this.addHandler(e3);
|
|
3146
|
+
}), Array.isArray(t2)) if (function(t3) {
|
|
3147
|
+
return t3.every((t4) => "string" == typeof t4);
|
|
3148
|
+
}(t2)) [t2, ...a2] = t2;
|
|
3149
|
+
else for (const e3 of t2) this.addHandler(e3);
|
|
3549
3150
|
else {
|
|
3550
3151
|
if (function(t3) {
|
|
3551
3152
|
return "object" == typeof t3 && !Array.isArray(t3);
|
|
@@ -3553,8 +3154,7 @@ var require_build4 = __commonJS({
|
|
|
3553
3154
|
let e3 = Array.isArray(t2.command) || "string" == typeof t2.command ? t2.command : this.moduleName(t2);
|
|
3554
3155
|
return t2.aliases && (e3 = [].concat(e3).concat(t2.aliases)), void this.addHandler(e3, this.extractDesc(t2), t2.builder, t2.handler, t2.middlewares, t2.deprecated);
|
|
3555
3156
|
}
|
|
3556
|
-
if (k(s2))
|
|
3557
|
-
return void this.addHandler([t2].concat(a2), e2, s2.builder, s2.handler, s2.middlewares, s2.deprecated);
|
|
3157
|
+
if (k(s2)) return void this.addHandler([t2].concat(a2), e2, s2.builder, s2.handler, s2.middlewares, s2.deprecated);
|
|
3558
3158
|
}
|
|
3559
3159
|
if ("string" == typeof t2) {
|
|
3560
3160
|
const n3 = o(t2);
|
|
@@ -3587,17 +3187,15 @@ var require_build4 = __commonJS({
|
|
|
3587
3187
|
if (x(h2)) {
|
|
3588
3188
|
s2.getInternalMethods().getUsageInstance().freeze();
|
|
3589
3189
|
const c2 = h2(s2.getInternalMethods().reset(i2), a2);
|
|
3590
|
-
if (f(c2))
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
l2.option(t3, h2[t3]);
|
|
3600
|
-
}));
|
|
3190
|
+
if (f(c2)) return c2.then((i3) => {
|
|
3191
|
+
var a3;
|
|
3192
|
+
return l2 = (a3 = i3) && "function" == typeof a3.getInternalMethods ? i3 : s2, this.parseAndUpdateUsage(t2, e2, l2, n2, r2, o2);
|
|
3193
|
+
});
|
|
3194
|
+
} else /* @__PURE__ */ (function(t3) {
|
|
3195
|
+
return "object" == typeof t3;
|
|
3196
|
+
})(h2) && (s2.getInternalMethods().getUsageInstance().freeze(), l2 = s2.getInternalMethods().reset(i2), Object.keys(e2.builder).forEach((t3) => {
|
|
3197
|
+
l2.option(t3, h2[t3]);
|
|
3198
|
+
}));
|
|
3601
3199
|
return this.parseAndUpdateUsage(t2, e2, l2, n2, r2, o2);
|
|
3602
3200
|
}
|
|
3603
3201
|
parseAndUpdateUsage(t2, e2, s2, i2, n2, r2) {
|
|
@@ -3634,8 +3232,7 @@ var require_build4 = __commonJS({
|
|
|
3634
3232
|
}
|
|
3635
3233
|
applyMiddlewareAndGetResult(t2, e2, s2, i2, n2, r2, o2) {
|
|
3636
3234
|
let a2 = {};
|
|
3637
|
-
if (n2)
|
|
3638
|
-
return s2;
|
|
3235
|
+
if (n2) return s2;
|
|
3639
3236
|
o2.getInternalMethods().getHasOutput() || (a2 = this.populatePositionals(e2, s2, i2, o2));
|
|
3640
3237
|
const h2 = this.globalMiddleware.getMiddleware().slice(0).concat(e2.middlewares), l2 = C(s2, o2, h2, true);
|
|
3641
3238
|
return f(l2) ? l2.then((s3) => this.handleValidationAndGetResult(t2, e2, s3, i2, r2, o2, h2, a2)) : this.handleValidationAndGetResult(t2, e2, l2, i2, r2, o2, h2, a2);
|
|
@@ -3670,19 +3267,16 @@ var require_build4 = __commonJS({
|
|
|
3670
3267
|
postProcessPositionals(t2, e2, s2, i2) {
|
|
3671
3268
|
const n2 = Object.assign({}, i2.getOptions());
|
|
3672
3269
|
n2.default = Object.assign(s2.default, n2.default);
|
|
3673
|
-
for (const t3 of Object.keys(s2.alias))
|
|
3674
|
-
n2.alias[t3] = (n2.alias[t3] || []).concat(s2.alias[t3]);
|
|
3270
|
+
for (const t3 of Object.keys(s2.alias)) n2.alias[t3] = (n2.alias[t3] || []).concat(s2.alias[t3]);
|
|
3675
3271
|
n2.array = n2.array.concat(s2.array), n2.config = {};
|
|
3676
3272
|
const r2 = [];
|
|
3677
3273
|
if (Object.keys(e2).forEach((t3) => {
|
|
3678
3274
|
e2[t3].map((e3) => {
|
|
3679
3275
|
n2.configuration["unknown-options-as-args"] && (n2.key[t3] = true), r2.push(`--${t3}`), r2.push(e3);
|
|
3680
3276
|
});
|
|
3681
|
-
}), !r2.length)
|
|
3682
|
-
return;
|
|
3277
|
+
}), !r2.length) return;
|
|
3683
3278
|
const o2 = Object.assign({}, n2.configuration, { "populate--": false }), a2 = this.shim.Parser.detailed(r2, Object.assign({}, n2, { configuration: o2 }));
|
|
3684
|
-
if (a2.error)
|
|
3685
|
-
i2.getInternalMethods().getUsageInstance().fail(a2.error.message, a2.error);
|
|
3279
|
+
if (a2.error) i2.getInternalMethods().getUsageInstance().fail(a2.error.message, a2.error);
|
|
3686
3280
|
else {
|
|
3687
3281
|
const s3 = Object.keys(e2);
|
|
3688
3282
|
Object.keys(e2).forEach((t3) => {
|
|
@@ -3701,30 +3295,24 @@ var require_build4 = __commonJS({
|
|
|
3701
3295
|
return s2.some((t3) => Object.prototype.hasOwnProperty.call(t3, e2)) || s2.some((t3) => Object.prototype.hasOwnProperty.call(t3, this.shim.Parser.camelCase(e2)));
|
|
3702
3296
|
}
|
|
3703
3297
|
runDefaultBuilderOn(t2) {
|
|
3704
|
-
if (!this.defaultCommand)
|
|
3705
|
-
return;
|
|
3298
|
+
if (!this.defaultCommand) return;
|
|
3706
3299
|
if (this.shouldUpdateUsage(t2)) {
|
|
3707
3300
|
const e3 = M.test(this.defaultCommand.original) ? this.defaultCommand.original : this.defaultCommand.original.replace(/^[^[\]<>]*/, "$0 ");
|
|
3708
3301
|
t2.getInternalMethods().getUsageInstance().usage(e3, this.defaultCommand.description);
|
|
3709
3302
|
}
|
|
3710
3303
|
const e2 = this.defaultCommand.builder;
|
|
3711
|
-
if (x(e2))
|
|
3712
|
-
return e2(t2, true);
|
|
3304
|
+
if (x(e2)) return e2(t2, true);
|
|
3713
3305
|
k(e2) || Object.keys(e2).forEach((s2) => {
|
|
3714
3306
|
t2.option(s2, e2[s2]);
|
|
3715
3307
|
});
|
|
3716
3308
|
}
|
|
3717
3309
|
moduleName(t2) {
|
|
3718
3310
|
const e2 = function(t3) {
|
|
3719
|
-
if ("undefined" == typeof require)
|
|
3720
|
-
|
|
3721
|
-
for (let e3, s2 = 0, i2 = Object.keys(require.cache); s2 < i2.length; s2++)
|
|
3722
|
-
if (e3 = require.cache[i2[s2]], e3.exports === t3)
|
|
3723
|
-
return e3;
|
|
3311
|
+
if ("undefined" == typeof require) return null;
|
|
3312
|
+
for (let e3, s2 = 0, i2 = Object.keys(require.cache); s2 < i2.length; s2++) if (e3 = require.cache[i2[s2]], e3.exports === t3) return e3;
|
|
3724
3313
|
return null;
|
|
3725
3314
|
}(t2);
|
|
3726
|
-
if (!e2)
|
|
3727
|
-
throw new Error(`No command name given for module: ${this.shim.inspect(t2)}`);
|
|
3315
|
+
if (!e2) throw new Error(`No command name given for module: ${this.shim.inspect(t2)}`);
|
|
3728
3316
|
return this.commandFromFilename(e2.filename);
|
|
3729
3317
|
}
|
|
3730
3318
|
commandFromFilename(t2) {
|
|
@@ -3732,8 +3320,7 @@ var require_build4 = __commonJS({
|
|
|
3732
3320
|
}
|
|
3733
3321
|
extractDesc({ describe: t2, description: e2, desc: s2 }) {
|
|
3734
3322
|
for (const i2 of [t2, e2, s2]) {
|
|
3735
|
-
if ("string" == typeof i2 || false === i2)
|
|
3736
|
-
return i2;
|
|
3323
|
+
if ("string" == typeof i2 || false === i2) return i2;
|
|
3737
3324
|
d(i2, true, this.shim);
|
|
3738
3325
|
}
|
|
3739
3326
|
return false;
|
|
@@ -3783,21 +3370,16 @@ var require_build4 = __commonJS({
|
|
|
3783
3370
|
const e2 = o2 || a2;
|
|
3784
3371
|
e2 && ((s3 || i3) && c3.error(""), c3.error(e2));
|
|
3785
3372
|
}
|
|
3786
|
-
if (i3 = i3 || new e(s3), t2.getExitProcess())
|
|
3787
|
-
|
|
3788
|
-
if (t2.getInternalMethods().hasParseCallback())
|
|
3789
|
-
return t2.exit(1, i3);
|
|
3373
|
+
if (i3 = i3 || new e(s3), t2.getExitProcess()) return t2.exit(1);
|
|
3374
|
+
if (t2.getInternalMethods().hasParseCallback()) return t2.exit(1, i3);
|
|
3790
3375
|
throw i3;
|
|
3791
3376
|
}
|
|
3792
3377
|
for (let t3 = r2.length - 1; t3 >= 0; --t3) {
|
|
3793
3378
|
const e2 = r2[t3];
|
|
3794
3379
|
if (A(e2)) {
|
|
3795
|
-
if (i3)
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
throw Error(s3);
|
|
3799
|
-
} else
|
|
3800
|
-
e2(s3, i3, n2);
|
|
3380
|
+
if (i3) throw i3;
|
|
3381
|
+
if (s3) throw Error(s3);
|
|
3382
|
+
} else e2(s3, i3, n2);
|
|
3801
3383
|
}
|
|
3802
3384
|
};
|
|
3803
3385
|
let c2 = [], f2 = false;
|
|
@@ -3842,26 +3424,22 @@ var require_build4 = __commonJS({
|
|
|
3842
3424
|
}
|
|
3843
3425
|
function j2(t3, e2) {
|
|
3844
3426
|
let s3 = `[${i2("default:")} `;
|
|
3845
|
-
if (void 0 === t3 && !e2)
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
default:
|
|
3858
|
-
s3 += t3;
|
|
3859
|
-
}
|
|
3427
|
+
if (void 0 === t3 && !e2) return null;
|
|
3428
|
+
if (e2) s3 += e2;
|
|
3429
|
+
else switch (typeof t3) {
|
|
3430
|
+
case "string":
|
|
3431
|
+
s3 += `"${t3}"`;
|
|
3432
|
+
break;
|
|
3433
|
+
case "object":
|
|
3434
|
+
s3 += JSON.stringify(t3);
|
|
3435
|
+
break;
|
|
3436
|
+
default:
|
|
3437
|
+
s3 += t3;
|
|
3438
|
+
}
|
|
3860
3439
|
return `${s3}]`;
|
|
3861
3440
|
}
|
|
3862
3441
|
n2.deferY18nLookup = (t3) => v2 + t3, n2.help = function() {
|
|
3863
|
-
if (w2)
|
|
3864
|
-
return w2;
|
|
3442
|
+
if (w2) return w2;
|
|
3865
3443
|
!function() {
|
|
3866
3444
|
const e3 = t2.getDemandedOptions(), s3 = t2.getOptions();
|
|
3867
3445
|
(Object.keys(s3.alias) || []).forEach((i3) => {
|
|
@@ -3875,10 +3453,9 @@ var require_build4 = __commonJS({
|
|
|
3875
3453
|
g2 = g2.concat(Object.keys(p2)), g2 = g2.concat(Object.keys(r3)), g2 = g2.concat(Object.keys(o3)), g2 = g2.concat(Object.keys(l3.default)), g2 = g2.filter(C2), g2 = Object.keys(g2.reduce((t3, e3) => ("_" !== e3 && (t3[e3] = true), t3), {}));
|
|
3876
3454
|
const y3 = n2.getWrap(), b3 = s2.cliui({ width: y3, wrap: !!y3 });
|
|
3877
3455
|
if (!f2) {
|
|
3878
|
-
if (c2.length)
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
}), b3.div();
|
|
3456
|
+
if (c2.length) c2.forEach((t3) => {
|
|
3457
|
+
b3.div({ text: `${t3[0].replace(/\$0/g, e2)}` }), t3[1] && b3.div({ text: `${t3[1]}`, padding: [1, 0, 0, 0] });
|
|
3458
|
+
}), b3.div();
|
|
3882
3459
|
else if (u2.length) {
|
|
3883
3460
|
let t3 = null;
|
|
3884
3461
|
t3 = o3._ ? `${e2} <${i2("command")}>
|
|
@@ -3910,11 +3487,8 @@ var require_build4 = __commonJS({
|
|
|
3910
3487
|
});
|
|
3911
3488
|
}(g2, l3.alias, h3, _3);
|
|
3912
3489
|
const k2 = (t3) => /^--/.test(I(t3)), x2 = Object.keys(h3).filter((t3) => h3[t3].length > 0).map((t3) => ({ groupName: t3, normalizedKeys: h3[t3].filter(C2).map((t4) => {
|
|
3913
|
-
if (M3.includes(t4))
|
|
3914
|
-
|
|
3915
|
-
for (let e3, s3 = 0; void 0 !== (e3 = M3[s3]); s3++)
|
|
3916
|
-
if ((l3.alias[e3] || []).includes(t4))
|
|
3917
|
-
return e3;
|
|
3490
|
+
if (M3.includes(t4)) return t4;
|
|
3491
|
+
for (let e3, s3 = 0; void 0 !== (e3 = M3[s3]); s3++) if ((l3.alias[e3] || []).includes(t4)) return e3;
|
|
3918
3492
|
return t4;
|
|
3919
3493
|
}) })).filter(({ normalizedKeys: t3 }) => t3.length > 0).map(({ groupName: t3, normalizedKeys: e3 }) => {
|
|
3920
3494
|
const s3 = e3.reduce((e4, s4) => (e4[s4] = [s4].concat(l3.alias[s4] || []).map((e5) => t3 === n2.getPositionalGroupName() ? e5 : (/^[0-9]$/.test(e5) ? l3.boolean.includes(s4) ? "-" : "--" : e5.length > 1 ? "--" : "-") + e5).sort((t4, e5) => k2(t4) === k2(e5) ? 0 : k2(t4) ? 1 : -1).join(", "), e4), {});
|
|
@@ -3997,15 +3571,14 @@ var require_build4 = __commonJS({
|
|
|
3997
3571
|
}
|
|
3998
3572
|
defaultCompletion(t2, e2, s2, i2) {
|
|
3999
3573
|
const n2 = this.command.getCommandHandlers();
|
|
4000
|
-
for (let e3 = 0, s3 = t2.length; e3 < s3; ++e3)
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
return s4(t3, true), t3.argv;
|
|
4007
|
-
}
|
|
3574
|
+
for (let e3 = 0, s3 = t2.length; e3 < s3; ++e3) if (n2[t2[e3]] && n2[t2[e3]].builder) {
|
|
3575
|
+
const s4 = n2[t2[e3]].builder;
|
|
3576
|
+
if (x(s4)) {
|
|
3577
|
+
this.indexAfterLastReset = e3 + 1;
|
|
3578
|
+
const t3 = this.yargs.getInternalMethods().reset();
|
|
3579
|
+
return s4(t3, true), t3.argv;
|
|
4008
3580
|
}
|
|
3581
|
+
}
|
|
4009
3582
|
const r2 = [];
|
|
4010
3583
|
this.commandCompletions(r2, t2, s2), this.optionCompletions(r2, t2, e2, s2), this.choicesFromOptionsCompletions(r2, t2, e2, s2), this.choicesFromPositionalsCompletions(r2, t2, e2, s2), i2(null, r2);
|
|
4011
3584
|
}
|
|
@@ -4013,12 +3586,10 @@ var require_build4 = __commonJS({
|
|
|
4013
3586
|
const i2 = this.yargs.getInternalMethods().getContext().commands;
|
|
4014
3587
|
s2.match(/^-/) || i2[i2.length - 1] === s2 || this.previousArgHasChoices(e2) || this.usage.getCommands().forEach((s3) => {
|
|
4015
3588
|
const i3 = o(s3[0]).cmd;
|
|
4016
|
-
if (-1 === e2.indexOf(i3))
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
} else
|
|
4021
|
-
t2.push(i3);
|
|
3589
|
+
if (-1 === e2.indexOf(i3)) if (this.zshShell) {
|
|
3590
|
+
const e3 = s3[1] || "";
|
|
3591
|
+
t2.push(i3.replace(/:/g, "\\:") + ":" + e3);
|
|
3592
|
+
} else t2.push(i3);
|
|
4022
3593
|
});
|
|
4023
3594
|
}
|
|
4024
3595
|
optionCompletions(t2, e2, s2, i2) {
|
|
@@ -4037,28 +3608,22 @@ var require_build4 = __commonJS({
|
|
|
4037
3608
|
}
|
|
4038
3609
|
}
|
|
4039
3610
|
choicesFromPositionalsCompletions(t2, e2, s2, i2) {
|
|
4040
|
-
if ("" === i2 && t2.length > 0 && this.previousArgHasChoices(e2))
|
|
4041
|
-
return;
|
|
3611
|
+
if ("" === i2 && t2.length > 0 && this.previousArgHasChoices(e2)) return;
|
|
4042
3612
|
const n2 = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || [], r2 = Math.max(this.indexAfterLastReset, this.yargs.getInternalMethods().getContext().commands.length + 1), o2 = n2[s2._.length - r2 - 1];
|
|
4043
|
-
if (!o2)
|
|
4044
|
-
return;
|
|
3613
|
+
if (!o2) return;
|
|
4045
3614
|
const a2 = this.yargs.getOptions().choices[o2] || [];
|
|
4046
|
-
for (const e3 of a2)
|
|
4047
|
-
e3.startsWith(i2) && t2.push(e3.replace(/:/g, "\\:"));
|
|
3615
|
+
for (const e3 of a2) e3.startsWith(i2) && t2.push(e3.replace(/:/g, "\\:"));
|
|
4048
3616
|
}
|
|
4049
3617
|
getPreviousArgChoices(t2) {
|
|
4050
|
-
if (t2.length < 1)
|
|
4051
|
-
return;
|
|
3618
|
+
if (t2.length < 1) return;
|
|
4052
3619
|
let e2 = t2[t2.length - 1], s2 = "";
|
|
4053
|
-
if (!e2.startsWith("-") && t2.length > 1 && (s2 = e2, e2 = t2[t2.length - 2]), !e2.startsWith("-"))
|
|
4054
|
-
return;
|
|
3620
|
+
if (!e2.startsWith("-") && t2.length > 1 && (s2 = e2, e2 = t2[t2.length - 2]), !e2.startsWith("-")) return;
|
|
4055
3621
|
const i2 = e2.replace(/^-+/, ""), n2 = this.yargs.getOptions(), r2 = [i2, ...this.yargs.getAliases()[i2] || []];
|
|
4056
3622
|
let o2;
|
|
4057
|
-
for (const t3 of r2)
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
}
|
|
3623
|
+
for (const t3 of r2) if (Object.prototype.hasOwnProperty.call(n2.key, t3) && Array.isArray(n2.choices[t3])) {
|
|
3624
|
+
o2 = n2.choices[t3];
|
|
3625
|
+
break;
|
|
3626
|
+
}
|
|
4062
3627
|
return o2 ? o2.filter((t3) => !s2 || t3.startsWith(s2)) : void 0;
|
|
4063
3628
|
}
|
|
4064
3629
|
previousArgHasChoices(t2) {
|
|
@@ -4067,14 +3632,10 @@ var require_build4 = __commonJS({
|
|
|
4067
3632
|
}
|
|
4068
3633
|
argsContainKey(t2, e2, s2) {
|
|
4069
3634
|
const i2 = (e3) => -1 !== t2.indexOf((/^[^0-9]$/.test(e3) ? "-" : "--") + e3);
|
|
4070
|
-
if (i2(e2))
|
|
4071
|
-
|
|
4072
|
-
if (s2 && i2(`no-${e2}`))
|
|
4073
|
-
return true;
|
|
3635
|
+
if (i2(e2)) return true;
|
|
3636
|
+
if (s2 && i2(`no-${e2}`)) return true;
|
|
4074
3637
|
if (this.aliases) {
|
|
4075
|
-
for (const t3 of this.aliases[e2])
|
|
4076
|
-
if (i2(t3))
|
|
4077
|
-
return true;
|
|
3638
|
+
for (const t3 of this.aliases[e2]) if (i2(t3)) return true;
|
|
4078
3639
|
}
|
|
4079
3640
|
return false;
|
|
4080
3641
|
}
|
|
@@ -4148,19 +3709,13 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4148
3709
|
}
|
|
4149
3710
|
};
|
|
4150
3711
|
function N(t2, e2) {
|
|
4151
|
-
if (0 === t2.length)
|
|
4152
|
-
|
|
4153
|
-
if (0 === e2.length)
|
|
4154
|
-
return t2.length;
|
|
3712
|
+
if (0 === t2.length) return e2.length;
|
|
3713
|
+
if (0 === e2.length) return t2.length;
|
|
4155
3714
|
const s2 = [];
|
|
4156
3715
|
let i2, n2;
|
|
4157
|
-
for (i2 = 0; i2 <= e2.length; i2++)
|
|
4158
|
-
|
|
4159
|
-
for (n2 =
|
|
4160
|
-
s2[0][n2] = n2;
|
|
4161
|
-
for (i2 = 1; i2 <= e2.length; i2++)
|
|
4162
|
-
for (n2 = 1; n2 <= t2.length; n2++)
|
|
4163
|
-
e2.charAt(i2 - 1) === t2.charAt(n2 - 1) ? s2[i2][n2] = s2[i2 - 1][n2 - 1] : i2 > 1 && n2 > 1 && e2.charAt(i2 - 2) === t2.charAt(n2 - 1) && e2.charAt(i2 - 1) === t2.charAt(n2 - 2) ? s2[i2][n2] = s2[i2 - 2][n2 - 2] + 1 : s2[i2][n2] = Math.min(s2[i2 - 1][n2 - 1] + 1, Math.min(s2[i2][n2 - 1] + 1, s2[i2 - 1][n2] + 1));
|
|
3716
|
+
for (i2 = 0; i2 <= e2.length; i2++) s2[i2] = [i2];
|
|
3717
|
+
for (n2 = 0; n2 <= t2.length; n2++) s2[0][n2] = n2;
|
|
3718
|
+
for (i2 = 1; i2 <= e2.length; i2++) for (n2 = 1; n2 <= t2.length; n2++) e2.charAt(i2 - 1) === t2.charAt(n2 - 1) ? s2[i2][n2] = s2[i2 - 1][n2 - 1] : i2 > 1 && n2 > 1 && e2.charAt(i2 - 2) === t2.charAt(n2 - 1) && e2.charAt(i2 - 1) === t2.charAt(n2 - 2) ? s2[i2][n2] = s2[i2 - 2][n2 - 2] + 1 : s2[i2][n2] = Math.min(s2[i2 - 1][n2 - 1] + 1, Math.min(s2[i2][n2 - 1] + 1, s2[i2 - 1][n2] + 1));
|
|
4164
3719
|
return s2[e2.length][t2.length];
|
|
4165
3720
|
}
|
|
4166
3721
|
var H = ["$0", "--", "_"];
|
|
@@ -4246,8 +3801,7 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4246
3801
|
return this.addHelpOpt(t2, e2);
|
|
4247
3802
|
}
|
|
4248
3803
|
addShowHiddenOpt(t2, e2) {
|
|
4249
|
-
if (h("[string|boolean] [string]", [t2, e2], arguments.length), false === t2 && void 0 === e2)
|
|
4250
|
-
return this;
|
|
3804
|
+
if (h("[string|boolean] [string]", [t2, e2], arguments.length), false === t2 && void 0 === e2) return this;
|
|
4251
3805
|
const s2 = "string" == typeof t2 ? t2 : v(this, L, "f");
|
|
4252
3806
|
return this.boolean(s2), this.describe(s2, e2 || v(this, pt, "f").deferY18nLookup("Show hidden options")), v(this, et, "f").showHiddenOpt = s2, this;
|
|
4253
3807
|
}
|
|
@@ -4271,27 +3825,21 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4271
3825
|
}
|
|
4272
3826
|
coerce(t2, s2) {
|
|
4273
3827
|
if (h("<object|string|array> [function]", [t2, s2], arguments.length), Array.isArray(t2)) {
|
|
4274
|
-
if (!s2)
|
|
4275
|
-
|
|
4276
|
-
for (const e2 of t2)
|
|
4277
|
-
this.coerce(e2, s2);
|
|
3828
|
+
if (!s2) throw new e("coerce callback must be provided");
|
|
3829
|
+
for (const e2 of t2) this.coerce(e2, s2);
|
|
4278
3830
|
return this;
|
|
4279
3831
|
}
|
|
4280
3832
|
if ("object" == typeof t2) {
|
|
4281
|
-
for (const e2 of Object.keys(t2))
|
|
4282
|
-
this.coerce(e2, t2[e2]);
|
|
3833
|
+
for (const e2 of Object.keys(t2)) this.coerce(e2, t2[e2]);
|
|
4283
3834
|
return this;
|
|
4284
3835
|
}
|
|
4285
|
-
if (!s2)
|
|
4286
|
-
throw new e("coerce callback must be provided");
|
|
3836
|
+
if (!s2) throw new e("coerce callback must be provided");
|
|
4287
3837
|
return v(this, et, "f").key[t2] = true, v(this, Y, "f").addCoerceMiddleware((i2, n2) => {
|
|
4288
3838
|
let r2;
|
|
4289
3839
|
return Object.prototype.hasOwnProperty.call(i2, t2) ? j(() => (r2 = n2.getAliases(), s2(i2[t2])), (e2) => {
|
|
4290
3840
|
i2[t2] = e2;
|
|
4291
3841
|
const s3 = n2.getInternalMethods().getParserConfiguration()["strip-aliased"];
|
|
4292
|
-
if (r2[t2] && true !== s3)
|
|
4293
|
-
for (const s4 of r2[t2])
|
|
4294
|
-
i2[s4] = e2;
|
|
3842
|
+
if (r2[t2] && true !== s3) for (const s4 of r2[t2]) i2[s4] = e2;
|
|
4295
3843
|
return i2;
|
|
4296
3844
|
}, (t3) => {
|
|
4297
3845
|
throw new e(t3.message);
|
|
@@ -4370,8 +3918,7 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4370
3918
|
return h("[boolean]", [t2], arguments.length), O(this, T, t2, "f"), this;
|
|
4371
3919
|
}
|
|
4372
3920
|
fail(t2) {
|
|
4373
|
-
if (h("<function|boolean>", [t2], arguments.length), "boolean" == typeof t2 && false !== t2)
|
|
4374
|
-
throw new e("Invalid first argument. Expected function or boolean 'false'");
|
|
3921
|
+
if (h("<function|boolean>", [t2], arguments.length), "boolean" == typeof t2 && false !== t2) throw new e("Invalid first argument. Expected function or boolean 'false'");
|
|
4375
3922
|
return v(this, pt, "f").failFn(t2), this;
|
|
4376
3923
|
}
|
|
4377
3924
|
getAliases() {
|
|
@@ -4406,12 +3953,10 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4406
3953
|
if (O(this, J, true, "f"), !v(this, pt, "f").hasCachedHelpMessage()) {
|
|
4407
3954
|
if (!this.parsed) {
|
|
4408
3955
|
const t3 = this[Jt](v(this, ht, "f"), void 0, void 0, 0, true);
|
|
4409
|
-
if (f(t3))
|
|
4410
|
-
return t3.then(() => v(this, pt, "f").help());
|
|
3956
|
+
if (f(t3)) return t3.then(() => v(this, pt, "f").help());
|
|
4411
3957
|
}
|
|
4412
3958
|
const t2 = v(this, z, "f").runDefaultBuilderOn(this);
|
|
4413
|
-
if (f(t2))
|
|
4414
|
-
return t2.then(() => v(this, pt, "f").help());
|
|
3959
|
+
if (f(t2)) return t2.then(() => v(this, pt, "f").help());
|
|
4415
3960
|
}
|
|
4416
3961
|
return Promise.resolve(v(this, pt, "f").help());
|
|
4417
3962
|
}
|
|
@@ -4461,10 +4006,9 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4461
4006
|
return h("<array|string>", [t2], arguments.length), this[Pt]("number", t2), this[Qt](t2), this;
|
|
4462
4007
|
}
|
|
4463
4008
|
option(t2, e2) {
|
|
4464
|
-
if (h("<string|object> [object]", [t2, e2], arguments.length), "object" == typeof t2)
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
});
|
|
4009
|
+
if (h("<string|object> [object]", [t2, e2], arguments.length), "object" == typeof t2) Object.keys(t2).forEach((e3) => {
|
|
4010
|
+
this.options(e3, t2[e3]);
|
|
4011
|
+
});
|
|
4468
4012
|
else {
|
|
4469
4013
|
"object" != typeof e2 && (e2 = {}), this[Qt](t2), !v(this, mt, "f") || "version" !== t2 && "version" !== (null == e2 ? void 0 : e2.alias) || this[wt](['"version" is a reserved word.', "Please do one of the following:", '- Disable version with `yargs.version(false)` if using "version" as an option', "- Use the built-in `yargs.version` method instead (if applicable)", "- Use a different option key", "https://yargs.js.org/docs/#api-reference-version"].join("\n"), void 0, "versionWarning"), v(this, et, "f").key[t2] = true, e2.alias && this.alias(t2, e2.alias);
|
|
4470
4014
|
const s2 = e2.deprecate || e2.deprecated;
|
|
@@ -4494,8 +4038,7 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4494
4038
|
}
|
|
4495
4039
|
parseSync(t2, s2, i2) {
|
|
4496
4040
|
const n2 = this.parse(t2, s2, i2);
|
|
4497
|
-
if (f(n2))
|
|
4498
|
-
throw new e(".parseSync() must not be used with asynchronous builders, handlers, or middleware");
|
|
4041
|
+
if (f(n2)) throw new e(".parseSync() must not be used with asynchronous builders, handlers, or middleware");
|
|
4499
4042
|
return n2;
|
|
4500
4043
|
}
|
|
4501
4044
|
parserConfiguration(t2) {
|
|
@@ -4536,16 +4079,14 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4536
4079
|
if (h("[string|function]", [t2], arguments.length), O(this, J, true, "f"), !v(this, pt, "f").hasCachedHelpMessage()) {
|
|
4537
4080
|
if (!this.parsed) {
|
|
4538
4081
|
const e3 = this[Jt](v(this, ht, "f"), void 0, void 0, 0, true);
|
|
4539
|
-
if (f(e3))
|
|
4540
|
-
return e3.then(() => {
|
|
4541
|
-
v(this, pt, "f").showHelp(t2);
|
|
4542
|
-
}), this;
|
|
4543
|
-
}
|
|
4544
|
-
const e2 = v(this, z, "f").runDefaultBuilderOn(this);
|
|
4545
|
-
if (f(e2))
|
|
4546
|
-
return e2.then(() => {
|
|
4082
|
+
if (f(e3)) return e3.then(() => {
|
|
4547
4083
|
v(this, pt, "f").showHelp(t2);
|
|
4548
4084
|
}), this;
|
|
4085
|
+
}
|
|
4086
|
+
const e2 = v(this, z, "f").runDefaultBuilderOn(this);
|
|
4087
|
+
if (f(e2)) return e2.then(() => {
|
|
4088
|
+
v(this, pt, "f").showHelp(t2);
|
|
4089
|
+
}), this;
|
|
4549
4090
|
}
|
|
4550
4091
|
return v(this, pt, "f").showHelp(t2), this;
|
|
4551
4092
|
}
|
|
@@ -4584,8 +4125,7 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4584
4125
|
}
|
|
4585
4126
|
usage(t2, s2, i2, n2) {
|
|
4586
4127
|
if (h("<string|null|undefined> [string|boolean] [function|object] [function]", [t2, s2, i2, n2], arguments.length), void 0 !== s2) {
|
|
4587
|
-
if (d(t2, null, v(this, ct, "f")), (t2 || "").match(/^\$0( |$)/))
|
|
4588
|
-
return this.command(t2, s2, i2, n2);
|
|
4128
|
+
if (d(t2, null, v(this, ct, "f")), (t2 || "").match(/^\$0( |$)/)) return this.command(t2, s2, i2, n2);
|
|
4589
4129
|
throw new e(".usage() description must start with $0 if being used as alias for .command()");
|
|
4590
4130
|
}
|
|
4591
4131
|
return v(this, pt, "f").usage(t2), this;
|
|
@@ -4595,22 +4135,18 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4595
4135
|
}
|
|
4596
4136
|
version(t2, e2, s2) {
|
|
4597
4137
|
const i2 = "version";
|
|
4598
|
-
if (h("[boolean|string] [string] [string]", [t2, e2, s2], arguments.length), v(this, mt, "f") && (this[Ot](v(this, mt, "f")), v(this, pt, "f").version(void 0), O(this, mt, null, "f")), 0 === arguments.length)
|
|
4599
|
-
s2 = this[xt](), t2 = i2;
|
|
4138
|
+
if (h("[boolean|string] [string] [string]", [t2, e2, s2], arguments.length), v(this, mt, "f") && (this[Ot](v(this, mt, "f")), v(this, pt, "f").version(void 0), O(this, mt, null, "f")), 0 === arguments.length) s2 = this[xt](), t2 = i2;
|
|
4600
4139
|
else if (1 === arguments.length) {
|
|
4601
|
-
if (false === t2)
|
|
4602
|
-
return this;
|
|
4140
|
+
if (false === t2) return this;
|
|
4603
4141
|
s2 = t2, t2 = i2;
|
|
4604
|
-
} else
|
|
4605
|
-
2 === arguments.length && (s2 = e2, e2 = void 0);
|
|
4142
|
+
} else 2 === arguments.length && (s2 = e2, e2 = void 0);
|
|
4606
4143
|
return O(this, mt, "string" == typeof t2 ? t2 : i2, "f"), e2 = e2 || v(this, pt, "f").deferY18nLookup("Show version number"), v(this, pt, "f").version(s2 || void 0), this.boolean(v(this, mt, "f")), this.describe(v(this, mt, "f"), e2), this;
|
|
4607
4144
|
}
|
|
4608
4145
|
wrap(t2) {
|
|
4609
4146
|
return h("<number|null|undefined>", [t2], arguments.length), v(this, pt, "f").wrap(t2), this;
|
|
4610
4147
|
}
|
|
4611
4148
|
[(z = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), rt = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), yt = /* @__PURE__ */ new WeakMap(), bt)](t2) {
|
|
4612
|
-
if (!t2._ || !t2["--"])
|
|
4613
|
-
return t2;
|
|
4149
|
+
if (!t2._ || !t2["--"]) return t2;
|
|
4614
4150
|
t2._.push.apply(t2._, t2["--"]);
|
|
4615
4151
|
try {
|
|
4616
4152
|
delete t2["--"];
|
|
@@ -4627,8 +4163,7 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4627
4163
|
}
|
|
4628
4164
|
[Ot](t2) {
|
|
4629
4165
|
p(v(this, et, "f")).forEach((e2) => {
|
|
4630
|
-
if ("configObjects" === e2)
|
|
4631
|
-
return;
|
|
4166
|
+
if ("configObjects" === e2) return;
|
|
4632
4167
|
const s2 = v(this, et, "f")[e2];
|
|
4633
4168
|
Array.isArray(s2) ? s2.includes(t2) && s2.splice(s2.indexOf(t2), 1) : "object" == typeof s2 && delete s2[t2];
|
|
4634
4169
|
}), delete v(this, pt, "f").getDescriptions()[t2];
|
|
@@ -4653,8 +4188,7 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4653
4188
|
return v(this, gt, "f");
|
|
4654
4189
|
}
|
|
4655
4190
|
[kt]() {
|
|
4656
|
-
if (!v(this, G, "f"))
|
|
4657
|
-
return;
|
|
4191
|
+
if (!v(this, G, "f")) return;
|
|
4658
4192
|
const t2 = v(this, ct, "f").getEnv("LC_ALL") || v(this, ct, "f").getEnv("LC_MESSAGES") || v(this, ct, "f").getEnv("LANG") || v(this, ct, "f").getEnv("LANGUAGE") || "en_US";
|
|
4659
4193
|
this.locale(t2.replace(/[.:].*/, ""));
|
|
4660
4194
|
}
|
|
@@ -4663,14 +4197,12 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4663
4197
|
}
|
|
4664
4198
|
[Et](t2) {
|
|
4665
4199
|
const e2 = t2["--"] ? t2["--"] : t2._;
|
|
4666
|
-
for (let t3, s2 = 0; void 0 !== (t3 = e2[s2]); s2++)
|
|
4667
|
-
v(this, ct, "f").Parser.looksLikeNumber(t3) && Number.isSafeInteger(Math.floor(parseFloat(`${t3}`))) && (e2[s2] = Number(t3));
|
|
4200
|
+
for (let t3, s2 = 0; void 0 !== (t3 = e2[s2]); s2++) v(this, ct, "f").Parser.looksLikeNumber(t3) && Number.isSafeInteger(Math.floor(parseFloat(`${t3}`))) && (e2[s2] = Number(t3));
|
|
4668
4201
|
return t2;
|
|
4669
4202
|
}
|
|
4670
4203
|
[At](t2) {
|
|
4671
4204
|
const e2 = t2 || "*";
|
|
4672
|
-
if (v(this, ot, "f")[e2])
|
|
4673
|
-
return v(this, ot, "f")[e2];
|
|
4205
|
+
if (v(this, ot, "f")[e2]) return v(this, ot, "f")[e2];
|
|
4674
4206
|
let s2 = {};
|
|
4675
4207
|
try {
|
|
4676
4208
|
let e3 = t2 || v(this, ct, "f").mainFilename;
|
|
@@ -4697,15 +4229,11 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4697
4229
|
});
|
|
4698
4230
|
}
|
|
4699
4231
|
[It](t2, e2, s2, i2, n2) {
|
|
4700
|
-
if (Array.isArray(s2))
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
else
|
|
4705
|
-
for (const e3 of p(s2))
|
|
4706
|
-
t2(e3, s2[e3]);
|
|
4707
|
-
else
|
|
4708
|
-
n2(e2, this[Dt](s2), i2);
|
|
4232
|
+
if (Array.isArray(s2)) s2.forEach((e3) => {
|
|
4233
|
+
t2(e3, i2);
|
|
4234
|
+
});
|
|
4235
|
+
else if (/* @__PURE__ */ ((t3) => "object" == typeof t3)(s2)) for (const e3 of p(s2)) t2(e3, s2[e3]);
|
|
4236
|
+
else n2(e2, this[Dt](s2), i2);
|
|
4709
4237
|
}
|
|
4710
4238
|
[Dt](t2) {
|
|
4711
4239
|
return "__proto__" === t2 ? "___proto___" : t2;
|
|
@@ -4777,10 +4305,8 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4777
4305
|
return v(this, X, "f");
|
|
4778
4306
|
}
|
|
4779
4307
|
[Bt](t2, e2, s2, i2) {
|
|
4780
|
-
if (s2)
|
|
4781
|
-
|
|
4782
|
-
if (f(t2))
|
|
4783
|
-
return t2;
|
|
4308
|
+
if (s2) return t2;
|
|
4309
|
+
if (f(t2)) return t2;
|
|
4784
4310
|
e2 || (t2 = this[bt](t2));
|
|
4785
4311
|
return (this[Mt]()["parse-positional-numbers"] || void 0 === this[Mt]()["parse-positional-numbers"]) && (t2 = this[Et](t2)), i2 && (t2 = C(t2, this, v(this, Y, "f").getMiddleware(), false)), t2;
|
|
4786
4312
|
}
|
|
@@ -4809,8 +4335,7 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
4809
4335
|
s4 < t4 && e3.fail(n2("Not enough non-option arguments: got %s, need at least %s", "Not enough non-option arguments: got %s, need at least %s", s4, s4 + "", t4 + ""));
|
|
4810
4336
|
}, requiredArguments: function(t4, s4) {
|
|
4811
4337
|
let i3 = null;
|
|
4812
|
-
for (const e4 of Object.keys(s4))
|
|
4813
|
-
Object.prototype.hasOwnProperty.call(t4, e4) && void 0 !== t4[e4] || (i3 = i3 || {}, i3[e4] = s4[e4]);
|
|
4338
|
+
for (const e4 of Object.keys(s4)) Object.prototype.hasOwnProperty.call(t4, e4) && void 0 !== t4[e4] || (i3 = i3 || {}, i3[e4] = s4[e4]);
|
|
4814
4339
|
if (i3) {
|
|
4815
4340
|
const t5 = [];
|
|
4816
4341
|
for (const e4 of Object.keys(i3)) {
|
|
@@ -4841,22 +4366,19 @@ ${t5.join("\n")}` : "";
|
|
|
4841
4366
|
i3.includes("" + t4) || r3.push("" + t4);
|
|
4842
4367
|
}), r3.length > 0 && (e3.fail(n2("Unknown command: %s", "Unknown commands: %s", r3.length, r3.join(", "))), true);
|
|
4843
4368
|
}, isValidAndSomeAliasIsNotNew: function(e4, s4) {
|
|
4844
|
-
if (!Object.prototype.hasOwnProperty.call(s4, e4))
|
|
4845
|
-
return false;
|
|
4369
|
+
if (!Object.prototype.hasOwnProperty.call(s4, e4)) return false;
|
|
4846
4370
|
const i3 = t3.parsed.newAliases;
|
|
4847
4371
|
return [e4, ...s4[e4]].some((t4) => !Object.prototype.hasOwnProperty.call(i3, t4) || !i3[e4]);
|
|
4848
4372
|
}, limitedChoices: function(s4) {
|
|
4849
4373
|
const n3 = t3.getOptions(), r3 = {};
|
|
4850
|
-
if (!Object.keys(n3.choices).length)
|
|
4851
|
-
return;
|
|
4374
|
+
if (!Object.keys(n3.choices).length) return;
|
|
4852
4375
|
Object.keys(s4).forEach((t4) => {
|
|
4853
4376
|
-1 === H.indexOf(t4) && Object.prototype.hasOwnProperty.call(n3.choices, t4) && [].concat(s4[t4]).forEach((e4) => {
|
|
4854
4377
|
-1 === n3.choices[t4].indexOf(e4) && void 0 !== e4 && (r3[t4] = (r3[t4] || []).concat(e4));
|
|
4855
4378
|
});
|
|
4856
4379
|
});
|
|
4857
4380
|
const o3 = Object.keys(r3);
|
|
4858
|
-
if (!o3.length)
|
|
4859
|
-
return;
|
|
4381
|
+
if (!o3.length) return;
|
|
4860
4382
|
let a3 = i2("Invalid values:");
|
|
4861
4383
|
o3.forEach((t4) => {
|
|
4862
4384
|
a3 += `
|
|
@@ -4944,8 +4466,7 @@ ${t5.join("\n")}` : "";
|
|
|
4944
4466
|
t3 === v(this, Z, "f") && c2[t3] ? p2 = true : t3 === v(this, mt, "f") && c2[t3] && (g2 = true);
|
|
4945
4467
|
}), c2.$0 = this.$0, this.parsed = l2, 0 === n2 && v(this, pt, "f").clearCachedHelpMessage();
|
|
4946
4468
|
try {
|
|
4947
|
-
if (this[kt](), s2)
|
|
4948
|
-
return this[Bt](c2, a2, !!i2, false);
|
|
4469
|
+
if (this[kt](), s2) return this[Bt](c2, a2, !!i2, false);
|
|
4949
4470
|
if (v(this, Z, "f")) {
|
|
4950
4471
|
[v(this, Z, "f")].concat(u2[v(this, Z, "f")] || []).filter((t3) => t3.length > 1).includes("" + c2._[c2._.length - 1]) && (c2._.pop(), p2 = true);
|
|
4951
4472
|
}
|
|
@@ -4976,77 +4497,1247 @@ ${t5.join("\n")}` : "";
|
|
|
4976
4497
|
v(this, T, "f") && E(true);
|
|
4977
4498
|
const s3 = (t2 = [].concat(t2)).slice(t2.indexOf(`--${v(this, U, "f").completionKey}`) + 1);
|
|
4978
4499
|
return v(this, U, "f").getCompletion(s3, (t3, s4) => {
|
|
4979
|
-
if (t3)
|
|
4980
|
-
throw new e(t3.message);
|
|
4500
|
+
if (t3) throw new e(t3.message);
|
|
4981
4501
|
(s4 || []).forEach((t4) => {
|
|
4982
4502
|
v(this, Q, "f").log(t4);
|
|
4983
4503
|
}), this.exit(0);
|
|
4984
4504
|
}), this[Bt](c2, !a2, !!i2, false);
|
|
4985
4505
|
}
|
|
4986
4506
|
if (v(this, J, "f") || (p2 ? (v(this, T, "f") && E(true), o2 = true, this.showHelp("log"), this.exit(0)) : g2 && (v(this, T, "f") && E(true), o2 = true, v(this, pt, "f").showVersion("log"), this.exit(0))), !o2 && v(this, et, "f").skipValidation.length > 0 && (o2 = Object.keys(c2).some((t3) => v(this, et, "f").skipValidation.indexOf(t3) >= 0 && true === c2[t3])), !o2) {
|
|
4987
|
-
if (l2.error)
|
|
4988
|
-
throw new e(l2.error.message);
|
|
4507
|
+
if (l2.error) throw new e(l2.error.message);
|
|
4989
4508
|
if (!m2) {
|
|
4990
4509
|
const t3 = this[Zt](u2, {}, l2.error);
|
|
4991
4510
|
i2 || (d2 = C(c2, this, v(this, Y, "f").getMiddleware(), true)), d2 = this[zt](t3, null != d2 ? d2 : c2), f(d2) && !i2 && (d2 = d2.then(() => C(c2, this, v(this, Y, "f").getMiddleware(), false)));
|
|
4992
4511
|
}
|
|
4993
4512
|
}
|
|
4994
4513
|
} catch (t3) {
|
|
4995
|
-
if (!(t3 instanceof e))
|
|
4996
|
-
throw t3;
|
|
4514
|
+
if (!(t3 instanceof e)) throw t3;
|
|
4997
4515
|
v(this, pt, "f").fail(t3.message, t3);
|
|
4998
4516
|
}
|
|
4999
|
-
return this[Bt](null != d2 ? d2 : c2, a2, !!i2, true);
|
|
5000
|
-
}
|
|
5001
|
-
[Zt](t2, s2, i2, n2) {
|
|
5002
|
-
const r2 = { ...this.getDemandedOptions() };
|
|
5003
|
-
return (o2) => {
|
|
5004
|
-
if (i2)
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
4517
|
+
return this[Bt](null != d2 ? d2 : c2, a2, !!i2, true);
|
|
4518
|
+
}
|
|
4519
|
+
[Zt](t2, s2, i2, n2) {
|
|
4520
|
+
const r2 = { ...this.getDemandedOptions() };
|
|
4521
|
+
return (o2) => {
|
|
4522
|
+
if (i2) throw new e(i2.message);
|
|
4523
|
+
v(this, yt, "f").nonOptionCount(o2), v(this, yt, "f").requiredArguments(o2, r2);
|
|
4524
|
+
let a2 = false;
|
|
4525
|
+
v(this, dt, "f") && (a2 = v(this, yt, "f").unknownCommands(o2)), v(this, ft, "f") && !a2 ? v(this, yt, "f").unknownArguments(o2, t2, s2, !!n2) : v(this, ut, "f") && v(this, yt, "f").unknownArguments(o2, t2, {}, false, false), v(this, yt, "f").limitedChoices(o2), v(this, yt, "f").implications(o2), v(this, yt, "f").conflicting(o2);
|
|
4526
|
+
};
|
|
4527
|
+
}
|
|
4528
|
+
[Xt]() {
|
|
4529
|
+
O(this, J, true, "f");
|
|
4530
|
+
}
|
|
4531
|
+
[Qt](t2) {
|
|
4532
|
+
if ("string" == typeof t2) v(this, et, "f").key[t2] = true;
|
|
4533
|
+
else for (const e2 of t2) v(this, et, "f").key[e2] = true;
|
|
4534
|
+
}
|
|
4535
|
+
};
|
|
4536
|
+
var ee;
|
|
4537
|
+
var se;
|
|
4538
|
+
var { readFileSync: ie } = require("fs");
|
|
4539
|
+
var { inspect: ne } = require("util");
|
|
4540
|
+
var { resolve: re } = require("path");
|
|
4541
|
+
var oe = require_build();
|
|
4542
|
+
var ae = require_build2();
|
|
4543
|
+
var he;
|
|
4544
|
+
var le = { assert: { notStrictEqual: t.notStrictEqual, strictEqual: t.strictEqual }, cliui: require_build3(), findUp: require_sync(), getEnv: (t2) => process.env[t2], getCallerFile: require_get_caller_file(), getProcessArgvBin: y, inspect: ne, mainFilename: null !== (se = null === (ee = null === require || void 0 === require ? void 0 : require.main) || void 0 === ee ? void 0 : ee.filename) && void 0 !== se ? se : process.cwd(), Parser: ae, path: require("path"), process: { argv: () => process.argv, cwd: process.cwd, emitWarning: (t2, e2) => process.emitWarning(t2, e2), execPath: () => process.execPath, exit: (t2) => {
|
|
4545
|
+
process.exit(t2);
|
|
4546
|
+
}, nextTick: process.nextTick, stdColumns: void 0 !== process.stdout.columns ? process.stdout.columns : null }, readFileSync: ie, require, requireDirectory: require_require_directory(), stringWidth: require_string_width(), y18n: oe({ directory: re(__dirname, "../locales"), updateFiles: false }) };
|
|
4547
|
+
var ce = (null === (he = null === process || void 0 === process ? void 0 : process.env) || void 0 === he ? void 0 : he.YARGS_MIN_NODE_VERSION) ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12;
|
|
4548
|
+
if (process && process.version) {
|
|
4549
|
+
if (Number(process.version.match(/v([^.]+)/)[1]) < ce) throw Error(`yargs supports a minimum Node.js version of ${ce}. Read our version support policy: https://github.com/yargs/yargs#supported-nodejs-versions`);
|
|
4550
|
+
}
|
|
4551
|
+
var fe = require_build2();
|
|
4552
|
+
var de;
|
|
4553
|
+
var ue = { applyExtends: n, cjsPlatformShim: le, Yargs: (de = le, (t2 = [], e2 = de.process.cwd(), s2) => {
|
|
4554
|
+
const i2 = new te(t2, e2, s2, de);
|
|
4555
|
+
return Object.defineProperty(i2, "argv", { get: () => i2.parse(), enumerable: true }), i2.help(), i2.version(), i2;
|
|
4556
|
+
}), argsert: h, isPromise: f, objFilter: g, parseCommand: o, Parser: fe, processArgv: b, YError: e };
|
|
4557
|
+
module2.exports = ue;
|
|
4558
|
+
}
|
|
4559
|
+
});
|
|
4560
|
+
|
|
4561
|
+
// ../../node_modules/.pnpm/tmp@0.2.3/node_modules/tmp/lib/tmp.js
|
|
4562
|
+
var require_tmp = __commonJS({
|
|
4563
|
+
"../../node_modules/.pnpm/tmp@0.2.3/node_modules/tmp/lib/tmp.js"(exports2, module2) {
|
|
4564
|
+
"use strict";
|
|
4565
|
+
var fs2 = require("fs");
|
|
4566
|
+
var os = require("os");
|
|
4567
|
+
var path4 = require("path");
|
|
4568
|
+
var crypto = require("crypto");
|
|
4569
|
+
var _c2 = { fs: fs2.constants, os: os.constants };
|
|
4570
|
+
var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
4571
|
+
var TEMPLATE_PATTERN = /XXXXXX/;
|
|
4572
|
+
var DEFAULT_TRIES = 3;
|
|
4573
|
+
var CREATE_FLAGS = (_c2.O_CREAT || _c2.fs.O_CREAT) | (_c2.O_EXCL || _c2.fs.O_EXCL) | (_c2.O_RDWR || _c2.fs.O_RDWR);
|
|
4574
|
+
var IS_WIN32 = os.platform() === "win32";
|
|
4575
|
+
var EBADF = _c2.EBADF || _c2.os.errno.EBADF;
|
|
4576
|
+
var ENOENT = _c2.ENOENT || _c2.os.errno.ENOENT;
|
|
4577
|
+
var DIR_MODE = 448;
|
|
4578
|
+
var FILE_MODE = 384;
|
|
4579
|
+
var EXIT = "exit";
|
|
4580
|
+
var _removeObjects = [];
|
|
4581
|
+
var FN_RMDIR_SYNC = fs2.rmdirSync.bind(fs2);
|
|
4582
|
+
var _gracefulCleanup = false;
|
|
4583
|
+
function rimraf(dirPath, callback) {
|
|
4584
|
+
return fs2.rm(dirPath, { recursive: true }, callback);
|
|
4585
|
+
}
|
|
4586
|
+
function FN_RIMRAF_SYNC(dirPath) {
|
|
4587
|
+
return fs2.rmSync(dirPath, { recursive: true });
|
|
4588
|
+
}
|
|
4589
|
+
function tmpName(options, callback) {
|
|
4590
|
+
const args = _parseArguments(options, callback), opts = args[0], cb = args[1];
|
|
4591
|
+
try {
|
|
4592
|
+
_assertAndSanitizeOptions(opts);
|
|
4593
|
+
} catch (err) {
|
|
4594
|
+
return cb(err);
|
|
4595
|
+
}
|
|
4596
|
+
let tries = opts.tries;
|
|
4597
|
+
(function _getUniqueName() {
|
|
4598
|
+
try {
|
|
4599
|
+
const name = _generateTmpName(opts);
|
|
4600
|
+
fs2.stat(name, function(err) {
|
|
4601
|
+
if (!err) {
|
|
4602
|
+
if (tries-- > 0) return _getUniqueName();
|
|
4603
|
+
return cb(new Error("Could not get a unique tmp filename, max tries reached " + name));
|
|
4604
|
+
}
|
|
4605
|
+
cb(null, name);
|
|
4606
|
+
});
|
|
4607
|
+
} catch (err) {
|
|
4608
|
+
cb(err);
|
|
4609
|
+
}
|
|
4610
|
+
})();
|
|
4611
|
+
}
|
|
4612
|
+
function tmpNameSync(options) {
|
|
4613
|
+
const args = _parseArguments(options), opts = args[0];
|
|
4614
|
+
_assertAndSanitizeOptions(opts);
|
|
4615
|
+
let tries = opts.tries;
|
|
4616
|
+
do {
|
|
4617
|
+
const name = _generateTmpName(opts);
|
|
4618
|
+
try {
|
|
4619
|
+
fs2.statSync(name);
|
|
4620
|
+
} catch (e) {
|
|
4621
|
+
return name;
|
|
4622
|
+
}
|
|
4623
|
+
} while (tries-- > 0);
|
|
4624
|
+
throw new Error("Could not get a unique tmp filename, max tries reached");
|
|
4625
|
+
}
|
|
4626
|
+
function file(options, callback) {
|
|
4627
|
+
const args = _parseArguments(options, callback), opts = args[0], cb = args[1];
|
|
4628
|
+
tmpName(opts, function _tmpNameCreated(err, name) {
|
|
4629
|
+
if (err) return cb(err);
|
|
4630
|
+
fs2.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) {
|
|
4631
|
+
if (err2) return cb(err2);
|
|
4632
|
+
if (opts.discardDescriptor) {
|
|
4633
|
+
return fs2.close(fd, function _discardCallback(possibleErr) {
|
|
4634
|
+
return cb(possibleErr, name, void 0, _prepareTmpFileRemoveCallback(name, -1, opts, false));
|
|
4635
|
+
});
|
|
4636
|
+
} else {
|
|
4637
|
+
const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
|
|
4638
|
+
cb(null, name, fd, _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, false));
|
|
4639
|
+
}
|
|
4640
|
+
});
|
|
4641
|
+
});
|
|
4642
|
+
}
|
|
4643
|
+
function fileSync(options) {
|
|
4644
|
+
const args = _parseArguments(options), opts = args[0];
|
|
4645
|
+
const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
|
|
4646
|
+
const name = tmpNameSync(opts);
|
|
4647
|
+
var fd = fs2.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
|
|
4648
|
+
if (opts.discardDescriptor) {
|
|
4649
|
+
fs2.closeSync(fd);
|
|
4650
|
+
fd = void 0;
|
|
4651
|
+
}
|
|
4652
|
+
return {
|
|
4653
|
+
name,
|
|
4654
|
+
fd,
|
|
4655
|
+
removeCallback: _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, true)
|
|
4656
|
+
};
|
|
4657
|
+
}
|
|
4658
|
+
function dir(options, callback) {
|
|
4659
|
+
const args = _parseArguments(options, callback), opts = args[0], cb = args[1];
|
|
4660
|
+
tmpName(opts, function _tmpNameCreated(err, name) {
|
|
4661
|
+
if (err) return cb(err);
|
|
4662
|
+
fs2.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) {
|
|
4663
|
+
if (err2) return cb(err2);
|
|
4664
|
+
cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false));
|
|
4665
|
+
});
|
|
4666
|
+
});
|
|
4667
|
+
}
|
|
4668
|
+
function dirSync(options) {
|
|
4669
|
+
const args = _parseArguments(options), opts = args[0];
|
|
4670
|
+
const name = tmpNameSync(opts);
|
|
4671
|
+
fs2.mkdirSync(name, opts.mode || DIR_MODE);
|
|
4672
|
+
return {
|
|
4673
|
+
name,
|
|
4674
|
+
removeCallback: _prepareTmpDirRemoveCallback(name, opts, true)
|
|
4675
|
+
};
|
|
4676
|
+
}
|
|
4677
|
+
function _removeFileAsync(fdPath, next) {
|
|
4678
|
+
const _handler = function(err) {
|
|
4679
|
+
if (err && !_isENOENT(err)) {
|
|
4680
|
+
return next(err);
|
|
4681
|
+
}
|
|
4682
|
+
next();
|
|
4683
|
+
};
|
|
4684
|
+
if (0 <= fdPath[0])
|
|
4685
|
+
fs2.close(fdPath[0], function() {
|
|
4686
|
+
fs2.unlink(fdPath[1], _handler);
|
|
4687
|
+
});
|
|
4688
|
+
else fs2.unlink(fdPath[1], _handler);
|
|
4689
|
+
}
|
|
4690
|
+
function _removeFileSync(fdPath) {
|
|
4691
|
+
let rethrownException = null;
|
|
4692
|
+
try {
|
|
4693
|
+
if (0 <= fdPath[0]) fs2.closeSync(fdPath[0]);
|
|
4694
|
+
} catch (e) {
|
|
4695
|
+
if (!_isEBADF(e) && !_isENOENT(e)) throw e;
|
|
4696
|
+
} finally {
|
|
4697
|
+
try {
|
|
4698
|
+
fs2.unlinkSync(fdPath[1]);
|
|
4699
|
+
} catch (e) {
|
|
4700
|
+
if (!_isENOENT(e)) rethrownException = e;
|
|
4701
|
+
}
|
|
4702
|
+
}
|
|
4703
|
+
if (rethrownException !== null) {
|
|
4704
|
+
throw rethrownException;
|
|
4705
|
+
}
|
|
4706
|
+
}
|
|
4707
|
+
function _prepareTmpFileRemoveCallback(name, fd, opts, sync) {
|
|
4708
|
+
const removeCallbackSync = _prepareRemoveCallback(_removeFileSync, [fd, name], sync);
|
|
4709
|
+
const removeCallback = _prepareRemoveCallback(_removeFileAsync, [fd, name], sync, removeCallbackSync);
|
|
4710
|
+
if (!opts.keep) _removeObjects.unshift(removeCallbackSync);
|
|
4711
|
+
return sync ? removeCallbackSync : removeCallback;
|
|
4712
|
+
}
|
|
4713
|
+
function _prepareTmpDirRemoveCallback(name, opts, sync) {
|
|
4714
|
+
const removeFunction = opts.unsafeCleanup ? rimraf : fs2.rmdir.bind(fs2);
|
|
4715
|
+
const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC;
|
|
4716
|
+
const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync);
|
|
4717
|
+
const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync);
|
|
4718
|
+
if (!opts.keep) _removeObjects.unshift(removeCallbackSync);
|
|
4719
|
+
return sync ? removeCallbackSync : removeCallback;
|
|
4720
|
+
}
|
|
4721
|
+
function _prepareRemoveCallback(removeFunction, fileOrDirName, sync, cleanupCallbackSync) {
|
|
4722
|
+
let called = false;
|
|
4723
|
+
return function _cleanupCallback(next) {
|
|
4724
|
+
if (!called) {
|
|
4725
|
+
const toRemove = cleanupCallbackSync || _cleanupCallback;
|
|
4726
|
+
const index = _removeObjects.indexOf(toRemove);
|
|
4727
|
+
if (index >= 0) _removeObjects.splice(index, 1);
|
|
4728
|
+
called = true;
|
|
4729
|
+
if (sync || removeFunction === FN_RMDIR_SYNC || removeFunction === FN_RIMRAF_SYNC) {
|
|
4730
|
+
return removeFunction(fileOrDirName);
|
|
4731
|
+
} else {
|
|
4732
|
+
return removeFunction(fileOrDirName, next || function() {
|
|
4733
|
+
});
|
|
4734
|
+
}
|
|
4735
|
+
}
|
|
4736
|
+
};
|
|
4737
|
+
}
|
|
4738
|
+
function _garbageCollector() {
|
|
4739
|
+
if (!_gracefulCleanup) return;
|
|
4740
|
+
while (_removeObjects.length) {
|
|
4741
|
+
try {
|
|
4742
|
+
_removeObjects[0]();
|
|
4743
|
+
} catch (e) {
|
|
4744
|
+
}
|
|
4745
|
+
}
|
|
4746
|
+
}
|
|
4747
|
+
function _randomChars(howMany) {
|
|
4748
|
+
let value = [], rnd = null;
|
|
4749
|
+
try {
|
|
4750
|
+
rnd = crypto.randomBytes(howMany);
|
|
4751
|
+
} catch (e) {
|
|
4752
|
+
rnd = crypto.pseudoRandomBytes(howMany);
|
|
4753
|
+
}
|
|
4754
|
+
for (var i = 0; i < howMany; i++) {
|
|
4755
|
+
value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]);
|
|
4756
|
+
}
|
|
4757
|
+
return value.join("");
|
|
4758
|
+
}
|
|
4759
|
+
function _isBlank(s) {
|
|
4760
|
+
return s === null || _isUndefined(s) || !s.trim();
|
|
4761
|
+
}
|
|
4762
|
+
function _isUndefined(obj) {
|
|
4763
|
+
return typeof obj === "undefined";
|
|
4764
|
+
}
|
|
4765
|
+
function _parseArguments(options, callback) {
|
|
4766
|
+
if (typeof options === "function") {
|
|
4767
|
+
return [{}, options];
|
|
4768
|
+
}
|
|
4769
|
+
if (_isUndefined(options)) {
|
|
4770
|
+
return [{}, callback];
|
|
4771
|
+
}
|
|
4772
|
+
const actualOptions = {};
|
|
4773
|
+
for (const key of Object.getOwnPropertyNames(options)) {
|
|
4774
|
+
actualOptions[key] = options[key];
|
|
4775
|
+
}
|
|
4776
|
+
return [actualOptions, callback];
|
|
4777
|
+
}
|
|
4778
|
+
function _generateTmpName(opts) {
|
|
4779
|
+
const tmpDir = opts.tmpdir;
|
|
4780
|
+
if (!_isUndefined(opts.name))
|
|
4781
|
+
return path4.join(tmpDir, opts.dir, opts.name);
|
|
4782
|
+
if (!_isUndefined(opts.template))
|
|
4783
|
+
return path4.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6));
|
|
4784
|
+
const name = [
|
|
4785
|
+
opts.prefix ? opts.prefix : "tmp",
|
|
4786
|
+
"-",
|
|
4787
|
+
process.pid,
|
|
4788
|
+
"-",
|
|
4789
|
+
_randomChars(12),
|
|
4790
|
+
opts.postfix ? "-" + opts.postfix : ""
|
|
4791
|
+
].join("");
|
|
4792
|
+
return path4.join(tmpDir, opts.dir, name);
|
|
4793
|
+
}
|
|
4794
|
+
function _assertAndSanitizeOptions(options) {
|
|
4795
|
+
options.tmpdir = _getTmpDir(options);
|
|
4796
|
+
const tmpDir = options.tmpdir;
|
|
4797
|
+
if (!_isUndefined(options.name))
|
|
4798
|
+
_assertIsRelative(options.name, "name", tmpDir);
|
|
4799
|
+
if (!_isUndefined(options.dir))
|
|
4800
|
+
_assertIsRelative(options.dir, "dir", tmpDir);
|
|
4801
|
+
if (!_isUndefined(options.template)) {
|
|
4802
|
+
_assertIsRelative(options.template, "template", tmpDir);
|
|
4803
|
+
if (!options.template.match(TEMPLATE_PATTERN))
|
|
4804
|
+
throw new Error(`Invalid template, found "${options.template}".`);
|
|
4805
|
+
}
|
|
4806
|
+
if (!_isUndefined(options.tries) && isNaN(options.tries) || options.tries < 0)
|
|
4807
|
+
throw new Error(`Invalid tries, found "${options.tries}".`);
|
|
4808
|
+
options.tries = _isUndefined(options.name) ? options.tries || DEFAULT_TRIES : 1;
|
|
4809
|
+
options.keep = !!options.keep;
|
|
4810
|
+
options.detachDescriptor = !!options.detachDescriptor;
|
|
4811
|
+
options.discardDescriptor = !!options.discardDescriptor;
|
|
4812
|
+
options.unsafeCleanup = !!options.unsafeCleanup;
|
|
4813
|
+
options.dir = _isUndefined(options.dir) ? "" : path4.relative(tmpDir, _resolvePath(options.dir, tmpDir));
|
|
4814
|
+
options.template = _isUndefined(options.template) ? void 0 : path4.relative(tmpDir, _resolvePath(options.template, tmpDir));
|
|
4815
|
+
options.template = _isBlank(options.template) ? void 0 : path4.relative(options.dir, options.template);
|
|
4816
|
+
options.name = _isUndefined(options.name) ? void 0 : options.name;
|
|
4817
|
+
options.prefix = _isUndefined(options.prefix) ? "" : options.prefix;
|
|
4818
|
+
options.postfix = _isUndefined(options.postfix) ? "" : options.postfix;
|
|
4819
|
+
}
|
|
4820
|
+
function _resolvePath(name, tmpDir) {
|
|
4821
|
+
if (name.startsWith(tmpDir)) {
|
|
4822
|
+
return path4.resolve(name);
|
|
4823
|
+
} else {
|
|
4824
|
+
return path4.resolve(path4.join(tmpDir, name));
|
|
4825
|
+
}
|
|
4826
|
+
}
|
|
4827
|
+
function _assertIsRelative(name, option, tmpDir) {
|
|
4828
|
+
if (option === "name") {
|
|
4829
|
+
if (path4.isAbsolute(name))
|
|
4830
|
+
throw new Error(`${option} option must not contain an absolute path, found "${name}".`);
|
|
4831
|
+
let basename2 = path4.basename(name);
|
|
4832
|
+
if (basename2 === ".." || basename2 === "." || basename2 !== name)
|
|
4833
|
+
throw new Error(`${option} option must not contain a path, found "${name}".`);
|
|
4834
|
+
} else {
|
|
4835
|
+
if (path4.isAbsolute(name) && !name.startsWith(tmpDir)) {
|
|
4836
|
+
throw new Error(`${option} option must be relative to "${tmpDir}", found "${name}".`);
|
|
4837
|
+
}
|
|
4838
|
+
let resolvedPath = _resolvePath(name, tmpDir);
|
|
4839
|
+
if (!resolvedPath.startsWith(tmpDir))
|
|
4840
|
+
throw new Error(`${option} option must be relative to "${tmpDir}", found "${resolvedPath}".`);
|
|
4841
|
+
}
|
|
4842
|
+
}
|
|
4843
|
+
function _isEBADF(error) {
|
|
4844
|
+
return _isExpectedError(error, -EBADF, "EBADF");
|
|
4845
|
+
}
|
|
4846
|
+
function _isENOENT(error) {
|
|
4847
|
+
return _isExpectedError(error, -ENOENT, "ENOENT");
|
|
4848
|
+
}
|
|
4849
|
+
function _isExpectedError(error, errno, code) {
|
|
4850
|
+
return IS_WIN32 ? error.code === code : error.code === code && error.errno === errno;
|
|
4851
|
+
}
|
|
4852
|
+
function setGracefulCleanup() {
|
|
4853
|
+
_gracefulCleanup = true;
|
|
4854
|
+
}
|
|
4855
|
+
function _getTmpDir(options) {
|
|
4856
|
+
return path4.resolve(options && options.tmpdir || os.tmpdir());
|
|
4857
|
+
}
|
|
4858
|
+
process.addListener(EXIT, _garbageCollector);
|
|
4859
|
+
Object.defineProperty(module2.exports, "tmpdir", {
|
|
4860
|
+
enumerable: true,
|
|
4861
|
+
configurable: false,
|
|
4862
|
+
get: function() {
|
|
4863
|
+
return _getTmpDir();
|
|
4864
|
+
}
|
|
4865
|
+
});
|
|
4866
|
+
module2.exports.dir = dir;
|
|
4867
|
+
module2.exports.dirSync = dirSync;
|
|
4868
|
+
module2.exports.file = file;
|
|
4869
|
+
module2.exports.fileSync = fileSync;
|
|
4870
|
+
module2.exports.tmpName = tmpName;
|
|
4871
|
+
module2.exports.tmpNameSync = tmpNameSync;
|
|
4872
|
+
module2.exports.setGracefulCleanup = setGracefulCleanup;
|
|
4873
|
+
}
|
|
4874
|
+
});
|
|
4875
|
+
|
|
4876
|
+
// ../../node_modules/.pnpm/tmp-promise@3.0.3/node_modules/tmp-promise/index.js
|
|
4877
|
+
var require_tmp_promise = __commonJS({
|
|
4878
|
+
"../../node_modules/.pnpm/tmp-promise@3.0.3/node_modules/tmp-promise/index.js"(exports2, module2) {
|
|
4879
|
+
"use strict";
|
|
4880
|
+
var { promisify } = require("util");
|
|
4881
|
+
var tmp2 = require_tmp();
|
|
4882
|
+
module2.exports.fileSync = tmp2.fileSync;
|
|
4883
|
+
var fileWithOptions = promisify(
|
|
4884
|
+
(options, cb) => tmp2.file(
|
|
4885
|
+
options,
|
|
4886
|
+
(err, path4, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path4, fd, cleanup: promisify(cleanup) })
|
|
4887
|
+
)
|
|
4888
|
+
);
|
|
4889
|
+
module2.exports.file = async (options) => fileWithOptions(options);
|
|
4890
|
+
module2.exports.withFile = async function withFile(fn, options) {
|
|
4891
|
+
const { path: path4, fd, cleanup } = await module2.exports.file(options);
|
|
4892
|
+
try {
|
|
4893
|
+
return await fn({ path: path4, fd });
|
|
4894
|
+
} finally {
|
|
4895
|
+
await cleanup();
|
|
4896
|
+
}
|
|
4897
|
+
};
|
|
4898
|
+
module2.exports.dirSync = tmp2.dirSync;
|
|
4899
|
+
var dirWithOptions = promisify(
|
|
4900
|
+
(options, cb) => tmp2.dir(
|
|
4901
|
+
options,
|
|
4902
|
+
(err, path4, cleanup) => err ? cb(err) : cb(void 0, { path: path4, cleanup: promisify(cleanup) })
|
|
4903
|
+
)
|
|
4904
|
+
);
|
|
4905
|
+
module2.exports.dir = async (options) => dirWithOptions(options);
|
|
4906
|
+
module2.exports.withDir = async function withDir(fn, options) {
|
|
4907
|
+
const { path: path4, cleanup } = await module2.exports.dir(options);
|
|
4908
|
+
try {
|
|
4909
|
+
return await fn({ path: path4 });
|
|
4910
|
+
} finally {
|
|
4911
|
+
await cleanup();
|
|
4912
|
+
}
|
|
4913
|
+
};
|
|
4914
|
+
module2.exports.tmpNameSync = tmp2.tmpNameSync;
|
|
4915
|
+
module2.exports.tmpName = promisify(tmp2.tmpName);
|
|
4916
|
+
module2.exports.tmpdir = tmp2.tmpdir;
|
|
4917
|
+
module2.exports.setGracefulCleanup = tmp2.setGracefulCleanup;
|
|
4918
|
+
}
|
|
4919
|
+
});
|
|
4920
|
+
|
|
4921
|
+
// ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
|
|
4922
|
+
var require_ms = __commonJS({
|
|
4923
|
+
"../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports2, module2) {
|
|
4924
|
+
"use strict";
|
|
4925
|
+
var s = 1e3;
|
|
4926
|
+
var m = s * 60;
|
|
4927
|
+
var h = m * 60;
|
|
4928
|
+
var d = h * 24;
|
|
4929
|
+
var w = d * 7;
|
|
4930
|
+
var y = d * 365.25;
|
|
4931
|
+
module2.exports = function(val, options) {
|
|
4932
|
+
options = options || {};
|
|
4933
|
+
var type = typeof val;
|
|
4934
|
+
if (type === "string" && val.length > 0) {
|
|
4935
|
+
return parse(val);
|
|
4936
|
+
} else if (type === "number" && isFinite(val)) {
|
|
4937
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
|
4938
|
+
}
|
|
4939
|
+
throw new Error(
|
|
4940
|
+
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
|
|
4941
|
+
);
|
|
4942
|
+
};
|
|
4943
|
+
function parse(str) {
|
|
4944
|
+
str = String(str);
|
|
4945
|
+
if (str.length > 100) {
|
|
4946
|
+
return;
|
|
4947
|
+
}
|
|
4948
|
+
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
4949
|
+
str
|
|
4950
|
+
);
|
|
4951
|
+
if (!match) {
|
|
4952
|
+
return;
|
|
4953
|
+
}
|
|
4954
|
+
var n = parseFloat(match[1]);
|
|
4955
|
+
var type = (match[2] || "ms").toLowerCase();
|
|
4956
|
+
switch (type) {
|
|
4957
|
+
case "years":
|
|
4958
|
+
case "year":
|
|
4959
|
+
case "yrs":
|
|
4960
|
+
case "yr":
|
|
4961
|
+
case "y":
|
|
4962
|
+
return n * y;
|
|
4963
|
+
case "weeks":
|
|
4964
|
+
case "week":
|
|
4965
|
+
case "w":
|
|
4966
|
+
return n * w;
|
|
4967
|
+
case "days":
|
|
4968
|
+
case "day":
|
|
4969
|
+
case "d":
|
|
4970
|
+
return n * d;
|
|
4971
|
+
case "hours":
|
|
4972
|
+
case "hour":
|
|
4973
|
+
case "hrs":
|
|
4974
|
+
case "hr":
|
|
4975
|
+
case "h":
|
|
4976
|
+
return n * h;
|
|
4977
|
+
case "minutes":
|
|
4978
|
+
case "minute":
|
|
4979
|
+
case "mins":
|
|
4980
|
+
case "min":
|
|
4981
|
+
case "m":
|
|
4982
|
+
return n * m;
|
|
4983
|
+
case "seconds":
|
|
4984
|
+
case "second":
|
|
4985
|
+
case "secs":
|
|
4986
|
+
case "sec":
|
|
4987
|
+
case "s":
|
|
4988
|
+
return n * s;
|
|
4989
|
+
case "milliseconds":
|
|
4990
|
+
case "millisecond":
|
|
4991
|
+
case "msecs":
|
|
4992
|
+
case "msec":
|
|
4993
|
+
case "ms":
|
|
4994
|
+
return n;
|
|
4995
|
+
default:
|
|
4996
|
+
return void 0;
|
|
4997
|
+
}
|
|
4998
|
+
}
|
|
4999
|
+
function fmtShort(ms) {
|
|
5000
|
+
var msAbs = Math.abs(ms);
|
|
5001
|
+
if (msAbs >= d) {
|
|
5002
|
+
return Math.round(ms / d) + "d";
|
|
5003
|
+
}
|
|
5004
|
+
if (msAbs >= h) {
|
|
5005
|
+
return Math.round(ms / h) + "h";
|
|
5006
|
+
}
|
|
5007
|
+
if (msAbs >= m) {
|
|
5008
|
+
return Math.round(ms / m) + "m";
|
|
5009
|
+
}
|
|
5010
|
+
if (msAbs >= s) {
|
|
5011
|
+
return Math.round(ms / s) + "s";
|
|
5012
|
+
}
|
|
5013
|
+
return ms + "ms";
|
|
5014
|
+
}
|
|
5015
|
+
function fmtLong(ms) {
|
|
5016
|
+
var msAbs = Math.abs(ms);
|
|
5017
|
+
if (msAbs >= d) {
|
|
5018
|
+
return plural(ms, msAbs, d, "day");
|
|
5019
|
+
}
|
|
5020
|
+
if (msAbs >= h) {
|
|
5021
|
+
return plural(ms, msAbs, h, "hour");
|
|
5022
|
+
}
|
|
5023
|
+
if (msAbs >= m) {
|
|
5024
|
+
return plural(ms, msAbs, m, "minute");
|
|
5025
|
+
}
|
|
5026
|
+
if (msAbs >= s) {
|
|
5027
|
+
return plural(ms, msAbs, s, "second");
|
|
5028
|
+
}
|
|
5029
|
+
return ms + " ms";
|
|
5030
|
+
}
|
|
5031
|
+
function plural(ms, msAbs, n, name) {
|
|
5032
|
+
var isPlural = msAbs >= n * 1.5;
|
|
5033
|
+
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
|
5034
|
+
}
|
|
5035
|
+
}
|
|
5036
|
+
});
|
|
5037
|
+
|
|
5038
|
+
// ../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/common.js
|
|
5039
|
+
var require_common = __commonJS({
|
|
5040
|
+
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/common.js"(exports2, module2) {
|
|
5041
|
+
"use strict";
|
|
5042
|
+
function setup(env2) {
|
|
5043
|
+
createDebug.debug = createDebug;
|
|
5044
|
+
createDebug.default = createDebug;
|
|
5045
|
+
createDebug.coerce = coerce;
|
|
5046
|
+
createDebug.disable = disable;
|
|
5047
|
+
createDebug.enable = enable;
|
|
5048
|
+
createDebug.enabled = enabled;
|
|
5049
|
+
createDebug.humanize = require_ms();
|
|
5050
|
+
createDebug.destroy = destroy;
|
|
5051
|
+
Object.keys(env2).forEach((key) => {
|
|
5052
|
+
createDebug[key] = env2[key];
|
|
5053
|
+
});
|
|
5054
|
+
createDebug.names = [];
|
|
5055
|
+
createDebug.skips = [];
|
|
5056
|
+
createDebug.formatters = {};
|
|
5057
|
+
function selectColor(namespace) {
|
|
5058
|
+
let hash = 0;
|
|
5059
|
+
for (let i = 0; i < namespace.length; i++) {
|
|
5060
|
+
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
5061
|
+
hash |= 0;
|
|
5062
|
+
}
|
|
5063
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
5064
|
+
}
|
|
5065
|
+
createDebug.selectColor = selectColor;
|
|
5066
|
+
function createDebug(namespace) {
|
|
5067
|
+
let prevTime;
|
|
5068
|
+
let enableOverride = null;
|
|
5069
|
+
let namespacesCache;
|
|
5070
|
+
let enabledCache;
|
|
5071
|
+
function debug2(...args) {
|
|
5072
|
+
if (!debug2.enabled) {
|
|
5073
|
+
return;
|
|
5074
|
+
}
|
|
5075
|
+
const self = debug2;
|
|
5076
|
+
const curr = Number(/* @__PURE__ */ new Date());
|
|
5077
|
+
const ms = curr - (prevTime || curr);
|
|
5078
|
+
self.diff = ms;
|
|
5079
|
+
self.prev = prevTime;
|
|
5080
|
+
self.curr = curr;
|
|
5081
|
+
prevTime = curr;
|
|
5082
|
+
args[0] = createDebug.coerce(args[0]);
|
|
5083
|
+
if (typeof args[0] !== "string") {
|
|
5084
|
+
args.unshift("%O");
|
|
5085
|
+
}
|
|
5086
|
+
let index = 0;
|
|
5087
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format3) => {
|
|
5088
|
+
if (match === "%%") {
|
|
5089
|
+
return "%";
|
|
5090
|
+
}
|
|
5091
|
+
index++;
|
|
5092
|
+
const formatter = createDebug.formatters[format3];
|
|
5093
|
+
if (typeof formatter === "function") {
|
|
5094
|
+
const val = args[index];
|
|
5095
|
+
match = formatter.call(self, val);
|
|
5096
|
+
args.splice(index, 1);
|
|
5097
|
+
index--;
|
|
5098
|
+
}
|
|
5099
|
+
return match;
|
|
5100
|
+
});
|
|
5101
|
+
createDebug.formatArgs.call(self, args);
|
|
5102
|
+
const logFn = self.log || createDebug.log;
|
|
5103
|
+
logFn.apply(self, args);
|
|
5104
|
+
}
|
|
5105
|
+
debug2.namespace = namespace;
|
|
5106
|
+
debug2.useColors = createDebug.useColors();
|
|
5107
|
+
debug2.color = createDebug.selectColor(namespace);
|
|
5108
|
+
debug2.extend = extend;
|
|
5109
|
+
debug2.destroy = createDebug.destroy;
|
|
5110
|
+
Object.defineProperty(debug2, "enabled", {
|
|
5111
|
+
enumerable: true,
|
|
5112
|
+
configurable: false,
|
|
5113
|
+
get: () => {
|
|
5114
|
+
if (enableOverride !== null) {
|
|
5115
|
+
return enableOverride;
|
|
5116
|
+
}
|
|
5117
|
+
if (namespacesCache !== createDebug.namespaces) {
|
|
5118
|
+
namespacesCache = createDebug.namespaces;
|
|
5119
|
+
enabledCache = createDebug.enabled(namespace);
|
|
5120
|
+
}
|
|
5121
|
+
return enabledCache;
|
|
5122
|
+
},
|
|
5123
|
+
set: (v) => {
|
|
5124
|
+
enableOverride = v;
|
|
5125
|
+
}
|
|
5126
|
+
});
|
|
5127
|
+
if (typeof createDebug.init === "function") {
|
|
5128
|
+
createDebug.init(debug2);
|
|
5129
|
+
}
|
|
5130
|
+
return debug2;
|
|
5131
|
+
}
|
|
5132
|
+
function extend(namespace, delimiter) {
|
|
5133
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
5134
|
+
newDebug.log = this.log;
|
|
5135
|
+
return newDebug;
|
|
5136
|
+
}
|
|
5137
|
+
function enable(namespaces) {
|
|
5138
|
+
createDebug.save(namespaces);
|
|
5139
|
+
createDebug.namespaces = namespaces;
|
|
5140
|
+
createDebug.names = [];
|
|
5141
|
+
createDebug.skips = [];
|
|
5142
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
|
|
5143
|
+
for (const ns of split) {
|
|
5144
|
+
if (ns[0] === "-") {
|
|
5145
|
+
createDebug.skips.push(ns.slice(1));
|
|
5146
|
+
} else {
|
|
5147
|
+
createDebug.names.push(ns);
|
|
5148
|
+
}
|
|
5149
|
+
}
|
|
5150
|
+
}
|
|
5151
|
+
function matchesTemplate(search, template) {
|
|
5152
|
+
let searchIndex = 0;
|
|
5153
|
+
let templateIndex = 0;
|
|
5154
|
+
let starIndex = -1;
|
|
5155
|
+
let matchIndex = 0;
|
|
5156
|
+
while (searchIndex < search.length) {
|
|
5157
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
5158
|
+
if (template[templateIndex] === "*") {
|
|
5159
|
+
starIndex = templateIndex;
|
|
5160
|
+
matchIndex = searchIndex;
|
|
5161
|
+
templateIndex++;
|
|
5162
|
+
} else {
|
|
5163
|
+
searchIndex++;
|
|
5164
|
+
templateIndex++;
|
|
5165
|
+
}
|
|
5166
|
+
} else if (starIndex !== -1) {
|
|
5167
|
+
templateIndex = starIndex + 1;
|
|
5168
|
+
matchIndex++;
|
|
5169
|
+
searchIndex = matchIndex;
|
|
5170
|
+
} else {
|
|
5171
|
+
return false;
|
|
5172
|
+
}
|
|
5173
|
+
}
|
|
5174
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
5175
|
+
templateIndex++;
|
|
5176
|
+
}
|
|
5177
|
+
return templateIndex === template.length;
|
|
5178
|
+
}
|
|
5179
|
+
function disable() {
|
|
5180
|
+
const namespaces = [
|
|
5181
|
+
...createDebug.names,
|
|
5182
|
+
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
5183
|
+
].join(",");
|
|
5184
|
+
createDebug.enable("");
|
|
5185
|
+
return namespaces;
|
|
5186
|
+
}
|
|
5187
|
+
function enabled(name) {
|
|
5188
|
+
for (const skip of createDebug.skips) {
|
|
5189
|
+
if (matchesTemplate(name, skip)) {
|
|
5190
|
+
return false;
|
|
5191
|
+
}
|
|
5192
|
+
}
|
|
5193
|
+
for (const ns of createDebug.names) {
|
|
5194
|
+
if (matchesTemplate(name, ns)) {
|
|
5195
|
+
return true;
|
|
5196
|
+
}
|
|
5197
|
+
}
|
|
5198
|
+
return false;
|
|
5199
|
+
}
|
|
5200
|
+
function coerce(val) {
|
|
5201
|
+
if (val instanceof Error) {
|
|
5202
|
+
return val.stack || val.message;
|
|
5203
|
+
}
|
|
5204
|
+
return val;
|
|
5205
|
+
}
|
|
5206
|
+
function destroy() {
|
|
5207
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
5208
|
+
}
|
|
5209
|
+
createDebug.enable(createDebug.load());
|
|
5210
|
+
return createDebug;
|
|
5211
|
+
}
|
|
5212
|
+
module2.exports = setup;
|
|
5213
|
+
}
|
|
5214
|
+
});
|
|
5215
|
+
|
|
5216
|
+
// ../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/browser.js
|
|
5217
|
+
var require_browser = __commonJS({
|
|
5218
|
+
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
5219
|
+
"use strict";
|
|
5220
|
+
exports2.formatArgs = formatArgs;
|
|
5221
|
+
exports2.save = save;
|
|
5222
|
+
exports2.load = load;
|
|
5223
|
+
exports2.useColors = useColors;
|
|
5224
|
+
exports2.storage = localstorage();
|
|
5225
|
+
exports2.destroy = /* @__PURE__ */ (() => {
|
|
5226
|
+
let warned = false;
|
|
5227
|
+
return () => {
|
|
5228
|
+
if (!warned) {
|
|
5229
|
+
warned = true;
|
|
5230
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
5231
|
+
}
|
|
5232
|
+
};
|
|
5233
|
+
})();
|
|
5234
|
+
exports2.colors = [
|
|
5235
|
+
"#0000CC",
|
|
5236
|
+
"#0000FF",
|
|
5237
|
+
"#0033CC",
|
|
5238
|
+
"#0033FF",
|
|
5239
|
+
"#0066CC",
|
|
5240
|
+
"#0066FF",
|
|
5241
|
+
"#0099CC",
|
|
5242
|
+
"#0099FF",
|
|
5243
|
+
"#00CC00",
|
|
5244
|
+
"#00CC33",
|
|
5245
|
+
"#00CC66",
|
|
5246
|
+
"#00CC99",
|
|
5247
|
+
"#00CCCC",
|
|
5248
|
+
"#00CCFF",
|
|
5249
|
+
"#3300CC",
|
|
5250
|
+
"#3300FF",
|
|
5251
|
+
"#3333CC",
|
|
5252
|
+
"#3333FF",
|
|
5253
|
+
"#3366CC",
|
|
5254
|
+
"#3366FF",
|
|
5255
|
+
"#3399CC",
|
|
5256
|
+
"#3399FF",
|
|
5257
|
+
"#33CC00",
|
|
5258
|
+
"#33CC33",
|
|
5259
|
+
"#33CC66",
|
|
5260
|
+
"#33CC99",
|
|
5261
|
+
"#33CCCC",
|
|
5262
|
+
"#33CCFF",
|
|
5263
|
+
"#6600CC",
|
|
5264
|
+
"#6600FF",
|
|
5265
|
+
"#6633CC",
|
|
5266
|
+
"#6633FF",
|
|
5267
|
+
"#66CC00",
|
|
5268
|
+
"#66CC33",
|
|
5269
|
+
"#9900CC",
|
|
5270
|
+
"#9900FF",
|
|
5271
|
+
"#9933CC",
|
|
5272
|
+
"#9933FF",
|
|
5273
|
+
"#99CC00",
|
|
5274
|
+
"#99CC33",
|
|
5275
|
+
"#CC0000",
|
|
5276
|
+
"#CC0033",
|
|
5277
|
+
"#CC0066",
|
|
5278
|
+
"#CC0099",
|
|
5279
|
+
"#CC00CC",
|
|
5280
|
+
"#CC00FF",
|
|
5281
|
+
"#CC3300",
|
|
5282
|
+
"#CC3333",
|
|
5283
|
+
"#CC3366",
|
|
5284
|
+
"#CC3399",
|
|
5285
|
+
"#CC33CC",
|
|
5286
|
+
"#CC33FF",
|
|
5287
|
+
"#CC6600",
|
|
5288
|
+
"#CC6633",
|
|
5289
|
+
"#CC9900",
|
|
5290
|
+
"#CC9933",
|
|
5291
|
+
"#CCCC00",
|
|
5292
|
+
"#CCCC33",
|
|
5293
|
+
"#FF0000",
|
|
5294
|
+
"#FF0033",
|
|
5295
|
+
"#FF0066",
|
|
5296
|
+
"#FF0099",
|
|
5297
|
+
"#FF00CC",
|
|
5298
|
+
"#FF00FF",
|
|
5299
|
+
"#FF3300",
|
|
5300
|
+
"#FF3333",
|
|
5301
|
+
"#FF3366",
|
|
5302
|
+
"#FF3399",
|
|
5303
|
+
"#FF33CC",
|
|
5304
|
+
"#FF33FF",
|
|
5305
|
+
"#FF6600",
|
|
5306
|
+
"#FF6633",
|
|
5307
|
+
"#FF9900",
|
|
5308
|
+
"#FF9933",
|
|
5309
|
+
"#FFCC00",
|
|
5310
|
+
"#FFCC33"
|
|
5311
|
+
];
|
|
5312
|
+
function useColors() {
|
|
5313
|
+
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
5314
|
+
return true;
|
|
5315
|
+
}
|
|
5316
|
+
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
5317
|
+
return false;
|
|
5318
|
+
}
|
|
5319
|
+
let m;
|
|
5320
|
+
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
5321
|
+
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
5322
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
5323
|
+
typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
5324
|
+
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
5325
|
+
}
|
|
5326
|
+
function formatArgs(args) {
|
|
5327
|
+
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
|
|
5328
|
+
if (!this.useColors) {
|
|
5329
|
+
return;
|
|
5330
|
+
}
|
|
5331
|
+
const c = "color: " + this.color;
|
|
5332
|
+
args.splice(1, 0, c, "color: inherit");
|
|
5333
|
+
let index = 0;
|
|
5334
|
+
let lastC = 0;
|
|
5335
|
+
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
5336
|
+
if (match === "%%") {
|
|
5337
|
+
return;
|
|
5338
|
+
}
|
|
5339
|
+
index++;
|
|
5340
|
+
if (match === "%c") {
|
|
5341
|
+
lastC = index;
|
|
5342
|
+
}
|
|
5343
|
+
});
|
|
5344
|
+
args.splice(lastC, 0, c);
|
|
5345
|
+
}
|
|
5346
|
+
exports2.log = console.debug || console.log || (() => {
|
|
5347
|
+
});
|
|
5348
|
+
function save(namespaces) {
|
|
5349
|
+
try {
|
|
5350
|
+
if (namespaces) {
|
|
5351
|
+
exports2.storage.setItem("debug", namespaces);
|
|
5352
|
+
} else {
|
|
5353
|
+
exports2.storage.removeItem("debug");
|
|
5354
|
+
}
|
|
5355
|
+
} catch (error) {
|
|
5356
|
+
}
|
|
5357
|
+
}
|
|
5358
|
+
function load() {
|
|
5359
|
+
let r;
|
|
5360
|
+
try {
|
|
5361
|
+
r = exports2.storage.getItem("debug");
|
|
5362
|
+
} catch (error) {
|
|
5363
|
+
}
|
|
5364
|
+
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
5365
|
+
r = process.env.DEBUG;
|
|
5366
|
+
}
|
|
5367
|
+
return r;
|
|
5368
|
+
}
|
|
5369
|
+
function localstorage() {
|
|
5370
|
+
try {
|
|
5371
|
+
return localStorage;
|
|
5372
|
+
} catch (error) {
|
|
5373
|
+
}
|
|
5374
|
+
}
|
|
5375
|
+
module2.exports = require_common()(exports2);
|
|
5376
|
+
var { formatters } = module2.exports;
|
|
5377
|
+
formatters.j = function(v) {
|
|
5378
|
+
try {
|
|
5379
|
+
return JSON.stringify(v);
|
|
5380
|
+
} catch (error) {
|
|
5381
|
+
return "[UnexpectedJSONParseError]: " + error.message;
|
|
5382
|
+
}
|
|
5383
|
+
};
|
|
5384
|
+
}
|
|
5385
|
+
});
|
|
5386
|
+
|
|
5387
|
+
// ../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
|
|
5388
|
+
var require_has_flag = __commonJS({
|
|
5389
|
+
"../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports2, module2) {
|
|
5390
|
+
"use strict";
|
|
5391
|
+
module2.exports = (flag, argv) => {
|
|
5392
|
+
argv = argv || process.argv;
|
|
5393
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
5394
|
+
const pos = argv.indexOf(prefix + flag);
|
|
5395
|
+
const terminatorPos = argv.indexOf("--");
|
|
5396
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
5397
|
+
};
|
|
5398
|
+
}
|
|
5399
|
+
});
|
|
5400
|
+
|
|
5401
|
+
// ../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
|
|
5402
|
+
var require_supports_color = __commonJS({
|
|
5403
|
+
"../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports2, module2) {
|
|
5404
|
+
"use strict";
|
|
5405
|
+
var os = require("os");
|
|
5406
|
+
var hasFlag = require_has_flag();
|
|
5407
|
+
var env2 = process.env;
|
|
5408
|
+
var forceColor;
|
|
5409
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
5410
|
+
forceColor = false;
|
|
5411
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
5412
|
+
forceColor = true;
|
|
5413
|
+
}
|
|
5414
|
+
if ("FORCE_COLOR" in env2) {
|
|
5415
|
+
forceColor = env2.FORCE_COLOR.length === 0 || parseInt(env2.FORCE_COLOR, 10) !== 0;
|
|
5416
|
+
}
|
|
5417
|
+
function translateLevel(level) {
|
|
5418
|
+
if (level === 0) {
|
|
5419
|
+
return false;
|
|
5420
|
+
}
|
|
5421
|
+
return {
|
|
5422
|
+
level,
|
|
5423
|
+
hasBasic: true,
|
|
5424
|
+
has256: level >= 2,
|
|
5425
|
+
has16m: level >= 3
|
|
5426
|
+
};
|
|
5427
|
+
}
|
|
5428
|
+
function supportsColor(stream) {
|
|
5429
|
+
if (forceColor === false) {
|
|
5430
|
+
return 0;
|
|
5431
|
+
}
|
|
5432
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
5433
|
+
return 3;
|
|
5434
|
+
}
|
|
5435
|
+
if (hasFlag("color=256")) {
|
|
5436
|
+
return 2;
|
|
5437
|
+
}
|
|
5438
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
5439
|
+
return 0;
|
|
5440
|
+
}
|
|
5441
|
+
const min = forceColor ? 1 : 0;
|
|
5442
|
+
if (process.platform === "win32") {
|
|
5443
|
+
const osRelease = os.release().split(".");
|
|
5444
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
5445
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
5446
|
+
}
|
|
5447
|
+
return 1;
|
|
5448
|
+
}
|
|
5449
|
+
if ("CI" in env2) {
|
|
5450
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
|
|
5451
|
+
return 1;
|
|
5452
|
+
}
|
|
5453
|
+
return min;
|
|
5454
|
+
}
|
|
5455
|
+
if ("TEAMCITY_VERSION" in env2) {
|
|
5456
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
|
|
5457
|
+
}
|
|
5458
|
+
if (env2.COLORTERM === "truecolor") {
|
|
5459
|
+
return 3;
|
|
5460
|
+
}
|
|
5461
|
+
if ("TERM_PROGRAM" in env2) {
|
|
5462
|
+
const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
5463
|
+
switch (env2.TERM_PROGRAM) {
|
|
5464
|
+
case "iTerm.app":
|
|
5465
|
+
return version >= 3 ? 3 : 2;
|
|
5466
|
+
case "Apple_Terminal":
|
|
5467
|
+
return 2;
|
|
5468
|
+
}
|
|
5469
|
+
}
|
|
5470
|
+
if (/-256(color)?$/i.test(env2.TERM)) {
|
|
5471
|
+
return 2;
|
|
5472
|
+
}
|
|
5473
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
|
|
5474
|
+
return 1;
|
|
5475
|
+
}
|
|
5476
|
+
if ("COLORTERM" in env2) {
|
|
5477
|
+
return 1;
|
|
5478
|
+
}
|
|
5479
|
+
if (env2.TERM === "dumb") {
|
|
5480
|
+
return min;
|
|
5481
|
+
}
|
|
5482
|
+
return min;
|
|
5483
|
+
}
|
|
5484
|
+
function getSupportLevel(stream) {
|
|
5485
|
+
const level = supportsColor(stream);
|
|
5486
|
+
return translateLevel(level);
|
|
5487
|
+
}
|
|
5488
|
+
module2.exports = {
|
|
5489
|
+
supportsColor: getSupportLevel,
|
|
5490
|
+
stdout: getSupportLevel(process.stdout),
|
|
5491
|
+
stderr: getSupportLevel(process.stderr)
|
|
5492
|
+
};
|
|
5493
|
+
}
|
|
5494
|
+
});
|
|
5495
|
+
|
|
5496
|
+
// ../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/node.js
|
|
5497
|
+
var require_node = __commonJS({
|
|
5498
|
+
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/node.js"(exports2, module2) {
|
|
5499
|
+
"use strict";
|
|
5500
|
+
var tty = require("tty");
|
|
5501
|
+
var util = require("util");
|
|
5502
|
+
exports2.init = init;
|
|
5503
|
+
exports2.log = log;
|
|
5504
|
+
exports2.formatArgs = formatArgs;
|
|
5505
|
+
exports2.save = save;
|
|
5506
|
+
exports2.load = load;
|
|
5507
|
+
exports2.useColors = useColors;
|
|
5508
|
+
exports2.destroy = util.deprecate(
|
|
5509
|
+
() => {
|
|
5510
|
+
},
|
|
5511
|
+
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
|
5512
|
+
);
|
|
5513
|
+
exports2.colors = [6, 2, 3, 4, 5, 1];
|
|
5514
|
+
try {
|
|
5515
|
+
const supportsColor = require_supports_color();
|
|
5516
|
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
5517
|
+
exports2.colors = [
|
|
5518
|
+
20,
|
|
5519
|
+
21,
|
|
5520
|
+
26,
|
|
5521
|
+
27,
|
|
5522
|
+
32,
|
|
5523
|
+
33,
|
|
5524
|
+
38,
|
|
5525
|
+
39,
|
|
5526
|
+
40,
|
|
5527
|
+
41,
|
|
5528
|
+
42,
|
|
5529
|
+
43,
|
|
5530
|
+
44,
|
|
5531
|
+
45,
|
|
5532
|
+
56,
|
|
5533
|
+
57,
|
|
5534
|
+
62,
|
|
5535
|
+
63,
|
|
5536
|
+
68,
|
|
5537
|
+
69,
|
|
5538
|
+
74,
|
|
5539
|
+
75,
|
|
5540
|
+
76,
|
|
5541
|
+
77,
|
|
5542
|
+
78,
|
|
5543
|
+
79,
|
|
5544
|
+
80,
|
|
5545
|
+
81,
|
|
5546
|
+
92,
|
|
5547
|
+
93,
|
|
5548
|
+
98,
|
|
5549
|
+
99,
|
|
5550
|
+
112,
|
|
5551
|
+
113,
|
|
5552
|
+
128,
|
|
5553
|
+
129,
|
|
5554
|
+
134,
|
|
5555
|
+
135,
|
|
5556
|
+
148,
|
|
5557
|
+
149,
|
|
5558
|
+
160,
|
|
5559
|
+
161,
|
|
5560
|
+
162,
|
|
5561
|
+
163,
|
|
5562
|
+
164,
|
|
5563
|
+
165,
|
|
5564
|
+
166,
|
|
5565
|
+
167,
|
|
5566
|
+
168,
|
|
5567
|
+
169,
|
|
5568
|
+
170,
|
|
5569
|
+
171,
|
|
5570
|
+
172,
|
|
5571
|
+
173,
|
|
5572
|
+
178,
|
|
5573
|
+
179,
|
|
5574
|
+
184,
|
|
5575
|
+
185,
|
|
5576
|
+
196,
|
|
5577
|
+
197,
|
|
5578
|
+
198,
|
|
5579
|
+
199,
|
|
5580
|
+
200,
|
|
5581
|
+
201,
|
|
5582
|
+
202,
|
|
5583
|
+
203,
|
|
5584
|
+
204,
|
|
5585
|
+
205,
|
|
5586
|
+
206,
|
|
5587
|
+
207,
|
|
5588
|
+
208,
|
|
5589
|
+
209,
|
|
5590
|
+
214,
|
|
5591
|
+
215,
|
|
5592
|
+
220,
|
|
5593
|
+
221
|
|
5594
|
+
];
|
|
5595
|
+
}
|
|
5596
|
+
} catch (error) {
|
|
5597
|
+
}
|
|
5598
|
+
exports2.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
5599
|
+
return /^debug_/i.test(key);
|
|
5600
|
+
}).reduce((obj, key) => {
|
|
5601
|
+
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
|
|
5602
|
+
return k.toUpperCase();
|
|
5603
|
+
});
|
|
5604
|
+
let val = process.env[key];
|
|
5605
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
5606
|
+
val = true;
|
|
5607
|
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
5608
|
+
val = false;
|
|
5609
|
+
} else if (val === "null") {
|
|
5610
|
+
val = null;
|
|
5611
|
+
} else {
|
|
5612
|
+
val = Number(val);
|
|
5613
|
+
}
|
|
5614
|
+
obj[prop] = val;
|
|
5615
|
+
return obj;
|
|
5616
|
+
}, {});
|
|
5617
|
+
function useColors() {
|
|
5618
|
+
return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
5619
|
+
}
|
|
5620
|
+
function formatArgs(args) {
|
|
5621
|
+
const { namespace: name, useColors: useColors2 } = this;
|
|
5622
|
+
if (useColors2) {
|
|
5623
|
+
const c = this.color;
|
|
5624
|
+
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
5625
|
+
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
5626
|
+
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
5627
|
+
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
|
|
5628
|
+
} else {
|
|
5629
|
+
args[0] = getDate() + name + " " + args[0];
|
|
5630
|
+
}
|
|
5631
|
+
}
|
|
5632
|
+
function getDate() {
|
|
5633
|
+
if (exports2.inspectOpts.hideDate) {
|
|
5634
|
+
return "";
|
|
5635
|
+
}
|
|
5636
|
+
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
5637
|
+
}
|
|
5638
|
+
function log(...args) {
|
|
5639
|
+
return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
|
|
5640
|
+
}
|
|
5641
|
+
function save(namespaces) {
|
|
5642
|
+
if (namespaces) {
|
|
5643
|
+
process.env.DEBUG = namespaces;
|
|
5644
|
+
} else {
|
|
5645
|
+
delete process.env.DEBUG;
|
|
5646
|
+
}
|
|
5647
|
+
}
|
|
5648
|
+
function load() {
|
|
5649
|
+
return process.env.DEBUG;
|
|
5650
|
+
}
|
|
5651
|
+
function init(debug2) {
|
|
5652
|
+
debug2.inspectOpts = {};
|
|
5653
|
+
const keys = Object.keys(exports2.inspectOpts);
|
|
5654
|
+
for (let i = 0; i < keys.length; i++) {
|
|
5655
|
+
debug2.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
|
|
5656
|
+
}
|
|
5657
|
+
}
|
|
5658
|
+
module2.exports = require_common()(exports2);
|
|
5659
|
+
var { formatters } = module2.exports;
|
|
5660
|
+
formatters.o = function(v) {
|
|
5661
|
+
this.inspectOpts.colors = this.useColors;
|
|
5662
|
+
return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
5663
|
+
};
|
|
5664
|
+
formatters.O = function(v) {
|
|
5665
|
+
this.inspectOpts.colors = this.useColors;
|
|
5666
|
+
return util.inspect(v, this.inspectOpts);
|
|
5667
|
+
};
|
|
5668
|
+
}
|
|
5669
|
+
});
|
|
5670
|
+
|
|
5671
|
+
// ../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js
|
|
5672
|
+
var require_src = __commonJS({
|
|
5673
|
+
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js"(exports2, module2) {
|
|
5674
|
+
"use strict";
|
|
5675
|
+
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
5676
|
+
module2.exports = require_browser();
|
|
5677
|
+
} else {
|
|
5678
|
+
module2.exports = require_node();
|
|
5679
|
+
}
|
|
5680
|
+
}
|
|
5681
|
+
});
|
|
5682
|
+
|
|
5683
|
+
// ../../node_modules/.pnpm/@kwsites+file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/src/index.js
|
|
5684
|
+
var require_src2 = __commonJS({
|
|
5685
|
+
"../../node_modules/.pnpm/@kwsites+file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/src/index.js"(exports2) {
|
|
5686
|
+
"use strict";
|
|
5687
|
+
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
5688
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
5689
|
+
};
|
|
5690
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5691
|
+
var fs_1 = require("fs");
|
|
5692
|
+
var debug_1 = __importDefault(require_src());
|
|
5693
|
+
var log = debug_1.default("@kwsites/file-exists");
|
|
5694
|
+
function check(path4, isFile, isDirectory) {
|
|
5695
|
+
log(`checking %s`, path4);
|
|
5696
|
+
try {
|
|
5697
|
+
const stat = fs_1.statSync(path4);
|
|
5698
|
+
if (stat.isFile() && isFile) {
|
|
5699
|
+
log(`[OK] path represents a file`);
|
|
5700
|
+
return true;
|
|
5701
|
+
}
|
|
5702
|
+
if (stat.isDirectory() && isDirectory) {
|
|
5703
|
+
log(`[OK] path represents a directory`);
|
|
5704
|
+
return true;
|
|
5705
|
+
}
|
|
5706
|
+
log(`[FAIL] path represents something other than a file or directory`);
|
|
5707
|
+
return false;
|
|
5708
|
+
} catch (e) {
|
|
5709
|
+
if (e.code === "ENOENT") {
|
|
5710
|
+
log(`[FAIL] path is not accessible: %o`, e);
|
|
5711
|
+
return false;
|
|
5712
|
+
}
|
|
5713
|
+
log(`[FATAL] %o`, e);
|
|
5714
|
+
throw e;
|
|
5020
5715
|
}
|
|
5021
|
-
};
|
|
5022
|
-
var ee;
|
|
5023
|
-
var se;
|
|
5024
|
-
var { readFileSync: ie } = require("fs");
|
|
5025
|
-
var { inspect: ne } = require("util");
|
|
5026
|
-
var { resolve: re } = require("path");
|
|
5027
|
-
var oe = require_build();
|
|
5028
|
-
var ae = require_build2();
|
|
5029
|
-
var he;
|
|
5030
|
-
var le = { assert: { notStrictEqual: t.notStrictEqual, strictEqual: t.strictEqual }, cliui: require_build3(), findUp: require_sync(), getEnv: (t2) => process.env[t2], getCallerFile: require_get_caller_file(), getProcessArgvBin: y, inspect: ne, mainFilename: null !== (se = null === (ee = null === require || void 0 === require ? void 0 : require.main) || void 0 === ee ? void 0 : ee.filename) && void 0 !== se ? se : process.cwd(), Parser: ae, path: require("path"), process: { argv: () => process.argv, cwd: process.cwd, emitWarning: (t2, e2) => process.emitWarning(t2, e2), execPath: () => process.execPath, exit: (t2) => {
|
|
5031
|
-
process.exit(t2);
|
|
5032
|
-
}, nextTick: process.nextTick, stdColumns: void 0 !== process.stdout.columns ? process.stdout.columns : null }, readFileSync: ie, require, requireDirectory: require_require_directory(), stringWidth: require_string_width(), y18n: oe({ directory: re(__dirname, "../locales"), updateFiles: false }) };
|
|
5033
|
-
var ce = (null === (he = null === process || void 0 === process ? void 0 : process.env) || void 0 === he ? void 0 : he.YARGS_MIN_NODE_VERSION) ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12;
|
|
5034
|
-
if (process && process.version) {
|
|
5035
|
-
if (Number(process.version.match(/v([^.]+)/)[1]) < ce)
|
|
5036
|
-
throw Error(`yargs supports a minimum Node.js version of ${ce}. Read our version support policy: https://github.com/yargs/yargs#supported-nodejs-versions`);
|
|
5037
5716
|
}
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5717
|
+
function exists2(path4, type = exports2.READABLE) {
|
|
5718
|
+
return check(path4, (type & exports2.FILE) > 0, (type & exports2.FOLDER) > 0);
|
|
5719
|
+
}
|
|
5720
|
+
exports2.exists = exists2;
|
|
5721
|
+
exports2.FILE = 1;
|
|
5722
|
+
exports2.FOLDER = 2;
|
|
5723
|
+
exports2.READABLE = exports2.FILE + exports2.FOLDER;
|
|
5724
|
+
}
|
|
5725
|
+
});
|
|
5726
|
+
|
|
5727
|
+
// ../../node_modules/.pnpm/@kwsites+file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/index.js
|
|
5728
|
+
var require_dist = __commonJS({
|
|
5729
|
+
"../../node_modules/.pnpm/@kwsites+file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/index.js"(exports2) {
|
|
5730
|
+
"use strict";
|
|
5731
|
+
function __export3(m) {
|
|
5732
|
+
for (var p in m) if (!exports2.hasOwnProperty(p)) exports2[p] = m[p];
|
|
5733
|
+
}
|
|
5734
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5735
|
+
__export3(require_src2());
|
|
5045
5736
|
}
|
|
5046
5737
|
});
|
|
5047
5738
|
|
|
5048
5739
|
// ../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
|
|
5049
|
-
var
|
|
5740
|
+
var require_ms2 = __commonJS({
|
|
5050
5741
|
"../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports2, module2) {
|
|
5051
5742
|
"use strict";
|
|
5052
5743
|
var s = 1e3;
|
|
@@ -5163,7 +5854,7 @@ var require_ms = __commonJS({
|
|
|
5163
5854
|
});
|
|
5164
5855
|
|
|
5165
5856
|
// ../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/common.js
|
|
5166
|
-
var
|
|
5857
|
+
var require_common2 = __commonJS({
|
|
5167
5858
|
"../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/common.js"(exports2, module2) {
|
|
5168
5859
|
"use strict";
|
|
5169
5860
|
function setup(env2) {
|
|
@@ -5173,7 +5864,7 @@ var require_common = __commonJS({
|
|
|
5173
5864
|
createDebug.disable = disable;
|
|
5174
5865
|
createDebug.enable = enable;
|
|
5175
5866
|
createDebug.enabled = enabled;
|
|
5176
|
-
createDebug.humanize =
|
|
5867
|
+
createDebug.humanize = require_ms2();
|
|
5177
5868
|
createDebug.destroy = destroy;
|
|
5178
5869
|
Object.keys(env2).forEach((key) => {
|
|
5179
5870
|
createDebug[key] = env2[key];
|
|
@@ -5199,12 +5890,12 @@ var require_common = __commonJS({
|
|
|
5199
5890
|
if (!debug2.enabled) {
|
|
5200
5891
|
return;
|
|
5201
5892
|
}
|
|
5202
|
-
const
|
|
5893
|
+
const self = debug2;
|
|
5203
5894
|
const curr = Number(/* @__PURE__ */ new Date());
|
|
5204
5895
|
const ms = curr - (prevTime || curr);
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5896
|
+
self.diff = ms;
|
|
5897
|
+
self.prev = prevTime;
|
|
5898
|
+
self.curr = curr;
|
|
5208
5899
|
prevTime = curr;
|
|
5209
5900
|
args[0] = createDebug.coerce(args[0]);
|
|
5210
5901
|
if (typeof args[0] !== "string") {
|
|
@@ -5219,15 +5910,15 @@ var require_common = __commonJS({
|
|
|
5219
5910
|
const formatter = createDebug.formatters[format3];
|
|
5220
5911
|
if (typeof formatter === "function") {
|
|
5221
5912
|
const val = args[index];
|
|
5222
|
-
match = formatter.call(
|
|
5913
|
+
match = formatter.call(self, val);
|
|
5223
5914
|
args.splice(index, 1);
|
|
5224
5915
|
index--;
|
|
5225
5916
|
}
|
|
5226
5917
|
return match;
|
|
5227
5918
|
});
|
|
5228
|
-
createDebug.formatArgs.call(
|
|
5229
|
-
const logFn =
|
|
5230
|
-
logFn.apply(
|
|
5919
|
+
createDebug.formatArgs.call(self, args);
|
|
5920
|
+
const logFn = self.log || createDebug.log;
|
|
5921
|
+
logFn.apply(self, args);
|
|
5231
5922
|
}
|
|
5232
5923
|
debug2.namespace = namespace;
|
|
5233
5924
|
debug2.useColors = createDebug.useColors();
|
|
@@ -5327,7 +6018,7 @@ var require_common = __commonJS({
|
|
|
5327
6018
|
});
|
|
5328
6019
|
|
|
5329
6020
|
// ../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/browser.js
|
|
5330
|
-
var
|
|
6021
|
+
var require_browser2 = __commonJS({
|
|
5331
6022
|
"../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
5332
6023
|
"use strict";
|
|
5333
6024
|
exports2.formatArgs = formatArgs;
|
|
@@ -5484,7 +6175,7 @@ var require_browser = __commonJS({
|
|
|
5484
6175
|
} catch (error) {
|
|
5485
6176
|
}
|
|
5486
6177
|
}
|
|
5487
|
-
module2.exports =
|
|
6178
|
+
module2.exports = require_common2()(exports2);
|
|
5488
6179
|
var { formatters } = module2.exports;
|
|
5489
6180
|
formatters.j = function(v) {
|
|
5490
6181
|
try {
|
|
@@ -5496,117 +6187,8 @@ var require_browser = __commonJS({
|
|
|
5496
6187
|
}
|
|
5497
6188
|
});
|
|
5498
6189
|
|
|
5499
|
-
// ../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
|
|
5500
|
-
var require_has_flag = __commonJS({
|
|
5501
|
-
"../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports2, module2) {
|
|
5502
|
-
"use strict";
|
|
5503
|
-
module2.exports = (flag, argv) => {
|
|
5504
|
-
argv = argv || process.argv;
|
|
5505
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
5506
|
-
const pos = argv.indexOf(prefix + flag);
|
|
5507
|
-
const terminatorPos = argv.indexOf("--");
|
|
5508
|
-
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
5509
|
-
};
|
|
5510
|
-
}
|
|
5511
|
-
});
|
|
5512
|
-
|
|
5513
|
-
// ../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
|
|
5514
|
-
var require_supports_color = __commonJS({
|
|
5515
|
-
"../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports2, module2) {
|
|
5516
|
-
"use strict";
|
|
5517
|
-
var os = require("os");
|
|
5518
|
-
var hasFlag = require_has_flag();
|
|
5519
|
-
var env2 = process.env;
|
|
5520
|
-
var forceColor;
|
|
5521
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
5522
|
-
forceColor = false;
|
|
5523
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
5524
|
-
forceColor = true;
|
|
5525
|
-
}
|
|
5526
|
-
if ("FORCE_COLOR" in env2) {
|
|
5527
|
-
forceColor = env2.FORCE_COLOR.length === 0 || parseInt(env2.FORCE_COLOR, 10) !== 0;
|
|
5528
|
-
}
|
|
5529
|
-
function translateLevel(level) {
|
|
5530
|
-
if (level === 0) {
|
|
5531
|
-
return false;
|
|
5532
|
-
}
|
|
5533
|
-
return {
|
|
5534
|
-
level,
|
|
5535
|
-
hasBasic: true,
|
|
5536
|
-
has256: level >= 2,
|
|
5537
|
-
has16m: level >= 3
|
|
5538
|
-
};
|
|
5539
|
-
}
|
|
5540
|
-
function supportsColor(stream) {
|
|
5541
|
-
if (forceColor === false) {
|
|
5542
|
-
return 0;
|
|
5543
|
-
}
|
|
5544
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
5545
|
-
return 3;
|
|
5546
|
-
}
|
|
5547
|
-
if (hasFlag("color=256")) {
|
|
5548
|
-
return 2;
|
|
5549
|
-
}
|
|
5550
|
-
if (stream && !stream.isTTY && forceColor !== true) {
|
|
5551
|
-
return 0;
|
|
5552
|
-
}
|
|
5553
|
-
const min = forceColor ? 1 : 0;
|
|
5554
|
-
if (process.platform === "win32") {
|
|
5555
|
-
const osRelease = os.release().split(".");
|
|
5556
|
-
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
5557
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
5558
|
-
}
|
|
5559
|
-
return 1;
|
|
5560
|
-
}
|
|
5561
|
-
if ("CI" in env2) {
|
|
5562
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
|
|
5563
|
-
return 1;
|
|
5564
|
-
}
|
|
5565
|
-
return min;
|
|
5566
|
-
}
|
|
5567
|
-
if ("TEAMCITY_VERSION" in env2) {
|
|
5568
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
|
|
5569
|
-
}
|
|
5570
|
-
if (env2.COLORTERM === "truecolor") {
|
|
5571
|
-
return 3;
|
|
5572
|
-
}
|
|
5573
|
-
if ("TERM_PROGRAM" in env2) {
|
|
5574
|
-
const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
5575
|
-
switch (env2.TERM_PROGRAM) {
|
|
5576
|
-
case "iTerm.app":
|
|
5577
|
-
return version >= 3 ? 3 : 2;
|
|
5578
|
-
case "Apple_Terminal":
|
|
5579
|
-
return 2;
|
|
5580
|
-
}
|
|
5581
|
-
}
|
|
5582
|
-
if (/-256(color)?$/i.test(env2.TERM)) {
|
|
5583
|
-
return 2;
|
|
5584
|
-
}
|
|
5585
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
|
|
5586
|
-
return 1;
|
|
5587
|
-
}
|
|
5588
|
-
if ("COLORTERM" in env2) {
|
|
5589
|
-
return 1;
|
|
5590
|
-
}
|
|
5591
|
-
if (env2.TERM === "dumb") {
|
|
5592
|
-
return min;
|
|
5593
|
-
}
|
|
5594
|
-
return min;
|
|
5595
|
-
}
|
|
5596
|
-
function getSupportLevel(stream) {
|
|
5597
|
-
const level = supportsColor(stream);
|
|
5598
|
-
return translateLevel(level);
|
|
5599
|
-
}
|
|
5600
|
-
module2.exports = {
|
|
5601
|
-
supportsColor: getSupportLevel,
|
|
5602
|
-
stdout: getSupportLevel(process.stdout),
|
|
5603
|
-
stderr: getSupportLevel(process.stderr)
|
|
5604
|
-
};
|
|
5605
|
-
}
|
|
5606
|
-
});
|
|
5607
|
-
|
|
5608
6190
|
// ../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/node.js
|
|
5609
|
-
var
|
|
6191
|
+
var require_node2 = __commonJS({
|
|
5610
6192
|
"../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/node.js"(exports2, module2) {
|
|
5611
6193
|
"use strict";
|
|
5612
6194
|
var tty = require("tty");
|
|
@@ -5767,86 +6349,28 @@ var require_node = __commonJS({
|
|
|
5767
6349
|
debug2.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
|
|
5768
6350
|
}
|
|
5769
6351
|
}
|
|
5770
|
-
module2.exports =
|
|
6352
|
+
module2.exports = require_common2()(exports2);
|
|
5771
6353
|
var { formatters } = module2.exports;
|
|
5772
6354
|
formatters.o = function(v) {
|
|
5773
6355
|
this.inspectOpts.colors = this.useColors;
|
|
5774
|
-
return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
5775
|
-
};
|
|
5776
|
-
formatters.O = function(v) {
|
|
5777
|
-
this.inspectOpts.colors = this.useColors;
|
|
5778
|
-
return util.inspect(v, this.inspectOpts);
|
|
5779
|
-
};
|
|
5780
|
-
}
|
|
5781
|
-
});
|
|
5782
|
-
|
|
5783
|
-
// ../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/index.js
|
|
5784
|
-
var require_src = __commonJS({
|
|
5785
|
-
"../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/index.js"(exports2, module2) {
|
|
5786
|
-
"use strict";
|
|
5787
|
-
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
5788
|
-
module2.exports = require_browser();
|
|
5789
|
-
} else {
|
|
5790
|
-
module2.exports = require_node();
|
|
5791
|
-
}
|
|
5792
|
-
}
|
|
5793
|
-
});
|
|
5794
|
-
|
|
5795
|
-
// ../../node_modules/.pnpm/@kwsites+file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/src/index.js
|
|
5796
|
-
var require_src2 = __commonJS({
|
|
5797
|
-
"../../node_modules/.pnpm/@kwsites+file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/src/index.js"(exports2) {
|
|
5798
|
-
"use strict";
|
|
5799
|
-
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
5800
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
5801
|
-
};
|
|
5802
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5803
|
-
var fs_1 = require("fs");
|
|
5804
|
-
var debug_1 = __importDefault(require_src());
|
|
5805
|
-
var log = debug_1.default("@kwsites/file-exists");
|
|
5806
|
-
function check(path4, isFile, isDirectory) {
|
|
5807
|
-
log(`checking %s`, path4);
|
|
5808
|
-
try {
|
|
5809
|
-
const stat = fs_1.statSync(path4);
|
|
5810
|
-
if (stat.isFile() && isFile) {
|
|
5811
|
-
log(`[OK] path represents a file`);
|
|
5812
|
-
return true;
|
|
5813
|
-
}
|
|
5814
|
-
if (stat.isDirectory() && isDirectory) {
|
|
5815
|
-
log(`[OK] path represents a directory`);
|
|
5816
|
-
return true;
|
|
5817
|
-
}
|
|
5818
|
-
log(`[FAIL] path represents something other than a file or directory`);
|
|
5819
|
-
return false;
|
|
5820
|
-
} catch (e) {
|
|
5821
|
-
if (e.code === "ENOENT") {
|
|
5822
|
-
log(`[FAIL] path is not accessible: %o`, e);
|
|
5823
|
-
return false;
|
|
5824
|
-
}
|
|
5825
|
-
log(`[FATAL] %o`, e);
|
|
5826
|
-
throw e;
|
|
5827
|
-
}
|
|
5828
|
-
}
|
|
5829
|
-
function exists2(path4, type = exports2.READABLE) {
|
|
5830
|
-
return check(path4, (type & exports2.FILE) > 0, (type & exports2.FOLDER) > 0);
|
|
5831
|
-
}
|
|
5832
|
-
exports2.exists = exists2;
|
|
5833
|
-
exports2.FILE = 1;
|
|
5834
|
-
exports2.FOLDER = 2;
|
|
5835
|
-
exports2.READABLE = exports2.FILE + exports2.FOLDER;
|
|
6356
|
+
return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
6357
|
+
};
|
|
6358
|
+
formatters.O = function(v) {
|
|
6359
|
+
this.inspectOpts.colors = this.useColors;
|
|
6360
|
+
return util.inspect(v, this.inspectOpts);
|
|
6361
|
+
};
|
|
5836
6362
|
}
|
|
5837
6363
|
});
|
|
5838
6364
|
|
|
5839
|
-
// ../../node_modules/.pnpm
|
|
5840
|
-
var
|
|
5841
|
-
"../../node_modules/.pnpm
|
|
6365
|
+
// ../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/index.js
|
|
6366
|
+
var require_src3 = __commonJS({
|
|
6367
|
+
"../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/index.js"(exports2, module2) {
|
|
5842
6368
|
"use strict";
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
6369
|
+
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
6370
|
+
module2.exports = require_browser2();
|
|
6371
|
+
} else {
|
|
6372
|
+
module2.exports = require_node2();
|
|
5847
6373
|
}
|
|
5848
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5849
|
-
__export3(require_src2());
|
|
5850
6374
|
}
|
|
5851
6375
|
});
|
|
5852
6376
|
|
|
@@ -5892,31 +6416,9 @@ var require_dist2 = __commonJS({
|
|
|
5892
6416
|
}
|
|
5893
6417
|
});
|
|
5894
6418
|
|
|
5895
|
-
// ../../node_modules/.pnpm/@fern-api+fs-utils@0.15.0-rc63/node_modules/@fern-api/fs-utils/lib/cwd.js
|
|
5896
|
-
function cwd() {
|
|
5897
|
-
return process.cwd();
|
|
5898
|
-
}
|
|
5899
|
-
|
|
5900
|
-
// ../../node_modules/.pnpm/@fern-api+fs-utils@0.15.0-rc63/node_modules/@fern-api/fs-utils/lib/doesPathExist.js
|
|
5901
|
-
var import_promises = require("fs/promises");
|
|
5902
|
-
async function doesPathExist(filepath) {
|
|
5903
|
-
try {
|
|
5904
|
-
await (0, import_promises.lstat)(filepath);
|
|
5905
|
-
return true;
|
|
5906
|
-
} catch {
|
|
5907
|
-
return false;
|
|
5908
|
-
}
|
|
5909
|
-
}
|
|
5910
|
-
|
|
5911
|
-
// ../../node_modules/.pnpm/@fern-api+fs-utils@0.15.0-rc63/node_modules/@fern-api/fs-utils/lib/resolve.js
|
|
5912
|
-
var import_path = __toESM(require("path"), 1);
|
|
5913
|
-
function resolve(...paths) {
|
|
5914
|
-
return import_path.default.resolve(...paths);
|
|
5915
|
-
}
|
|
5916
|
-
|
|
5917
6419
|
// src/cli.ts
|
|
5918
6420
|
var import_fs5 = __toESM(require("fs"), 1);
|
|
5919
|
-
var
|
|
6421
|
+
var import_promises6 = require("fs/promises");
|
|
5920
6422
|
var import_path7 = __toESM(require("path"), 1);
|
|
5921
6423
|
|
|
5922
6424
|
// ../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/build/lib/yerror.js
|
|
@@ -5951,7 +6453,7 @@ function getProcessArgvBin() {
|
|
|
5951
6453
|
|
|
5952
6454
|
// ../../node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/lib/index.js
|
|
5953
6455
|
var import_util = require("util");
|
|
5954
|
-
var
|
|
6456
|
+
var import_path = require("path");
|
|
5955
6457
|
|
|
5956
6458
|
// ../../node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/lib/string-utils.js
|
|
5957
6459
|
function camelCase(str) {
|
|
@@ -6866,8 +7368,8 @@ function combineAliases(aliases) {
|
|
|
6866
7368
|
}
|
|
6867
7369
|
}
|
|
6868
7370
|
aliasArrays.forEach(function(aliasArray) {
|
|
6869
|
-
aliasArray = aliasArray.filter(function(v, i,
|
|
6870
|
-
return
|
|
7371
|
+
aliasArray = aliasArray.filter(function(v, i, self) {
|
|
7372
|
+
return self.indexOf(v) === i;
|
|
6871
7373
|
});
|
|
6872
7374
|
const lastAlias = aliasArray.pop();
|
|
6873
7375
|
if (lastAlias !== void 0 && typeof lastAlias === "string") {
|
|
@@ -6908,8 +7410,8 @@ var parser = new YargsParser({
|
|
|
6908
7410
|
return env;
|
|
6909
7411
|
},
|
|
6910
7412
|
format: import_util.format,
|
|
6911
|
-
normalize:
|
|
6912
|
-
resolve:
|
|
7413
|
+
normalize: import_path.normalize,
|
|
7414
|
+
resolve: import_path.resolve,
|
|
6913
7415
|
// TODO: figure out a way to combine ESM and CJS coverage, such that
|
|
6914
7416
|
// we can exercise all the lines below:
|
|
6915
7417
|
require: (path4) => {
|
|
@@ -7225,22 +7727,20 @@ function ui(opts) {
|
|
|
7225
7727
|
});
|
|
7226
7728
|
}
|
|
7227
7729
|
|
|
7228
|
-
// ../../node_modules/.pnpm/escalade@3.
|
|
7229
|
-
var
|
|
7730
|
+
// ../../node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.mjs
|
|
7731
|
+
var import_path2 = require("path");
|
|
7230
7732
|
var import_fs2 = require("fs");
|
|
7231
7733
|
function sync_default(start, callback) {
|
|
7232
|
-
let dir = (0,
|
|
7734
|
+
let dir = (0, import_path2.resolve)(".", start);
|
|
7233
7735
|
let tmp2, stats = (0, import_fs2.statSync)(dir);
|
|
7234
7736
|
if (!stats.isDirectory()) {
|
|
7235
|
-
dir = (0,
|
|
7737
|
+
dir = (0, import_path2.dirname)(dir);
|
|
7236
7738
|
}
|
|
7237
7739
|
while (true) {
|
|
7238
7740
|
tmp2 = callback(dir, (0, import_fs2.readdirSync)(dir));
|
|
7239
|
-
if (tmp2)
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
if (tmp2 === dir)
|
|
7243
|
-
break;
|
|
7741
|
+
if (tmp2) return (0, import_path2.resolve)(dir, tmp2);
|
|
7742
|
+
dir = (0, import_path2.dirname)(tmp2 = dir);
|
|
7743
|
+
if (tmp2 === dir) break;
|
|
7244
7744
|
}
|
|
7245
7745
|
}
|
|
7246
7746
|
|
|
@@ -7248,19 +7748,19 @@ function sync_default(start, callback) {
|
|
|
7248
7748
|
var import_util3 = require("util");
|
|
7249
7749
|
var import_fs4 = require("fs");
|
|
7250
7750
|
var import_url = require("url");
|
|
7251
|
-
var
|
|
7751
|
+
var import_path4 = require("path");
|
|
7252
7752
|
|
|
7253
7753
|
// ../../node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/build/lib/platform-shims/node.js
|
|
7254
7754
|
var import_fs3 = require("fs");
|
|
7255
7755
|
var import_util2 = require("util");
|
|
7256
|
-
var
|
|
7756
|
+
var import_path3 = require("path");
|
|
7257
7757
|
var node_default = {
|
|
7258
7758
|
fs: {
|
|
7259
7759
|
readFileSync: import_fs3.readFileSync,
|
|
7260
7760
|
writeFile: import_fs3.writeFile
|
|
7261
7761
|
},
|
|
7262
7762
|
format: import_util2.format,
|
|
7263
|
-
resolve:
|
|
7763
|
+
resolve: import_path3.resolve,
|
|
7264
7764
|
exists: (file) => {
|
|
7265
7765
|
try {
|
|
7266
7766
|
return (0, import_fs3.statSync)(file).isFile();
|
|
@@ -7466,11 +7966,11 @@ var esm_default = {
|
|
|
7466
7966
|
mainFilename: mainFilename || process.cwd(),
|
|
7467
7967
|
Parser: lib_default,
|
|
7468
7968
|
path: {
|
|
7469
|
-
basename:
|
|
7470
|
-
dirname:
|
|
7471
|
-
extname:
|
|
7472
|
-
relative:
|
|
7473
|
-
resolve:
|
|
7969
|
+
basename: import_path4.basename,
|
|
7970
|
+
dirname: import_path4.dirname,
|
|
7971
|
+
extname: import_path4.extname,
|
|
7972
|
+
relative: import_path4.relative,
|
|
7973
|
+
resolve: import_path4.resolve
|
|
7474
7974
|
},
|
|
7475
7975
|
process: {
|
|
7476
7976
|
argv: () => process.argv,
|
|
@@ -7492,7 +7992,7 @@ var esm_default = {
|
|
|
7492
7992
|
return [...str].length;
|
|
7493
7993
|
},
|
|
7494
7994
|
y18n: y18n_default({
|
|
7495
|
-
directory: (0,
|
|
7995
|
+
directory: (0, import_path4.resolve)(__dirname2, "../../../locales"),
|
|
7496
7996
|
updateFiles: false
|
|
7497
7997
|
})
|
|
7498
7998
|
};
|
|
@@ -7507,27 +8007,58 @@ Yargs.hideBin = processArgv.hideBin;
|
|
|
7507
8007
|
Yargs.Parser = Parser2;
|
|
7508
8008
|
var yargs_default = Yargs;
|
|
7509
8009
|
|
|
7510
|
-
//
|
|
8010
|
+
// ../../node_modules/.pnpm/@fern-api+fs-utils@0.15.0-rc63/node_modules/@fern-api/fs-utils/lib/cwd.js
|
|
8011
|
+
function cwd() {
|
|
8012
|
+
return process.cwd();
|
|
8013
|
+
}
|
|
8014
|
+
|
|
8015
|
+
// ../../node_modules/.pnpm/@fern-api+fs-utils@0.15.0-rc63/node_modules/@fern-api/fs-utils/lib/doesPathExist.js
|
|
8016
|
+
var import_promises = require("fs/promises");
|
|
8017
|
+
async function doesPathExist(filepath) {
|
|
8018
|
+
try {
|
|
8019
|
+
await (0, import_promises.lstat)(filepath);
|
|
8020
|
+
return true;
|
|
8021
|
+
} catch {
|
|
8022
|
+
return false;
|
|
8023
|
+
}
|
|
8024
|
+
}
|
|
8025
|
+
|
|
8026
|
+
// ../../node_modules/.pnpm/@fern-api+fs-utils@0.15.0-rc63/node_modules/@fern-api/fs-utils/lib/resolve.js
|
|
8027
|
+
var import_path5 = __toESM(require("path"), 1);
|
|
8028
|
+
function resolve5(...paths) {
|
|
8029
|
+
return import_path5.default.resolve(...paths);
|
|
8030
|
+
}
|
|
8031
|
+
|
|
8032
|
+
// src/configuration/loadGitHubConfig.ts
|
|
7511
8033
|
var import_promises2 = require("fs/promises");
|
|
7512
|
-
async function
|
|
8034
|
+
async function loadGitHubConfig({
|
|
7513
8035
|
absolutePathToConfig
|
|
7514
8036
|
}) {
|
|
7515
8037
|
const rawContents = await (0, import_promises2.readFile)(absolutePathToConfig, "utf8");
|
|
7516
8038
|
return JSON.parse(rawContents);
|
|
7517
8039
|
}
|
|
7518
8040
|
|
|
7519
|
-
// src/configuration/
|
|
8041
|
+
// src/configuration/loadReadmeConfig.ts
|
|
7520
8042
|
var import_promises3 = require("fs/promises");
|
|
7521
|
-
async function
|
|
8043
|
+
async function loadReadmeConfig({
|
|
7522
8044
|
absolutePathToConfig
|
|
7523
8045
|
}) {
|
|
7524
8046
|
const rawContents = await (0, import_promises3.readFile)(absolutePathToConfig, "utf8");
|
|
7525
8047
|
return JSON.parse(rawContents);
|
|
7526
8048
|
}
|
|
7527
8049
|
|
|
8050
|
+
// src/configuration/loadReferenceConfig.ts
|
|
8051
|
+
var import_promises4 = require("fs/promises");
|
|
8052
|
+
async function loadReferenceConfig({
|
|
8053
|
+
absolutePathToConfig
|
|
8054
|
+
}) {
|
|
8055
|
+
const rawContents = await (0, import_promises4.readFile)(absolutePathToConfig, "utf8");
|
|
8056
|
+
return JSON.parse(rawContents);
|
|
8057
|
+
}
|
|
8058
|
+
|
|
7528
8059
|
// ../../node_modules/.pnpm/simple-git@3.24.0/node_modules/simple-git/dist/esm/index.js
|
|
7529
8060
|
var import_file_exists = __toESM(require_dist(), 1);
|
|
7530
|
-
var import_debug = __toESM(
|
|
8061
|
+
var import_debug = __toESM(require_src3(), 1);
|
|
7531
8062
|
var import_child_process = require("child_process");
|
|
7532
8063
|
var import_promise_deferred = __toESM(require_dist2(), 1);
|
|
7533
8064
|
var import_promise_deferred2 = __toESM(require_dist2(), 1);
|
|
@@ -7573,7 +8104,7 @@ var __copyProps2 = (to, from, except, desc) => {
|
|
|
7573
8104
|
};
|
|
7574
8105
|
var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
7575
8106
|
var __async = (__this, __arguments, generator) => {
|
|
7576
|
-
return new Promise((
|
|
8107
|
+
return new Promise((resolve7, reject) => {
|
|
7577
8108
|
var fulfilled = (value) => {
|
|
7578
8109
|
try {
|
|
7579
8110
|
step(generator.next(value));
|
|
@@ -7588,7 +8119,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
7588
8119
|
reject(e);
|
|
7589
8120
|
}
|
|
7590
8121
|
};
|
|
7591
|
-
var step = (x) => x.done ?
|
|
8122
|
+
var step = (x) => x.done ? resolve7(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
7592
8123
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
7593
8124
|
});
|
|
7594
8125
|
};
|
|
@@ -9050,12 +9581,12 @@ var init_task_callback = __esm({
|
|
|
9050
9581
|
init_utils();
|
|
9051
9582
|
}
|
|
9052
9583
|
});
|
|
9053
|
-
function changeWorkingDirectoryTask(directory,
|
|
9584
|
+
function changeWorkingDirectoryTask(directory, root) {
|
|
9054
9585
|
return adhocExecTask((instance) => {
|
|
9055
9586
|
if (!folderExists(directory)) {
|
|
9056
9587
|
throw new Error(`Git.cwd: cannot change to non-directory "${directory}"`);
|
|
9057
9588
|
}
|
|
9058
|
-
return (
|
|
9589
|
+
return (root || instance).cwd = directory;
|
|
9059
9590
|
});
|
|
9060
9591
|
}
|
|
9061
9592
|
var init_change_working_directory = __esm({
|
|
@@ -9121,10 +9652,10 @@ var init_parse_commit = __esm({
|
|
|
9121
9652
|
"use strict";
|
|
9122
9653
|
init_utils();
|
|
9123
9654
|
parsers = [
|
|
9124
|
-
new LineParser(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/, (result, [branch,
|
|
9655
|
+
new LineParser(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/, (result, [branch, root, commit]) => {
|
|
9125
9656
|
result.branch = branch;
|
|
9126
9657
|
result.commit = commit;
|
|
9127
|
-
result.root = !!
|
|
9658
|
+
result.root = !!root;
|
|
9128
9659
|
}),
|
|
9129
9660
|
new LineParser(/\s*Author:\s(.+)/i, (result, [author]) => {
|
|
9130
9661
|
const parts = author.split("<");
|
|
@@ -12028,44 +12559,99 @@ function gitInstanceFactory(baseDir, options) {
|
|
|
12028
12559
|
init_git_response_error();
|
|
12029
12560
|
var esm_default2 = gitInstanceFactory;
|
|
12030
12561
|
|
|
12031
|
-
//
|
|
12562
|
+
// ../commons/github/dist/cloneRepository.js
|
|
12032
12563
|
var import_tmp_promise = __toESM(require_tmp_promise(), 1);
|
|
12033
12564
|
|
|
12034
|
-
//
|
|
12035
|
-
var
|
|
12565
|
+
// ../commons/github/dist/ClonedRepository.js
|
|
12566
|
+
var import_promises5 = require("fs/promises");
|
|
12036
12567
|
var import_path6 = __toESM(require("path"), 1);
|
|
12037
12568
|
|
|
12038
|
-
//
|
|
12569
|
+
// ../commons/github/dist/constants.js
|
|
12039
12570
|
var DEFAULT_REMOTE = "github.com";
|
|
12040
12571
|
var README_FILEPATH = "README.md";
|
|
12041
12572
|
|
|
12042
|
-
//
|
|
12573
|
+
// ../commons/github/dist/ClonedRepository.js
|
|
12043
12574
|
var ClonedRepository = class {
|
|
12044
12575
|
clonePath;
|
|
12045
|
-
|
|
12576
|
+
git;
|
|
12577
|
+
constructor({ clonePath, git }) {
|
|
12046
12578
|
this.clonePath = clonePath;
|
|
12579
|
+
this.git = git;
|
|
12580
|
+
}
|
|
12581
|
+
async getDefaultBranch() {
|
|
12582
|
+
await this.git.cwd(this.clonePath);
|
|
12583
|
+
const remoteInfo = await this.git.remote(["show", "origin"]);
|
|
12584
|
+
if (remoteInfo == null) {
|
|
12585
|
+
throw new Error("Could not determine default branch");
|
|
12586
|
+
}
|
|
12587
|
+
const match = remoteInfo.match(/HEAD branch: (.+)/);
|
|
12588
|
+
if (!match?.[1]) {
|
|
12589
|
+
throw new Error("Could not determine default branch");
|
|
12590
|
+
}
|
|
12591
|
+
return match[1].trim();
|
|
12047
12592
|
}
|
|
12048
12593
|
async getReadme() {
|
|
12049
12594
|
return await this.readFile({ relativeFilePath: README_FILEPATH });
|
|
12050
12595
|
}
|
|
12596
|
+
async add(files) {
|
|
12597
|
+
await this.git.cwd(this.clonePath);
|
|
12598
|
+
await this.git.add(files);
|
|
12599
|
+
}
|
|
12600
|
+
async commit(message) {
|
|
12601
|
+
await this.git.cwd(this.clonePath);
|
|
12602
|
+
await this.git.commit(message ?? `Automated commit message at ${(/* @__PURE__ */ new Date()).toISOString()}`);
|
|
12603
|
+
}
|
|
12604
|
+
async checkout(branch) {
|
|
12605
|
+
await this.git.cwd(this.clonePath);
|
|
12606
|
+
try {
|
|
12607
|
+
await this.git.checkout(branch);
|
|
12608
|
+
} catch (_error) {
|
|
12609
|
+
await this.git.checkoutLocalBranch(branch);
|
|
12610
|
+
await this.git.push("origin", branch, { "--set-upstream": null });
|
|
12611
|
+
}
|
|
12612
|
+
}
|
|
12613
|
+
async pull(branch) {
|
|
12614
|
+
await this.git.cwd(this.clonePath);
|
|
12615
|
+
await this.git.pull("origin", branch);
|
|
12616
|
+
}
|
|
12617
|
+
async push() {
|
|
12618
|
+
await this.git.cwd(this.clonePath);
|
|
12619
|
+
await this.git.push();
|
|
12620
|
+
}
|
|
12621
|
+
async overwriteLocalContents(sourceDirectoryPath) {
|
|
12622
|
+
const [sourceContents, destContents] = await Promise.all([
|
|
12623
|
+
(0, import_promises5.readdir)(sourceDirectoryPath),
|
|
12624
|
+
(0, import_promises5.readdir)(this.clonePath)
|
|
12625
|
+
]);
|
|
12626
|
+
await Promise.all(destContents.filter((content) => content !== ".git").map(async (content) => {
|
|
12627
|
+
await (0, import_promises5.rm)((0, import_path6.resolve)(this.clonePath, content), {
|
|
12628
|
+
recursive: true,
|
|
12629
|
+
force: true
|
|
12630
|
+
});
|
|
12631
|
+
}));
|
|
12632
|
+
await Promise.all(sourceContents.filter((content) => content !== ".git").map(async (content) => {
|
|
12633
|
+
const path4 = (0, import_path6.resolve)(sourceDirectoryPath, content);
|
|
12634
|
+
await (0, import_promises5.cp)(path4, (0, import_path6.resolve)(this.clonePath, content), { recursive: true });
|
|
12635
|
+
}));
|
|
12636
|
+
}
|
|
12051
12637
|
async readFile({ relativeFilePath }) {
|
|
12052
12638
|
const absoluteFilePath = import_path6.default.join(this.clonePath, relativeFilePath);
|
|
12053
12639
|
if (!await doesPathExist2(absoluteFilePath)) {
|
|
12054
12640
|
return void 0;
|
|
12055
12641
|
}
|
|
12056
|
-
return await (0,
|
|
12642
|
+
return await (0, import_promises5.readFile)(absoluteFilePath, "utf-8");
|
|
12057
12643
|
}
|
|
12058
12644
|
};
|
|
12059
12645
|
async function doesPathExist2(filepath) {
|
|
12060
12646
|
try {
|
|
12061
|
-
await (0,
|
|
12647
|
+
await (0, import_promises5.lstat)(filepath);
|
|
12062
12648
|
return true;
|
|
12063
12649
|
} catch {
|
|
12064
12650
|
return false;
|
|
12065
12651
|
}
|
|
12066
12652
|
}
|
|
12067
12653
|
|
|
12068
|
-
//
|
|
12654
|
+
// ../commons/github/dist/parseRepository.js
|
|
12069
12655
|
function parseRepository(githubRepository) {
|
|
12070
12656
|
const remote = DEFAULT_REMOTE;
|
|
12071
12657
|
let owner;
|
|
@@ -12107,7 +12693,7 @@ function getCloneUrl({ remote, owner, repo }) {
|
|
|
12107
12693
|
return `https://${remote}/${owner}/${repo}.git`;
|
|
12108
12694
|
}
|
|
12109
12695
|
|
|
12110
|
-
//
|
|
12696
|
+
// ../commons/github/dist/cloneRepository.js
|
|
12111
12697
|
async function cloneRepository({ githubRepository, installationToken }) {
|
|
12112
12698
|
const repositoryReference = parseRepository(githubRepository);
|
|
12113
12699
|
const cloneUrl = installationToken != null ? repositoryReference.getAuthedCloneUrl(installationToken) : repositoryReference.cloneUrl;
|
|
@@ -12116,556 +12702,49 @@ async function cloneRepository({ githubRepository, installationToken }) {
|
|
|
12116
12702
|
const git = esm_default2(clonePath);
|
|
12117
12703
|
await git.clone(cloneUrl, ".");
|
|
12118
12704
|
return new ClonedRepository({
|
|
12119
|
-
clonePath
|
|
12705
|
+
clonePath,
|
|
12706
|
+
git
|
|
12120
12707
|
});
|
|
12121
12708
|
}
|
|
12122
12709
|
|
|
12123
|
-
//
|
|
12124
|
-
var
|
|
12125
|
-
|
|
12126
|
-
|
|
12127
|
-
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
var root_default = root;
|
|
12131
|
-
|
|
12132
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js
|
|
12133
|
-
var Symbol2 = root_default.Symbol;
|
|
12134
|
-
var Symbol_default = Symbol2;
|
|
12135
|
-
|
|
12136
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js
|
|
12137
|
-
var objectProto = Object.prototype;
|
|
12138
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
12139
|
-
var nativeObjectToString = objectProto.toString;
|
|
12140
|
-
var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
|
|
12141
|
-
function getRawTag(value) {
|
|
12142
|
-
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|
12143
|
-
try {
|
|
12144
|
-
value[symToStringTag] = void 0;
|
|
12145
|
-
var unmasked = true;
|
|
12146
|
-
} catch (e) {
|
|
12147
|
-
}
|
|
12148
|
-
var result = nativeObjectToString.call(value);
|
|
12149
|
-
if (unmasked) {
|
|
12150
|
-
if (isOwn) {
|
|
12151
|
-
value[symToStringTag] = tag;
|
|
12152
|
-
} else {
|
|
12153
|
-
delete value[symToStringTag];
|
|
12154
|
-
}
|
|
12155
|
-
}
|
|
12156
|
-
return result;
|
|
12157
|
-
}
|
|
12158
|
-
var getRawTag_default = getRawTag;
|
|
12159
|
-
|
|
12160
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js
|
|
12161
|
-
var objectProto2 = Object.prototype;
|
|
12162
|
-
var nativeObjectToString2 = objectProto2.toString;
|
|
12163
|
-
function objectToString2(value) {
|
|
12164
|
-
return nativeObjectToString2.call(value);
|
|
12165
|
-
}
|
|
12166
|
-
var objectToString_default = objectToString2;
|
|
12167
|
-
|
|
12168
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js
|
|
12169
|
-
var nullTag = "[object Null]";
|
|
12170
|
-
var undefinedTag = "[object Undefined]";
|
|
12171
|
-
var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
|
|
12172
|
-
function baseGetTag(value) {
|
|
12173
|
-
if (value == null) {
|
|
12174
|
-
return value === void 0 ? undefinedTag : nullTag;
|
|
12175
|
-
}
|
|
12176
|
-
return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
|
|
12177
|
-
}
|
|
12178
|
-
var baseGetTag_default = baseGetTag;
|
|
12179
|
-
|
|
12180
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js
|
|
12181
|
-
function isObjectLike(value) {
|
|
12182
|
-
return value != null && typeof value == "object";
|
|
12183
|
-
}
|
|
12184
|
-
var isObjectLike_default = isObjectLike;
|
|
12185
|
-
|
|
12186
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js
|
|
12187
|
-
var symbolTag = "[object Symbol]";
|
|
12188
|
-
function isSymbol(value) {
|
|
12189
|
-
return typeof value == "symbol" || isObjectLike_default(value) && baseGetTag_default(value) == symbolTag;
|
|
12190
|
-
}
|
|
12191
|
-
var isSymbol_default = isSymbol;
|
|
12192
|
-
|
|
12193
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayMap.js
|
|
12194
|
-
function arrayMap(array, iteratee) {
|
|
12195
|
-
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
12196
|
-
while (++index < length) {
|
|
12197
|
-
result[index] = iteratee(array[index], index, array);
|
|
12198
|
-
}
|
|
12199
|
-
return result;
|
|
12200
|
-
}
|
|
12201
|
-
var arrayMap_default = arrayMap;
|
|
12202
|
-
|
|
12203
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArray.js
|
|
12204
|
-
var isArray = Array.isArray;
|
|
12205
|
-
var isArray_default = isArray;
|
|
12206
|
-
|
|
12207
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseToString.js
|
|
12208
|
-
var INFINITY = 1 / 0;
|
|
12209
|
-
var symbolProto = Symbol_default ? Symbol_default.prototype : void 0;
|
|
12210
|
-
var symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
12211
|
-
function baseToString(value) {
|
|
12212
|
-
if (typeof value == "string") {
|
|
12213
|
-
return value;
|
|
12214
|
-
}
|
|
12215
|
-
if (isArray_default(value)) {
|
|
12216
|
-
return arrayMap_default(value, baseToString) + "";
|
|
12217
|
-
}
|
|
12218
|
-
if (isSymbol_default(value)) {
|
|
12219
|
-
return symbolToString ? symbolToString.call(value) : "";
|
|
12710
|
+
// src/github/GitHub.ts
|
|
12711
|
+
var GitHub = class {
|
|
12712
|
+
githubConfig;
|
|
12713
|
+
constructor({
|
|
12714
|
+
githubConfig
|
|
12715
|
+
}) {
|
|
12716
|
+
this.githubConfig = githubConfig;
|
|
12220
12717
|
}
|
|
12221
|
-
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
|
|
12225
|
-
|
|
12226
|
-
|
|
12227
|
-
|
|
12228
|
-
|
|
12229
|
-
|
|
12230
|
-
|
|
12231
|
-
|
|
12232
|
-
|
|
12233
|
-
|
|
12234
|
-
|
|
12235
|
-
|
|
12236
|
-
|
|
12237
|
-
|
|
12238
|
-
|
|
12239
|
-
|
|
12240
|
-
end += length;
|
|
12241
|
-
}
|
|
12242
|
-
length = start > end ? 0 : end - start >>> 0;
|
|
12243
|
-
start >>>= 0;
|
|
12244
|
-
var result = Array(length);
|
|
12245
|
-
while (++index < length) {
|
|
12246
|
-
result[index] = array[index + start];
|
|
12718
|
+
async push() {
|
|
12719
|
+
try {
|
|
12720
|
+
const wd = cwd();
|
|
12721
|
+
const sourceDirectory = resolve5(wd, this.githubConfig.sourceDirectory);
|
|
12722
|
+
const repository = await cloneRepository({
|
|
12723
|
+
githubRepository: this.githubConfig.uri,
|
|
12724
|
+
installationToken: this.githubConfig.token
|
|
12725
|
+
});
|
|
12726
|
+
const branch = this.githubConfig.branch ?? await repository.getDefaultBranch();
|
|
12727
|
+
await repository.checkout(branch);
|
|
12728
|
+
await repository.pull(branch);
|
|
12729
|
+
await repository.overwriteLocalContents(sourceDirectory);
|
|
12730
|
+
await repository.add(".");
|
|
12731
|
+
await repository.commit();
|
|
12732
|
+
await repository.push();
|
|
12733
|
+
} catch (error) {
|
|
12734
|
+
console.error(error);
|
|
12735
|
+
throw error;
|
|
12736
|
+
}
|
|
12247
12737
|
}
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
var baseSlice_default = baseSlice;
|
|
12251
|
-
|
|
12252
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_castSlice.js
|
|
12253
|
-
function castSlice(array, start, end) {
|
|
12254
|
-
var length = array.length;
|
|
12255
|
-
end = end === void 0 ? length : end;
|
|
12256
|
-
return !start && end >= length ? array : baseSlice_default(array, start, end);
|
|
12257
|
-
}
|
|
12258
|
-
var castSlice_default = castSlice;
|
|
12259
|
-
|
|
12260
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicode.js
|
|
12261
|
-
var rsAstralRange = "\\ud800-\\udfff";
|
|
12262
|
-
var rsComboMarksRange = "\\u0300-\\u036f";
|
|
12263
|
-
var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
|
|
12264
|
-
var rsComboSymbolsRange = "\\u20d0-\\u20ff";
|
|
12265
|
-
var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
|
|
12266
|
-
var rsVarRange = "\\ufe0e\\ufe0f";
|
|
12267
|
-
var rsZWJ = "\\u200d";
|
|
12268
|
-
var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
|
|
12269
|
-
function hasUnicode(string) {
|
|
12270
|
-
return reHasUnicode.test(string);
|
|
12271
|
-
}
|
|
12272
|
-
var hasUnicode_default = hasUnicode;
|
|
12273
|
-
|
|
12274
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiToArray.js
|
|
12275
|
-
function asciiToArray(string) {
|
|
12276
|
-
return string.split("");
|
|
12277
|
-
}
|
|
12278
|
-
var asciiToArray_default = asciiToArray;
|
|
12279
|
-
|
|
12280
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeToArray.js
|
|
12281
|
-
var rsAstralRange2 = "\\ud800-\\udfff";
|
|
12282
|
-
var rsComboMarksRange2 = "\\u0300-\\u036f";
|
|
12283
|
-
var reComboHalfMarksRange2 = "\\ufe20-\\ufe2f";
|
|
12284
|
-
var rsComboSymbolsRange2 = "\\u20d0-\\u20ff";
|
|
12285
|
-
var rsComboRange2 = rsComboMarksRange2 + reComboHalfMarksRange2 + rsComboSymbolsRange2;
|
|
12286
|
-
var rsVarRange2 = "\\ufe0e\\ufe0f";
|
|
12287
|
-
var rsAstral = "[" + rsAstralRange2 + "]";
|
|
12288
|
-
var rsCombo = "[" + rsComboRange2 + "]";
|
|
12289
|
-
var rsFitz = "\\ud83c[\\udffb-\\udfff]";
|
|
12290
|
-
var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
|
|
12291
|
-
var rsNonAstral = "[^" + rsAstralRange2 + "]";
|
|
12292
|
-
var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
|
|
12293
|
-
var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
|
|
12294
|
-
var rsZWJ2 = "\\u200d";
|
|
12295
|
-
var reOptMod = rsModifier + "?";
|
|
12296
|
-
var rsOptVar = "[" + rsVarRange2 + "]?";
|
|
12297
|
-
var rsOptJoin = "(?:" + rsZWJ2 + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
|
|
12298
|
-
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
|
|
12299
|
-
var rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
|
|
12300
|
-
var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
|
|
12301
|
-
function unicodeToArray(string) {
|
|
12302
|
-
return string.match(reUnicode) || [];
|
|
12303
|
-
}
|
|
12304
|
-
var unicodeToArray_default = unicodeToArray;
|
|
12305
|
-
|
|
12306
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stringToArray.js
|
|
12307
|
-
function stringToArray(string) {
|
|
12308
|
-
return hasUnicode_default(string) ? unicodeToArray_default(string) : asciiToArray_default(string);
|
|
12309
|
-
}
|
|
12310
|
-
var stringToArray_default = stringToArray;
|
|
12311
|
-
|
|
12312
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createCaseFirst.js
|
|
12313
|
-
function createCaseFirst(methodName) {
|
|
12314
|
-
return function(string) {
|
|
12315
|
-
string = toString_default(string);
|
|
12316
|
-
var strSymbols = hasUnicode_default(string) ? stringToArray_default(string) : void 0;
|
|
12317
|
-
var chr = strSymbols ? strSymbols[0] : string.charAt(0);
|
|
12318
|
-
var trailing = strSymbols ? castSlice_default(strSymbols, 1).join("") : string.slice(1);
|
|
12319
|
-
return chr[methodName]() + trailing;
|
|
12320
|
-
};
|
|
12321
|
-
}
|
|
12322
|
-
var createCaseFirst_default = createCaseFirst;
|
|
12323
|
-
|
|
12324
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/upperFirst.js
|
|
12325
|
-
var upperFirst = createCaseFirst_default("toUpperCase");
|
|
12326
|
-
var upperFirst_default = upperFirst;
|
|
12327
|
-
|
|
12328
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/capitalize.js
|
|
12329
|
-
function capitalize(string) {
|
|
12330
|
-
return upperFirst_default(toString_default(string).toLowerCase());
|
|
12331
|
-
}
|
|
12332
|
-
var capitalize_default = capitalize;
|
|
12333
|
-
|
|
12334
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayReduce.js
|
|
12335
|
-
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
12336
|
-
var index = -1, length = array == null ? 0 : array.length;
|
|
12337
|
-
if (initAccum && length) {
|
|
12338
|
-
accumulator = array[++index];
|
|
12738
|
+
async pr() {
|
|
12739
|
+
console.log("TODO: Implement PR");
|
|
12339
12740
|
}
|
|
12340
|
-
|
|
12341
|
-
|
|
12741
|
+
async release() {
|
|
12742
|
+
console.log("TODO: Implement release");
|
|
12342
12743
|
}
|
|
12343
|
-
return accumulator;
|
|
12344
|
-
}
|
|
12345
|
-
var arrayReduce_default = arrayReduce;
|
|
12346
|
-
|
|
12347
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePropertyOf.js
|
|
12348
|
-
function basePropertyOf(object) {
|
|
12349
|
-
return function(key) {
|
|
12350
|
-
return object == null ? void 0 : object[key];
|
|
12351
|
-
};
|
|
12352
|
-
}
|
|
12353
|
-
var basePropertyOf_default = basePropertyOf;
|
|
12354
|
-
|
|
12355
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_deburrLetter.js
|
|
12356
|
-
var deburredLetters = {
|
|
12357
|
-
// Latin-1 Supplement block.
|
|
12358
|
-
"\xC0": "A",
|
|
12359
|
-
"\xC1": "A",
|
|
12360
|
-
"\xC2": "A",
|
|
12361
|
-
"\xC3": "A",
|
|
12362
|
-
"\xC4": "A",
|
|
12363
|
-
"\xC5": "A",
|
|
12364
|
-
"\xE0": "a",
|
|
12365
|
-
"\xE1": "a",
|
|
12366
|
-
"\xE2": "a",
|
|
12367
|
-
"\xE3": "a",
|
|
12368
|
-
"\xE4": "a",
|
|
12369
|
-
"\xE5": "a",
|
|
12370
|
-
"\xC7": "C",
|
|
12371
|
-
"\xE7": "c",
|
|
12372
|
-
"\xD0": "D",
|
|
12373
|
-
"\xF0": "d",
|
|
12374
|
-
"\xC8": "E",
|
|
12375
|
-
"\xC9": "E",
|
|
12376
|
-
"\xCA": "E",
|
|
12377
|
-
"\xCB": "E",
|
|
12378
|
-
"\xE8": "e",
|
|
12379
|
-
"\xE9": "e",
|
|
12380
|
-
"\xEA": "e",
|
|
12381
|
-
"\xEB": "e",
|
|
12382
|
-
"\xCC": "I",
|
|
12383
|
-
"\xCD": "I",
|
|
12384
|
-
"\xCE": "I",
|
|
12385
|
-
"\xCF": "I",
|
|
12386
|
-
"\xEC": "i",
|
|
12387
|
-
"\xED": "i",
|
|
12388
|
-
"\xEE": "i",
|
|
12389
|
-
"\xEF": "i",
|
|
12390
|
-
"\xD1": "N",
|
|
12391
|
-
"\xF1": "n",
|
|
12392
|
-
"\xD2": "O",
|
|
12393
|
-
"\xD3": "O",
|
|
12394
|
-
"\xD4": "O",
|
|
12395
|
-
"\xD5": "O",
|
|
12396
|
-
"\xD6": "O",
|
|
12397
|
-
"\xD8": "O",
|
|
12398
|
-
"\xF2": "o",
|
|
12399
|
-
"\xF3": "o",
|
|
12400
|
-
"\xF4": "o",
|
|
12401
|
-
"\xF5": "o",
|
|
12402
|
-
"\xF6": "o",
|
|
12403
|
-
"\xF8": "o",
|
|
12404
|
-
"\xD9": "U",
|
|
12405
|
-
"\xDA": "U",
|
|
12406
|
-
"\xDB": "U",
|
|
12407
|
-
"\xDC": "U",
|
|
12408
|
-
"\xF9": "u",
|
|
12409
|
-
"\xFA": "u",
|
|
12410
|
-
"\xFB": "u",
|
|
12411
|
-
"\xFC": "u",
|
|
12412
|
-
"\xDD": "Y",
|
|
12413
|
-
"\xFD": "y",
|
|
12414
|
-
"\xFF": "y",
|
|
12415
|
-
"\xC6": "Ae",
|
|
12416
|
-
"\xE6": "ae",
|
|
12417
|
-
"\xDE": "Th",
|
|
12418
|
-
"\xFE": "th",
|
|
12419
|
-
"\xDF": "ss",
|
|
12420
|
-
// Latin Extended-A block.
|
|
12421
|
-
"\u0100": "A",
|
|
12422
|
-
"\u0102": "A",
|
|
12423
|
-
"\u0104": "A",
|
|
12424
|
-
"\u0101": "a",
|
|
12425
|
-
"\u0103": "a",
|
|
12426
|
-
"\u0105": "a",
|
|
12427
|
-
"\u0106": "C",
|
|
12428
|
-
"\u0108": "C",
|
|
12429
|
-
"\u010A": "C",
|
|
12430
|
-
"\u010C": "C",
|
|
12431
|
-
"\u0107": "c",
|
|
12432
|
-
"\u0109": "c",
|
|
12433
|
-
"\u010B": "c",
|
|
12434
|
-
"\u010D": "c",
|
|
12435
|
-
"\u010E": "D",
|
|
12436
|
-
"\u0110": "D",
|
|
12437
|
-
"\u010F": "d",
|
|
12438
|
-
"\u0111": "d",
|
|
12439
|
-
"\u0112": "E",
|
|
12440
|
-
"\u0114": "E",
|
|
12441
|
-
"\u0116": "E",
|
|
12442
|
-
"\u0118": "E",
|
|
12443
|
-
"\u011A": "E",
|
|
12444
|
-
"\u0113": "e",
|
|
12445
|
-
"\u0115": "e",
|
|
12446
|
-
"\u0117": "e",
|
|
12447
|
-
"\u0119": "e",
|
|
12448
|
-
"\u011B": "e",
|
|
12449
|
-
"\u011C": "G",
|
|
12450
|
-
"\u011E": "G",
|
|
12451
|
-
"\u0120": "G",
|
|
12452
|
-
"\u0122": "G",
|
|
12453
|
-
"\u011D": "g",
|
|
12454
|
-
"\u011F": "g",
|
|
12455
|
-
"\u0121": "g",
|
|
12456
|
-
"\u0123": "g",
|
|
12457
|
-
"\u0124": "H",
|
|
12458
|
-
"\u0126": "H",
|
|
12459
|
-
"\u0125": "h",
|
|
12460
|
-
"\u0127": "h",
|
|
12461
|
-
"\u0128": "I",
|
|
12462
|
-
"\u012A": "I",
|
|
12463
|
-
"\u012C": "I",
|
|
12464
|
-
"\u012E": "I",
|
|
12465
|
-
"\u0130": "I",
|
|
12466
|
-
"\u0129": "i",
|
|
12467
|
-
"\u012B": "i",
|
|
12468
|
-
"\u012D": "i",
|
|
12469
|
-
"\u012F": "i",
|
|
12470
|
-
"\u0131": "i",
|
|
12471
|
-
"\u0134": "J",
|
|
12472
|
-
"\u0135": "j",
|
|
12473
|
-
"\u0136": "K",
|
|
12474
|
-
"\u0137": "k",
|
|
12475
|
-
"\u0138": "k",
|
|
12476
|
-
"\u0139": "L",
|
|
12477
|
-
"\u013B": "L",
|
|
12478
|
-
"\u013D": "L",
|
|
12479
|
-
"\u013F": "L",
|
|
12480
|
-
"\u0141": "L",
|
|
12481
|
-
"\u013A": "l",
|
|
12482
|
-
"\u013C": "l",
|
|
12483
|
-
"\u013E": "l",
|
|
12484
|
-
"\u0140": "l",
|
|
12485
|
-
"\u0142": "l",
|
|
12486
|
-
"\u0143": "N",
|
|
12487
|
-
"\u0145": "N",
|
|
12488
|
-
"\u0147": "N",
|
|
12489
|
-
"\u014A": "N",
|
|
12490
|
-
"\u0144": "n",
|
|
12491
|
-
"\u0146": "n",
|
|
12492
|
-
"\u0148": "n",
|
|
12493
|
-
"\u014B": "n",
|
|
12494
|
-
"\u014C": "O",
|
|
12495
|
-
"\u014E": "O",
|
|
12496
|
-
"\u0150": "O",
|
|
12497
|
-
"\u014D": "o",
|
|
12498
|
-
"\u014F": "o",
|
|
12499
|
-
"\u0151": "o",
|
|
12500
|
-
"\u0154": "R",
|
|
12501
|
-
"\u0156": "R",
|
|
12502
|
-
"\u0158": "R",
|
|
12503
|
-
"\u0155": "r",
|
|
12504
|
-
"\u0157": "r",
|
|
12505
|
-
"\u0159": "r",
|
|
12506
|
-
"\u015A": "S",
|
|
12507
|
-
"\u015C": "S",
|
|
12508
|
-
"\u015E": "S",
|
|
12509
|
-
"\u0160": "S",
|
|
12510
|
-
"\u015B": "s",
|
|
12511
|
-
"\u015D": "s",
|
|
12512
|
-
"\u015F": "s",
|
|
12513
|
-
"\u0161": "s",
|
|
12514
|
-
"\u0162": "T",
|
|
12515
|
-
"\u0164": "T",
|
|
12516
|
-
"\u0166": "T",
|
|
12517
|
-
"\u0163": "t",
|
|
12518
|
-
"\u0165": "t",
|
|
12519
|
-
"\u0167": "t",
|
|
12520
|
-
"\u0168": "U",
|
|
12521
|
-
"\u016A": "U",
|
|
12522
|
-
"\u016C": "U",
|
|
12523
|
-
"\u016E": "U",
|
|
12524
|
-
"\u0170": "U",
|
|
12525
|
-
"\u0172": "U",
|
|
12526
|
-
"\u0169": "u",
|
|
12527
|
-
"\u016B": "u",
|
|
12528
|
-
"\u016D": "u",
|
|
12529
|
-
"\u016F": "u",
|
|
12530
|
-
"\u0171": "u",
|
|
12531
|
-
"\u0173": "u",
|
|
12532
|
-
"\u0174": "W",
|
|
12533
|
-
"\u0175": "w",
|
|
12534
|
-
"\u0176": "Y",
|
|
12535
|
-
"\u0177": "y",
|
|
12536
|
-
"\u0178": "Y",
|
|
12537
|
-
"\u0179": "Z",
|
|
12538
|
-
"\u017B": "Z",
|
|
12539
|
-
"\u017D": "Z",
|
|
12540
|
-
"\u017A": "z",
|
|
12541
|
-
"\u017C": "z",
|
|
12542
|
-
"\u017E": "z",
|
|
12543
|
-
"\u0132": "IJ",
|
|
12544
|
-
"\u0133": "ij",
|
|
12545
|
-
"\u0152": "Oe",
|
|
12546
|
-
"\u0153": "oe",
|
|
12547
|
-
"\u0149": "'n",
|
|
12548
|
-
"\u017F": "s"
|
|
12549
12744
|
};
|
|
12550
|
-
var deburrLetter = basePropertyOf_default(deburredLetters);
|
|
12551
|
-
var deburrLetter_default = deburrLetter;
|
|
12552
|
-
|
|
12553
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/deburr.js
|
|
12554
|
-
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
12555
|
-
var rsComboMarksRange3 = "\\u0300-\\u036f";
|
|
12556
|
-
var reComboHalfMarksRange3 = "\\ufe20-\\ufe2f";
|
|
12557
|
-
var rsComboSymbolsRange3 = "\\u20d0-\\u20ff";
|
|
12558
|
-
var rsComboRange3 = rsComboMarksRange3 + reComboHalfMarksRange3 + rsComboSymbolsRange3;
|
|
12559
|
-
var rsCombo2 = "[" + rsComboRange3 + "]";
|
|
12560
|
-
var reComboMark = RegExp(rsCombo2, "g");
|
|
12561
|
-
function deburr(string) {
|
|
12562
|
-
string = toString_default(string);
|
|
12563
|
-
return string && string.replace(reLatin, deburrLetter_default).replace(reComboMark, "");
|
|
12564
|
-
}
|
|
12565
|
-
var deburr_default = deburr;
|
|
12566
|
-
|
|
12567
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiWords.js
|
|
12568
|
-
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
12569
|
-
function asciiWords(string) {
|
|
12570
|
-
return string.match(reAsciiWord) || [];
|
|
12571
|
-
}
|
|
12572
|
-
var asciiWords_default = asciiWords;
|
|
12573
|
-
|
|
12574
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicodeWord.js
|
|
12575
|
-
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
12576
|
-
function hasUnicodeWord(string) {
|
|
12577
|
-
return reHasUnicodeWord.test(string);
|
|
12578
|
-
}
|
|
12579
|
-
var hasUnicodeWord_default = hasUnicodeWord;
|
|
12580
|
-
|
|
12581
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeWords.js
|
|
12582
|
-
var rsAstralRange3 = "\\ud800-\\udfff";
|
|
12583
|
-
var rsComboMarksRange4 = "\\u0300-\\u036f";
|
|
12584
|
-
var reComboHalfMarksRange4 = "\\ufe20-\\ufe2f";
|
|
12585
|
-
var rsComboSymbolsRange4 = "\\u20d0-\\u20ff";
|
|
12586
|
-
var rsComboRange4 = rsComboMarksRange4 + reComboHalfMarksRange4 + rsComboSymbolsRange4;
|
|
12587
|
-
var rsDingbatRange = "\\u2700-\\u27bf";
|
|
12588
|
-
var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff";
|
|
12589
|
-
var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7";
|
|
12590
|
-
var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf";
|
|
12591
|
-
var rsPunctuationRange = "\\u2000-\\u206f";
|
|
12592
|
-
var rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000";
|
|
12593
|
-
var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde";
|
|
12594
|
-
var rsVarRange3 = "\\ufe0e\\ufe0f";
|
|
12595
|
-
var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
12596
|
-
var rsApos = "['\u2019]";
|
|
12597
|
-
var rsBreak = "[" + rsBreakRange + "]";
|
|
12598
|
-
var rsCombo3 = "[" + rsComboRange4 + "]";
|
|
12599
|
-
var rsDigits = "\\d+";
|
|
12600
|
-
var rsDingbat = "[" + rsDingbatRange + "]";
|
|
12601
|
-
var rsLower = "[" + rsLowerRange + "]";
|
|
12602
|
-
var rsMisc = "[^" + rsAstralRange3 + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]";
|
|
12603
|
-
var rsFitz2 = "\\ud83c[\\udffb-\\udfff]";
|
|
12604
|
-
var rsModifier2 = "(?:" + rsCombo3 + "|" + rsFitz2 + ")";
|
|
12605
|
-
var rsNonAstral2 = "[^" + rsAstralRange3 + "]";
|
|
12606
|
-
var rsRegional2 = "(?:\\ud83c[\\udde6-\\uddff]){2}";
|
|
12607
|
-
var rsSurrPair2 = "[\\ud800-\\udbff][\\udc00-\\udfff]";
|
|
12608
|
-
var rsUpper = "[" + rsUpperRange + "]";
|
|
12609
|
-
var rsZWJ3 = "\\u200d";
|
|
12610
|
-
var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")";
|
|
12611
|
-
var rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")";
|
|
12612
|
-
var rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?";
|
|
12613
|
-
var rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?";
|
|
12614
|
-
var reOptMod2 = rsModifier2 + "?";
|
|
12615
|
-
var rsOptVar2 = "[" + rsVarRange3 + "]?";
|
|
12616
|
-
var rsOptJoin2 = "(?:" + rsZWJ3 + "(?:" + [rsNonAstral2, rsRegional2, rsSurrPair2].join("|") + ")" + rsOptVar2 + reOptMod2 + ")*";
|
|
12617
|
-
var rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])";
|
|
12618
|
-
var rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])";
|
|
12619
|
-
var rsSeq2 = rsOptVar2 + reOptMod2 + rsOptJoin2;
|
|
12620
|
-
var rsEmoji = "(?:" + [rsDingbat, rsRegional2, rsSurrPair2].join("|") + ")" + rsSeq2;
|
|
12621
|
-
var reUnicodeWord = RegExp([
|
|
12622
|
-
rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
|
|
12623
|
-
rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")",
|
|
12624
|
-
rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
|
|
12625
|
-
rsUpper + "+" + rsOptContrUpper,
|
|
12626
|
-
rsOrdUpper,
|
|
12627
|
-
rsOrdLower,
|
|
12628
|
-
rsDigits,
|
|
12629
|
-
rsEmoji
|
|
12630
|
-
].join("|"), "g");
|
|
12631
|
-
function unicodeWords(string) {
|
|
12632
|
-
return string.match(reUnicodeWord) || [];
|
|
12633
|
-
}
|
|
12634
|
-
var unicodeWords_default = unicodeWords;
|
|
12635
|
-
|
|
12636
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/words.js
|
|
12637
|
-
function words(string, pattern, guard) {
|
|
12638
|
-
string = toString_default(string);
|
|
12639
|
-
pattern = guard ? void 0 : pattern;
|
|
12640
|
-
if (pattern === void 0) {
|
|
12641
|
-
return hasUnicodeWord_default(string) ? unicodeWords_default(string) : asciiWords_default(string);
|
|
12642
|
-
}
|
|
12643
|
-
return string.match(pattern) || [];
|
|
12644
|
-
}
|
|
12645
|
-
var words_default = words;
|
|
12646
|
-
|
|
12647
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createCompounder.js
|
|
12648
|
-
var rsApos2 = "['\u2019]";
|
|
12649
|
-
var reApos = RegExp(rsApos2, "g");
|
|
12650
|
-
function createCompounder(callback) {
|
|
12651
|
-
return function(string) {
|
|
12652
|
-
return arrayReduce_default(words_default(deburr_default(string).replace(reApos, "")), callback, "");
|
|
12653
|
-
};
|
|
12654
|
-
}
|
|
12655
|
-
var createCompounder_default = createCompounder;
|
|
12656
|
-
|
|
12657
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/camelCase.js
|
|
12658
|
-
var camelCase2 = createCompounder_default(function(result, word, index) {
|
|
12659
|
-
word = word.toLowerCase();
|
|
12660
|
-
return result + (index ? capitalize_default(word) : word);
|
|
12661
|
-
});
|
|
12662
|
-
var camelCase_default = camelCase2;
|
|
12663
12745
|
|
|
12664
|
-
//
|
|
12665
|
-
var
|
|
12666
|
-
return result + (index ? "_" : "") + word.toLowerCase();
|
|
12667
|
-
});
|
|
12668
|
-
var snakeCase_default = snakeCase;
|
|
12746
|
+
// src/readme/ReadmeGenerator.ts
|
|
12747
|
+
var import_string = require("es-toolkit/string");
|
|
12669
12748
|
|
|
12670
12749
|
// src/configuration/generated/api/index.ts
|
|
12671
12750
|
var api_exports = {};
|
|
@@ -12675,6 +12754,7 @@ __export(api_exports, {
|
|
|
12675
12754
|
Remote: () => Remote,
|
|
12676
12755
|
StructuredFeatureId: () => StructuredFeatureId,
|
|
12677
12756
|
feature: () => feature_exports,
|
|
12757
|
+
github: () => github_exports,
|
|
12678
12758
|
readme: () => readme_exports,
|
|
12679
12759
|
reference: () => reference_exports
|
|
12680
12760
|
});
|
|
@@ -12722,6 +12802,9 @@ var StructuredFeatureId = {
|
|
|
12722
12802
|
}
|
|
12723
12803
|
};
|
|
12724
12804
|
|
|
12805
|
+
// src/configuration/generated/api/resources/github/index.ts
|
|
12806
|
+
var github_exports = {};
|
|
12807
|
+
|
|
12725
12808
|
// src/configuration/generated/api/resources/readme/index.ts
|
|
12726
12809
|
var readme_exports = {};
|
|
12727
12810
|
__export(readme_exports, {
|
|
@@ -13042,7 +13125,9 @@ var ReadmeGenerator = class {
|
|
|
13042
13125
|
this.languageTitle = languageToTitle(this.readmeConfig.language);
|
|
13043
13126
|
this.organizationPascalCase = pascalCase(this.readmeConfig.organization);
|
|
13044
13127
|
}
|
|
13045
|
-
async generateReadme({
|
|
13128
|
+
async generateReadme({
|
|
13129
|
+
output
|
|
13130
|
+
}) {
|
|
13046
13131
|
const blocks = this.generateBlocks();
|
|
13047
13132
|
const writer = new StreamWriter(output);
|
|
13048
13133
|
this.writeHeader({ writer });
|
|
@@ -13056,16 +13141,32 @@ var ReadmeGenerator = class {
|
|
|
13056
13141
|
generateBlocks() {
|
|
13057
13142
|
const blocks = [];
|
|
13058
13143
|
if (this.readmeConfig.apiReferenceLink != null) {
|
|
13059
|
-
blocks.push(
|
|
13144
|
+
blocks.push(
|
|
13145
|
+
this.generateDocumentation({
|
|
13146
|
+
docsLink: this.readmeConfig.apiReferenceLink
|
|
13147
|
+
})
|
|
13148
|
+
);
|
|
13060
13149
|
}
|
|
13061
13150
|
if (this.readmeConfig.requirements != null) {
|
|
13062
|
-
blocks.push(
|
|
13151
|
+
blocks.push(
|
|
13152
|
+
this.generateRequirements({
|
|
13153
|
+
requirements: this.readmeConfig.requirements
|
|
13154
|
+
})
|
|
13155
|
+
);
|
|
13063
13156
|
}
|
|
13064
|
-
if (this.readmeConfig.language
|
|
13065
|
-
blocks.push(
|
|
13157
|
+
if (this.readmeConfig.language?.publishInfo != null) {
|
|
13158
|
+
blocks.push(
|
|
13159
|
+
this.generateInstallation({
|
|
13160
|
+
language: this.readmeConfig.language
|
|
13161
|
+
})
|
|
13162
|
+
);
|
|
13066
13163
|
}
|
|
13067
13164
|
if (this.readmeConfig.referenceMarkdownPath != null) {
|
|
13068
|
-
blocks.push(
|
|
13165
|
+
blocks.push(
|
|
13166
|
+
this.generateReference({
|
|
13167
|
+
referenceFile: this.readmeConfig.referenceMarkdownPath
|
|
13168
|
+
})
|
|
13169
|
+
);
|
|
13069
13170
|
}
|
|
13070
13171
|
const coreFeatures = this.readmeConfig.features?.filter((feat) => !this.isAdvanced(feat)) ?? [];
|
|
13071
13172
|
const advancedFeatures = this.readmeConfig.features?.filter((feat) => this.isAdvanced(feat)) ?? [];
|
|
@@ -13151,7 +13252,9 @@ var ReadmeGenerator = class {
|
|
|
13151
13252
|
if (originalReadmeContent == null) {
|
|
13152
13253
|
return blocks;
|
|
13153
13254
|
}
|
|
13154
|
-
const parsed = this.readmeParser.parse({
|
|
13255
|
+
const parsed = this.readmeParser.parse({
|
|
13256
|
+
content: originalReadmeContent
|
|
13257
|
+
});
|
|
13155
13258
|
const merger = new BlockMerger({
|
|
13156
13259
|
original: parsed.blocks,
|
|
13157
13260
|
updated: blocks
|
|
@@ -13171,16 +13274,24 @@ var ReadmeGenerator = class {
|
|
|
13171
13274
|
}
|
|
13172
13275
|
return void 0;
|
|
13173
13276
|
}
|
|
13174
|
-
writeBlocks({
|
|
13277
|
+
writeBlocks({
|
|
13278
|
+
writer,
|
|
13279
|
+
blocks
|
|
13280
|
+
}) {
|
|
13175
13281
|
for (const block of blocks) {
|
|
13176
13282
|
block.write(writer);
|
|
13177
13283
|
}
|
|
13178
13284
|
}
|
|
13179
13285
|
writeHeader({ writer }) {
|
|
13180
|
-
writer.writeLine(
|
|
13286
|
+
writer.writeLine(
|
|
13287
|
+
`# ${this.organizationPascalCase} ${this.languageTitle} Library`
|
|
13288
|
+
);
|
|
13181
13289
|
writer.writeLine();
|
|
13182
13290
|
if (this.readmeConfig.bannerLink != null) {
|
|
13183
|
-
this.writeBanner({
|
|
13291
|
+
this.writeBanner({
|
|
13292
|
+
writer,
|
|
13293
|
+
bannerLink: this.readmeConfig.bannerLink
|
|
13294
|
+
});
|
|
13184
13295
|
}
|
|
13185
13296
|
this.writeFernShield({ writer });
|
|
13186
13297
|
if (this.readmeConfig.language != null) {
|
|
@@ -13192,7 +13303,10 @@ var ReadmeGenerator = class {
|
|
|
13192
13303
|
writer.writeLine();
|
|
13193
13304
|
this.writeIntroudction({ writer });
|
|
13194
13305
|
}
|
|
13195
|
-
writeBanner({
|
|
13306
|
+
writeBanner({
|
|
13307
|
+
writer,
|
|
13308
|
+
bannerLink
|
|
13309
|
+
}) {
|
|
13196
13310
|
writer.writeLine(``);
|
|
13197
13311
|
writer.writeLine();
|
|
13198
13312
|
}
|
|
@@ -13212,25 +13326,33 @@ var ReadmeGenerator = class {
|
|
|
13212
13326
|
const writer = new StringWriter();
|
|
13213
13327
|
writer.writeLine("## Documentation");
|
|
13214
13328
|
writer.writeLine();
|
|
13215
|
-
writer.writeLine(
|
|
13329
|
+
writer.writeLine(
|
|
13330
|
+
`API reference documentation is available [here](${docsLink}).`
|
|
13331
|
+
);
|
|
13216
13332
|
writer.writeLine();
|
|
13217
13333
|
return new Block({
|
|
13218
13334
|
id: "DOCUMENTATION",
|
|
13219
13335
|
content: writer.toString()
|
|
13220
13336
|
});
|
|
13221
13337
|
}
|
|
13222
|
-
generateReference({
|
|
13338
|
+
generateReference({
|
|
13339
|
+
referenceFile
|
|
13340
|
+
}) {
|
|
13223
13341
|
const writer = new StringWriter();
|
|
13224
13342
|
writer.writeLine("## Reference");
|
|
13225
13343
|
writer.writeLine();
|
|
13226
|
-
writer.writeLine(
|
|
13344
|
+
writer.writeLine(
|
|
13345
|
+
`A full reference for this library is available [here](${referenceFile}).`
|
|
13346
|
+
);
|
|
13227
13347
|
writer.writeLine();
|
|
13228
13348
|
return new Block({
|
|
13229
13349
|
id: "REFERENCE",
|
|
13230
13350
|
content: writer.toString()
|
|
13231
13351
|
});
|
|
13232
13352
|
}
|
|
13233
|
-
generateRequirements({
|
|
13353
|
+
generateRequirements({
|
|
13354
|
+
requirements
|
|
13355
|
+
}) {
|
|
13234
13356
|
const writer = new StringWriter();
|
|
13235
13357
|
writer.writeLine("## Requirements");
|
|
13236
13358
|
writer.writeLine();
|
|
@@ -13248,7 +13370,9 @@ var ReadmeGenerator = class {
|
|
|
13248
13370
|
content: writer.toString()
|
|
13249
13371
|
});
|
|
13250
13372
|
}
|
|
13251
|
-
generateInstallation({
|
|
13373
|
+
generateInstallation({
|
|
13374
|
+
language
|
|
13375
|
+
}) {
|
|
13252
13376
|
if (language.publishInfo == null) {
|
|
13253
13377
|
throw new Error("publish information is required for installation block");
|
|
13254
13378
|
}
|
|
@@ -13300,7 +13424,10 @@ var ReadmeGenerator = class {
|
|
|
13300
13424
|
content: writer.toString()
|
|
13301
13425
|
});
|
|
13302
13426
|
}
|
|
13303
|
-
writeInstallationForNPM({
|
|
13427
|
+
writeInstallationForNPM({
|
|
13428
|
+
writer,
|
|
13429
|
+
npm
|
|
13430
|
+
}) {
|
|
13304
13431
|
writer.writeLine("```sh");
|
|
13305
13432
|
writer.writeLine(`npm i -s ${npm.packageName}`);
|
|
13306
13433
|
writer.writeLine("```");
|
|
@@ -13342,7 +13469,10 @@ var ReadmeGenerator = class {
|
|
|
13342
13469
|
writer.writeLine("```");
|
|
13343
13470
|
writer.writeLine();
|
|
13344
13471
|
}
|
|
13345
|
-
writeInstallationForGo({
|
|
13472
|
+
writeInstallationForGo({
|
|
13473
|
+
writer,
|
|
13474
|
+
go
|
|
13475
|
+
}) {
|
|
13346
13476
|
writer.writeLine("```sh");
|
|
13347
13477
|
writer.write(`go get github.com/${go.owner}/${go.repo}`);
|
|
13348
13478
|
const majorVersion = getMajorVersion(go.version);
|
|
@@ -13367,11 +13497,14 @@ var ReadmeGenerator = class {
|
|
|
13367
13497
|
nuget
|
|
13368
13498
|
}) {
|
|
13369
13499
|
writer.writeLine("```sh");
|
|
13370
|
-
writer.writeLine(`
|
|
13500
|
+
writer.writeLine(`dotnet add package ${nuget.packageName}`);
|
|
13371
13501
|
writer.writeLine("```");
|
|
13372
13502
|
writer.writeLine();
|
|
13373
13503
|
}
|
|
13374
|
-
writeShield({
|
|
13504
|
+
writeShield({
|
|
13505
|
+
writer,
|
|
13506
|
+
language
|
|
13507
|
+
}) {
|
|
13375
13508
|
switch (language.type) {
|
|
13376
13509
|
case "typescript": {
|
|
13377
13510
|
const npm = language.publishInfo;
|
|
@@ -13443,22 +13576,36 @@ var ReadmeGenerator = class {
|
|
|
13443
13576
|
assertNever(language);
|
|
13444
13577
|
}
|
|
13445
13578
|
}
|
|
13446
|
-
writeShieldForNPM({
|
|
13579
|
+
writeShieldForNPM({
|
|
13580
|
+
writer,
|
|
13581
|
+
npm
|
|
13582
|
+
}) {
|
|
13447
13583
|
writer.write("[![npm shield]");
|
|
13448
13584
|
writer.write(`(https://img.shields.io/npm/v/${npm.packageName})]`);
|
|
13449
13585
|
writer.writeLine(`(https://www.npmjs.com/package/${npm.packageName})`);
|
|
13450
13586
|
}
|
|
13451
|
-
writeShieldForPyPi({
|
|
13587
|
+
writeShieldForPyPi({
|
|
13588
|
+
writer,
|
|
13589
|
+
pypi
|
|
13590
|
+
}) {
|
|
13452
13591
|
writer.write("[![pypi]");
|
|
13453
13592
|
writer.write(`(https://img.shields.io/pypi/v/${pypi.packageName})]`);
|
|
13454
13593
|
writer.writeLine(`(https://pypi.python.org/pypi/${pypi.packageName})`);
|
|
13455
13594
|
}
|
|
13456
|
-
writeShieldForMaven({
|
|
13595
|
+
writeShieldForMaven({
|
|
13596
|
+
writer,
|
|
13597
|
+
maven
|
|
13598
|
+
}) {
|
|
13457
13599
|
writer.write("[![Maven Central]");
|
|
13458
13600
|
writer.write(`(https://img.shields.io/maven-central/v/${maven.artifact})]`);
|
|
13459
|
-
writer.writeLine(
|
|
13601
|
+
writer.writeLine(
|
|
13602
|
+
`(https://central.sonatype.com/artifact/${maven.group}/${maven.artifact})`
|
|
13603
|
+
);
|
|
13460
13604
|
}
|
|
13461
|
-
writeShieldForGo({
|
|
13605
|
+
writeShieldForGo({
|
|
13606
|
+
writer,
|
|
13607
|
+
go
|
|
13608
|
+
}) {
|
|
13462
13609
|
writer.write("[![go shield]");
|
|
13463
13610
|
writer.write("(https://img.shields.io/badge/go-docs-blue)]");
|
|
13464
13611
|
writer.writeLine(`(https://pkg.go.dev/github.com/${go.owner}/${go.repo})`);
|
|
@@ -13471,7 +13618,10 @@ var ReadmeGenerator = class {
|
|
|
13471
13618
|
writer.write(`(https://img.shields.io/gem/v/${rubyGems.packageName})]`);
|
|
13472
13619
|
writer.writeLine(`(https://rubygems.org/gems/${rubyGems.packageName})`);
|
|
13473
13620
|
}
|
|
13474
|
-
writeShieldForNuget({
|
|
13621
|
+
writeShieldForNuget({
|
|
13622
|
+
writer,
|
|
13623
|
+
nuget
|
|
13624
|
+
}) {
|
|
13475
13625
|
writer.write("[![nuget shield]");
|
|
13476
13626
|
writer.write(`(https://img.shields.io/nuget/v/${nuget.packageName})]`);
|
|
13477
13627
|
writer.writeLine(`(https://nuget.org/packages/${nuget.packageName})`);
|
|
@@ -13491,10 +13641,14 @@ On the other hand, contributions to the README are always very welcome!
|
|
|
13491
13641
|
`
|
|
13492
13642
|
});
|
|
13493
13643
|
}
|
|
13494
|
-
shouldSkipFeature({
|
|
13644
|
+
shouldSkipFeature({
|
|
13645
|
+
feature
|
|
13646
|
+
}) {
|
|
13495
13647
|
return !feature.snippetsAreOptional && (feature.snippets == null || feature.snippets.length === 0);
|
|
13496
13648
|
}
|
|
13497
|
-
shouldGenerateFeatures({
|
|
13649
|
+
shouldGenerateFeatures({
|
|
13650
|
+
features
|
|
13651
|
+
}) {
|
|
13498
13652
|
return features.some((feature) => !this.shouldSkipFeature({ feature }));
|
|
13499
13653
|
}
|
|
13500
13654
|
};
|
|
@@ -13520,7 +13674,7 @@ function featureIDToTitle(featureID) {
|
|
|
13520
13674
|
return featureID.split("_").map((s) => pascalCase(s)).join(" ");
|
|
13521
13675
|
}
|
|
13522
13676
|
function pascalCase(s) {
|
|
13523
|
-
return
|
|
13677
|
+
return (0, import_string.upperFirst)((0, import_string.camelCase)(s));
|
|
13524
13678
|
}
|
|
13525
13679
|
function getMajorVersion(version) {
|
|
13526
13680
|
return version.split(".")[0] ?? "0";
|
|
@@ -13530,6 +13684,7 @@ function assertNever(x) {
|
|
|
13530
13684
|
}
|
|
13531
13685
|
|
|
13532
13686
|
// src/readme/ReadmeParser.ts
|
|
13687
|
+
var import_string2 = require("es-toolkit/string");
|
|
13533
13688
|
var ReadmeParser = class {
|
|
13534
13689
|
parse({ content }) {
|
|
13535
13690
|
let header = "";
|
|
@@ -13560,7 +13715,7 @@ var ReadmeParser = class {
|
|
|
13560
13715
|
}
|
|
13561
13716
|
};
|
|
13562
13717
|
function sectionNameToID(sectionName) {
|
|
13563
|
-
return
|
|
13718
|
+
return (0, import_string2.snakeCase)(
|
|
13564
13719
|
sectionName.split(" ").map((word, index) => {
|
|
13565
13720
|
if (index === 0) {
|
|
13566
13721
|
return word;
|
|
@@ -13573,38 +13728,52 @@ function sectionNameToID(sectionName) {
|
|
|
13573
13728
|
// src/reference/ReferenceGenerator.ts
|
|
13574
13729
|
var ReferenceGenerator = class {
|
|
13575
13730
|
referenceConfig;
|
|
13576
|
-
constructor({
|
|
13731
|
+
constructor({
|
|
13732
|
+
referenceConfig
|
|
13733
|
+
}) {
|
|
13577
13734
|
this.referenceConfig = referenceConfig;
|
|
13578
13735
|
}
|
|
13579
13736
|
async generate({ output }) {
|
|
13580
13737
|
const writer = new StreamWriter(output);
|
|
13581
13738
|
writer.writeLine("# Reference");
|
|
13582
13739
|
if (this.referenceConfig.rootSection != null) {
|
|
13583
|
-
this.writeRootSection({
|
|
13740
|
+
this.writeRootSection({
|
|
13741
|
+
section: this.referenceConfig.rootSection,
|
|
13742
|
+
writer
|
|
13743
|
+
});
|
|
13584
13744
|
}
|
|
13585
13745
|
for (const section of this.referenceConfig.sections) {
|
|
13586
13746
|
this.writeSection({ section, writer });
|
|
13587
13747
|
}
|
|
13588
13748
|
writer.end();
|
|
13589
13749
|
}
|
|
13590
|
-
writeRootSection({
|
|
13750
|
+
writeRootSection({
|
|
13751
|
+
section,
|
|
13752
|
+
writer
|
|
13753
|
+
}) {
|
|
13591
13754
|
if (section.description != null) {
|
|
13592
|
-
writer.writeLine(
|
|
13755
|
+
writer.writeLine(section.description);
|
|
13593
13756
|
}
|
|
13594
13757
|
for (const endpoint of section.endpoints) {
|
|
13595
13758
|
this.writeEndpoint({ endpoint, writer });
|
|
13596
13759
|
}
|
|
13597
13760
|
}
|
|
13598
|
-
writeSection({
|
|
13761
|
+
writeSection({
|
|
13762
|
+
section,
|
|
13763
|
+
writer
|
|
13764
|
+
}) {
|
|
13599
13765
|
writer.writeLine(`## ${section.title}`);
|
|
13600
13766
|
if (section.description != null) {
|
|
13601
|
-
writer.writeLine(
|
|
13767
|
+
writer.writeLine(section.description);
|
|
13602
13768
|
}
|
|
13603
13769
|
for (const endpoint of section.endpoints) {
|
|
13604
13770
|
this.writeEndpoint({ endpoint, writer });
|
|
13605
13771
|
}
|
|
13606
13772
|
}
|
|
13607
|
-
writeEndpoint({
|
|
13773
|
+
writeEndpoint({
|
|
13774
|
+
endpoint,
|
|
13775
|
+
writer
|
|
13776
|
+
}) {
|
|
13608
13777
|
const stringWriter = new StringWriter();
|
|
13609
13778
|
if (endpoint.description != null) {
|
|
13610
13779
|
stringWriter.writeLine(
|
|
@@ -13629,7 +13798,9 @@ ${this.writeIndentedBlock(
|
|
|
13629
13798
|
`#### \u2699\uFE0F Parameters
|
|
13630
13799
|
|
|
13631
13800
|
${this.writeIndentedBlock(
|
|
13632
|
-
endpoint.parameters.map(
|
|
13801
|
+
endpoint.parameters.map(
|
|
13802
|
+
(parameter) => this.writeIndentedBlock(this.writeParameter(parameter))
|
|
13803
|
+
).join("\n\n")
|
|
13633
13804
|
)}
|
|
13634
13805
|
`
|
|
13635
13806
|
);
|
|
@@ -13638,7 +13809,9 @@ ${this.writeIndentedBlock(
|
|
|
13638
13809
|
if (endpoint.title.returnValue != null) {
|
|
13639
13810
|
linkedSnippet += ` -> ${this.wrapInLink(endpoint.title.returnValue.text, endpoint.title.returnValue.location)}`;
|
|
13640
13811
|
}
|
|
13641
|
-
writer.writeLine(
|
|
13812
|
+
writer.writeLine(
|
|
13813
|
+
`<details><summary><code>${linkedSnippet}</code></summary>`
|
|
13814
|
+
);
|
|
13642
13815
|
writer.writeLine(this.writeIndentedBlock(stringWriter.toString()));
|
|
13643
13816
|
writer.writeLine("</details>\n");
|
|
13644
13817
|
}
|
|
@@ -13680,17 +13853,19 @@ void yargs_default(hideBin(process.argv)).scriptName(process.env.CLI_NAME ?? "ge
|
|
|
13680
13853
|
}),
|
|
13681
13854
|
async (argv) => {
|
|
13682
13855
|
if (argv.config == null) {
|
|
13683
|
-
process.stderr.write(
|
|
13856
|
+
process.stderr.write(
|
|
13857
|
+
"missing required arguments; please specify the --config flag\n"
|
|
13858
|
+
);
|
|
13684
13859
|
process.exit(1);
|
|
13685
13860
|
}
|
|
13686
13861
|
const wd = cwd();
|
|
13687
13862
|
const readmeConfig = await loadReadmeConfig({
|
|
13688
|
-
absolutePathToConfig:
|
|
13863
|
+
absolutePathToConfig: resolve5(wd, argv.config)
|
|
13689
13864
|
});
|
|
13690
13865
|
const generator = new ReadmeGenerator({
|
|
13691
13866
|
readmeParser: new ReadmeParser(),
|
|
13692
13867
|
readmeConfig,
|
|
13693
|
-
originalReadme: argv.originalReadme != null ? await (0,
|
|
13868
|
+
originalReadme: argv.originalReadme != null ? await (0, import_promises6.readFile)(argv.originalReadme, "utf8") : void 0
|
|
13694
13869
|
});
|
|
13695
13870
|
await generator.generateReadme({
|
|
13696
13871
|
output: await createWriteStream(argv.output)
|
|
@@ -13709,12 +13884,14 @@ void yargs_default(hideBin(process.argv)).scriptName(process.env.CLI_NAME ?? "ge
|
|
|
13709
13884
|
}),
|
|
13710
13885
|
async (argv) => {
|
|
13711
13886
|
if (argv.config == null) {
|
|
13712
|
-
process.stderr.write(
|
|
13887
|
+
process.stderr.write(
|
|
13888
|
+
"missing required arguments; please specify the --config flag\n"
|
|
13889
|
+
);
|
|
13713
13890
|
process.exit(1);
|
|
13714
13891
|
}
|
|
13715
13892
|
const wd = cwd();
|
|
13716
13893
|
const referenceConfig = await loadReferenceConfig({
|
|
13717
|
-
absolutePathToConfig:
|
|
13894
|
+
absolutePathToConfig: resolve5(wd, argv.config)
|
|
13718
13895
|
});
|
|
13719
13896
|
const generator = new ReferenceGenerator({
|
|
13720
13897
|
referenceConfig
|
|
@@ -13724,13 +13901,105 @@ void yargs_default(hideBin(process.argv)).scriptName(process.env.CLI_NAME ?? "ge
|
|
|
13724
13901
|
});
|
|
13725
13902
|
process.exit(0);
|
|
13726
13903
|
}
|
|
13727
|
-
).
|
|
13904
|
+
).command("github", "GitHub operations", (yargs) => {
|
|
13905
|
+
return yargs.command(
|
|
13906
|
+
"push",
|
|
13907
|
+
"Push changes to GitHub",
|
|
13908
|
+
(subYargs) => {
|
|
13909
|
+
return subYargs.option("config", {
|
|
13910
|
+
string: true,
|
|
13911
|
+
required: true,
|
|
13912
|
+
description: "Path to configuration file"
|
|
13913
|
+
});
|
|
13914
|
+
},
|
|
13915
|
+
async (argv) => {
|
|
13916
|
+
if (argv.config == null) {
|
|
13917
|
+
process.stderr.write(
|
|
13918
|
+
"missing required arguments; please specify the --config flag\n"
|
|
13919
|
+
);
|
|
13920
|
+
process.exit(1);
|
|
13921
|
+
}
|
|
13922
|
+
const wd = cwd();
|
|
13923
|
+
const githubConfig = await loadGitHubConfig({
|
|
13924
|
+
absolutePathToConfig: resolve5(wd, argv.config)
|
|
13925
|
+
});
|
|
13926
|
+
const github = new GitHub({
|
|
13927
|
+
githubConfig
|
|
13928
|
+
});
|
|
13929
|
+
await github.push();
|
|
13930
|
+
process.exit(0);
|
|
13931
|
+
}
|
|
13932
|
+
).command(
|
|
13933
|
+
"pr",
|
|
13934
|
+
"Create a pull request on GitHub",
|
|
13935
|
+
(subYargs) => {
|
|
13936
|
+
return subYargs.option("config", {
|
|
13937
|
+
string: true,
|
|
13938
|
+
required: true,
|
|
13939
|
+
description: "Path to configuration file"
|
|
13940
|
+
});
|
|
13941
|
+
},
|
|
13942
|
+
async (argv) => {
|
|
13943
|
+
if (argv.config == null) {
|
|
13944
|
+
process.stderr.write(
|
|
13945
|
+
"missing required arguments; please specify the --config flag\n"
|
|
13946
|
+
);
|
|
13947
|
+
process.exit(1);
|
|
13948
|
+
}
|
|
13949
|
+
const wd = cwd();
|
|
13950
|
+
const githubConfig = await loadGitHubConfig({
|
|
13951
|
+
absolutePathToConfig: resolve5(wd, argv.config)
|
|
13952
|
+
});
|
|
13953
|
+
const github = new GitHub({
|
|
13954
|
+
githubConfig
|
|
13955
|
+
});
|
|
13956
|
+
await github.pr();
|
|
13957
|
+
process.stderr.write(
|
|
13958
|
+
`Creating PR on GitHub with config: ${resolve5(wd, argv.config)}
|
|
13959
|
+
`
|
|
13960
|
+
);
|
|
13961
|
+
process.exit(0);
|
|
13962
|
+
}
|
|
13963
|
+
).command(
|
|
13964
|
+
"release",
|
|
13965
|
+
"Create a release on GitHub",
|
|
13966
|
+
(subYargs) => {
|
|
13967
|
+
return subYargs.option("config", {
|
|
13968
|
+
string: true,
|
|
13969
|
+
required: true,
|
|
13970
|
+
description: "Path to configuration file"
|
|
13971
|
+
});
|
|
13972
|
+
},
|
|
13973
|
+
async (argv) => {
|
|
13974
|
+
if (argv.config == null) {
|
|
13975
|
+
process.stderr.write(
|
|
13976
|
+
"missing required arguments; please specify the --config flag\n"
|
|
13977
|
+
);
|
|
13978
|
+
const wd2 = cwd();
|
|
13979
|
+
const githubConfig = await loadGitHubConfig({
|
|
13980
|
+
absolutePathToConfig: resolve5(wd2, argv.config)
|
|
13981
|
+
});
|
|
13982
|
+
const github = new GitHub({
|
|
13983
|
+
githubConfig
|
|
13984
|
+
});
|
|
13985
|
+
await github.release();
|
|
13986
|
+
process.exit(1);
|
|
13987
|
+
}
|
|
13988
|
+
const wd = cwd();
|
|
13989
|
+
process.stderr.write(
|
|
13990
|
+
`Creating release on GitHub with config: ${resolve5(wd, argv.config)}
|
|
13991
|
+
`
|
|
13992
|
+
);
|
|
13993
|
+
process.exit(0);
|
|
13994
|
+
}
|
|
13995
|
+
).demandCommand();
|
|
13996
|
+
}).demandCommand().showHelpOnFail(true).parse();
|
|
13728
13997
|
async function createWriteStream(outputPath) {
|
|
13729
|
-
return outputPath != null ? await createWriteStreamFromFile(
|
|
13998
|
+
return outputPath != null ? await createWriteStreamFromFile(resolve5(cwd(), outputPath)) : process.stdout;
|
|
13730
13999
|
}
|
|
13731
14000
|
async function createWriteStreamFromFile(filepath) {
|
|
13732
|
-
if (!doesPathExist(filepath)) {
|
|
13733
|
-
await (0,
|
|
14001
|
+
if (!await doesPathExist(filepath)) {
|
|
14002
|
+
await (0, import_promises6.mkdir)(import_path7.default.dirname(filepath), { recursive: true });
|
|
13734
14003
|
}
|
|
13735
14004
|
return import_fs5.default.createWriteStream(filepath);
|
|
13736
14005
|
}
|
|
@@ -13782,15 +14051,4 @@ yargs-parser/build/lib/index.js:
|
|
|
13782
14051
|
* Copyright (c) 2016, Contributors
|
|
13783
14052
|
* SPDX-License-Identifier: ISC
|
|
13784
14053
|
*)
|
|
13785
|
-
|
|
13786
|
-
lodash-es/lodash.js:
|
|
13787
|
-
(**
|
|
13788
|
-
* @license
|
|
13789
|
-
* Lodash (Custom Build) <https://lodash.com/>
|
|
13790
|
-
* Build: `lodash modularize exports="es" -o ./`
|
|
13791
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
13792
|
-
* Released under MIT license <https://lodash.com/license>
|
|
13793
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
13794
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
13795
|
-
*)
|
|
13796
14054
|
*/
|