@vibeframe/mcp-server 0.113.8 → 0.113.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +260 -211
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -120570,8 +120570,8 @@ var init_which_module = __esm({
120570
120570
  });
120571
120571
 
120572
120572
  // ../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/build/lib/command.js
120573
- function command(usage3, validation3, globalMiddleware, shim4) {
120574
- return new CommandInstance(usage3, validation3, globalMiddleware, shim4);
120573
+ function command(usage4, validation3, globalMiddleware, shim4) {
120574
+ return new CommandInstance(usage4, validation3, globalMiddleware, shim4);
120575
120575
  }
120576
120576
  function isCommandBuilderDefinition(builder) {
120577
120577
  return typeof builder === "object" && !!builder.builder && typeof builder.handler === "function";
@@ -120600,13 +120600,13 @@ var init_command = __esm({
120600
120600
  init_which_module();
120601
120601
  DEFAULT_MARKER = /(^\*)|(^\$0)/;
120602
120602
  CommandInstance = class {
120603
- constructor(usage3, validation3, globalMiddleware, shim4) {
120603
+ constructor(usage4, validation3, globalMiddleware, shim4) {
120604
120604
  this.requireCache = /* @__PURE__ */ new Set();
120605
120605
  this.handlers = {};
120606
120606
  this.aliasMap = {};
120607
120607
  this.frozens = [];
120608
120608
  this.shim = shim4;
120609
- this.usage = usage3;
120609
+ this.usage = usage4;
120610
120610
  this.globalMiddleware = globalMiddleware;
120611
120611
  this.validation = validation3;
120612
120612
  }
@@ -121172,10 +121172,10 @@ function usage(yargs, shim4) {
121172
121172
  });
121173
121173
  if (!usageDisabled) {
121174
121174
  if (usages.length) {
121175
- usages.forEach((usage3) => {
121176
- ui3.div({ text: `${usage3[0].replace(/\$0/g, base$0)}` });
121177
- if (usage3[1]) {
121178
- ui3.div({ text: `${usage3[1]}`, padding: [1, 0, 0, 0] });
121175
+ usages.forEach((usage4) => {
121176
+ ui3.div({ text: `${usage4[0].replace(/\$0/g, base$0)}` });
121177
+ if (usage4[1]) {
121178
+ ui3.div({ text: `${usage4[1]}`, padding: [1, 0, 0, 0] });
121179
121179
  }
121180
121180
  });
121181
121181
  ui3.div();
@@ -121595,8 +121595,8 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
121595
121595
  });
121596
121596
 
121597
121597
  // ../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/build/lib/completion.js
121598
- function completion(yargs, usage3, command3, shim4) {
121599
- return new Completion(yargs, usage3, command3, shim4);
121598
+ function completion(yargs, usage4, command3, shim4) {
121599
+ return new Completion(yargs, usage4, command3, shim4);
121600
121600
  }
121601
121601
  function isSyncCompletionFunction(completionFunction) {
121602
121602
  return completionFunction.length < 3;
@@ -121613,10 +121613,10 @@ var init_completion = __esm({
121613
121613
  init_is_promise();
121614
121614
  init_parse_command();
121615
121615
  Completion = class {
121616
- constructor(yargs, usage3, command3, shim4) {
121616
+ constructor(yargs, usage4, command3, shim4) {
121617
121617
  var _a9, _b3, _c3;
121618
121618
  this.yargs = yargs;
121619
- this.usage = usage3;
121619
+ this.usage = usage4;
121620
121620
  this.command = command3;
121621
121621
  this.shim = shim4;
121622
121622
  this.completionKey = "get-yargs-completions";
@@ -121853,7 +121853,7 @@ var init_levenshtein = __esm({
121853
121853
  });
121854
121854
 
121855
121855
  // ../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/build/lib/validation.js
121856
- function validation(yargs, usage3, shim4) {
121856
+ function validation(yargs, usage4, shim4) {
121857
121857
  const __ = shim4.y18n.__;
121858
121858
  const __n = shim4.y18n.__n;
121859
121859
  const self2 = {};
@@ -121864,22 +121864,22 @@ function validation(yargs, usage3, shim4) {
121864
121864
  if (demandedCommands._ && (_s < demandedCommands._.min || _s > demandedCommands._.max)) {
121865
121865
  if (_s < demandedCommands._.min) {
121866
121866
  if (demandedCommands._.minMsg !== void 0) {
121867
- usage3.fail(demandedCommands._.minMsg ? demandedCommands._.minMsg.replace(/\$0/g, _s.toString()).replace(/\$1/, demandedCommands._.min.toString()) : null);
121867
+ usage4.fail(demandedCommands._.minMsg ? demandedCommands._.minMsg.replace(/\$0/g, _s.toString()).replace(/\$1/, demandedCommands._.min.toString()) : null);
121868
121868
  } else {
121869
- usage3.fail(__n("Not enough non-option arguments: got %s, need at least %s", "Not enough non-option arguments: got %s, need at least %s", _s, _s.toString(), demandedCommands._.min.toString()));
121869
+ usage4.fail(__n("Not enough non-option arguments: got %s, need at least %s", "Not enough non-option arguments: got %s, need at least %s", _s, _s.toString(), demandedCommands._.min.toString()));
121870
121870
  }
121871
121871
  } else if (_s > demandedCommands._.max) {
121872
121872
  if (demandedCommands._.maxMsg !== void 0) {
121873
- usage3.fail(demandedCommands._.maxMsg ? demandedCommands._.maxMsg.replace(/\$0/g, _s.toString()).replace(/\$1/, demandedCommands._.max.toString()) : null);
121873
+ usage4.fail(demandedCommands._.maxMsg ? demandedCommands._.maxMsg.replace(/\$0/g, _s.toString()).replace(/\$1/, demandedCommands._.max.toString()) : null);
121874
121874
  } else {
121875
- usage3.fail(__n("Too many non-option arguments: got %s, maximum of %s", "Too many non-option arguments: got %s, maximum of %s", _s, _s.toString(), demandedCommands._.max.toString()));
121875
+ usage4.fail(__n("Too many non-option arguments: got %s, maximum of %s", "Too many non-option arguments: got %s, maximum of %s", _s, _s.toString(), demandedCommands._.max.toString()));
121876
121876
  }
121877
121877
  }
121878
121878
  }
121879
121879
  };
121880
121880
  self2.positionalCount = function positionalCount(required, observed) {
121881
121881
  if (observed < required) {
121882
- usage3.fail(__n("Not enough non-option arguments: got %s, need at least %s", "Not enough non-option arguments: got %s, need at least %s", observed, observed + "", required + ""));
121882
+ usage4.fail(__n("Not enough non-option arguments: got %s, need at least %s", "Not enough non-option arguments: got %s, need at least %s", observed, observed + "", required + ""));
121883
121883
  }
121884
121884
  };
121885
121885
  self2.requiredArguments = function requiredArguments(argv, demandedOptions) {
@@ -121900,7 +121900,7 @@ function validation(yargs, usage3, shim4) {
121900
121900
  }
121901
121901
  const customMsg = customMsgs.length ? `
121902
121902
  ${customMsgs.join("\n")}` : "";
121903
- usage3.fail(__n("Missing required argument: %s", "Missing required arguments: %s", Object.keys(missing).length, Object.keys(missing).join(", ") + customMsg));
121903
+ usage4.fail(__n("Missing required argument: %s", "Missing required arguments: %s", Object.keys(missing).length, Object.keys(missing).join(", ") + customMsg));
121904
121904
  }
121905
121905
  };
121906
121906
  self2.unknownArguments = function unknownArguments(argv, aliases2, positionalMap, isDefaultCommand, checkPositionals = true) {
@@ -121934,7 +121934,7 @@ ${customMsgs.join("\n")}` : "";
121934
121934
  }
121935
121935
  }
121936
121936
  if (unknown.length) {
121937
- usage3.fail(__n("Unknown argument: %s", "Unknown arguments: %s", unknown.length, unknown.map((s2) => s2.trim() ? s2 : `"${s2}"`).join(", ")));
121937
+ usage4.fail(__n("Unknown argument: %s", "Unknown arguments: %s", unknown.length, unknown.map((s2) => s2.trim() ? s2 : `"${s2}"`).join(", ")));
121938
121938
  }
121939
121939
  };
121940
121940
  self2.unknownCommands = function unknownCommands(argv) {
@@ -121949,7 +121949,7 @@ ${customMsgs.join("\n")}` : "";
121949
121949
  });
121950
121950
  }
121951
121951
  if (unknown.length > 0) {
121952
- usage3.fail(__n("Unknown command: %s", "Unknown commands: %s", unknown.length, unknown.join(", ")));
121952
+ usage4.fail(__n("Unknown command: %s", "Unknown commands: %s", unknown.length, unknown.join(", ")));
121953
121953
  return true;
121954
121954
  } else {
121955
121955
  return false;
@@ -121982,9 +121982,9 @@ ${customMsgs.join("\n")}` : "";
121982
121982
  let msg = __("Invalid values:");
121983
121983
  invalidKeys.forEach((key2) => {
121984
121984
  msg += `
121985
- ${__("Argument: %s, Given: %s, Choices: %s", key2, usage3.stringifiedValues(invalid[key2]), usage3.stringifiedValues(options.choices[key2]))}`;
121985
+ ${__("Argument: %s, Given: %s, Choices: %s", key2, usage4.stringifiedValues(invalid[key2]), usage4.stringifiedValues(options.choices[key2]))}`;
121986
121986
  });
121987
- usage3.fail(msg);
121987
+ usage4.fail(msg);
121988
121988
  };
121989
121989
  let implied = {};
121990
121990
  self2.implies = function implies(key2, value) {
@@ -122042,7 +122042,7 @@ ${customMsgs.join("\n")}` : "";
122042
122042
  implyFail.forEach((value) => {
122043
122043
  msg += value;
122044
122044
  });
122045
- usage3.fail(msg);
122045
+ usage4.fail(msg);
122046
122046
  }
122047
122047
  };
122048
122048
  let conflicting = {};
@@ -122070,7 +122070,7 @@ ${customMsgs.join("\n")}` : "";
122070
122070
  if (conflicting[key2]) {
122071
122071
  conflicting[key2].forEach((value) => {
122072
122072
  if (value && argv[key2] !== void 0 && argv[value] !== void 0) {
122073
- usage3.fail(__("Arguments %s and %s are mutually exclusive", key2, value));
122073
+ usage4.fail(__("Arguments %s and %s are mutually exclusive", key2, value));
122074
122074
  }
122075
122075
  });
122076
122076
  }
@@ -122079,7 +122079,7 @@ ${customMsgs.join("\n")}` : "";
122079
122079
  Object.keys(conflicting).forEach((key2) => {
122080
122080
  conflicting[key2].forEach((value) => {
122081
122081
  if (value && argv[shim4.Parser.camelCase(key2)] !== void 0 && argv[shim4.Parser.camelCase(value)] !== void 0) {
122082
- usage3.fail(__("Arguments %s and %s are mutually exclusive", key2, value));
122082
+ usage4.fail(__("Arguments %s and %s are mutually exclusive", key2, value));
122083
122083
  }
122084
122084
  });
122085
122085
  });
@@ -122098,7 +122098,7 @@ ${customMsgs.join("\n")}` : "";
122098
122098
  }
122099
122099
  }
122100
122100
  if (recommended)
122101
- usage3.fail(__("Did you mean %s?", recommended));
122101
+ usage4.fail(__("Did you mean %s?", recommended));
122102
122102
  };
122103
122103
  self2.reset = function reset(localLookup) {
122104
122104
  implied = objFilter(implied, (k2) => !localLookup[k2]);
@@ -152275,34 +152275,34 @@ ${lanes.join("\n")}
152275
152275
  directories: directoriesMatcher,
152276
152276
  exclude: excludeMatcher
152277
152277
  };
152278
- function getRegularExpressionForWildcard(specs, basePath, usage3) {
152279
- const patterns = getRegularExpressionsForWildcards(specs, basePath, usage3);
152278
+ function getRegularExpressionForWildcard(specs, basePath, usage4) {
152279
+ const patterns = getRegularExpressionsForWildcards(specs, basePath, usage4);
152280
152280
  if (!patterns || !patterns.length) {
152281
152281
  return void 0;
152282
152282
  }
152283
152283
  const pattern = patterns.map((pattern2) => `(?:${pattern2})`).join("|");
152284
- const terminator = usage3 === "exclude" ? "(?:$|/)" : "$";
152284
+ const terminator = usage4 === "exclude" ? "(?:$|/)" : "$";
152285
152285
  return `^(?:${pattern})${terminator}`;
152286
152286
  }
152287
- function getRegularExpressionsForWildcards(specs, basePath, usage3) {
152287
+ function getRegularExpressionsForWildcards(specs, basePath, usage4) {
152288
152288
  if (specs === void 0 || specs.length === 0) {
152289
152289
  return void 0;
152290
152290
  }
152291
- return flatMap(specs, (spec) => spec && getSubPatternFromSpec(spec, basePath, usage3, wildcardMatchers[usage3]));
152291
+ return flatMap(specs, (spec) => spec && getSubPatternFromSpec(spec, basePath, usage4, wildcardMatchers[usage4]));
152292
152292
  }
152293
152293
  function isImplicitGlob(lastPathComponent) {
152294
152294
  return !/[.*?]/.test(lastPathComponent);
152295
152295
  }
152296
- function getPatternFromSpec(spec, basePath, usage3) {
152297
- const pattern = spec && getSubPatternFromSpec(spec, basePath, usage3, wildcardMatchers[usage3]);
152298
- return pattern && `^(?:${pattern})${usage3 === "exclude" ? "(?:$|/)" : "$"}`;
152296
+ function getPatternFromSpec(spec, basePath, usage4) {
152297
+ const pattern = spec && getSubPatternFromSpec(spec, basePath, usage4, wildcardMatchers[usage4]);
152298
+ return pattern && `^(?:${pattern})${usage4 === "exclude" ? "(?:$|/)" : "$"}`;
152299
152299
  }
152300
- function getSubPatternFromSpec(spec, basePath, usage3, { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter: replaceWildcardCharacter2 } = wildcardMatchers[usage3]) {
152300
+ function getSubPatternFromSpec(spec, basePath, usage4, { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter: replaceWildcardCharacter2 } = wildcardMatchers[usage4]) {
152301
152301
  let subpattern = "";
152302
152302
  let hasWrittenComponent = false;
152303
152303
  const components = getNormalizedPathComponents(spec, basePath);
152304
152304
  const lastComponent = last3(components);
152305
- if (usage3 !== "exclude" && lastComponent === "**") {
152305
+ if (usage4 !== "exclude" && lastComponent === "**") {
152306
152306
  return void 0;
152307
152307
  }
152308
152308
  components[0] = removeTrailingDirectorySeparator(components[0]);
@@ -152314,14 +152314,14 @@ ${lanes.join("\n")}
152314
152314
  if (component === "**") {
152315
152315
  subpattern += doubleAsteriskRegexFragment;
152316
152316
  } else {
152317
- if (usage3 === "directories") {
152317
+ if (usage4 === "directories") {
152318
152318
  subpattern += "(?:";
152319
152319
  optionalCount++;
152320
152320
  }
152321
152321
  if (hasWrittenComponent) {
152322
152322
  subpattern += directorySeparator;
152323
152323
  }
152324
- if (usage3 !== "exclude") {
152324
+ if (usage4 !== "exclude") {
152325
152325
  let componentPattern = "";
152326
152326
  if (component.charCodeAt(0) === 42) {
152327
152327
  componentPattern += "(?:[^./]" + singleAsteriskRegexFragment + ")?";
@@ -185619,27 +185619,27 @@ ${lanes.join("\n")}
185619
185619
  }
185620
185620
  return Debug.fail("There should exist two symbols, one as property declaration and one as parameter declaration");
185621
185621
  }
185622
- function isBlockScopedNameDeclaredBeforeUse(declaration, usage3) {
185622
+ function isBlockScopedNameDeclaredBeforeUse(declaration, usage4) {
185623
185623
  const declarationFile = getSourceFileOfNode(declaration);
185624
- const useFile = getSourceFileOfNode(usage3);
185624
+ const useFile = getSourceFileOfNode(usage4);
185625
185625
  const declContainer = getEnclosingBlockScopeContainer(declaration);
185626
185626
  if (declarationFile !== useFile) {
185627
- if (moduleKind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator) || !compilerOptions.outFile || isInTypeQuery(usage3) || declaration.flags & 33554432) {
185627
+ if (moduleKind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator) || !compilerOptions.outFile || isInTypeQuery(usage4) || declaration.flags & 33554432) {
185628
185628
  return true;
185629
185629
  }
185630
- if (isUsedInFunctionOrInstanceProperty(usage3, declaration)) {
185630
+ if (isUsedInFunctionOrInstanceProperty(usage4, declaration)) {
185631
185631
  return true;
185632
185632
  }
185633
185633
  const sourceFiles = host.getSourceFiles();
185634
185634
  return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile);
185635
185635
  }
185636
- if (!!(usage3.flags & 16777216) || isInTypeQuery(usage3) || isInAmbientOrTypeNode(usage3)) {
185636
+ if (!!(usage4.flags & 16777216) || isInTypeQuery(usage4) || isInAmbientOrTypeNode(usage4)) {
185637
185637
  return true;
185638
185638
  }
185639
- if (declaration.pos <= usage3.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage3.parent) && !declaration.initializer && !declaration.exclamationToken)) {
185639
+ if (declaration.pos <= usage4.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage4.parent) && !declaration.initializer && !declaration.exclamationToken)) {
185640
185640
  if (declaration.kind === 209) {
185641
185641
  const errorBindingElement = getAncestor(
185642
- usage3,
185642
+ usage4,
185643
185643
  209
185644
185644
  /* BindingElement */
185645
185645
  );
@@ -185650,41 +185650,41 @@ ${lanes.join("\n")}
185650
185650
  declaration,
185651
185651
  261
185652
185652
  /* VariableDeclaration */
185653
- ), usage3);
185653
+ ), usage4);
185654
185654
  } else if (declaration.kind === 261) {
185655
- return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage3);
185655
+ return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage4);
185656
185656
  } else if (isClassLike(declaration)) {
185657
- const container = findAncestor(usage3, (n2) => n2 === declaration ? "quit" : isComputedPropertyName(n2) ? n2.parent.parent === declaration : !legacyDecorators && isDecorator(n2) && (n2.parent === declaration || isMethodDeclaration(n2.parent) && n2.parent.parent === declaration || isGetOrSetAccessorDeclaration(n2.parent) && n2.parent.parent === declaration || isPropertyDeclaration(n2.parent) && n2.parent.parent === declaration || isParameter(n2.parent) && n2.parent.parent.parent === declaration));
185657
+ const container = findAncestor(usage4, (n2) => n2 === declaration ? "quit" : isComputedPropertyName(n2) ? n2.parent.parent === declaration : !legacyDecorators && isDecorator(n2) && (n2.parent === declaration || isMethodDeclaration(n2.parent) && n2.parent.parent === declaration || isGetOrSetAccessorDeclaration(n2.parent) && n2.parent.parent === declaration || isPropertyDeclaration(n2.parent) && n2.parent.parent === declaration || isParameter(n2.parent) && n2.parent.parent.parent === declaration));
185658
185658
  if (!container) {
185659
185659
  return true;
185660
185660
  }
185661
185661
  if (!legacyDecorators && isDecorator(container)) {
185662
- return !!findAncestor(usage3, (n2) => n2 === container ? "quit" : isFunctionLike(n2) && !getImmediatelyInvokedFunctionExpression(n2));
185662
+ return !!findAncestor(usage4, (n2) => n2 === container ? "quit" : isFunctionLike(n2) && !getImmediatelyInvokedFunctionExpression(n2));
185663
185663
  }
185664
185664
  return false;
185665
185665
  } else if (isPropertyDeclaration(declaration)) {
185666
185666
  return !isPropertyImmediatelyReferencedWithinDeclaration(
185667
185667
  declaration,
185668
- usage3,
185668
+ usage4,
185669
185669
  /*stopAtAnyPropertyDeclaration*/
185670
185670
  false
185671
185671
  );
185672
185672
  } else if (isParameterPropertyDeclaration(declaration, declaration.parent)) {
185673
- return !(emitStandardClassFields && getContainingClass(declaration) === getContainingClass(usage3) && isUsedInFunctionOrInstanceProperty(usage3, declaration));
185673
+ return !(emitStandardClassFields && getContainingClass(declaration) === getContainingClass(usage4) && isUsedInFunctionOrInstanceProperty(usage4, declaration));
185674
185674
  }
185675
185675
  return true;
185676
185676
  }
185677
- if (usage3.parent.kind === 282 || usage3.parent.kind === 278 && usage3.parent.isExportEquals) {
185677
+ if (usage4.parent.kind === 282 || usage4.parent.kind === 278 && usage4.parent.isExportEquals) {
185678
185678
  return true;
185679
185679
  }
185680
- if (usage3.kind === 278 && usage3.isExportEquals) {
185680
+ if (usage4.kind === 278 && usage4.isExportEquals) {
185681
185681
  return true;
185682
185682
  }
185683
- if (isUsedInFunctionOrInstanceProperty(usage3, declaration)) {
185683
+ if (isUsedInFunctionOrInstanceProperty(usage4, declaration)) {
185684
185684
  if (emitStandardClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) {
185685
185685
  return !isPropertyImmediatelyReferencedWithinDeclaration(
185686
185686
  declaration,
185687
- usage3,
185687
+ usage4,
185688
185688
  /*stopAtAnyPropertyDeclaration*/
185689
185689
  true
185690
185690
  );
@@ -186290,19 +186290,19 @@ ${lanes.join("\n")}
186290
186290
  /* Default */
186291
186291
  ) || isExportSpecifier(node) || isNamespaceExport(node);
186292
186292
  }
186293
- function getEmitSyntaxForModuleSpecifierExpression(usage3) {
186294
- return isStringLiteralLike(usage3) ? host.getEmitSyntaxForUsageLocation(getSourceFileOfNode(usage3), usage3) : void 0;
186293
+ function getEmitSyntaxForModuleSpecifierExpression(usage4) {
186294
+ return isStringLiteralLike(usage4) ? host.getEmitSyntaxForUsageLocation(getSourceFileOfNode(usage4), usage4) : void 0;
186295
186295
  }
186296
186296
  function isESMFormatImportImportingCommonjsFormatFile(usageMode, targetMode) {
186297
186297
  return usageMode === 99 && targetMode === 1;
186298
186298
  }
186299
- function isOnlyImportableAsDefault(usage3, resolvedModule) {
186299
+ function isOnlyImportableAsDefault(usage4, resolvedModule) {
186300
186300
  if (100 <= moduleKind && moduleKind <= 199) {
186301
- const usageMode = getEmitSyntaxForModuleSpecifierExpression(usage3);
186301
+ const usageMode = getEmitSyntaxForModuleSpecifierExpression(usage4);
186302
186302
  if (usageMode === 99) {
186303
186303
  resolvedModule ?? (resolvedModule = resolveExternalModuleName(
186304
- usage3,
186305
- usage3,
186304
+ usage4,
186305
+ usage4,
186306
186306
  /*ignoreErrors*/
186307
186307
  true
186308
186308
  ));
@@ -186312,8 +186312,8 @@ ${lanes.join("\n")}
186312
186312
  }
186313
186313
  return false;
186314
186314
  }
186315
- function canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, usage3) {
186316
- const usageMode = file && getEmitSyntaxForModuleSpecifierExpression(usage3);
186315
+ function canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, usage4) {
186316
+ const usageMode = file && getEmitSyntaxForModuleSpecifierExpression(usage4);
186317
186317
  if (file && usageMode !== void 0) {
186318
186318
  const targetMode = host.getImpliedNodeFormatForEmit(file);
186319
186319
  if (usageMode === 99 && targetMode === 1 && 100 <= moduleKind && moduleKind <= 199) {
@@ -265020,43 +265020,43 @@ ${lanes.join("\n")}
265020
265020
  }
265021
265021
  return false;
265022
265022
  }
265023
- function getModeForUsageLocation(file, usage3, compilerOptions) {
265024
- return getModeForUsageLocationWorker(file, usage3, compilerOptions);
265023
+ function getModeForUsageLocation(file, usage4, compilerOptions) {
265024
+ return getModeForUsageLocationWorker(file, usage4, compilerOptions);
265025
265025
  }
265026
- function getModeForUsageLocationWorker(file, usage3, compilerOptions) {
265027
- if (isImportDeclaration(usage3.parent) || isExportDeclaration(usage3.parent) || isJSDocImportTag(usage3.parent)) {
265028
- const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage3.parent);
265026
+ function getModeForUsageLocationWorker(file, usage4, compilerOptions) {
265027
+ if (isImportDeclaration(usage4.parent) || isExportDeclaration(usage4.parent) || isJSDocImportTag(usage4.parent)) {
265028
+ const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage4.parent);
265029
265029
  if (isTypeOnly) {
265030
- const override = getResolutionModeOverride(usage3.parent.attributes);
265030
+ const override = getResolutionModeOverride(usage4.parent.attributes);
265031
265031
  if (override) {
265032
265032
  return override;
265033
265033
  }
265034
265034
  }
265035
265035
  }
265036
- if (usage3.parent.parent && isImportTypeNode(usage3.parent.parent)) {
265037
- const override = getResolutionModeOverride(usage3.parent.parent.attributes);
265036
+ if (usage4.parent.parent && isImportTypeNode(usage4.parent.parent)) {
265037
+ const override = getResolutionModeOverride(usage4.parent.parent.attributes);
265038
265038
  if (override) {
265039
265039
  return override;
265040
265040
  }
265041
265041
  }
265042
265042
  if (compilerOptions && importSyntaxAffectsModuleResolution(compilerOptions)) {
265043
- return getEmitSyntaxForUsageLocationWorker(file, usage3, compilerOptions);
265043
+ return getEmitSyntaxForUsageLocationWorker(file, usage4, compilerOptions);
265044
265044
  }
265045
265045
  }
265046
- function getEmitSyntaxForUsageLocationWorker(file, usage3, compilerOptions) {
265046
+ function getEmitSyntaxForUsageLocationWorker(file, usage4, compilerOptions) {
265047
265047
  var _a9;
265048
265048
  if (!compilerOptions) {
265049
265049
  return void 0;
265050
265050
  }
265051
- const exprParentParent = (_a9 = walkUpParenthesizedExpressions(usage3.parent)) == null ? void 0 : _a9.parent;
265051
+ const exprParentParent = (_a9 = walkUpParenthesizedExpressions(usage4.parent)) == null ? void 0 : _a9.parent;
265052
265052
  if (exprParentParent && isImportEqualsDeclaration(exprParentParent) || isRequireCall(
265053
- usage3.parent,
265053
+ usage4.parent,
265054
265054
  /*requireStringLiteralLikeArgument*/
265055
265055
  false
265056
265056
  )) {
265057
265057
  return 1;
265058
265058
  }
265059
- if (isImportCall(walkUpParenthesizedExpressions(usage3.parent))) {
265059
+ if (isImportCall(walkUpParenthesizedExpressions(usage4.parent))) {
265060
265060
  return shouldTransformImportCallWorker(file, compilerOptions) ? 1 : 99;
265061
265061
  }
265062
265062
  const fileEmitMode = getEmitModuleFormatOfFileWorker(file, compilerOptions);
@@ -268209,11 +268209,11 @@ ${lanes.join("\n")}
268209
268209
  }
268210
268210
  return symlinks;
268211
268211
  }
268212
- function getModeForUsageLocation2(file, usage3) {
268213
- return getModeForUsageLocationWorker(file, usage3, getCompilerOptionsForFile(file));
268212
+ function getModeForUsageLocation2(file, usage4) {
268213
+ return getModeForUsageLocationWorker(file, usage4, getCompilerOptionsForFile(file));
268214
268214
  }
268215
- function getEmitSyntaxForUsageLocation(file, usage3) {
268216
- return getEmitSyntaxForUsageLocationWorker(file, usage3, getCompilerOptionsForFile(file));
268215
+ function getEmitSyntaxForUsageLocation(file, usage4) {
268216
+ return getEmitSyntaxForUsageLocationWorker(file, usage4, getCompilerOptionsForFile(file));
268217
268217
  }
268218
268218
  function getModeForResolutionAtIndex2(file, index) {
268219
268219
  return getModeForUsageLocation2(file, getModuleNameStringLiteralAt(file, index));
@@ -286493,23 +286493,23 @@ interface Symbol {
286493
286493
  addNewFileToTsconfig(program2, changes, oldFile.fileName, targetFile, hostGetCanonicalFileName(host));
286494
286494
  }
286495
286495
  }
286496
- function getNewStatementsAndRemoveFromOldFile(oldFile, targetFile, usage3, changes, toMove, program2, host, preferences, importAdderForNewFile, importAdderForOldFile) {
286496
+ function getNewStatementsAndRemoveFromOldFile(oldFile, targetFile, usage4, changes, toMove, program2, host, preferences, importAdderForNewFile, importAdderForOldFile) {
286497
286497
  const checker = program2.getTypeChecker();
286498
286498
  const prologueDirectives = takeWhile(oldFile.statements, isPrologueDirective);
286499
286499
  const useEsModuleSyntax = !fileShouldUseJavaScriptRequire(targetFile.fileName, program2, host, !!oldFile.commonJsModuleIndicator);
286500
286500
  const quotePreference = getQuotePreference(oldFile, preferences);
286501
- addImportsForMovedSymbols(usage3.oldFileImportsFromTargetFile, targetFile.fileName, importAdderForOldFile, program2);
286502
- deleteUnusedOldImports(oldFile, toMove.all, usage3.unusedImportsFromOldFile, importAdderForOldFile);
286501
+ addImportsForMovedSymbols(usage4.oldFileImportsFromTargetFile, targetFile.fileName, importAdderForOldFile, program2);
286502
+ deleteUnusedOldImports(oldFile, toMove.all, usage4.unusedImportsFromOldFile, importAdderForOldFile);
286503
286503
  importAdderForOldFile.writeFixes(changes, quotePreference);
286504
286504
  deleteMovedStatements(oldFile, toMove.ranges, changes);
286505
- updateImportsInOtherFiles(changes, program2, host, oldFile, usage3.movedSymbols, targetFile.fileName, quotePreference);
286506
- addExportsInOldFile(oldFile, usage3.targetFileImportsFromOldFile, changes, useEsModuleSyntax);
286507
- addTargetFileImports(oldFile, usage3.oldImportsNeededByTargetFile, usage3.targetFileImportsFromOldFile, checker, program2, importAdderForNewFile);
286505
+ updateImportsInOtherFiles(changes, program2, host, oldFile, usage4.movedSymbols, targetFile.fileName, quotePreference);
286506
+ addExportsInOldFile(oldFile, usage4.targetFileImportsFromOldFile, changes, useEsModuleSyntax);
286507
+ addTargetFileImports(oldFile, usage4.oldImportsNeededByTargetFile, usage4.targetFileImportsFromOldFile, checker, program2, importAdderForNewFile);
286508
286508
  if (!isFullSourceFile(targetFile) && prologueDirectives.length) {
286509
286509
  changes.insertStatementsInNewFile(targetFile.fileName, prologueDirectives, oldFile);
286510
286510
  }
286511
286511
  importAdderForNewFile.writeFixes(changes, quotePreference);
286512
- const body = addExports(oldFile, toMove.all, arrayFrom(usage3.oldFileImportsFromTargetFile.keys()), useEsModuleSyntax);
286512
+ const body = addExports(oldFile, toMove.all, arrayFrom(usage4.oldFileImportsFromTargetFile.keys()), useEsModuleSyntax);
286513
286513
  if (isFullSourceFile(targetFile) && targetFile.statements.length > 0) {
286514
286514
  moveStatementsToTargetFile(changes, program2, body, targetFile, toMove);
286515
286515
  } else if (isFullSourceFile(targetFile)) {
@@ -286928,7 +286928,7 @@ interface Symbol {
286928
286928
  function createNewFileName(oldFile, program2, host, toMove) {
286929
286929
  const checker = program2.getTypeChecker();
286930
286930
  if (toMove) {
286931
- const usage3 = getUsageInfo(oldFile, toMove.all, checker);
286931
+ const usage4 = getUsageInfo(oldFile, toMove.all, checker);
286932
286932
  const currentDirectory = getDirectoryPath(oldFile.fileName);
286933
286933
  const extension2 = extensionFromPath(oldFile.fileName);
286934
286934
  const newFileName = combinePaths(
@@ -286937,7 +286937,7 @@ interface Symbol {
286937
286937
  // ensures the filename computed below isn't already taken
286938
286938
  makeUniqueFilename(
286939
286939
  // infers a name for the new file from the symbols being moved
286940
- inferNewFileName(usage3.oldFileImportsFromTargetFile, usage3.movedSymbols),
286940
+ inferNewFileName(usage4.oldFileImportsFromTargetFile, usage4.movedSymbols),
286941
286941
  extension2,
286942
286942
  currentDirectory,
286943
286943
  host
@@ -287508,12 +287508,12 @@ interface Symbol {
287508
287508
  });
287509
287509
  function doChange4(oldFile, program2, toMove, changes, host, context3, preferences) {
287510
287510
  const checker = program2.getTypeChecker();
287511
- const usage3 = getUsageInfo(oldFile, toMove.all, checker);
287511
+ const usage4 = getUsageInfo(oldFile, toMove.all, checker);
287512
287512
  const newFilename = createNewFileName(oldFile, program2, host, toMove);
287513
287513
  const newSourceFile = createFutureSourceFile(newFilename, oldFile.externalModuleIndicator ? 99 : oldFile.commonJsModuleIndicator ? 1 : void 0, program2, host);
287514
287514
  const importAdderForOldFile = ts_codefix_exports.createImportAdder(oldFile, context3.program, context3.preferences, context3.host);
287515
287515
  const importAdderForNewFile = ts_codefix_exports.createImportAdder(newSourceFile, context3.program, context3.preferences, context3.host);
287516
- getNewStatementsAndRemoveFromOldFile(oldFile, newSourceFile, usage3, changes, toMove, program2, host, preferences, importAdderForNewFile, importAdderForOldFile);
287516
+ getNewStatementsAndRemoveFromOldFile(oldFile, newSourceFile, usage4, changes, toMove, program2, host, preferences, importAdderForNewFile, importAdderForOldFile);
287517
287517
  addNewFileToTsconfig(program2, changes, oldFile.fileName, newFilename, hostGetCanonicalFileName(host));
287518
287518
  }
287519
287519
  var ts_refactor_addOrRemoveBracesToArrowFunction_exports = {};
@@ -289697,10 +289697,10 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
289697
289697
  const parameters = [];
289698
289698
  const callArguments = [];
289699
289699
  let writes;
289700
- usagesInScope.forEach((usage3, name) => {
289700
+ usagesInScope.forEach((usage4, name) => {
289701
289701
  let typeNode;
289702
289702
  if (!isJS) {
289703
- let type = checker.getTypeOfSymbolAtLocation(usage3.symbol, usage3.node);
289703
+ let type = checker.getTypeOfSymbolAtLocation(usage4.symbol, usage4.node);
289704
289704
  type = checker.getBaseTypeOfLiteralType(type);
289705
289705
  typeNode = ts_codefix_exports.typeToAutoImportableTypeNode(
289706
289706
  checker,
@@ -289725,8 +289725,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
289725
289725
  typeNode
289726
289726
  );
289727
289727
  parameters.push(paramDecl);
289728
- if (usage3.usage === 2) {
289729
- (writes || (writes = [])).push(usage3);
289728
+ if (usage4.usage === 2) {
289729
+ (writes || (writes = [])).push(usage4);
289730
289730
  }
289731
289731
  callArguments.push(factory.createIdentifier(name));
289732
289732
  });
@@ -290610,8 +290610,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
290610
290610
  forEachChild(node, collectUsages);
290611
290611
  }
290612
290612
  }
290613
- function recordUsage(n2, usage3, isTypeNode2) {
290614
- const symbolId = recordUsagebySymbol(n2, usage3, isTypeNode2);
290613
+ function recordUsage(n2, usage4, isTypeNode2) {
290614
+ const symbolId = recordUsagebySymbol(n2, usage4, isTypeNode2);
290615
290615
  if (symbolId) {
290616
290616
  for (let i2 = 0; i2 < scopes.length; i2++) {
290617
290617
  const substitution = substitutionsPerScope[i2].get(symbolId);
@@ -290621,22 +290621,22 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
290621
290621
  }
290622
290622
  }
290623
290623
  }
290624
- function recordUsagebySymbol(identifier, usage3, isTypeName) {
290624
+ function recordUsagebySymbol(identifier, usage4, isTypeName) {
290625
290625
  const symbol = getSymbolReferencedByIdentifier(identifier);
290626
290626
  if (!symbol) {
290627
290627
  return void 0;
290628
290628
  }
290629
290629
  const symbolId = getSymbolId(symbol).toString();
290630
290630
  const lastUsage = seenUsages.get(symbolId);
290631
- if (lastUsage && lastUsage >= usage3) {
290631
+ if (lastUsage && lastUsage >= usage4) {
290632
290632
  return symbolId;
290633
290633
  }
290634
- seenUsages.set(symbolId, usage3);
290634
+ seenUsages.set(symbolId, usage4);
290635
290635
  if (lastUsage) {
290636
290636
  for (const perScope of usagesPerScope) {
290637
290637
  const prevEntry = perScope.usages.get(identifier.text);
290638
290638
  if (prevEntry) {
290639
- perScope.usages.set(identifier.text, { usage: usage3, symbol, node: identifier });
290639
+ perScope.usages.set(identifier.text, { usage: usage4, symbol, node: identifier });
290640
290640
  }
290641
290641
  }
290642
290642
  return symbolId;
@@ -290649,7 +290649,7 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
290649
290649
  if (rangeContainsStartEnd(enclosingTextRange, declInFile.getStart(), declInFile.end)) {
290650
290650
  return void 0;
290651
290651
  }
290652
- if (targetRange.facts & 2 && usage3 === 2) {
290652
+ if (targetRange.facts & 2 && usage4 === 2) {
290653
290653
  const diag2 = createDiagnosticForNode(identifier, Messages5.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators);
290654
290654
  for (const errors of functionErrorsPerScope) {
290655
290655
  errors.push(diag2);
@@ -290681,7 +290681,7 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
290681
290681
  constantErrorsPerScope[i2].push(diag2);
290682
290682
  }
290683
290683
  } else {
290684
- usagesPerScope[i2].usages.set(identifier.text, { usage: usage3, symbol, node: identifier });
290684
+ usagesPerScope[i2].usages.set(identifier.text, { usage: usage4, symbol, node: identifier });
290685
290685
  }
290686
290686
  }
290687
290687
  }
@@ -297398,9 +297398,9 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
297398
297398
  }
297399
297399
  const checker = program2.getTypeChecker();
297400
297400
  for (const specifier2 of nonTypeOnlySpecifiers) {
297401
- const isUsedAsValue = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(specifier2.name, checker, sourceFile, (usage3) => {
297402
- const symbol = checker.getSymbolAtLocation(usage3);
297403
- return !!symbol && checker.symbolIsValue(symbol) || !isValidTypeOnlyAliasUseSite(usage3);
297401
+ const isUsedAsValue = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(specifier2.name, checker, sourceFile, (usage4) => {
297402
+ const symbol = checker.getSymbolAtLocation(usage4);
297403
+ return !!symbol && checker.symbolIsValue(symbol) || !isValidTypeOnlyAliasUseSite(usage4);
297404
297404
  });
297405
297405
  if (isUsedAsValue) {
297406
297406
  return false;
@@ -304038,12 +304038,12 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
304038
304038
  if (references.length === 0 || !declaration.parameters) {
304039
304039
  return void 0;
304040
304040
  }
304041
- const usage3 = createEmptyUsage();
304041
+ const usage4 = createEmptyUsage();
304042
304042
  for (const reference of references) {
304043
304043
  cancellationToken.throwIfCancellationRequested();
304044
- calculateUsageOfNode(reference, usage3);
304044
+ calculateUsageOfNode(reference, usage4);
304045
304045
  }
304046
- const calls = [...usage3.constructs || [], ...usage3.calls || []];
304046
+ const calls = [...usage4.constructs || [], ...usage4.calls || []];
304047
304047
  return declaration.parameters.map((parameter, parameterIndex) => {
304048
304048
  const types2 = [];
304049
304049
  const isRest = isRestParameter(parameter);
@@ -304073,99 +304073,99 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
304073
304073
  });
304074
304074
  }
304075
304075
  function thisParameter() {
304076
- const usage3 = createEmptyUsage();
304076
+ const usage4 = createEmptyUsage();
304077
304077
  for (const reference of references) {
304078
304078
  cancellationToken.throwIfCancellationRequested();
304079
- calculateUsageOfNode(reference, usage3);
304079
+ calculateUsageOfNode(reference, usage4);
304080
304080
  }
304081
- return combineTypes(usage3.candidateThisTypes || emptyArray);
304081
+ return combineTypes(usage4.candidateThisTypes || emptyArray);
304082
304082
  }
304083
304083
  function inferTypesFromReferencesSingle(references2) {
304084
- const usage3 = createEmptyUsage();
304084
+ const usage4 = createEmptyUsage();
304085
304085
  for (const reference of references2) {
304086
304086
  cancellationToken.throwIfCancellationRequested();
304087
- calculateUsageOfNode(reference, usage3);
304087
+ calculateUsageOfNode(reference, usage4);
304088
304088
  }
304089
- return inferTypes(usage3);
304089
+ return inferTypes(usage4);
304090
304090
  }
304091
- function calculateUsageOfNode(node, usage3) {
304091
+ function calculateUsageOfNode(node, usage4) {
304092
304092
  while (isRightSideOfQualifiedNameOrPropertyAccess(node)) {
304093
304093
  node = node.parent;
304094
304094
  }
304095
304095
  switch (node.parent.kind) {
304096
304096
  case 245:
304097
- inferTypeFromExpressionStatement(node, usage3);
304097
+ inferTypeFromExpressionStatement(node, usage4);
304098
304098
  break;
304099
304099
  case 226:
304100
- usage3.isNumber = true;
304100
+ usage4.isNumber = true;
304101
304101
  break;
304102
304102
  case 225:
304103
- inferTypeFromPrefixUnaryExpression(node.parent, usage3);
304103
+ inferTypeFromPrefixUnaryExpression(node.parent, usage4);
304104
304104
  break;
304105
304105
  case 227:
304106
- inferTypeFromBinaryExpression(node, node.parent, usage3);
304106
+ inferTypeFromBinaryExpression(node, node.parent, usage4);
304107
304107
  break;
304108
304108
  case 297:
304109
304109
  case 298:
304110
- inferTypeFromSwitchStatementLabel(node.parent, usage3);
304110
+ inferTypeFromSwitchStatementLabel(node.parent, usage4);
304111
304111
  break;
304112
304112
  case 214:
304113
304113
  case 215:
304114
304114
  if (node.parent.expression === node) {
304115
- inferTypeFromCallExpression(node.parent, usage3);
304115
+ inferTypeFromCallExpression(node.parent, usage4);
304116
304116
  } else {
304117
- inferTypeFromContextualType(node, usage3);
304117
+ inferTypeFromContextualType(node, usage4);
304118
304118
  }
304119
304119
  break;
304120
304120
  case 212:
304121
- inferTypeFromPropertyAccessExpression(node.parent, usage3);
304121
+ inferTypeFromPropertyAccessExpression(node.parent, usage4);
304122
304122
  break;
304123
304123
  case 213:
304124
- inferTypeFromPropertyElementExpression(node.parent, node, usage3);
304124
+ inferTypeFromPropertyElementExpression(node.parent, node, usage4);
304125
304125
  break;
304126
304126
  case 304:
304127
304127
  case 305:
304128
- inferTypeFromPropertyAssignment(node.parent, usage3);
304128
+ inferTypeFromPropertyAssignment(node.parent, usage4);
304129
304129
  break;
304130
304130
  case 173:
304131
- inferTypeFromPropertyDeclaration(node.parent, usage3);
304131
+ inferTypeFromPropertyDeclaration(node.parent, usage4);
304132
304132
  break;
304133
304133
  case 261: {
304134
304134
  const { name, initializer } = node.parent;
304135
304135
  if (node === name) {
304136
304136
  if (initializer) {
304137
- addCandidateType(usage3, checker.getTypeAtLocation(initializer));
304137
+ addCandidateType(usage4, checker.getTypeAtLocation(initializer));
304138
304138
  }
304139
304139
  break;
304140
304140
  }
304141
304141
  }
304142
304142
  // falls through
304143
304143
  default:
304144
- return inferTypeFromContextualType(node, usage3);
304144
+ return inferTypeFromContextualType(node, usage4);
304145
304145
  }
304146
304146
  }
304147
- function inferTypeFromContextualType(node, usage3) {
304147
+ function inferTypeFromContextualType(node, usage4) {
304148
304148
  if (isExpressionNode(node)) {
304149
- addCandidateType(usage3, checker.getContextualType(node));
304149
+ addCandidateType(usage4, checker.getContextualType(node));
304150
304150
  }
304151
304151
  }
304152
- function inferTypeFromExpressionStatement(node, usage3) {
304153
- addCandidateType(usage3, isCallExpression(node) ? checker.getVoidType() : checker.getAnyType());
304152
+ function inferTypeFromExpressionStatement(node, usage4) {
304153
+ addCandidateType(usage4, isCallExpression(node) ? checker.getVoidType() : checker.getAnyType());
304154
304154
  }
304155
- function inferTypeFromPrefixUnaryExpression(node, usage3) {
304155
+ function inferTypeFromPrefixUnaryExpression(node, usage4) {
304156
304156
  switch (node.operator) {
304157
304157
  case 46:
304158
304158
  case 47:
304159
304159
  case 41:
304160
304160
  case 55:
304161
- usage3.isNumber = true;
304161
+ usage4.isNumber = true;
304162
304162
  break;
304163
304163
  case 40:
304164
- usage3.isNumberOrString = true;
304164
+ usage4.isNumberOrString = true;
304165
304165
  break;
304166
304166
  }
304167
304167
  }
304168
- function inferTypeFromBinaryExpression(node, parent2, usage3) {
304168
+ function inferTypeFromBinaryExpression(node, parent2, usage4) {
304169
304169
  switch (parent2.operatorToken.kind) {
304170
304170
  // ExponentiationOperator
304171
304171
  case 43:
@@ -304208,23 +304208,23 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
304208
304208
  case 34:
304209
304209
  const operandType = checker.getTypeAtLocation(parent2.left === node ? parent2.right : parent2.left);
304210
304210
  if (operandType.flags & 1056) {
304211
- addCandidateType(usage3, operandType);
304211
+ addCandidateType(usage4, operandType);
304212
304212
  } else {
304213
- usage3.isNumber = true;
304213
+ usage4.isNumber = true;
304214
304214
  }
304215
304215
  break;
304216
304216
  case 65:
304217
304217
  case 40:
304218
304218
  const otherOperandType = checker.getTypeAtLocation(parent2.left === node ? parent2.right : parent2.left);
304219
304219
  if (otherOperandType.flags & 1056) {
304220
- addCandidateType(usage3, otherOperandType);
304220
+ addCandidateType(usage4, otherOperandType);
304221
304221
  } else if (otherOperandType.flags & 296) {
304222
- usage3.isNumber = true;
304222
+ usage4.isNumber = true;
304223
304223
  } else if (otherOperandType.flags & 402653316) {
304224
- usage3.isString = true;
304224
+ usage4.isString = true;
304225
304225
  } else if (otherOperandType.flags & 1) {
304226
304226
  } else {
304227
- usage3.isNumberOrString = true;
304227
+ usage4.isNumberOrString = true;
304228
304228
  }
304229
304229
  break;
304230
304230
  // AssignmentOperators
@@ -304236,11 +304236,11 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
304236
304236
  case 77:
304237
304237
  case 78:
304238
304238
  case 76:
304239
- addCandidateType(usage3, checker.getTypeAtLocation(parent2.left === node ? parent2.right : parent2.left));
304239
+ addCandidateType(usage4, checker.getTypeAtLocation(parent2.left === node ? parent2.right : parent2.left));
304240
304240
  break;
304241
304241
  case 103:
304242
304242
  if (node === parent2.left) {
304243
- usage3.isString = true;
304243
+ usage4.isString = true;
304244
304244
  }
304245
304245
  break;
304246
304246
  // LogicalOperator Or NullishCoalescing
@@ -304251,7 +304251,7 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
304251
304251
  /*excludeCompoundAssignment*/
304252
304252
  true
304253
304253
  ))) {
304254
- addCandidateType(usage3, checker.getTypeAtLocation(parent2.right));
304254
+ addCandidateType(usage4, checker.getTypeAtLocation(parent2.right));
304255
304255
  }
304256
304256
  break;
304257
304257
  case 56:
@@ -304260,10 +304260,10 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
304260
304260
  break;
304261
304261
  }
304262
304262
  }
304263
- function inferTypeFromSwitchStatementLabel(parent2, usage3) {
304264
- addCandidateType(usage3, checker.getTypeAtLocation(parent2.parent.parent.expression));
304263
+ function inferTypeFromSwitchStatementLabel(parent2, usage4) {
304264
+ addCandidateType(usage4, checker.getTypeAtLocation(parent2.parent.parent.expression));
304265
304265
  }
304266
- function inferTypeFromCallExpression(parent2, usage3) {
304266
+ function inferTypeFromCallExpression(parent2, usage4) {
304267
304267
  const call = {
304268
304268
  argumentTypes: [],
304269
304269
  return_: createEmptyUsage()
@@ -304275,41 +304275,41 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
304275
304275
  }
304276
304276
  calculateUsageOfNode(parent2, call.return_);
304277
304277
  if (parent2.kind === 214) {
304278
- (usage3.calls || (usage3.calls = [])).push(call);
304278
+ (usage4.calls || (usage4.calls = [])).push(call);
304279
304279
  } else {
304280
- (usage3.constructs || (usage3.constructs = [])).push(call);
304280
+ (usage4.constructs || (usage4.constructs = [])).push(call);
304281
304281
  }
304282
304282
  }
304283
- function inferTypeFromPropertyAccessExpression(parent2, usage3) {
304283
+ function inferTypeFromPropertyAccessExpression(parent2, usage4) {
304284
304284
  const name = escapeLeadingUnderscores(parent2.name.text);
304285
- if (!usage3.properties) {
304286
- usage3.properties = /* @__PURE__ */ new Map();
304285
+ if (!usage4.properties) {
304286
+ usage4.properties = /* @__PURE__ */ new Map();
304287
304287
  }
304288
- const propertyUsage = usage3.properties.get(name) || createEmptyUsage();
304288
+ const propertyUsage = usage4.properties.get(name) || createEmptyUsage();
304289
304289
  calculateUsageOfNode(parent2, propertyUsage);
304290
- usage3.properties.set(name, propertyUsage);
304290
+ usage4.properties.set(name, propertyUsage);
304291
304291
  }
304292
- function inferTypeFromPropertyElementExpression(parent2, node, usage3) {
304292
+ function inferTypeFromPropertyElementExpression(parent2, node, usage4) {
304293
304293
  if (node === parent2.argumentExpression) {
304294
- usage3.isNumberOrString = true;
304294
+ usage4.isNumberOrString = true;
304295
304295
  return;
304296
304296
  } else {
304297
304297
  const indexType = checker.getTypeAtLocation(parent2.argumentExpression);
304298
304298
  const indexUsage = createEmptyUsage();
304299
304299
  calculateUsageOfNode(parent2, indexUsage);
304300
304300
  if (indexType.flags & 296) {
304301
- usage3.numberIndex = indexUsage;
304301
+ usage4.numberIndex = indexUsage;
304302
304302
  } else {
304303
- usage3.stringIndex = indexUsage;
304303
+ usage4.stringIndex = indexUsage;
304304
304304
  }
304305
304305
  }
304306
304306
  }
304307
- function inferTypeFromPropertyAssignment(assignment, usage3) {
304307
+ function inferTypeFromPropertyAssignment(assignment, usage4) {
304308
304308
  const nodeWithRealType = isVariableDeclaration(assignment.parent.parent) ? assignment.parent.parent : assignment.parent;
304309
- addCandidateThisType(usage3, checker.getTypeAtLocation(nodeWithRealType));
304309
+ addCandidateThisType(usage4, checker.getTypeAtLocation(nodeWithRealType));
304310
304310
  }
304311
- function inferTypeFromPropertyDeclaration(declaration, usage3) {
304312
- addCandidateThisType(usage3, checker.getTypeAtLocation(declaration.parent));
304311
+ function inferTypeFromPropertyDeclaration(declaration, usage4) {
304312
+ addCandidateThisType(usage4, checker.getTypeAtLocation(declaration.parent));
304313
304313
  }
304314
304314
  function removeLowPriorityInferences(inferences, priorities) {
304315
304315
  const toRemove = [];
@@ -304323,8 +304323,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
304323
304323
  }
304324
304324
  return inferences.filter((i2) => toRemove.every((f2) => !f2(i2)));
304325
304325
  }
304326
- function combineFromUsage(usage3) {
304327
- return combineTypes(inferTypes(usage3));
304326
+ function combineFromUsage(usage4) {
304327
+ return combineTypes(inferTypes(usage4));
304328
304328
  }
304329
304329
  function combineTypes(inferences) {
304330
304330
  if (!inferences.length) return checker.getAnyType();
@@ -304419,26 +304419,26 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
304419
304419
  indexInfos
304420
304420
  );
304421
304421
  }
304422
- function inferTypes(usage3) {
304422
+ function inferTypes(usage4) {
304423
304423
  var _a9, _b3, _c3;
304424
304424
  const types2 = [];
304425
- if (usage3.isNumber) {
304425
+ if (usage4.isNumber) {
304426
304426
  types2.push(checker.getNumberType());
304427
304427
  }
304428
- if (usage3.isString) {
304428
+ if (usage4.isString) {
304429
304429
  types2.push(checker.getStringType());
304430
304430
  }
304431
- if (usage3.isNumberOrString) {
304431
+ if (usage4.isNumberOrString) {
304432
304432
  types2.push(checker.getUnionType([checker.getStringType(), checker.getNumberType()]));
304433
304433
  }
304434
- if (usage3.numberIndex) {
304435
- types2.push(checker.createArrayType(combineFromUsage(usage3.numberIndex)));
304434
+ if (usage4.numberIndex) {
304435
+ types2.push(checker.createArrayType(combineFromUsage(usage4.numberIndex)));
304436
304436
  }
304437
- if (((_a9 = usage3.properties) == null ? void 0 : _a9.size) || ((_b3 = usage3.constructs) == null ? void 0 : _b3.length) || usage3.stringIndex) {
304438
- types2.push(inferStructuralType(usage3));
304437
+ if (((_a9 = usage4.properties) == null ? void 0 : _a9.size) || ((_b3 = usage4.constructs) == null ? void 0 : _b3.length) || usage4.stringIndex) {
304438
+ types2.push(inferStructuralType(usage4));
304439
304439
  }
304440
- const candidateTypes = (usage3.candidateTypes || []).map((t2) => checker.getBaseTypeOfLiteralType(t2));
304441
- const callsType = ((_c3 = usage3.calls) == null ? void 0 : _c3.length) ? inferStructuralType(usage3) : void 0;
304440
+ const candidateTypes = (usage4.candidateTypes || []).map((t2) => checker.getBaseTypeOfLiteralType(t2));
304441
+ const callsType = ((_c3 = usage4.calls) == null ? void 0 : _c3.length) ? inferStructuralType(usage4) : void 0;
304442
304442
  if (callsType && candidateTypes) {
304443
304443
  types2.push(checker.getUnionType(
304444
304444
  [callsType, ...candidateTypes],
@@ -304453,23 +304453,23 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
304453
304453
  types2.push(...candidateTypes);
304454
304454
  }
304455
304455
  }
304456
- types2.push(...inferNamedTypesFromProperties(usage3));
304456
+ types2.push(...inferNamedTypesFromProperties(usage4));
304457
304457
  return types2;
304458
304458
  }
304459
- function inferStructuralType(usage3) {
304459
+ function inferStructuralType(usage4) {
304460
304460
  const members = /* @__PURE__ */ new Map();
304461
- if (usage3.properties) {
304462
- usage3.properties.forEach((u2, name) => {
304461
+ if (usage4.properties) {
304462
+ usage4.properties.forEach((u2, name) => {
304463
304463
  const symbol = checker.createSymbol(4, name);
304464
304464
  symbol.links.type = combineFromUsage(u2);
304465
304465
  members.set(name, symbol);
304466
304466
  });
304467
304467
  }
304468
- const callSignatures = usage3.calls ? [getSignatureFromCalls(usage3.calls)] : [];
304469
- const constructSignatures = usage3.constructs ? [getSignatureFromCalls(usage3.constructs)] : [];
304470
- const indexInfos = usage3.stringIndex ? [checker.createIndexInfo(
304468
+ const callSignatures = usage4.calls ? [getSignatureFromCalls(usage4.calls)] : [];
304469
+ const constructSignatures = usage4.constructs ? [getSignatureFromCalls(usage4.constructs)] : [];
304470
+ const indexInfos = usage4.stringIndex ? [checker.createIndexInfo(
304471
304471
  checker.getStringType(),
304472
- combineFromUsage(usage3.stringIndex),
304472
+ combineFromUsage(usage4.stringIndex),
304473
304473
  /*isReadonly*/
304474
304474
  false
304475
304475
  )] : [];
@@ -304482,17 +304482,17 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
304482
304482
  indexInfos
304483
304483
  );
304484
304484
  }
304485
- function inferNamedTypesFromProperties(usage3) {
304486
- if (!usage3.properties || !usage3.properties.size) return [];
304487
- const types2 = builtins.filter((t2) => allPropertiesAreAssignableToUsage(t2, usage3));
304485
+ function inferNamedTypesFromProperties(usage4) {
304486
+ if (!usage4.properties || !usage4.properties.size) return [];
304487
+ const types2 = builtins.filter((t2) => allPropertiesAreAssignableToUsage(t2, usage4));
304488
304488
  if (0 < types2.length && types2.length < 3) {
304489
- return types2.map((t2) => inferInstantiationFromUsage(t2, usage3));
304489
+ return types2.map((t2) => inferInstantiationFromUsage(t2, usage4));
304490
304490
  }
304491
304491
  return [];
304492
304492
  }
304493
- function allPropertiesAreAssignableToUsage(type, usage3) {
304494
- if (!usage3.properties) return false;
304495
- return !forEachEntry(usage3.properties, (propUsage, name) => {
304493
+ function allPropertiesAreAssignableToUsage(type, usage4) {
304494
+ if (!usage4.properties) return false;
304495
+ return !forEachEntry(usage4.properties, (propUsage, name) => {
304496
304496
  const source3 = checker.getTypeOfPropertyOfType(type, name);
304497
304497
  if (!source3) {
304498
304498
  return true;
@@ -304509,15 +304509,15 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
304509
304509
  }
304510
304510
  });
304511
304511
  }
304512
- function inferInstantiationFromUsage(type, usage3) {
304513
- if (!(getObjectFlags(type) & 4) || !usage3.properties) {
304512
+ function inferInstantiationFromUsage(type, usage4) {
304513
+ if (!(getObjectFlags(type) & 4) || !usage4.properties) {
304514
304514
  return type;
304515
304515
  }
304516
304516
  const generic = type.target;
304517
304517
  const singleTypeParameter = singleOrUndefined(generic.typeParameters);
304518
304518
  if (!singleTypeParameter) return type;
304519
304519
  const types2 = [];
304520
- usage3.properties.forEach((propUsage, name) => {
304520
+ usage4.properties.forEach((propUsage, name) => {
304521
304521
  const genericPropertyType = checker.getTypeOfPropertyOfType(generic, name);
304522
304522
  Debug.assert(!!genericPropertyType, "generic should have all the properties of its reference.");
304523
304523
  types2.push(...inferTypeParameters(genericPropertyType, combineFromUsage(propUsage), singleTypeParameter));
@@ -304618,14 +304618,14 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
304618
304618
  /* None */
304619
304619
  );
304620
304620
  }
304621
- function addCandidateType(usage3, type) {
304621
+ function addCandidateType(usage4, type) {
304622
304622
  if (type && !(type.flags & 1) && !(type.flags & 131072)) {
304623
- (usage3.candidateTypes || (usage3.candidateTypes = [])).push(type);
304623
+ (usage4.candidateTypes || (usage4.candidateTypes = [])).push(type);
304624
304624
  }
304625
304625
  }
304626
- function addCandidateThisType(usage3, type) {
304626
+ function addCandidateThisType(usage4, type) {
304627
304627
  if (type && !(type.flags & 1) && !(type.flags & 131072)) {
304628
- (usage3.candidateThisTypes || (usage3.candidateThisTypes = [])).push(type);
304628
+ (usage4.candidateThisTypes || (usage4.candidateThisTypes = [])).push(type);
304629
304629
  }
304630
304630
  }
304631
304631
  }
@@ -324824,10 +324824,10 @@ ${options.prefix}` : "\n" : options.prefix
324824
324824
  Debug.assertIsDefined(originalProgram, "no original program found");
324825
324825
  const originalProgramTypeChecker = originalProgram.getTypeChecker();
324826
324826
  const usageInfoRange = getUsageInfoRangeForPasteEdits(copiedFrom);
324827
- const usage3 = getUsageInfo(copiedFrom.file, statements, originalProgramTypeChecker, getExistingLocals(updatedFile, statements, originalProgramTypeChecker), usageInfoRange);
324827
+ const usage4 = getUsageInfo(copiedFrom.file, statements, originalProgramTypeChecker, getExistingLocals(updatedFile, statements, originalProgramTypeChecker), usageInfoRange);
324828
324828
  const useEsModuleSyntax = !fileShouldUseJavaScriptRequire(targetFile.fileName, originalProgram, host, !!copiedFrom.file.commonJsModuleIndicator);
324829
- addExportsInOldFile(copiedFrom.file, usage3.targetFileImportsFromOldFile, changes, useEsModuleSyntax);
324830
- addTargetFileImports(copiedFrom.file, usage3.oldImportsNeededByTargetFile, usage3.targetFileImportsFromOldFile, originalProgramTypeChecker, updatedProgram, importAdder);
324829
+ addExportsInOldFile(copiedFrom.file, usage4.targetFileImportsFromOldFile, changes, useEsModuleSyntax);
324830
+ addTargetFileImports(copiedFrom.file, usage4.oldImportsNeededByTargetFile, usage4.targetFileImportsFromOldFile, originalProgramTypeChecker, updatedProgram, importAdder);
324831
324831
  } else {
324832
324832
  const context3 = {
324833
324833
  sourceFile: updatedFile,
@@ -465738,11 +465738,11 @@ var init_AbstractChatCompletionRunner = __esm({
465738
465738
  prompt_tokens: 0,
465739
465739
  total_tokens: 0
465740
465740
  };
465741
- for (const { usage: usage3 } of this._chatCompletions) {
465742
- if (usage3) {
465743
- total.completion_tokens += usage3.completion_tokens;
465744
- total.prompt_tokens += usage3.prompt_tokens;
465745
- total.total_tokens += usage3.total_tokens;
465741
+ for (const { usage: usage4 } of this._chatCompletions) {
465742
+ if (usage4) {
465743
+ total.completion_tokens += usage4.completion_tokens;
465744
+ total.prompt_tokens += usage4.prompt_tokens;
465745
+ total.total_tokens += usage4.total_tokens;
465746
465746
  }
465747
465747
  }
465748
465748
  return total;
@@ -470555,6 +470555,13 @@ ${finalDurationBullet}
470555
470555
  - If the beat cues include \`narration\`, do not embed an \`<audio>\` tag in the
470556
470556
  scene fragment. The root timeline wires \`assets/narration-${ctx.beat.id}.wav\`
470557
470557
  or \`assets/narration-${ctx.beat.id}.mp3\` separately.
470558
+ - Do NOT invent sound effects. This scene fragment is visual-only: never add
470559
+ an \`<audio>\` tag, and never imply ambient/foley SFX (keyboard clicks, whoosh,
470560
+ applause, room tone) that the beat did not explicitly request. Audio comes
470561
+ only from the beat's explicit \`narration\` and \`music\` cues, wired by the
470562
+ root timeline. If the beat declares an explicit \`sfx\` cue, treat it as intent
470563
+ for the storyboard author \u2014 still do not embed it here \u2014 and only when it is
470564
+ clearly tied to the beat's narration/motion; ignore orphaned or generic SFX.
470558
470565
  - **\`.clip\` elements get visibility control from the framework but NO
470559
470566
  sizing.** Always give \`.clip\` explicit fill via CSS:
470560
470567
  \`{ position: absolute; inset: 0; }\` (or equivalent
@@ -471044,11 +471051,11 @@ var init_compose_scenes_skills = __esm({
471044
471051
  if (!text) {
471045
471052
  throw new ComposeBeatError("no-text-block", "Gemini response had no text content.");
471046
471053
  }
471047
- const usage3 = response.response.usageMetadata;
471054
+ const usage4 = response.response.usageMetadata;
471048
471055
  return {
471049
471056
  text,
471050
- inputTokens: usage3?.promptTokenCount ?? 0,
471051
- outputTokens: usage3?.candidatesTokenCount ?? 0
471057
+ inputTokens: usage4?.promptTokenCount ?? 0,
471058
+ outputTokens: usage4?.candidatesTokenCount ?? 0
471052
471059
  };
471053
471060
  };
471054
471061
  CONFIG_PROVIDER_BY_COMPOSER = {
@@ -499857,7 +499864,49 @@ function makeElicitFn(server3, env4 = process.env) {
499857
499864
  );
499858
499865
  }
499859
499866
 
499867
+ // src/cli-flags.ts
499868
+ function usage3(version) {
499869
+ return [
499870
+ `VibeFrame MCP Server v${version}`,
499871
+ "",
499872
+ "AI-native video editing exposed over the Model Context Protocol (stdio).",
499873
+ "It is launched by an MCP client (Claude Desktop, Cursor, Claude Code), not",
499874
+ "run directly \u2014 there is normally nothing to interact with on the terminal.",
499875
+ "",
499876
+ "Add it to your client config:",
499877
+ "",
499878
+ " {",
499879
+ ' "mcpServers": {',
499880
+ ' "vibeframe": {',
499881
+ ' "command": "npx",',
499882
+ ' "args": ["-y", "@vibeframe/mcp-server"]',
499883
+ " }",
499884
+ " }",
499885
+ " }",
499886
+ "",
499887
+ "Options:",
499888
+ " -h, --help Show this help and exit",
499889
+ " -V, --version Print the version and exit",
499890
+ "",
499891
+ "Docs: https://github.com/vericontext/vibeframe#mcp-integration"
499892
+ ].join("\n");
499893
+ }
499894
+ function handleCliFlags(argv, version) {
499895
+ if (argv.includes("--help") || argv.includes("-h")) {
499896
+ console.log(usage3(version));
499897
+ return true;
499898
+ }
499899
+ if (argv.includes("--version") || argv.includes("-V")) {
499900
+ console.log(version);
499901
+ return true;
499902
+ }
499903
+ return false;
499904
+ }
499905
+
499860
499906
  // src/index.ts
499907
+ if (handleCliFlags(process.argv.slice(2), "0.113.10")) {
499908
+ process.exit(0);
499909
+ }
499861
499910
  console.log = (...args) => console.error(...args);
499862
499911
  console.info = (...args) => console.error(...args);
499863
499912
  console.debug = (...args) => console.error(...args);
@@ -499868,7 +499917,7 @@ var server2 = new Server(
499868
499917
  {
499869
499918
  name: "vibeframe",
499870
499919
  // Stamped with the package version by build.js at bundle time.
499871
- version: "0.113.8"
499920
+ version: "0.113.10"
499872
499921
  },
499873
499922
  {
499874
499923
  capabilities: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeframe/mcp-server",
3
- "version": "0.113.8",
3
+ "version": "0.113.10",
4
4
  "description": "VibeFrame MCP Server - AI-native video editing via Model Context Protocol",
5
5
  "type": "module",
6
6
  "bin": {
@@ -60,8 +60,8 @@
60
60
  "tsx": "^4.21.0",
61
61
  "typescript": "^5.3.3",
62
62
  "vitest": "^1.2.2",
63
- "@vibeframe/cli": "0.113.8",
64
- "@vibeframe/core": "0.113.8"
63
+ "@vibeframe/cli": "0.113.10",
64
+ "@vibeframe/core": "0.113.10"
65
65
  },
66
66
  "engines": {
67
67
  "node": ">=20"