@vibgrate/cli 2026.618.1 → 2026.623.1

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.
@@ -2507,7 +2507,7 @@ var require_typescript = __commonJS({
2507
2507
  SymbolDisplayPartKind: () => SymbolDisplayPartKind,
2508
2508
  SymbolFlags: () => SymbolFlags,
2509
2509
  SymbolFormatFlags: () => SymbolFormatFlags,
2510
- SyntaxKind: () => SyntaxKind20,
2510
+ SyntaxKind: () => SyntaxKind21,
2511
2511
  Ternary: () => Ternary,
2512
2512
  ThrottledCancellationToken: () => ThrottledCancellationToken,
2513
2513
  TokenClass: () => TokenClass,
@@ -6398,7 +6398,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
6398
6398
  function formatSyntaxKind(kind) {
6399
6399
  return formatEnum(
6400
6400
  kind,
6401
- SyntaxKind20,
6401
+ SyntaxKind21,
6402
6402
  /*isFlags*/
6403
6403
  false
6404
6404
  );
@@ -7846,7 +7846,7 @@ ${lanes.join("\n")}
7846
7846
  })(tracingEnabled || (tracingEnabled = {}));
7847
7847
  var startTracing = tracingEnabled.startTracing;
7848
7848
  var dumpTracingLegend = tracingEnabled.dumpLegend;
7849
- var SyntaxKind20 = /* @__PURE__ */ ((SyntaxKind52) => {
7849
+ var SyntaxKind21 = /* @__PURE__ */ ((SyntaxKind52) => {
7850
7850
  SyntaxKind52[SyntaxKind52["Unknown"] = 0] = "Unknown";
7851
7851
  SyntaxKind52[SyntaxKind52["EndOfFileToken"] = 1] = "EndOfFileToken";
7852
7852
  SyntaxKind52[SyntaxKind52["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia";
@@ -8352,7 +8352,7 @@ ${lanes.join("\n")}
8352
8352
  /* LastKeyword */
8353
8353
  ] = "LastContextualKeyword";
8354
8354
  return SyntaxKind52;
8355
- })(SyntaxKind20 || {});
8355
+ })(SyntaxKind21 || {});
8356
8356
  var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => {
8357
8357
  NodeFlags3[NodeFlags3["None"] = 0] = "None";
8358
8358
  NodeFlags3[NodeFlags3["Let"] = 1] = "Let";
@@ -198758,7 +198758,7 @@ ${options.prefix}` : "\n" : options.prefix
198758
198758
  SymbolDisplayPartKind: () => SymbolDisplayPartKind,
198759
198759
  SymbolFlags: () => SymbolFlags,
198760
198760
  SymbolFormatFlags: () => SymbolFormatFlags,
198761
- SyntaxKind: () => SyntaxKind20,
198761
+ SyntaxKind: () => SyntaxKind21,
198762
198762
  Ternary: () => Ternary,
198763
198763
  ThrottledCancellationToken: () => ThrottledCancellationToken,
198764
198764
  TokenClass: () => TokenClass,
@@ -222984,7 +222984,7 @@ var require_ts_morph = __commonJS({
222984
222984
  const nameNode = node.getNameNode();
222985
222985
  if (nameNode == null)
222986
222986
  return false;
222987
- if (Node8.isArrayBindingPattern(nameNode) || Node8.isObjectBindingPattern(nameNode))
222987
+ if (Node9.isArrayBindingPattern(nameNode) || Node9.isObjectBindingPattern(nameNode))
222988
222988
  return nameNode.getElements().some((element) => nodeHasName(element, name));
222989
222989
  const nodeName = node.getName != null ? node.getName() : nameNode.getText();
222990
222990
  return nodeName === name;
@@ -223414,7 +223414,7 @@ var require_ts_morph = __commonJS({
223414
223414
  }
223415
223415
  function checkNodeIsAmbient(node) {
223416
223416
  const isThisAmbient = (node.getCombinedModifierFlags() & common.ts.ModifierFlags.Ambient) === common.ts.ModifierFlags.Ambient;
223417
- return isThisAmbient || Node8.isInterfaceDeclaration(node) || Node8.isTypeAliasDeclaration(node);
223417
+ return isThisAmbient || Node9.isInterfaceDeclaration(node) || Node9.isTypeAliasDeclaration(node);
223418
223418
  }
223419
223419
  function isStringKind(kind) {
223420
223420
  switch (kind) {
@@ -223815,15 +223815,15 @@ var require_ts_morph = __commonJS({
223815
223815
  #getSourceFileForLiteral(literal) {
223816
223816
  const parent = literal.getParentOrThrow();
223817
223817
  const grandParent = parent.getParent();
223818
- if (Node8.isImportDeclaration(parent) || Node8.isExportDeclaration(parent))
223818
+ if (Node9.isImportDeclaration(parent) || Node9.isExportDeclaration(parent))
223819
223819
  return parent.getModuleSpecifierSourceFile();
223820
- else if (grandParent != null && Node8.isImportEqualsDeclaration(grandParent))
223820
+ else if (grandParent != null && Node9.isImportEqualsDeclaration(grandParent))
223821
223821
  return grandParent.getExternalModuleReferenceSourceFile();
223822
- else if (grandParent != null && Node8.isImportTypeNode(grandParent)) {
223822
+ else if (grandParent != null && Node9.isImportTypeNode(grandParent)) {
223823
223823
  const importTypeSymbol = grandParent.getSymbol();
223824
223824
  if (importTypeSymbol != null)
223825
223825
  return ModuleUtils.getReferencedSourceFileFromSymbol(importTypeSymbol);
223826
- } else if (Node8.isCallExpression(parent)) {
223826
+ } else if (Node9.isCallExpression(parent)) {
223827
223827
  const literalSymbol = literal.getSymbol();
223828
223828
  if (literalSymbol != null)
223829
223829
  return ModuleUtils.getReferencedSourceFileFromSymbol(literalSymbol);
@@ -223915,16 +223915,16 @@ var require_ts_morph = __commonJS({
223915
223915
  FormattingKind2[FormattingKind2["None"] = 3] = "None";
223916
223916
  })(FormattingKind || (FormattingKind = {}));
223917
223917
  function getClassMemberFormatting(parent, member) {
223918
- if (Node8.isAmbientable(parent) && parent.isAmbient())
223918
+ if (Node9.isAmbientable(parent) && parent.isAmbient())
223919
223919
  return FormattingKind.Newline;
223920
223920
  if (hasBody$1(member))
223921
223921
  return FormattingKind.Blankline;
223922
223922
  return FormattingKind.Newline;
223923
223923
  }
223924
223924
  function hasBody$1(node) {
223925
- if (Node8.isBodyable(node) && node.getBody() != null)
223925
+ if (Node9.isBodyable(node) && node.getBody() != null)
223926
223926
  return true;
223927
- if (Node8.isBodied(node))
223927
+ if (Node9.isBodied(node))
223928
223928
  return true;
223929
223929
  return false;
223930
223930
  }
@@ -223946,11 +223946,11 @@ var require_ts_morph = __commonJS({
223946
223946
  return FormattingKind.Newline;
223947
223947
  }
223948
223948
  function hasBody(node) {
223949
- if (Node8.isBodyable(node) && node.hasBody())
223949
+ if (Node9.isBodyable(node) && node.hasBody())
223950
223950
  return true;
223951
- if (Node8.isBodied(node))
223951
+ if (Node9.isBodied(node))
223952
223952
  return true;
223953
- return Node8.isInterfaceDeclaration(node) || Node8.isClassDeclaration(node) || Node8.isEnumDeclaration(node);
223953
+ return Node9.isInterfaceDeclaration(node) || Node9.isClassDeclaration(node) || Node9.isEnumDeclaration(node);
223954
223954
  }
223955
223955
  function getStatementedNodeChildFormatting(parent, member) {
223956
223956
  if (hasBody(member))
@@ -223961,9 +223961,9 @@ var require_ts_morph = __commonJS({
223961
223961
  return FormattingKind.Newline;
223962
223962
  }
223963
223963
  function getGeneralFormatting(parent, child) {
223964
- if (Node8.isClassDeclaration(parent))
223964
+ if (Node9.isClassDeclaration(parent))
223965
223965
  return getClassMemberFormatting(parent, child);
223966
- if (Node8.isInterfaceDeclaration(parent))
223966
+ if (Node9.isInterfaceDeclaration(parent))
223967
223967
  return getInterfaceMemberFormatting();
223968
223968
  return getStatementedNodeChildFormatting(parent, child);
223969
223969
  }
@@ -224137,9 +224137,9 @@ var require_ts_morph = __commonJS({
224137
224137
  function getInsertPosFromIndex(index, syntaxList, children) {
224138
224138
  if (index === 0) {
224139
224139
  const parent = syntaxList.getParentOrThrow();
224140
- if (Node8.isSourceFile(parent))
224140
+ if (Node9.isSourceFile(parent))
224141
224141
  return 0;
224142
- else if (Node8.isCaseClause(parent) || Node8.isDefaultClause(parent)) {
224142
+ else if (Node9.isCaseClause(parent) || Node9.isDefaultClause(parent)) {
224143
224143
  const colonToken = parent.getFirstChildByKindOrThrow(common.SyntaxKind.ColonToken);
224144
224144
  return colonToken.getEnd();
224145
224145
  }
@@ -224156,9 +224156,9 @@ var require_ts_morph = __commonJS({
224156
224156
  function getEndPosFromIndex(index, parent, children, fullText) {
224157
224157
  let endPos;
224158
224158
  if (index === children.length) {
224159
- if (Node8.isSourceFile(parent))
224159
+ if (Node9.isSourceFile(parent))
224160
224160
  endPos = parent.getEnd();
224161
- else if (Node8.isCaseClause(parent) || Node8.isDefaultClause(parent))
224161
+ else if (Node9.isCaseClause(parent) || Node9.isDefaultClause(parent))
224162
224162
  endPos = parent.getEnd();
224163
224163
  else {
224164
224164
  const parentContainer = getParentContainerOrThrow(parent);
@@ -224174,14 +224174,14 @@ var require_ts_morph = __commonJS({
224174
224174
  return getPosAtStartOfLineOrNonWhitespace(fullText, endPos);
224175
224175
  }
224176
224176
  function getParentContainerOrThrow(parent) {
224177
- if (Node8.isModuleDeclaration(parent)) {
224177
+ if (Node9.isModuleDeclaration(parent)) {
224178
224178
  const innerBody = parent._getInnerBody();
224179
224179
  if (innerBody == null)
224180
224180
  throw new common.errors.InvalidOperationError("This operation requires the module to have a body.");
224181
224181
  return innerBody;
224182
- } else if (Node8.isBodied(parent))
224182
+ } else if (Node9.isBodied(parent))
224183
224183
  return parent.getBody();
224184
- else if (Node8.isBodyable(parent))
224184
+ else if (Node9.isBodyable(parent))
224185
224185
  return parent.getBodyOrThrow();
224186
224186
  else
224187
224187
  return parent;
@@ -224228,7 +224228,7 @@ var require_ts_morph = __commonJS({
224228
224228
  const result = [];
224229
224229
  for (let i = 0; i < newLength; i++) {
224230
224230
  const currentChild = newChildren[index + i];
224231
- if (allowCommentNodes || !Node8.isCommentNode(currentChild))
224231
+ if (allowCommentNodes || !Node9.isCommentNode(currentChild))
224232
224232
  result.push(currentChild);
224233
224233
  }
224234
224234
  return result;
@@ -224681,7 +224681,7 @@ var require_ts_morph = __commonJS({
224681
224681
  this.#handler = handler;
224682
224682
  }
224683
224683
  handleNode(currentNode, newNode, newSourceFile) {
224684
- if (!Node8.isSourceFile(currentNode))
224684
+ if (!Node9.isSourceFile(currentNode))
224685
224685
  throw new common.errors.InvalidOperationError(`Can only use a TryOrForgetNodeHandler with a source file.`);
224686
224686
  try {
224687
224687
  this.#handler.handleNode(currentNode, newNode, newSourceFile);
@@ -224837,7 +224837,7 @@ var require_ts_morph = __commonJS({
224837
224837
  const lowerIndex = Math.min(newIndex, oldIndex);
224838
224838
  const upperIndex = Math.max(newIndex, oldIndex);
224839
224839
  const childrenInNewOrder = getChildrenInNewOrder();
224840
- const isParentSourceFile = Node8.isSourceFile(parent.getParentOrThrow());
224840
+ const isParentSourceFile = Node9.isSourceFile(parent.getParentOrThrow());
224841
224841
  let finalText = "";
224842
224842
  fillPrefixText();
224843
224843
  fillTextForIndex(lowerIndex);
@@ -225164,14 +225164,14 @@ var require_ts_morph = __commonJS({
225164
225164
  const bodyNode = getBodyNodeOrThrow();
225165
225165
  return [bodyNode.getStart() + 1, bodyNode.getEnd() - 1];
225166
225166
  function getBodyNodeOrThrow() {
225167
- if (Node8.isModuleDeclaration(node)) {
225167
+ if (Node9.isModuleDeclaration(node)) {
225168
225168
  const bodyNode2 = node._getInnerBody();
225169
225169
  if (bodyNode2 == null)
225170
225170
  throw new common.errors.InvalidOperationError("This operation requires the module to have a body.");
225171
225171
  return bodyNode2;
225172
- } else if (Node8.isBodied(node))
225172
+ } else if (Node9.isBodied(node))
225173
225173
  return node.getBody();
225174
- else if (Node8.isBodyable(node))
225174
+ else if (Node9.isBodyable(node))
225175
225175
  return node.getBodyOrThrow();
225176
225176
  else
225177
225177
  common.errors.throwNotImplementedForSyntaxKindError(node.getKind(), node);
@@ -225346,14 +225346,14 @@ Path: ` + sourceFile.getFilePath() + "\nText: " + JSON.stringify(textManipulator
225346
225346
  }
225347
225347
  function getPreviousNonCommentNode() {
225348
225348
  for (let i = insertIndex - 1; i >= 0; i--) {
225349
- if (!Node8.isCommentNode(currentNodes[i]))
225349
+ if (!Node9.isCommentNode(currentNodes[i]))
225350
225350
  return currentNodes[i];
225351
225351
  }
225352
225352
  return void 0;
225353
225353
  }
225354
225354
  function getNextNonCommentNode() {
225355
225355
  for (let i = insertIndex; i < currentNodes.length; i++) {
225356
- if (!Node8.isCommentNode(currentNodes[i]))
225356
+ if (!Node9.isCommentNode(currentNodes[i]))
225357
225357
  return currentNodes[i];
225358
225358
  }
225359
225359
  return void 0;
@@ -225405,7 +225405,7 @@ Path: ` + sourceFile.getFilePath() + "\nText: " + JSON.stringify(textManipulator
225405
225405
  function getChild(child) {
225406
225406
  if (child == null)
225407
225407
  return child;
225408
- else if (Node8.isOverloadable(child))
225408
+ else if (Node9.isOverloadable(child))
225409
225409
  return child.getImplementation() || child;
225410
225410
  else
225411
225411
  return child;
@@ -225436,7 +225436,7 @@ Path: ` + sourceFile.getFilePath() + "\nText: " + JSON.stringify(textManipulator
225436
225436
  let count = 0;
225437
225437
  for (let i = index - 1; i >= 0; i--) {
225438
225438
  const node = startChildren[i];
225439
- if (Node8.isCommentNode(node)) {
225439
+ if (Node9.isCommentNode(node)) {
225440
225440
  commentCount++;
225441
225441
  if (node.getText().startsWith("/**"))
225442
225442
  count = commentCount;
@@ -225506,12 +225506,12 @@ Path: ` + sourceFile.getFilePath() + "\nText: " + JSON.stringify(textManipulator
225506
225506
  }));
225507
225507
  }
225508
225508
  function removeClassMember(classMember) {
225509
- if (Node8.isOverloadable(classMember)) {
225509
+ if (Node9.isOverloadable(classMember)) {
225510
225510
  if (classMember.isImplementation())
225511
225511
  removeClassMembers([...classMember.getOverloads(), classMember]);
225512
225512
  else {
225513
225513
  const parent = classMember.getParentOrThrow();
225514
- if (Node8.isAmbientable(parent) && parent.isAmbient())
225514
+ if (Node9.isAmbientable(parent) && parent.isAmbient())
225515
225515
  removeClassMembers([classMember]);
225516
225516
  else
225517
225517
  removeChildren({ children: [classMember], removeFollowingSpaces: true, removeFollowingNewLines: true });
@@ -225832,7 +225832,7 @@ Path: ` + sourceFile.getFilePath() + "\nText: " + JSON.stringify(textManipulator
225832
225832
  return this.compilerObject.kind;
225833
225833
  }
225834
225834
  };
225835
- var Node8 = class _Node {
225835
+ var Node9 = class _Node {
225836
225836
  #compilerNode;
225837
225837
  #forgottenText;
225838
225838
  #childStringRanges;
@@ -228531,7 +228531,7 @@ Node text: ${this.#forgottenText}`;
228531
228531
  return condition == null ? void 0 : ((c) => condition(thisNode._getNodeFromCompilerNode(c)));
228532
228532
  }
228533
228533
  function insertWhiteSpaceTextAtPos(node, insertPos, textOrWriterFunction, methodName) {
228534
- const parent = Node8.isSourceFile(node) ? node.getChildSyntaxListOrThrow() : node.getParentSyntaxList() || node.getParentOrThrow();
228534
+ const parent = Node9.isSourceFile(node) ? node.getChildSyntaxListOrThrow() : node.getParentSyntaxList() || node.getParentOrThrow();
228535
228535
  const newText = getTextFromStringOrWriter(node._getWriterWithQueuedIndentation(), textOrWriterFunction);
228536
228536
  if (!/^[\s\r\n]*$/.test(newText))
228537
228537
  throw new common.errors.InvalidOperationError(`Cannot insert non-whitespace into ${methodName}.`);
@@ -228574,7 +228574,7 @@ Node text: ${this.#forgottenText}`;
228574
228574
  Scope["Protected"] = "protected";
228575
228575
  Scope["Private"] = "private";
228576
228576
  })(exports.Scope || (exports.Scope = {}));
228577
- var SyntaxList = class extends Node8 {
228577
+ var SyntaxList = class extends Node9 {
228578
228578
  addChildText(textOrWriterFunction) {
228579
228579
  return this.insertChildText(this.getChildCount(), textOrWriterFunction);
228580
228580
  }
@@ -228593,12 +228593,12 @@ Node text: ${this.#forgottenText}`;
228593
228593
  else
228594
228594
  insertText = " " + insertText;
228595
228595
  } else {
228596
- if (index === 0 && Node8.isSourceFile(parent)) {
228596
+ if (index === 0 && Node9.isSourceFile(parent)) {
228597
228597
  if (!insertText.endsWith("\n"))
228598
228598
  insertText += newLineKind;
228599
228599
  } else {
228600
228600
  insertText = newLineKind + insertText;
228601
- if (!Node8.isSourceFile(parent) && index === initialChildCount && insertText.endsWith("\n"))
228601
+ if (!Node9.isSourceFile(parent) && index === initialChildCount && insertText.endsWith("\n"))
228602
228602
  insertText = insertText.replace(/\r?\n$/, "");
228603
228603
  }
228604
228604
  }
@@ -228847,7 +228847,7 @@ Node text: ${this.#forgottenText}`;
228847
228847
  if (value === hasExclamationToken)
228848
228848
  return this;
228849
228849
  if (value) {
228850
- if (Node8.isQuestionTokenable(this))
228850
+ if (Node9.isQuestionTokenable(this))
228851
228851
  this.setHasQuestionToken(false);
228852
228852
  const colonNode = this.getFirstChildByKind(common.SyntaxKind.ColonToken);
228853
228853
  if (colonNode == null)
@@ -228881,11 +228881,11 @@ Node text: ${this.#forgottenText}`;
228881
228881
  return this.getExportKeyword() != null;
228882
228882
  }
228883
228883
  getExportKeyword() {
228884
- if (Node8.isVariableDeclaration(this)) {
228884
+ if (Node9.isVariableDeclaration(this)) {
228885
228885
  const variableStatement = this.getVariableStatement();
228886
228886
  return variableStatement?.getExportKeyword();
228887
228887
  }
228888
- if (!Node8.isModifierable(this))
228888
+ if (!Node9.isModifierable(this))
228889
228889
  return throwForNotModifierableNode();
228890
228890
  return this.getFirstModifierByKind(common.SyntaxKind.ExportKeyword);
228891
228891
  }
@@ -228896,11 +228896,11 @@ Node text: ${this.#forgottenText}`;
228896
228896
  return this.getDefaultKeyword() != null;
228897
228897
  }
228898
228898
  getDefaultKeyword() {
228899
- if (Node8.isVariableDeclaration(this)) {
228899
+ if (Node9.isVariableDeclaration(this)) {
228900
228900
  const variableStatement = this.getVariableStatement();
228901
228901
  return variableStatement?.getDefaultKeyword();
228902
228902
  }
228903
- if (!Node8.isModifierable(this))
228903
+ if (!Node9.isModifierable(this))
228904
228904
  return throwForNotModifierableNode();
228905
228905
  return this.getFirstModifierByKind(common.SyntaxKind.DefaultKeyword);
228906
228906
  }
@@ -228956,7 +228956,7 @@ Node text: ${this.#forgottenText}`;
228956
228956
  setIsDefaultExport(value) {
228957
228957
  if (value === this.isDefaultExport())
228958
228958
  return this;
228959
- if (value && !Node8.isSourceFile(this.getParentOrThrow()))
228959
+ if (value && !Node9.isSourceFile(this.getParentOrThrow()))
228960
228960
  throw new common.errors.InvalidOperationError("The parent must be a source file in order to set this node as a default export.");
228961
228961
  const sourceFile = this.getSourceFile();
228962
228962
  const fileDefaultExportSymbol = sourceFile.getDefaultExportSymbol();
@@ -228964,7 +228964,7 @@ Node text: ${this.#forgottenText}`;
228964
228964
  sourceFile.removeDefaultExport(fileDefaultExportSymbol);
228965
228965
  if (!value)
228966
228966
  return this;
228967
- if (Node8.hasName(this) && shouldWriteAsSeparateStatement.call(this)) {
228967
+ if (Node9.hasName(this) && shouldWriteAsSeparateStatement.call(this)) {
228968
228968
  const parentSyntaxList = this.getFirstAncestorByKindOrThrow(common.SyntaxKind.SyntaxList);
228969
228969
  const name = this.getName();
228970
228970
  parentSyntaxList.insertChildText(this.getChildIndex() + 1, (writer) => {
@@ -228976,15 +228976,15 @@ Node text: ${this.#forgottenText}`;
228976
228976
  }
228977
228977
  return this;
228978
228978
  function shouldWriteAsSeparateStatement() {
228979
- if (Node8.isEnumDeclaration(this) || Node8.isModuleDeclaration(this) || Node8.isTypeAliasDeclaration(this))
228979
+ if (Node9.isEnumDeclaration(this) || Node9.isModuleDeclaration(this) || Node9.isTypeAliasDeclaration(this))
228980
228980
  return true;
228981
- if (Node8.isAmbientable(this) && this.isAmbient())
228981
+ if (Node9.isAmbientable(this) && this.isAmbient())
228982
228982
  return true;
228983
228983
  return false;
228984
228984
  }
228985
228985
  }
228986
228986
  setIsExported(value) {
228987
- if (Node8.isSourceFile(this.getParentOrThrow()))
228987
+ if (Node9.isSourceFile(this.getParentOrThrow()))
228988
228988
  this.toggleModifier("default", false);
228989
228989
  this.toggleModifier("export", value);
228990
228990
  return this;
@@ -232440,8 +232440,8 @@ Node text: ${this.#forgottenText}`;
232440
232440
  this._standardWrite(writer, info, () => {
232441
232441
  this._context.structurePrinterFactory.forImportDeclaration().printTexts(writer, structures);
232442
232442
  }, {
232443
- previousNewLine: (previousMember) => Node8.isImportDeclaration(previousMember) || isComment(previousMember.compilerNode),
232444
- nextNewLine: (nextMember) => Node8.isImportDeclaration(nextMember)
232443
+ previousNewLine: (previousMember) => Node9.isImportDeclaration(previousMember) || isComment(previousMember.compilerNode),
232444
+ nextNewLine: (nextMember) => Node9.isImportDeclaration(nextMember)
232445
232445
  });
232446
232446
  }
232447
232447
  });
@@ -232459,7 +232459,7 @@ Node text: ${this.#forgottenText}`;
232459
232459
  return common.errors.throwIfNullOrUndefined(this.getImportDeclaration(conditionOrModuleSpecifier), message ?? "Expected to find an import with the provided condition.", this);
232460
232460
  }
232461
232461
  getImportDeclarations() {
232462
- return this.getStatements().filter(Node8.isImportDeclaration);
232462
+ return this.getStatements().filter(Node9.isImportDeclaration);
232463
232463
  }
232464
232464
  addExportDeclaration(structure) {
232465
232465
  return this.addExportDeclarations([structure])[0];
@@ -232479,8 +232479,8 @@ Node text: ${this.#forgottenText}`;
232479
232479
  this._standardWrite(writer, info, () => {
232480
232480
  this._context.structurePrinterFactory.forExportDeclaration().printTexts(writer, structures);
232481
232481
  }, {
232482
- previousNewLine: (previousMember) => Node8.isExportDeclaration(previousMember) || isComment(previousMember.compilerNode),
232483
- nextNewLine: (nextMember) => Node8.isExportDeclaration(nextMember)
232482
+ previousNewLine: (previousMember) => Node9.isExportDeclaration(previousMember) || isComment(previousMember.compilerNode),
232483
+ nextNewLine: (nextMember) => Node9.isExportDeclaration(nextMember)
232484
232484
  });
232485
232485
  }
232486
232486
  });
@@ -232498,7 +232498,7 @@ Node text: ${this.#forgottenText}`;
232498
232498
  return common.errors.throwIfNullOrUndefined(this.getExportDeclaration(conditionOrModuleSpecifier), message ?? "Expected to find an export declaration with the provided condition.", this);
232499
232499
  }
232500
232500
  getExportDeclarations() {
232501
- return this.getStatements().filter(Node8.isExportDeclaration);
232501
+ return this.getStatements().filter(Node9.isExportDeclaration);
232502
232502
  }
232503
232503
  addExportAssignment(structure) {
232504
232504
  return this.addExportAssignments([structure])[0];
@@ -232518,8 +232518,8 @@ Node text: ${this.#forgottenText}`;
232518
232518
  this._standardWrite(writer, info, () => {
232519
232519
  this._context.structurePrinterFactory.forExportAssignment().printTexts(writer, structures);
232520
232520
  }, {
232521
- previousNewLine: (previousMember) => Node8.isExportAssignment(previousMember) || isComment(previousMember.compilerNode),
232522
- nextNewLine: (nextMember) => Node8.isExportAssignment(nextMember)
232521
+ previousNewLine: (previousMember) => Node9.isExportAssignment(previousMember) || isComment(previousMember.compilerNode),
232522
+ nextNewLine: (nextMember) => Node9.isExportAssignment(nextMember)
232523
232523
  });
232524
232524
  }
232525
232525
  });
@@ -232531,7 +232531,7 @@ Node text: ${this.#forgottenText}`;
232531
232531
  return common.errors.throwIfNullOrUndefined(this.getExportAssignment(condition), message ?? "Expected to find an export assignment with the provided condition.", this);
232532
232532
  }
232533
232533
  getExportAssignments() {
232534
- return this.getStatements().filter(Node8.isExportAssignment);
232534
+ return this.getStatements().filter(Node9.isExportAssignment);
232535
232535
  }
232536
232536
  getDefaultExportSymbol() {
232537
232537
  const sourceFileSymbol = this.getSymbol();
@@ -232562,23 +232562,23 @@ Node text: ${this.#forgottenText}`;
232562
232562
  }
232563
232563
  return result;
232564
232564
  function* getDeclarationHandlingImportsAndExports(declaration) {
232565
- if (Node8.isExportSpecifier(declaration)) {
232565
+ if (Node9.isExportSpecifier(declaration)) {
232566
232566
  for (const d of declaration.getLocalTargetDeclarations())
232567
232567
  yield* getDeclarationHandlingImportsAndExports(d);
232568
- } else if (Node8.isExportAssignment(declaration)) {
232568
+ } else if (Node9.isExportAssignment(declaration)) {
232569
232569
  const expression = declaration.getExpression();
232570
232570
  if (expression == null || expression.getKind() !== common.SyntaxKind.Identifier) {
232571
232571
  yield expression;
232572
232572
  return;
232573
232573
  }
232574
232574
  yield* getDeclarationsForSymbol(expression.getSymbol());
232575
- } else if (Node8.isImportSpecifier(declaration)) {
232575
+ } else if (Node9.isImportSpecifier(declaration)) {
232576
232576
  const identifier = declaration.getNameNode();
232577
232577
  const symbol = identifier.getSymbol();
232578
232578
  if (symbol == null)
232579
232579
  return;
232580
232580
  yield* getDeclarationsForSymbol(symbol.getAliasedSymbol() || symbol);
232581
- } else if (Node8.isImportClause(declaration)) {
232581
+ } else if (Node9.isImportClause(declaration)) {
232582
232582
  const identifier = declaration.getDefaultImport();
232583
232583
  if (identifier == null)
232584
232584
  return;
@@ -232586,7 +232586,7 @@ Node text: ${this.#forgottenText}`;
232586
232586
  if (symbol == null)
232587
232587
  return;
232588
232588
  yield* getDeclarationsForSymbol(symbol.getAliasedSymbol() || symbol);
232589
- } else if (Node8.isNamespaceImport(declaration) || Node8.isNamespaceExport(declaration)) {
232589
+ } else if (Node9.isNamespaceImport(declaration) || Node9.isNamespaceExport(declaration)) {
232590
232590
  const symbol = declaration.getNameNode().getSymbol();
232591
232591
  if (symbol == null)
232592
232592
  return;
@@ -232609,7 +232609,7 @@ Node text: ${this.#forgottenText}`;
232609
232609
  const declaration = defaultExportSymbol.getDeclarations()[0];
232610
232610
  if (declaration.compilerNode.kind === common.SyntaxKind.ExportAssignment)
232611
232611
  removeChildrenWithFormatting({ children: [declaration], getSiblingFormatting: () => FormattingKind.Newline });
232612
- else if (Node8.isModifierable(declaration)) {
232612
+ else if (Node9.isModifierable(declaration)) {
232613
232613
  declaration.toggleModifier("default", false);
232614
232614
  declaration.toggleModifier("export", false);
232615
232615
  }
@@ -232649,12 +232649,12 @@ Node text: ${this.#forgottenText}`;
232649
232649
  };
232650
232650
  }
232651
232651
  function getNodeForReferences(node) {
232652
- if (Node8.isIdentifier(node) || Node8.isStringLiteral(node))
232652
+ if (Node9.isIdentifier(node) || Node9.isStringLiteral(node))
232653
232653
  return node;
232654
232654
  const nameNode = node.getNodeProperty("name");
232655
232655
  if (nameNode != null)
232656
232656
  return nameNode;
232657
- if (Node8.isExportable(node))
232657
+ if (Node9.isExportable(node))
232658
232658
  return node.getDefaultKeyword() || node;
232659
232659
  return node;
232660
232660
  }
@@ -232664,12 +232664,12 @@ Node text: ${this.#forgottenText}`;
232664
232664
  renameNode(getNodeToRename(this), newName, options);
232665
232665
  return this;
232666
232666
  function getNodeToRename(thisNode) {
232667
- if (Node8.isIdentifier(thisNode) || Node8.isPrivateIdentifier(thisNode) || Node8.isStringLiteral(thisNode))
232667
+ if (Node9.isIdentifier(thisNode) || Node9.isPrivateIdentifier(thisNode) || Node9.isStringLiteral(thisNode))
232668
232668
  return thisNode;
232669
232669
  else if (thisNode.getNameNode != null) {
232670
232670
  const node = thisNode.getNameNode();
232671
232671
  common.errors.throwIfNullOrUndefined(node, "Expected to find a name node when renaming.");
232672
- if (Node8.isArrayBindingPattern(node) || Node8.isObjectBindingPattern(node))
232672
+ if (Node9.isArrayBindingPattern(node) || Node9.isObjectBindingPattern(node))
232673
232673
  throw new common.errors.NotImplementedError(`Not implemented renameable scenario for ${node.getKindName()}.`);
232674
232674
  return node;
232675
232675
  } else {
@@ -232751,7 +232751,7 @@ Node text: ${this.#forgottenText}`;
232751
232751
  };
232752
232752
  }
232753
232753
  function addNameNode(node, newName) {
232754
- if (Node8.isClassDeclaration(node) || Node8.isClassExpression(node)) {
232754
+ if (Node9.isClassDeclaration(node) || Node9.isClassExpression(node)) {
232755
232755
  const classKeyword = node.getFirstChildByKindOrThrow(common.SyntaxKind.ClassKeyword);
232756
232756
  insertIntoParentTextRange({
232757
232757
  insertPos: classKeyword.getEnd(),
@@ -232873,7 +232873,7 @@ Node text: ${this.#forgottenText}`;
232873
232873
  if (value === hasQuestionDotToken)
232874
232874
  return this;
232875
232875
  if (value) {
232876
- if (Node8.isPropertyAccessExpression(this))
232876
+ if (Node9.isPropertyAccessExpression(this))
232877
232877
  this.getFirstChildByKindOrThrow(common.SyntaxKind.DotToken).replaceWithText("?.");
232878
232878
  else {
232879
232879
  insertIntoParentTextRange({
@@ -232883,16 +232883,16 @@ Node text: ${this.#forgottenText}`;
232883
232883
  });
232884
232884
  }
232885
232885
  } else {
232886
- if (Node8.isPropertyAccessExpression(this))
232886
+ if (Node9.isPropertyAccessExpression(this))
232887
232887
  questionDotTokenNode.replaceWithText(".");
232888
232888
  else
232889
232889
  removeChildren({ children: [questionDotTokenNode] });
232890
232890
  }
232891
232891
  return this;
232892
232892
  function getInsertPos2() {
232893
- if (Node8.isCallExpression(this))
232893
+ if (Node9.isCallExpression(this))
232894
232894
  return this.getFirstChildByKindOrThrow(common.SyntaxKind.OpenParenToken).getStart();
232895
- if (Node8.isElementAccessExpression(this))
232895
+ if (Node9.isElementAccessExpression(this))
232896
232896
  return this.getFirstChildByKindOrThrow(common.SyntaxKind.OpenBracketToken).getStart();
232897
232897
  common.errors.throwNotImplementedForSyntaxKindError(this.compilerNode.kind);
232898
232898
  }
@@ -232927,7 +232927,7 @@ Node text: ${this.#forgottenText}`;
232927
232927
  if (value === hasQuestionToken)
232928
232928
  return this;
232929
232929
  if (value) {
232930
- if (Node8.isExclamationTokenable(this))
232930
+ if (Node9.isExclamationTokenable(this))
232931
232931
  this.setHasExclamationToken(false);
232932
232932
  insertIntoParentTextRange({
232933
232933
  insertPos: getInsertPos2.call(this),
@@ -232939,7 +232939,7 @@ Node text: ${this.#forgottenText}`;
232939
232939
  }
232940
232940
  return this;
232941
232941
  function getInsertPos2() {
232942
- if (Node8.hasName(this))
232942
+ if (Node9.hasName(this))
232943
232943
  return this.getNameNode().getEnd();
232944
232944
  const colonNode = this.getFirstChildByKind(common.SyntaxKind.ColonToken);
232945
232945
  if (colonNode != null)
@@ -233060,7 +233060,7 @@ Node text: ${this.#forgottenText}`;
233060
233060
  const scope = getScopeForNode(this);
233061
233061
  if (scope != null)
233062
233062
  return scope;
233063
- if (Node8.isParameterDeclaration(this) && this.isReadonly())
233063
+ if (Node9.isParameterDeclaration(this) && this.isReadonly())
233064
233064
  return exports.Scope.Public;
233065
233065
  return void 0;
233066
233066
  }
@@ -233207,14 +233207,14 @@ Node text: ${this.#forgottenText}`;
233207
233207
  }
233208
233208
  function getValidRange(thisNode) {
233209
233209
  const rangeNode = getRangeNode();
233210
- const openBrace = Node8.isSourceFile(rangeNode) ? void 0 : rangeNode.getPreviousSiblingIfKind(common.SyntaxKind.OpenBraceToken);
233210
+ const openBrace = Node9.isSourceFile(rangeNode) ? void 0 : rangeNode.getPreviousSiblingIfKind(common.SyntaxKind.OpenBraceToken);
233211
233211
  const closeBrace = openBrace == null ? void 0 : rangeNode.getNextSiblingIfKind(common.SyntaxKind.CloseBraceToken);
233212
233212
  if (openBrace != null && closeBrace != null)
233213
233213
  return [openBrace.getEnd(), closeBrace.getStart()];
233214
233214
  else
233215
233215
  return [rangeNode.getPos(), rangeNode.getEnd()];
233216
233216
  function getRangeNode() {
233217
- if (Node8.isSourceFile(thisNode))
233217
+ if (Node9.isSourceFile(thisNode))
233218
233218
  return thisNode;
233219
233219
  return thisNode.getChildSyntaxListOrThrow();
233220
233220
  }
@@ -233241,8 +233241,8 @@ Node text: ${this.#forgottenText}`;
233241
233241
  const typeArguments = this.getTypeArguments();
233242
233242
  index = verifyAndGetIndex(index, typeArguments.length);
233243
233243
  if (typeArguments.length === 0) {
233244
- const expression = Node8.hasExpression(this) ? this.getExpression() : void 0;
233245
- const identifier = Node8.isPropertyAccessExpression(expression) ? expression.getLastChildByKindOrThrow(common.SyntaxKind.Identifier) : this.getFirstChildByKindOrThrow(common.SyntaxKind.Identifier);
233244
+ const expression = Node9.hasExpression(this) ? this.getExpression() : void 0;
233245
+ const identifier = Node9.isPropertyAccessExpression(expression) ? expression.getLastChildByKindOrThrow(common.SyntaxKind.Identifier) : this.getFirstChildByKindOrThrow(common.SyntaxKind.Identifier);
233246
233246
  insertIntoParentTextRange({
233247
233247
  insertPos: identifier.getEnd(),
233248
233248
  parent: this,
@@ -233729,7 +233729,7 @@ Node text: ${this.#forgottenText}`;
233729
233729
  const namedNode = node;
233730
233730
  if (namedNode.getNameNode != null)
233731
233731
  return namedNode.getNameNode().getEnd();
233732
- else if (Node8.isCallSignatureDeclaration(node) || Node8.isFunctionTypeNode(node))
233732
+ else if (Node9.isCallSignatureDeclaration(node) || Node9.isFunctionTypeNode(node))
233733
233733
  return node.getFirstChildByKindOrThrow(common.SyntaxKind.OpenParenToken).getStart();
233734
233734
  else
233735
233735
  throw new common.errors.NotImplementedError(`Not implemented scenario inserting type parameters for node with kind ${node.getKindName()}.`);
@@ -233741,13 +233741,13 @@ Node text: ${this.#forgottenText}`;
233741
233741
  }
233742
233742
  };
233743
233743
  }
233744
- var ArrayBindingPattern = class extends Node8 {
233744
+ var ArrayBindingPattern = class extends Node9 {
233745
233745
  getElements() {
233746
233746
  return this.compilerNode.elements.map((e) => this._getNodeFromCompilerNode(e));
233747
233747
  }
233748
233748
  };
233749
233749
  var createBase$F = (ctor) => DotDotDotTokenableNode(InitializerExpressionableNode(BindingNamedNode(ctor)));
233750
- var BindingElementBase = createBase$F(Node8);
233750
+ var BindingElementBase = createBase$F(Node9);
233751
233751
  var BindingElement = class extends BindingElementBase {
233752
233752
  getPropertyNameNodeOrThrow(message) {
233753
233753
  return common.errors.throwIfNullOrUndefined(this.getPropertyNameNode(), message ?? "Expected to find a property name node.", this);
@@ -233756,7 +233756,7 @@ Node text: ${this.#forgottenText}`;
233756
233756
  return this._getNodeFromCompilerNodeIfExists(this.compilerNode.propertyName);
233757
233757
  }
233758
233758
  };
233759
- var ObjectBindingPattern = class extends Node8 {
233759
+ var ObjectBindingPattern = class extends Node9 {
233760
233760
  getElements() {
233761
233761
  return this.compilerNode.elements.map((e) => this._getNodeFromCompilerNode(e));
233762
233762
  }
@@ -233789,7 +233789,7 @@ Node text: ${this.#forgottenText}`;
233789
233789
  }
233790
233790
  };
233791
233791
  }
233792
- var Expression = class extends Node8 {
233792
+ var Expression = class extends Node9 {
233793
233793
  getContextualType() {
233794
233794
  return this._context.typeChecker.getContextualType(this);
233795
233795
  }
@@ -234017,7 +234017,7 @@ Node text: ${this.#forgottenText}`;
234017
234017
  var NonNullExpressionBase = ExpressionedNode(LeftHandSideExpression);
234018
234018
  var NonNullExpression = class extends NonNullExpressionBase {
234019
234019
  };
234020
- var ObjectLiteralElement = class extends Node8 {
234020
+ var ObjectLiteralElement = class extends Node9 {
234021
234021
  remove() {
234022
234022
  removeCommaSeparatedChild(this);
234023
234023
  }
@@ -234361,7 +234361,7 @@ Node text: ${this.#forgottenText}`;
234361
234361
  var YieldExpressionBase = ExpressionableNode(GeneratorableNode(Expression));
234362
234362
  var YieldExpression = class extends YieldExpressionBase {
234363
234363
  };
234364
- var StatementBase = ChildOrderableNode(Node8);
234364
+ var StatementBase = ChildOrderableNode(Node9);
234365
234365
  var Statement = class extends StatementBase {
234366
234366
  remove() {
234367
234367
  removeStatementedNodeChild(this);
@@ -234402,7 +234402,7 @@ Node text: ${this.#forgottenText}`;
234402
234402
  return getChildSyntaxList.call(this).insertChildText(index, writerFunction);
234403
234403
  function getChildSyntaxList() {
234404
234404
  const childSyntaxList = this.getChildSyntaxListOrThrow();
234405
- if (Node8.isCaseClause(this) || Node8.isDefaultClause(this)) {
234405
+ if (Node9.isCaseClause(this) || Node9.isDefaultClause(this)) {
234406
234406
  const block = childSyntaxList.getFirstChildIfKind(common.SyntaxKind.Block);
234407
234407
  if (block != null)
234408
234408
  return block.getChildSyntaxListOrThrow();
@@ -234442,7 +234442,7 @@ Node text: ${this.#forgottenText}`;
234442
234442
  });
234443
234443
  }
234444
234444
  getClasses() {
234445
- return this.getStatements().filter(Node8.isClassDeclaration);
234445
+ return this.getStatements().filter(Node9.isClassDeclaration);
234446
234446
  }
234447
234447
  getClass(nameOrFindFunction) {
234448
234448
  return getNodeByNameOrFindFunction(this.getClasses(), nameOrFindFunction);
@@ -234472,7 +234472,7 @@ Node text: ${this.#forgottenText}`;
234472
234472
  });
234473
234473
  }
234474
234474
  getEnums() {
234475
- return this.getStatements().filter(Node8.isEnumDeclaration);
234475
+ return this.getStatements().filter(Node9.isEnumDeclaration);
234476
234476
  }
234477
234477
  getEnum(nameOrFindFunction) {
234478
234478
  return getNodeByNameOrFindFunction(this.getEnums(), nameOrFindFunction);
@@ -234500,14 +234500,14 @@ Node text: ${this.#forgottenText}`;
234500
234500
  isAmbient: isNodeAmbientOrInAmbientContext(this)
234501
234501
  }).printTexts(writer, structures);
234502
234502
  }, {
234503
- previousNewLine: (previousMember) => structures[0].hasDeclareKeyword === true && Node8.isFunctionDeclaration(previousMember) && previousMember.getBody() == null,
234504
- nextNewLine: (nextMember) => structures[structures.length - 1].hasDeclareKeyword === true && Node8.isFunctionDeclaration(nextMember) && nextMember.getBody() == null
234503
+ previousNewLine: (previousMember) => structures[0].hasDeclareKeyword === true && Node9.isFunctionDeclaration(previousMember) && previousMember.getBody() == null,
234504
+ nextNewLine: (nextMember) => structures[structures.length - 1].hasDeclareKeyword === true && Node9.isFunctionDeclaration(nextMember) && nextMember.getBody() == null
234505
234505
  });
234506
234506
  }
234507
234507
  });
234508
234508
  }
234509
234509
  getFunctions() {
234510
- return this.getStatements().filter(Node8.isFunctionDeclaration).filter((f) => f.isAmbient() || f.isImplementation());
234510
+ return this.getStatements().filter(Node9.isFunctionDeclaration).filter((f) => f.isAmbient() || f.isImplementation());
234511
234511
  }
234512
234512
  getFunction(nameOrFindFunction) {
234513
234513
  return getNodeByNameOrFindFunction(this.getFunctions(), nameOrFindFunction);
@@ -234537,7 +234537,7 @@ Node text: ${this.#forgottenText}`;
234537
234537
  });
234538
234538
  }
234539
234539
  getInterfaces() {
234540
- return this.getStatements().filter(Node8.isInterfaceDeclaration);
234540
+ return this.getStatements().filter(Node9.isInterfaceDeclaration);
234541
234541
  }
234542
234542
  getInterface(nameOrFindFunction) {
234543
234543
  return getNodeByNameOrFindFunction(this.getInterfaces(), nameOrFindFunction);
@@ -234567,7 +234567,7 @@ Node text: ${this.#forgottenText}`;
234567
234567
  });
234568
234568
  }
234569
234569
  getModules() {
234570
- return this.getStatements().filter(Node8.isModuleDeclaration);
234570
+ return this.getStatements().filter(Node9.isModuleDeclaration);
234571
234571
  }
234572
234572
  getModule(nameOrFindFunction) {
234573
234573
  return getNodeByNameOrFindFunction(this.getModules(), nameOrFindFunction);
@@ -234593,14 +234593,14 @@ Node text: ${this.#forgottenText}`;
234593
234593
  this._standardWrite(writer, info, () => {
234594
234594
  this._context.structurePrinterFactory.forTypeAliasDeclaration().printTexts(writer, structures);
234595
234595
  }, {
234596
- previousNewLine: (previousMember) => Node8.isTypeAliasDeclaration(previousMember),
234597
- nextNewLine: (nextMember) => Node8.isTypeAliasDeclaration(nextMember)
234596
+ previousNewLine: (previousMember) => Node9.isTypeAliasDeclaration(previousMember),
234597
+ nextNewLine: (nextMember) => Node9.isTypeAliasDeclaration(nextMember)
234598
234598
  });
234599
234599
  }
234600
234600
  });
234601
234601
  }
234602
234602
  getTypeAliases() {
234603
- return this.getStatements().filter(Node8.isTypeAliasDeclaration);
234603
+ return this.getStatements().filter(Node9.isTypeAliasDeclaration);
234604
234604
  }
234605
234605
  getTypeAlias(nameOrFindFunction) {
234606
234606
  return getNodeByNameOrFindFunction(this.getTypeAliases(), nameOrFindFunction);
@@ -234609,7 +234609,7 @@ Node text: ${this.#forgottenText}`;
234609
234609
  return common.errors.throwIfNullOrUndefined(this.getTypeAlias(nameOrFindFunction), () => getNotFoundErrorMessageForNameOrFindFunction("type alias", nameOrFindFunction));
234610
234610
  }
234611
234611
  getVariableStatements() {
234612
- return this.getStatements().filter(Node8.isVariableStatement);
234612
+ return this.getStatements().filter(Node9.isVariableStatement);
234613
234613
  }
234614
234614
  getVariableStatement(nameOrFindFunction) {
234615
234615
  return this.getVariableStatements().find(getFindFunction());
@@ -234640,8 +234640,8 @@ Node text: ${this.#forgottenText}`;
234640
234640
  this._standardWrite(writer, info, () => {
234641
234641
  this._context.structurePrinterFactory.forVariableStatement().printTexts(writer, structures);
234642
234642
  }, {
234643
- previousNewLine: (previousMember) => Node8.isVariableStatement(previousMember),
234644
- nextNewLine: (nextMember) => Node8.isVariableStatement(nextMember)
234643
+ previousNewLine: (previousMember) => Node9.isVariableStatement(previousMember),
234644
+ nextNewLine: (nextMember) => Node9.isVariableStatement(nextMember)
234645
234645
  });
234646
234646
  }
234647
234647
  });
@@ -234660,11 +234660,11 @@ Node text: ${this.#forgottenText}`;
234660
234660
  }
234661
234661
  getStructure() {
234662
234662
  const structure = {};
234663
- if (Node8.isBodyable(this) && !this.hasBody())
234663
+ if (Node9.isBodyable(this) && !this.hasBody())
234664
234664
  structure.statements = void 0;
234665
234665
  else {
234666
234666
  structure.statements = this.getStatements().map((s) => {
234667
- if (Node8._hasStructure(s))
234667
+ if (Node9._hasStructure(s))
234668
234668
  return s.getStructure();
234669
234669
  return s.getText({ trimLeadingIndentation: true });
234670
234670
  });
@@ -234672,7 +234672,7 @@ Node text: ${this.#forgottenText}`;
234672
234672
  return callBaseGetStructure(Base.prototype, this, structure);
234673
234673
  }
234674
234674
  set(structure) {
234675
- if (Node8.isBodyable(this) && structure.statements == null && structure.hasOwnProperty(common.nameof(structure, "statements")))
234675
+ if (Node9.isBodyable(this) && structure.statements == null && structure.hasOwnProperty(common.nameof(structure, "statements")))
234676
234676
  this.removeBody();
234677
234677
  else if (structure.statements != null) {
234678
234678
  const statementCount = this._getCompilerStatementsWithComments().length;
@@ -234693,17 +234693,17 @@ Node text: ${this.#forgottenText}`;
234693
234693
  }
234694
234694
  }
234695
234695
  _getCompilerStatementsContainer() {
234696
- if (Node8.isSourceFile(this) || Node8.isCaseClause(this) || Node8.isDefaultClause(this))
234696
+ if (Node9.isSourceFile(this) || Node9.isCaseClause(this) || Node9.isDefaultClause(this))
234697
234697
  return this.compilerNode;
234698
- else if (Node8.isModuleDeclaration(this)) {
234698
+ else if (Node9.isModuleDeclaration(this)) {
234699
234699
  const body = this._getInnerBody();
234700
234700
  if (body == null)
234701
234701
  return void 0;
234702
234702
  else
234703
234703
  return body.compilerNode;
234704
- } else if (Node8.isBodyable(this) || Node8.isBodied(this))
234704
+ } else if (Node9.isBodyable(this) || Node9.isBodied(this))
234705
234705
  return this.getBody()?.compilerNode;
234706
- else if (Node8.isBlock(this) || Node8.isModuleBlock(this))
234706
+ else if (Node9.isBlock(this) || Node9.isModuleBlock(this))
234707
234707
  return this.compilerNode;
234708
234708
  else
234709
234709
  throw new common.errors.NotImplementedError(`Could not find the statements for node kind: ${this.getKindName()}, text: ${this.getText()}`);
@@ -234720,7 +234720,7 @@ Node text: ${this.#forgottenText}`;
234720
234720
  });
234721
234721
  }
234722
234722
  _standardWrite(writer, info, writeStructures, opts = {}) {
234723
- if (info.previousMember != null && (opts.previousNewLine == null || !opts.previousNewLine(info.previousMember)) && !Node8.isCommentNode(info.previousMember)) {
234723
+ if (info.previousMember != null && (opts.previousNewLine == null || !opts.previousNewLine(info.previousMember)) && !Node9.isCommentNode(info.previousMember)) {
234724
234724
  writer.blankLine();
234725
234725
  } else if (!info.isStartOfFile) {
234726
234726
  writer.newLineIfLastNot();
@@ -234734,7 +234734,7 @@ Node text: ${this.#forgottenText}`;
234734
234734
  };
234735
234735
  }
234736
234736
  function addBodyIfNotExists(node) {
234737
- if (Node8.isBodyable(node) && !node.hasBody())
234737
+ if (Node9.isBodyable(node) && !node.hasBody())
234738
234738
  node.addBody();
234739
234739
  }
234740
234740
  var createBase$v = (ctor) => TextInsertableNode(StatementedNode(ctor));
@@ -234749,7 +234749,7 @@ Node text: ${this.#forgottenText}`;
234749
234749
  return common.errors.throwIfNullOrUndefined(this.getLabel(), message ?? "Expected to find a label.", this);
234750
234750
  }
234751
234751
  };
234752
- var CaseBlockBase = TextInsertableNode(Node8);
234752
+ var CaseBlockBase = TextInsertableNode(Node9);
234753
234753
  var CaseBlock = class extends CaseBlockBase {
234754
234754
  getClauses() {
234755
234755
  const clauses = this.compilerNode.clauses || [];
@@ -234767,13 +234767,13 @@ Node text: ${this.#forgottenText}`;
234767
234767
  }
234768
234768
  };
234769
234769
  var createBase$u = (ctor) => JSDocableNode(ExpressionedNode(TextInsertableNode(StatementedNode(ctor))));
234770
- var CaseClauseBase = createBase$u(Node8);
234770
+ var CaseClauseBase = createBase$u(Node9);
234771
234771
  var CaseClause = class extends CaseClauseBase {
234772
234772
  remove() {
234773
234773
  removeClausedNodeChild(this);
234774
234774
  }
234775
234775
  };
234776
- var CatchClauseBase = Node8;
234776
+ var CatchClauseBase = Node9;
234777
234777
  var CatchClause = class extends CatchClauseBase {
234778
234778
  getBlock() {
234779
234779
  return this._getNodeFromCompilerNode(this.compilerNode.block);
@@ -234799,7 +234799,7 @@ Node text: ${this.#forgottenText}`;
234799
234799
  var DebuggerStatement = class extends DebuggerStatementBase {
234800
234800
  };
234801
234801
  var createBase$t = (ctor) => TextInsertableNode(StatementedNode(ctor));
234802
- var DefaultClauseBase = createBase$t(Node8);
234802
+ var DefaultClauseBase = createBase$t(Node9);
234803
234803
  var DefaultClause = class extends DefaultClauseBase {
234804
234804
  remove() {
234805
234805
  removeClausedNodeChild(this);
@@ -234862,7 +234862,7 @@ Node text: ${this.#forgottenText}`;
234862
234862
  }
234863
234863
  remove() {
234864
234864
  const nodes = [];
234865
- if (Node8.isIfStatement(this.getParentOrThrow()))
234865
+ if (Node9.isIfStatement(this.getParentOrThrow()))
234866
234866
  nodes.push(this.getPreviousSiblingIfKindOrThrow(common.SyntaxKind.ElseKeyword));
234867
234867
  nodes.push(this);
234868
234868
  removeStatementedNodeChildren(nodes);
@@ -234976,7 +234976,7 @@ Node text: ${this.#forgottenText}`;
234976
234976
  }
234977
234977
  getNamespaceExport() {
234978
234978
  const exportClause = this.getNodeProperty("exportClause");
234979
- return exportClause != null && Node8.isNamespaceExport(exportClause) ? exportClause : void 0;
234979
+ return exportClause != null && Node9.isNamespaceExport(exportClause) ? exportClause : void 0;
234980
234980
  }
234981
234981
  getNamespaceExportOrThrow(message) {
234982
234982
  return common.errors.throwIfNullOrUndefined(this.getNamespaceExport(), message ?? "Expected to find a namespace export.", this);
@@ -234994,7 +234994,7 @@ Node text: ${this.#forgottenText}`;
234994
234994
  textLength: 1
234995
234995
  }
234996
234996
  });
234997
- } else if (Node8.isNamespaceExport(exportClause))
234997
+ } else if (Node9.isNamespaceExport(exportClause))
234998
234998
  exportClause.getNameNode().replaceWithText(name);
234999
234999
  else {
235000
235000
  insertIntoParentTextRange({
@@ -235032,7 +235032,7 @@ Node text: ${this.#forgottenText}`;
235032
235032
  const moduleSpecifier = this._getNodeFromCompilerNodeIfExists(this.compilerNode.moduleSpecifier);
235033
235033
  if (moduleSpecifier == null)
235034
235034
  return void 0;
235035
- if (!Node8.isStringLiteral(moduleSpecifier))
235035
+ if (!Node9.isStringLiteral(moduleSpecifier))
235036
235036
  throw new common.errors.InvalidOperationError("Expected the module specifier to be a string literal.");
235037
235037
  return moduleSpecifier;
235038
235038
  }
@@ -235051,7 +235051,7 @@ Node text: ${this.#forgottenText}`;
235051
235051
  if (symbol == null)
235052
235052
  return void 0;
235053
235053
  const declaration = symbol.getDeclarations()[0];
235054
- return declaration != null && Node8.isSourceFile(declaration) ? declaration : void 0;
235054
+ return declaration != null && Node9.isSourceFile(declaration) ? declaration : void 0;
235055
235055
  }
235056
235056
  isModuleSpecifierRelative() {
235057
235057
  const moduleSpecifierValue = this.getModuleSpecifierValue();
@@ -235232,7 +235232,7 @@ Node text: ${this.#forgottenText}`;
235232
235232
  }
235233
235233
  });
235234
235234
  }
235235
- var ExportSpecifierBase = Node8;
235235
+ var ExportSpecifierBase = Node9;
235236
235236
  var ExportSpecifier = class extends ExportSpecifierBase {
235237
235237
  setName(name) {
235238
235238
  const nameNode = this.getNameNode();
@@ -235365,7 +235365,7 @@ Node text: ${this.#forgottenText}`;
235365
235365
  }
235366
235366
  getStructure() {
235367
235367
  const alias = this.getAliasNode();
235368
- return callBaseGetStructure(Node8.prototype, this, {
235368
+ return callBaseGetStructure(Node9.prototype, this, {
235369
235369
  kind: exports.StructureKind.ExportSpecifier,
235370
235370
  alias: alias ? alias.getText() : void 0,
235371
235371
  name: this.getNameNode().getText(),
@@ -235373,14 +235373,14 @@ Node text: ${this.#forgottenText}`;
235373
235373
  });
235374
235374
  }
235375
235375
  };
235376
- var ExternalModuleReferenceBase = ExpressionableNode(Node8);
235376
+ var ExternalModuleReferenceBase = ExpressionableNode(Node9);
235377
235377
  var ExternalModuleReference = class extends ExternalModuleReferenceBase {
235378
235378
  getReferencedSourceFileOrThrow(message) {
235379
235379
  return common.errors.throwIfNullOrUndefined(this.getReferencedSourceFile(), message ?? "Expected to find the referenced source file.", this);
235380
235380
  }
235381
235381
  isRelative() {
235382
235382
  const expression = this.getExpression();
235383
- if (expression == null || !Node8.isStringLiteral(expression))
235383
+ if (expression == null || !Node9.isStringLiteral(expression))
235384
235384
  return false;
235385
235385
  return ModuleUtils.isModuleSpecifierRelative(expression.getLiteralText());
235386
235386
  }
@@ -235394,7 +235394,7 @@ Node text: ${this.#forgottenText}`;
235394
235394
  return ModuleUtils.getReferencedSourceFileFromSymbol(symbol);
235395
235395
  }
235396
235396
  };
235397
- var ImportAttributeBase = ImportAttributeNamedNode(Node8);
235397
+ var ImportAttributeBase = ImportAttributeNamedNode(Node9);
235398
235398
  var ImportAttribute = class extends ImportAttributeBase {
235399
235399
  getValue() {
235400
235400
  return this._getNodeFromCompilerNode(this.compilerNode.value);
@@ -235412,7 +235412,7 @@ Node text: ${this.#forgottenText}`;
235412
235412
  });
235413
235413
  }
235414
235414
  };
235415
- var ImportAttributesBase = Node8;
235415
+ var ImportAttributesBase = Node9;
235416
235416
  var ImportAttributes = class extends ImportAttributesBase {
235417
235417
  setElements(elements) {
235418
235418
  this.replaceWithText((writer) => {
@@ -235432,7 +235432,7 @@ Node text: ${this.#forgottenText}`;
235432
235432
  });
235433
235433
  }
235434
235434
  };
235435
- var ImportClauseBase = Node8;
235435
+ var ImportClauseBase = Node9;
235436
235436
  var ImportClause = class extends ImportClauseBase {
235437
235437
  getPhaseModifier() {
235438
235438
  return this.compilerNode.phaseModifier;
@@ -235498,13 +235498,13 @@ Node text: ${this.#forgottenText}`;
235498
235498
  }
235499
235499
  getNamespaceImport() {
235500
235500
  const namedBindings = this.getNamedBindings();
235501
- if (namedBindings == null || !Node8.isNamespaceImport(namedBindings))
235501
+ if (namedBindings == null || !Node9.isNamespaceImport(namedBindings))
235502
235502
  return void 0;
235503
235503
  return namedBindings.getNameNode();
235504
235504
  }
235505
235505
  getNamedImports() {
235506
235506
  const namedBindings = this.getNamedBindings();
235507
- if (namedBindings == null || !Node8.isNamedImports(namedBindings))
235507
+ if (namedBindings == null || !Node9.isNamedImports(namedBindings))
235508
235508
  return [];
235509
235509
  return namedBindings.getElements();
235510
235510
  }
@@ -235549,7 +235549,7 @@ Node text: ${this.#forgottenText}`;
235549
235549
  }
235550
235550
  getModuleSpecifier() {
235551
235551
  const moduleSpecifier = this._getNodeFromCompilerNode(this.compilerNode.moduleSpecifier);
235552
- if (!Node8.isStringLiteral(moduleSpecifier))
235552
+ if (!Node9.isStringLiteral(moduleSpecifier))
235553
235553
  throw new common.errors.InvalidOperationError("Expected the module specifier to be a string literal.");
235554
235554
  return moduleSpecifier;
235555
235555
  }
@@ -235912,14 +235912,14 @@ Node text: ${this.#forgottenText}`;
235912
235912
  }
235913
235913
  isExternalModuleReferenceRelative() {
235914
235914
  const moduleReference = this.getModuleReference();
235915
- if (!Node8.isExternalModuleReference(moduleReference))
235915
+ if (!Node9.isExternalModuleReference(moduleReference))
235916
235916
  return false;
235917
235917
  return moduleReference.isRelative();
235918
235918
  }
235919
235919
  setExternalModuleReference(textOrSourceFile) {
235920
235920
  const text = typeof textOrSourceFile === "string" ? textOrSourceFile : this._sourceFile.getRelativePathAsModuleSpecifierTo(textOrSourceFile);
235921
235921
  const moduleReference = this.getModuleReference();
235922
- if (Node8.isExternalModuleReference(moduleReference) && moduleReference.getExpression() != null)
235922
+ if (Node9.isExternalModuleReference(moduleReference) && moduleReference.getExpression() != null)
235923
235923
  moduleReference.getExpressionOrThrow().replaceWithText((writer) => writer.quote(text));
235924
235924
  else
235925
235925
  moduleReference.replaceWithText((writer) => writer.write("require(").quote(text).write(")"));
@@ -235930,12 +235930,12 @@ Node text: ${this.#forgottenText}`;
235930
235930
  }
235931
235931
  getExternalModuleReferenceSourceFile() {
235932
235932
  const moduleReference = this.getModuleReference();
235933
- if (!Node8.isExternalModuleReference(moduleReference))
235933
+ if (!Node9.isExternalModuleReference(moduleReference))
235934
235934
  return void 0;
235935
235935
  return moduleReference.getReferencedSourceFile();
235936
235936
  }
235937
235937
  };
235938
- var ImportSpecifierBase = Node8;
235938
+ var ImportSpecifierBase = Node9;
235939
235939
  var ImportSpecifier = class extends ImportSpecifierBase {
235940
235940
  setName(name) {
235941
235941
  const nameNode = this.getNameNode();
@@ -236074,7 +236074,7 @@ Node text: ${this.#forgottenText}`;
236074
236074
  }
236075
236075
  getParentModule() {
236076
236076
  let parent = this.getParentOrThrow();
236077
- if (!Node8.isModuleBlock(parent))
236077
+ if (!Node9.isModuleBlock(parent))
236078
236078
  return void 0;
236079
236079
  while (parent.getParentOrThrow().getKind() === common.SyntaxKind.ModuleDeclaration)
236080
236080
  parent = parent.getParentOrThrow();
@@ -236133,7 +236133,7 @@ Node text: ${this.#forgottenText}`;
236133
236133
  }
236134
236134
  getNameNodes() {
236135
236135
  const name = this.getNameNode();
236136
- if (Node8.isStringLiteral(name))
236136
+ if (Node9.isStringLiteral(name))
236137
236137
  return name;
236138
236138
  else {
236139
236139
  const nodes = [];
@@ -236205,7 +236205,7 @@ Node text: ${this.#forgottenText}`;
236205
236205
  }
236206
236206
  _getInnerBody() {
236207
236207
  let node = this.getBody();
236208
- while (node != null && Node8.isBodyable(node) && node.compilerNode.statements == null)
236208
+ while (node != null && Node9.isBodyable(node) && node.compilerNode.statements == null)
236209
236209
  node = node.getBody();
236210
236210
  return node;
236211
236211
  }
@@ -236220,19 +236220,19 @@ Node text: ${this.#forgottenText}`;
236220
236220
  if (!namespaceDec.hasDeclareKeyword())
236221
236221
  namespaceDec.setHasDeclareKeyword(true);
236222
236222
  }
236223
- var NamedExportsBase = Node8;
236223
+ var NamedExportsBase = Node9;
236224
236224
  var NamedExports = class extends NamedExportsBase {
236225
236225
  getElements() {
236226
236226
  return this.compilerNode.elements.map((e) => this._getNodeFromCompilerNode(e));
236227
236227
  }
236228
236228
  };
236229
- var NamedImportsBase = Node8;
236229
+ var NamedImportsBase = Node9;
236230
236230
  var NamedImports = class extends NamedImportsBase {
236231
236231
  getElements() {
236232
236232
  return this.compilerNode.elements.map((e) => this._getNodeFromCompilerNode(e));
236233
236233
  }
236234
236234
  };
236235
- var NamespaceExportBase = RenameableNode(Node8);
236235
+ var NamespaceExportBase = RenameableNode(Node9);
236236
236236
  var NamespaceExport = class extends NamespaceExportBase {
236237
236237
  setName(name) {
236238
236238
  const nameNode = this.getNameNode();
@@ -236255,7 +236255,7 @@ Node text: ${this.#forgottenText}`;
236255
236255
  return this._getNodeFromCompilerNode(this.compilerNode.name);
236256
236256
  }
236257
236257
  };
236258
- var NamespaceImportBase = RenameableNode(Node8);
236258
+ var NamespaceImportBase = RenameableNode(Node9);
236259
236259
  var NamespaceImport = class extends NamespaceImportBase {
236260
236260
  setName(name) {
236261
236261
  const nameNode = this.getNameNode();
@@ -236285,7 +236285,7 @@ Node text: ${this.#forgottenText}`;
236285
236285
  FileSystemRefreshResult[FileSystemRefreshResult["Updated"] = 1] = "Updated";
236286
236286
  FileSystemRefreshResult[FileSystemRefreshResult["Deleted"] = 2] = "Deleted";
236287
236287
  })(exports.FileSystemRefreshResult || (exports.FileSystemRefreshResult = {}));
236288
- var SourceFileBase = ModuledNode(TextInsertableNode(StatementedNode(Node8)));
236288
+ var SourceFileBase = ModuledNode(TextInsertableNode(StatementedNode(Node9)));
236289
236289
  var SourceFile = (() => {
236290
236290
  let _classSuper = SourceFileBase;
236291
236291
  let _instanceExtraInitializers = [];
@@ -236790,7 +236790,7 @@ Node text: ${this.#forgottenText}`;
236790
236790
  function getReferencingNodeFromStringLiteral(literal) {
236791
236791
  const parent = literal.getParentOrThrow();
236792
236792
  const grandParent = parent.getParent();
236793
- if (grandParent != null && Node8.isImportEqualsDeclaration(grandParent))
236793
+ if (grandParent != null && Node9.isImportEqualsDeclaration(grandParent))
236794
236794
  return grandParent;
236795
236795
  else
236796
236796
  return parent;
@@ -237003,7 +237003,7 @@ Node text: ${this.#forgottenText}`;
237003
237003
  var FunctionExpression = class extends FunctionExpressionBase {
237004
237004
  };
237005
237005
  var createBase$m = (ctor) => OverrideableNode(QuestionTokenableNode(DecoratableNode(ScopeableNode(ReadonlyableNode(ModifierableNode(DotDotDotTokenableNode(TypedNode(InitializerExpressionableNode(BindingNamedNode(ctor))))))))));
237006
- var ParameterDeclarationBase = createBase$m(Node8);
237006
+ var ParameterDeclarationBase = createBase$m(Node9);
237007
237007
  var ParameterDeclaration = class extends ParameterDeclarationBase {
237008
237008
  isRestParameter() {
237009
237009
  return this.compilerNode.dotDotDotToken != null;
@@ -237066,7 +237066,7 @@ Node text: ${this.#forgottenText}`;
237066
237066
  if (isParameterWithoutParens())
237067
237067
  addParens();
237068
237068
  function isParameterWithoutParens() {
237069
- return Node8.isArrowFunction(parent) && parent.compilerNode.parameters.length === 1 && parameter.getParentSyntaxListOrThrow().getPreviousSiblingIfKind(common.SyntaxKind.OpenParenToken) == null;
237069
+ return Node9.isArrowFunction(parent) && parent.compilerNode.parameters.length === 1 && parameter.getParentSyntaxListOrThrow().getPreviousSiblingIfKind(common.SyntaxKind.OpenParenToken) == null;
237070
237070
  }
237071
237071
  function addParens() {
237072
237072
  const paramText = parameter.getText();
@@ -237083,14 +237083,14 @@ Node text: ${this.#forgottenText}`;
237083
237083
  });
237084
237084
  }
237085
237085
  }
237086
- var ClassElement = class extends Node8 {
237086
+ var ClassElement = class extends Node9 {
237087
237087
  remove() {
237088
237088
  const parent = this.getParentOrThrow();
237089
- if (Node8.isClassDeclaration(parent) || Node8.isClassExpression(parent))
237089
+ if (Node9.isClassDeclaration(parent) || Node9.isClassExpression(parent))
237090
237090
  removeClassMember(this);
237091
- else if (Node8.isObjectLiteralExpression(parent))
237091
+ else if (Node9.isObjectLiteralExpression(parent))
237092
237092
  removeCommaSeparatedChild(this);
237093
- else if (Node8.isInterfaceDeclaration(parent))
237093
+ else if (Node9.isInterfaceDeclaration(parent))
237094
237094
  removeInterfaceMember(this);
237095
237095
  else
237096
237096
  common.errors.throwNotImplementedForSyntaxKindError(parent.getKind());
@@ -237232,7 +237232,7 @@ Node text: ${this.#forgottenText}`;
237232
237232
  index,
237233
237233
  parent: this,
237234
237234
  write: (writer, info) => {
237235
- const previousMemberHasBody = !isAmbient && info.previousMember != null && Node8.isBodyable(info.previousMember) && info.previousMember.hasBody();
237235
+ const previousMemberHasBody = !isAmbient && info.previousMember != null && Node9.isBodyable(info.previousMember) && info.previousMember.hasBody();
237236
237236
  const firstStructureHasBody = !isAmbient && members instanceof Array && structureHasBody(members[0]);
237237
237237
  if (previousMemberHasBody || info.previousMember != null && firstStructureHasBody)
237238
237238
  writer.blankLineIfLastNot();
@@ -237243,7 +237243,7 @@ Node text: ${this.#forgottenText}`;
237243
237243
  memberPrinter.printTexts(memberWriter, members);
237244
237244
  writer.write(memberWriter.toString());
237245
237245
  const lastStructureHasBody = !isAmbient && members instanceof Array && structureHasBody(members[members.length - 1]);
237246
- const nextMemberHasBody = !isAmbient && info.nextMember != null && Node8.isBodyable(info.nextMember) && info.nextMember.hasBody();
237246
+ const nextMemberHasBody = !isAmbient && info.nextMember != null && Node9.isBodyable(info.nextMember) && info.nextMember.hasBody();
237247
237247
  if (info.nextMember != null && lastStructureHasBody || nextMemberHasBody)
237248
237248
  writer.blankLineIfLastNot();
237249
237249
  else
@@ -237273,7 +237273,7 @@ Node text: ${this.#forgottenText}`;
237273
237273
  structures,
237274
237274
  expectedKind: common.SyntaxKind.Constructor,
237275
237275
  write: (writer, info) => {
237276
- if (!isAmbient && info.previousMember != null && !Node8.isCommentNode(info.previousMember))
237276
+ if (!isAmbient && info.previousMember != null && !Node9.isCommentNode(info.previousMember))
237277
237277
  writer.blankLineIfLastNot();
237278
237278
  else
237279
237279
  writer.newLineIfLastNot();
@@ -237286,7 +237286,7 @@ Node text: ${this.#forgottenText}`;
237286
237286
  });
237287
237287
  }
237288
237288
  getConstructors() {
237289
- return this.getMembers().filter((m) => Node8.isConstructorDeclaration(m));
237289
+ return this.getMembers().filter((m) => Node9.isConstructorDeclaration(m));
237290
237290
  }
237291
237291
  addStaticBlock(structure = {}) {
237292
237292
  return this.insertStaticBlock(getEndIndexFromArray(this.getMembersWithComments()), structure);
@@ -237304,7 +237304,7 @@ Node text: ${this.#forgottenText}`;
237304
237304
  structures,
237305
237305
  expectedKind: common.SyntaxKind.ClassStaticBlockDeclaration,
237306
237306
  write: (writer, info) => {
237307
- if (!isAmbient && info.previousMember != null && !Node8.isCommentNode(info.previousMember))
237307
+ if (!isAmbient && info.previousMember != null && !Node9.isCommentNode(info.previousMember))
237308
237308
  writer.blankLineIfLastNot();
237309
237309
  else
237310
237310
  writer.newLineIfLastNot();
@@ -237317,7 +237317,7 @@ Node text: ${this.#forgottenText}`;
237317
237317
  });
237318
237318
  }
237319
237319
  getStaticBlocks() {
237320
- return this.getMembers().filter((m) => Node8.isClassStaticBlockDeclaration(m));
237320
+ return this.getMembers().filter((m) => Node9.isClassStaticBlockDeclaration(m));
237321
237321
  }
237322
237322
  addGetAccessor(structure) {
237323
237323
  return this.addGetAccessors([structure])[0];
@@ -237334,7 +237334,7 @@ Node text: ${this.#forgottenText}`;
237334
237334
  structures,
237335
237335
  expectedKind: common.SyntaxKind.GetAccessor,
237336
237336
  write: (writer, info) => {
237337
- if (info.previousMember != null && !Node8.isCommentNode(info.previousMember))
237337
+ if (info.previousMember != null && !Node9.isCommentNode(info.previousMember))
237338
237338
  writer.blankLineIfLastNot();
237339
237339
  else
237340
237340
  writer.newLineIfLastNot();
@@ -237363,7 +237363,7 @@ Node text: ${this.#forgottenText}`;
237363
237363
  structures,
237364
237364
  expectedKind: common.SyntaxKind.SetAccessor,
237365
237365
  write: (writer, info) => {
237366
- if (info.previousMember != null && !Node8.isCommentNode(info.previousMember))
237366
+ if (info.previousMember != null && !Node9.isCommentNode(info.previousMember))
237367
237367
  writer.blankLineIfLastNot();
237368
237368
  else
237369
237369
  writer.newLineIfLastNot();
@@ -237392,12 +237392,12 @@ Node text: ${this.#forgottenText}`;
237392
237392
  structures,
237393
237393
  expectedKind: common.SyntaxKind.PropertyDeclaration,
237394
237394
  write: (writer, info) => {
237395
- if (info.previousMember != null && Node8.hasBody(info.previousMember))
237395
+ if (info.previousMember != null && Node9.hasBody(info.previousMember))
237396
237396
  writer.blankLineIfLastNot();
237397
237397
  else
237398
237398
  writer.newLineIfLastNot();
237399
237399
  this._context.structurePrinterFactory.forPropertyDeclaration().printTexts(writer, structures);
237400
- if (info.nextMember != null && Node8.hasBody(info.nextMember))
237400
+ if (info.nextMember != null && Node9.hasBody(info.nextMember))
237401
237401
  writer.blankLineIfLastNot();
237402
237402
  else
237403
237403
  writer.newLineIfLastNot();
@@ -237419,7 +237419,7 @@ Node text: ${this.#forgottenText}`;
237419
237419
  return insertChildren(this, {
237420
237420
  index,
237421
237421
  write: (writer, info) => {
237422
- if (!isAmbient && info.previousMember != null && !Node8.isCommentNode(info.previousMember))
237422
+ if (!isAmbient && info.previousMember != null && !Node9.isCommentNode(info.previousMember))
237423
237423
  writer.blankLineIfLastNot();
237424
237424
  else
237425
237425
  writer.newLineIfLastNot();
@@ -237458,7 +237458,7 @@ Node text: ${this.#forgottenText}`;
237458
237458
  return common.errors.throwIfNullOrUndefined(this.getProperty(nameOrFindFunction), () => getNotFoundErrorMessageForNameOrFindFunction("class property declaration", nameOrFindFunction));
237459
237459
  }
237460
237460
  getProperties() {
237461
- return this.getMembers().filter((m) => Node8.isPropertyDeclaration(m));
237461
+ return this.getMembers().filter((m) => Node9.isPropertyDeclaration(m));
237462
237462
  }
237463
237463
  getGetAccessor(nameOrFindFunction) {
237464
237464
  return getNodeByNameOrFindFunction(this.getGetAccessors(), nameOrFindFunction);
@@ -237467,7 +237467,7 @@ Node text: ${this.#forgottenText}`;
237467
237467
  return common.errors.throwIfNullOrUndefined(this.getGetAccessor(nameOrFindFunction), () => getNotFoundErrorMessageForNameOrFindFunction("class getAccessor declaration", nameOrFindFunction));
237468
237468
  }
237469
237469
  getGetAccessors() {
237470
- return this.getMembers().filter((m) => Node8.isGetAccessorDeclaration(m));
237470
+ return this.getMembers().filter((m) => Node9.isGetAccessorDeclaration(m));
237471
237471
  }
237472
237472
  getSetAccessor(nameOrFindFunction) {
237473
237473
  return getNodeByNameOrFindFunction(this.getSetAccessors(), nameOrFindFunction);
@@ -237476,7 +237476,7 @@ Node text: ${this.#forgottenText}`;
237476
237476
  return common.errors.throwIfNullOrUndefined(this.getSetAccessor(nameOrFindFunction), () => getNotFoundErrorMessageForNameOrFindFunction("class setAccessor declaration", nameOrFindFunction));
237477
237477
  }
237478
237478
  getSetAccessors() {
237479
- return this.getMembers().filter((m) => Node8.isSetAccessorDeclaration(m));
237479
+ return this.getMembers().filter((m) => Node9.isSetAccessorDeclaration(m));
237480
237480
  }
237481
237481
  getMethod(nameOrFindFunction) {
237482
237482
  return getNodeByNameOrFindFunction(this.getMethods(), nameOrFindFunction);
@@ -237485,7 +237485,7 @@ Node text: ${this.#forgottenText}`;
237485
237485
  return common.errors.throwIfNullOrUndefined(this.getMethod(nameOrFindFunction), () => getNotFoundErrorMessageForNameOrFindFunction("class method declaration", nameOrFindFunction));
237486
237486
  }
237487
237487
  getMethods() {
237488
- return this.getMembers().filter((m) => Node8.isMethodDeclaration(m));
237488
+ return this.getMembers().filter((m) => Node9.isMethodDeclaration(m));
237489
237489
  }
237490
237490
  getInstanceMethod(nameOrFindFunction) {
237491
237491
  return getNodeByNameOrFindFunction(this.getInstanceMethods(), nameOrFindFunction);
@@ -237513,9 +237513,9 @@ Node text: ${this.#forgottenText}`;
237513
237513
  }
237514
237514
  getInstanceMembers() {
237515
237515
  return this.getMembersWithParameterProperties().filter((m) => {
237516
- if (Node8.isConstructorDeclaration(m))
237516
+ if (Node9.isConstructorDeclaration(m))
237517
237517
  return false;
237518
- return Node8.isParameterDeclaration(m) || !m.isStatic();
237518
+ return Node9.isParameterDeclaration(m) || !m.isStatic();
237519
237519
  });
237520
237520
  }
237521
237521
  getStaticMember(nameOrFindFunction) {
@@ -237526,14 +237526,14 @@ Node text: ${this.#forgottenText}`;
237526
237526
  }
237527
237527
  getStaticMembers() {
237528
237528
  return this.getMembers().filter((m) => {
237529
- if (Node8.isConstructorDeclaration(m))
237529
+ if (Node9.isConstructorDeclaration(m))
237530
237530
  return false;
237531
- return !Node8.isParameterDeclaration(m) && m.isStatic();
237531
+ return !Node9.isParameterDeclaration(m) && m.isStatic();
237532
237532
  });
237533
237533
  }
237534
237534
  getMembersWithParameterProperties() {
237535
237535
  const members = this.getMembers();
237536
- const implementationCtors = members.filter((c) => Node8.isConstructorDeclaration(c) && c.isImplementation());
237536
+ const implementationCtors = members.filter((c) => Node9.isConstructorDeclaration(c) && c.isImplementation());
237537
237537
  for (const ctor of implementationCtors) {
237538
237538
  let insertIndex = members.indexOf(ctor) + 1;
237539
237539
  for (const param of ctor.getParameters()) {
@@ -237551,7 +237551,7 @@ Node text: ${this.#forgottenText}`;
237551
237551
  getMembersWithComments() {
237552
237552
  const compilerNode = this.compilerNode;
237553
237553
  const members = ExtendedParser.getContainerArray(compilerNode, this.getSourceFile().compilerNode);
237554
- return getAllMembers(this, members).filter((m) => isSupportedClassMember(m) || Node8.isCommentClassElement(m));
237554
+ return getAllMembers(this, members).filter((m) => isSupportedClassMember(m) || Node9.isCommentClassElement(m));
237555
237555
  }
237556
237556
  getMember(nameOrFindFunction) {
237557
237557
  return getNodeByNameOrFindFunction(this.getMembers(), nameOrFindFunction);
@@ -237589,9 +237589,9 @@ Node text: ${this.#forgottenText}`;
237589
237589
  const isAmbient = isNodeAmbientOrInAmbientContext(classDec);
237590
237590
  const members = compilerMembers.map((m) => classDec._getNodeFromCompilerNode(m));
237591
237591
  return isAmbient ? members : members.filter((m) => {
237592
- if (!(Node8.isConstructorDeclaration(m) || Node8.isMethodDeclaration(m)))
237592
+ if (!(Node9.isConstructorDeclaration(m) || Node9.isMethodDeclaration(m)))
237593
237593
  return true;
237594
- if (Node8.isMethodDeclaration(m) && m.isAbstract())
237594
+ if (Node9.isMethodDeclaration(m) && m.isAbstract())
237595
237595
  return true;
237596
237596
  return m.isImplementation();
237597
237597
  });
@@ -237617,10 +237617,10 @@ Node text: ${this.#forgottenText}`;
237617
237617
  return classes;
237618
237618
  }
237619
237619
  function isClassPropertyType(m) {
237620
- return Node8.isPropertyDeclaration(m) || Node8.isSetAccessorDeclaration(m) || Node8.isGetAccessorDeclaration(m) || Node8.isParameterDeclaration(m);
237620
+ return Node9.isPropertyDeclaration(m) || Node9.isSetAccessorDeclaration(m) || Node9.isGetAccessorDeclaration(m) || Node9.isParameterDeclaration(m);
237621
237621
  }
237622
237622
  function isSupportedClassMember(m) {
237623
- return Node8.isMethodDeclaration(m) || Node8.isPropertyDeclaration(m) || Node8.isGetAccessorDeclaration(m) || Node8.isSetAccessorDeclaration(m) || Node8.isConstructorDeclaration(m) || Node8.isClassStaticBlockDeclaration(m);
237623
+ return Node9.isMethodDeclaration(m) || Node9.isPropertyDeclaration(m) || Node9.isGetAccessorDeclaration(m) || Node9.isSetAccessorDeclaration(m) || Node9.isConstructorDeclaration(m) || Node9.isClassStaticBlockDeclaration(m);
237624
237624
  }
237625
237625
  function insertChildren(classDeclaration, opts) {
237626
237626
  return insertIntoBracesOrSourceFileWithGetChildren({
@@ -237688,7 +237688,7 @@ Node text: ${this.#forgottenText}`;
237688
237688
  typeParameters: this.getTypeParameters().map((p) => p.getStructure()),
237689
237689
  properties: [
237690
237690
  ...parameterProperties.map((p) => {
237691
- const jsDocComment = p.getParentOrThrow().getJsDocs().map((j) => j.getTags()).flat().filter(Node8.isJSDocParameterTag).filter((t) => t.getTagName() === "param" && t.getName() === p.getName() && t.getComment() != null).map((t) => t.getCommentText().trim())[0];
237691
+ const jsDocComment = p.getParentOrThrow().getJsDocs().map((j) => j.getTags()).flat().filter(Node9.isJSDocParameterTag).filter((t) => t.getTagName() === "param" && t.getName() === p.getName() && t.getComment() != null).map((t) => t.getCommentText().trim())[0];
237692
237692
  return {
237693
237693
  kind: exports.StructureKind.PropertySignature,
237694
237694
  docs: jsDocComment == null ? [] : [{ kind: exports.StructureKind.JSDoc, description: jsDocComment }],
@@ -237763,7 +237763,7 @@ Node text: ${this.#forgottenText}`;
237763
237763
  name: getAndSet[0].getName(),
237764
237764
  type: getAndSet[0].getType().getText(getAndSet[0]),
237765
237765
  hasQuestionToken: false,
237766
- isReadonly: getAndSet.every(Node8.isGetAccessorDeclaration)
237766
+ isReadonly: getAndSet.every(Node9.isGetAccessorDeclaration)
237767
237767
  };
237768
237768
  }
237769
237769
  function getExtractedInterfaceMethodStructure(method) {
@@ -237880,7 +237880,7 @@ Node text: ${this.#forgottenText}`;
237880
237880
  const thisName = this.getName();
237881
237881
  const isStatic = this.isStatic();
237882
237882
  return this.getParentOrThrow().forEachChild((sibling) => {
237883
- if (Node8.isSetAccessorDeclaration(sibling) && sibling.getName() === thisName && sibling.isStatic() === isStatic)
237883
+ if (Node9.isSetAccessorDeclaration(sibling) && sibling.getName() === thisName && sibling.isStatic() === isStatic)
237884
237884
  return sibling;
237885
237885
  return void 0;
237886
237886
  });
@@ -237937,7 +237937,7 @@ Node text: ${this.#forgottenText}`;
237937
237937
  const thisName = this.getName();
237938
237938
  const isStatic = this.isStatic();
237939
237939
  return this.getParentOrThrow().forEachChild((sibling) => {
237940
- if (Node8.isGetAccessorDeclaration(sibling) && sibling.getName() === thisName && sibling.isStatic() === isStatic)
237940
+ if (Node9.isGetAccessorDeclaration(sibling) && sibling.getName() === thisName && sibling.isStatic() === isStatic)
237941
237941
  return sibling;
237942
237942
  return void 0;
237943
237943
  });
@@ -237951,7 +237951,7 @@ Node text: ${this.#forgottenText}`;
237951
237951
  });
237952
237952
  }
237953
237953
  };
237954
- var DecoratorBase = LeftHandSideExpressionedNode(Node8);
237954
+ var DecoratorBase = LeftHandSideExpressionedNode(Node9);
237955
237955
  var Decorator = class extends DecoratorBase {
237956
237956
  getName() {
237957
237957
  return this.getNameNode().getText();
@@ -237964,13 +237964,13 @@ Node text: ${this.#forgottenText}`;
237964
237964
  return getIdentifierFromName(this._getInnerExpression());
237965
237965
  function getIdentifierFromName(expression) {
237966
237966
  const identifier = getNameFromExpression(expression);
237967
- if (!Node8.isIdentifier(identifier)) {
237967
+ if (!Node9.isIdentifier(identifier)) {
237968
237968
  throw new common.errors.NotImplementedError(`Expected the decorator expression '${identifier.getText()}' to be an identifier. Please deal directly with 'getExpression()' on the decorator to handle more complex scenarios.`);
237969
237969
  }
237970
237970
  return identifier;
237971
237971
  }
237972
237972
  function getNameFromExpression(expression) {
237973
- if (Node8.isPropertyAccessExpression(expression))
237973
+ if (Node9.isPropertyAccessExpression(expression))
237974
237974
  return expression.getNameNode();
237975
237975
  return expression;
237976
237976
  }
@@ -237982,7 +237982,7 @@ Node text: ${this.#forgottenText}`;
237982
237982
  return this.compilerNode.expression.getText(sourceFile.compilerNode);
237983
237983
  }
237984
237984
  isDecoratorFactory() {
237985
- return Node8.isCallExpression(this._getInnerExpression());
237985
+ return Node9.isCallExpression(this._getInnerExpression());
237986
237986
  }
237987
237987
  setIsDecoratorFactory(isDecoratorFactory) {
237988
237988
  if (this.isDecoratorFactory() === isDecoratorFactory)
@@ -238024,7 +238024,7 @@ Node text: ${this.#forgottenText}`;
238024
238024
  }
238025
238025
  getCallExpression() {
238026
238026
  const expression = this._getInnerExpression();
238027
- return Node8.isCallExpression(expression) ? expression : void 0;
238027
+ return Node9.isCallExpression(expression) ? expression : void 0;
238028
238028
  }
238029
238029
  getArguments() {
238030
238030
  return this.getCallExpression()?.getArguments() ?? [];
@@ -238088,7 +238088,7 @@ Node text: ${this.#forgottenText}`;
238088
238088
  }
238089
238089
  _getInnerExpression() {
238090
238090
  let expr = this.getExpression();
238091
- while (Node8.isParenthesizedExpression(expr))
238091
+ while (Node9.isParenthesizedExpression(expr))
238092
238092
  expr = expr.getExpression();
238093
238093
  return expr;
238094
238094
  }
@@ -238177,7 +238177,7 @@ Node text: ${this.#forgottenText}`;
238177
238177
  return -1;
238178
238178
  }
238179
238179
  }
238180
- var JSDocBase = Node8;
238180
+ var JSDocBase = Node9;
238181
238181
  var JSDoc = class extends JSDocBase {
238182
238182
  isMultiLine() {
238183
238183
  return this.getText().includes("\n");
@@ -238318,7 +238318,7 @@ Node text: ${this.#forgottenText}`;
238318
238318
  });
238319
238319
  }
238320
238320
  };
238321
- var TypeNode = class extends Node8 {
238321
+ var TypeNode = class extends Node9 {
238322
238322
  };
238323
238323
  var NodeWithTypeArgumentsBase = TypeArgumentedNode(TypeNode);
238324
238324
  var NodeWithTypeArguments = class extends NodeWithTypeArgumentsBase {
@@ -238357,9 +238357,9 @@ Node text: ${this.#forgottenText}`;
238357
238357
  var ImportTypeNode = class extends NodeWithTypeArguments {
238358
238358
  setArgument(text) {
238359
238359
  const arg = this.getArgument();
238360
- if (Node8.isLiteralTypeNode(arg)) {
238360
+ if (Node9.isLiteralTypeNode(arg)) {
238361
238361
  const literal = arg.getLiteral();
238362
- if (Node8.isStringLiteral(literal)) {
238362
+ if (Node9.isStringLiteral(literal)) {
238363
238363
  literal.setLiteralValue(text);
238364
238364
  return this;
238365
238365
  }
@@ -238538,7 +238538,7 @@ Node text: ${this.#forgottenText}`;
238538
238538
  TypeParameterVariance[TypeParameterVariance["InOut"] = 3] = "InOut";
238539
238539
  })(exports.TypeParameterVariance || (exports.TypeParameterVariance = {}));
238540
238540
  var createBase$c = (ctor) => ModifierableNode(NamedNode(ctor));
238541
- var TypeParameterDeclarationBase = createBase$c(Node8);
238541
+ var TypeParameterDeclarationBase = createBase$c(Node9);
238542
238542
  var TypeParameterDeclaration = class extends TypeParameterDeclarationBase {
238543
238543
  isConst() {
238544
238544
  return this.hasModifier(common.SyntaxKind.ConstKeyword);
@@ -238708,7 +238708,7 @@ Node text: ${this.#forgottenText}`;
238708
238708
  };
238709
238709
  var JSDocAllType = class extends JSDocType {
238710
238710
  };
238711
- var JSDocTagBase = Node8;
238711
+ var JSDocTagBase = Node9;
238712
238712
  var JSDocTag = class extends JSDocTagBase {
238713
238713
  getTagName() {
238714
238714
  return this.getTagNameNode().getText();
@@ -238834,20 +238834,20 @@ Node text: ${this.#forgottenText}`;
238834
238834
  };
238835
238835
  var JSDocImportTag = class extends JSDocTag {
238836
238836
  };
238837
- var JSDocLink = class extends Node8 {
238837
+ var JSDocLink = class extends Node9 {
238838
238838
  };
238839
- var JSDocLinkCode = class extends Node8 {
238839
+ var JSDocLinkCode = class extends Node9 {
238840
238840
  };
238841
- var JSDocLinkPlain = class extends Node8 {
238841
+ var JSDocLinkPlain = class extends Node9 {
238842
238842
  };
238843
- var JSDocMemberName = class extends Node8 {
238843
+ var JSDocMemberName = class extends Node9 {
238844
238844
  };
238845
238845
  var JSDocNamepathType = class extends JSDocType {
238846
238846
  getTypeNode() {
238847
238847
  return this._getNodeFromCompilerNode(this.compilerNode.type);
238848
238848
  }
238849
238849
  };
238850
- var JSDocNameReference = class extends Node8 {
238850
+ var JSDocNameReference = class extends Node9 {
238851
238851
  getName() {
238852
238852
  return this._getNodeFromCompilerNode(this.compilerNode.name);
238853
238853
  }
@@ -238930,7 +238930,7 @@ Node text: ${this.#forgottenText}`;
238930
238930
  return common.errors.throwIfNullOrUndefined(this.getConstraint(), message ?? "Expected to find the JS doc template tag's constraint.", this);
238931
238931
  }
238932
238932
  };
238933
- var JSDocText = class extends Node8 {
238933
+ var JSDocText = class extends Node9 {
238934
238934
  };
238935
238935
  var JSDocThisTagBase = JSDocTypeExpressionableTag(JSDocTag);
238936
238936
  var JSDocThisTag = class extends JSDocThisTagBase {
@@ -238970,7 +238970,7 @@ Node text: ${this.#forgottenText}`;
238970
238970
  return this._getNodeFromCompilerNode(this.compilerNode.type);
238971
238971
  }
238972
238972
  };
238973
- var CommentEnumMember = class extends Node8 {
238973
+ var CommentEnumMember = class extends Node9 {
238974
238974
  remove() {
238975
238975
  removeChildrenWithFormatting({
238976
238976
  children: [this],
@@ -239054,7 +239054,7 @@ Node text: ${this.#forgottenText}`;
239054
239054
  }
239055
239055
  };
239056
239056
  var createBase$a = (ctor) => JSDocableNode(InitializerExpressionableNode(PropertyNamedNode(ctor)));
239057
- var EnumMemberBase = createBase$a(Node8);
239057
+ var EnumMemberBase = createBase$a(Node9);
239058
239058
  var EnumMember = class extends EnumMemberBase {
239059
239059
  getValue() {
239060
239060
  return this._context.typeChecker.getConstantValue(this);
@@ -239095,7 +239095,7 @@ Node text: ${this.#forgottenText}`;
239095
239095
  });
239096
239096
  }
239097
239097
  };
239098
- var HeritageClause = class extends Node8 {
239098
+ var HeritageClause = class extends Node9 {
239099
239099
  getTypeNodes() {
239100
239100
  return this.compilerNode.types?.map((t) => this._getNodeFromCompilerNode(t)) ?? [];
239101
239101
  }
@@ -239120,7 +239120,7 @@ Node text: ${this.#forgottenText}`;
239120
239120
  }
239121
239121
  }
239122
239122
  };
239123
- var TypeElement = class extends Node8 {
239123
+ var TypeElement = class extends Node9 {
239124
239124
  remove() {
239125
239125
  removeInterfaceMember(this);
239126
239126
  }
@@ -239333,7 +239333,7 @@ Node text: ${this.#forgottenText}`;
239333
239333
  }
239334
239334
  };
239335
239335
  }
239336
- var ComputedPropertyNameBase = ExpressionedNode(Node8);
239336
+ var ComputedPropertyNameBase = ExpressionedNode(Node9);
239337
239337
  var ComputedPropertyName = class extends ComputedPropertyNameBase {
239338
239338
  };
239339
239339
  var IdentifierBase = CommonIdentifierBase(ReferenceFindableNode(RenameableNode(PrimaryExpression)));
@@ -239342,10 +239342,10 @@ Node text: ${this.#forgottenText}`;
239342
239342
  return this._context.languageService.getImplementations(this);
239343
239343
  }
239344
239344
  };
239345
- var PrivateIdentifierBase = CommonIdentifierBase(ReferenceFindableNode(RenameableNode(Node8)));
239345
+ var PrivateIdentifierBase = CommonIdentifierBase(ReferenceFindableNode(RenameableNode(Node9)));
239346
239346
  var PrivateIdentifier = class extends PrivateIdentifierBase {
239347
239347
  };
239348
- var QualifiedName = class extends Node8 {
239348
+ var QualifiedName = class extends Node9 {
239349
239349
  getLeft() {
239350
239350
  return this._getNodeFromCompilerNode(this.compilerNode.left);
239351
239351
  }
@@ -239353,7 +239353,7 @@ Node text: ${this.#forgottenText}`;
239353
239353
  return this._getNodeFromCompilerNode(this.compilerNode.right);
239354
239354
  }
239355
239355
  };
239356
- var JsxAttributeBase = Node8;
239356
+ var JsxAttributeBase = Node9;
239357
239357
  var JsxAttribute = class extends JsxAttributeBase {
239358
239358
  getNameNode() {
239359
239359
  return this._getNodeFromCompilerNode(this.compilerNode.name);
@@ -239430,7 +239430,7 @@ Node text: ${this.#forgottenText}`;
239430
239430
  }
239431
239431
  };
239432
239432
  var createBase$3 = (ctor) => JsxTagNamedNode(ctor);
239433
- var JsxClosingElementBase = createBase$3(Node8);
239433
+ var JsxClosingElementBase = createBase$3(Node9);
239434
239434
  var JsxClosingElement = class extends JsxClosingElementBase {
239435
239435
  };
239436
239436
  var JsxClosingFragment = class extends Expression {
@@ -239519,7 +239519,7 @@ Node text: ${this.#forgottenText}`;
239519
239519
  return this._getNodeFromCompilerNode(this.compilerNode.closingFragment);
239520
239520
  }
239521
239521
  };
239522
- var JsxNamespacedNameBase = Node8;
239522
+ var JsxNamespacedNameBase = Node9;
239523
239523
  var JsxNamespacedName = class extends JsxNamespacedNameBase {
239524
239524
  getNamespaceNode() {
239525
239525
  return this._getNodeFromCompilerNode(this.compilerNode.namespace);
@@ -239558,7 +239558,7 @@ Node text: ${this.#forgottenText}`;
239558
239558
  });
239559
239559
  }
239560
239560
  };
239561
- var JsxSpreadAttributeBase = ExpressionedNode(Node8);
239561
+ var JsxSpreadAttributeBase = ExpressionedNode(Node9);
239562
239562
  var JsxSpreadAttribute = class extends JsxSpreadAttributeBase {
239563
239563
  remove() {
239564
239564
  removeChildren({
@@ -239580,7 +239580,7 @@ Node text: ${this.#forgottenText}`;
239580
239580
  });
239581
239581
  }
239582
239582
  };
239583
- var JsxTextBase = LiteralLikeNode(Node8);
239583
+ var JsxTextBase = LiteralLikeNode(Node9);
239584
239584
  var JsxText = class extends JsxTextBase {
239585
239585
  containsOnlyTriviaWhiteSpaces() {
239586
239586
  const oldCompilerNode = this.compilerNode;
@@ -239769,23 +239769,23 @@ Node text: ${this.#forgottenText}`;
239769
239769
  return parent.getChildAtIndex(childIndex);
239770
239770
  }
239771
239771
  };
239772
- var TemplateHeadBase = LiteralLikeNode(Node8);
239772
+ var TemplateHeadBase = LiteralLikeNode(Node9);
239773
239773
  var TemplateHead = class extends TemplateHeadBase {
239774
239774
  };
239775
- var TemplateMiddleBase = LiteralLikeNode(Node8);
239775
+ var TemplateMiddleBase = LiteralLikeNode(Node9);
239776
239776
  var TemplateMiddle = class extends TemplateMiddleBase {
239777
239777
  };
239778
- var TemplateSpanBase = ExpressionedNode(Node8);
239778
+ var TemplateSpanBase = ExpressionedNode(Node9);
239779
239779
  var TemplateSpan = class extends TemplateSpanBase {
239780
239780
  getLiteral() {
239781
239781
  return this._getNodeFromCompilerNode(this.compilerNode.literal);
239782
239782
  }
239783
239783
  };
239784
- var TemplateTailBase = LiteralLikeNode(Node8);
239784
+ var TemplateTailBase = LiteralLikeNode(Node9);
239785
239785
  var TemplateTail = class extends TemplateTailBase {
239786
239786
  };
239787
239787
  var createBase = (ctor) => ExportGetableNode(ExclamationTokenableNode(TypedNode(InitializerExpressionableNode(BindingNamedNode(ctor)))));
239788
- var VariableDeclarationBase = createBase(Node8);
239788
+ var VariableDeclarationBase = createBase(Node9);
239789
239789
  var VariableDeclaration = class extends VariableDeclarationBase {
239790
239790
  remove() {
239791
239791
  const parent = this.getParentOrThrow();
@@ -239823,7 +239823,7 @@ Node text: ${this.#forgottenText}`;
239823
239823
  }
239824
239824
  getVariableStatement() {
239825
239825
  const grandParent = this.getParentOrThrow().getParentOrThrow();
239826
- return Node8.isVariableStatement(grandParent) ? grandParent : void 0;
239826
+ return Node9.isVariableStatement(grandParent) ? grandParent : void 0;
239827
239827
  }
239828
239828
  set(structure) {
239829
239829
  callBaseSet(VariableDeclarationBase.prototype, this, structure);
@@ -239835,7 +239835,7 @@ Node text: ${this.#forgottenText}`;
239835
239835
  });
239836
239836
  }
239837
239837
  };
239838
- var VariableDeclarationListBase = ModifierableNode(Node8);
239838
+ var VariableDeclarationListBase = ModifierableNode(Node9);
239839
239839
  var VariableDeclarationList = class extends VariableDeclarationListBase {
239840
239840
  getDeclarations() {
239841
239841
  return this.compilerNode.declarations.map((d) => this._getNodeFromCompilerNode(d));
@@ -241296,7 +241296,7 @@ Node text: ${this.#forgottenText}`;
241296
241296
  if (symbol == null)
241297
241297
  return false;
241298
241298
  const valueDeclaration = symbol.getValueDeclaration();
241299
- return valueDeclaration != null && Node8.isEnumDeclaration(valueDeclaration);
241299
+ return valueDeclaration != null && Node9.isEnumDeclaration(valueDeclaration);
241300
241300
  }
241301
241301
  isInterface() {
241302
241302
  return this.#hasObjectFlag(common.ObjectFlags.Interface);
@@ -241381,7 +241381,7 @@ Node text: ${this.#forgottenText}`;
241381
241381
  const declaration = symbol.getDeclarations()[0];
241382
241382
  if (declaration == null)
241383
241383
  return void 0;
241384
- if (!Node8.isTypeParameterDeclaration(declaration))
241384
+ if (!Node9.isTypeParameterDeclaration(declaration))
241385
241385
  return void 0;
241386
241386
  return declaration;
241387
241387
  }
@@ -242365,13 +242365,13 @@ Node text: ${this.#forgottenText}`;
242365
242365
  [common.SyntaxKind.WhileStatement]: WhileStatement,
242366
242366
  [common.SyntaxKind.WithStatement]: WithStatement,
242367
242367
  [common.SyntaxKind.YieldExpression]: YieldExpression,
242368
- [common.SyntaxKind.SemicolonToken]: Node8,
242368
+ [common.SyntaxKind.SemicolonToken]: Node9,
242369
242369
  [common.SyntaxKind.AnyKeyword]: Expression,
242370
242370
  [common.SyntaxKind.BooleanKeyword]: Expression,
242371
242371
  [common.SyntaxKind.FalseKeyword]: FalseLiteral,
242372
242372
  [common.SyntaxKind.ImportKeyword]: ImportExpression,
242373
- [common.SyntaxKind.InferKeyword]: Node8,
242374
- [common.SyntaxKind.NeverKeyword]: Node8,
242373
+ [common.SyntaxKind.InferKeyword]: Node9,
242374
+ [common.SyntaxKind.NeverKeyword]: Node9,
242375
242375
  [common.SyntaxKind.NullKeyword]: NullLiteral,
242376
242376
  [common.SyntaxKind.NumberKeyword]: Expression,
242377
242377
  [common.SyntaxKind.ObjectKeyword]: Expression,
@@ -242535,7 +242535,7 @@ Node text: ${this.#forgottenText}`;
242535
242535
  return new CommentEnumMember(this.#context, compilerNode, sourceFile);
242536
242536
  return common.errors.throwNotImplementedForNeverValueError(compilerNode);
242537
242537
  }
242538
- const ctor = kindToWrapperMappings[compilerNode.kind] || Node8;
242538
+ const ctor = kindToWrapperMappings[compilerNode.kind] || Node9;
242539
242539
  return new ctor(this.#context, compilerNode, sourceFile);
242540
242540
  }
242541
242541
  function isCommentNode(node) {
@@ -242666,8 +242666,8 @@ Node text: ${this.#forgottenText}`;
242666
242666
  return this.#jsDocTagInfoCache.getOrCreate(jsDocTagInfo, () => new JSDocTagInfo(jsDocTagInfo));
242667
242667
  }
242668
242668
  replaceCompilerNode(oldNode, newNode) {
242669
- const nodeToReplace = oldNode instanceof Node8 ? oldNode.compilerNode : oldNode;
242670
- const node = oldNode instanceof Node8 ? oldNode : this.#nodeCache.get(oldNode);
242669
+ const nodeToReplace = oldNode instanceof Node9 ? oldNode.compilerNode : oldNode;
242670
+ const node = oldNode instanceof Node9 ? oldNode : this.#nodeCache.get(oldNode);
242671
242671
  if (nodeToReplace.kind === common.SyntaxKind.SourceFile && nodeToReplace.fileName !== newNode.fileName) {
242672
242672
  const sourceFile = node;
242673
242673
  this.#removeCompilerNodeFromCache(nodeToReplace);
@@ -242712,12 +242712,12 @@ Node text: ${this.#forgottenText}`;
242712
242712
  for (const node of nodes)
242713
242713
  this.#nodeCache.rememberNode(node);
242714
242714
  });
242715
- if (Node8.isNode(result))
242715
+ if (Node9.isNode(result))
242716
242716
  this.#nodeCache.rememberNode(result);
242717
242717
  if (isPromise(result)) {
242718
242718
  wasPromise = true;
242719
242719
  return result.then((value) => {
242720
- if (Node8.isNode(value))
242720
+ if (Node9.isNode(value))
242721
242721
  this.#nodeCache.rememberNode(value);
242722
242722
  this.#nodeCache.forgetLastPoint();
242723
242723
  return value;
@@ -243845,7 +243845,7 @@ Node text: ${this.#forgottenText}`;
243845
243845
  exports.NewExpressionBase = NewExpressionBase;
243846
243846
  exports.NoSubstitutionTemplateLiteral = NoSubstitutionTemplateLiteral;
243847
243847
  exports.NoSubstitutionTemplateLiteralBase = NoSubstitutionTemplateLiteralBase;
243848
- exports.Node = Node8;
243848
+ exports.Node = Node9;
243849
243849
  exports.NodeWithTypeArguments = NodeWithTypeArguments;
243850
243850
  exports.NodeWithTypeArgumentsBase = NodeWithTypeArgumentsBase;
243851
243851
  exports.NonNullExpression = NonNullExpression;
@@ -293077,7 +293077,7 @@ function useColor() {
293077
293077
  var program = new Command();
293078
293078
 
293079
293079
  // src/main.ts
293080
- var import_ts_morph20 = __toESM(require_ts_morph(), 1);
293080
+ var import_ts_morph21 = __toESM(require_ts_morph(), 1);
293081
293081
 
293082
293082
  // src/facts/fact-emitter.ts
293083
293083
  init_esm_shims();
@@ -293096,7 +293096,12 @@ var NdjsonFactEmitter = class {
293096
293096
  emittedAt;
293097
293097
  output;
293098
293098
  home;
293099
+ // When false, emit full FactEnvelope lines straight to `output` (no temp file,
293100
+ // no model/path compression, no flush() needed). Used by tests and any caller
293101
+ // that wants the un-tokenized stream; production keeps the default (compressed).
293102
+ compress;
293099
293103
  // Temp file used for streaming facts without full in-memory buffering
293104
+ // (compressed mode only).
293100
293105
  tmpPath;
293101
293106
  tmpStream;
293102
293107
  // Model registry — tiny, bounded by unique (factType×language×scanner×version) combos
@@ -293104,16 +293109,32 @@ var NdjsonFactEmitter = class {
293104
293109
  modelCounter = 0;
293105
293110
  // Path frequency map — bounded by unique path prefix strings seen
293106
293111
  pathFreq = /* @__PURE__ */ new Map();
293107
- constructor(output = process.stdout) {
293112
+ constructor(output = process.stdout, opts = {}) {
293108
293113
  this.output = output;
293114
+ this.compress = opts.compress ?? true;
293109
293115
  this.emittedAt = (/* @__PURE__ */ new Date()).toISOString();
293110
293116
  this.home = homedir();
293111
- this.tmpPath = join(tmpdir(), `vibgrate-hcs-${randomBytes(8).toString("hex")}.ndjson.tmp`);
293112
- this.tmpStream = createWriteStream(this.tmpPath, { encoding: "utf8" });
293117
+ if (this.compress) {
293118
+ this.tmpPath = join(tmpdir(), `vibgrate-hcs-${randomBytes(8).toString("hex")}.ndjson.tmp`);
293119
+ this.tmpStream = createWriteStream(this.tmpPath, { encoding: "utf8" });
293120
+ }
293113
293121
  }
293114
293122
  setLanguage(language) {
293115
293123
  this.language = language;
293116
293124
  }
293125
+ /**
293126
+ * Write pre-formed NDJSON straight to the output stream, bypassing model/path
293127
+ * compression. Used to splice in the WASM engine's `FactEnvelope` output (which
293128
+ * is already self-contained NDJSON) alongside the in-process facts. The two
293129
+ * streams never overlap on fact type, so no de-duplication is needed; the
293130
+ * consumer validates each line independently regardless of envelope form.
293131
+ */
293132
+ writeRaw(ndjson) {
293133
+ const body = ndjson.endsWith("\n") ? ndjson.slice(0, -1) : ndjson;
293134
+ if (body.trim().length === 0) return;
293135
+ this.output.write(`${body}
293136
+ `);
293137
+ }
293117
293138
  // ── Emit helpers ─────────────────────────────────────────
293118
293139
  emitSymbolDeclared(p) {
293119
293140
  this.emit("SymbolDeclared", p.symbolId, p);
@@ -293251,6 +293272,19 @@ var NdjsonFactEmitter = class {
293251
293272
  // ── Core emit — streams to temp file ────────────────────
293252
293273
  emit(factType, idSeed, payload) {
293253
293274
  const strippedPayload = transformStrings(payload, (s) => stripHome(s, this.home));
293275
+ if (!this.compress) {
293276
+ const envelope = {
293277
+ factId: generateFactId(factType, idSeed),
293278
+ factType,
293279
+ language: this.language,
293280
+ scanner: this.scanner,
293281
+ scannerVersion: this.scannerVersion,
293282
+ emittedAt: this.emittedAt,
293283
+ payload: strippedPayload
293284
+ };
293285
+ this.output.write(JSON.stringify(envelope) + "\n");
293286
+ return;
293287
+ }
293254
293288
  collectPathFrequencies(strippedPayload, this.pathFreq);
293255
293289
  const modelKey = `${factType}\0${this.language}\0${this.scanner}\0${this.scannerVersion}`;
293256
293290
  let model = this.modelsByKey.get(modelKey);
@@ -293273,6 +293307,7 @@ var NdjsonFactEmitter = class {
293273
293307
  }
293274
293308
  // ── Flush: emit preamble then stream temp file ───────────
293275
293309
  async flush() {
293310
+ if (!this.compress) return;
293276
293311
  await new Promise((resolve3, reject) => {
293277
293312
  this.tmpStream.end((err) => err ? reject(err) : resolve3());
293278
293313
  });
@@ -373251,15 +373286,17 @@ var CppExtractor = class {
373251
373286
  while ((m = sqlRe.exec(file.content)) !== null) {
373252
373287
  const snippet = m[0].replace(/\s+/g, " ").trim();
373253
373288
  const line = lineNumber14(file.content, m.index);
373289
+ const op = m[1].toUpperCase();
373290
+ const accessKind = op === "SELECT" ? "read" : op === "INSERT" || op === "CREATE" ? "create" : op === "UPDATE" || op === "ALTER" || op === "MERGE" ? "update" : op === "DELETE" || op === "DROP" ? "delete" : "unknown";
373254
373291
  emitter.emitSqlUsage({
373255
373292
  sqlUsageId: `cpp:${file.path}:${line}`,
373293
+ usageKind: "raw_sql",
373294
+ accessKind,
373295
+ sqlFragment: snippet.slice(0, 160),
373296
+ containerSymbol: "",
373256
373297
  filePath: file.path,
373257
373298
  line,
373258
- statementType: m[1].toUpperCase(),
373259
- operation: "query",
373260
- tableNames: [],
373261
- usesParameterizedQuery: /\?|:\w+|@\w+/.test(snippet),
373262
- queryFingerprint: snippet.slice(0, 160)
373299
+ targetObjects: []
373263
373300
  });
373264
373301
  }
373265
373302
  }
@@ -373272,12 +373309,15 @@ var CppExtractor = class {
373272
373309
  const name = (m[3] || suite).trim();
373273
373310
  emitter.emitTestCaseDeclared({
373274
373311
  testId: `cpp:${file.path}:${line}:${suite}:${name}`,
373312
+ testName: name || "<unnamed>",
373313
+ testKind: "unit",
373275
373314
  framework: "cpp-test",
373276
373315
  suiteName: suite || null,
373277
- testName: name || "<unnamed>",
373278
373316
  filePath: file.path,
373279
- line,
373280
- isParameterized: /TEST_P/.test(m[1])
373317
+ startLine: line,
373318
+ endLine: line,
373319
+ isSkipped: false,
373320
+ tags: /TEST_P/.test(m[1]) ? ["parameterized"] : []
373281
373321
  });
373282
373322
  }
373283
373323
  }
@@ -373318,13 +373358,239 @@ function findBlockEnd2(lines, startLine) {
373318
373358
  return startLine;
373319
373359
  }
373320
373360
 
373361
+ // src/ir/wasm-bridge.ts
373362
+ init_esm_shims();
373363
+ import { existsSync as existsSync3 } from "fs";
373364
+ import { fileURLToPath as fileURLToPath2 } from "url";
373365
+
373366
+ // src/ir/ast-ir.ts
373367
+ init_esm_shims();
373368
+ var import_ts_morph20 = __toESM(require_ts_morph(), 1);
373369
+ function decoratorObjects(node) {
373370
+ try {
373371
+ return node.getDecorators?.().map((d) => ({
373372
+ name: d.getName(),
373373
+ args: d.getArguments().map((a) => a.getText()),
373374
+ line: d.getStartLineNumber()
373375
+ })) ?? [];
373376
+ } catch {
373377
+ return [];
373378
+ }
373379
+ }
373380
+ function enclosingSymbolName(node) {
373381
+ let current = node.getParent();
373382
+ while (current) {
373383
+ if (import_ts_morph20.Node.isMethodDeclaration(current)) {
373384
+ const cls = current.getParent();
373385
+ if (import_ts_morph20.Node.isClassDeclaration(cls)) return `${cls.getName()}.${current.getName()}`;
373386
+ return current.getName();
373387
+ }
373388
+ if (import_ts_morph20.Node.isFunctionDeclaration(current)) return current.getName() ?? "<anonymous>";
373389
+ if (import_ts_morph20.Node.isClassDeclaration(current)) return current.getName() ?? "<anonymous>";
373390
+ current = current.getParent();
373391
+ }
373392
+ return void 0;
373393
+ }
373394
+ function enclosingContainerName(node) {
373395
+ let current = node.getParent();
373396
+ while (current) {
373397
+ if (import_ts_morph20.Node.isMethodDeclaration(current)) {
373398
+ const cls = current.getParent();
373399
+ if (import_ts_morph20.Node.isClassDeclaration(cls)) return `${cls.getName()}.${current.getName()}`;
373400
+ return current.getName();
373401
+ }
373402
+ if (import_ts_morph20.Node.isFunctionDeclaration(current)) return current.getName() ?? "<anonymous>";
373403
+ if (import_ts_morph20.Node.isArrowFunction(current) || import_ts_morph20.Node.isFunctionExpression(current)) {
373404
+ const parent = current.getParent();
373405
+ if (import_ts_morph20.Node.isVariableDeclaration(parent)) return parent.getName();
373406
+ }
373407
+ current = current.getParent();
373408
+ }
373409
+ return "<module>";
373410
+ }
373411
+ function buildCallChain(call) {
373412
+ const chain = [];
373413
+ let current = call;
373414
+ while (current && import_ts_morph20.Node.isCallExpression(current)) {
373415
+ const expr = current.getExpression();
373416
+ if (!import_ts_morph20.Node.isPropertyAccessExpression(expr)) break;
373417
+ const args = current.getArguments();
373418
+ chain.push({
373419
+ method: expr.getName(),
373420
+ ...args.length > 0 ? { arg0: args[0].getText() } : {}
373421
+ });
373422
+ current = expr.getExpression();
373423
+ }
373424
+ return chain;
373425
+ }
373426
+ function buildAstModule(sf, language = "typescript") {
373427
+ const symbols = [];
373428
+ const calls = [];
373429
+ const imports = [];
373430
+ const stringLiterals = [];
373431
+ for (const cls of sf.getClasses()) {
373432
+ const clsName = cls.getName() ?? "<anonymous>";
373433
+ symbols.push({
373434
+ name: clsName,
373435
+ kind: cls.isAbstract() ? "abstract_class" : "class",
373436
+ startLine: cls.getStartLineNumber(),
373437
+ endLine: cls.getEndLineNumber(),
373438
+ exported: cls.isExported(),
373439
+ isAbstract: cls.isAbstract(),
373440
+ isStatic: false,
373441
+ baseType: cls.getExtends()?.getText() ?? null,
373442
+ interfaces: cls.getImplements().map((i) => i.getText()),
373443
+ decorators: decoratorObjects(cls)
373444
+ });
373445
+ for (const method of cls.getMethods()) {
373446
+ symbols.push({
373447
+ name: method.getName(),
373448
+ kind: "method",
373449
+ parent: clsName,
373450
+ startLine: method.getStartLineNumber(),
373451
+ endLine: method.getEndLineNumber(),
373452
+ scope: method.getScope(),
373453
+ isAbstract: method.isAbstract(),
373454
+ isStatic: method.isStatic(),
373455
+ decorators: decoratorObjects(method),
373456
+ params: method.getParameters().map((p) => ({
373457
+ name: p.getName(),
373458
+ type: p.getType().getText(),
373459
+ optional: p.hasQuestionToken(),
373460
+ decorators: p.getDecorators().map((d) => d.getName())
373461
+ }))
373462
+ });
373463
+ }
373464
+ for (const prop of cls.getProperties()) {
373465
+ symbols.push({
373466
+ name: prop.getName(),
373467
+ kind: "property",
373468
+ parent: clsName,
373469
+ startLine: prop.getStartLineNumber(),
373470
+ endLine: prop.getEndLineNumber(),
373471
+ scope: prop.getScope(),
373472
+ isStatic: prop.isStatic(),
373473
+ decorators: decoratorObjects(prop),
373474
+ type: prop.getType().getText(),
373475
+ optional: prop.hasQuestionToken()
373476
+ });
373477
+ }
373478
+ }
373479
+ for (const iface of sf.getInterfaces()) {
373480
+ symbols.push({
373481
+ name: iface.getName(),
373482
+ kind: "interface",
373483
+ startLine: iface.getStartLineNumber(),
373484
+ endLine: iface.getEndLineNumber(),
373485
+ exported: iface.isExported(),
373486
+ baseType: null,
373487
+ interfaces: iface.getExtends().map((e) => e.getText())
373488
+ });
373489
+ }
373490
+ for (const fn of sf.getFunctions()) {
373491
+ symbols.push({
373492
+ name: fn.getName() ?? "<anonymous>",
373493
+ kind: "function",
373494
+ startLine: fn.getStartLineNumber(),
373495
+ endLine: fn.getEndLineNumber(),
373496
+ exported: fn.isExported(),
373497
+ decorators: []
373498
+ // function declarations cannot carry decorators
373499
+ });
373500
+ }
373501
+ for (const decl of sf.getImportDeclarations()) {
373502
+ imports.push({
373503
+ moduleSpecifier: decl.getModuleSpecifierValue(),
373504
+ defaultImport: decl.getDefaultImport()?.getText() ?? null,
373505
+ namespaceImport: decl.getNamespaceImport()?.getText() ?? null,
373506
+ namedImports: decl.getNamedImports().map((ni) => ni.getName()),
373507
+ isTypeOnly: decl.isTypeOnly(),
373508
+ line: decl.getStartLineNumber()
373509
+ });
373510
+ }
373511
+ for (const call of sf.getDescendantsOfKind(import_ts_morph20.SyntaxKind.CallExpression)) {
373512
+ const expr = call.getExpression();
373513
+ const isProp = import_ts_morph20.Node.isPropertyAccessExpression(expr);
373514
+ const chain = isProp ? buildCallChain(call) : [];
373515
+ calls.push({
373516
+ callee: expr.getText(),
373517
+ calleeObject: isProp ? expr.getExpression().getText() : void 0,
373518
+ calleeProperty: isProp ? expr.getName() : void 0,
373519
+ enclosing: enclosingSymbolName(call),
373520
+ container: enclosingContainerName(call),
373521
+ ...chain.length > 0 ? { chain } : {},
373522
+ line: call.getStartLineNumber(),
373523
+ endLine: call.getEndLineNumber(),
373524
+ args: call.getArguments().map((a) => {
373525
+ const kind = a.getKindName();
373526
+ const isFn = kind === "ArrowFunction" || kind === "FunctionExpression";
373527
+ return {
373528
+ kind,
373529
+ ...isFn ? {} : { text: a.getText() },
373530
+ startLine: a.getStartLineNumber(),
373531
+ endLine: a.getEndLineNumber()
373532
+ };
373533
+ })
373534
+ });
373535
+ }
373536
+ for (const lit of sf.getDescendantsOfKind(import_ts_morph20.SyntaxKind.StringLiteral)) {
373537
+ const text = lit.getLiteralText();
373538
+ if (text.length > 20) {
373539
+ stringLiterals.push({ text, line: lit.getStartLineNumber(), enclosing: enclosingContainerName(lit), kind: "string-literal" });
373540
+ }
373541
+ }
373542
+ for (const lit of sf.getDescendantsOfKind(import_ts_morph20.SyntaxKind.NoSubstitutionTemplateLiteral)) {
373543
+ const text = lit.getLiteralText();
373544
+ if (text.length > 20) {
373545
+ stringLiterals.push({ text, line: lit.getStartLineNumber(), enclosing: enclosingContainerName(lit), kind: "template-literal" });
373546
+ }
373547
+ }
373548
+ return { path: sf.getFilePath(), language, symbols, calls, imports, stringLiterals, text: sf.getFullText() };
373549
+ }
373550
+ function buildAstRequest(sourceFiles, emittedAt) {
373551
+ return {
373552
+ modules: sourceFiles.map((sf) => buildAstModule(sf)),
373553
+ ...emittedAt ? { emittedAt } : {}
373554
+ };
373555
+ }
373556
+
373557
+ // src/ir/wasm-bridge.ts
373558
+ var PKG_BASENAME = "vibgrate_hcs_wasm.js";
373559
+ function pkgCandidates() {
373560
+ const candidates = [];
373561
+ const override = process.env.VIBGRATE_HCS_WASM_PKG;
373562
+ if (override) candidates.push(override);
373563
+ candidates.push(fileURLToPath2(new URL(`../../../wasm/pkg/${PKG_BASENAME}`, import.meta.url)));
373564
+ candidates.push(fileURLToPath2(new URL(`../../wasm/pkg/${PKG_BASENAME}`, import.meta.url)));
373565
+ candidates.push(fileURLToPath2(new URL(`./hcs-wasm/${PKG_BASENAME}`, import.meta.url)));
373566
+ return candidates;
373567
+ }
373568
+ function resolvePkgPath() {
373569
+ for (const candidate of pkgCandidates()) {
373570
+ if (existsSync3(candidate)) return candidate;
373571
+ }
373572
+ return null;
373573
+ }
373574
+ var PKG_PATH = resolvePkgPath();
373575
+ function wasmEngineAvailable() {
373576
+ return PKG_PATH !== null;
373577
+ }
373578
+ async function extractFactsFromAst(sourceFiles, emittedAt) {
373579
+ if (PKG_PATH === null) {
373580
+ throw new Error("HCS WASM engine not available (pkg/ not built)");
373581
+ }
373582
+ const wasm = await import(PKG_PATH);
373583
+ const ir = buildAstRequest(sourceFiles, emittedAt);
373584
+ return wasm.extract_facts_from_ast(JSON.stringify(ir));
373585
+ }
373586
+
373321
373587
  // src/main.ts
373322
373588
  import { resolve as resolve2, extname as extname4 } from "path";
373323
- import { existsSync as existsSync3, readdirSync as readdirSync2, readFileSync as readFileSync3, statSync as statSync2 } from "fs";
373589
+ import { existsSync as existsSync4, readdirSync as readdirSync2, readFileSync as readFileSync3, statSync as statSync2 } from "fs";
373324
373590
  var program2 = new Command();
373325
373591
  program2.name("vibgrate-hcs-node").description("ts-morph-based HCS fact extractor for TypeScript and JavaScript").version("0.1.0").requiredOption("--project <path>", "Path to tsconfig.json or project directory").option("--output <format>", "Output format (ndjson)", "ndjson").option("--swift-project <path>", "Path to Swift project for text-based extraction").option("--vb6-project <path>", "Path to VB6 project for text-based extraction").option("--rust-project <path>", "Path to Rust project for text-based extraction").option("--ruby-project <path>", "Path to Ruby project for text-based extraction").option("--php-project <path>", "Path to PHP project for text-based extraction").option("--dart-project <path>", "Path to Dart project for text-based extraction").option("--scala-project <path>", "Path to Scala project for text-based extraction").option("--cobol-project <path>", "Path to COBOL project for text-based extraction").option("--cplusplus-project <path>", "Path to C++ project for text-based extraction").option("--cobol-copybook-paths <paths>", "Comma-separated copybook search paths").action(async (opts) => {
373326
373592
  const projectPath = resolve2(opts.project);
373327
- if (!existsSync3(projectPath)) {
373593
+ if (!existsSync4(projectPath)) {
373328
373594
  process.stderr.write(`[error] Project path not found: ${projectPath}
373329
373595
  `);
373330
373596
  process.exit(1);
@@ -373332,7 +373598,7 @@ program2.name("vibgrate-hcs-node").description("ts-morph-based HCS fact extracto
373332
373598
  const emitter = new NdjsonFactEmitter(process.stdout);
373333
373599
  if (opts.swiftProject) {
373334
373600
  const swiftPath = resolve2(opts.swiftProject);
373335
- if (!existsSync3(swiftPath)) {
373601
+ if (!existsSync4(swiftPath)) {
373336
373602
  process.stderr.write(`[error] Swift project path not found: ${swiftPath}
373337
373603
  `);
373338
373604
  process.exit(1);
@@ -373344,7 +373610,7 @@ program2.name("vibgrate-hcs-node").description("ts-morph-based HCS fact extracto
373344
373610
  }
373345
373611
  if (opts.vb6Project) {
373346
373612
  const vb6Path = resolve2(opts.vb6Project);
373347
- if (!existsSync3(vb6Path)) {
373613
+ if (!existsSync4(vb6Path)) {
373348
373614
  process.stderr.write(`[error] VB6 project path not found: ${vb6Path}
373349
373615
  `);
373350
373616
  process.exit(1);
@@ -373356,7 +373622,7 @@ program2.name("vibgrate-hcs-node").description("ts-morph-based HCS fact extracto
373356
373622
  }
373357
373623
  if (opts.rustProject) {
373358
373624
  const rustPath = resolve2(opts.rustProject);
373359
- if (!existsSync3(rustPath)) {
373625
+ if (!existsSync4(rustPath)) {
373360
373626
  process.stderr.write(`[error] Rust project path not found: ${rustPath}
373361
373627
  `);
373362
373628
  process.exit(1);
@@ -373368,7 +373634,7 @@ program2.name("vibgrate-hcs-node").description("ts-morph-based HCS fact extracto
373368
373634
  }
373369
373635
  if (opts.rubyProject) {
373370
373636
  const rubyPath = resolve2(opts.rubyProject);
373371
- if (!existsSync3(rubyPath)) {
373637
+ if (!existsSync4(rubyPath)) {
373372
373638
  process.stderr.write(`[error] Ruby project path not found: ${rubyPath}
373373
373639
  `);
373374
373640
  process.exit(1);
@@ -373380,7 +373646,7 @@ program2.name("vibgrate-hcs-node").description("ts-morph-based HCS fact extracto
373380
373646
  }
373381
373647
  if (opts.phpProject) {
373382
373648
  const phpPath = resolve2(opts.phpProject);
373383
- if (!existsSync3(phpPath)) {
373649
+ if (!existsSync4(phpPath)) {
373384
373650
  process.stderr.write(`[error] PHP project path not found: ${phpPath}
373385
373651
  `);
373386
373652
  process.exit(1);
@@ -373392,7 +373658,7 @@ program2.name("vibgrate-hcs-node").description("ts-morph-based HCS fact extracto
373392
373658
  }
373393
373659
  if (opts.dartProject) {
373394
373660
  const dartPath = resolve2(opts.dartProject);
373395
- if (!existsSync3(dartPath)) {
373661
+ if (!existsSync4(dartPath)) {
373396
373662
  process.stderr.write(`[error] Dart project path not found: ${dartPath}
373397
373663
  `);
373398
373664
  process.exit(1);
@@ -373404,7 +373670,7 @@ program2.name("vibgrate-hcs-node").description("ts-morph-based HCS fact extracto
373404
373670
  }
373405
373671
  if (opts.scalaProject) {
373406
373672
  const scalaPath = resolve2(opts.scalaProject);
373407
- if (!existsSync3(scalaPath)) {
373673
+ if (!existsSync4(scalaPath)) {
373408
373674
  process.stderr.write(`[error] Scala project path not found: ${scalaPath}
373409
373675
  `);
373410
373676
  process.exit(1);
@@ -373416,7 +373682,7 @@ program2.name("vibgrate-hcs-node").description("ts-morph-based HCS fact extracto
373416
373682
  }
373417
373683
  if (opts.cplusplusProject) {
373418
373684
  const cppPath = resolve2(opts.cplusplusProject);
373419
- if (!existsSync3(cppPath)) {
373685
+ if (!existsSync4(cppPath)) {
373420
373686
  process.stderr.write(`[error] C++ project path not found: ${cppPath}
373421
373687
  `);
373422
373688
  process.exit(1);
@@ -373428,7 +373694,7 @@ program2.name("vibgrate-hcs-node").description("ts-morph-based HCS fact extracto
373428
373694
  }
373429
373695
  if (opts.cobolProject) {
373430
373696
  const cobolPath = resolve2(opts.cobolProject);
373431
- if (!existsSync3(cobolPath)) {
373697
+ if (!existsSync4(cobolPath)) {
373432
373698
  process.stderr.write(`[error] COBOL project path not found: ${cobolPath}
373433
373699
  `);
373434
373700
  process.exit(1);
@@ -373482,13 +373748,13 @@ function emitProgress(event) {
373482
373748
  }
373483
373749
  function createProject(projectPath) {
373484
373750
  if (projectPath.endsWith("tsconfig.json")) {
373485
- return new import_ts_morph20.Project({ tsConfigFilePath: projectPath });
373751
+ return new import_ts_morph21.Project({ tsConfigFilePath: projectPath });
373486
373752
  }
373487
373753
  const tsconfigPath = resolve2(projectPath, "tsconfig.json");
373488
- if (existsSync3(tsconfigPath)) {
373489
- return new import_ts_morph20.Project({ tsConfigFilePath: tsconfigPath });
373754
+ if (existsSync4(tsconfigPath)) {
373755
+ return new import_ts_morph21.Project({ tsConfigFilePath: tsconfigPath });
373490
373756
  }
373491
- const project = new import_ts_morph20.Project({
373757
+ const project = new import_ts_morph21.Project({
373492
373758
  compilerOptions: {
373493
373759
  allowJs: true,
373494
373760
  checkJs: false,
@@ -373515,39 +373781,57 @@ function detectLanguage(sourceFiles) {
373515
373781
  }
373516
373782
  return tsCount >= jsCount ? "typescript" : "javascript";
373517
373783
  }
373518
- async function runExtractors(sourceFiles, emitter) {
373519
- const extractors = [
373520
- new FileIndexedExtractor(),
373521
- new SymbolAndCallGraphExtractor(),
373522
- new ImportObservedExtractor(),
373523
- new RouteExtractor(),
373524
- new EntityExtractor(),
373525
- new AuthExtractor(),
373526
- new SqlUsageExtractor(),
373527
- new DataAccessOperationExtractor(),
373528
- new ConfigExtractor(),
373529
- new TestCaseDeclaredExtractor(),
373530
- new MigrationDeclaredExtractor(),
373531
- new EventEmittedExtractor(),
373532
- new EventConsumedExtractor(),
373533
- new ExternalServiceCallExtractor(),
373534
- new SqlObjectDeclaredExtractor(),
373535
- new ValidationSchemaExtractor(),
373536
- new MethodLogicExtractor(),
373784
+ function buildPipeline() {
373785
+ return [
373786
+ { name: "FileIndexedExtractor", extractor: new FileIndexedExtractor(), ported: false },
373787
+ { name: "SymbolAndCallGraphExtractor", extractor: new SymbolAndCallGraphExtractor(), ported: true },
373788
+ { name: "ImportObservedExtractor", extractor: new ImportObservedExtractor(), ported: true },
373789
+ { name: "RouteExtractor", extractor: new RouteExtractor(), ported: true },
373790
+ { name: "EntityExtractor", extractor: new EntityExtractor(), ported: true },
373791
+ { name: "AuthExtractor", extractor: new AuthExtractor(), ported: true },
373792
+ { name: "SqlUsageExtractor", extractor: new SqlUsageExtractor(), ported: true },
373793
+ { name: "DataAccessOperationExtractor", extractor: new DataAccessOperationExtractor(), ported: false },
373794
+ { name: "ConfigExtractor", extractor: new ConfigExtractor(), ported: false },
373795
+ { name: "TestCaseDeclaredExtractor", extractor: new TestCaseDeclaredExtractor(), ported: true },
373796
+ { name: "MigrationDeclaredExtractor", extractor: new MigrationDeclaredExtractor(), ported: false },
373797
+ { name: "EventEmittedExtractor", extractor: new EventEmittedExtractor(), ported: false },
373798
+ { name: "EventConsumedExtractor", extractor: new EventConsumedExtractor(), ported: false },
373799
+ { name: "ExternalServiceCallExtractor", extractor: new ExternalServiceCallExtractor(), ported: false },
373800
+ { name: "SqlObjectDeclaredExtractor", extractor: new SqlObjectDeclaredExtractor(), ported: false },
373801
+ { name: "ValidationSchemaExtractor", extractor: new ValidationSchemaExtractor(), ported: false },
373802
+ { name: "MethodLogicExtractor", extractor: new MethodLogicExtractor(), ported: false },
373537
373803
  // Frontend / UI extractors
373538
- new ComponentExtractor(),
373539
- new ClientRouteExtractor(),
373540
- new StateExtractor()
373804
+ { name: "ComponentExtractor", extractor: new ComponentExtractor(), ported: false },
373805
+ { name: "ClientRouteExtractor", extractor: new ClientRouteExtractor(), ported: false },
373806
+ { name: "StateExtractor", extractor: new StateExtractor(), ported: false }
373541
373807
  ];
373542
- for (let i = 0; i < extractors.length; i++) {
373543
- const extractor = extractors[i];
373808
+ }
373809
+ async function runExtractors(sourceFiles, emitter) {
373810
+ let portedByWasm = false;
373811
+ if (wasmEngineAvailable()) {
373812
+ try {
373813
+ emitProgress({ phase: "extracting", extractor: "WasmEngine", fileIndex: 0, fileCount: 0 });
373814
+ const ndjson = await extractFactsFromAst(sourceFiles);
373815
+ emitter.writeRaw(ndjson);
373816
+ portedByWasm = true;
373817
+ } catch (err) {
373818
+ process.stderr.write(
373819
+ `[warn] WASM engine failed at runtime (${err.message}); using in-process extractors
373820
+ `
373821
+ );
373822
+ portedByWasm = false;
373823
+ }
373824
+ }
373825
+ const selected = buildPipeline().filter((e) => !(portedByWasm && e.ported));
373826
+ for (let i = 0; i < selected.length; i++) {
373827
+ const entry = selected[i];
373544
373828
  emitProgress({
373545
373829
  phase: "extracting",
373546
- extractor: extractor.constructor.name,
373830
+ extractor: entry.name,
373547
373831
  fileIndex: i + 1,
373548
- fileCount: extractors.length
373832
+ fileCount: selected.length
373549
373833
  });
373550
- await extractor.extract(sourceFiles, emitter);
373834
+ await entry.extractor.extract(sourceFiles, emitter);
373551
373835
  }
373552
373836
  }
373553
373837
  async function runSwiftTextExtractors(projectPath, emitter) {