@settlemint/sdk-cli 2.6.4-prcaecfe2c → 2.6.4-prd23d0ad7
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.js +1044 -1810
- package/dist/cli.js.map +21 -32
- package/package.json +9 -9
package/dist/cli.js
CHANGED
|
@@ -13725,9 +13725,9 @@ var require_run = __commonJS((exports, module) => {
|
|
|
13725
13725
|
row.type = TYPE_ENV;
|
|
13726
13726
|
row.string = env2;
|
|
13727
13727
|
try {
|
|
13728
|
-
const { parsed, errors:
|
|
13728
|
+
const { parsed, errors: errors4, injected, preExisted } = new Parse(env2, null, this.processEnv, this.overload).run();
|
|
13729
13729
|
row.parsed = parsed;
|
|
13730
|
-
row.errors =
|
|
13730
|
+
row.errors = errors4;
|
|
13731
13731
|
row.injected = injected;
|
|
13732
13732
|
row.preExisted = preExisted;
|
|
13733
13733
|
this.inject(row.parsed);
|
|
@@ -13751,12 +13751,12 @@ var require_run = __commonJS((exports, module) => {
|
|
|
13751
13751
|
this.readableFilepaths.add(envFilepath);
|
|
13752
13752
|
const privateKey = findPrivateKey(envFilepath, this.envKeysFilepath, this.opsOn);
|
|
13753
13753
|
const privateKeyName = guessPrivateKeyName(envFilepath);
|
|
13754
|
-
const { parsed, errors:
|
|
13754
|
+
const { parsed, errors: errors4, injected, preExisted } = new Parse(src, privateKey, this.processEnv, this.overload, privateKeyName).run();
|
|
13755
13755
|
row.privateKeyName = privateKeyName;
|
|
13756
13756
|
row.privateKey = privateKey;
|
|
13757
13757
|
row.src = src;
|
|
13758
13758
|
row.parsed = parsed;
|
|
13759
|
-
row.errors =
|
|
13759
|
+
row.errors = errors4;
|
|
13760
13760
|
row.injected = injected;
|
|
13761
13761
|
row.preExisted = preExisted;
|
|
13762
13762
|
this.inject(row.parsed);
|
|
@@ -13807,9 +13807,9 @@ var require_run = __commonJS((exports, module) => {
|
|
|
13807
13807
|
}
|
|
13808
13808
|
}
|
|
13809
13809
|
try {
|
|
13810
|
-
const { parsed, errors:
|
|
13810
|
+
const { parsed, errors: errors4, injected, preExisted } = new Parse(decrypted, null, this.processEnv, this.overload).run();
|
|
13811
13811
|
row.parsed = parsed;
|
|
13812
|
-
row.errors =
|
|
13812
|
+
row.errors = errors4;
|
|
13813
13813
|
row.injected = injected;
|
|
13814
13814
|
row.preExisted = preExisted;
|
|
13815
13815
|
this.inject(row.parsed);
|
|
@@ -14206,10 +14206,10 @@ var require_get = __commonJS((exports, module) => {
|
|
|
14206
14206
|
run() {
|
|
14207
14207
|
const processEnv = { ...process.env };
|
|
14208
14208
|
const { processedEnvs } = new Run(this.envs, this.overload, this.DOTENV_KEY, processEnv, this.envKeysFilepath).run();
|
|
14209
|
-
const
|
|
14209
|
+
const errors4 = [];
|
|
14210
14210
|
for (const processedEnv of processedEnvs) {
|
|
14211
14211
|
for (const error46 of processedEnv.errors) {
|
|
14212
|
-
|
|
14212
|
+
errors4.push(error46);
|
|
14213
14213
|
}
|
|
14214
14214
|
}
|
|
14215
14215
|
if (this.key) {
|
|
@@ -14217,12 +14217,12 @@ var require_get = __commonJS((exports, module) => {
|
|
|
14217
14217
|
const value = processEnv[this.key];
|
|
14218
14218
|
parsed[this.key] = value;
|
|
14219
14219
|
if (value === undefined) {
|
|
14220
|
-
|
|
14220
|
+
errors4.push(new Errors({ key: this.key }).missingKey());
|
|
14221
14221
|
}
|
|
14222
|
-
return { parsed, errors:
|
|
14222
|
+
return { parsed, errors: errors4 };
|
|
14223
14223
|
} else {
|
|
14224
14224
|
if (this.all) {
|
|
14225
|
-
return { parsed: processEnv, errors:
|
|
14225
|
+
return { parsed: processEnv, errors: errors4 };
|
|
14226
14226
|
}
|
|
14227
14227
|
const parsed = {};
|
|
14228
14228
|
for (const processedEnv of processedEnvs) {
|
|
@@ -14232,7 +14232,7 @@ var require_get = __commonJS((exports, module) => {
|
|
|
14232
14232
|
}
|
|
14233
14233
|
}
|
|
14234
14234
|
}
|
|
14235
|
-
return { parsed, errors:
|
|
14235
|
+
return { parsed, errors: errors4 };
|
|
14236
14236
|
}
|
|
14237
14237
|
}
|
|
14238
14238
|
}
|
|
@@ -14985,8 +14985,8 @@ var require_main2 = __commonJS((exports, module) => {
|
|
|
14985
14985
|
}
|
|
14986
14986
|
const privateKey = options.privateKey || null;
|
|
14987
14987
|
const overload = options.overload || options.override;
|
|
14988
|
-
const { parsed, errors:
|
|
14989
|
-
for (const error46 of
|
|
14988
|
+
const { parsed, errors: errors4 } = new Parse(src, privateKey, processEnv, overload).run();
|
|
14989
|
+
for (const error46 of errors4) {
|
|
14990
14990
|
logger.error(error46.message);
|
|
14991
14991
|
if (error46.help) {
|
|
14992
14992
|
logger.error(error46.help);
|
|
@@ -15053,8 +15053,8 @@ var require_main2 = __commonJS((exports, module) => {
|
|
|
15053
15053
|
var get = function(key, options = {}) {
|
|
15054
15054
|
const envs = buildEnvs(options);
|
|
15055
15055
|
const ignore = options.ignore || [];
|
|
15056
|
-
const { parsed, errors:
|
|
15057
|
-
for (const error46 of
|
|
15056
|
+
const { parsed, errors: errors4 } = new Get(key, envs, options.overload, process.env.DOTENV_KEY, options.all, options.envKeysFile).run();
|
|
15057
|
+
for (const error46 of errors4 || []) {
|
|
15058
15058
|
if (ignore.includes(error46.code)) {
|
|
15059
15059
|
continue;
|
|
15060
15060
|
}
|
|
@@ -20378,14 +20378,14 @@ var require_validate = __commonJS((exports) => {
|
|
|
20378
20378
|
validateRootTypes(context);
|
|
20379
20379
|
validateDirectives(context);
|
|
20380
20380
|
validateTypes(context);
|
|
20381
|
-
const
|
|
20382
|
-
schema.__validationErrors =
|
|
20383
|
-
return
|
|
20381
|
+
const errors4 = context.getErrors();
|
|
20382
|
+
schema.__validationErrors = errors4;
|
|
20383
|
+
return errors4;
|
|
20384
20384
|
}
|
|
20385
20385
|
function assertValidSchema(schema) {
|
|
20386
|
-
const
|
|
20387
|
-
if (
|
|
20388
|
-
throw new Error(
|
|
20386
|
+
const errors4 = validateSchema(schema);
|
|
20387
|
+
if (errors4.length !== 0) {
|
|
20388
|
+
throw new Error(errors4.map((error46) => error46.message).join(`
|
|
20389
20389
|
|
|
20390
20390
|
`));
|
|
20391
20391
|
}
|
|
@@ -22602,25 +22602,25 @@ var require_values = __commonJS((exports) => {
|
|
|
22602
22602
|
var _typeFromAST = require_typeFromAST();
|
|
22603
22603
|
var _valueFromAST = require_valueFromAST();
|
|
22604
22604
|
function getVariableValues(schema, varDefNodes, inputs, options) {
|
|
22605
|
-
const
|
|
22605
|
+
const errors4 = [];
|
|
22606
22606
|
const maxErrors = options === null || options === undefined ? undefined : options.maxErrors;
|
|
22607
22607
|
try {
|
|
22608
22608
|
const coerced = coerceVariableValues(schema, varDefNodes, inputs, (error46) => {
|
|
22609
|
-
if (maxErrors != null &&
|
|
22609
|
+
if (maxErrors != null && errors4.length >= maxErrors) {
|
|
22610
22610
|
throw new _GraphQLError.GraphQLError("Too many errors processing variables, error limit reached. Execution aborted.");
|
|
22611
22611
|
}
|
|
22612
|
-
|
|
22612
|
+
errors4.push(error46);
|
|
22613
22613
|
});
|
|
22614
|
-
if (
|
|
22614
|
+
if (errors4.length === 0) {
|
|
22615
22615
|
return {
|
|
22616
22616
|
coerced
|
|
22617
22617
|
};
|
|
22618
22618
|
}
|
|
22619
22619
|
} catch (error46) {
|
|
22620
|
-
|
|
22620
|
+
errors4.push(error46);
|
|
22621
22621
|
}
|
|
22622
22622
|
return {
|
|
22623
|
-
errors:
|
|
22623
|
+
errors: errors4
|
|
22624
22624
|
};
|
|
22625
22625
|
}
|
|
22626
22626
|
function coerceVariableValues(schema, varDefNodes, inputs, onError) {
|
|
@@ -23869,13 +23869,13 @@ var require_validate2 = __commonJS((exports) => {
|
|
|
23869
23869
|
documentAST || (0, _devAssert.devAssert)(false, "Must provide document.");
|
|
23870
23870
|
(0, _validate.assertValidSchema)(schema);
|
|
23871
23871
|
const abortObj = Object.freeze({});
|
|
23872
|
-
const
|
|
23872
|
+
const errors4 = [];
|
|
23873
23873
|
const context = new _ValidationContext.ValidationContext(schema, documentAST, typeInfo, (error46) => {
|
|
23874
|
-
if (
|
|
23875
|
-
|
|
23874
|
+
if (errors4.length >= maxErrors) {
|
|
23875
|
+
errors4.push(new _GraphQLError.GraphQLError("Too many validation errors, error limit reached. Validation aborted."));
|
|
23876
23876
|
throw abortObj;
|
|
23877
23877
|
}
|
|
23878
|
-
|
|
23878
|
+
errors4.push(error46);
|
|
23879
23879
|
});
|
|
23880
23880
|
const visitor = (0, _visitor.visitInParallel)(rules.map((rule) => rule(context)));
|
|
23881
23881
|
try {
|
|
@@ -23885,29 +23885,29 @@ var require_validate2 = __commonJS((exports) => {
|
|
|
23885
23885
|
throw e;
|
|
23886
23886
|
}
|
|
23887
23887
|
}
|
|
23888
|
-
return
|
|
23888
|
+
return errors4;
|
|
23889
23889
|
}
|
|
23890
23890
|
function validateSDL(documentAST, schemaToExtend, rules = _specifiedRules.specifiedSDLRules) {
|
|
23891
|
-
const
|
|
23891
|
+
const errors4 = [];
|
|
23892
23892
|
const context = new _ValidationContext.SDLValidationContext(documentAST, schemaToExtend, (error46) => {
|
|
23893
|
-
|
|
23893
|
+
errors4.push(error46);
|
|
23894
23894
|
});
|
|
23895
23895
|
const visitors = rules.map((rule) => rule(context));
|
|
23896
23896
|
(0, _visitor.visit)(documentAST, (0, _visitor.visitInParallel)(visitors));
|
|
23897
|
-
return
|
|
23897
|
+
return errors4;
|
|
23898
23898
|
}
|
|
23899
23899
|
function assertValidSDL(documentAST) {
|
|
23900
|
-
const
|
|
23901
|
-
if (
|
|
23902
|
-
throw new Error(
|
|
23900
|
+
const errors4 = validateSDL(documentAST);
|
|
23901
|
+
if (errors4.length !== 0) {
|
|
23902
|
+
throw new Error(errors4.map((error46) => error46.message).join(`
|
|
23903
23903
|
|
|
23904
23904
|
`));
|
|
23905
23905
|
}
|
|
23906
23906
|
}
|
|
23907
23907
|
function assertValidSDLExtension(documentAST, schema) {
|
|
23908
|
-
const
|
|
23909
|
-
if (
|
|
23910
|
-
throw new Error(
|
|
23908
|
+
const errors4 = validateSDL(documentAST, schema);
|
|
23909
|
+
if (errors4.length !== 0) {
|
|
23910
|
+
throw new Error(errors4.map((error46) => error46.message).join(`
|
|
23911
23911
|
|
|
23912
23912
|
`));
|
|
23913
23913
|
}
|
|
@@ -24090,11 +24090,11 @@ var require_execute = __commonJS((exports) => {
|
|
|
24090
24090
|
}
|
|
24091
24091
|
return result;
|
|
24092
24092
|
}
|
|
24093
|
-
function buildResponse(data,
|
|
24094
|
-
return
|
|
24093
|
+
function buildResponse(data, errors4) {
|
|
24094
|
+
return errors4.length === 0 ? {
|
|
24095
24095
|
data
|
|
24096
24096
|
} : {
|
|
24097
|
-
errors:
|
|
24097
|
+
errors: errors4,
|
|
24098
24098
|
data
|
|
24099
24099
|
};
|
|
24100
24100
|
}
|
|
@@ -41287,34 +41287,34 @@ var require_lib7 = __commonJS((exports, module) => {
|
|
|
41287
41287
|
];
|
|
41288
41288
|
function validate3(name2) {
|
|
41289
41289
|
var warnings = [];
|
|
41290
|
-
var
|
|
41290
|
+
var errors4 = [];
|
|
41291
41291
|
if (name2 === null) {
|
|
41292
|
-
|
|
41293
|
-
return done(warnings,
|
|
41292
|
+
errors4.push("name cannot be null");
|
|
41293
|
+
return done(warnings, errors4);
|
|
41294
41294
|
}
|
|
41295
41295
|
if (name2 === undefined) {
|
|
41296
|
-
|
|
41297
|
-
return done(warnings,
|
|
41296
|
+
errors4.push("name cannot be undefined");
|
|
41297
|
+
return done(warnings, errors4);
|
|
41298
41298
|
}
|
|
41299
41299
|
if (typeof name2 !== "string") {
|
|
41300
|
-
|
|
41301
|
-
return done(warnings,
|
|
41300
|
+
errors4.push("name must be a string");
|
|
41301
|
+
return done(warnings, errors4);
|
|
41302
41302
|
}
|
|
41303
41303
|
if (!name2.length) {
|
|
41304
|
-
|
|
41304
|
+
errors4.push("name length must be greater than zero");
|
|
41305
41305
|
}
|
|
41306
41306
|
if (name2.startsWith(".")) {
|
|
41307
|
-
|
|
41307
|
+
errors4.push("name cannot start with a period");
|
|
41308
41308
|
}
|
|
41309
41309
|
if (name2.match(/^_/)) {
|
|
41310
|
-
|
|
41310
|
+
errors4.push("name cannot start with an underscore");
|
|
41311
41311
|
}
|
|
41312
41312
|
if (name2.trim() !== name2) {
|
|
41313
|
-
|
|
41313
|
+
errors4.push("name cannot contain leading or trailing spaces");
|
|
41314
41314
|
}
|
|
41315
41315
|
exclusionList.forEach(function(excludedName) {
|
|
41316
41316
|
if (name2.toLowerCase() === excludedName) {
|
|
41317
|
-
|
|
41317
|
+
errors4.push(excludedName + " is not a valid package name");
|
|
41318
41318
|
}
|
|
41319
41319
|
});
|
|
41320
41320
|
if (builtins.includes(name2.toLowerCase())) {
|
|
@@ -41335,22 +41335,22 @@ var require_lib7 = __commonJS((exports, module) => {
|
|
|
41335
41335
|
var user = nameMatch[1];
|
|
41336
41336
|
var pkg = nameMatch[2];
|
|
41337
41337
|
if (pkg.startsWith(".")) {
|
|
41338
|
-
|
|
41338
|
+
errors4.push("name cannot start with a period");
|
|
41339
41339
|
}
|
|
41340
41340
|
if (encodeURIComponent(user) === user && encodeURIComponent(pkg) === pkg) {
|
|
41341
|
-
return done(warnings,
|
|
41341
|
+
return done(warnings, errors4);
|
|
41342
41342
|
}
|
|
41343
41343
|
}
|
|
41344
|
-
|
|
41344
|
+
errors4.push("name can only contain URL-friendly characters");
|
|
41345
41345
|
}
|
|
41346
|
-
return done(warnings,
|
|
41346
|
+
return done(warnings, errors4);
|
|
41347
41347
|
}
|
|
41348
|
-
var done = function(warnings,
|
|
41348
|
+
var done = function(warnings, errors4) {
|
|
41349
41349
|
var result = {
|
|
41350
|
-
validForNewPackages:
|
|
41351
|
-
validForOldPackages:
|
|
41350
|
+
validForNewPackages: errors4.length === 0 && warnings.length === 0,
|
|
41351
|
+
validForOldPackages: errors4.length === 0,
|
|
41352
41352
|
warnings,
|
|
41353
|
-
errors:
|
|
41353
|
+
errors: errors4
|
|
41354
41354
|
};
|
|
41355
41355
|
if (!result.warnings.length) {
|
|
41356
41356
|
delete result.warnings;
|
|
@@ -41916,7 +41916,7 @@ var require_dev_engines = __commonJS((exports, module) => {
|
|
|
41916
41916
|
if (typeof wanted !== "object" || wanted === null || Array.isArray(wanted)) {
|
|
41917
41917
|
throw new Error(`Invalid non-object value for "devEngines"`);
|
|
41918
41918
|
}
|
|
41919
|
-
const
|
|
41919
|
+
const errors4 = [];
|
|
41920
41920
|
for (const engine of Object.keys(wanted)) {
|
|
41921
41921
|
if (!recognizedEngines.includes(engine)) {
|
|
41922
41922
|
throw new Error(`Invalid property "devEngines.${engine}"`);
|
|
@@ -41949,10 +41949,10 @@ var require_dev_engines = __commonJS((exports, module) => {
|
|
|
41949
41949
|
current: currentEngine,
|
|
41950
41950
|
required: dependencyAsAuthored
|
|
41951
41951
|
});
|
|
41952
|
-
|
|
41952
|
+
errors4.push(err);
|
|
41953
41953
|
}
|
|
41954
41954
|
}
|
|
41955
|
-
return
|
|
41955
|
+
return errors4;
|
|
41956
41956
|
}
|
|
41957
41957
|
module.exports = {
|
|
41958
41958
|
checkDevEngines
|
|
@@ -49827,8 +49827,8 @@ m2: ${this.mapper2.__debugToString().split(`
|
|
|
49827
49827
|
node.text = renderFlowNode(node.flowNode, node.circular);
|
|
49828
49828
|
computeLevel(node);
|
|
49829
49829
|
}
|
|
49830
|
-
const
|
|
49831
|
-
const columnWidths = computeColumnWidths(
|
|
49830
|
+
const height2 = computeHeight(root);
|
|
49831
|
+
const columnWidths = computeColumnWidths(height2);
|
|
49832
49832
|
computeLanes(root, 0);
|
|
49833
49833
|
return renderGraph();
|
|
49834
49834
|
function isFlowSwitchClause(f2) {
|
|
@@ -49912,14 +49912,14 @@ m2: ${this.mapper2.__debugToString().split(`
|
|
|
49912
49912
|
return node.level = level;
|
|
49913
49913
|
}
|
|
49914
49914
|
function computeHeight(node) {
|
|
49915
|
-
let
|
|
49915
|
+
let height22 = 0;
|
|
49916
49916
|
for (const child of getChildren(node)) {
|
|
49917
|
-
|
|
49917
|
+
height22 = Math.max(height22, computeHeight(child));
|
|
49918
49918
|
}
|
|
49919
|
-
return
|
|
49919
|
+
return height22 + 1;
|
|
49920
49920
|
}
|
|
49921
|
-
function computeColumnWidths(
|
|
49922
|
-
const columns = fill(Array(
|
|
49921
|
+
function computeColumnWidths(height22) {
|
|
49922
|
+
const columns = fill(Array(height22), 0);
|
|
49923
49923
|
for (const node of nodes) {
|
|
49924
49924
|
columns[node.level] = Math.max(columns[node.level], node.text.length);
|
|
49925
49925
|
}
|
|
@@ -59744,19 +59744,19 @@ ${lanes.join(`
|
|
|
59744
59744
|
return node.flags;
|
|
59745
59745
|
}
|
|
59746
59746
|
var supportedLocaleDirectories = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-br", "ru", "tr", "zh-cn", "zh-tw"];
|
|
59747
|
-
function validateLocaleAndSetLanguage(locale, sys2,
|
|
59747
|
+
function validateLocaleAndSetLanguage(locale, sys2, errors4) {
|
|
59748
59748
|
const lowerCaseLocale = locale.toLowerCase();
|
|
59749
59749
|
const matchResult = /^([a-z]+)(?:[_-]([a-z]+))?$/.exec(lowerCaseLocale);
|
|
59750
59750
|
if (!matchResult) {
|
|
59751
|
-
if (
|
|
59752
|
-
|
|
59751
|
+
if (errors4) {
|
|
59752
|
+
errors4.push(createCompilerDiagnostic(Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp"));
|
|
59753
59753
|
}
|
|
59754
59754
|
return;
|
|
59755
59755
|
}
|
|
59756
59756
|
const language = matchResult[1];
|
|
59757
59757
|
const territory = matchResult[2];
|
|
59758
|
-
if (contains(supportedLocaleDirectories, lowerCaseLocale) && !trySetLanguageAndTerritory(language, territory,
|
|
59759
|
-
trySetLanguageAndTerritory(language, undefined,
|
|
59758
|
+
if (contains(supportedLocaleDirectories, lowerCaseLocale) && !trySetLanguageAndTerritory(language, territory, errors4)) {
|
|
59759
|
+
trySetLanguageAndTerritory(language, undefined, errors4);
|
|
59760
59760
|
}
|
|
59761
59761
|
setUILocale(locale);
|
|
59762
59762
|
function trySetLanguageAndTerritory(language2, territory2, errors22) {
|
|
@@ -84599,16 +84599,16 @@ ${lanes.join(`
|
|
|
84599
84599
|
const stringNames = (opt.deprecatedKeys ? namesOfType.filter((k2) => !opt.deprecatedKeys.has(k2)) : namesOfType).map((key) => `'${key}'`).join(", ");
|
|
84600
84600
|
return createDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, stringNames);
|
|
84601
84601
|
}
|
|
84602
|
-
function parseCustomTypeOption(opt, value2,
|
|
84603
|
-
return convertJsonOptionOfCustomType(opt, (value2 ?? "").trim(),
|
|
84602
|
+
function parseCustomTypeOption(opt, value2, errors4) {
|
|
84603
|
+
return convertJsonOptionOfCustomType(opt, (value2 ?? "").trim(), errors4);
|
|
84604
84604
|
}
|
|
84605
|
-
function parseListTypeOption(opt, value2 = "",
|
|
84605
|
+
function parseListTypeOption(opt, value2 = "", errors4) {
|
|
84606
84606
|
value2 = value2.trim();
|
|
84607
84607
|
if (startsWith(value2, "-")) {
|
|
84608
84608
|
return;
|
|
84609
84609
|
}
|
|
84610
84610
|
if (opt.type === "listOrElement" && !value2.includes(",")) {
|
|
84611
|
-
return validateJsonOptionValue(opt, value2,
|
|
84611
|
+
return validateJsonOptionValue(opt, value2, errors4);
|
|
84612
84612
|
}
|
|
84613
84613
|
if (value2 === "") {
|
|
84614
84614
|
return [];
|
|
@@ -84616,14 +84616,14 @@ ${lanes.join(`
|
|
|
84616
84616
|
const values = value2.split(",");
|
|
84617
84617
|
switch (opt.element.type) {
|
|
84618
84618
|
case "number":
|
|
84619
|
-
return mapDefined(values, (v2) => validateJsonOptionValue(opt.element, parseInt(v2),
|
|
84619
|
+
return mapDefined(values, (v2) => validateJsonOptionValue(opt.element, parseInt(v2), errors4));
|
|
84620
84620
|
case "string":
|
|
84621
|
-
return mapDefined(values, (v2) => validateJsonOptionValue(opt.element, v2 || "",
|
|
84621
|
+
return mapDefined(values, (v2) => validateJsonOptionValue(opt.element, v2 || "", errors4));
|
|
84622
84622
|
case "boolean":
|
|
84623
84623
|
case "object":
|
|
84624
84624
|
return Debug.fail(`List of ${opt.element.type} is not yet supported.`);
|
|
84625
84625
|
default:
|
|
84626
|
-
return mapDefined(values, (v2) => parseCustomTypeOption(opt.element, v2,
|
|
84626
|
+
return mapDefined(values, (v2) => parseCustomTypeOption(opt.element, v2, errors4));
|
|
84627
84627
|
}
|
|
84628
84628
|
}
|
|
84629
84629
|
function getOptionName(option) {
|
|
@@ -84642,13 +84642,13 @@ ${lanes.join(`
|
|
|
84642
84642
|
const options = {};
|
|
84643
84643
|
let watchOptions;
|
|
84644
84644
|
const fileNames = [];
|
|
84645
|
-
const
|
|
84645
|
+
const errors4 = [];
|
|
84646
84646
|
parseStrings(commandLine);
|
|
84647
84647
|
return {
|
|
84648
84648
|
options,
|
|
84649
84649
|
watchOptions,
|
|
84650
84650
|
fileNames,
|
|
84651
|
-
errors:
|
|
84651
|
+
errors: errors4
|
|
84652
84652
|
};
|
|
84653
84653
|
function parseStrings(args) {
|
|
84654
84654
|
let i3 = 0;
|
|
@@ -84661,13 +84661,13 @@ ${lanes.join(`
|
|
|
84661
84661
|
const inputOptionName = s2.slice(s2.charCodeAt(1) === 45 ? 2 : 1);
|
|
84662
84662
|
const opt = getOptionDeclarationFromName(diagnostics.getOptionsNameMap, inputOptionName, true);
|
|
84663
84663
|
if (opt) {
|
|
84664
|
-
i3 = parseOptionValue(args, i3, diagnostics, opt, options,
|
|
84664
|
+
i3 = parseOptionValue(args, i3, diagnostics, opt, options, errors4);
|
|
84665
84665
|
} else {
|
|
84666
84666
|
const watchOpt = getOptionDeclarationFromName(watchOptionsDidYouMeanDiagnostics.getOptionsNameMap, inputOptionName, true);
|
|
84667
84667
|
if (watchOpt) {
|
|
84668
|
-
i3 = parseOptionValue(args, i3, watchOptionsDidYouMeanDiagnostics, watchOpt, watchOptions || (watchOptions = {}),
|
|
84668
|
+
i3 = parseOptionValue(args, i3, watchOptionsDidYouMeanDiagnostics, watchOpt, watchOptions || (watchOptions = {}), errors4);
|
|
84669
84669
|
} else {
|
|
84670
|
-
|
|
84670
|
+
errors4.push(createUnknownOptionError(inputOptionName, diagnostics, s2));
|
|
84671
84671
|
}
|
|
84672
84672
|
}
|
|
84673
84673
|
} else {
|
|
@@ -84678,7 +84678,7 @@ ${lanes.join(`
|
|
|
84678
84678
|
function parseResponseFile(fileName) {
|
|
84679
84679
|
const text = tryReadFile(fileName, readFile5 || ((fileName2) => sys.readFile(fileName2)));
|
|
84680
84680
|
if (!isString(text)) {
|
|
84681
|
-
|
|
84681
|
+
errors4.push(text);
|
|
84682
84682
|
return;
|
|
84683
84683
|
}
|
|
84684
84684
|
const args = [];
|
|
@@ -84697,7 +84697,7 @@ ${lanes.join(`
|
|
|
84697
84697
|
args.push(text.substring(start + 1, pos));
|
|
84698
84698
|
pos++;
|
|
84699
84699
|
} else {
|
|
84700
|
-
|
|
84700
|
+
errors4.push(createCompilerDiagnostic(Diagnostics.Unterminated_quoted_string_in_response_file_0, fileName));
|
|
84701
84701
|
}
|
|
84702
84702
|
} else {
|
|
84703
84703
|
while (text.charCodeAt(pos) > 32)
|
|
@@ -84708,7 +84708,7 @@ ${lanes.join(`
|
|
|
84708
84708
|
parseStrings(args);
|
|
84709
84709
|
}
|
|
84710
84710
|
}
|
|
84711
|
-
function parseOptionValue(args, i3, diagnostics, opt, options,
|
|
84711
|
+
function parseOptionValue(args, i3, diagnostics, opt, options, errors4) {
|
|
84712
84712
|
if (opt.isTSConfigOnly) {
|
|
84713
84713
|
const optValue = args[i3];
|
|
84714
84714
|
if (optValue === "null") {
|
|
@@ -84716,41 +84716,41 @@ ${lanes.join(`
|
|
|
84716
84716
|
i3++;
|
|
84717
84717
|
} else if (opt.type === "boolean") {
|
|
84718
84718
|
if (optValue === "false") {
|
|
84719
|
-
options[opt.name] = validateJsonOptionValue(opt, false,
|
|
84719
|
+
options[opt.name] = validateJsonOptionValue(opt, false, errors4);
|
|
84720
84720
|
i3++;
|
|
84721
84721
|
} else {
|
|
84722
84722
|
if (optValue === "true")
|
|
84723
84723
|
i3++;
|
|
84724
|
-
|
|
84724
|
+
errors4.push(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line, opt.name));
|
|
84725
84725
|
}
|
|
84726
84726
|
} else {
|
|
84727
|
-
|
|
84727
|
+
errors4.push(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line, opt.name));
|
|
84728
84728
|
if (optValue && !startsWith(optValue, "-"))
|
|
84729
84729
|
i3++;
|
|
84730
84730
|
}
|
|
84731
84731
|
} else {
|
|
84732
84732
|
if (!args[i3] && opt.type !== "boolean") {
|
|
84733
|
-
|
|
84733
|
+
errors4.push(createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name, getCompilerOptionValueTypeString(opt)));
|
|
84734
84734
|
}
|
|
84735
84735
|
if (args[i3] !== "null") {
|
|
84736
84736
|
switch (opt.type) {
|
|
84737
84737
|
case "number":
|
|
84738
|
-
options[opt.name] = validateJsonOptionValue(opt, parseInt(args[i3]),
|
|
84738
|
+
options[opt.name] = validateJsonOptionValue(opt, parseInt(args[i3]), errors4);
|
|
84739
84739
|
i3++;
|
|
84740
84740
|
break;
|
|
84741
84741
|
case "boolean":
|
|
84742
84742
|
const optValue = args[i3];
|
|
84743
|
-
options[opt.name] = validateJsonOptionValue(opt, optValue !== "false",
|
|
84743
|
+
options[opt.name] = validateJsonOptionValue(opt, optValue !== "false", errors4);
|
|
84744
84744
|
if (optValue === "false" || optValue === "true") {
|
|
84745
84745
|
i3++;
|
|
84746
84746
|
}
|
|
84747
84747
|
break;
|
|
84748
84748
|
case "string":
|
|
84749
|
-
options[opt.name] = validateJsonOptionValue(opt, args[i3] || "",
|
|
84749
|
+
options[opt.name] = validateJsonOptionValue(opt, args[i3] || "", errors4);
|
|
84750
84750
|
i3++;
|
|
84751
84751
|
break;
|
|
84752
84752
|
case "list":
|
|
84753
|
-
const result = parseListTypeOption(opt, args[i3],
|
|
84753
|
+
const result = parseListTypeOption(opt, args[i3], errors4);
|
|
84754
84754
|
options[opt.name] = result || [];
|
|
84755
84755
|
if (result) {
|
|
84756
84756
|
i3++;
|
|
@@ -84760,7 +84760,7 @@ ${lanes.join(`
|
|
|
84760
84760
|
Debug.fail("listOrElement not supported here");
|
|
84761
84761
|
break;
|
|
84762
84762
|
default:
|
|
84763
|
-
options[opt.name] = parseCustomTypeOption(opt, args[i3],
|
|
84763
|
+
options[opt.name] = parseCustomTypeOption(opt, args[i3], errors4);
|
|
84764
84764
|
i3++;
|
|
84765
84765
|
break;
|
|
84766
84766
|
}
|
|
@@ -84813,24 +84813,24 @@ ${lanes.join(`
|
|
|
84813
84813
|
optionTypeMismatchDiagnostic: Diagnostics.Build_option_0_requires_a_value_of_type_1
|
|
84814
84814
|
};
|
|
84815
84815
|
function parseBuildCommand(commandLine) {
|
|
84816
|
-
const { options, watchOptions, fileNames: projects, errors:
|
|
84816
|
+
const { options, watchOptions, fileNames: projects, errors: errors4 } = parseCommandLineWorker(buildOptionsDidYouMeanDiagnostics, commandLine);
|
|
84817
84817
|
const buildOptions = options;
|
|
84818
84818
|
if (projects.length === 0) {
|
|
84819
84819
|
projects.push(".");
|
|
84820
84820
|
}
|
|
84821
84821
|
if (buildOptions.clean && buildOptions.force) {
|
|
84822
|
-
|
|
84822
|
+
errors4.push(createCompilerDiagnostic(Diagnostics.Options_0_and_1_cannot_be_combined, "clean", "force"));
|
|
84823
84823
|
}
|
|
84824
84824
|
if (buildOptions.clean && buildOptions.verbose) {
|
|
84825
|
-
|
|
84825
|
+
errors4.push(createCompilerDiagnostic(Diagnostics.Options_0_and_1_cannot_be_combined, "clean", "verbose"));
|
|
84826
84826
|
}
|
|
84827
84827
|
if (buildOptions.clean && buildOptions.watch) {
|
|
84828
|
-
|
|
84828
|
+
errors4.push(createCompilerDiagnostic(Diagnostics.Options_0_and_1_cannot_be_combined, "clean", "watch"));
|
|
84829
84829
|
}
|
|
84830
84830
|
if (buildOptions.watch && buildOptions.dry) {
|
|
84831
|
-
|
|
84831
|
+
errors4.push(createCompilerDiagnostic(Diagnostics.Options_0_and_1_cannot_be_combined, "watch", "dry"));
|
|
84832
84832
|
}
|
|
84833
|
-
return { buildOptions, watchOptions, projects, errors:
|
|
84833
|
+
return { buildOptions, watchOptions, projects, errors: errors4 };
|
|
84834
84834
|
}
|
|
84835
84835
|
function getDiagnosticText(message, ...args) {
|
|
84836
84836
|
return cast(createCompilerDiagnostic(message, ...args).messageText, isString);
|
|
@@ -84986,26 +84986,26 @@ ${lanes.join(`
|
|
|
84986
84986
|
}
|
|
84987
84987
|
return _tsconfigRootOptions;
|
|
84988
84988
|
}
|
|
84989
|
-
function convertConfigFileToObject(sourceFile,
|
|
84989
|
+
function convertConfigFileToObject(sourceFile, errors4, jsonConversionNotifier) {
|
|
84990
84990
|
var _a;
|
|
84991
84991
|
const rootExpression = (_a = sourceFile.statements[0]) == null ? undefined : _a.expression;
|
|
84992
84992
|
if (rootExpression && rootExpression.kind !== 211) {
|
|
84993
|
-
|
|
84993
|
+
errors4.push(createDiagnosticForNodeInSourceFile(sourceFile, rootExpression, Diagnostics.The_root_value_of_a_0_file_must_be_an_object, getBaseFileName(sourceFile.fileName) === "jsconfig.json" ? "jsconfig.json" : "tsconfig.json"));
|
|
84994
84994
|
if (isArrayLiteralExpression(rootExpression)) {
|
|
84995
84995
|
const firstObject = find(rootExpression.elements, isObjectLiteralExpression);
|
|
84996
84996
|
if (firstObject) {
|
|
84997
|
-
return convertToJson(sourceFile, firstObject,
|
|
84997
|
+
return convertToJson(sourceFile, firstObject, errors4, true, jsonConversionNotifier);
|
|
84998
84998
|
}
|
|
84999
84999
|
}
|
|
85000
85000
|
return {};
|
|
85001
85001
|
}
|
|
85002
|
-
return convertToJson(sourceFile, rootExpression,
|
|
85002
|
+
return convertToJson(sourceFile, rootExpression, errors4, true, jsonConversionNotifier);
|
|
85003
85003
|
}
|
|
85004
|
-
function convertToObject(sourceFile,
|
|
85004
|
+
function convertToObject(sourceFile, errors4) {
|
|
85005
85005
|
var _a;
|
|
85006
|
-
return convertToJson(sourceFile, (_a = sourceFile.statements[0]) == null ? undefined : _a.expression,
|
|
85006
|
+
return convertToJson(sourceFile, (_a = sourceFile.statements[0]) == null ? undefined : _a.expression, errors4, true, undefined);
|
|
85007
85007
|
}
|
|
85008
|
-
function convertToJson(sourceFile, rootExpression,
|
|
85008
|
+
function convertToJson(sourceFile, rootExpression, errors4, returnValue, jsonConversionNotifier) {
|
|
85009
85009
|
if (!rootExpression) {
|
|
85010
85010
|
return returnValue ? {} : undefined;
|
|
85011
85011
|
}
|
|
@@ -85015,14 +85015,14 @@ ${lanes.join(`
|
|
|
85015
85015
|
const result = returnValue ? {} : undefined;
|
|
85016
85016
|
for (const element of node.properties) {
|
|
85017
85017
|
if (element.kind !== 304) {
|
|
85018
|
-
|
|
85018
|
+
errors4.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected));
|
|
85019
85019
|
continue;
|
|
85020
85020
|
}
|
|
85021
85021
|
if (element.questionToken) {
|
|
85022
|
-
|
|
85022
|
+
errors4.push(createDiagnosticForNodeInSourceFile(sourceFile, element.questionToken, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?"));
|
|
85023
85023
|
}
|
|
85024
85024
|
if (!isDoubleQuotedString(element.name)) {
|
|
85025
|
-
|
|
85025
|
+
errors4.push(createDiagnosticForNodeInSourceFile(sourceFile, element.name, Diagnostics.String_literal_with_double_quotes_expected));
|
|
85026
85026
|
}
|
|
85027
85027
|
const textOfKey = isComputedNonLiteralName(element.name) ? undefined : getTextOfPropertyName(element.name);
|
|
85028
85028
|
const keyText = textOfKey && unescapeLeadingUnderscores(textOfKey);
|
|
@@ -85054,7 +85054,7 @@ ${lanes.join(`
|
|
|
85054
85054
|
return null;
|
|
85055
85055
|
case 11:
|
|
85056
85056
|
if (!isDoubleQuotedString(valueExpression)) {
|
|
85057
|
-
|
|
85057
|
+
errors4.push(createDiagnosticForNodeInSourceFile(sourceFile, valueExpression, Diagnostics.String_literal_with_double_quotes_expected));
|
|
85058
85058
|
}
|
|
85059
85059
|
return valueExpression.text;
|
|
85060
85060
|
case 9:
|
|
@@ -85071,9 +85071,9 @@ ${lanes.join(`
|
|
|
85071
85071
|
return convertArrayLiteralExpressionToJson(valueExpression.elements, option && option.element);
|
|
85072
85072
|
}
|
|
85073
85073
|
if (option) {
|
|
85074
|
-
|
|
85074
|
+
errors4.push(createDiagnosticForNodeInSourceFile(sourceFile, valueExpression, Diagnostics.Compiler_option_0_requires_a_value_of_type_1, option.name, getCompilerOptionValueTypeString(option)));
|
|
85075
85075
|
} else {
|
|
85076
|
-
|
|
85076
|
+
errors4.push(createDiagnosticForNodeInSourceFile(sourceFile, valueExpression, Diagnostics.Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal));
|
|
85077
85077
|
}
|
|
85078
85078
|
return;
|
|
85079
85079
|
}
|
|
@@ -85398,8 +85398,8 @@ ${lanes.join(`
|
|
|
85398
85398
|
var defaultIncludeSpec = "**/*";
|
|
85399
85399
|
function parseJsonConfigFileContentWorker(json2, sourceFile, host, basePath, existingOptions = {}, existingWatchOptions, configFileName, resolutionStack = [], extraFileExtensions = [], extendedConfigCache) {
|
|
85400
85400
|
Debug.assert(json2 === undefined && sourceFile !== undefined || json2 !== undefined && sourceFile === undefined);
|
|
85401
|
-
const
|
|
85402
|
-
const parsedConfig = parseConfig(json2, sourceFile, host, basePath, configFileName, resolutionStack,
|
|
85401
|
+
const errors4 = [];
|
|
85402
|
+
const parsedConfig = parseConfig(json2, sourceFile, host, basePath, configFileName, resolutionStack, errors4, extendedConfigCache);
|
|
85403
85403
|
const { raw } = parsedConfig;
|
|
85404
85404
|
const options = handleOptionConfigDirTemplateSubstitution(extend2(existingOptions, parsedConfig.options || {}), configDirTemplateSubstitutionOptions, basePath);
|
|
85405
85405
|
const watchOptions = handleWatchOptionsConfigDirTemplateSubstitution(existingWatchOptions && parsedConfig.watchOptions ? extend2(existingWatchOptions, parsedConfig.watchOptions) : parsedConfig.watchOptions || existingWatchOptions, basePath);
|
|
@@ -85416,7 +85416,7 @@ ${lanes.join(`
|
|
|
85416
85416
|
projectReferences: getProjectReferences(basePathForFileNames),
|
|
85417
85417
|
typeAcquisition: parsedConfig.typeAcquisition || getDefaultTypeAcquisition(),
|
|
85418
85418
|
raw,
|
|
85419
|
-
errors:
|
|
85419
|
+
errors: errors4,
|
|
85420
85420
|
wildcardDirectories: getWildcardDirectories(configFileSpecs, basePathForFileNames, host.useCaseSensitiveFileNames),
|
|
85421
85421
|
compileOnSave: !!raw.compileOnSave
|
|
85422
85422
|
};
|
|
@@ -85432,7 +85432,7 @@ ${lanes.join(`
|
|
|
85432
85432
|
const diagnosticMessage = Diagnostics.The_files_list_in_config_file_0_is_empty;
|
|
85433
85433
|
const nodeValue = forEachTsConfigPropArray(sourceFile, "files", (property) => property.initializer);
|
|
85434
85434
|
const error210 = createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, nodeValue, diagnosticMessage, fileName);
|
|
85435
|
-
|
|
85435
|
+
errors4.push(error210);
|
|
85436
85436
|
} else {
|
|
85437
85437
|
createCompilerDiagnosticOnlyIfJson(Diagnostics.The_files_list_in_config_file_0_is_empty, configFileName || "tsconfig.json");
|
|
85438
85438
|
}
|
|
@@ -85456,11 +85456,11 @@ ${lanes.join(`
|
|
|
85456
85456
|
let validatedIncludeSpecsBeforeSubstitution, validatedExcludeSpecsBeforeSubstitution;
|
|
85457
85457
|
let validatedIncludeSpecs, validatedExcludeSpecs;
|
|
85458
85458
|
if (includeSpecs) {
|
|
85459
|
-
validatedIncludeSpecsBeforeSubstitution = validateSpecs(includeSpecs,
|
|
85459
|
+
validatedIncludeSpecsBeforeSubstitution = validateSpecs(includeSpecs, errors4, true, sourceFile, "include");
|
|
85460
85460
|
validatedIncludeSpecs = getSubstitutedStringArrayWithConfigDirTemplate(validatedIncludeSpecsBeforeSubstitution, basePathForFileNames) || validatedIncludeSpecsBeforeSubstitution;
|
|
85461
85461
|
}
|
|
85462
85462
|
if (excludeSpecs) {
|
|
85463
|
-
validatedExcludeSpecsBeforeSubstitution = validateSpecs(excludeSpecs,
|
|
85463
|
+
validatedExcludeSpecsBeforeSubstitution = validateSpecs(excludeSpecs, errors4, false, sourceFile, "exclude");
|
|
85464
85464
|
validatedExcludeSpecs = getSubstitutedStringArrayWithConfigDirTemplate(validatedExcludeSpecsBeforeSubstitution, basePathForFileNames) || validatedExcludeSpecsBeforeSubstitution;
|
|
85465
85465
|
}
|
|
85466
85466
|
const validatedFilesSpecBeforeSubstitution = filter2(filesSpecs, isString);
|
|
@@ -85481,7 +85481,7 @@ ${lanes.join(`
|
|
|
85481
85481
|
function getFileNames(basePath2) {
|
|
85482
85482
|
const fileNames = getFileNamesFromConfigSpecs(configFileSpecs, basePath2, options, host, extraFileExtensions);
|
|
85483
85483
|
if (shouldReportNoInputFiles(fileNames, canJsonReportNoInputFiles(raw), resolutionStack)) {
|
|
85484
|
-
|
|
85484
|
+
errors4.push(getErrorForNoInputFiles(configFileSpecs, configFileName));
|
|
85485
85485
|
}
|
|
85486
85486
|
return fileNames;
|
|
85487
85487
|
}
|
|
@@ -85515,7 +85515,7 @@ ${lanes.join(`
|
|
|
85515
85515
|
if (isArray(raw[prop])) {
|
|
85516
85516
|
const result = raw[prop];
|
|
85517
85517
|
if (!sourceFile && !every(result, validateElement)) {
|
|
85518
|
-
|
|
85518
|
+
errors4.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, prop, elementTypeName));
|
|
85519
85519
|
}
|
|
85520
85520
|
return result;
|
|
85521
85521
|
} else {
|
|
@@ -85527,7 +85527,7 @@ ${lanes.join(`
|
|
|
85527
85527
|
}
|
|
85528
85528
|
function createCompilerDiagnosticOnlyIfJson(message, ...args) {
|
|
85529
85529
|
if (!sourceFile) {
|
|
85530
|
-
|
|
85530
|
+
errors4.push(createCompilerDiagnostic(message, ...args));
|
|
85531
85531
|
}
|
|
85532
85532
|
}
|
|
85533
85533
|
}
|
|
@@ -85628,15 +85628,15 @@ ${lanes.join(`
|
|
|
85628
85628
|
function isSuccessfulParsedTsconfig(value2) {
|
|
85629
85629
|
return !!value2.options;
|
|
85630
85630
|
}
|
|
85631
|
-
function parseConfig(json2, sourceFile, host, basePath, configFileName, resolutionStack,
|
|
85631
|
+
function parseConfig(json2, sourceFile, host, basePath, configFileName, resolutionStack, errors4, extendedConfigCache) {
|
|
85632
85632
|
var _a;
|
|
85633
85633
|
basePath = normalizeSlashes(basePath);
|
|
85634
85634
|
const resolvedPath = getNormalizedAbsolutePath(configFileName || "", basePath);
|
|
85635
85635
|
if (resolutionStack.includes(resolvedPath)) {
|
|
85636
|
-
|
|
85637
|
-
return { raw: json2 || convertToObject(sourceFile,
|
|
85636
|
+
errors4.push(createCompilerDiagnostic(Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, [...resolutionStack, resolvedPath].join(" -> ")));
|
|
85637
|
+
return { raw: json2 || convertToObject(sourceFile, errors4) };
|
|
85638
85638
|
}
|
|
85639
|
-
const ownConfig = json2 ? parseOwnConfigOfJson(json2, host, basePath, configFileName,
|
|
85639
|
+
const ownConfig = json2 ? parseOwnConfigOfJson(json2, host, basePath, configFileName, errors4) : parseOwnConfigOfJsonSourceFile(sourceFile, host, basePath, configFileName, errors4);
|
|
85640
85640
|
if ((_a = ownConfig.options) == null ? undefined : _a.paths) {
|
|
85641
85641
|
ownConfig.options.pathsBasePath = basePath;
|
|
85642
85642
|
}
|
|
@@ -85663,7 +85663,7 @@ ${lanes.join(`
|
|
|
85663
85663
|
}
|
|
85664
85664
|
return ownConfig;
|
|
85665
85665
|
function applyExtendedConfig(result, extendedConfigPath) {
|
|
85666
|
-
const extendedConfig = getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack,
|
|
85666
|
+
const extendedConfig = getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors4, extendedConfigCache, result);
|
|
85667
85667
|
if (extendedConfig && isSuccessfulParsedTsconfig(extendedConfig)) {
|
|
85668
85668
|
const extendsRaw = extendedConfig.raw;
|
|
85669
85669
|
let relativeDifference;
|
|
@@ -85691,55 +85691,55 @@ ${lanes.join(`
|
|
|
85691
85691
|
return assign({}, result.watchOptions, watchOptions);
|
|
85692
85692
|
}
|
|
85693
85693
|
}
|
|
85694
|
-
function parseOwnConfigOfJson(json2, host, basePath, configFileName,
|
|
85694
|
+
function parseOwnConfigOfJson(json2, host, basePath, configFileName, errors4) {
|
|
85695
85695
|
if (hasProperty(json2, "excludes")) {
|
|
85696
|
-
|
|
85696
|
+
errors4.push(createCompilerDiagnostic(Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
|
|
85697
85697
|
}
|
|
85698
|
-
const options = convertCompilerOptionsFromJsonWorker(json2.compilerOptions, basePath,
|
|
85699
|
-
const typeAcquisition = convertTypeAcquisitionFromJsonWorker(json2.typeAcquisition, basePath,
|
|
85700
|
-
const watchOptions = convertWatchOptionsFromJsonWorker(json2.watchOptions, basePath,
|
|
85701
|
-
json2.compileOnSave = convertCompileOnSaveOptionFromJson(json2, basePath,
|
|
85702
|
-
const extendedConfigPath = json2.extends || json2.extends === "" ? getExtendsConfigPathOrArray(json2.extends, host, basePath, configFileName,
|
|
85698
|
+
const options = convertCompilerOptionsFromJsonWorker(json2.compilerOptions, basePath, errors4, configFileName);
|
|
85699
|
+
const typeAcquisition = convertTypeAcquisitionFromJsonWorker(json2.typeAcquisition, basePath, errors4, configFileName);
|
|
85700
|
+
const watchOptions = convertWatchOptionsFromJsonWorker(json2.watchOptions, basePath, errors4);
|
|
85701
|
+
json2.compileOnSave = convertCompileOnSaveOptionFromJson(json2, basePath, errors4);
|
|
85702
|
+
const extendedConfigPath = json2.extends || json2.extends === "" ? getExtendsConfigPathOrArray(json2.extends, host, basePath, configFileName, errors4) : undefined;
|
|
85703
85703
|
return { raw: json2, options, watchOptions, typeAcquisition, extendedConfigPath };
|
|
85704
85704
|
}
|
|
85705
|
-
function getExtendsConfigPathOrArray(value2, host, basePath, configFileName,
|
|
85705
|
+
function getExtendsConfigPathOrArray(value2, host, basePath, configFileName, errors4, propertyAssignment, valueExpression, sourceFile) {
|
|
85706
85706
|
let extendedConfigPath;
|
|
85707
85707
|
const newBase = configFileName ? directoryOfCombinedPath(configFileName, basePath) : basePath;
|
|
85708
85708
|
if (isString(value2)) {
|
|
85709
|
-
extendedConfigPath = getExtendsConfigPath(value2, host, newBase,
|
|
85709
|
+
extendedConfigPath = getExtendsConfigPath(value2, host, newBase, errors4, valueExpression, sourceFile);
|
|
85710
85710
|
} else if (isArray(value2)) {
|
|
85711
85711
|
extendedConfigPath = [];
|
|
85712
85712
|
for (let index = 0;index < value2.length; index++) {
|
|
85713
85713
|
const fileName = value2[index];
|
|
85714
85714
|
if (isString(fileName)) {
|
|
85715
|
-
extendedConfigPath = append(extendedConfigPath, getExtendsConfigPath(fileName, host, newBase,
|
|
85715
|
+
extendedConfigPath = append(extendedConfigPath, getExtendsConfigPath(fileName, host, newBase, errors4, valueExpression == null ? undefined : valueExpression.elements[index], sourceFile));
|
|
85716
85716
|
} else {
|
|
85717
|
-
convertJsonOption(extendsOptionDeclaration.element, value2, basePath,
|
|
85717
|
+
convertJsonOption(extendsOptionDeclaration.element, value2, basePath, errors4, propertyAssignment, valueExpression == null ? undefined : valueExpression.elements[index], sourceFile);
|
|
85718
85718
|
}
|
|
85719
85719
|
}
|
|
85720
85720
|
} else {
|
|
85721
|
-
convertJsonOption(extendsOptionDeclaration, value2, basePath,
|
|
85721
|
+
convertJsonOption(extendsOptionDeclaration, value2, basePath, errors4, propertyAssignment, valueExpression, sourceFile);
|
|
85722
85722
|
}
|
|
85723
85723
|
return extendedConfigPath;
|
|
85724
85724
|
}
|
|
85725
|
-
function parseOwnConfigOfJsonSourceFile(sourceFile, host, basePath, configFileName,
|
|
85725
|
+
function parseOwnConfigOfJsonSourceFile(sourceFile, host, basePath, configFileName, errors4) {
|
|
85726
85726
|
const options = getDefaultCompilerOptions(configFileName);
|
|
85727
85727
|
let typeAcquisition;
|
|
85728
85728
|
let watchOptions;
|
|
85729
85729
|
let extendedConfigPath;
|
|
85730
85730
|
let rootCompilerOptions;
|
|
85731
85731
|
const rootOptions = getTsconfigRootOptionsMap();
|
|
85732
|
-
const json2 = convertConfigFileToObject(sourceFile,
|
|
85732
|
+
const json2 = convertConfigFileToObject(sourceFile, errors4, { rootOptions, onPropertySet });
|
|
85733
85733
|
if (!typeAcquisition) {
|
|
85734
85734
|
typeAcquisition = getDefaultTypeAcquisition(configFileName);
|
|
85735
85735
|
}
|
|
85736
85736
|
if (rootCompilerOptions && json2 && json2.compilerOptions === undefined) {
|
|
85737
|
-
|
|
85737
|
+
errors4.push(createDiagnosticForNodeInSourceFile(sourceFile, rootCompilerOptions[0], Diagnostics._0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file, getTextOfPropertyName(rootCompilerOptions[0])));
|
|
85738
85738
|
}
|
|
85739
85739
|
return { raw: json2, options, watchOptions, typeAcquisition, extendedConfigPath };
|
|
85740
85740
|
function onPropertySet(keyText, value2, propertyAssignment, parentOption, option) {
|
|
85741
85741
|
if (option && option !== extendsOptionDeclaration)
|
|
85742
|
-
value2 = convertJsonOption(option, value2, basePath,
|
|
85742
|
+
value2 = convertJsonOption(option, value2, basePath, errors4, propertyAssignment, propertyAssignment.initializer, sourceFile);
|
|
85743
85743
|
if (parentOption == null ? undefined : parentOption.name) {
|
|
85744
85744
|
if (option) {
|
|
85745
85745
|
let currentOption;
|
|
@@ -85754,17 +85754,17 @@ ${lanes.join(`
|
|
|
85754
85754
|
currentOption[option.name] = value2;
|
|
85755
85755
|
} else if (keyText && (parentOption == null ? undefined : parentOption.extraKeyDiagnostics)) {
|
|
85756
85756
|
if (parentOption.elementOptions) {
|
|
85757
|
-
|
|
85757
|
+
errors4.push(createUnknownOptionError(keyText, parentOption.extraKeyDiagnostics, undefined, propertyAssignment.name, sourceFile));
|
|
85758
85758
|
} else {
|
|
85759
|
-
|
|
85759
|
+
errors4.push(createDiagnosticForNodeInSourceFile(sourceFile, propertyAssignment.name, parentOption.extraKeyDiagnostics.unknownOptionDiagnostic, keyText));
|
|
85760
85760
|
}
|
|
85761
85761
|
}
|
|
85762
85762
|
} else if (parentOption === rootOptions) {
|
|
85763
85763
|
if (option === extendsOptionDeclaration) {
|
|
85764
|
-
extendedConfigPath = getExtendsConfigPathOrArray(value2, host, basePath, configFileName,
|
|
85764
|
+
extendedConfigPath = getExtendsConfigPathOrArray(value2, host, basePath, configFileName, errors4, propertyAssignment, propertyAssignment.initializer, sourceFile);
|
|
85765
85765
|
} else if (!option) {
|
|
85766
85766
|
if (keyText === "excludes") {
|
|
85767
|
-
|
|
85767
|
+
errors4.push(createDiagnosticForNodeInSourceFile(sourceFile, propertyAssignment.name, Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
|
|
85768
85768
|
}
|
|
85769
85769
|
if (find(commandOptionsWithoutBuild, (opt) => opt.name === keyText)) {
|
|
85770
85770
|
rootCompilerOptions = append(rootCompilerOptions, propertyAssignment.name);
|
|
@@ -85773,14 +85773,14 @@ ${lanes.join(`
|
|
|
85773
85773
|
}
|
|
85774
85774
|
}
|
|
85775
85775
|
}
|
|
85776
|
-
function getExtendsConfigPath(extendedConfig, host, basePath,
|
|
85776
|
+
function getExtendsConfigPath(extendedConfig, host, basePath, errors4, valueExpression, sourceFile) {
|
|
85777
85777
|
extendedConfig = normalizeSlashes(extendedConfig);
|
|
85778
85778
|
if (isRootedDiskPath(extendedConfig) || startsWith(extendedConfig, "./") || startsWith(extendedConfig, "../")) {
|
|
85779
85779
|
let extendedConfigPath = getNormalizedAbsolutePath(extendedConfig, basePath);
|
|
85780
85780
|
if (!host.fileExists(extendedConfigPath) && !endsWith(extendedConfigPath, ".json")) {
|
|
85781
85781
|
extendedConfigPath = `${extendedConfigPath}.json`;
|
|
85782
85782
|
if (!host.fileExists(extendedConfigPath)) {
|
|
85783
|
-
|
|
85783
|
+
errors4.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, Diagnostics.File_0_not_found, extendedConfig));
|
|
85784
85784
|
return;
|
|
85785
85785
|
}
|
|
85786
85786
|
}
|
|
@@ -85791,13 +85791,13 @@ ${lanes.join(`
|
|
|
85791
85791
|
return resolved.resolvedModule.resolvedFileName;
|
|
85792
85792
|
}
|
|
85793
85793
|
if (extendedConfig === "") {
|
|
85794
|
-
|
|
85794
|
+
errors4.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, Diagnostics.Compiler_option_0_cannot_be_given_an_empty_string, "extends"));
|
|
85795
85795
|
} else {
|
|
85796
|
-
|
|
85796
|
+
errors4.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, Diagnostics.File_0_not_found, extendedConfig));
|
|
85797
85797
|
}
|
|
85798
85798
|
return;
|
|
85799
85799
|
}
|
|
85800
|
-
function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack,
|
|
85800
|
+
function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors4, extendedConfigCache, result) {
|
|
85801
85801
|
const path5 = host.useCaseSensitiveFileNames ? extendedConfigPath : toFileNameLowerCase(extendedConfigPath);
|
|
85802
85802
|
let value2;
|
|
85803
85803
|
let extendedResult;
|
|
@@ -85807,7 +85807,7 @@ ${lanes.join(`
|
|
|
85807
85807
|
} else {
|
|
85808
85808
|
extendedResult = readJsonConfigFile(extendedConfigPath, (path22) => host.readFile(path22));
|
|
85809
85809
|
if (!extendedResult.parseDiagnostics.length) {
|
|
85810
|
-
extendedConfig = parseConfig(undefined, extendedResult, host, getDirectoryPath(extendedConfigPath), getBaseFileName(extendedConfigPath), resolutionStack,
|
|
85810
|
+
extendedConfig = parseConfig(undefined, extendedResult, host, getDirectoryPath(extendedConfigPath), getBaseFileName(extendedConfigPath), resolutionStack, errors4, extendedConfigCache);
|
|
85811
85811
|
}
|
|
85812
85812
|
if (extendedConfigCache) {
|
|
85813
85813
|
extendedConfigCache.set(path5, { extendedResult, extendedConfig });
|
|
@@ -85822,35 +85822,35 @@ ${lanes.join(`
|
|
|
85822
85822
|
}
|
|
85823
85823
|
}
|
|
85824
85824
|
if (extendedResult.parseDiagnostics.length) {
|
|
85825
|
-
|
|
85825
|
+
errors4.push(...extendedResult.parseDiagnostics);
|
|
85826
85826
|
return;
|
|
85827
85827
|
}
|
|
85828
85828
|
return extendedConfig;
|
|
85829
85829
|
}
|
|
85830
|
-
function convertCompileOnSaveOptionFromJson(jsonOption, basePath,
|
|
85830
|
+
function convertCompileOnSaveOptionFromJson(jsonOption, basePath, errors4) {
|
|
85831
85831
|
if (!hasProperty(jsonOption, compileOnSaveCommandLineOption.name)) {
|
|
85832
85832
|
return false;
|
|
85833
85833
|
}
|
|
85834
|
-
const result = convertJsonOption(compileOnSaveCommandLineOption, jsonOption.compileOnSave, basePath,
|
|
85834
|
+
const result = convertJsonOption(compileOnSaveCommandLineOption, jsonOption.compileOnSave, basePath, errors4);
|
|
85835
85835
|
return typeof result === "boolean" && result;
|
|
85836
85836
|
}
|
|
85837
85837
|
function convertCompilerOptionsFromJson(jsonOptions, basePath, configFileName) {
|
|
85838
|
-
const
|
|
85839
|
-
const options = convertCompilerOptionsFromJsonWorker(jsonOptions, basePath,
|
|
85840
|
-
return { options, errors:
|
|
85838
|
+
const errors4 = [];
|
|
85839
|
+
const options = convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors4, configFileName);
|
|
85840
|
+
return { options, errors: errors4 };
|
|
85841
85841
|
}
|
|
85842
85842
|
function convertTypeAcquisitionFromJson(jsonOptions, basePath, configFileName) {
|
|
85843
|
-
const
|
|
85844
|
-
const options = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath,
|
|
85845
|
-
return { options, errors:
|
|
85843
|
+
const errors4 = [];
|
|
85844
|
+
const options = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors4, configFileName);
|
|
85845
|
+
return { options, errors: errors4 };
|
|
85846
85846
|
}
|
|
85847
85847
|
function getDefaultCompilerOptions(configFileName) {
|
|
85848
85848
|
const options = configFileName && getBaseFileName(configFileName) === "jsconfig.json" ? { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, skipLibCheck: true, noEmit: true } : {};
|
|
85849
85849
|
return options;
|
|
85850
85850
|
}
|
|
85851
|
-
function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath,
|
|
85851
|
+
function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors4, configFileName) {
|
|
85852
85852
|
const options = getDefaultCompilerOptions(configFileName);
|
|
85853
|
-
convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, compilerOptionsDidYouMeanDiagnostics,
|
|
85853
|
+
convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, compilerOptionsDidYouMeanDiagnostics, errors4);
|
|
85854
85854
|
if (configFileName) {
|
|
85855
85855
|
options.configFilePath = normalizeSlashes(configFileName);
|
|
85856
85856
|
}
|
|
@@ -85859,24 +85859,24 @@ ${lanes.join(`
|
|
|
85859
85859
|
function getDefaultTypeAcquisition(configFileName) {
|
|
85860
85860
|
return { enable: !!configFileName && getBaseFileName(configFileName) === "jsconfig.json", include: [], exclude: [] };
|
|
85861
85861
|
}
|
|
85862
|
-
function convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath,
|
|
85862
|
+
function convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors4, configFileName) {
|
|
85863
85863
|
const options = getDefaultTypeAcquisition(configFileName);
|
|
85864
|
-
convertOptionsFromJson(getCommandLineTypeAcquisitionMap(), jsonOptions, basePath, options, typeAcquisitionDidYouMeanDiagnostics,
|
|
85864
|
+
convertOptionsFromJson(getCommandLineTypeAcquisitionMap(), jsonOptions, basePath, options, typeAcquisitionDidYouMeanDiagnostics, errors4);
|
|
85865
85865
|
return options;
|
|
85866
85866
|
}
|
|
85867
|
-
function convertWatchOptionsFromJsonWorker(jsonOptions, basePath,
|
|
85868
|
-
return convertOptionsFromJson(getCommandLineWatchOptionsMap(), jsonOptions, basePath, undefined, watchOptionsDidYouMeanDiagnostics,
|
|
85867
|
+
function convertWatchOptionsFromJsonWorker(jsonOptions, basePath, errors4) {
|
|
85868
|
+
return convertOptionsFromJson(getCommandLineWatchOptionsMap(), jsonOptions, basePath, undefined, watchOptionsDidYouMeanDiagnostics, errors4);
|
|
85869
85869
|
}
|
|
85870
|
-
function convertOptionsFromJson(optionsNameMap, jsonOptions, basePath, defaultOptions, diagnostics,
|
|
85870
|
+
function convertOptionsFromJson(optionsNameMap, jsonOptions, basePath, defaultOptions, diagnostics, errors4) {
|
|
85871
85871
|
if (!jsonOptions) {
|
|
85872
85872
|
return;
|
|
85873
85873
|
}
|
|
85874
85874
|
for (const id in jsonOptions) {
|
|
85875
85875
|
const opt = optionsNameMap.get(id);
|
|
85876
85876
|
if (opt) {
|
|
85877
|
-
(defaultOptions || (defaultOptions = {}))[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath,
|
|
85877
|
+
(defaultOptions || (defaultOptions = {}))[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors4);
|
|
85878
85878
|
} else {
|
|
85879
|
-
|
|
85879
|
+
errors4.push(createUnknownOptionError(id, diagnostics));
|
|
85880
85880
|
}
|
|
85881
85881
|
}
|
|
85882
85882
|
return defaultOptions;
|
|
@@ -85884,24 +85884,24 @@ ${lanes.join(`
|
|
|
85884
85884
|
function createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, message, ...args) {
|
|
85885
85885
|
return sourceFile && node ? createDiagnosticForNodeInSourceFile(sourceFile, node, message, ...args) : createCompilerDiagnostic(message, ...args);
|
|
85886
85886
|
}
|
|
85887
|
-
function convertJsonOption(opt, value2, basePath,
|
|
85887
|
+
function convertJsonOption(opt, value2, basePath, errors4, propertyAssignment, valueExpression, sourceFile) {
|
|
85888
85888
|
if (opt.isCommandLineOnly) {
|
|
85889
|
-
|
|
85889
|
+
errors4.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, propertyAssignment == null ? undefined : propertyAssignment.name, Diagnostics.Option_0_can_only_be_specified_on_command_line, opt.name));
|
|
85890
85890
|
return;
|
|
85891
85891
|
}
|
|
85892
85892
|
if (isCompilerOptionsValue(opt, value2)) {
|
|
85893
85893
|
const optType = opt.type;
|
|
85894
85894
|
if (optType === "list" && isArray(value2)) {
|
|
85895
|
-
return convertJsonOptionOfListType(opt, value2, basePath,
|
|
85895
|
+
return convertJsonOptionOfListType(opt, value2, basePath, errors4, propertyAssignment, valueExpression, sourceFile);
|
|
85896
85896
|
} else if (optType === "listOrElement") {
|
|
85897
|
-
return isArray(value2) ? convertJsonOptionOfListType(opt, value2, basePath,
|
|
85897
|
+
return isArray(value2) ? convertJsonOptionOfListType(opt, value2, basePath, errors4, propertyAssignment, valueExpression, sourceFile) : convertJsonOption(opt.element, value2, basePath, errors4, propertyAssignment, valueExpression, sourceFile);
|
|
85898
85898
|
} else if (!isString(opt.type)) {
|
|
85899
|
-
return convertJsonOptionOfCustomType(opt, value2,
|
|
85899
|
+
return convertJsonOptionOfCustomType(opt, value2, errors4, valueExpression, sourceFile);
|
|
85900
85900
|
}
|
|
85901
|
-
const validatedValue = validateJsonOptionValue(opt, value2,
|
|
85901
|
+
const validatedValue = validateJsonOptionValue(opt, value2, errors4, valueExpression, sourceFile);
|
|
85902
85902
|
return isNullOrUndefined(validatedValue) ? validatedValue : normalizeNonListOptionValue(opt, basePath, validatedValue);
|
|
85903
85903
|
} else {
|
|
85904
|
-
|
|
85904
|
+
errors4.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, Diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.name, getCompilerOptionValueTypeString(opt)));
|
|
85905
85905
|
}
|
|
85906
85906
|
}
|
|
85907
85907
|
function normalizeNonListOptionValue(option, basePath, value2) {
|
|
@@ -85914,29 +85914,29 @@ ${lanes.join(`
|
|
|
85914
85914
|
}
|
|
85915
85915
|
return value2;
|
|
85916
85916
|
}
|
|
85917
|
-
function validateJsonOptionValue(opt, value2,
|
|
85917
|
+
function validateJsonOptionValue(opt, value2, errors4, valueExpression, sourceFile) {
|
|
85918
85918
|
var _a;
|
|
85919
85919
|
if (isNullOrUndefined(value2))
|
|
85920
85920
|
return;
|
|
85921
85921
|
const d3 = (_a = opt.extraValidation) == null ? undefined : _a.call(opt, value2);
|
|
85922
85922
|
if (!d3)
|
|
85923
85923
|
return value2;
|
|
85924
|
-
|
|
85924
|
+
errors4.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, ...d3));
|
|
85925
85925
|
return;
|
|
85926
85926
|
}
|
|
85927
|
-
function convertJsonOptionOfCustomType(opt, value2,
|
|
85927
|
+
function convertJsonOptionOfCustomType(opt, value2, errors4, valueExpression, sourceFile) {
|
|
85928
85928
|
if (isNullOrUndefined(value2))
|
|
85929
85929
|
return;
|
|
85930
85930
|
const key = value2.toLowerCase();
|
|
85931
85931
|
const val = opt.type.get(key);
|
|
85932
85932
|
if (val !== undefined) {
|
|
85933
|
-
return validateJsonOptionValue(opt, val,
|
|
85933
|
+
return validateJsonOptionValue(opt, val, errors4, valueExpression, sourceFile);
|
|
85934
85934
|
} else {
|
|
85935
|
-
|
|
85935
|
+
errors4.push(createDiagnosticForInvalidCustomType(opt, (message, ...args) => createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, message, ...args)));
|
|
85936
85936
|
}
|
|
85937
85937
|
}
|
|
85938
|
-
function convertJsonOptionOfListType(option, values, basePath,
|
|
85939
|
-
return filter2(map2(values, (v2, index) => convertJsonOption(option.element, v2, basePath,
|
|
85938
|
+
function convertJsonOptionOfListType(option, values, basePath, errors4, propertyAssignment, valueExpression, sourceFile) {
|
|
85939
|
+
return filter2(map2(values, (v2, index) => convertJsonOption(option.element, v2, basePath, errors4, propertyAssignment, valueExpression == null ? undefined : valueExpression.elements[index], sourceFile)), (v2) => option.listPreserveFalsyValues ? true : !!v2);
|
|
85940
85940
|
}
|
|
85941
85941
|
var invalidTrailingRecursionPattern = /(?:^|\/)\*\*\/?$/;
|
|
85942
85942
|
var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/;
|
|
@@ -86021,13 +86021,13 @@ ${lanes.join(`
|
|
|
86021
86021
|
return true;
|
|
86022
86022
|
return !hasExtension(pathToCheck) && excludeRegex.test(ensureTrailingDirectorySeparator(pathToCheck));
|
|
86023
86023
|
}
|
|
86024
|
-
function validateSpecs(specs,
|
|
86024
|
+
function validateSpecs(specs, errors4, disallowTrailingRecursion, jsonSourceFile, specKey) {
|
|
86025
86025
|
return specs.filter((spec) => {
|
|
86026
86026
|
if (!isString(spec))
|
|
86027
86027
|
return false;
|
|
86028
86028
|
const diag2 = specToDiagnostic(spec, disallowTrailingRecursion);
|
|
86029
86029
|
if (diag2 !== undefined) {
|
|
86030
|
-
|
|
86030
|
+
errors4.push(createDiagnostic(...diag2));
|
|
86031
86031
|
}
|
|
86032
86032
|
return diag2 === undefined;
|
|
86033
86033
|
});
|
|
@@ -152528,19 +152528,19 @@ ${lanes.join(`
|
|
|
152528
152528
|
}
|
|
152529
152529
|
function formatCodeSpan(file2, start, length2, indent3, squiggleColor, host) {
|
|
152530
152530
|
const { line: firstLine, character: firstLineChar } = getLineAndCharacterOfPosition(file2, start);
|
|
152531
|
-
const { line:
|
|
152531
|
+
const { line: lastLine2, character: lastLineChar } = getLineAndCharacterOfPosition(file2, start + length2);
|
|
152532
152532
|
const lastLineInFile = getLineAndCharacterOfPosition(file2, file2.text.length).line;
|
|
152533
|
-
const hasMoreThanFiveLines =
|
|
152534
|
-
let gutterWidth = (
|
|
152533
|
+
const hasMoreThanFiveLines = lastLine2 - firstLine >= 4;
|
|
152534
|
+
let gutterWidth = (lastLine2 + 1 + "").length;
|
|
152535
152535
|
if (hasMoreThanFiveLines) {
|
|
152536
152536
|
gutterWidth = Math.max(ellipsis.length, gutterWidth);
|
|
152537
152537
|
}
|
|
152538
152538
|
let context = "";
|
|
152539
|
-
for (let i3 = firstLine;i3 <=
|
|
152539
|
+
for (let i3 = firstLine;i3 <= lastLine2; i3++) {
|
|
152540
152540
|
context += host.getNewLine();
|
|
152541
|
-
if (hasMoreThanFiveLines && firstLine + 1 < i3 && i3 <
|
|
152541
|
+
if (hasMoreThanFiveLines && firstLine + 1 < i3 && i3 < lastLine2 - 1) {
|
|
152542
152542
|
context += indent3 + formatColorAndReset(ellipsis.padStart(gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine();
|
|
152543
|
-
i3 =
|
|
152543
|
+
i3 = lastLine2 - 1;
|
|
152544
152544
|
}
|
|
152545
152545
|
const lineStart = getPositionOfLineAndCharacter(file2, i3, 0);
|
|
152546
152546
|
const lineEnd = i3 < lastLineInFile ? getPositionOfLineAndCharacter(file2, i3 + 1, 0) : file2.text.length;
|
|
@@ -152552,10 +152552,10 @@ ${lanes.join(`
|
|
|
152552
152552
|
context += indent3 + formatColorAndReset("".padStart(gutterWidth), gutterStyleSequence) + gutterSeparator;
|
|
152553
152553
|
context += squiggleColor;
|
|
152554
152554
|
if (i3 === firstLine) {
|
|
152555
|
-
const lastCharForLine = i3 ===
|
|
152555
|
+
const lastCharForLine = i3 === lastLine2 ? lastLineChar : undefined;
|
|
152556
152556
|
context += lineContent.slice(0, firstLineChar).replace(/\S/g, " ");
|
|
152557
152557
|
context += lineContent.slice(firstLineChar, lastCharForLine).replace(/./g, "~");
|
|
152558
|
-
} else if (i3 ===
|
|
152558
|
+
} else if (i3 === lastLine2) {
|
|
152559
152559
|
context += lineContent.slice(0, lastLineChar).replace(/./g, "~");
|
|
152560
152560
|
} else {
|
|
152561
152561
|
context += lineContent.replace(/./g, "~");
|
|
@@ -160975,14 +160975,14 @@ ${lanes.join(`
|
|
|
160975
160975
|
var _a, _b;
|
|
160976
160976
|
(_b = (_a = state.hostWithWatch).onWatchStatusChange) == null || _b.call(_a, createCompilerDiagnostic(message, ...args), state.host.getNewLine(), state.baseCompilerOptions);
|
|
160977
160977
|
}
|
|
160978
|
-
function reportErrors({ host },
|
|
160979
|
-
|
|
160978
|
+
function reportErrors({ host }, errors4) {
|
|
160979
|
+
errors4.forEach((err) => host.reportDiagnostic(err));
|
|
160980
160980
|
}
|
|
160981
|
-
function reportAndStoreErrors(state, proj,
|
|
160982
|
-
reportErrors(state,
|
|
160981
|
+
function reportAndStoreErrors(state, proj, errors4) {
|
|
160982
|
+
reportErrors(state, errors4);
|
|
160983
160983
|
state.projectErrorsReported.set(proj, true);
|
|
160984
|
-
if (
|
|
160985
|
-
state.diagnostics.set(proj,
|
|
160984
|
+
if (errors4.length) {
|
|
160985
|
+
state.diagnostics.set(proj, errors4);
|
|
160986
160986
|
}
|
|
160987
160987
|
}
|
|
160988
160988
|
function reportParseConfigFileDiagnostic(state, proj) {
|
|
@@ -161182,7 +161182,7 @@ ${lanes.join(`
|
|
|
161182
161182
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
|
161183
161183
|
var _a;
|
|
161184
161184
|
const text = [];
|
|
161185
|
-
const
|
|
161185
|
+
const colors3 = createColors(sys2);
|
|
161186
161186
|
const name2 = getDisplayNameTextOfOption(option);
|
|
161187
161187
|
const valueCandidates = getValueCandidate(option);
|
|
161188
161188
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
|
@@ -161203,7 +161203,7 @@ ${lanes.join(`
|
|
|
161203
161203
|
}
|
|
161204
161204
|
text.push(sys2.newLine);
|
|
161205
161205
|
} else {
|
|
161206
|
-
text.push(
|
|
161206
|
+
text.push(colors3.blue(name2), sys2.newLine);
|
|
161207
161207
|
if (option.description) {
|
|
161208
161208
|
const description3 = getDiagnosticText(option.description);
|
|
161209
161209
|
text.push(description3);
|
|
@@ -161248,7 +161248,7 @@ ${lanes.join(`
|
|
|
161248
161248
|
if (isFirstLine) {
|
|
161249
161249
|
curLeft = left.padStart(rightAlignOfLeft2);
|
|
161250
161250
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
|
161251
|
-
curLeft = colorLeft ?
|
|
161251
|
+
curLeft = colorLeft ? colors3.blue(curLeft) : curLeft;
|
|
161252
161252
|
} else {
|
|
161253
161253
|
curLeft = "".padStart(leftAlignOfRight2);
|
|
161254
161254
|
}
|
|
@@ -161360,9 +161360,9 @@ ${lanes.join(`
|
|
|
161360
161360
|
return res;
|
|
161361
161361
|
}
|
|
161362
161362
|
function printEasyHelp(sys2, simpleOptions) {
|
|
161363
|
-
const
|
|
161363
|
+
const colors3 = createColors(sys2);
|
|
161364
161364
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
|
|
161365
|
-
output.push(
|
|
161365
|
+
output.push(colors3.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
|
161366
161366
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
|
161367
161367
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
|
161368
161368
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
|
@@ -161383,7 +161383,7 @@ ${lanes.join(`
|
|
|
161383
161383
|
function example(ex, desc) {
|
|
161384
161384
|
const examples = typeof ex === "string" ? [ex] : ex;
|
|
161385
161385
|
for (const example2 of examples) {
|
|
161386
|
-
output.push(" " +
|
|
161386
|
+
output.push(" " + colors3.blue(example2) + sys2.newLine);
|
|
161387
161387
|
}
|
|
161388
161388
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
|
161389
161389
|
}
|
|
@@ -161406,12 +161406,12 @@ ${lanes.join(`
|
|
|
161406
161406
|
}
|
|
161407
161407
|
function getHeader(sys2, message) {
|
|
161408
161408
|
var _a;
|
|
161409
|
-
const
|
|
161409
|
+
const colors3 = createColors(sys2);
|
|
161410
161410
|
const header = [];
|
|
161411
161411
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
|
161412
161412
|
const tsIconLength = 5;
|
|
161413
|
-
const tsIconFirstLine =
|
|
161414
|
-
const tsIconSecondLine =
|
|
161413
|
+
const tsIconFirstLine = colors3.blueBackground("".padStart(tsIconLength));
|
|
161414
|
+
const tsIconSecondLine = colors3.blueBackground(colors3.brightWhite("TS ".padStart(tsIconLength)));
|
|
161415
161415
|
if (terminalWidth >= message.length + tsIconLength) {
|
|
161416
161416
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
|
161417
161417
|
const leftAlign = rightAlign - tsIconLength;
|
|
@@ -161538,11 +161538,11 @@ ${lanes.join(`
|
|
|
161538
161538
|
}
|
|
161539
161539
|
function executeCommandLine(system, cb, commandLineArgs) {
|
|
161540
161540
|
if (isBuildCommand(commandLineArgs)) {
|
|
161541
|
-
const { buildOptions, watchOptions, projects, errors:
|
|
161541
|
+
const { buildOptions, watchOptions, projects, errors: errors4 } = parseBuildCommand(commandLineArgs);
|
|
161542
161542
|
if (buildOptions.generateCpuProfile && system.enableCPUProfiler) {
|
|
161543
|
-
system.enableCPUProfiler(buildOptions.generateCpuProfile, () => performBuild(system, cb, buildOptions, watchOptions, projects,
|
|
161543
|
+
system.enableCPUProfiler(buildOptions.generateCpuProfile, () => performBuild(system, cb, buildOptions, watchOptions, projects, errors4));
|
|
161544
161544
|
} else {
|
|
161545
|
-
return performBuild(system, cb, buildOptions, watchOptions, projects,
|
|
161545
|
+
return performBuild(system, cb, buildOptions, watchOptions, projects, errors4);
|
|
161546
161546
|
}
|
|
161547
161547
|
}
|
|
161548
161548
|
const commandLine = parseCommandLine(commandLineArgs, (path5) => system.readFile(path5));
|
|
@@ -161561,13 +161561,13 @@ ${lanes.join(`
|
|
|
161561
161561
|
return false;
|
|
161562
161562
|
}
|
|
161563
161563
|
var defaultJSDocParsingMode = 2;
|
|
161564
|
-
function performBuild(sys2, cb, buildOptions, watchOptions, projects,
|
|
161564
|
+
function performBuild(sys2, cb, buildOptions, watchOptions, projects, errors4) {
|
|
161565
161565
|
const reportDiagnostic = updateReportDiagnostic(sys2, createDiagnosticReporter(sys2), buildOptions);
|
|
161566
161566
|
if (buildOptions.locale) {
|
|
161567
|
-
validateLocaleAndSetLanguage(buildOptions.locale, sys2,
|
|
161567
|
+
validateLocaleAndSetLanguage(buildOptions.locale, sys2, errors4);
|
|
161568
161568
|
}
|
|
161569
|
-
if (
|
|
161570
|
-
|
|
161569
|
+
if (errors4.length > 0) {
|
|
161570
|
+
errors4.forEach(reportDiagnostic);
|
|
161571
161571
|
return sys2.exit(1);
|
|
161572
161572
|
}
|
|
161573
161573
|
if (buildOptions.help) {
|
|
@@ -171922,11 +171922,11 @@ ${newComment.split(`
|
|
|
171922
171922
|
return emptyArray;
|
|
171923
171923
|
const { selectedVariableDeclaration, func } = info;
|
|
171924
171924
|
const possibleActions = [];
|
|
171925
|
-
const
|
|
171925
|
+
const errors4 = [];
|
|
171926
171926
|
if (refactorKindBeginsWith(toNamedFunctionAction.kind, kind)) {
|
|
171927
171927
|
const error210 = selectedVariableDeclaration || isArrowFunction(func) && isVariableDeclaration(func.parent) ? undefined : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_named_function);
|
|
171928
171928
|
if (error210) {
|
|
171929
|
-
|
|
171929
|
+
errors4.push({ ...toNamedFunctionAction, notApplicableReason: error210 });
|
|
171930
171930
|
} else {
|
|
171931
171931
|
possibleActions.push(toNamedFunctionAction);
|
|
171932
171932
|
}
|
|
@@ -171934,7 +171934,7 @@ ${newComment.split(`
|
|
|
171934
171934
|
if (refactorKindBeginsWith(toAnonymousFunctionAction.kind, kind)) {
|
|
171935
171935
|
const error210 = !selectedVariableDeclaration && isArrowFunction(func) ? undefined : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_anonymous_function);
|
|
171936
171936
|
if (error210) {
|
|
171937
|
-
|
|
171937
|
+
errors4.push({ ...toAnonymousFunctionAction, notApplicableReason: error210 });
|
|
171938
171938
|
} else {
|
|
171939
171939
|
possibleActions.push(toAnonymousFunctionAction);
|
|
171940
171940
|
}
|
|
@@ -171942,7 +171942,7 @@ ${newComment.split(`
|
|
|
171942
171942
|
if (refactorKindBeginsWith(toArrowFunctionAction.kind, kind)) {
|
|
171943
171943
|
const error210 = isFunctionExpression(func) ? undefined : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_arrow_function);
|
|
171944
171944
|
if (error210) {
|
|
171945
|
-
|
|
171945
|
+
errors4.push({ ...toArrowFunctionAction, notApplicableReason: error210 });
|
|
171946
171946
|
} else {
|
|
171947
171947
|
possibleActions.push(toArrowFunctionAction);
|
|
171948
171948
|
}
|
|
@@ -171950,7 +171950,7 @@ ${newComment.split(`
|
|
|
171950
171950
|
return [{
|
|
171951
171951
|
name: refactorName8,
|
|
171952
171952
|
description: refactorDescription4,
|
|
171953
|
-
actions: possibleActions.length === 0 && context.preferences.provideRefactorNotApplicableReason ?
|
|
171953
|
+
actions: possibleActions.length === 0 && context.preferences.provideRefactorNotApplicableReason ? errors4 : possibleActions
|
|
171954
171954
|
}];
|
|
171955
171955
|
}
|
|
171956
171956
|
function getRefactorEditsToConvertFunctionExpressions(context, actionName2) {
|
|
@@ -172975,22 +172975,22 @@ ${newComment.split(`
|
|
|
172975
172975
|
if (!rangeToExtract.errors || rangeToExtract.errors.length === 0 || !context.preferences.provideRefactorNotApplicableReason) {
|
|
172976
172976
|
return emptyArray;
|
|
172977
172977
|
}
|
|
172978
|
-
const
|
|
172978
|
+
const errors4 = [];
|
|
172979
172979
|
if (refactorKindBeginsWith(extractFunctionAction.kind, requestedRefactor)) {
|
|
172980
|
-
|
|
172980
|
+
errors4.push({
|
|
172981
172981
|
name: refactorName12,
|
|
172982
172982
|
description: extractFunctionAction.description,
|
|
172983
172983
|
actions: [{ ...extractFunctionAction, notApplicableReason: getStringError(rangeToExtract.errors) }]
|
|
172984
172984
|
});
|
|
172985
172985
|
}
|
|
172986
172986
|
if (refactorKindBeginsWith(extractConstantAction.kind, requestedRefactor)) {
|
|
172987
|
-
|
|
172987
|
+
errors4.push({
|
|
172988
172988
|
name: refactorName12,
|
|
172989
172989
|
description: extractConstantAction.description,
|
|
172990
172990
|
actions: [{ ...extractConstantAction, notApplicableReason: getStringError(rangeToExtract.errors) }]
|
|
172991
172991
|
});
|
|
172992
172992
|
}
|
|
172993
|
-
return
|
|
172993
|
+
return errors4;
|
|
172994
172994
|
}
|
|
172995
172995
|
const { affectedTextRange, extractions } = getPossibleExtractions(targetRange, context);
|
|
172996
172996
|
if (extractions === undefined) {
|
|
@@ -173082,8 +173082,8 @@ ${newComment.split(`
|
|
|
173082
173082
|
});
|
|
173083
173083
|
}
|
|
173084
173084
|
return infos.length ? infos : emptyArray;
|
|
173085
|
-
function getStringError(
|
|
173086
|
-
let error210 =
|
|
173085
|
+
function getStringError(errors4) {
|
|
173086
|
+
let error210 = errors4[0].messageText;
|
|
173087
173087
|
if (typeof error210 !== "string") {
|
|
173088
173088
|
error210 = error210.messageText;
|
|
173089
173089
|
}
|
|
@@ -173194,9 +173194,9 @@ ${newComment.split(`
|
|
|
173194
173194
|
return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] };
|
|
173195
173195
|
}
|
|
173196
173196
|
const node = refineNode(start);
|
|
173197
|
-
const
|
|
173198
|
-
if (
|
|
173199
|
-
return { errors:
|
|
173197
|
+
const errors4 = checkRootNode(node) || checkNode(node);
|
|
173198
|
+
if (errors4) {
|
|
173199
|
+
return { errors: errors4 };
|
|
173200
173200
|
}
|
|
173201
173201
|
return { targetRange: { range: getStatementOrExpressionRange(node), facts: rangeFacts, thisNode } };
|
|
173202
173202
|
function refineNode(node2) {
|
|
@@ -174153,11 +174153,11 @@ ${newComment.split(`
|
|
|
174153
174153
|
}
|
|
174154
174154
|
if (targetRange.facts & 2 && usage === 2) {
|
|
174155
174155
|
const diag2 = createDiagnosticForNode(identifier, Messages.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators);
|
|
174156
|
-
for (const
|
|
174157
|
-
|
|
174156
|
+
for (const errors4 of functionErrorsPerScope) {
|
|
174157
|
+
errors4.push(diag2);
|
|
174158
174158
|
}
|
|
174159
|
-
for (const
|
|
174160
|
-
|
|
174159
|
+
for (const errors4 of constantErrorsPerScope) {
|
|
174160
|
+
errors4.push(diag2);
|
|
174161
174161
|
}
|
|
174162
174162
|
}
|
|
174163
174163
|
for (let i3 = 0;i3 < scopes.length; i3++) {
|
|
@@ -176356,14 +176356,14 @@ ${newComment.split(`
|
|
|
176356
176356
|
function toggleLineComment(fileName, textRange, insertComment) {
|
|
176357
176357
|
const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
|
|
176358
176358
|
const textChanges2 = [];
|
|
176359
|
-
const { lineStarts, firstLine, lastLine } = getLinesForRange(sourceFile, textRange);
|
|
176359
|
+
const { lineStarts, firstLine, lastLine: lastLine2 } = getLinesForRange(sourceFile, textRange);
|
|
176360
176360
|
let isCommenting = insertComment || false;
|
|
176361
176361
|
let leftMostPosition = Number.MAX_VALUE;
|
|
176362
176362
|
const lineTextStarts = /* @__PURE__ */ new Map;
|
|
176363
176363
|
const firstNonWhitespaceCharacterRegex = new RegExp(/\S/);
|
|
176364
176364
|
const isJsx = isInsideJsxElement(sourceFile, lineStarts[firstLine]);
|
|
176365
176365
|
const openComment = isJsx ? "{/*" : "//";
|
|
176366
|
-
for (let i3 = firstLine;i3 <=
|
|
176366
|
+
for (let i3 = firstLine;i3 <= lastLine2; i3++) {
|
|
176367
176367
|
const lineText = sourceFile.text.substring(lineStarts[i3], sourceFile.getLineEndOfPosition(lineStarts[i3]));
|
|
176368
176368
|
const regExec = firstNonWhitespaceCharacterRegex.exec(lineText);
|
|
176369
176369
|
if (regExec) {
|
|
@@ -176374,8 +176374,8 @@ ${newComment.split(`
|
|
|
176374
176374
|
}
|
|
176375
176375
|
}
|
|
176376
176376
|
}
|
|
176377
|
-
for (let i3 = firstLine;i3 <=
|
|
176378
|
-
if (firstLine !==
|
|
176377
|
+
for (let i3 = firstLine;i3 <= lastLine2; i3++) {
|
|
176378
|
+
if (firstLine !== lastLine2 && lineStarts[i3] === textRange.end) {
|
|
176379
176379
|
continue;
|
|
176380
176380
|
}
|
|
176381
176381
|
const lineTextStart = lineTextStarts.get(i3.toString());
|
|
@@ -176498,8 +176498,8 @@ ${newComment.split(`
|
|
|
176498
176498
|
}
|
|
176499
176499
|
function commentSelection(fileName, textRange) {
|
|
176500
176500
|
const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
|
|
176501
|
-
const { firstLine, lastLine } = getLinesForRange(sourceFile, textRange);
|
|
176502
|
-
return firstLine ===
|
|
176501
|
+
const { firstLine, lastLine: lastLine2 } = getLinesForRange(sourceFile, textRange);
|
|
176502
|
+
return firstLine === lastLine2 && textRange.pos !== textRange.end ? toggleMultilineComment(fileName, textRange, true) : toggleLineComment(fileName, textRange, true);
|
|
176503
176503
|
}
|
|
176504
176504
|
function uncommentSelection(fileName, textRange) {
|
|
176505
176505
|
const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
|
|
@@ -200094,11 +200094,11 @@ ${options.prefix}` : `
|
|
|
200094
200094
|
return n3;
|
|
200095
200095
|
}
|
|
200096
200096
|
}
|
|
200097
|
-
function prepareRangeContainsErrorFunction(
|
|
200098
|
-
if (!
|
|
200097
|
+
function prepareRangeContainsErrorFunction(errors4, originalRange) {
|
|
200098
|
+
if (!errors4.length) {
|
|
200099
200099
|
return rangeHasNoErrors;
|
|
200100
200100
|
}
|
|
200101
|
-
const sorted =
|
|
200101
|
+
const sorted = errors4.filter((d3) => rangeOverlapsWithStartEnd(originalRange, d3.start, d3.start + d3.length)).sort((e1, e22) => e1.start - e22.start);
|
|
200102
200102
|
if (!sorted.length) {
|
|
200103
200103
|
return rangeHasNoErrors;
|
|
200104
200104
|
}
|
|
@@ -207088,15 +207088,15 @@ ${options.prefix}` : `
|
|
|
207088
207088
|
}
|
|
207089
207089
|
function convertWatchOptions(protocolOptions, currentDirectory) {
|
|
207090
207090
|
let watchOptions;
|
|
207091
|
-
let
|
|
207091
|
+
let errors4;
|
|
207092
207092
|
optionsForWatch.forEach((option) => {
|
|
207093
207093
|
const propertyValue = protocolOptions[option.name];
|
|
207094
207094
|
if (propertyValue === undefined)
|
|
207095
207095
|
return;
|
|
207096
207096
|
const mappedValues = watchOptionsConverters.get(option.name);
|
|
207097
|
-
(watchOptions || (watchOptions = {}))[option.name] = mappedValues ? isString(propertyValue) ? mappedValues.get(propertyValue.toLowerCase()) : propertyValue : convertJsonOption(option, propertyValue, currentDirectory || "",
|
|
207097
|
+
(watchOptions || (watchOptions = {}))[option.name] = mappedValues ? isString(propertyValue) ? mappedValues.get(propertyValue.toLowerCase()) : propertyValue : convertJsonOption(option, propertyValue, currentDirectory || "", errors4 || (errors4 = []));
|
|
207098
207098
|
});
|
|
207099
|
-
return watchOptions && { watchOptions, errors:
|
|
207099
|
+
return watchOptions && { watchOptions, errors: errors4 };
|
|
207100
207100
|
}
|
|
207101
207101
|
function convertTypeAcquisition(protocolOptions) {
|
|
207102
207102
|
let result;
|
|
@@ -215549,14 +215549,14 @@ var import_typescript, import_graphql7, teardownPlaceholder = () => {}, h2, asyn
|
|
|
215549
215549
|
hasNext: r4.hasNext == null ? n4 : r4.hasNext,
|
|
215550
215550
|
stale: false
|
|
215551
215551
|
};
|
|
215552
|
-
},
|
|
215552
|
+
}, deepMerge2 = (e5, r4) => {
|
|
215553
215553
|
if (typeof e5 == "object" && e5 != null) {
|
|
215554
215554
|
if (!e5.constructor || e5.constructor === Object || Array.isArray(e5)) {
|
|
215555
215555
|
e5 = Array.isArray(e5) ? [...e5] : {
|
|
215556
215556
|
...e5
|
|
215557
215557
|
};
|
|
215558
215558
|
for (var a5 of Object.keys(r4)) {
|
|
215559
|
-
e5[a5] =
|
|
215559
|
+
e5[a5] = deepMerge2(e5[a5], r4[a5]);
|
|
215560
215560
|
}
|
|
215561
215561
|
return e5;
|
|
215562
215562
|
}
|
|
@@ -215606,10 +215606,10 @@ var import_typescript, import_graphql7, teardownPlaceholder = () => {}, h2, asyn
|
|
|
215606
215606
|
if (e6.items) {
|
|
215607
215607
|
var f2 = +r5 >= 0 ? r5 : 0;
|
|
215608
215608
|
for (var p2 = 0, m3 = e6.items.length;p2 < m3; p2++) {
|
|
215609
|
-
a6[f2 + p2] =
|
|
215609
|
+
a6[f2 + p2] = deepMerge2(a6[f2 + p2], e6.items[p2]);
|
|
215610
215610
|
}
|
|
215611
215611
|
} else if (e6.data !== undefined) {
|
|
215612
|
-
a6[r5] =
|
|
215612
|
+
a6[r5] = deepMerge2(a6[r5], e6.data);
|
|
215613
215613
|
}
|
|
215614
215614
|
};
|
|
215615
215615
|
for (var l2 of s3) {
|
|
@@ -230804,13 +230804,6 @@ var require_slugify = __commonJS((exports, module) => {
|
|
|
230804
230804
|
});
|
|
230805
230805
|
});
|
|
230806
230806
|
|
|
230807
|
-
// ../../node_modules/.bun/emoji-regex@10.6.0/node_modules/emoji-regex/index.js
|
|
230808
|
-
var require_emoji_regex2 = __commonJS((exports, module) => {
|
|
230809
|
-
module.exports = () => {
|
|
230810
|
-
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
230811
|
-
};
|
|
230812
|
-
});
|
|
230813
|
-
|
|
230814
230807
|
// ../../node_modules/.bun/mute-stream@2.0.0/node_modules/mute-stream/lib/index.js
|
|
230815
230808
|
var require_lib13 = __commonJS((exports, module) => {
|
|
230816
230809
|
var Stream2 = __require("stream");
|
|
@@ -230992,8 +230985,8 @@ var init_errors = __esm(() => {
|
|
|
230992
230985
|
});
|
|
230993
230986
|
|
|
230994
230987
|
// ../../node_modules/.bun/abitype@1.1.0+0c447f3ab58cb56e/node_modules/abitype/dist/esm/regex.js
|
|
230995
|
-
function execTyped(
|
|
230996
|
-
const match2 =
|
|
230988
|
+
function execTyped(regex, string4) {
|
|
230989
|
+
const match2 = regex.exec(string4);
|
|
230997
230990
|
return match2?.groups;
|
|
230998
230991
|
}
|
|
230999
230992
|
var bytesRegex, integerRegex, isTupleRegex;
|
|
@@ -238338,7 +238331,7 @@ function trimLeft(value4) {
|
|
|
238338
238331
|
function trimRight(value4) {
|
|
238339
238332
|
return trim2(value4, { dir: "right" });
|
|
238340
238333
|
}
|
|
238341
|
-
function
|
|
238334
|
+
function validate3(value4) {
|
|
238342
238335
|
try {
|
|
238343
238336
|
assert2(value4);
|
|
238344
238337
|
return true;
|
|
@@ -238532,7 +238525,7 @@ function toNumber(hex3, options = {}) {
|
|
|
238532
238525
|
return Number(hex3);
|
|
238533
238526
|
return Number(toBigInt(hex3, options));
|
|
238534
238527
|
}
|
|
238535
|
-
function
|
|
238528
|
+
function validate4(value4, options = {}) {
|
|
238536
238529
|
const { strict = false } = options;
|
|
238537
238530
|
try {
|
|
238538
238531
|
assert3(value4, { strict });
|
|
@@ -239126,7 +239119,7 @@ function withResolvers() {
|
|
|
239126
239119
|
|
|
239127
239120
|
// ../../node_modules/.bun/viem@2.39.0+0c447f3ab58cb56e/node_modules/viem/_esm/utils/promise/createBatchScheduler.js
|
|
239128
239121
|
function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, sort }) {
|
|
239129
|
-
const
|
|
239122
|
+
const exec = async () => {
|
|
239130
239123
|
const scheduler = getScheduler();
|
|
239131
239124
|
flush();
|
|
239132
239125
|
const args = scheduler.map(({ args: args2 }) => args2);
|
|
@@ -239156,14 +239149,14 @@ function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, sort }) {
|
|
|
239156
239149
|
const { promise: promise2, resolve: resolve7, reject } = withResolvers();
|
|
239157
239150
|
const split3 = shouldSplitBatch?.([...getBatchedArgs(), args]);
|
|
239158
239151
|
if (split3)
|
|
239159
|
-
|
|
239152
|
+
exec();
|
|
239160
239153
|
const hasActiveScheduler = getScheduler().length > 0;
|
|
239161
239154
|
if (hasActiveScheduler) {
|
|
239162
239155
|
setScheduler({ args, resolve: resolve7, reject });
|
|
239163
239156
|
return promise2;
|
|
239164
239157
|
}
|
|
239165
239158
|
setScheduler({ args, resolve: resolve7, reject });
|
|
239166
|
-
setTimeout(
|
|
239159
|
+
setTimeout(exec, wait);
|
|
239167
239160
|
return promise2;
|
|
239168
239161
|
}
|
|
239169
239162
|
};
|
|
@@ -246695,6 +246688,13 @@ var {
|
|
|
246695
246688
|
Help
|
|
246696
246689
|
} = import__.default;
|
|
246697
246690
|
|
|
246691
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
246692
|
+
var isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
|
|
246693
|
+
var isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
|
|
246694
|
+
var isBackspaceKey = (key) => key.name === "backspace";
|
|
246695
|
+
var isTabKey = (key) => key.name === "tab";
|
|
246696
|
+
var isNumberKey = (key) => "1234567890".includes(key.name);
|
|
246697
|
+
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
246698
246698
|
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
246699
246699
|
class AbortPromptError extends Error {
|
|
246700
246700
|
name = "AbortPromptError";
|
|
@@ -246713,9 +246713,154 @@ class CancelPromptError extends Error {
|
|
|
246713
246713
|
class ExitPromptError extends Error {
|
|
246714
246714
|
name = "ExitPromptError";
|
|
246715
246715
|
}
|
|
246716
|
+
|
|
246717
|
+
class HookError extends Error {
|
|
246718
|
+
name = "HookError";
|
|
246719
|
+
}
|
|
246720
|
+
|
|
246716
246721
|
class ValidationError extends Error {
|
|
246717
246722
|
name = "ValidationError";
|
|
246718
246723
|
}
|
|
246724
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
246725
|
+
import { AsyncResource as AsyncResource2 } from "node:async_hooks";
|
|
246726
|
+
|
|
246727
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
246728
|
+
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
|
246729
|
+
var hookStorage = new AsyncLocalStorage;
|
|
246730
|
+
function createStore(rl) {
|
|
246731
|
+
const store = {
|
|
246732
|
+
rl,
|
|
246733
|
+
hooks: [],
|
|
246734
|
+
hooksCleanup: [],
|
|
246735
|
+
hooksEffect: [],
|
|
246736
|
+
index: 0,
|
|
246737
|
+
handleChange() {}
|
|
246738
|
+
};
|
|
246739
|
+
return store;
|
|
246740
|
+
}
|
|
246741
|
+
function withHooks(rl, cb) {
|
|
246742
|
+
const store = createStore(rl);
|
|
246743
|
+
return hookStorage.run(store, () => {
|
|
246744
|
+
function cycle(render) {
|
|
246745
|
+
store.handleChange = () => {
|
|
246746
|
+
store.index = 0;
|
|
246747
|
+
render();
|
|
246748
|
+
};
|
|
246749
|
+
store.handleChange();
|
|
246750
|
+
}
|
|
246751
|
+
return cb(cycle);
|
|
246752
|
+
});
|
|
246753
|
+
}
|
|
246754
|
+
function getStore() {
|
|
246755
|
+
const store = hookStorage.getStore();
|
|
246756
|
+
if (!store) {
|
|
246757
|
+
throw new HookError("[Inquirer] Hook functions can only be called from within a prompt");
|
|
246758
|
+
}
|
|
246759
|
+
return store;
|
|
246760
|
+
}
|
|
246761
|
+
function readline() {
|
|
246762
|
+
return getStore().rl;
|
|
246763
|
+
}
|
|
246764
|
+
function withUpdates(fn) {
|
|
246765
|
+
const wrapped = (...args) => {
|
|
246766
|
+
const store = getStore();
|
|
246767
|
+
let shouldUpdate = false;
|
|
246768
|
+
const oldHandleChange = store.handleChange;
|
|
246769
|
+
store.handleChange = () => {
|
|
246770
|
+
shouldUpdate = true;
|
|
246771
|
+
};
|
|
246772
|
+
const returnValue = fn(...args);
|
|
246773
|
+
if (shouldUpdate) {
|
|
246774
|
+
oldHandleChange();
|
|
246775
|
+
}
|
|
246776
|
+
store.handleChange = oldHandleChange;
|
|
246777
|
+
return returnValue;
|
|
246778
|
+
};
|
|
246779
|
+
return AsyncResource.bind(wrapped);
|
|
246780
|
+
}
|
|
246781
|
+
function withPointer(cb) {
|
|
246782
|
+
const store = getStore();
|
|
246783
|
+
const { index } = store;
|
|
246784
|
+
const pointer = {
|
|
246785
|
+
get() {
|
|
246786
|
+
return store.hooks[index];
|
|
246787
|
+
},
|
|
246788
|
+
set(value) {
|
|
246789
|
+
store.hooks[index] = value;
|
|
246790
|
+
},
|
|
246791
|
+
initialized: index in store.hooks
|
|
246792
|
+
};
|
|
246793
|
+
const returnValue = cb(pointer);
|
|
246794
|
+
store.index++;
|
|
246795
|
+
return returnValue;
|
|
246796
|
+
}
|
|
246797
|
+
function handleChange() {
|
|
246798
|
+
getStore().handleChange();
|
|
246799
|
+
}
|
|
246800
|
+
var effectScheduler = {
|
|
246801
|
+
queue(cb) {
|
|
246802
|
+
const store = getStore();
|
|
246803
|
+
const { index } = store;
|
|
246804
|
+
store.hooksEffect.push(() => {
|
|
246805
|
+
store.hooksCleanup[index]?.();
|
|
246806
|
+
const cleanFn = cb(readline());
|
|
246807
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
|
246808
|
+
throw new ValidationError("useEffect return value must be a cleanup function or nothing.");
|
|
246809
|
+
}
|
|
246810
|
+
store.hooksCleanup[index] = cleanFn;
|
|
246811
|
+
});
|
|
246812
|
+
},
|
|
246813
|
+
run() {
|
|
246814
|
+
const store = getStore();
|
|
246815
|
+
withUpdates(() => {
|
|
246816
|
+
store.hooksEffect.forEach((effect) => {
|
|
246817
|
+
effect();
|
|
246818
|
+
});
|
|
246819
|
+
store.hooksEffect.length = 0;
|
|
246820
|
+
})();
|
|
246821
|
+
},
|
|
246822
|
+
clearAll() {
|
|
246823
|
+
const store = getStore();
|
|
246824
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
|
246825
|
+
cleanFn?.();
|
|
246826
|
+
});
|
|
246827
|
+
store.hooksEffect.length = 0;
|
|
246828
|
+
store.hooksCleanup.length = 0;
|
|
246829
|
+
}
|
|
246830
|
+
};
|
|
246831
|
+
|
|
246832
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
246833
|
+
function useState(defaultValue) {
|
|
246834
|
+
return withPointer((pointer) => {
|
|
246835
|
+
const setState = AsyncResource2.bind(function setState(newValue) {
|
|
246836
|
+
if (pointer.get() !== newValue) {
|
|
246837
|
+
pointer.set(newValue);
|
|
246838
|
+
handleChange();
|
|
246839
|
+
}
|
|
246840
|
+
});
|
|
246841
|
+
if (pointer.initialized) {
|
|
246842
|
+
return [pointer.get(), setState];
|
|
246843
|
+
}
|
|
246844
|
+
const value = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
246845
|
+
pointer.set(value);
|
|
246846
|
+
return [value, setState];
|
|
246847
|
+
});
|
|
246848
|
+
}
|
|
246849
|
+
|
|
246850
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
246851
|
+
function useEffect(cb, depArray) {
|
|
246852
|
+
withPointer((pointer) => {
|
|
246853
|
+
const oldDeps = pointer.get();
|
|
246854
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i) => !Object.is(dep, oldDeps[i]));
|
|
246855
|
+
if (hasChanged) {
|
|
246856
|
+
effectScheduler.queue(cb);
|
|
246857
|
+
}
|
|
246858
|
+
pointer.set(depArray);
|
|
246859
|
+
});
|
|
246860
|
+
}
|
|
246861
|
+
|
|
246862
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
246863
|
+
var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
|
|
246719
246864
|
|
|
246720
246865
|
// ../../node_modules/.bun/@inquirer+figures@1.0.15/node_modules/@inquirer/figures/dist/esm/index.js
|
|
246721
246866
|
import process2 from "node:process";
|
|
@@ -247006,6 +247151,203 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
|
247006
247151
|
var esm_default = figures;
|
|
247007
247152
|
var replacements = Object.entries(specialMainSymbols);
|
|
247008
247153
|
|
|
247154
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
247155
|
+
var defaultTheme = {
|
|
247156
|
+
prefix: {
|
|
247157
|
+
idle: import_yoctocolors_cjs.default.blue("?"),
|
|
247158
|
+
done: import_yoctocolors_cjs.default.green(esm_default.tick)
|
|
247159
|
+
},
|
|
247160
|
+
spinner: {
|
|
247161
|
+
interval: 80,
|
|
247162
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs.default.yellow(frame))
|
|
247163
|
+
},
|
|
247164
|
+
style: {
|
|
247165
|
+
answer: import_yoctocolors_cjs.default.cyan,
|
|
247166
|
+
message: import_yoctocolors_cjs.default.bold,
|
|
247167
|
+
error: (text) => import_yoctocolors_cjs.default.red(`> ${text}`),
|
|
247168
|
+
defaultAnswer: (text) => import_yoctocolors_cjs.default.dim(`(${text})`),
|
|
247169
|
+
help: import_yoctocolors_cjs.default.dim,
|
|
247170
|
+
highlight: import_yoctocolors_cjs.default.cyan,
|
|
247171
|
+
key: (text) => import_yoctocolors_cjs.default.cyan(import_yoctocolors_cjs.default.bold(`<${text}>`))
|
|
247172
|
+
}
|
|
247173
|
+
};
|
|
247174
|
+
|
|
247175
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
247176
|
+
function isPlainObject(value) {
|
|
247177
|
+
if (typeof value !== "object" || value === null)
|
|
247178
|
+
return false;
|
|
247179
|
+
let proto = value;
|
|
247180
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
|
247181
|
+
proto = Object.getPrototypeOf(proto);
|
|
247182
|
+
}
|
|
247183
|
+
return Object.getPrototypeOf(value) === proto;
|
|
247184
|
+
}
|
|
247185
|
+
function deepMerge(...objects) {
|
|
247186
|
+
const output = {};
|
|
247187
|
+
for (const obj of objects) {
|
|
247188
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
247189
|
+
const prevValue = output[key];
|
|
247190
|
+
output[key] = isPlainObject(prevValue) && isPlainObject(value) ? deepMerge(prevValue, value) : value;
|
|
247191
|
+
}
|
|
247192
|
+
}
|
|
247193
|
+
return output;
|
|
247194
|
+
}
|
|
247195
|
+
function makeTheme(...themes) {
|
|
247196
|
+
const themesToMerge = [
|
|
247197
|
+
defaultTheme,
|
|
247198
|
+
...themes.filter((theme) => theme != null)
|
|
247199
|
+
];
|
|
247200
|
+
return deepMerge(...themesToMerge);
|
|
247201
|
+
}
|
|
247202
|
+
|
|
247203
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
247204
|
+
function usePrefix({ status = "idle", theme }) {
|
|
247205
|
+
const [showLoader, setShowLoader] = useState(false);
|
|
247206
|
+
const [tick, setTick] = useState(0);
|
|
247207
|
+
const { prefix, spinner } = makeTheme(theme);
|
|
247208
|
+
useEffect(() => {
|
|
247209
|
+
if (status === "loading") {
|
|
247210
|
+
let tickInterval;
|
|
247211
|
+
let inc = -1;
|
|
247212
|
+
const delayTimeout = setTimeout(() => {
|
|
247213
|
+
setShowLoader(true);
|
|
247214
|
+
tickInterval = setInterval(() => {
|
|
247215
|
+
inc = inc + 1;
|
|
247216
|
+
setTick(inc % spinner.frames.length);
|
|
247217
|
+
}, spinner.interval);
|
|
247218
|
+
}, 300);
|
|
247219
|
+
return () => {
|
|
247220
|
+
clearTimeout(delayTimeout);
|
|
247221
|
+
clearInterval(tickInterval);
|
|
247222
|
+
};
|
|
247223
|
+
} else {
|
|
247224
|
+
setShowLoader(false);
|
|
247225
|
+
}
|
|
247226
|
+
}, [status]);
|
|
247227
|
+
if (showLoader) {
|
|
247228
|
+
return spinner.frames[tick];
|
|
247229
|
+
}
|
|
247230
|
+
const iconName = status === "loading" ? "idle" : status;
|
|
247231
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
247232
|
+
}
|
|
247233
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
|
247234
|
+
function useMemo(fn, dependencies) {
|
|
247235
|
+
return withPointer((pointer) => {
|
|
247236
|
+
const prev = pointer.get();
|
|
247237
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
|
247238
|
+
const value = fn();
|
|
247239
|
+
pointer.set({ value, dependencies });
|
|
247240
|
+
return value;
|
|
247241
|
+
}
|
|
247242
|
+
return prev.value;
|
|
247243
|
+
});
|
|
247244
|
+
}
|
|
247245
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
247246
|
+
function useRef(val) {
|
|
247247
|
+
return useState({ current: val })[0];
|
|
247248
|
+
}
|
|
247249
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
247250
|
+
function useKeypress(userHandler) {
|
|
247251
|
+
const signal = useRef(userHandler);
|
|
247252
|
+
signal.current = userHandler;
|
|
247253
|
+
useEffect((rl) => {
|
|
247254
|
+
let ignore = false;
|
|
247255
|
+
const handler = withUpdates((_input, event) => {
|
|
247256
|
+
if (ignore)
|
|
247257
|
+
return;
|
|
247258
|
+
signal.current(event, rl);
|
|
247259
|
+
});
|
|
247260
|
+
rl.input.on("keypress", handler);
|
|
247261
|
+
return () => {
|
|
247262
|
+
ignore = true;
|
|
247263
|
+
rl.input.removeListener("keypress", handler);
|
|
247264
|
+
};
|
|
247265
|
+
}, []);
|
|
247266
|
+
}
|
|
247267
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
247268
|
+
var import_cli_width = __toESM(require_cli_width(), 1);
|
|
247269
|
+
var import_wrap_ansi = __toESM(require_wrap_ansi(), 1);
|
|
247270
|
+
function breakLines(content, width) {
|
|
247271
|
+
return content.split(`
|
|
247272
|
+
`).flatMap((line) => import_wrap_ansi.default(line, width, { trim: false, hard: true }).split(`
|
|
247273
|
+
`).map((str) => str.trimEnd())).join(`
|
|
247274
|
+
`);
|
|
247275
|
+
}
|
|
247276
|
+
function readlineWidth() {
|
|
247277
|
+
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
|
247278
|
+
}
|
|
247279
|
+
|
|
247280
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
|
247281
|
+
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
|
247282
|
+
const state = useRef({
|
|
247283
|
+
lastPointer: active,
|
|
247284
|
+
lastActive: undefined
|
|
247285
|
+
});
|
|
247286
|
+
const { lastPointer, lastActive } = state.current;
|
|
247287
|
+
const middle = Math.floor(pageSize / 2);
|
|
247288
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
|
247289
|
+
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
|
247290
|
+
let pointer = defaultPointerPosition;
|
|
247291
|
+
if (renderedLength > pageSize) {
|
|
247292
|
+
if (loop) {
|
|
247293
|
+
pointer = lastPointer;
|
|
247294
|
+
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
|
247295
|
+
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
|
247296
|
+
}
|
|
247297
|
+
} else {
|
|
247298
|
+
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
|
247299
|
+
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
|
247300
|
+
}
|
|
247301
|
+
}
|
|
247302
|
+
state.current.lastPointer = pointer;
|
|
247303
|
+
state.current.lastActive = active;
|
|
247304
|
+
return pointer;
|
|
247305
|
+
}
|
|
247306
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
247307
|
+
const width = readlineWidth();
|
|
247308
|
+
const bound = (num) => (num % items.length + items.length) % items.length;
|
|
247309
|
+
const renderedItems = items.map((item, index) => {
|
|
247310
|
+
if (item == null)
|
|
247311
|
+
return [];
|
|
247312
|
+
return breakLines(renderItem({ item, index, isActive: index === active }), width).split(`
|
|
247313
|
+
`);
|
|
247314
|
+
});
|
|
247315
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
|
247316
|
+
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
|
247317
|
+
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
|
247318
|
+
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
|
247319
|
+
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
|
247320
|
+
const pageBuffer = Array.from({ length: pageSize });
|
|
247321
|
+
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
|
247322
|
+
const itemVisited = new Set([active]);
|
|
247323
|
+
let bufferPointer = activeItemPosition + activeItem.length;
|
|
247324
|
+
let itemPointer = bound(active + 1);
|
|
247325
|
+
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
|
247326
|
+
const lines = renderItemAtIndex(itemPointer);
|
|
247327
|
+
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
|
247328
|
+
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
|
247329
|
+
itemVisited.add(itemPointer);
|
|
247330
|
+
bufferPointer += linesToAdd.length;
|
|
247331
|
+
itemPointer = bound(itemPointer + 1);
|
|
247332
|
+
}
|
|
247333
|
+
bufferPointer = activeItemPosition - 1;
|
|
247334
|
+
itemPointer = bound(active - 1);
|
|
247335
|
+
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
|
247336
|
+
const lines = renderItemAtIndex(itemPointer);
|
|
247337
|
+
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
|
247338
|
+
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
|
247339
|
+
itemVisited.add(itemPointer);
|
|
247340
|
+
bufferPointer -= linesToAdd.length;
|
|
247341
|
+
itemPointer = bound(itemPointer - 1);
|
|
247342
|
+
}
|
|
247343
|
+
return pageBuffer.filter((line) => typeof line === "string").join(`
|
|
247344
|
+
`);
|
|
247345
|
+
}
|
|
247346
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
247347
|
+
var import_mute_stream = __toESM(require_lib(), 1);
|
|
247348
|
+
import * as readline2 from "node:readline";
|
|
247349
|
+
import { AsyncResource as AsyncResource3 } from "node:async_hooks";
|
|
247350
|
+
|
|
247009
247351
|
// ../../node_modules/.bun/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
247010
247352
|
var signals = [];
|
|
247011
247353
|
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
@@ -247214,6 +247556,9 @@ var {
|
|
|
247214
247556
|
unload
|
|
247215
247557
|
} = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback);
|
|
247216
247558
|
|
|
247559
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
247560
|
+
import { stripVTControlCharacters } from "node:util";
|
|
247561
|
+
|
|
247217
247562
|
// ../../node_modules/.bun/@inquirer+ansi@1.0.2/node_modules/@inquirer/ansi/dist/esm/index.js
|
|
247218
247563
|
var ESC = "\x1B[";
|
|
247219
247564
|
var cursorLeft = ESC + "G";
|
|
@@ -247230,6 +247575,184 @@ var cursorTo = (x, y) => {
|
|
|
247230
247575
|
var eraseLine = ESC + "2K";
|
|
247231
247576
|
var eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "";
|
|
247232
247577
|
|
|
247578
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
247579
|
+
var height = (content) => content.split(`
|
|
247580
|
+
`).length;
|
|
247581
|
+
var lastLine = (content) => content.split(`
|
|
247582
|
+
`).pop() ?? "";
|
|
247583
|
+
|
|
247584
|
+
class ScreenManager {
|
|
247585
|
+
height = 0;
|
|
247586
|
+
extraLinesUnderPrompt = 0;
|
|
247587
|
+
cursorPos;
|
|
247588
|
+
rl;
|
|
247589
|
+
constructor(rl) {
|
|
247590
|
+
this.rl = rl;
|
|
247591
|
+
this.cursorPos = rl.getCursorPos();
|
|
247592
|
+
}
|
|
247593
|
+
write(content) {
|
|
247594
|
+
this.rl.output.unmute();
|
|
247595
|
+
this.rl.output.write(content);
|
|
247596
|
+
this.rl.output.mute();
|
|
247597
|
+
}
|
|
247598
|
+
render(content, bottomContent = "") {
|
|
247599
|
+
const promptLine = lastLine(content);
|
|
247600
|
+
const rawPromptLine = stripVTControlCharacters(promptLine);
|
|
247601
|
+
let prompt = rawPromptLine;
|
|
247602
|
+
if (this.rl.line.length > 0) {
|
|
247603
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
|
247604
|
+
}
|
|
247605
|
+
this.rl.setPrompt(prompt);
|
|
247606
|
+
this.cursorPos = this.rl.getCursorPos();
|
|
247607
|
+
const width = readlineWidth();
|
|
247608
|
+
content = breakLines(content, width);
|
|
247609
|
+
bottomContent = breakLines(bottomContent, width);
|
|
247610
|
+
if (rawPromptLine.length % width === 0) {
|
|
247611
|
+
content += `
|
|
247612
|
+
`;
|
|
247613
|
+
}
|
|
247614
|
+
let output = content + (bottomContent ? `
|
|
247615
|
+
` + bottomContent : "");
|
|
247616
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
|
247617
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height(bottomContent) : 0);
|
|
247618
|
+
if (bottomContentHeight > 0)
|
|
247619
|
+
output += cursorUp(bottomContentHeight);
|
|
247620
|
+
output += cursorTo(this.cursorPos.cols);
|
|
247621
|
+
this.write(cursorDown(this.extraLinesUnderPrompt) + eraseLines(this.height) + output);
|
|
247622
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
|
247623
|
+
this.height = height(output);
|
|
247624
|
+
}
|
|
247625
|
+
checkCursorPos() {
|
|
247626
|
+
const cursorPos = this.rl.getCursorPos();
|
|
247627
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
|
247628
|
+
this.write(cursorTo(cursorPos.cols));
|
|
247629
|
+
this.cursorPos = cursorPos;
|
|
247630
|
+
}
|
|
247631
|
+
}
|
|
247632
|
+
done({ clearContent }) {
|
|
247633
|
+
this.rl.setPrompt("");
|
|
247634
|
+
let output = cursorDown(this.extraLinesUnderPrompt);
|
|
247635
|
+
output += clearContent ? eraseLines(this.height) : `
|
|
247636
|
+
`;
|
|
247637
|
+
output += cursorShow;
|
|
247638
|
+
this.write(output);
|
|
247639
|
+
this.rl.close();
|
|
247640
|
+
}
|
|
247641
|
+
}
|
|
247642
|
+
|
|
247643
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
247644
|
+
class PromisePolyfill extends Promise {
|
|
247645
|
+
static withResolver() {
|
|
247646
|
+
let resolve;
|
|
247647
|
+
let reject;
|
|
247648
|
+
const promise = new Promise((res, rej) => {
|
|
247649
|
+
resolve = res;
|
|
247650
|
+
reject = rej;
|
|
247651
|
+
});
|
|
247652
|
+
return { promise, resolve, reject };
|
|
247653
|
+
}
|
|
247654
|
+
}
|
|
247655
|
+
|
|
247656
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
247657
|
+
function getCallSites() {
|
|
247658
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
|
247659
|
+
let result = [];
|
|
247660
|
+
try {
|
|
247661
|
+
Error.prepareStackTrace = (_, callSites) => {
|
|
247662
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
|
247663
|
+
result = callSitesWithoutCurrent;
|
|
247664
|
+
return callSitesWithoutCurrent;
|
|
247665
|
+
};
|
|
247666
|
+
new Error().stack;
|
|
247667
|
+
} catch {
|
|
247668
|
+
return result;
|
|
247669
|
+
}
|
|
247670
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
|
247671
|
+
return result;
|
|
247672
|
+
}
|
|
247673
|
+
function createPrompt(view) {
|
|
247674
|
+
const callSites = getCallSites();
|
|
247675
|
+
const prompt = (config, context = {}) => {
|
|
247676
|
+
const { input = process.stdin, signal } = context;
|
|
247677
|
+
const cleanups = new Set;
|
|
247678
|
+
const output = new import_mute_stream.default;
|
|
247679
|
+
output.pipe(context.output ?? process.stdout);
|
|
247680
|
+
const rl = readline2.createInterface({
|
|
247681
|
+
terminal: true,
|
|
247682
|
+
input,
|
|
247683
|
+
output
|
|
247684
|
+
});
|
|
247685
|
+
const screen = new ScreenManager(rl);
|
|
247686
|
+
const { promise, resolve, reject } = PromisePolyfill.withResolver();
|
|
247687
|
+
const cancel = () => reject(new CancelPromptError);
|
|
247688
|
+
if (signal) {
|
|
247689
|
+
const abort = () => reject(new AbortPromptError({ cause: signal.reason }));
|
|
247690
|
+
if (signal.aborted) {
|
|
247691
|
+
abort();
|
|
247692
|
+
return Object.assign(promise, { cancel });
|
|
247693
|
+
}
|
|
247694
|
+
signal.addEventListener("abort", abort);
|
|
247695
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
|
247696
|
+
}
|
|
247697
|
+
cleanups.add(onExit((code, signal2) => {
|
|
247698
|
+
reject(new ExitPromptError(`User force closed the prompt with ${code} ${signal2}`));
|
|
247699
|
+
}));
|
|
247700
|
+
const sigint = () => reject(new ExitPromptError(`User force closed the prompt with SIGINT`));
|
|
247701
|
+
rl.on("SIGINT", sigint);
|
|
247702
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
|
247703
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
|
247704
|
+
rl.input.on("keypress", checkCursorPos);
|
|
247705
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
247706
|
+
return withHooks(rl, (cycle) => {
|
|
247707
|
+
const hooksCleanup = AsyncResource3.bind(() => effectScheduler.clearAll());
|
|
247708
|
+
rl.on("close", hooksCleanup);
|
|
247709
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
|
247710
|
+
cycle(() => {
|
|
247711
|
+
try {
|
|
247712
|
+
const nextView = view(config, (value) => {
|
|
247713
|
+
setImmediate(() => resolve(value));
|
|
247714
|
+
});
|
|
247715
|
+
if (nextView === undefined) {
|
|
247716
|
+
const callerFilename = callSites[1]?.getFileName();
|
|
247717
|
+
throw new Error(`Prompt functions must return a string.
|
|
247718
|
+
at ${callerFilename}`);
|
|
247719
|
+
}
|
|
247720
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
247721
|
+
screen.render(content, bottomContent);
|
|
247722
|
+
effectScheduler.run();
|
|
247723
|
+
} catch (error) {
|
|
247724
|
+
reject(error);
|
|
247725
|
+
}
|
|
247726
|
+
});
|
|
247727
|
+
return Object.assign(promise.then((answer) => {
|
|
247728
|
+
effectScheduler.clearAll();
|
|
247729
|
+
return answer;
|
|
247730
|
+
}, (error) => {
|
|
247731
|
+
effectScheduler.clearAll();
|
|
247732
|
+
throw error;
|
|
247733
|
+
}).finally(() => {
|
|
247734
|
+
cleanups.forEach((cleanup) => cleanup());
|
|
247735
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
247736
|
+
output.end();
|
|
247737
|
+
}).then(() => promise), { cancel });
|
|
247738
|
+
});
|
|
247739
|
+
};
|
|
247740
|
+
return prompt;
|
|
247741
|
+
}
|
|
247742
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
|
247743
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
|
247744
|
+
class Separator {
|
|
247745
|
+
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
|
247746
|
+
type = "separator";
|
|
247747
|
+
constructor(separator) {
|
|
247748
|
+
if (separator) {
|
|
247749
|
+
this.separator = separator;
|
|
247750
|
+
}
|
|
247751
|
+
}
|
|
247752
|
+
static isSeparator(choice) {
|
|
247753
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
|
247754
|
+
}
|
|
247755
|
+
}
|
|
247233
247756
|
// ../../node_modules/.bun/yoctocolors@2.1.2/node_modules/yoctocolors/base.js
|
|
247234
247757
|
var exports_base = {};
|
|
247235
247758
|
__export(exports_base, {
|
|
@@ -247354,7 +247877,7 @@ var is_in_ci_default = isInCi;
|
|
|
247354
247877
|
|
|
247355
247878
|
// ../../node_modules/.bun/yocto-spinner@1.0.0/node_modules/yocto-spinner/index.js
|
|
247356
247879
|
import process4 from "node:process";
|
|
247357
|
-
import { stripVTControlCharacters } from "node:util";
|
|
247880
|
+
import { stripVTControlCharacters as stripVTControlCharacters2 } from "node:util";
|
|
247358
247881
|
var isUnicodeSupported2 = process4.platform !== "win32" || Boolean(process4.env.WT_SESSION) || process4.env.TERM_PROGRAM === "vscode";
|
|
247359
247882
|
var isInteractive = (stream) => Boolean(stream.isTTY && process4.env.TERM !== "dumb" && !("CI" in process4.env));
|
|
247360
247883
|
var infoSymbol = exports_base.blue(isUnicodeSupported2 ? "ℹ" : "i");
|
|
@@ -247511,7 +248034,7 @@ class YoctoSpinner {
|
|
|
247511
248034
|
}
|
|
247512
248035
|
#lineCount(text) {
|
|
247513
248036
|
const width = this.#stream.columns ?? 80;
|
|
247514
|
-
const lines =
|
|
248037
|
+
const lines = stripVTControlCharacters2(text).split(`
|
|
247515
248038
|
`);
|
|
247516
248039
|
let lineCount = 0;
|
|
247517
248040
|
for (const line of lines) {
|
|
@@ -248380,7 +248903,7 @@ __export(exports_util, {
|
|
|
248380
248903
|
jsonStringifyReplacer: () => jsonStringifyReplacer,
|
|
248381
248904
|
joinValues: () => joinValues,
|
|
248382
248905
|
issue: () => issue,
|
|
248383
|
-
isPlainObject: () =>
|
|
248906
|
+
isPlainObject: () => isPlainObject2,
|
|
248384
248907
|
isObject: () => isObject,
|
|
248385
248908
|
hexToUint8Array: () => hexToUint8Array,
|
|
248386
248909
|
getSizableOrigin: () => getSizableOrigin,
|
|
@@ -248562,7 +249085,7 @@ var allowsEval = cached(() => {
|
|
|
248562
249085
|
return false;
|
|
248563
249086
|
}
|
|
248564
249087
|
});
|
|
248565
|
-
function
|
|
249088
|
+
function isPlainObject2(o) {
|
|
248566
249089
|
if (isObject(o) === false)
|
|
248567
249090
|
return false;
|
|
248568
249091
|
const ctor = o.constructor;
|
|
@@ -248577,7 +249100,7 @@ function isPlainObject(o) {
|
|
|
248577
249100
|
return true;
|
|
248578
249101
|
}
|
|
248579
249102
|
function shallowClone(o) {
|
|
248580
|
-
if (
|
|
249103
|
+
if (isPlainObject2(o))
|
|
248581
249104
|
return { ...o };
|
|
248582
249105
|
if (Array.isArray(o))
|
|
248583
249106
|
return [...o];
|
|
@@ -248760,7 +249283,7 @@ function omit(schema, mask) {
|
|
|
248760
249283
|
return clone(schema, def);
|
|
248761
249284
|
}
|
|
248762
249285
|
function extend(schema, shape) {
|
|
248763
|
-
if (!
|
|
249286
|
+
if (!isPlainObject2(shape)) {
|
|
248764
249287
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
248765
249288
|
}
|
|
248766
249289
|
const checks = schema._zod.def.checks;
|
|
@@ -248779,7 +249302,7 @@ function extend(schema, shape) {
|
|
|
248779
249302
|
return clone(schema, def);
|
|
248780
249303
|
}
|
|
248781
249304
|
function safeExtend(schema, shape) {
|
|
248782
|
-
if (!
|
|
249305
|
+
if (!isPlainObject2(shape)) {
|
|
248783
249306
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
248784
249307
|
}
|
|
248785
249308
|
const def = {
|
|
@@ -250936,7 +251459,7 @@ function mergeValues(a, b) {
|
|
|
250936
251459
|
if (a instanceof Date && b instanceof Date && +a === +b) {
|
|
250937
251460
|
return { valid: true, data: a };
|
|
250938
251461
|
}
|
|
250939
|
-
if (
|
|
251462
|
+
if (isPlainObject2(a) && isPlainObject2(b)) {
|
|
250940
251463
|
const bKeys = Object.keys(b);
|
|
250941
251464
|
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
250942
251465
|
const newObj = { ...a, ...b };
|
|
@@ -251066,7 +251589,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
251066
251589
|
$ZodType.init(inst, def);
|
|
251067
251590
|
inst._zod.parse = (payload, ctx) => {
|
|
251068
251591
|
const input = payload.value;
|
|
251069
|
-
if (!
|
|
251592
|
+
if (!isPlainObject2(input)) {
|
|
251070
251593
|
payload.issues.push({
|
|
251071
251594
|
expected: "record",
|
|
251072
251595
|
code: "invalid_type",
|
|
@@ -266504,7 +267027,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
|
266504
267027
|
var package_default = {
|
|
266505
267028
|
name: "@settlemint/sdk-cli",
|
|
266506
267029
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
266507
|
-
version: "2.6.4-
|
|
267030
|
+
version: "2.6.4-prd23d0ad7",
|
|
266508
267031
|
type: "module",
|
|
266509
267032
|
private: false,
|
|
266510
267033
|
license: "FSL-1.1-MIT",
|
|
@@ -266554,14 +267077,14 @@ var package_default = {
|
|
|
266554
267077
|
devDependencies: {
|
|
266555
267078
|
"@commander-js/extra-typings": "14.0.0",
|
|
266556
267079
|
commander: "14.0.2",
|
|
266557
|
-
"@inquirer/confirm": "5.1.
|
|
266558
|
-
"@inquirer/input": "
|
|
267080
|
+
"@inquirer/confirm": "5.1.20",
|
|
267081
|
+
"@inquirer/input": "4.3.1",
|
|
266559
267082
|
"@inquirer/password": "4.0.23",
|
|
266560
|
-
"@inquirer/select": "4.4.
|
|
266561
|
-
"@settlemint/sdk-hasura": "2.6.4-
|
|
266562
|
-
"@settlemint/sdk-js": "2.6.4-
|
|
266563
|
-
"@settlemint/sdk-utils": "2.6.4-
|
|
266564
|
-
"@settlemint/sdk-viem": "2.6.4-
|
|
267083
|
+
"@inquirer/select": "4.4.0",
|
|
267084
|
+
"@settlemint/sdk-hasura": "2.6.4-prd23d0ad7",
|
|
267085
|
+
"@settlemint/sdk-js": "2.6.4-prd23d0ad7",
|
|
267086
|
+
"@settlemint/sdk-utils": "2.6.4-prd23d0ad7",
|
|
267087
|
+
"@settlemint/sdk-viem": "2.6.4-prd23d0ad7",
|
|
266565
267088
|
"@types/node": "24.10.1",
|
|
266566
267089
|
"@types/semver": "7.7.1",
|
|
266567
267090
|
"@types/which": "3.0.4",
|
|
@@ -266578,7 +267101,7 @@ var package_default = {
|
|
|
266578
267101
|
},
|
|
266579
267102
|
peerDependencies: {
|
|
266580
267103
|
hardhat: "<= 4",
|
|
266581
|
-
"@settlemint/sdk-js": "2.6.4-
|
|
267104
|
+
"@settlemint/sdk-js": "2.6.4-prd23d0ad7"
|
|
266582
267105
|
},
|
|
266583
267106
|
peerDependenciesMeta: {
|
|
266584
267107
|
hardhat: {
|
|
@@ -266945,7 +267468,7 @@ var isPromiseLikeValue = (value) => {
|
|
|
266945
267468
|
var casesExhausted = (value) => {
|
|
266946
267469
|
throw new Error(`Unhandled case: ${String(value)}`);
|
|
266947
267470
|
};
|
|
266948
|
-
var
|
|
267471
|
+
var isPlainObject3 = (value) => {
|
|
266949
267472
|
return typeof value === `object` && value !== null && !Array.isArray(value);
|
|
266950
267473
|
};
|
|
266951
267474
|
|
|
@@ -266990,7 +267513,7 @@ var parseGraphQLExecutionResult = (result) => {
|
|
|
266990
267513
|
_tag: `Batch`,
|
|
266991
267514
|
executionResults: result.map(parseExecutionResult)
|
|
266992
267515
|
};
|
|
266993
|
-
} else if (
|
|
267516
|
+
} else if (isPlainObject3(result)) {
|
|
266994
267517
|
return {
|
|
266995
267518
|
_tag: `Single`,
|
|
266996
267519
|
executionResult: parseExecutionResult(result)
|
|
@@ -267008,29 +267531,29 @@ var parseExecutionResult = (result) => {
|
|
|
267008
267531
|
if (typeof result !== `object` || result === null) {
|
|
267009
267532
|
throw new Error(`Invalid execution result: result is not object`);
|
|
267010
267533
|
}
|
|
267011
|
-
let
|
|
267534
|
+
let errors4 = undefined;
|
|
267012
267535
|
let data = undefined;
|
|
267013
267536
|
let extensions = undefined;
|
|
267014
267537
|
if (`errors` in result) {
|
|
267015
|
-
if (!
|
|
267538
|
+
if (!isPlainObject3(result.errors) && !Array.isArray(result.errors)) {
|
|
267016
267539
|
throw new Error(`Invalid execution result: errors is not plain object OR array`);
|
|
267017
267540
|
}
|
|
267018
|
-
|
|
267541
|
+
errors4 = result.errors;
|
|
267019
267542
|
}
|
|
267020
267543
|
if (`data` in result) {
|
|
267021
|
-
if (!
|
|
267544
|
+
if (!isPlainObject3(result.data) && result.data !== null) {
|
|
267022
267545
|
throw new Error(`Invalid execution result: data is not plain object`);
|
|
267023
267546
|
}
|
|
267024
267547
|
data = result.data;
|
|
267025
267548
|
}
|
|
267026
267549
|
if (`extensions` in result) {
|
|
267027
|
-
if (!
|
|
267550
|
+
if (!isPlainObject3(result.extensions))
|
|
267028
267551
|
throw new Error(`Invalid execution result: extensions is not plain object`);
|
|
267029
267552
|
extensions = result.extensions;
|
|
267030
267553
|
}
|
|
267031
267554
|
return {
|
|
267032
267555
|
data,
|
|
267033
|
-
errors:
|
|
267556
|
+
errors: errors4,
|
|
267034
267557
|
extensions
|
|
267035
267558
|
};
|
|
267036
267559
|
};
|
|
@@ -272133,11 +272656,11 @@ function sanitizeName(value4, length = 35) {
|
|
|
272133
272656
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
|
272134
272657
|
}
|
|
272135
272658
|
|
|
272136
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
272137
|
-
var
|
|
272138
|
-
var
|
|
272139
|
-
var
|
|
272140
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
272659
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
272660
|
+
var isBackspaceKey2 = (key) => key.name === "backspace";
|
|
272661
|
+
var isTabKey2 = (key) => key.name === "tab";
|
|
272662
|
+
var isEnterKey2 = (key) => key.name === "enter" || key.name === "return";
|
|
272663
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
272141
272664
|
class AbortPromptError2 extends Error {
|
|
272142
272665
|
name = "AbortPromptError";
|
|
272143
272666
|
message = "Prompt was aborted";
|
|
@@ -272156,20 +272679,20 @@ class ExitPromptError2 extends Error {
|
|
|
272156
272679
|
name = "ExitPromptError";
|
|
272157
272680
|
}
|
|
272158
272681
|
|
|
272159
|
-
class
|
|
272682
|
+
class HookError2 extends Error {
|
|
272160
272683
|
name = "HookError";
|
|
272161
272684
|
}
|
|
272162
272685
|
|
|
272163
272686
|
class ValidationError2 extends Error {
|
|
272164
272687
|
name = "ValidationError";
|
|
272165
272688
|
}
|
|
272166
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
272167
|
-
import { AsyncResource as
|
|
272689
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
272690
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
|
272168
272691
|
|
|
272169
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
272170
|
-
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
|
272171
|
-
var
|
|
272172
|
-
function
|
|
272692
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
272693
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
|
272694
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
|
272695
|
+
function createStore2(rl) {
|
|
272173
272696
|
const store = {
|
|
272174
272697
|
rl,
|
|
272175
272698
|
hooks: [],
|
|
@@ -272180,9 +272703,9 @@ function createStore(rl) {
|
|
|
272180
272703
|
};
|
|
272181
272704
|
return store;
|
|
272182
272705
|
}
|
|
272183
|
-
function
|
|
272184
|
-
const store =
|
|
272185
|
-
return
|
|
272706
|
+
function withHooks2(rl, cb) {
|
|
272707
|
+
const store = createStore2(rl);
|
|
272708
|
+
return hookStorage2.run(store, () => {
|
|
272186
272709
|
function cycle(render) {
|
|
272187
272710
|
store.handleChange = () => {
|
|
272188
272711
|
store.index = 0;
|
|
@@ -272193,19 +272716,19 @@ function withHooks(rl, cb) {
|
|
|
272193
272716
|
return cb(cycle);
|
|
272194
272717
|
});
|
|
272195
272718
|
}
|
|
272196
|
-
function
|
|
272197
|
-
const store =
|
|
272719
|
+
function getStore2() {
|
|
272720
|
+
const store = hookStorage2.getStore();
|
|
272198
272721
|
if (!store) {
|
|
272199
|
-
throw new
|
|
272722
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
|
272200
272723
|
}
|
|
272201
272724
|
return store;
|
|
272202
272725
|
}
|
|
272203
|
-
function
|
|
272204
|
-
return
|
|
272726
|
+
function readline3() {
|
|
272727
|
+
return getStore2().rl;
|
|
272205
272728
|
}
|
|
272206
|
-
function
|
|
272729
|
+
function withUpdates2(fn) {
|
|
272207
272730
|
const wrapped = (...args) => {
|
|
272208
|
-
const store =
|
|
272731
|
+
const store = getStore2();
|
|
272209
272732
|
let shouldUpdate = false;
|
|
272210
272733
|
const oldHandleChange = store.handleChange;
|
|
272211
272734
|
store.handleChange = () => {
|
|
@@ -272218,10 +272741,10 @@ function withUpdates(fn) {
|
|
|
272218
272741
|
store.handleChange = oldHandleChange;
|
|
272219
272742
|
return returnValue;
|
|
272220
272743
|
};
|
|
272221
|
-
return
|
|
272744
|
+
return AsyncResource4.bind(wrapped);
|
|
272222
272745
|
}
|
|
272223
|
-
function
|
|
272224
|
-
const store =
|
|
272746
|
+
function withPointer2(cb) {
|
|
272747
|
+
const store = getStore2();
|
|
272225
272748
|
const { index } = store;
|
|
272226
272749
|
const pointer = {
|
|
272227
272750
|
get() {
|
|
@@ -272236,16 +272759,16 @@ function withPointer(cb) {
|
|
|
272236
272759
|
store.index++;
|
|
272237
272760
|
return returnValue;
|
|
272238
272761
|
}
|
|
272239
|
-
function
|
|
272240
|
-
|
|
272762
|
+
function handleChange2() {
|
|
272763
|
+
getStore2().handleChange();
|
|
272241
272764
|
}
|
|
272242
|
-
var
|
|
272765
|
+
var effectScheduler2 = {
|
|
272243
272766
|
queue(cb) {
|
|
272244
|
-
const store =
|
|
272767
|
+
const store = getStore2();
|
|
272245
272768
|
const { index } = store;
|
|
272246
272769
|
store.hooksEffect.push(() => {
|
|
272247
272770
|
store.hooksCleanup[index]?.();
|
|
272248
|
-
const cleanFn = cb(
|
|
272771
|
+
const cleanFn = cb(readline3());
|
|
272249
272772
|
if (cleanFn != null && typeof cleanFn !== "function") {
|
|
272250
272773
|
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
|
272251
272774
|
}
|
|
@@ -272253,8 +272776,8 @@ var effectScheduler = {
|
|
|
272253
272776
|
});
|
|
272254
272777
|
},
|
|
272255
272778
|
run() {
|
|
272256
|
-
const store =
|
|
272257
|
-
|
|
272779
|
+
const store = getStore2();
|
|
272780
|
+
withUpdates2(() => {
|
|
272258
272781
|
store.hooksEffect.forEach((effect) => {
|
|
272259
272782
|
effect();
|
|
272260
272783
|
});
|
|
@@ -272262,7 +272785,7 @@ var effectScheduler = {
|
|
|
272262
272785
|
})();
|
|
272263
272786
|
},
|
|
272264
272787
|
clearAll() {
|
|
272265
|
-
const store =
|
|
272788
|
+
const store = getStore2();
|
|
272266
272789
|
store.hooksCleanup.forEach((cleanFn) => {
|
|
272267
272790
|
cleanFn?.();
|
|
272268
272791
|
});
|
|
@@ -272271,13 +272794,13 @@ var effectScheduler = {
|
|
|
272271
272794
|
}
|
|
272272
272795
|
};
|
|
272273
272796
|
|
|
272274
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
272275
|
-
function
|
|
272276
|
-
return
|
|
272277
|
-
const setState =
|
|
272797
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
272798
|
+
function useState2(defaultValue) {
|
|
272799
|
+
return withPointer2((pointer) => {
|
|
272800
|
+
const setState = AsyncResource5.bind(function setState(newValue) {
|
|
272278
272801
|
if (pointer.get() !== newValue) {
|
|
272279
272802
|
pointer.set(newValue);
|
|
272280
|
-
|
|
272803
|
+
handleChange2();
|
|
272281
272804
|
}
|
|
272282
272805
|
});
|
|
272283
272806
|
if (pointer.initialized) {
|
|
@@ -272289,333 +272812,42 @@ function useState(defaultValue) {
|
|
|
272289
272812
|
});
|
|
272290
272813
|
}
|
|
272291
272814
|
|
|
272292
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
272293
|
-
function
|
|
272294
|
-
|
|
272815
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
272816
|
+
function useEffect2(cb, depArray) {
|
|
272817
|
+
withPointer2((pointer) => {
|
|
272295
272818
|
const oldDeps = pointer.get();
|
|
272296
272819
|
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i7) => !Object.is(dep, oldDeps[i7]));
|
|
272297
272820
|
if (hasChanged) {
|
|
272298
|
-
|
|
272821
|
+
effectScheduler2.queue(cb);
|
|
272299
272822
|
}
|
|
272300
272823
|
pointer.set(depArray);
|
|
272301
272824
|
});
|
|
272302
272825
|
}
|
|
272303
272826
|
|
|
272304
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
272305
|
-
|
|
272306
|
-
|
|
272307
|
-
// ../../node_modules/.bun/@inquirer+figures@2.0.1/node_modules/@inquirer/figures/dist/index.js
|
|
272308
|
-
import process8 from "node:process";
|
|
272309
|
-
function isUnicodeSupported3() {
|
|
272310
|
-
if (process8.platform !== "win32") {
|
|
272311
|
-
return process8.env["TERM"] !== "linux";
|
|
272312
|
-
}
|
|
272313
|
-
return Boolean(process8.env["WT_SESSION"]) || Boolean(process8.env["TERMINUS_SUBLIME"]) || process8.env["ConEmuTask"] === "{cmd::Cmder}" || process8.env["TERM_PROGRAM"] === "Terminus-Sublime" || process8.env["TERM_PROGRAM"] === "vscode" || process8.env["TERM"] === "xterm-256color" || process8.env["TERM"] === "alacritty" || process8.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
|
|
272314
|
-
}
|
|
272315
|
-
var common2 = {
|
|
272316
|
-
circleQuestionMark: "(?)",
|
|
272317
|
-
questionMarkPrefix: "(?)",
|
|
272318
|
-
square: "█",
|
|
272319
|
-
squareDarkShade: "▓",
|
|
272320
|
-
squareMediumShade: "▒",
|
|
272321
|
-
squareLightShade: "░",
|
|
272322
|
-
squareTop: "▀",
|
|
272323
|
-
squareBottom: "▄",
|
|
272324
|
-
squareLeft: "▌",
|
|
272325
|
-
squareRight: "▐",
|
|
272326
|
-
squareCenter: "■",
|
|
272327
|
-
bullet: "●",
|
|
272328
|
-
dot: "․",
|
|
272329
|
-
ellipsis: "…",
|
|
272330
|
-
pointerSmall: "›",
|
|
272331
|
-
triangleUp: "▲",
|
|
272332
|
-
triangleUpSmall: "▴",
|
|
272333
|
-
triangleDown: "▼",
|
|
272334
|
-
triangleDownSmall: "▾",
|
|
272335
|
-
triangleLeftSmall: "◂",
|
|
272336
|
-
triangleRightSmall: "▸",
|
|
272337
|
-
home: "⌂",
|
|
272338
|
-
heart: "♥",
|
|
272339
|
-
musicNote: "♪",
|
|
272340
|
-
musicNoteBeamed: "♫",
|
|
272341
|
-
arrowUp: "↑",
|
|
272342
|
-
arrowDown: "↓",
|
|
272343
|
-
arrowLeft: "←",
|
|
272344
|
-
arrowRight: "→",
|
|
272345
|
-
arrowLeftRight: "↔",
|
|
272346
|
-
arrowUpDown: "↕",
|
|
272347
|
-
almostEqual: "≈",
|
|
272348
|
-
notEqual: "≠",
|
|
272349
|
-
lessOrEqual: "≤",
|
|
272350
|
-
greaterOrEqual: "≥",
|
|
272351
|
-
identical: "≡",
|
|
272352
|
-
infinity: "∞",
|
|
272353
|
-
subscriptZero: "₀",
|
|
272354
|
-
subscriptOne: "₁",
|
|
272355
|
-
subscriptTwo: "₂",
|
|
272356
|
-
subscriptThree: "₃",
|
|
272357
|
-
subscriptFour: "₄",
|
|
272358
|
-
subscriptFive: "₅",
|
|
272359
|
-
subscriptSix: "₆",
|
|
272360
|
-
subscriptSeven: "₇",
|
|
272361
|
-
subscriptEight: "₈",
|
|
272362
|
-
subscriptNine: "₉",
|
|
272363
|
-
oneHalf: "½",
|
|
272364
|
-
oneThird: "⅓",
|
|
272365
|
-
oneQuarter: "¼",
|
|
272366
|
-
oneFifth: "⅕",
|
|
272367
|
-
oneSixth: "⅙",
|
|
272368
|
-
oneEighth: "⅛",
|
|
272369
|
-
twoThirds: "⅔",
|
|
272370
|
-
twoFifths: "⅖",
|
|
272371
|
-
threeQuarters: "¾",
|
|
272372
|
-
threeFifths: "⅗",
|
|
272373
|
-
threeEighths: "⅜",
|
|
272374
|
-
fourFifths: "⅘",
|
|
272375
|
-
fiveSixths: "⅚",
|
|
272376
|
-
fiveEighths: "⅝",
|
|
272377
|
-
sevenEighths: "⅞",
|
|
272378
|
-
line: "─",
|
|
272379
|
-
lineBold: "━",
|
|
272380
|
-
lineDouble: "═",
|
|
272381
|
-
lineDashed0: "┄",
|
|
272382
|
-
lineDashed1: "┅",
|
|
272383
|
-
lineDashed2: "┈",
|
|
272384
|
-
lineDashed3: "┉",
|
|
272385
|
-
lineDashed4: "╌",
|
|
272386
|
-
lineDashed5: "╍",
|
|
272387
|
-
lineDashed6: "╴",
|
|
272388
|
-
lineDashed7: "╶",
|
|
272389
|
-
lineDashed8: "╸",
|
|
272390
|
-
lineDashed9: "╺",
|
|
272391
|
-
lineDashed10: "╼",
|
|
272392
|
-
lineDashed11: "╾",
|
|
272393
|
-
lineDashed12: "−",
|
|
272394
|
-
lineDashed13: "–",
|
|
272395
|
-
lineDashed14: "‐",
|
|
272396
|
-
lineDashed15: "⁃",
|
|
272397
|
-
lineVertical: "│",
|
|
272398
|
-
lineVerticalBold: "┃",
|
|
272399
|
-
lineVerticalDouble: "║",
|
|
272400
|
-
lineVerticalDashed0: "┆",
|
|
272401
|
-
lineVerticalDashed1: "┇",
|
|
272402
|
-
lineVerticalDashed2: "┊",
|
|
272403
|
-
lineVerticalDashed3: "┋",
|
|
272404
|
-
lineVerticalDashed4: "╎",
|
|
272405
|
-
lineVerticalDashed5: "╏",
|
|
272406
|
-
lineVerticalDashed6: "╵",
|
|
272407
|
-
lineVerticalDashed7: "╷",
|
|
272408
|
-
lineVerticalDashed8: "╹",
|
|
272409
|
-
lineVerticalDashed9: "╻",
|
|
272410
|
-
lineVerticalDashed10: "╽",
|
|
272411
|
-
lineVerticalDashed11: "╿",
|
|
272412
|
-
lineDownLeft: "┐",
|
|
272413
|
-
lineDownLeftArc: "╮",
|
|
272414
|
-
lineDownBoldLeftBold: "┓",
|
|
272415
|
-
lineDownBoldLeft: "┒",
|
|
272416
|
-
lineDownLeftBold: "┑",
|
|
272417
|
-
lineDownDoubleLeftDouble: "╗",
|
|
272418
|
-
lineDownDoubleLeft: "╖",
|
|
272419
|
-
lineDownLeftDouble: "╕",
|
|
272420
|
-
lineDownRight: "┌",
|
|
272421
|
-
lineDownRightArc: "╭",
|
|
272422
|
-
lineDownBoldRightBold: "┏",
|
|
272423
|
-
lineDownBoldRight: "┎",
|
|
272424
|
-
lineDownRightBold: "┍",
|
|
272425
|
-
lineDownDoubleRightDouble: "╔",
|
|
272426
|
-
lineDownDoubleRight: "╓",
|
|
272427
|
-
lineDownRightDouble: "╒",
|
|
272428
|
-
lineUpLeft: "┘",
|
|
272429
|
-
lineUpLeftArc: "╯",
|
|
272430
|
-
lineUpBoldLeftBold: "┛",
|
|
272431
|
-
lineUpBoldLeft: "┚",
|
|
272432
|
-
lineUpLeftBold: "┙",
|
|
272433
|
-
lineUpDoubleLeftDouble: "╝",
|
|
272434
|
-
lineUpDoubleLeft: "╜",
|
|
272435
|
-
lineUpLeftDouble: "╛",
|
|
272436
|
-
lineUpRight: "└",
|
|
272437
|
-
lineUpRightArc: "╰",
|
|
272438
|
-
lineUpBoldRightBold: "┗",
|
|
272439
|
-
lineUpBoldRight: "┖",
|
|
272440
|
-
lineUpRightBold: "┕",
|
|
272441
|
-
lineUpDoubleRightDouble: "╚",
|
|
272442
|
-
lineUpDoubleRight: "╙",
|
|
272443
|
-
lineUpRightDouble: "╘",
|
|
272444
|
-
lineUpDownLeft: "┤",
|
|
272445
|
-
lineUpBoldDownBoldLeftBold: "┫",
|
|
272446
|
-
lineUpBoldDownBoldLeft: "┨",
|
|
272447
|
-
lineUpDownLeftBold: "┥",
|
|
272448
|
-
lineUpBoldDownLeftBold: "┩",
|
|
272449
|
-
lineUpDownBoldLeftBold: "┪",
|
|
272450
|
-
lineUpDownBoldLeft: "┧",
|
|
272451
|
-
lineUpBoldDownLeft: "┦",
|
|
272452
|
-
lineUpDoubleDownDoubleLeftDouble: "╣",
|
|
272453
|
-
lineUpDoubleDownDoubleLeft: "╢",
|
|
272454
|
-
lineUpDownLeftDouble: "╡",
|
|
272455
|
-
lineUpDownRight: "├",
|
|
272456
|
-
lineUpBoldDownBoldRightBold: "┣",
|
|
272457
|
-
lineUpBoldDownBoldRight: "┠",
|
|
272458
|
-
lineUpDownRightBold: "┝",
|
|
272459
|
-
lineUpBoldDownRightBold: "┡",
|
|
272460
|
-
lineUpDownBoldRightBold: "┢",
|
|
272461
|
-
lineUpDownBoldRight: "┟",
|
|
272462
|
-
lineUpBoldDownRight: "┞",
|
|
272463
|
-
lineUpDoubleDownDoubleRightDouble: "╠",
|
|
272464
|
-
lineUpDoubleDownDoubleRight: "╟",
|
|
272465
|
-
lineUpDownRightDouble: "╞",
|
|
272466
|
-
lineDownLeftRight: "┬",
|
|
272467
|
-
lineDownBoldLeftBoldRightBold: "┳",
|
|
272468
|
-
lineDownLeftBoldRightBold: "┯",
|
|
272469
|
-
lineDownBoldLeftRight: "┰",
|
|
272470
|
-
lineDownBoldLeftBoldRight: "┱",
|
|
272471
|
-
lineDownBoldLeftRightBold: "┲",
|
|
272472
|
-
lineDownLeftRightBold: "┮",
|
|
272473
|
-
lineDownLeftBoldRight: "┭",
|
|
272474
|
-
lineDownDoubleLeftDoubleRightDouble: "╦",
|
|
272475
|
-
lineDownDoubleLeftRight: "╥",
|
|
272476
|
-
lineDownLeftDoubleRightDouble: "╤",
|
|
272477
|
-
lineUpLeftRight: "┴",
|
|
272478
|
-
lineUpBoldLeftBoldRightBold: "┻",
|
|
272479
|
-
lineUpLeftBoldRightBold: "┷",
|
|
272480
|
-
lineUpBoldLeftRight: "┸",
|
|
272481
|
-
lineUpBoldLeftBoldRight: "┹",
|
|
272482
|
-
lineUpBoldLeftRightBold: "┺",
|
|
272483
|
-
lineUpLeftRightBold: "┶",
|
|
272484
|
-
lineUpLeftBoldRight: "┵",
|
|
272485
|
-
lineUpDoubleLeftDoubleRightDouble: "╩",
|
|
272486
|
-
lineUpDoubleLeftRight: "╨",
|
|
272487
|
-
lineUpLeftDoubleRightDouble: "╧",
|
|
272488
|
-
lineUpDownLeftRight: "┼",
|
|
272489
|
-
lineUpBoldDownBoldLeftBoldRightBold: "╋",
|
|
272490
|
-
lineUpDownBoldLeftBoldRightBold: "╈",
|
|
272491
|
-
lineUpBoldDownLeftBoldRightBold: "╇",
|
|
272492
|
-
lineUpBoldDownBoldLeftRightBold: "╊",
|
|
272493
|
-
lineUpBoldDownBoldLeftBoldRight: "╉",
|
|
272494
|
-
lineUpBoldDownLeftRight: "╀",
|
|
272495
|
-
lineUpDownBoldLeftRight: "╁",
|
|
272496
|
-
lineUpDownLeftBoldRight: "┽",
|
|
272497
|
-
lineUpDownLeftRightBold: "┾",
|
|
272498
|
-
lineUpBoldDownBoldLeftRight: "╂",
|
|
272499
|
-
lineUpDownLeftBoldRightBold: "┿",
|
|
272500
|
-
lineUpBoldDownLeftBoldRight: "╃",
|
|
272501
|
-
lineUpBoldDownLeftRightBold: "╄",
|
|
272502
|
-
lineUpDownBoldLeftBoldRight: "╅",
|
|
272503
|
-
lineUpDownBoldLeftRightBold: "╆",
|
|
272504
|
-
lineUpDoubleDownDoubleLeftDoubleRightDouble: "╬",
|
|
272505
|
-
lineUpDoubleDownDoubleLeftRight: "╫",
|
|
272506
|
-
lineUpDownLeftDoubleRightDouble: "╪",
|
|
272507
|
-
lineCross: "╳",
|
|
272508
|
-
lineBackslash: "╲",
|
|
272509
|
-
lineSlash: "╱"
|
|
272510
|
-
};
|
|
272511
|
-
var specialMainSymbols2 = {
|
|
272512
|
-
tick: "✔",
|
|
272513
|
-
info: "ℹ",
|
|
272514
|
-
warning: "⚠",
|
|
272515
|
-
cross: "✘",
|
|
272516
|
-
squareSmall: "◻",
|
|
272517
|
-
squareSmallFilled: "◼",
|
|
272518
|
-
circle: "◯",
|
|
272519
|
-
circleFilled: "◉",
|
|
272520
|
-
circleDotted: "◌",
|
|
272521
|
-
circleDouble: "◎",
|
|
272522
|
-
circleCircle: "ⓞ",
|
|
272523
|
-
circleCross: "ⓧ",
|
|
272524
|
-
circlePipe: "Ⓘ",
|
|
272525
|
-
radioOn: "◉",
|
|
272526
|
-
radioOff: "◯",
|
|
272527
|
-
checkboxOn: "☒",
|
|
272528
|
-
checkboxOff: "☐",
|
|
272529
|
-
checkboxCircleOn: "ⓧ",
|
|
272530
|
-
checkboxCircleOff: "Ⓘ",
|
|
272531
|
-
pointer: "❯",
|
|
272532
|
-
triangleUpOutline: "△",
|
|
272533
|
-
triangleLeft: "◀",
|
|
272534
|
-
triangleRight: "▶",
|
|
272535
|
-
lozenge: "◆",
|
|
272536
|
-
lozengeOutline: "◇",
|
|
272537
|
-
hamburger: "☰",
|
|
272538
|
-
smiley: "㋡",
|
|
272539
|
-
mustache: "෴",
|
|
272540
|
-
star: "★",
|
|
272541
|
-
play: "▶",
|
|
272542
|
-
nodejs: "⬢",
|
|
272543
|
-
oneSeventh: "⅐",
|
|
272544
|
-
oneNinth: "⅑",
|
|
272545
|
-
oneTenth: "⅒"
|
|
272546
|
-
};
|
|
272547
|
-
var specialFallbackSymbols2 = {
|
|
272548
|
-
tick: "√",
|
|
272549
|
-
info: "i",
|
|
272550
|
-
warning: "‼",
|
|
272551
|
-
cross: "×",
|
|
272552
|
-
squareSmall: "□",
|
|
272553
|
-
squareSmallFilled: "■",
|
|
272554
|
-
circle: "( )",
|
|
272555
|
-
circleFilled: "(*)",
|
|
272556
|
-
circleDotted: "( )",
|
|
272557
|
-
circleDouble: "( )",
|
|
272558
|
-
circleCircle: "(○)",
|
|
272559
|
-
circleCross: "(×)",
|
|
272560
|
-
circlePipe: "(│)",
|
|
272561
|
-
radioOn: "(*)",
|
|
272562
|
-
radioOff: "( )",
|
|
272563
|
-
checkboxOn: "[×]",
|
|
272564
|
-
checkboxOff: "[ ]",
|
|
272565
|
-
checkboxCircleOn: "(×)",
|
|
272566
|
-
checkboxCircleOff: "( )",
|
|
272567
|
-
pointer: ">",
|
|
272568
|
-
triangleUpOutline: "∆",
|
|
272569
|
-
triangleLeft: "◄",
|
|
272570
|
-
triangleRight: "►",
|
|
272571
|
-
lozenge: "♦",
|
|
272572
|
-
lozengeOutline: "◊",
|
|
272573
|
-
hamburger: "≡",
|
|
272574
|
-
smiley: "☺",
|
|
272575
|
-
mustache: "┌─┐",
|
|
272576
|
-
star: "✶",
|
|
272577
|
-
play: "►",
|
|
272578
|
-
nodejs: "♦",
|
|
272579
|
-
oneSeventh: "1/7",
|
|
272580
|
-
oneNinth: "1/9",
|
|
272581
|
-
oneTenth: "1/10"
|
|
272582
|
-
};
|
|
272583
|
-
var mainSymbols2 = {
|
|
272584
|
-
...common2,
|
|
272585
|
-
...specialMainSymbols2
|
|
272586
|
-
};
|
|
272587
|
-
var fallbackSymbols2 = {
|
|
272588
|
-
...common2,
|
|
272589
|
-
...specialFallbackSymbols2
|
|
272590
|
-
};
|
|
272591
|
-
var shouldUseMain2 = isUnicodeSupported3();
|
|
272592
|
-
var figures2 = shouldUseMain2 ? mainSymbols2 : fallbackSymbols2;
|
|
272593
|
-
var dist_default = figures2;
|
|
272594
|
-
var replacements2 = Object.entries(specialMainSymbols2);
|
|
272595
|
-
|
|
272596
|
-
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/theme.js
|
|
272597
|
-
var defaultTheme = {
|
|
272827
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
272828
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
|
272829
|
+
var defaultTheme2 = {
|
|
272598
272830
|
prefix: {
|
|
272599
|
-
idle:
|
|
272600
|
-
done:
|
|
272831
|
+
idle: import_yoctocolors_cjs3.default.blue("?"),
|
|
272832
|
+
done: import_yoctocolors_cjs3.default.green(esm_default.tick)
|
|
272601
272833
|
},
|
|
272602
272834
|
spinner: {
|
|
272603
272835
|
interval: 80,
|
|
272604
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) =>
|
|
272836
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
|
272605
272837
|
},
|
|
272606
272838
|
style: {
|
|
272607
|
-
answer:
|
|
272608
|
-
message:
|
|
272609
|
-
error: (text2) =>
|
|
272610
|
-
defaultAnswer: (text2) =>
|
|
272611
|
-
help:
|
|
272612
|
-
highlight:
|
|
272613
|
-
key: (text2) =>
|
|
272839
|
+
answer: import_yoctocolors_cjs3.default.cyan,
|
|
272840
|
+
message: import_yoctocolors_cjs3.default.bold,
|
|
272841
|
+
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
|
272842
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
|
272843
|
+
help: import_yoctocolors_cjs3.default.dim,
|
|
272844
|
+
highlight: import_yoctocolors_cjs3.default.cyan,
|
|
272845
|
+
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
|
272614
272846
|
}
|
|
272615
272847
|
};
|
|
272616
272848
|
|
|
272617
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
272618
|
-
function
|
|
272849
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
272850
|
+
function isPlainObject4(value4) {
|
|
272619
272851
|
if (typeof value4 !== "object" || value4 === null)
|
|
272620
272852
|
return false;
|
|
272621
272853
|
let proto = value4;
|
|
@@ -272624,30 +272856,30 @@ function isPlainObject3(value4) {
|
|
|
272624
272856
|
}
|
|
272625
272857
|
return Object.getPrototypeOf(value4) === proto;
|
|
272626
272858
|
}
|
|
272627
|
-
function
|
|
272859
|
+
function deepMerge3(...objects) {
|
|
272628
272860
|
const output = {};
|
|
272629
272861
|
for (const obj of objects) {
|
|
272630
272862
|
for (const [key, value4] of Object.entries(obj)) {
|
|
272631
272863
|
const prevValue = output[key];
|
|
272632
|
-
output[key] =
|
|
272864
|
+
output[key] = isPlainObject4(prevValue) && isPlainObject4(value4) ? deepMerge3(prevValue, value4) : value4;
|
|
272633
272865
|
}
|
|
272634
272866
|
}
|
|
272635
272867
|
return output;
|
|
272636
272868
|
}
|
|
272637
|
-
function
|
|
272869
|
+
function makeTheme2(...themes) {
|
|
272638
272870
|
const themesToMerge = [
|
|
272639
|
-
|
|
272871
|
+
defaultTheme2,
|
|
272640
272872
|
...themes.filter((theme) => theme != null)
|
|
272641
272873
|
];
|
|
272642
|
-
return
|
|
272874
|
+
return deepMerge3(...themesToMerge);
|
|
272643
272875
|
}
|
|
272644
272876
|
|
|
272645
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
272646
|
-
function
|
|
272647
|
-
const [showLoader, setShowLoader] =
|
|
272648
|
-
const [tick, setTick] =
|
|
272649
|
-
const { prefix, spinner: spinner2 } =
|
|
272650
|
-
|
|
272877
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
272878
|
+
function usePrefix2({ status = "idle", theme }) {
|
|
272879
|
+
const [showLoader, setShowLoader] = useState2(false);
|
|
272880
|
+
const [tick, setTick] = useState2(0);
|
|
272881
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
|
272882
|
+
useEffect2(() => {
|
|
272651
272883
|
if (status === "loading") {
|
|
272652
272884
|
let tickInterval;
|
|
272653
272885
|
let inc = -1;
|
|
@@ -272672,18 +272904,18 @@ function usePrefix({ status = "idle", theme }) {
|
|
|
272672
272904
|
const iconName = status === "loading" ? "idle" : status;
|
|
272673
272905
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
272674
272906
|
}
|
|
272675
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
272676
|
-
function
|
|
272677
|
-
return
|
|
272907
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
272908
|
+
function useRef2(val) {
|
|
272909
|
+
return useState2({ current: val })[0];
|
|
272678
272910
|
}
|
|
272679
272911
|
|
|
272680
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
272681
|
-
function
|
|
272682
|
-
const signal =
|
|
272912
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
272913
|
+
function useKeypress2(userHandler) {
|
|
272914
|
+
const signal = useRef2(userHandler);
|
|
272683
272915
|
signal.current = userHandler;
|
|
272684
|
-
|
|
272916
|
+
useEffect2((rl) => {
|
|
272685
272917
|
let ignore = false;
|
|
272686
|
-
const handler =
|
|
272918
|
+
const handler = withUpdates2((_input, event) => {
|
|
272687
272919
|
if (ignore)
|
|
272688
272920
|
return;
|
|
272689
272921
|
signal.current(event, rl);
|
|
@@ -272695,482 +272927,32 @@ function useKeypress(userHandler) {
|
|
|
272695
272927
|
};
|
|
272696
272928
|
}, []);
|
|
272697
272929
|
}
|
|
272698
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
272699
|
-
var
|
|
272700
|
-
|
|
272701
|
-
|
|
272702
|
-
function ansiRegex({ onlyFirst = false } = {}) {
|
|
272703
|
-
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
272704
|
-
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
272705
|
-
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
272706
|
-
const pattern = `${osc}|${csi}`;
|
|
272707
|
-
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
272708
|
-
}
|
|
272709
|
-
|
|
272710
|
-
// ../../node_modules/.bun/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
|
|
272711
|
-
var regex = ansiRegex();
|
|
272712
|
-
function stripAnsi2(string4) {
|
|
272713
|
-
if (typeof string4 !== "string") {
|
|
272714
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string4}\``);
|
|
272715
|
-
}
|
|
272716
|
-
return string4.replace(regex, "");
|
|
272717
|
-
}
|
|
272718
|
-
|
|
272719
|
-
// ../../node_modules/.bun/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/lookup.js
|
|
272720
|
-
function isAmbiguous(x6) {
|
|
272721
|
-
return x6 === 161 || x6 === 164 || x6 === 167 || x6 === 168 || x6 === 170 || x6 === 173 || x6 === 174 || x6 >= 176 && x6 <= 180 || x6 >= 182 && x6 <= 186 || x6 >= 188 && x6 <= 191 || x6 === 198 || x6 === 208 || x6 === 215 || x6 === 216 || x6 >= 222 && x6 <= 225 || x6 === 230 || x6 >= 232 && x6 <= 234 || x6 === 236 || x6 === 237 || x6 === 240 || x6 === 242 || x6 === 243 || x6 >= 247 && x6 <= 250 || x6 === 252 || x6 === 254 || x6 === 257 || x6 === 273 || x6 === 275 || x6 === 283 || x6 === 294 || x6 === 295 || x6 === 299 || x6 >= 305 && x6 <= 307 || x6 === 312 || x6 >= 319 && x6 <= 322 || x6 === 324 || x6 >= 328 && x6 <= 331 || x6 === 333 || x6 === 338 || x6 === 339 || x6 === 358 || x6 === 359 || x6 === 363 || x6 === 462 || x6 === 464 || x6 === 466 || x6 === 468 || x6 === 470 || x6 === 472 || x6 === 474 || x6 === 476 || x6 === 593 || x6 === 609 || x6 === 708 || x6 === 711 || x6 >= 713 && x6 <= 715 || x6 === 717 || x6 === 720 || x6 >= 728 && x6 <= 731 || x6 === 733 || x6 === 735 || x6 >= 768 && x6 <= 879 || x6 >= 913 && x6 <= 929 || x6 >= 931 && x6 <= 937 || x6 >= 945 && x6 <= 961 || x6 >= 963 && x6 <= 969 || x6 === 1025 || x6 >= 1040 && x6 <= 1103 || x6 === 1105 || x6 === 8208 || x6 >= 8211 && x6 <= 8214 || x6 === 8216 || x6 === 8217 || x6 === 8220 || x6 === 8221 || x6 >= 8224 && x6 <= 8226 || x6 >= 8228 && x6 <= 8231 || x6 === 8240 || x6 === 8242 || x6 === 8243 || x6 === 8245 || x6 === 8251 || x6 === 8254 || x6 === 8308 || x6 === 8319 || x6 >= 8321 && x6 <= 8324 || x6 === 8364 || x6 === 8451 || x6 === 8453 || x6 === 8457 || x6 === 8467 || x6 === 8470 || x6 === 8481 || x6 === 8482 || x6 === 8486 || x6 === 8491 || x6 === 8531 || x6 === 8532 || x6 >= 8539 && x6 <= 8542 || x6 >= 8544 && x6 <= 8555 || x6 >= 8560 && x6 <= 8569 || x6 === 8585 || x6 >= 8592 && x6 <= 8601 || x6 === 8632 || x6 === 8633 || x6 === 8658 || x6 === 8660 || x6 === 8679 || x6 === 8704 || x6 === 8706 || x6 === 8707 || x6 === 8711 || x6 === 8712 || x6 === 8715 || x6 === 8719 || x6 === 8721 || x6 === 8725 || x6 === 8730 || x6 >= 8733 && x6 <= 8736 || x6 === 8739 || x6 === 8741 || x6 >= 8743 && x6 <= 8748 || x6 === 8750 || x6 >= 8756 && x6 <= 8759 || x6 === 8764 || x6 === 8765 || x6 === 8776 || x6 === 8780 || x6 === 8786 || x6 === 8800 || x6 === 8801 || x6 >= 8804 && x6 <= 8807 || x6 === 8810 || x6 === 8811 || x6 === 8814 || x6 === 8815 || x6 === 8834 || x6 === 8835 || x6 === 8838 || x6 === 8839 || x6 === 8853 || x6 === 8857 || x6 === 8869 || x6 === 8895 || x6 === 8978 || x6 >= 9312 && x6 <= 9449 || x6 >= 9451 && x6 <= 9547 || x6 >= 9552 && x6 <= 9587 || x6 >= 9600 && x6 <= 9615 || x6 >= 9618 && x6 <= 9621 || x6 === 9632 || x6 === 9633 || x6 >= 9635 && x6 <= 9641 || x6 === 9650 || x6 === 9651 || x6 === 9654 || x6 === 9655 || x6 === 9660 || x6 === 9661 || x6 === 9664 || x6 === 9665 || x6 >= 9670 && x6 <= 9672 || x6 === 9675 || x6 >= 9678 && x6 <= 9681 || x6 >= 9698 && x6 <= 9701 || x6 === 9711 || x6 === 9733 || x6 === 9734 || x6 === 9737 || x6 === 9742 || x6 === 9743 || x6 === 9756 || x6 === 9758 || x6 === 9792 || x6 === 9794 || x6 === 9824 || x6 === 9825 || x6 >= 9827 && x6 <= 9829 || x6 >= 9831 && x6 <= 9834 || x6 === 9836 || x6 === 9837 || x6 === 9839 || x6 === 9886 || x6 === 9887 || x6 === 9919 || x6 >= 9926 && x6 <= 9933 || x6 >= 9935 && x6 <= 9939 || x6 >= 9941 && x6 <= 9953 || x6 === 9955 || x6 === 9960 || x6 === 9961 || x6 >= 9963 && x6 <= 9969 || x6 === 9972 || x6 >= 9974 && x6 <= 9977 || x6 === 9979 || x6 === 9980 || x6 === 9982 || x6 === 9983 || x6 === 10045 || x6 >= 10102 && x6 <= 10111 || x6 >= 11094 && x6 <= 11097 || x6 >= 12872 && x6 <= 12879 || x6 >= 57344 && x6 <= 63743 || x6 >= 65024 && x6 <= 65039 || x6 === 65533 || x6 >= 127232 && x6 <= 127242 || x6 >= 127248 && x6 <= 127277 || x6 >= 127280 && x6 <= 127337 || x6 >= 127344 && x6 <= 127373 || x6 === 127375 || x6 === 127376 || x6 >= 127387 && x6 <= 127404 || x6 >= 917760 && x6 <= 917999 || x6 >= 983040 && x6 <= 1048573 || x6 >= 1048576 && x6 <= 1114109;
|
|
272722
|
-
}
|
|
272723
|
-
function isFullWidth(x6) {
|
|
272724
|
-
return x6 === 12288 || x6 >= 65281 && x6 <= 65376 || x6 >= 65504 && x6 <= 65510;
|
|
272725
|
-
}
|
|
272726
|
-
function isWide(x6) {
|
|
272727
|
-
return x6 >= 4352 && x6 <= 4447 || x6 === 8986 || x6 === 8987 || x6 === 9001 || x6 === 9002 || x6 >= 9193 && x6 <= 9196 || x6 === 9200 || x6 === 9203 || x6 === 9725 || x6 === 9726 || x6 === 9748 || x6 === 9749 || x6 >= 9776 && x6 <= 9783 || x6 >= 9800 && x6 <= 9811 || x6 === 9855 || x6 >= 9866 && x6 <= 9871 || x6 === 9875 || x6 === 9889 || x6 === 9898 || x6 === 9899 || x6 === 9917 || x6 === 9918 || x6 === 9924 || x6 === 9925 || x6 === 9934 || x6 === 9940 || x6 === 9962 || x6 === 9970 || x6 === 9971 || x6 === 9973 || x6 === 9978 || x6 === 9981 || x6 === 9989 || x6 === 9994 || x6 === 9995 || x6 === 10024 || x6 === 10060 || x6 === 10062 || x6 >= 10067 && x6 <= 10069 || x6 === 10071 || x6 >= 10133 && x6 <= 10135 || x6 === 10160 || x6 === 10175 || x6 === 11035 || x6 === 11036 || x6 === 11088 || x6 === 11093 || x6 >= 11904 && x6 <= 11929 || x6 >= 11931 && x6 <= 12019 || x6 >= 12032 && x6 <= 12245 || x6 >= 12272 && x6 <= 12287 || x6 >= 12289 && x6 <= 12350 || x6 >= 12353 && x6 <= 12438 || x6 >= 12441 && x6 <= 12543 || x6 >= 12549 && x6 <= 12591 || x6 >= 12593 && x6 <= 12686 || x6 >= 12688 && x6 <= 12773 || x6 >= 12783 && x6 <= 12830 || x6 >= 12832 && x6 <= 12871 || x6 >= 12880 && x6 <= 42124 || x6 >= 42128 && x6 <= 42182 || x6 >= 43360 && x6 <= 43388 || x6 >= 44032 && x6 <= 55203 || x6 >= 63744 && x6 <= 64255 || x6 >= 65040 && x6 <= 65049 || x6 >= 65072 && x6 <= 65106 || x6 >= 65108 && x6 <= 65126 || x6 >= 65128 && x6 <= 65131 || x6 >= 94176 && x6 <= 94180 || x6 >= 94192 && x6 <= 94198 || x6 >= 94208 && x6 <= 101589 || x6 >= 101631 && x6 <= 101662 || x6 >= 101760 && x6 <= 101874 || x6 >= 110576 && x6 <= 110579 || x6 >= 110581 && x6 <= 110587 || x6 === 110589 || x6 === 110590 || x6 >= 110592 && x6 <= 110882 || x6 === 110898 || x6 >= 110928 && x6 <= 110930 || x6 === 110933 || x6 >= 110948 && x6 <= 110951 || x6 >= 110960 && x6 <= 111355 || x6 >= 119552 && x6 <= 119638 || x6 >= 119648 && x6 <= 119670 || x6 === 126980 || x6 === 127183 || x6 === 127374 || x6 >= 127377 && x6 <= 127386 || x6 >= 127488 && x6 <= 127490 || x6 >= 127504 && x6 <= 127547 || x6 >= 127552 && x6 <= 127560 || x6 === 127568 || x6 === 127569 || x6 >= 127584 && x6 <= 127589 || x6 >= 127744 && x6 <= 127776 || x6 >= 127789 && x6 <= 127797 || x6 >= 127799 && x6 <= 127868 || x6 >= 127870 && x6 <= 127891 || x6 >= 127904 && x6 <= 127946 || x6 >= 127951 && x6 <= 127955 || x6 >= 127968 && x6 <= 127984 || x6 === 127988 || x6 >= 127992 && x6 <= 128062 || x6 === 128064 || x6 >= 128066 && x6 <= 128252 || x6 >= 128255 && x6 <= 128317 || x6 >= 128331 && x6 <= 128334 || x6 >= 128336 && x6 <= 128359 || x6 === 128378 || x6 === 128405 || x6 === 128406 || x6 === 128420 || x6 >= 128507 && x6 <= 128591 || x6 >= 128640 && x6 <= 128709 || x6 === 128716 || x6 >= 128720 && x6 <= 128722 || x6 >= 128725 && x6 <= 128728 || x6 >= 128732 && x6 <= 128735 || x6 === 128747 || x6 === 128748 || x6 >= 128756 && x6 <= 128764 || x6 >= 128992 && x6 <= 129003 || x6 === 129008 || x6 >= 129292 && x6 <= 129338 || x6 >= 129340 && x6 <= 129349 || x6 >= 129351 && x6 <= 129535 || x6 >= 129648 && x6 <= 129660 || x6 >= 129664 && x6 <= 129674 || x6 >= 129678 && x6 <= 129734 || x6 === 129736 || x6 >= 129741 && x6 <= 129756 || x6 >= 129759 && x6 <= 129770 || x6 >= 129775 && x6 <= 129784 || x6 >= 131072 && x6 <= 196605 || x6 >= 196608 && x6 <= 262141;
|
|
272728
|
-
}
|
|
272729
|
-
|
|
272730
|
-
// ../../node_modules/.bun/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/index.js
|
|
272731
|
-
function validate3(codePoint) {
|
|
272732
|
-
if (!Number.isSafeInteger(codePoint)) {
|
|
272733
|
-
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
272734
|
-
}
|
|
272735
|
-
}
|
|
272736
|
-
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
272737
|
-
validate3(codePoint);
|
|
272738
|
-
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
272739
|
-
return 2;
|
|
272740
|
-
}
|
|
272741
|
-
return 1;
|
|
272742
|
-
}
|
|
272743
|
-
|
|
272744
|
-
// ../../node_modules/.bun/string-width@7.2.0/node_modules/string-width/index.js
|
|
272745
|
-
var import_emoji_regex = __toESM(require_emoji_regex2(), 1);
|
|
272746
|
-
var segmenter = new Intl.Segmenter;
|
|
272747
|
-
var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
272748
|
-
function stringWidth(string4, options = {}) {
|
|
272749
|
-
if (typeof string4 !== "string" || string4.length === 0) {
|
|
272750
|
-
return 0;
|
|
272751
|
-
}
|
|
272752
|
-
const {
|
|
272753
|
-
ambiguousIsNarrow = true,
|
|
272754
|
-
countAnsiEscapeCodes = false
|
|
272755
|
-
} = options;
|
|
272756
|
-
if (!countAnsiEscapeCodes) {
|
|
272757
|
-
string4 = stripAnsi2(string4);
|
|
272758
|
-
}
|
|
272759
|
-
if (string4.length === 0) {
|
|
272760
|
-
return 0;
|
|
272761
|
-
}
|
|
272762
|
-
let width = 0;
|
|
272763
|
-
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
272764
|
-
for (const { segment: character } of segmenter.segment(string4)) {
|
|
272765
|
-
const codePoint = character.codePointAt(0);
|
|
272766
|
-
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
272767
|
-
continue;
|
|
272768
|
-
}
|
|
272769
|
-
if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
|
|
272770
|
-
continue;
|
|
272771
|
-
}
|
|
272772
|
-
if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
|
|
272773
|
-
continue;
|
|
272774
|
-
}
|
|
272775
|
-
if (codePoint >= 55296 && codePoint <= 57343) {
|
|
272776
|
-
continue;
|
|
272777
|
-
}
|
|
272778
|
-
if (codePoint >= 65024 && codePoint <= 65039) {
|
|
272779
|
-
continue;
|
|
272780
|
-
}
|
|
272781
|
-
if (defaultIgnorableCodePointRegex.test(character)) {
|
|
272782
|
-
continue;
|
|
272783
|
-
}
|
|
272784
|
-
if (import_emoji_regex.default().test(character)) {
|
|
272785
|
-
width += 2;
|
|
272786
|
-
continue;
|
|
272787
|
-
}
|
|
272788
|
-
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
272789
|
-
}
|
|
272790
|
-
return width;
|
|
272791
|
-
}
|
|
272792
|
-
|
|
272793
|
-
// ../../node_modules/.bun/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
|
|
272794
|
-
var ANSI_BACKGROUND_OFFSET = 10;
|
|
272795
|
-
var wrapAnsi16 = (offset = 0) => (code2) => `\x1B[${code2 + offset}m`;
|
|
272796
|
-
var wrapAnsi256 = (offset = 0) => (code2) => `\x1B[${38 + offset};5;${code2}m`;
|
|
272797
|
-
var wrapAnsi16m = (offset = 0) => (red2, green2, blue2) => `\x1B[${38 + offset};2;${red2};${green2};${blue2}m`;
|
|
272798
|
-
var styles = {
|
|
272799
|
-
modifier: {
|
|
272800
|
-
reset: [0, 0],
|
|
272801
|
-
bold: [1, 22],
|
|
272802
|
-
dim: [2, 22],
|
|
272803
|
-
italic: [3, 23],
|
|
272804
|
-
underline: [4, 24],
|
|
272805
|
-
overline: [53, 55],
|
|
272806
|
-
inverse: [7, 27],
|
|
272807
|
-
hidden: [8, 28],
|
|
272808
|
-
strikethrough: [9, 29]
|
|
272809
|
-
},
|
|
272810
|
-
color: {
|
|
272811
|
-
black: [30, 39],
|
|
272812
|
-
red: [31, 39],
|
|
272813
|
-
green: [32, 39],
|
|
272814
|
-
yellow: [33, 39],
|
|
272815
|
-
blue: [34, 39],
|
|
272816
|
-
magenta: [35, 39],
|
|
272817
|
-
cyan: [36, 39],
|
|
272818
|
-
white: [37, 39],
|
|
272819
|
-
blackBright: [90, 39],
|
|
272820
|
-
gray: [90, 39],
|
|
272821
|
-
grey: [90, 39],
|
|
272822
|
-
redBright: [91, 39],
|
|
272823
|
-
greenBright: [92, 39],
|
|
272824
|
-
yellowBright: [93, 39],
|
|
272825
|
-
blueBright: [94, 39],
|
|
272826
|
-
magentaBright: [95, 39],
|
|
272827
|
-
cyanBright: [96, 39],
|
|
272828
|
-
whiteBright: [97, 39]
|
|
272829
|
-
},
|
|
272830
|
-
bgColor: {
|
|
272831
|
-
bgBlack: [40, 49],
|
|
272832
|
-
bgRed: [41, 49],
|
|
272833
|
-
bgGreen: [42, 49],
|
|
272834
|
-
bgYellow: [43, 49],
|
|
272835
|
-
bgBlue: [44, 49],
|
|
272836
|
-
bgMagenta: [45, 49],
|
|
272837
|
-
bgCyan: [46, 49],
|
|
272838
|
-
bgWhite: [47, 49],
|
|
272839
|
-
bgBlackBright: [100, 49],
|
|
272840
|
-
bgGray: [100, 49],
|
|
272841
|
-
bgGrey: [100, 49],
|
|
272842
|
-
bgRedBright: [101, 49],
|
|
272843
|
-
bgGreenBright: [102, 49],
|
|
272844
|
-
bgYellowBright: [103, 49],
|
|
272845
|
-
bgBlueBright: [104, 49],
|
|
272846
|
-
bgMagentaBright: [105, 49],
|
|
272847
|
-
bgCyanBright: [106, 49],
|
|
272848
|
-
bgWhiteBright: [107, 49]
|
|
272849
|
-
}
|
|
272850
|
-
};
|
|
272851
|
-
var modifierNames = Object.keys(styles.modifier);
|
|
272852
|
-
var foregroundColorNames = Object.keys(styles.color);
|
|
272853
|
-
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
272854
|
-
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
272855
|
-
function assembleStyles() {
|
|
272856
|
-
const codes = new Map;
|
|
272857
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
272858
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
272859
|
-
styles[styleName] = {
|
|
272860
|
-
open: `\x1B[${style[0]}m`,
|
|
272861
|
-
close: `\x1B[${style[1]}m`
|
|
272862
|
-
};
|
|
272863
|
-
group[styleName] = styles[styleName];
|
|
272864
|
-
codes.set(style[0], style[1]);
|
|
272865
|
-
}
|
|
272866
|
-
Object.defineProperty(styles, groupName, {
|
|
272867
|
-
value: group,
|
|
272868
|
-
enumerable: false
|
|
272869
|
-
});
|
|
272870
|
-
}
|
|
272871
|
-
Object.defineProperty(styles, "codes", {
|
|
272872
|
-
value: codes,
|
|
272873
|
-
enumerable: false
|
|
272874
|
-
});
|
|
272875
|
-
styles.color.close = "\x1B[39m";
|
|
272876
|
-
styles.bgColor.close = "\x1B[49m";
|
|
272877
|
-
styles.color.ansi = wrapAnsi16();
|
|
272878
|
-
styles.color.ansi256 = wrapAnsi256();
|
|
272879
|
-
styles.color.ansi16m = wrapAnsi16m();
|
|
272880
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
272881
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
272882
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
272883
|
-
Object.defineProperties(styles, {
|
|
272884
|
-
rgbToAnsi256: {
|
|
272885
|
-
value(red2, green2, blue2) {
|
|
272886
|
-
if (red2 === green2 && green2 === blue2) {
|
|
272887
|
-
if (red2 < 8) {
|
|
272888
|
-
return 16;
|
|
272889
|
-
}
|
|
272890
|
-
if (red2 > 248) {
|
|
272891
|
-
return 231;
|
|
272892
|
-
}
|
|
272893
|
-
return Math.round((red2 - 8) / 247 * 24) + 232;
|
|
272894
|
-
}
|
|
272895
|
-
return 16 + 36 * Math.round(red2 / 255 * 5) + 6 * Math.round(green2 / 255 * 5) + Math.round(blue2 / 255 * 5);
|
|
272896
|
-
},
|
|
272897
|
-
enumerable: false
|
|
272898
|
-
},
|
|
272899
|
-
hexToRgb: {
|
|
272900
|
-
value(hex3) {
|
|
272901
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex3.toString(16));
|
|
272902
|
-
if (!matches) {
|
|
272903
|
-
return [0, 0, 0];
|
|
272904
|
-
}
|
|
272905
|
-
let [colorString] = matches;
|
|
272906
|
-
if (colorString.length === 3) {
|
|
272907
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
272908
|
-
}
|
|
272909
|
-
const integer2 = Number.parseInt(colorString, 16);
|
|
272910
|
-
return [
|
|
272911
|
-
integer2 >> 16 & 255,
|
|
272912
|
-
integer2 >> 8 & 255,
|
|
272913
|
-
integer2 & 255
|
|
272914
|
-
];
|
|
272915
|
-
},
|
|
272916
|
-
enumerable: false
|
|
272917
|
-
},
|
|
272918
|
-
hexToAnsi256: {
|
|
272919
|
-
value: (hex3) => styles.rgbToAnsi256(...styles.hexToRgb(hex3)),
|
|
272920
|
-
enumerable: false
|
|
272921
|
-
},
|
|
272922
|
-
ansi256ToAnsi: {
|
|
272923
|
-
value(code2) {
|
|
272924
|
-
if (code2 < 8) {
|
|
272925
|
-
return 30 + code2;
|
|
272926
|
-
}
|
|
272927
|
-
if (code2 < 16) {
|
|
272928
|
-
return 90 + (code2 - 8);
|
|
272929
|
-
}
|
|
272930
|
-
let red2;
|
|
272931
|
-
let green2;
|
|
272932
|
-
let blue2;
|
|
272933
|
-
if (code2 >= 232) {
|
|
272934
|
-
red2 = ((code2 - 232) * 10 + 8) / 255;
|
|
272935
|
-
green2 = red2;
|
|
272936
|
-
blue2 = red2;
|
|
272937
|
-
} else {
|
|
272938
|
-
code2 -= 16;
|
|
272939
|
-
const remainder = code2 % 36;
|
|
272940
|
-
red2 = Math.floor(code2 / 36) / 5;
|
|
272941
|
-
green2 = Math.floor(remainder / 6) / 5;
|
|
272942
|
-
blue2 = remainder % 6 / 5;
|
|
272943
|
-
}
|
|
272944
|
-
const value4 = Math.max(red2, green2, blue2) * 2;
|
|
272945
|
-
if (value4 === 0) {
|
|
272946
|
-
return 30;
|
|
272947
|
-
}
|
|
272948
|
-
let result = 30 + (Math.round(blue2) << 2 | Math.round(green2) << 1 | Math.round(red2));
|
|
272949
|
-
if (value4 === 2) {
|
|
272950
|
-
result += 60;
|
|
272951
|
-
}
|
|
272952
|
-
return result;
|
|
272953
|
-
},
|
|
272954
|
-
enumerable: false
|
|
272955
|
-
},
|
|
272956
|
-
rgbToAnsi: {
|
|
272957
|
-
value: (red2, green2, blue2) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red2, green2, blue2)),
|
|
272958
|
-
enumerable: false
|
|
272959
|
-
},
|
|
272960
|
-
hexToAnsi: {
|
|
272961
|
-
value: (hex3) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex3)),
|
|
272962
|
-
enumerable: false
|
|
272963
|
-
}
|
|
272964
|
-
});
|
|
272965
|
-
return styles;
|
|
272966
|
-
}
|
|
272967
|
-
var ansiStyles = assembleStyles();
|
|
272968
|
-
var ansi_styles_default = ansiStyles;
|
|
272969
|
-
|
|
272970
|
-
// ../../node_modules/.bun/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js
|
|
272971
|
-
var ESCAPES = new Set([
|
|
272972
|
-
"\x1B",
|
|
272973
|
-
""
|
|
272974
|
-
]);
|
|
272975
|
-
var END_CODE = 39;
|
|
272976
|
-
var ANSI_ESCAPE_BELL = "\x07";
|
|
272977
|
-
var ANSI_CSI = "[";
|
|
272978
|
-
var ANSI_OSC = "]";
|
|
272979
|
-
var ANSI_SGR_TERMINATOR = "m";
|
|
272980
|
-
var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
272981
|
-
var wrapAnsiCode = (code2) => `${ESCAPES.values().next().value}${ANSI_CSI}${code2}${ANSI_SGR_TERMINATOR}`;
|
|
272982
|
-
var wrapAnsiHyperlink = (url2) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url2}${ANSI_ESCAPE_BELL}`;
|
|
272983
|
-
var wordLengths = (string4) => string4.split(" ").map((character) => stringWidth(character));
|
|
272984
|
-
var wrapWord = (rows, word2, columns) => {
|
|
272985
|
-
const characters = [...word2];
|
|
272986
|
-
let isInsideEscape = false;
|
|
272987
|
-
let isInsideLinkEscape = false;
|
|
272988
|
-
let visible = stringWidth(stripAnsi2(rows.at(-1)));
|
|
272989
|
-
for (const [index, character] of characters.entries()) {
|
|
272990
|
-
const characterLength = stringWidth(character);
|
|
272991
|
-
if (visible + characterLength <= columns) {
|
|
272992
|
-
rows[rows.length - 1] += character;
|
|
272993
|
-
} else {
|
|
272994
|
-
rows.push(character);
|
|
272995
|
-
visible = 0;
|
|
272996
|
-
}
|
|
272997
|
-
if (ESCAPES.has(character)) {
|
|
272998
|
-
isInsideEscape = true;
|
|
272999
|
-
const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
|
|
273000
|
-
isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
|
|
273001
|
-
}
|
|
273002
|
-
if (isInsideEscape) {
|
|
273003
|
-
if (isInsideLinkEscape) {
|
|
273004
|
-
if (character === ANSI_ESCAPE_BELL) {
|
|
273005
|
-
isInsideEscape = false;
|
|
273006
|
-
isInsideLinkEscape = false;
|
|
273007
|
-
}
|
|
273008
|
-
} else if (character === ANSI_SGR_TERMINATOR) {
|
|
273009
|
-
isInsideEscape = false;
|
|
273010
|
-
}
|
|
273011
|
-
continue;
|
|
273012
|
-
}
|
|
273013
|
-
visible += characterLength;
|
|
273014
|
-
if (visible === columns && index < characters.length - 1) {
|
|
273015
|
-
rows.push("");
|
|
273016
|
-
visible = 0;
|
|
273017
|
-
}
|
|
273018
|
-
}
|
|
273019
|
-
if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
|
|
273020
|
-
rows[rows.length - 2] += rows.pop();
|
|
273021
|
-
}
|
|
273022
|
-
};
|
|
273023
|
-
var stringVisibleTrimSpacesRight = (string4) => {
|
|
273024
|
-
const words = string4.split(" ");
|
|
273025
|
-
let last = words.length;
|
|
273026
|
-
while (last > 0) {
|
|
273027
|
-
if (stringWidth(words[last - 1]) > 0) {
|
|
273028
|
-
break;
|
|
273029
|
-
}
|
|
273030
|
-
last--;
|
|
273031
|
-
}
|
|
273032
|
-
if (last === words.length) {
|
|
273033
|
-
return string4;
|
|
273034
|
-
}
|
|
273035
|
-
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
273036
|
-
};
|
|
273037
|
-
var exec = (string4, columns, options = {}) => {
|
|
273038
|
-
if (options.trim !== false && string4.trim() === "") {
|
|
273039
|
-
return "";
|
|
273040
|
-
}
|
|
273041
|
-
let returnValue = "";
|
|
273042
|
-
let escapeCode;
|
|
273043
|
-
let escapeUrl;
|
|
273044
|
-
const lengths = wordLengths(string4);
|
|
273045
|
-
let rows = [""];
|
|
273046
|
-
for (const [index, word2] of string4.split(" ").entries()) {
|
|
273047
|
-
if (options.trim !== false) {
|
|
273048
|
-
rows[rows.length - 1] = rows.at(-1).trimStart();
|
|
273049
|
-
}
|
|
273050
|
-
let rowLength = stringWidth(rows.at(-1));
|
|
273051
|
-
if (index !== 0) {
|
|
273052
|
-
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
273053
|
-
rows.push("");
|
|
273054
|
-
rowLength = 0;
|
|
273055
|
-
}
|
|
273056
|
-
if (rowLength > 0 || options.trim === false) {
|
|
273057
|
-
rows[rows.length - 1] += " ";
|
|
273058
|
-
rowLength++;
|
|
273059
|
-
}
|
|
273060
|
-
}
|
|
273061
|
-
if (options.hard && lengths[index] > columns) {
|
|
273062
|
-
const remainingColumns = columns - rowLength;
|
|
273063
|
-
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
273064
|
-
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
|
273065
|
-
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
273066
|
-
rows.push("");
|
|
273067
|
-
}
|
|
273068
|
-
wrapWord(rows, word2, columns);
|
|
273069
|
-
continue;
|
|
273070
|
-
}
|
|
273071
|
-
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
273072
|
-
if (options.wordWrap === false && rowLength < columns) {
|
|
273073
|
-
wrapWord(rows, word2, columns);
|
|
273074
|
-
continue;
|
|
273075
|
-
}
|
|
273076
|
-
rows.push("");
|
|
273077
|
-
}
|
|
273078
|
-
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
273079
|
-
wrapWord(rows, word2, columns);
|
|
273080
|
-
continue;
|
|
273081
|
-
}
|
|
273082
|
-
rows[rows.length - 1] += word2;
|
|
273083
|
-
}
|
|
273084
|
-
if (options.trim !== false) {
|
|
273085
|
-
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
273086
|
-
}
|
|
273087
|
-
const preString = rows.join(`
|
|
273088
|
-
`);
|
|
273089
|
-
const pre = [...preString];
|
|
273090
|
-
let preStringIndex = 0;
|
|
273091
|
-
for (const [index, character] of pre.entries()) {
|
|
273092
|
-
returnValue += character;
|
|
273093
|
-
if (ESCAPES.has(character)) {
|
|
273094
|
-
const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
273095
|
-
if (groups.code !== undefined) {
|
|
273096
|
-
const code3 = Number.parseFloat(groups.code);
|
|
273097
|
-
escapeCode = code3 === END_CODE ? undefined : code3;
|
|
273098
|
-
} else if (groups.uri !== undefined) {
|
|
273099
|
-
escapeUrl = groups.uri.length === 0 ? undefined : groups.uri;
|
|
273100
|
-
}
|
|
273101
|
-
}
|
|
273102
|
-
const code2 = ansi_styles_default.codes.get(Number(escapeCode));
|
|
273103
|
-
if (pre[index + 1] === `
|
|
273104
|
-
`) {
|
|
273105
|
-
if (escapeUrl) {
|
|
273106
|
-
returnValue += wrapAnsiHyperlink("");
|
|
273107
|
-
}
|
|
273108
|
-
if (escapeCode && code2) {
|
|
273109
|
-
returnValue += wrapAnsiCode(code2);
|
|
273110
|
-
}
|
|
273111
|
-
} else if (character === `
|
|
273112
|
-
`) {
|
|
273113
|
-
if (escapeCode && code2) {
|
|
273114
|
-
returnValue += wrapAnsiCode(escapeCode);
|
|
273115
|
-
}
|
|
273116
|
-
if (escapeUrl) {
|
|
273117
|
-
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
273118
|
-
}
|
|
273119
|
-
}
|
|
273120
|
-
preStringIndex += character.length;
|
|
273121
|
-
}
|
|
273122
|
-
return returnValue;
|
|
273123
|
-
};
|
|
273124
|
-
function wrapAnsi(string4, columns, options) {
|
|
273125
|
-
return String(string4).normalize().replaceAll(`\r
|
|
273126
|
-
`, `
|
|
273127
|
-
`).split(`
|
|
273128
|
-
`).map((line) => exec(line, columns, options)).join(`
|
|
273129
|
-
`);
|
|
273130
|
-
}
|
|
273131
|
-
|
|
273132
|
-
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/utils.js
|
|
273133
|
-
function breakLines(content, width) {
|
|
272930
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
272931
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
|
272932
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
|
272933
|
+
function breakLines2(content, width) {
|
|
273134
272934
|
return content.split(`
|
|
273135
|
-
`).flatMap((line) =>
|
|
272935
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
|
273136
272936
|
`).map((str) => str.trimEnd())).join(`
|
|
273137
272937
|
`);
|
|
273138
272938
|
}
|
|
273139
|
-
function
|
|
273140
|
-
return
|
|
272939
|
+
function readlineWidth2() {
|
|
272940
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
|
273141
272941
|
}
|
|
273142
272942
|
|
|
273143
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
273144
|
-
var
|
|
273145
|
-
import * as
|
|
273146
|
-
import { AsyncResource as
|
|
273147
|
-
|
|
273148
|
-
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
273149
|
-
import { stripVTControlCharacters as stripVTControlCharacters2 } from "node:util";
|
|
273150
|
-
|
|
273151
|
-
// ../../node_modules/.bun/@inquirer+ansi@2.0.1/node_modules/@inquirer/ansi/dist/index.js
|
|
273152
|
-
var ESC2 = "\x1B[";
|
|
273153
|
-
var cursorLeft2 = ESC2 + "G";
|
|
273154
|
-
var cursorHide2 = ESC2 + "?25l";
|
|
273155
|
-
var cursorShow2 = ESC2 + "?25h";
|
|
273156
|
-
var cursorUp2 = (rows = 1) => rows > 0 ? `${ESC2}${rows}A` : "";
|
|
273157
|
-
var cursorDown2 = (rows = 1) => rows > 0 ? `${ESC2}${rows}B` : "";
|
|
273158
|
-
var cursorTo2 = (x6, y5) => {
|
|
273159
|
-
if (typeof y5 === "number" && !Number.isNaN(y5)) {
|
|
273160
|
-
return `${ESC2}${y5 + 1};${x6 + 1}H`;
|
|
273161
|
-
}
|
|
273162
|
-
return `${ESC2}${x6 + 1}G`;
|
|
273163
|
-
};
|
|
273164
|
-
var eraseLine2 = ESC2 + "2K";
|
|
273165
|
-
var eraseLines2 = (lines) => lines > 0 ? (eraseLine2 + cursorUp2(1)).repeat(lines - 1) + eraseLine2 + cursorLeft2 : "";
|
|
272943
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
272944
|
+
var import_mute_stream2 = __toESM(require_lib13(), 1);
|
|
272945
|
+
import * as readline4 from "node:readline";
|
|
272946
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
|
273166
272947
|
|
|
273167
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
273168
|
-
|
|
272948
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
272949
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
|
272950
|
+
var height2 = (content) => content.split(`
|
|
273169
272951
|
`).length;
|
|
273170
|
-
var
|
|
272952
|
+
var lastLine2 = (content) => content.split(`
|
|
273171
272953
|
`).pop() ?? "";
|
|
273172
272954
|
|
|
273173
|
-
class
|
|
272955
|
+
class ScreenManager2 {
|
|
273174
272956
|
height = 0;
|
|
273175
272957
|
extraLinesUnderPrompt = 0;
|
|
273176
272958
|
cursorPos;
|
|
@@ -273185,17 +272967,17 @@ class ScreenManager {
|
|
|
273185
272967
|
this.rl.output.mute();
|
|
273186
272968
|
}
|
|
273187
272969
|
render(content, bottomContent = "") {
|
|
273188
|
-
const promptLine =
|
|
273189
|
-
const rawPromptLine =
|
|
272970
|
+
const promptLine = lastLine2(content);
|
|
272971
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
|
273190
272972
|
let prompt = rawPromptLine;
|
|
273191
272973
|
if (this.rl.line.length > 0) {
|
|
273192
272974
|
prompt = prompt.slice(0, -this.rl.line.length);
|
|
273193
272975
|
}
|
|
273194
272976
|
this.rl.setPrompt(prompt);
|
|
273195
272977
|
this.cursorPos = this.rl.getCursorPos();
|
|
273196
|
-
const width =
|
|
273197
|
-
content =
|
|
273198
|
-
bottomContent =
|
|
272978
|
+
const width = readlineWidth2();
|
|
272979
|
+
content = breakLines2(content, width);
|
|
272980
|
+
bottomContent = breakLines2(bottomContent, width);
|
|
273199
272981
|
if (rawPromptLine.length % width === 0) {
|
|
273200
272982
|
content += `
|
|
273201
272983
|
`;
|
|
@@ -273203,34 +272985,34 @@ class ScreenManager {
|
|
|
273203
272985
|
let output = content + (bottomContent ? `
|
|
273204
272986
|
` + bottomContent : "");
|
|
273205
272987
|
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
|
273206
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ?
|
|
272988
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
|
273207
272989
|
if (bottomContentHeight > 0)
|
|
273208
|
-
output +=
|
|
273209
|
-
output +=
|
|
273210
|
-
this.write(
|
|
272990
|
+
output += cursorUp(bottomContentHeight);
|
|
272991
|
+
output += cursorTo(this.cursorPos.cols);
|
|
272992
|
+
this.write(cursorDown(this.extraLinesUnderPrompt) + eraseLines(this.height) + output);
|
|
273211
272993
|
this.extraLinesUnderPrompt = bottomContentHeight;
|
|
273212
|
-
this.height =
|
|
272994
|
+
this.height = height2(output);
|
|
273213
272995
|
}
|
|
273214
272996
|
checkCursorPos() {
|
|
273215
272997
|
const cursorPos = this.rl.getCursorPos();
|
|
273216
272998
|
if (cursorPos.cols !== this.cursorPos.cols) {
|
|
273217
|
-
this.write(
|
|
272999
|
+
this.write(cursorTo(cursorPos.cols));
|
|
273218
273000
|
this.cursorPos = cursorPos;
|
|
273219
273001
|
}
|
|
273220
273002
|
}
|
|
273221
273003
|
done({ clearContent }) {
|
|
273222
273004
|
this.rl.setPrompt("");
|
|
273223
|
-
let output =
|
|
273224
|
-
output += clearContent ?
|
|
273005
|
+
let output = cursorDown(this.extraLinesUnderPrompt);
|
|
273006
|
+
output += clearContent ? eraseLines(this.height) : `
|
|
273225
273007
|
`;
|
|
273226
|
-
output +=
|
|
273008
|
+
output += cursorShow;
|
|
273227
273009
|
this.write(output);
|
|
273228
273010
|
this.rl.close();
|
|
273229
273011
|
}
|
|
273230
273012
|
}
|
|
273231
273013
|
|
|
273232
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
273233
|
-
class
|
|
273014
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
273015
|
+
class PromisePolyfill2 extends Promise {
|
|
273234
273016
|
static withResolver() {
|
|
273235
273017
|
let resolve6;
|
|
273236
273018
|
let reject;
|
|
@@ -273242,8 +273024,8 @@ class PromisePolyfill extends Promise {
|
|
|
273242
273024
|
}
|
|
273243
273025
|
}
|
|
273244
273026
|
|
|
273245
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
273246
|
-
function
|
|
273027
|
+
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
273028
|
+
function getCallSites2() {
|
|
273247
273029
|
const _prepareStackTrace = Error.prepareStackTrace;
|
|
273248
273030
|
let result = [];
|
|
273249
273031
|
try {
|
|
@@ -273259,20 +273041,20 @@ function getCallSites() {
|
|
|
273259
273041
|
Error.prepareStackTrace = _prepareStackTrace;
|
|
273260
273042
|
return result;
|
|
273261
273043
|
}
|
|
273262
|
-
function
|
|
273263
|
-
const callSites =
|
|
273044
|
+
function createPrompt2(view) {
|
|
273045
|
+
const callSites = getCallSites2();
|
|
273264
273046
|
const prompt = (config3, context = {}) => {
|
|
273265
273047
|
const { input = process.stdin, signal } = context;
|
|
273266
273048
|
const cleanups = new Set;
|
|
273267
|
-
const output = new
|
|
273049
|
+
const output = new import_mute_stream2.default;
|
|
273268
273050
|
output.pipe(context.output ?? process.stdout);
|
|
273269
|
-
const rl =
|
|
273051
|
+
const rl = readline4.createInterface({
|
|
273270
273052
|
terminal: true,
|
|
273271
273053
|
input,
|
|
273272
273054
|
output
|
|
273273
273055
|
});
|
|
273274
|
-
const screen = new
|
|
273275
|
-
const { promise: promise2, resolve: resolve6, reject } =
|
|
273056
|
+
const screen = new ScreenManager2(rl);
|
|
273057
|
+
const { promise: promise2, resolve: resolve6, reject } = PromisePolyfill2.withResolver();
|
|
273276
273058
|
const cancel3 = () => reject(new CancelPromptError2);
|
|
273277
273059
|
if (signal) {
|
|
273278
273060
|
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
|
@@ -273292,8 +273074,8 @@ function createPrompt(view) {
|
|
|
273292
273074
|
const checkCursorPos = () => screen.checkCursorPos();
|
|
273293
273075
|
rl.input.on("keypress", checkCursorPos);
|
|
273294
273076
|
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
273295
|
-
return
|
|
273296
|
-
const hooksCleanup =
|
|
273077
|
+
return withHooks2(rl, (cycle) => {
|
|
273078
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
|
273297
273079
|
rl.on("close", hooksCleanup);
|
|
273298
273080
|
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
|
273299
273081
|
cycle(() => {
|
|
@@ -273308,16 +273090,16 @@ function createPrompt(view) {
|
|
|
273308
273090
|
}
|
|
273309
273091
|
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
273310
273092
|
screen.render(content, bottomContent);
|
|
273311
|
-
|
|
273093
|
+
effectScheduler2.run();
|
|
273312
273094
|
} catch (error50) {
|
|
273313
273095
|
reject(error50);
|
|
273314
273096
|
}
|
|
273315
273097
|
});
|
|
273316
273098
|
return Object.assign(promise2.then((answer) => {
|
|
273317
|
-
|
|
273099
|
+
effectScheduler2.clearAll();
|
|
273318
273100
|
return answer;
|
|
273319
273101
|
}, (error50) => {
|
|
273320
|
-
|
|
273102
|
+
effectScheduler2.clearAll();
|
|
273321
273103
|
throw error50;
|
|
273322
273104
|
}).finally(() => {
|
|
273323
273105
|
cleanups.forEach((cleanup) => cleanup());
|
|
@@ -273328,19 +273110,19 @@ function createPrompt(view) {
|
|
|
273328
273110
|
};
|
|
273329
273111
|
return prompt;
|
|
273330
273112
|
}
|
|
273331
|
-
// ../../node_modules/.bun/@inquirer+input@
|
|
273113
|
+
// ../../node_modules/.bun/@inquirer+input@4.3.1+4cbbb20073436eb8/node_modules/@inquirer/input/dist/esm/index.js
|
|
273332
273114
|
var inputTheme = {
|
|
273333
273115
|
validationFailureMode: "keep"
|
|
273334
273116
|
};
|
|
273335
|
-
var
|
|
273117
|
+
var esm_default2 = createPrompt2((config3, done) => {
|
|
273336
273118
|
const { prefill = "tab" } = config3;
|
|
273337
|
-
const theme =
|
|
273338
|
-
const [status, setStatus] =
|
|
273339
|
-
const [defaultValue = "", setDefaultValue] =
|
|
273340
|
-
const [errorMsg, setError] =
|
|
273341
|
-
const [value4, setValue] =
|
|
273342
|
-
const prefix =
|
|
273343
|
-
async function
|
|
273119
|
+
const theme = makeTheme2(inputTheme, config3.theme);
|
|
273120
|
+
const [status, setStatus] = useState2("idle");
|
|
273121
|
+
const [defaultValue = "", setDefaultValue] = useState2(config3.default);
|
|
273122
|
+
const [errorMsg, setError] = useState2();
|
|
273123
|
+
const [value4, setValue] = useState2("");
|
|
273124
|
+
const prefix = usePrefix2({ status, theme });
|
|
273125
|
+
async function validate3(value5) {
|
|
273344
273126
|
const { required: required2, pattern, patternError = "Invalid input" } = config3;
|
|
273345
273127
|
if (required2 && !value5) {
|
|
273346
273128
|
return "You must provide a value";
|
|
@@ -273353,14 +273135,14 @@ var dist_default2 = createPrompt((config3, done) => {
|
|
|
273353
273135
|
}
|
|
273354
273136
|
return true;
|
|
273355
273137
|
}
|
|
273356
|
-
|
|
273138
|
+
useKeypress2(async (key, rl) => {
|
|
273357
273139
|
if (status !== "idle") {
|
|
273358
273140
|
return;
|
|
273359
273141
|
}
|
|
273360
|
-
if (
|
|
273142
|
+
if (isEnterKey2(key)) {
|
|
273361
273143
|
const answer = value4 || defaultValue;
|
|
273362
273144
|
setStatus("loading");
|
|
273363
|
-
const isValid = await
|
|
273145
|
+
const isValid = await validate3(answer);
|
|
273364
273146
|
if (isValid === true) {
|
|
273365
273147
|
setValue(answer);
|
|
273366
273148
|
setStatus("done");
|
|
@@ -273374,9 +273156,9 @@ var dist_default2 = createPrompt((config3, done) => {
|
|
|
273374
273156
|
setError(isValid);
|
|
273375
273157
|
setStatus("idle");
|
|
273376
273158
|
}
|
|
273377
|
-
} else if (
|
|
273159
|
+
} else if (isBackspaceKey2(key) && !value4) {
|
|
273378
273160
|
setDefaultValue(undefined);
|
|
273379
|
-
} else if (
|
|
273161
|
+
} else if (isTabKey2(key) && !value4) {
|
|
273380
273162
|
setDefaultValue(undefined);
|
|
273381
273163
|
rl.clearLine(0);
|
|
273382
273164
|
rl.write(defaultValue);
|
|
@@ -273386,7 +273168,7 @@ var dist_default2 = createPrompt((config3, done) => {
|
|
|
273386
273168
|
setError(undefined);
|
|
273387
273169
|
}
|
|
273388
273170
|
});
|
|
273389
|
-
|
|
273171
|
+
useEffect2((rl) => {
|
|
273390
273172
|
if (prefill === "editable" && defaultValue) {
|
|
273391
273173
|
rl.write(defaultValue);
|
|
273392
273174
|
setValue(defaultValue);
|
|
@@ -273423,7 +273205,7 @@ async function subgraphNamePrompt({
|
|
|
273423
273205
|
if (accept) {
|
|
273424
273206
|
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
|
273425
273207
|
}
|
|
273426
|
-
const subgraphName = await
|
|
273208
|
+
const subgraphName = await esm_default2({
|
|
273427
273209
|
message: "What is the name of your subgraph?",
|
|
273428
273210
|
default: defaultSubgraphName,
|
|
273429
273211
|
required: true
|
|
@@ -273431,562 +273213,14 @@ async function subgraphNamePrompt({
|
|
|
273431
273213
|
return sanitizeName(subgraphName);
|
|
273432
273214
|
}
|
|
273433
273215
|
|
|
273434
|
-
// ../../node_modules/.bun/@inquirer+
|
|
273435
|
-
var
|
|
273436
|
-
var isDownKey2 = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
|
|
273437
|
-
var isBackspaceKey2 = (key) => key.name === "backspace";
|
|
273438
|
-
var isTabKey2 = (key) => key.name === "tab";
|
|
273439
|
-
var isNumberKey2 = (key) => "1234567890".includes(key.name);
|
|
273440
|
-
var isEnterKey2 = (key) => key.name === "enter" || key.name === "return";
|
|
273441
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
273442
|
-
class AbortPromptError3 extends Error {
|
|
273443
|
-
name = "AbortPromptError";
|
|
273444
|
-
message = "Prompt was aborted";
|
|
273445
|
-
constructor(options) {
|
|
273446
|
-
super();
|
|
273447
|
-
this.cause = options?.cause;
|
|
273448
|
-
}
|
|
273449
|
-
}
|
|
273450
|
-
|
|
273451
|
-
class CancelPromptError3 extends Error {
|
|
273452
|
-
name = "CancelPromptError";
|
|
273453
|
-
message = "Prompt was canceled";
|
|
273454
|
-
}
|
|
273455
|
-
|
|
273456
|
-
class ExitPromptError3 extends Error {
|
|
273457
|
-
name = "ExitPromptError";
|
|
273458
|
-
}
|
|
273459
|
-
|
|
273460
|
-
class HookError2 extends Error {
|
|
273461
|
-
name = "HookError";
|
|
273462
|
-
}
|
|
273463
|
-
|
|
273464
|
-
class ValidationError3 extends Error {
|
|
273465
|
-
name = "ValidationError";
|
|
273466
|
-
}
|
|
273467
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
273468
|
-
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
|
273469
|
-
|
|
273470
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
273471
|
-
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
|
273472
|
-
var hookStorage2 = new AsyncLocalStorage2;
|
|
273473
|
-
function createStore2(rl) {
|
|
273474
|
-
const store = {
|
|
273475
|
-
rl,
|
|
273476
|
-
hooks: [],
|
|
273477
|
-
hooksCleanup: [],
|
|
273478
|
-
hooksEffect: [],
|
|
273479
|
-
index: 0,
|
|
273480
|
-
handleChange() {}
|
|
273481
|
-
};
|
|
273482
|
-
return store;
|
|
273483
|
-
}
|
|
273484
|
-
function withHooks2(rl, cb) {
|
|
273485
|
-
const store = createStore2(rl);
|
|
273486
|
-
return hookStorage2.run(store, () => {
|
|
273487
|
-
function cycle(render) {
|
|
273488
|
-
store.handleChange = () => {
|
|
273489
|
-
store.index = 0;
|
|
273490
|
-
render();
|
|
273491
|
-
};
|
|
273492
|
-
store.handleChange();
|
|
273493
|
-
}
|
|
273494
|
-
return cb(cycle);
|
|
273495
|
-
});
|
|
273496
|
-
}
|
|
273497
|
-
function getStore2() {
|
|
273498
|
-
const store = hookStorage2.getStore();
|
|
273499
|
-
if (!store) {
|
|
273500
|
-
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
|
273501
|
-
}
|
|
273502
|
-
return store;
|
|
273503
|
-
}
|
|
273504
|
-
function readline3() {
|
|
273505
|
-
return getStore2().rl;
|
|
273506
|
-
}
|
|
273507
|
-
function withUpdates2(fn) {
|
|
273508
|
-
const wrapped = (...args) => {
|
|
273509
|
-
const store = getStore2();
|
|
273510
|
-
let shouldUpdate = false;
|
|
273511
|
-
const oldHandleChange = store.handleChange;
|
|
273512
|
-
store.handleChange = () => {
|
|
273513
|
-
shouldUpdate = true;
|
|
273514
|
-
};
|
|
273515
|
-
const returnValue = fn(...args);
|
|
273516
|
-
if (shouldUpdate) {
|
|
273517
|
-
oldHandleChange();
|
|
273518
|
-
}
|
|
273519
|
-
store.handleChange = oldHandleChange;
|
|
273520
|
-
return returnValue;
|
|
273521
|
-
};
|
|
273522
|
-
return AsyncResource4.bind(wrapped);
|
|
273523
|
-
}
|
|
273524
|
-
function withPointer2(cb) {
|
|
273525
|
-
const store = getStore2();
|
|
273526
|
-
const { index } = store;
|
|
273527
|
-
const pointer = {
|
|
273528
|
-
get() {
|
|
273529
|
-
return store.hooks[index];
|
|
273530
|
-
},
|
|
273531
|
-
set(value4) {
|
|
273532
|
-
store.hooks[index] = value4;
|
|
273533
|
-
},
|
|
273534
|
-
initialized: index in store.hooks
|
|
273535
|
-
};
|
|
273536
|
-
const returnValue = cb(pointer);
|
|
273537
|
-
store.index++;
|
|
273538
|
-
return returnValue;
|
|
273539
|
-
}
|
|
273540
|
-
function handleChange2() {
|
|
273541
|
-
getStore2().handleChange();
|
|
273542
|
-
}
|
|
273543
|
-
var effectScheduler2 = {
|
|
273544
|
-
queue(cb) {
|
|
273545
|
-
const store = getStore2();
|
|
273546
|
-
const { index } = store;
|
|
273547
|
-
store.hooksEffect.push(() => {
|
|
273548
|
-
store.hooksCleanup[index]?.();
|
|
273549
|
-
const cleanFn = cb(readline3());
|
|
273550
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
|
273551
|
-
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
|
273552
|
-
}
|
|
273553
|
-
store.hooksCleanup[index] = cleanFn;
|
|
273554
|
-
});
|
|
273555
|
-
},
|
|
273556
|
-
run() {
|
|
273557
|
-
const store = getStore2();
|
|
273558
|
-
withUpdates2(() => {
|
|
273559
|
-
store.hooksEffect.forEach((effect) => {
|
|
273560
|
-
effect();
|
|
273561
|
-
});
|
|
273562
|
-
store.hooksEffect.length = 0;
|
|
273563
|
-
})();
|
|
273564
|
-
},
|
|
273565
|
-
clearAll() {
|
|
273566
|
-
const store = getStore2();
|
|
273567
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
|
273568
|
-
cleanFn?.();
|
|
273569
|
-
});
|
|
273570
|
-
store.hooksEffect.length = 0;
|
|
273571
|
-
store.hooksCleanup.length = 0;
|
|
273572
|
-
}
|
|
273573
|
-
};
|
|
273574
|
-
|
|
273575
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
273576
|
-
function useState2(defaultValue) {
|
|
273577
|
-
return withPointer2((pointer) => {
|
|
273578
|
-
const setState = AsyncResource5.bind(function setState(newValue) {
|
|
273579
|
-
if (pointer.get() !== newValue) {
|
|
273580
|
-
pointer.set(newValue);
|
|
273581
|
-
handleChange2();
|
|
273582
|
-
}
|
|
273583
|
-
});
|
|
273584
|
-
if (pointer.initialized) {
|
|
273585
|
-
return [pointer.get(), setState];
|
|
273586
|
-
}
|
|
273587
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
273588
|
-
pointer.set(value4);
|
|
273589
|
-
return [value4, setState];
|
|
273590
|
-
});
|
|
273591
|
-
}
|
|
273592
|
-
|
|
273593
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
273594
|
-
function useEffect2(cb, depArray) {
|
|
273595
|
-
withPointer2((pointer) => {
|
|
273596
|
-
const oldDeps = pointer.get();
|
|
273597
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i7) => !Object.is(dep, oldDeps[i7]));
|
|
273598
|
-
if (hasChanged) {
|
|
273599
|
-
effectScheduler2.queue(cb);
|
|
273600
|
-
}
|
|
273601
|
-
pointer.set(depArray);
|
|
273602
|
-
});
|
|
273603
|
-
}
|
|
273604
|
-
|
|
273605
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
273606
|
-
var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
|
|
273607
|
-
var defaultTheme2 = {
|
|
273608
|
-
prefix: {
|
|
273609
|
-
idle: import_yoctocolors_cjs.default.blue("?"),
|
|
273610
|
-
done: import_yoctocolors_cjs.default.green(esm_default.tick)
|
|
273611
|
-
},
|
|
273612
|
-
spinner: {
|
|
273613
|
-
interval: 80,
|
|
273614
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs.default.yellow(frame))
|
|
273615
|
-
},
|
|
273616
|
-
style: {
|
|
273617
|
-
answer: import_yoctocolors_cjs.default.cyan,
|
|
273618
|
-
message: import_yoctocolors_cjs.default.bold,
|
|
273619
|
-
error: (text2) => import_yoctocolors_cjs.default.red(`> ${text2}`),
|
|
273620
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs.default.dim(`(${text2})`),
|
|
273621
|
-
help: import_yoctocolors_cjs.default.dim,
|
|
273622
|
-
highlight: import_yoctocolors_cjs.default.cyan,
|
|
273623
|
-
key: (text2) => import_yoctocolors_cjs.default.cyan(import_yoctocolors_cjs.default.bold(`<${text2}>`))
|
|
273624
|
-
}
|
|
273625
|
-
};
|
|
273626
|
-
|
|
273627
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
273628
|
-
function isPlainObject4(value4) {
|
|
273629
|
-
if (typeof value4 !== "object" || value4 === null)
|
|
273630
|
-
return false;
|
|
273631
|
-
let proto = value4;
|
|
273632
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
|
273633
|
-
proto = Object.getPrototypeOf(proto);
|
|
273634
|
-
}
|
|
273635
|
-
return Object.getPrototypeOf(value4) === proto;
|
|
273636
|
-
}
|
|
273637
|
-
function deepMerge3(...objects) {
|
|
273638
|
-
const output = {};
|
|
273639
|
-
for (const obj of objects) {
|
|
273640
|
-
for (const [key, value4] of Object.entries(obj)) {
|
|
273641
|
-
const prevValue = output[key];
|
|
273642
|
-
output[key] = isPlainObject4(prevValue) && isPlainObject4(value4) ? deepMerge3(prevValue, value4) : value4;
|
|
273643
|
-
}
|
|
273644
|
-
}
|
|
273645
|
-
return output;
|
|
273646
|
-
}
|
|
273647
|
-
function makeTheme2(...themes) {
|
|
273648
|
-
const themesToMerge = [
|
|
273649
|
-
defaultTheme2,
|
|
273650
|
-
...themes.filter((theme) => theme != null)
|
|
273651
|
-
];
|
|
273652
|
-
return deepMerge3(...themesToMerge);
|
|
273653
|
-
}
|
|
273654
|
-
|
|
273655
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
273656
|
-
function usePrefix2({ status = "idle", theme }) {
|
|
273657
|
-
const [showLoader, setShowLoader] = useState2(false);
|
|
273658
|
-
const [tick, setTick] = useState2(0);
|
|
273659
|
-
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
|
273660
|
-
useEffect2(() => {
|
|
273661
|
-
if (status === "loading") {
|
|
273662
|
-
let tickInterval;
|
|
273663
|
-
let inc = -1;
|
|
273664
|
-
const delayTimeout = setTimeout(() => {
|
|
273665
|
-
setShowLoader(true);
|
|
273666
|
-
tickInterval = setInterval(() => {
|
|
273667
|
-
inc = inc + 1;
|
|
273668
|
-
setTick(inc % spinner2.frames.length);
|
|
273669
|
-
}, spinner2.interval);
|
|
273670
|
-
}, 300);
|
|
273671
|
-
return () => {
|
|
273672
|
-
clearTimeout(delayTimeout);
|
|
273673
|
-
clearInterval(tickInterval);
|
|
273674
|
-
};
|
|
273675
|
-
} else {
|
|
273676
|
-
setShowLoader(false);
|
|
273677
|
-
}
|
|
273678
|
-
}, [status]);
|
|
273679
|
-
if (showLoader) {
|
|
273680
|
-
return spinner2.frames[tick];
|
|
273681
|
-
}
|
|
273682
|
-
const iconName = status === "loading" ? "idle" : status;
|
|
273683
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
273684
|
-
}
|
|
273685
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
|
273686
|
-
function useMemo(fn, dependencies) {
|
|
273687
|
-
return withPointer2((pointer) => {
|
|
273688
|
-
const prev = pointer.get();
|
|
273689
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i7) => dep !== dependencies[i7])) {
|
|
273690
|
-
const value4 = fn();
|
|
273691
|
-
pointer.set({ value: value4, dependencies });
|
|
273692
|
-
return value4;
|
|
273693
|
-
}
|
|
273694
|
-
return prev.value;
|
|
273695
|
-
});
|
|
273696
|
-
}
|
|
273697
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
273698
|
-
function useRef2(val) {
|
|
273699
|
-
return useState2({ current: val })[0];
|
|
273700
|
-
}
|
|
273701
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
273702
|
-
function useKeypress2(userHandler) {
|
|
273703
|
-
const signal = useRef2(userHandler);
|
|
273704
|
-
signal.current = userHandler;
|
|
273705
|
-
useEffect2((rl) => {
|
|
273706
|
-
let ignore = false;
|
|
273707
|
-
const handler = withUpdates2((_input, event) => {
|
|
273708
|
-
if (ignore)
|
|
273709
|
-
return;
|
|
273710
|
-
signal.current(event, rl);
|
|
273711
|
-
});
|
|
273712
|
-
rl.input.on("keypress", handler);
|
|
273713
|
-
return () => {
|
|
273714
|
-
ignore = true;
|
|
273715
|
-
rl.input.removeListener("keypress", handler);
|
|
273716
|
-
};
|
|
273717
|
-
}, []);
|
|
273718
|
-
}
|
|
273719
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
273720
|
-
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
|
273721
|
-
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
|
273722
|
-
function breakLines2(content, width) {
|
|
273723
|
-
return content.split(`
|
|
273724
|
-
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
|
273725
|
-
`).map((str) => str.trimEnd())).join(`
|
|
273726
|
-
`);
|
|
273727
|
-
}
|
|
273728
|
-
function readlineWidth2() {
|
|
273729
|
-
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
|
273730
|
-
}
|
|
273731
|
-
|
|
273732
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
|
273733
|
-
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
|
273734
|
-
const state = useRef2({
|
|
273735
|
-
lastPointer: active,
|
|
273736
|
-
lastActive: undefined
|
|
273737
|
-
});
|
|
273738
|
-
const { lastPointer, lastActive } = state.current;
|
|
273739
|
-
const middle = Math.floor(pageSize / 2);
|
|
273740
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
|
273741
|
-
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
|
273742
|
-
let pointer = defaultPointerPosition;
|
|
273743
|
-
if (renderedLength > pageSize) {
|
|
273744
|
-
if (loop) {
|
|
273745
|
-
pointer = lastPointer;
|
|
273746
|
-
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
|
273747
|
-
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
|
273748
|
-
}
|
|
273749
|
-
} else {
|
|
273750
|
-
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
|
273751
|
-
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
|
273752
|
-
}
|
|
273753
|
-
}
|
|
273754
|
-
state.current.lastPointer = pointer;
|
|
273755
|
-
state.current.lastActive = active;
|
|
273756
|
-
return pointer;
|
|
273757
|
-
}
|
|
273758
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
273759
|
-
const width = readlineWidth2();
|
|
273760
|
-
const bound = (num) => (num % items.length + items.length) % items.length;
|
|
273761
|
-
const renderedItems = items.map((item, index) => {
|
|
273762
|
-
if (item == null)
|
|
273763
|
-
return [];
|
|
273764
|
-
return breakLines2(renderItem({ item, index, isActive: index === active }), width).split(`
|
|
273765
|
-
`);
|
|
273766
|
-
});
|
|
273767
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
|
273768
|
-
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
|
273769
|
-
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
|
273770
|
-
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
|
273771
|
-
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
|
273772
|
-
const pageBuffer = Array.from({ length: pageSize });
|
|
273773
|
-
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
|
273774
|
-
const itemVisited = new Set([active]);
|
|
273775
|
-
let bufferPointer = activeItemPosition + activeItem.length;
|
|
273776
|
-
let itemPointer = bound(active + 1);
|
|
273777
|
-
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
|
273778
|
-
const lines = renderItemAtIndex(itemPointer);
|
|
273779
|
-
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
|
273780
|
-
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
|
273781
|
-
itemVisited.add(itemPointer);
|
|
273782
|
-
bufferPointer += linesToAdd.length;
|
|
273783
|
-
itemPointer = bound(itemPointer + 1);
|
|
273784
|
-
}
|
|
273785
|
-
bufferPointer = activeItemPosition - 1;
|
|
273786
|
-
itemPointer = bound(active - 1);
|
|
273787
|
-
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
|
273788
|
-
const lines = renderItemAtIndex(itemPointer);
|
|
273789
|
-
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
|
273790
|
-
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
|
273791
|
-
itemVisited.add(itemPointer);
|
|
273792
|
-
bufferPointer -= linesToAdd.length;
|
|
273793
|
-
itemPointer = bound(itemPointer - 1);
|
|
273794
|
-
}
|
|
273795
|
-
return pageBuffer.filter((line) => typeof line === "string").join(`
|
|
273796
|
-
`);
|
|
273797
|
-
}
|
|
273798
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
273799
|
-
var import_mute_stream2 = __toESM(require_lib13(), 1);
|
|
273800
|
-
import * as readline4 from "node:readline";
|
|
273801
|
-
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
|
273802
|
-
|
|
273803
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
273804
|
-
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
|
273805
|
-
var height2 = (content) => content.split(`
|
|
273806
|
-
`).length;
|
|
273807
|
-
var lastLine2 = (content) => content.split(`
|
|
273808
|
-
`).pop() ?? "";
|
|
273809
|
-
|
|
273810
|
-
class ScreenManager2 {
|
|
273811
|
-
height = 0;
|
|
273812
|
-
extraLinesUnderPrompt = 0;
|
|
273813
|
-
cursorPos;
|
|
273814
|
-
rl;
|
|
273815
|
-
constructor(rl) {
|
|
273816
|
-
this.rl = rl;
|
|
273817
|
-
this.cursorPos = rl.getCursorPos();
|
|
273818
|
-
}
|
|
273819
|
-
write(content) {
|
|
273820
|
-
this.rl.output.unmute();
|
|
273821
|
-
this.rl.output.write(content);
|
|
273822
|
-
this.rl.output.mute();
|
|
273823
|
-
}
|
|
273824
|
-
render(content, bottomContent = "") {
|
|
273825
|
-
const promptLine = lastLine2(content);
|
|
273826
|
-
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
|
273827
|
-
let prompt = rawPromptLine;
|
|
273828
|
-
if (this.rl.line.length > 0) {
|
|
273829
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
|
273830
|
-
}
|
|
273831
|
-
this.rl.setPrompt(prompt);
|
|
273832
|
-
this.cursorPos = this.rl.getCursorPos();
|
|
273833
|
-
const width = readlineWidth2();
|
|
273834
|
-
content = breakLines2(content, width);
|
|
273835
|
-
bottomContent = breakLines2(bottomContent, width);
|
|
273836
|
-
if (rawPromptLine.length % width === 0) {
|
|
273837
|
-
content += `
|
|
273838
|
-
`;
|
|
273839
|
-
}
|
|
273840
|
-
let output = content + (bottomContent ? `
|
|
273841
|
-
` + bottomContent : "");
|
|
273842
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
|
273843
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
|
273844
|
-
if (bottomContentHeight > 0)
|
|
273845
|
-
output += cursorUp(bottomContentHeight);
|
|
273846
|
-
output += cursorTo(this.cursorPos.cols);
|
|
273847
|
-
this.write(cursorDown(this.extraLinesUnderPrompt) + eraseLines(this.height) + output);
|
|
273848
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
|
273849
|
-
this.height = height2(output);
|
|
273850
|
-
}
|
|
273851
|
-
checkCursorPos() {
|
|
273852
|
-
const cursorPos = this.rl.getCursorPos();
|
|
273853
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
|
273854
|
-
this.write(cursorTo(cursorPos.cols));
|
|
273855
|
-
this.cursorPos = cursorPos;
|
|
273856
|
-
}
|
|
273857
|
-
}
|
|
273858
|
-
done({ clearContent }) {
|
|
273859
|
-
this.rl.setPrompt("");
|
|
273860
|
-
let output = cursorDown(this.extraLinesUnderPrompt);
|
|
273861
|
-
output += clearContent ? eraseLines(this.height) : `
|
|
273862
|
-
`;
|
|
273863
|
-
output += cursorShow;
|
|
273864
|
-
this.write(output);
|
|
273865
|
-
this.rl.close();
|
|
273866
|
-
}
|
|
273867
|
-
}
|
|
273868
|
-
|
|
273869
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
273870
|
-
class PromisePolyfill2 extends Promise {
|
|
273871
|
-
static withResolver() {
|
|
273872
|
-
let resolve6;
|
|
273873
|
-
let reject;
|
|
273874
|
-
const promise2 = new Promise((res, rej) => {
|
|
273875
|
-
resolve6 = res;
|
|
273876
|
-
reject = rej;
|
|
273877
|
-
});
|
|
273878
|
-
return { promise: promise2, resolve: resolve6, reject };
|
|
273879
|
-
}
|
|
273880
|
-
}
|
|
273881
|
-
|
|
273882
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
273883
|
-
function getCallSites2() {
|
|
273884
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
|
273885
|
-
let result = [];
|
|
273886
|
-
try {
|
|
273887
|
-
Error.prepareStackTrace = (_6, callSites) => {
|
|
273888
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
|
273889
|
-
result = callSitesWithoutCurrent;
|
|
273890
|
-
return callSitesWithoutCurrent;
|
|
273891
|
-
};
|
|
273892
|
-
new Error().stack;
|
|
273893
|
-
} catch {
|
|
273894
|
-
return result;
|
|
273895
|
-
}
|
|
273896
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
|
273897
|
-
return result;
|
|
273898
|
-
}
|
|
273899
|
-
function createPrompt2(view) {
|
|
273900
|
-
const callSites = getCallSites2();
|
|
273901
|
-
const prompt = (config3, context = {}) => {
|
|
273902
|
-
const { input = process.stdin, signal } = context;
|
|
273903
|
-
const cleanups = new Set;
|
|
273904
|
-
const output = new import_mute_stream2.default;
|
|
273905
|
-
output.pipe(context.output ?? process.stdout);
|
|
273906
|
-
const rl = readline4.createInterface({
|
|
273907
|
-
terminal: true,
|
|
273908
|
-
input,
|
|
273909
|
-
output
|
|
273910
|
-
});
|
|
273911
|
-
const screen = new ScreenManager2(rl);
|
|
273912
|
-
const { promise: promise2, resolve: resolve6, reject } = PromisePolyfill2.withResolver();
|
|
273913
|
-
const cancel3 = () => reject(new CancelPromptError3);
|
|
273914
|
-
if (signal) {
|
|
273915
|
-
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
|
273916
|
-
if (signal.aborted) {
|
|
273917
|
-
abort();
|
|
273918
|
-
return Object.assign(promise2, { cancel: cancel3 });
|
|
273919
|
-
}
|
|
273920
|
-
signal.addEventListener("abort", abort);
|
|
273921
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
|
273922
|
-
}
|
|
273923
|
-
cleanups.add(onExit((code2, signal2) => {
|
|
273924
|
-
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
|
273925
|
-
}));
|
|
273926
|
-
const sigint = () => reject(new ExitPromptError3(`User force closed the prompt with SIGINT`));
|
|
273927
|
-
rl.on("SIGINT", sigint);
|
|
273928
|
-
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
|
273929
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
|
273930
|
-
rl.input.on("keypress", checkCursorPos);
|
|
273931
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
273932
|
-
return withHooks2(rl, (cycle) => {
|
|
273933
|
-
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
|
273934
|
-
rl.on("close", hooksCleanup);
|
|
273935
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
|
273936
|
-
cycle(() => {
|
|
273937
|
-
try {
|
|
273938
|
-
const nextView = view(config3, (value4) => {
|
|
273939
|
-
setImmediate(() => resolve6(value4));
|
|
273940
|
-
});
|
|
273941
|
-
if (nextView === undefined) {
|
|
273942
|
-
const callerFilename = callSites[1]?.getFileName();
|
|
273943
|
-
throw new Error(`Prompt functions must return a string.
|
|
273944
|
-
at ${callerFilename}`);
|
|
273945
|
-
}
|
|
273946
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
273947
|
-
screen.render(content, bottomContent);
|
|
273948
|
-
effectScheduler2.run();
|
|
273949
|
-
} catch (error50) {
|
|
273950
|
-
reject(error50);
|
|
273951
|
-
}
|
|
273952
|
-
});
|
|
273953
|
-
return Object.assign(promise2.then((answer) => {
|
|
273954
|
-
effectScheduler2.clearAll();
|
|
273955
|
-
return answer;
|
|
273956
|
-
}, (error50) => {
|
|
273957
|
-
effectScheduler2.clearAll();
|
|
273958
|
-
throw error50;
|
|
273959
|
-
}).finally(() => {
|
|
273960
|
-
cleanups.forEach((cleanup) => cleanup());
|
|
273961
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
273962
|
-
output.end();
|
|
273963
|
-
}).then(() => promise2), { cancel: cancel3 });
|
|
273964
|
-
});
|
|
273965
|
-
};
|
|
273966
|
-
return prompt;
|
|
273967
|
-
}
|
|
273968
|
-
// ../../node_modules/.bun/@inquirer+core@10.3.2+4cbbb20073436eb8/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
|
273969
|
-
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
|
273970
|
-
class Separator {
|
|
273971
|
-
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
|
273972
|
-
type = "separator";
|
|
273973
|
-
constructor(separator) {
|
|
273974
|
-
if (separator) {
|
|
273975
|
-
this.separator = separator;
|
|
273976
|
-
}
|
|
273977
|
-
}
|
|
273978
|
-
static isSeparator(choice) {
|
|
273979
|
-
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
|
273980
|
-
}
|
|
273981
|
-
}
|
|
273982
|
-
// ../../node_modules/.bun/@inquirer+select@4.4.2+4cbbb20073436eb8/node_modules/@inquirer/select/dist/esm/index.js
|
|
273983
|
-
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
|
273216
|
+
// ../../node_modules/.bun/@inquirer+select@4.4.0+4cbbb20073436eb8/node_modules/@inquirer/select/dist/esm/index.js
|
|
273217
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
|
273984
273218
|
var selectTheme = {
|
|
273985
273219
|
icon: { cursor: esm_default.pointer },
|
|
273986
273220
|
style: {
|
|
273987
|
-
disabled: (text2) =>
|
|
273988
|
-
description: (text2) =>
|
|
273989
|
-
keysHelpTip: (keys) => keys.map(([key, action]) => `${
|
|
273221
|
+
disabled: (text2) => import_yoctocolors_cjs4.default.dim(`- ${text2}`),
|
|
273222
|
+
description: (text2) => import_yoctocolors_cjs4.default.cyan(text2),
|
|
273223
|
+
keysHelpTip: (keys) => keys.map(([key, action]) => `${import_yoctocolors_cjs4.default.bold(key)} ${import_yoctocolors_cjs4.default.dim(action)}`).join(import_yoctocolors_cjs4.default.dim(" • "))
|
|
273990
273224
|
},
|
|
273991
273225
|
helpMode: "always",
|
|
273992
273226
|
indexMode: "hidden",
|
|
@@ -274020,20 +273254,20 @@ function normalizeChoices(choices) {
|
|
|
274020
273254
|
return normalizedChoice;
|
|
274021
273255
|
});
|
|
274022
273256
|
}
|
|
274023
|
-
var
|
|
273257
|
+
var esm_default3 = createPrompt((config3, done) => {
|
|
274024
273258
|
const { loop = true, pageSize = 7 } = config3;
|
|
274025
|
-
const theme =
|
|
273259
|
+
const theme = makeTheme(selectTheme, config3.theme);
|
|
274026
273260
|
const { keybindings } = theme;
|
|
274027
|
-
const [status, setStatus] =
|
|
274028
|
-
const prefix =
|
|
274029
|
-
const searchTimeoutRef =
|
|
273261
|
+
const [status, setStatus] = useState("idle");
|
|
273262
|
+
const prefix = usePrefix({ status, theme });
|
|
273263
|
+
const searchTimeoutRef = useRef();
|
|
274030
273264
|
const searchEnabled = !keybindings.includes("vim");
|
|
274031
273265
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
|
274032
273266
|
const bounds = useMemo(() => {
|
|
274033
273267
|
const first = items.findIndex(isSelectable);
|
|
274034
273268
|
const last = items.findLastIndex(isSelectable);
|
|
274035
273269
|
if (first === -1) {
|
|
274036
|
-
throw new
|
|
273270
|
+
throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
|
|
274037
273271
|
}
|
|
274038
273272
|
return { first, last };
|
|
274039
273273
|
}, [items]);
|
|
@@ -274042,24 +273276,24 @@ var esm_default2 = createPrompt2((config3, done) => {
|
|
|
274042
273276
|
return -1;
|
|
274043
273277
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
|
274044
273278
|
}, [config3.default, items]);
|
|
274045
|
-
const [active, setActive] =
|
|
273279
|
+
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
|
274046
273280
|
const selectedChoice = items[active];
|
|
274047
|
-
|
|
273281
|
+
useKeypress((key, rl) => {
|
|
274048
273282
|
clearTimeout(searchTimeoutRef.current);
|
|
274049
|
-
if (
|
|
273283
|
+
if (isEnterKey(key)) {
|
|
274050
273284
|
setStatus("done");
|
|
274051
273285
|
done(selectedChoice.value);
|
|
274052
|
-
} else if (
|
|
273286
|
+
} else if (isUpKey(key, keybindings) || isDownKey(key, keybindings)) {
|
|
274053
273287
|
rl.clearLine(0);
|
|
274054
|
-
if (loop ||
|
|
274055
|
-
const offset =
|
|
273288
|
+
if (loop || isUpKey(key, keybindings) && active !== bounds.first || isDownKey(key, keybindings) && active !== bounds.last) {
|
|
273289
|
+
const offset = isUpKey(key, keybindings) ? -1 : 1;
|
|
274056
273290
|
let next = active;
|
|
274057
273291
|
do {
|
|
274058
273292
|
next = (next + offset + items.length) % items.length;
|
|
274059
273293
|
} while (!isSelectable(items[next]));
|
|
274060
273294
|
setActive(next);
|
|
274061
273295
|
}
|
|
274062
|
-
} else if (
|
|
273296
|
+
} else if (isNumberKey(key) && !Number.isNaN(Number(rl.line))) {
|
|
274063
273297
|
const selectedIndex = Number(rl.line) - 1;
|
|
274064
273298
|
let selectableIndex = -1;
|
|
274065
273299
|
const position = items.findIndex((item2) => {
|
|
@@ -274075,7 +273309,7 @@ var esm_default2 = createPrompt2((config3, done) => {
|
|
|
274075
273309
|
searchTimeoutRef.current = setTimeout(() => {
|
|
274076
273310
|
rl.clearLine(0);
|
|
274077
273311
|
}, 700);
|
|
274078
|
-
} else if (
|
|
273312
|
+
} else if (isBackspaceKey(key)) {
|
|
274079
273313
|
rl.clearLine(0);
|
|
274080
273314
|
} else if (searchEnabled) {
|
|
274081
273315
|
const searchTerm = rl.line.toLowerCase();
|
|
@@ -274092,7 +273326,7 @@ var esm_default2 = createPrompt2((config3, done) => {
|
|
|
274092
273326
|
}, 700);
|
|
274093
273327
|
}
|
|
274094
273328
|
});
|
|
274095
|
-
|
|
273329
|
+
useEffect(() => () => {
|
|
274096
273330
|
clearTimeout(searchTimeoutRef.current);
|
|
274097
273331
|
}, []);
|
|
274098
273332
|
const message = theme.style.message(config3.message, status);
|
|
@@ -274195,7 +273429,7 @@ async function subgraphPrompt({
|
|
|
274195
273429
|
} else {
|
|
274196
273430
|
defaultChoice = env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH ?? subgraphNames[0];
|
|
274197
273431
|
}
|
|
274198
|
-
const subgraphName = choices.length === 1 && choices[0] === NEW ? NEW : await
|
|
273432
|
+
const subgraphName = choices.length === 1 && choices[0] === NEW ? NEW : await esm_default3({
|
|
274199
273433
|
message,
|
|
274200
273434
|
choices: choices.map((name3) => ({
|
|
274201
273435
|
name: name3,
|
|
@@ -278098,7 +277332,7 @@ function encodeField({ types: types2, name: name3, type: type4, value: value4 })
|
|
|
278098
277332
|
var exports_SignatureErc8010 = {};
|
|
278099
277333
|
__export(exports_SignatureErc8010, {
|
|
278100
277334
|
wrap: () => wrap,
|
|
278101
|
-
validate: () =>
|
|
277335
|
+
validate: () => validate6,
|
|
278102
277336
|
unwrap: () => unwrap,
|
|
278103
277337
|
suffixParameters: () => suffixParameters,
|
|
278104
277338
|
magicBytes: () => magicBytes,
|
|
@@ -278192,9 +277426,9 @@ function assert4(publicKey, options = {}) {
|
|
|
278192
277426
|
}
|
|
278193
277427
|
function from3(value4) {
|
|
278194
277428
|
const publicKey = (() => {
|
|
278195
|
-
if (validate5(value4))
|
|
278196
|
-
return fromHex2(value4);
|
|
278197
277429
|
if (validate4(value4))
|
|
277430
|
+
return fromHex2(value4);
|
|
277431
|
+
if (validate3(value4))
|
|
278198
277432
|
return fromBytes2(value4);
|
|
278199
277433
|
const { prefix, x: x6, y: y5 } = value4;
|
|
278200
277434
|
if (typeof x6 === "bigint" && typeof y5 === "bigint")
|
|
@@ -278365,7 +277599,7 @@ function fromPublicKey(publicKey, options = {}) {
|
|
|
278365
277599
|
const address = keccak2562(`0x${toHex2(publicKey).slice(4)}`).substring(26);
|
|
278366
277600
|
return from4(`0x${address}`, options);
|
|
278367
277601
|
}
|
|
278368
|
-
function
|
|
277602
|
+
function validate5(address, options = {}) {
|
|
278369
277603
|
const { strict = true } = options ?? {};
|
|
278370
277604
|
try {
|
|
278371
277605
|
assert5(address, { strict });
|
|
@@ -279726,7 +278960,7 @@ function wrap(value4) {
|
|
|
279726
278960
|
const suffixLength = fromNumber(size3(suffix), { size: 32 });
|
|
279727
278961
|
return concat3(signature, suffix, suffixLength, magicBytes);
|
|
279728
278962
|
}
|
|
279729
|
-
function
|
|
278963
|
+
function validate6(value4) {
|
|
279730
278964
|
try {
|
|
279731
278965
|
assert7(value4);
|
|
279732
278966
|
return true;
|
|
@@ -280133,7 +279367,7 @@ function isArgOfType2(arg, abiParameter) {
|
|
|
280133
279367
|
const abiParameterType = abiParameter.type;
|
|
280134
279368
|
switch (abiParameterType) {
|
|
280135
279369
|
case "address":
|
|
280136
|
-
return
|
|
279370
|
+
return validate5(arg, { strict: false });
|
|
280137
279371
|
case "bool":
|
|
280138
279372
|
return argType === "boolean";
|
|
280139
279373
|
case "function":
|
|
@@ -280170,11 +279404,11 @@ function getAmbiguousTypes2(sourceParameters, targetParameters, args) {
|
|
|
280170
279404
|
if (types2.includes("address") && types2.includes("bytes20"))
|
|
280171
279405
|
return true;
|
|
280172
279406
|
if (types2.includes("address") && types2.includes("string"))
|
|
280173
|
-
return
|
|
279407
|
+
return validate5(args[parameterIndex], {
|
|
280174
279408
|
strict: false
|
|
280175
279409
|
});
|
|
280176
279410
|
if (types2.includes("address") && types2.includes("bytes"))
|
|
280177
|
-
return
|
|
279411
|
+
return validate5(args[parameterIndex], {
|
|
280178
279412
|
strict: false
|
|
280179
279413
|
});
|
|
280180
279414
|
return false;
|
|
@@ -280202,7 +279436,7 @@ function from10(abiItem, options = {}) {
|
|
|
280202
279436
|
}
|
|
280203
279437
|
function fromAbi(abi2, name3, options) {
|
|
280204
279438
|
const { args = [], prepare = true } = options ?? {};
|
|
280205
|
-
const isSelector =
|
|
279439
|
+
const isSelector = validate4(name3, { strict: false });
|
|
280206
279440
|
const abiItems = abi2.filter((abiItem2) => {
|
|
280207
279441
|
if (isSelector) {
|
|
280208
279442
|
if (abiItem2.type === "function" || abiItem2.type === "error")
|
|
@@ -280603,7 +279837,7 @@ async function simulateCalls(client, parameters) {
|
|
|
280603
279837
|
var exports_SignatureErc6492 = {};
|
|
280604
279838
|
__export(exports_SignatureErc6492, {
|
|
280605
279839
|
wrap: () => wrap2,
|
|
280606
|
-
validate: () =>
|
|
279840
|
+
validate: () => validate7,
|
|
280607
279841
|
unwrap: () => unwrap2,
|
|
280608
279842
|
universalSignatureValidatorBytecode: () => universalSignatureValidatorBytecode,
|
|
280609
279843
|
universalSignatureValidatorAbi: () => universalSignatureValidatorAbi,
|
|
@@ -280682,7 +279916,7 @@ function wrap2(value4) {
|
|
|
280682
279916
|
signature
|
|
280683
279917
|
]), magicBytes2);
|
|
280684
279918
|
}
|
|
280685
|
-
function
|
|
279919
|
+
function validate7(wrapped) {
|
|
280686
279920
|
try {
|
|
280687
279921
|
assert8(wrapped);
|
|
280688
279922
|
return true;
|
|
@@ -299779,7 +299013,7 @@ function extractInfoFromBody(body) {
|
|
|
299779
299013
|
}
|
|
299780
299014
|
}
|
|
299781
299015
|
|
|
299782
|
-
// ../../node_modules/.bun/@inquirer+confirm@5.1.
|
|
299016
|
+
// ../../node_modules/.bun/@inquirer+confirm@5.1.20+4cbbb20073436eb8/node_modules/@inquirer/confirm/dist/esm/index.js
|
|
299783
299017
|
function getBooleanValue(value4, defaultValue) {
|
|
299784
299018
|
let answer = defaultValue !== false;
|
|
299785
299019
|
if (/^(y|yes)/i.test(value4))
|
|
@@ -299791,21 +299025,21 @@ function getBooleanValue(value4, defaultValue) {
|
|
|
299791
299025
|
function boolToString(value4) {
|
|
299792
299026
|
return value4 ? "Yes" : "No";
|
|
299793
299027
|
}
|
|
299794
|
-
var
|
|
299028
|
+
var esm_default4 = createPrompt((config3, done) => {
|
|
299795
299029
|
const { transformer = boolToString } = config3;
|
|
299796
|
-
const [status, setStatus] =
|
|
299797
|
-
const [value4, setValue] =
|
|
299798
|
-
const theme =
|
|
299799
|
-
const prefix =
|
|
299800
|
-
|
|
299030
|
+
const [status, setStatus] = useState("idle");
|
|
299031
|
+
const [value4, setValue] = useState("");
|
|
299032
|
+
const theme = makeTheme(config3.theme);
|
|
299033
|
+
const prefix = usePrefix({ status, theme });
|
|
299034
|
+
useKeypress((key, rl) => {
|
|
299801
299035
|
if (status !== "idle")
|
|
299802
299036
|
return;
|
|
299803
|
-
if (
|
|
299037
|
+
if (isEnterKey(key)) {
|
|
299804
299038
|
const answer = getBooleanValue(value4, config3.default);
|
|
299805
299039
|
setValue(transformer(answer));
|
|
299806
299040
|
setStatus("done");
|
|
299807
299041
|
done(answer);
|
|
299808
|
-
} else if (
|
|
299042
|
+
} else if (isTabKey(key)) {
|
|
299809
299043
|
const answer = boolToString(!getBooleanValue(value4, config3.default));
|
|
299810
299044
|
rl.clearLine(0);
|
|
299811
299045
|
rl.write(answer);
|
|
@@ -299826,8 +299060,8 @@ var esm_default3 = createPrompt2((config3, done) => {
|
|
|
299826
299060
|
});
|
|
299827
299061
|
|
|
299828
299062
|
// ../../node_modules/.bun/@inquirer+password@4.0.23+4cbbb20073436eb8/node_modules/@inquirer/password/dist/esm/index.js
|
|
299829
|
-
var
|
|
299830
|
-
const { validate:
|
|
299063
|
+
var esm_default5 = createPrompt2((config3, done) => {
|
|
299064
|
+
const { validate: validate8 = () => true } = config3;
|
|
299831
299065
|
const theme = makeTheme2(config3.theme);
|
|
299832
299066
|
const [status, setStatus] = useState2("idle");
|
|
299833
299067
|
const [errorMsg, setError] = useState2();
|
|
@@ -299840,7 +299074,7 @@ var esm_default4 = createPrompt2((config3, done) => {
|
|
|
299840
299074
|
if (isEnterKey2(key)) {
|
|
299841
299075
|
const answer = value4;
|
|
299842
299076
|
setStatus("loading");
|
|
299843
|
-
const isValid = await
|
|
299077
|
+
const isValid = await validate8(answer);
|
|
299844
299078
|
if (isValid === true) {
|
|
299845
299079
|
setValue(answer);
|
|
299846
299080
|
setStatus("done");
|
|
@@ -299884,7 +299118,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
|
299884
299118
|
return defaultAccessToken;
|
|
299885
299119
|
}
|
|
299886
299120
|
if (defaultAccessToken) {
|
|
299887
|
-
const keep = await
|
|
299121
|
+
const keep = await esm_default4({
|
|
299888
299122
|
message: "Do you want to use the existing application access token?",
|
|
299889
299123
|
default: true
|
|
299890
299124
|
});
|
|
@@ -299892,12 +299126,12 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
|
299892
299126
|
return defaultAccessToken;
|
|
299893
299127
|
}
|
|
299894
299128
|
}
|
|
299895
|
-
const create3 = await
|
|
299129
|
+
const create3 = await esm_default4({
|
|
299896
299130
|
message: "Do you want to create a new application access token?",
|
|
299897
299131
|
default: false
|
|
299898
299132
|
});
|
|
299899
299133
|
if (create3) {
|
|
299900
|
-
const name3 = await
|
|
299134
|
+
const name3 = await esm_default2({
|
|
299901
299135
|
message: "How would you like to name this application access token?",
|
|
299902
299136
|
default: `SettleMint CLI (${Date.now()}${process.env.USER ? ` ${process.env.USER}` : ""})`,
|
|
299903
299137
|
required: true,
|
|
@@ -299960,7 +299194,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
|
299960
299194
|
return aat;
|
|
299961
299195
|
} catch (_error) {}
|
|
299962
299196
|
}
|
|
299963
|
-
return
|
|
299197
|
+
return esm_default5({
|
|
299964
299198
|
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
|
299965
299199
|
validate(value4) {
|
|
299966
299200
|
try {
|
|
@@ -299992,7 +299226,7 @@ async function applicationPrompt(env2, applications, accept) {
|
|
|
299992
299226
|
if (is_in_ci_default) {
|
|
299993
299227
|
nothingSelectedError("application");
|
|
299994
299228
|
}
|
|
299995
|
-
const application = await
|
|
299229
|
+
const application = await esm_default3({
|
|
299996
299230
|
message: "Which application do you want to connect to?",
|
|
299997
299231
|
choices: applications.map((applications2) => ({
|
|
299998
299232
|
name: `${applications2.name} (${applications2.uniqueName})`,
|
|
@@ -300105,7 +299339,7 @@ async function blockchainNodePrompt({
|
|
|
300105
299339
|
}
|
|
300106
299340
|
return item;
|
|
300107
299341
|
}) : choices;
|
|
300108
|
-
return
|
|
299342
|
+
return esm_default3({
|
|
300109
299343
|
message: promptMessage ?? "Which blockchain node do you want to connect to?",
|
|
300110
299344
|
choices: filteredChoices,
|
|
300111
299345
|
default: defaultNode
|
|
@@ -300135,7 +299369,7 @@ async function blockchainNodeOrLoadBalancerPrompt({
|
|
|
300135
299369
|
isRequired,
|
|
300136
299370
|
defaultHandler: async ({ defaultService: defaultNode, choices }) => {
|
|
300137
299371
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => isRunning(node)) : choices;
|
|
300138
|
-
return
|
|
299372
|
+
return esm_default3({
|
|
300139
299373
|
message: promptMessage ?? "Which blockchain node or load balancer do you want to connect to?",
|
|
300140
299374
|
choices: filteredChoices,
|
|
300141
299375
|
default: defaultNode
|
|
@@ -300160,7 +299394,7 @@ async function blockscoutPrompt({
|
|
|
300160
299394
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
|
300161
299395
|
isRequired,
|
|
300162
299396
|
defaultHandler: async ({ defaultService: defaultBlockscout, choices }) => {
|
|
300163
|
-
return
|
|
299397
|
+
return esm_default3({
|
|
300164
299398
|
message: "Which blockscout instance do you want to connect to?",
|
|
300165
299399
|
choices,
|
|
300166
299400
|
default: defaultBlockscout
|
|
@@ -300183,7 +299417,7 @@ async function customDeploymentPrompt({
|
|
|
300183
299417
|
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
|
300184
299418
|
isRequired,
|
|
300185
299419
|
defaultHandler: async ({ defaultService: defaultCustomDeployment, choices }) => {
|
|
300186
|
-
return
|
|
299420
|
+
return esm_default3({
|
|
300187
299421
|
message: "Which Custom Deployment do you want to connect to?",
|
|
300188
299422
|
choices,
|
|
300189
299423
|
default: defaultCustomDeployment
|
|
@@ -300210,7 +299444,7 @@ async function hasuraPrompt({
|
|
|
300210
299444
|
envKey: "SETTLEMINT_HASURA",
|
|
300211
299445
|
isRequired,
|
|
300212
299446
|
defaultHandler: async ({ defaultService: defaultHasura, choices }) => {
|
|
300213
|
-
return
|
|
299447
|
+
return esm_default3({
|
|
300214
299448
|
message: "Which Hasura instance do you want to connect to?",
|
|
300215
299449
|
choices,
|
|
300216
299450
|
default: defaultHasura
|
|
@@ -300234,7 +299468,7 @@ async function hdPrivateKeyPrompt({
|
|
|
300234
299468
|
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
|
300235
299469
|
isRequired,
|
|
300236
299470
|
defaultHandler: async ({ defaultService: defaultPrivateKey, choices }) => {
|
|
300237
|
-
return
|
|
299471
|
+
return esm_default3({
|
|
300238
299472
|
message: "Which HD Private Key do you want to use?",
|
|
300239
299473
|
choices,
|
|
300240
299474
|
default: defaultPrivateKey
|
|
@@ -300258,7 +299492,7 @@ async function ipfsPrompt({
|
|
|
300258
299492
|
envKey: "SETTLEMINT_IPFS",
|
|
300259
299493
|
isRequired,
|
|
300260
299494
|
defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
|
|
300261
|
-
return
|
|
299495
|
+
return esm_default3({
|
|
300262
299496
|
message: "Which IPFS instance do you want to connect to?",
|
|
300263
299497
|
choices,
|
|
300264
299498
|
default: defaultStorage
|
|
@@ -300282,7 +299516,7 @@ async function minioPrompt({
|
|
|
300282
299516
|
envKey: "SETTLEMINT_MINIO",
|
|
300283
299517
|
isRequired,
|
|
300284
299518
|
defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
|
|
300285
|
-
return
|
|
299519
|
+
return esm_default3({
|
|
300286
299520
|
message: "Which MinIO instance do you want to connect to?",
|
|
300287
299521
|
choices,
|
|
300288
299522
|
default: defaultStorage
|
|
@@ -300306,7 +299540,7 @@ async function portalPrompt({
|
|
|
300306
299540
|
envKey: "SETTLEMINT_PORTAL",
|
|
300307
299541
|
isRequired,
|
|
300308
299542
|
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
|
300309
|
-
return
|
|
299543
|
+
return esm_default3({
|
|
300310
299544
|
message: "Which Smart Contract Portal instance do you want to connect to?",
|
|
300311
299545
|
choices,
|
|
300312
299546
|
default: defaultMiddleware
|
|
@@ -300335,7 +299569,7 @@ async function theGraphPrompt({
|
|
|
300335
299569
|
isRequired,
|
|
300336
299570
|
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
|
300337
299571
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => isRunning(middleware)) : choices;
|
|
300338
|
-
return
|
|
299572
|
+
return esm_default3({
|
|
300339
299573
|
message: "Which The Graph instance do you want to connect to?",
|
|
300340
299574
|
choices: filteredChoices,
|
|
300341
299575
|
default: defaultMiddleware
|
|
@@ -300363,7 +299597,7 @@ async function instancePrompt({
|
|
|
300363
299597
|
return sanitizeInstanceUrl(defaultPromptInstance);
|
|
300364
299598
|
}
|
|
300365
299599
|
if (freeTextInput) {
|
|
300366
|
-
const instance = await
|
|
299600
|
+
const instance = await esm_default2({
|
|
300367
299601
|
message: "What is the URL of your SettleMint instance?",
|
|
300368
299602
|
default: defaultPromptInstance,
|
|
300369
299603
|
required: true,
|
|
@@ -300382,7 +299616,7 @@ async function instancePrompt({
|
|
|
300382
299616
|
if (knownInstances.length === 0) {
|
|
300383
299617
|
note("No instances found. Run `settlemint login` to configure an instance.", "warn");
|
|
300384
299618
|
}
|
|
300385
|
-
return
|
|
299619
|
+
return esm_default3({
|
|
300386
299620
|
message: "What instance do you want to connect to?",
|
|
300387
299621
|
choices: [
|
|
300388
299622
|
...knownInstances.map((instance) => ({
|
|
@@ -300418,7 +299652,7 @@ async function serviceSecretPrompt({
|
|
|
300418
299652
|
return defaultSecret;
|
|
300419
299653
|
}
|
|
300420
299654
|
if (defaultSecret) {
|
|
300421
|
-
const keep = await
|
|
299655
|
+
const keep = await esm_default4({
|
|
300422
299656
|
message: `Do you want to use the existing ${name3} secret?`,
|
|
300423
299657
|
default: true
|
|
300424
299658
|
});
|
|
@@ -300426,7 +299660,7 @@ async function serviceSecretPrompt({
|
|
|
300426
299660
|
return defaultSecret;
|
|
300427
299661
|
}
|
|
300428
299662
|
}
|
|
300429
|
-
const serviceSecret = await
|
|
299663
|
+
const serviceSecret = await esm_default5({
|
|
300430
299664
|
message
|
|
300431
299665
|
});
|
|
300432
299666
|
return serviceSecret || undefined;
|
|
@@ -300447,7 +299681,7 @@ async function serviceUrlPrompt({
|
|
|
300447
299681
|
if (isCi) {
|
|
300448
299682
|
return defaultUrl ? new URL(defaultUrl).toString() : undefined;
|
|
300449
299683
|
}
|
|
300450
|
-
const serviceUrl = await
|
|
299684
|
+
const serviceUrl = await esm_default2({
|
|
300451
299685
|
message: example ? `${message} (eg ${example})` : message,
|
|
300452
299686
|
default: defaultUrl,
|
|
300453
299687
|
required: true,
|
|
@@ -300478,7 +299712,7 @@ async function workspacePrompt(env2, workspaces, accept) {
|
|
|
300478
299712
|
if (is_in_ci_default) {
|
|
300479
299713
|
nothingSelectedError("workspace");
|
|
300480
299714
|
}
|
|
300481
|
-
const workspace = await
|
|
299715
|
+
const workspace = await esm_default3({
|
|
300482
299716
|
message: "Which workspace do you want to connect to?",
|
|
300483
299717
|
choices: workspaces.map((workspace2) => ({
|
|
300484
299718
|
name: `${workspace2.name} (${workspace2.uniqueName})`,
|
|
@@ -300882,7 +300116,7 @@ async function serviceValuePrompt({
|
|
|
300882
300116
|
if (isCi) {
|
|
300883
300117
|
return defaultValue;
|
|
300884
300118
|
}
|
|
300885
|
-
const serviceSecret = await
|
|
300119
|
+
const serviceSecret = await esm_default2({
|
|
300886
300120
|
message: example ? `${message} (eg ${example})` : message,
|
|
300887
300121
|
default: defaultValue
|
|
300888
300122
|
});
|
|
@@ -301320,7 +300554,7 @@ async function templatePrompt(platformConfig, argument) {
|
|
|
301320
300554
|
}
|
|
301321
300555
|
return template2;
|
|
301322
300556
|
}
|
|
301323
|
-
const template = await
|
|
300557
|
+
const template = await esm_default3({
|
|
301324
300558
|
message: "Which template do you want to use?",
|
|
301325
300559
|
choices: [
|
|
301326
300560
|
...kits.map((template2) => ({
|
|
@@ -301338,7 +300572,7 @@ async function projectNamePrompt(env2, argument) {
|
|
|
301338
300572
|
if (defaultInstance) {
|
|
301339
300573
|
return defaultInstance;
|
|
301340
300574
|
}
|
|
301341
|
-
return
|
|
300575
|
+
return esm_default2({
|
|
301342
300576
|
message: "What is the name of your new SettleMint project?",
|
|
301343
300577
|
default: defaultInstance,
|
|
301344
300578
|
required: true,
|
|
@@ -304605,7 +303839,7 @@ function createCommand2() {
|
|
|
304605
303839
|
await mkdir6(projectDir, { recursive: true });
|
|
304606
303840
|
}
|
|
304607
303841
|
if (!await isEmpty(projectDir)) {
|
|
304608
|
-
const confirmEmpty = await
|
|
303842
|
+
const confirmEmpty = await esm_default4({
|
|
304609
303843
|
message: `The folder ${projectDir} already exists. Do you want to empty it?`,
|
|
304610
303844
|
default: false
|
|
304611
303845
|
});
|
|
@@ -304858,7 +304092,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
|
304858
304092
|
return defaultPersonalAccessToken;
|
|
304859
304093
|
}
|
|
304860
304094
|
if (existingConfig && defaultPersonalAccessToken) {
|
|
304861
|
-
const useExisting = await
|
|
304095
|
+
const useExisting = await esm_default4({
|
|
304862
304096
|
message: `Do you want to use your existing personal access token for ${instance}?`,
|
|
304863
304097
|
default: true
|
|
304864
304098
|
});
|
|
@@ -304866,7 +304100,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
|
304866
304100
|
return defaultPersonalAccessToken;
|
|
304867
304101
|
}
|
|
304868
304102
|
}
|
|
304869
|
-
return
|
|
304103
|
+
return esm_default5({
|
|
304870
304104
|
message: "What is your personal access token in SettleMint? (format: sm_pat_...)",
|
|
304871
304105
|
validate(value4) {
|
|
304872
304106
|
try {
|
|
@@ -304992,7 +304226,7 @@ function logoutCommand() {
|
|
|
304992
304226
|
}
|
|
304993
304227
|
const env2 = await loadEnv(false, false);
|
|
304994
304228
|
const defaultInstance = env2.SETTLEMINT_INSTANCE;
|
|
304995
|
-
const instance = await
|
|
304229
|
+
const instance = await esm_default3({
|
|
304996
304230
|
message: "Select the instance to logout from:",
|
|
304997
304231
|
choices: instances.map((instance2) => ({
|
|
304998
304232
|
value: instance2,
|
|
@@ -305013,7 +304247,7 @@ async function pincodeVerificationPrompt(verificationChallenges) {
|
|
|
305013
304247
|
if (verificationChallenges.length === 1) {
|
|
305014
304248
|
return verificationChallenges[0];
|
|
305015
304249
|
}
|
|
305016
|
-
const verificationChallenge = await
|
|
304250
|
+
const verificationChallenge = await esm_default3({
|
|
305017
304251
|
message: "Which pincode verification do you want to use?",
|
|
305018
304252
|
choices: verificationChallenges.map((verificationChallenge2) => ({
|
|
305019
304253
|
name: verificationChallenge2.name,
|
|
@@ -305077,7 +304311,7 @@ function pincodeVerificationResponseCommand() {
|
|
|
305077
304311
|
nodeId: selectedBlockchainNode.id
|
|
305078
304312
|
});
|
|
305079
304313
|
const verificationChallenge = await pincodeVerificationPrompt(pincodeVerificationChallenges);
|
|
305080
|
-
const pincode = await
|
|
304314
|
+
const pincode = await esm_default5({
|
|
305081
304315
|
message: "Enter your pincode",
|
|
305082
304316
|
validate(value4) {
|
|
305083
304317
|
if (!value4.trim()) {
|
|
@@ -305230,7 +304464,7 @@ async function providerPrompt(platformConfig, argument) {
|
|
|
305230
304464
|
if (possibleProviders.length === 1) {
|
|
305231
304465
|
return possibleProviders[0];
|
|
305232
304466
|
}
|
|
305233
|
-
const provider = await
|
|
304467
|
+
const provider = await esm_default3({
|
|
305234
304468
|
message: "Which provider do you want to use?",
|
|
305235
304469
|
choices: platformConfig.deploymentEngineTargets.map((target) => ({
|
|
305236
304470
|
name: target.name,
|
|
@@ -305261,7 +304495,7 @@ async function regionPrompt(provider, argument) {
|
|
|
305261
304495
|
if (possibleRegions.length === 1) {
|
|
305262
304496
|
return possibleRegions[0];
|
|
305263
304497
|
}
|
|
305264
|
-
const region = await
|
|
304498
|
+
const region = await esm_default3({
|
|
305265
304499
|
message: "Which region do you want to use?",
|
|
305266
304500
|
choices: provider.clusters.map((cluster) => ({
|
|
305267
304501
|
name: cluster.name,
|
|
@@ -305791,7 +305025,7 @@ async function blockchainNetworkPrompt({
|
|
|
305791
305025
|
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
|
305792
305026
|
isRequired,
|
|
305793
305027
|
defaultHandler: async ({ defaultService: defaultNetwork, choices }) => {
|
|
305794
|
-
return
|
|
305028
|
+
return esm_default3({
|
|
305795
305029
|
message: "Which blockchain network do you want to connect to?",
|
|
305796
305030
|
choices,
|
|
305797
305031
|
default: defaultNetwork
|
|
@@ -306696,7 +305930,7 @@ function createCommand3() {
|
|
|
306696
305930
|
|
|
306697
305931
|
// src/prompts/delete-confirmation.prompt.ts
|
|
306698
305932
|
async function deleteConfirmationPrompt(itemDescription) {
|
|
306699
|
-
const confirmation = await
|
|
305933
|
+
const confirmation = await esm_default2({
|
|
306700
305934
|
message: `Are you sure you want to delete ${itemDescription}? (yes/no)`,
|
|
306701
305935
|
required: true,
|
|
306702
305936
|
validate(value4) {
|
|
@@ -308093,7 +307327,7 @@ async function useCasePrompt(platformConfig, argument) {
|
|
|
308093
307327
|
if (selectableUseCases.length === 1) {
|
|
308094
307328
|
return selectableUseCases[0];
|
|
308095
307329
|
}
|
|
308096
|
-
const useCase = await
|
|
307330
|
+
const useCase = await esm_default3({
|
|
308097
307331
|
message: "Which use case do you want to use?",
|
|
308098
307332
|
choices: selectableUseCases.map((useCase2) => ({
|
|
308099
307333
|
name: formatUseCaseName(useCase2.name),
|
|
@@ -308151,7 +307385,7 @@ function createCommand4() {
|
|
|
308151
307385
|
const targetDir = formatTargetDir(name3);
|
|
308152
307386
|
const projectDir = join10(process.cwd(), targetDir);
|
|
308153
307387
|
if (await exists3(projectDir) && !await isEmpty(projectDir)) {
|
|
308154
|
-
const confirmEmpty = await
|
|
307388
|
+
const confirmEmpty = await esm_default4({
|
|
308155
307389
|
message: `The folder ${projectDir} already exists. Do you want to delete it?`,
|
|
308156
307390
|
default: false
|
|
308157
307391
|
});
|
|
@@ -308464,7 +307698,7 @@ async function addressPrompt({
|
|
|
308464
307698
|
hardhatConfig
|
|
308465
307699
|
}) {
|
|
308466
307700
|
if (!node) {
|
|
308467
|
-
return
|
|
307701
|
+
return esm_default2({
|
|
308468
307702
|
message: "Which private key address do you want to deploy from?",
|
|
308469
307703
|
validate: (value4) => {
|
|
308470
307704
|
if (!isAddress(value4)) {
|
|
@@ -308484,7 +307718,7 @@ async function addressPrompt({
|
|
|
308484
307718
|
note(`Private key with address '${defaultAddress}' is not activated on the node '${node.uniqueName}'.
|
|
308485
307719
|
Please select another key or activate this key on the node and try again.`, "warn");
|
|
308486
307720
|
}
|
|
308487
|
-
const address = await
|
|
307721
|
+
const address = await esm_default3({
|
|
308488
307722
|
message: "Which private key do you want to deploy from?",
|
|
308489
307723
|
choices: possiblePrivateKeys.map(({ address: address2, name: name3 }) => ({
|
|
308490
307724
|
name: name3,
|
|
@@ -309435,4 +308669,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
|
309435
308669
|
// src/cli.ts
|
|
309436
308670
|
sdkCliCommand();
|
|
309437
308671
|
|
|
309438
|
-
//# debugId=
|
|
308672
|
+
//# debugId=F18654A79684042164756E2164756E21
|