diff --git a/.vscode/settings.json b/.vscode/settings.json index f00dd1501..22b7c76da 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,7 @@ { "silver.jvmArgs": "-Xmx10G -Xss40M", "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable", - "silver.compilerJar": "jars/silver.compiler.composed.Default.jar" + "silver.compilerJar": "jars/silver.compiler.composed.Default.jar", + "java.compile.nullAnalysis.mode": "automatic", + "liveServer.settings.port": 5501 } \ No newline at end of file diff --git a/grammars/silver/core/Debug.sv b/grammars/silver/core/Debug.sv new file mode 100644 index 000000000..486f9b8d9 --- /dev/null +++ b/grammars/silver/core/Debug.sv @@ -0,0 +1,12 @@ +grammar silver:core; + +@{- + - Launch an interactive debug session to explore a tree. + -} +function debug +Decorated a with i ::= tree::Decorated a with i +{ + return error("foreign function"); +} foreign { + "java" : return "common.Debug.runDebug(%tree%)"; +} diff --git a/grammars/silver/testing/bin/TestSpecLang.sv b/grammars/silver/testing/bin/TestSpecLang.sv index 423c8fb37..243ae7f9c 100644 --- a/grammars/silver/testing/bin/TestSpecLang.sv +++ b/grammars/silver/testing/bin/TestSpecLang.sv @@ -91,7 +91,7 @@ ts::Run ::= 'test' 'suite' jar::Jar_t local testSuiteResults :: IOVal = systemT ("cd " ++ ts.testFileDir ++ ";" ++ "rm -f " ++ ts.testFileName ++ ".output ; " ++ - " java -Xss6M -jar " ++ jar.lexeme ++ + " java -Xss30M -jar " ++ jar.lexeme ++ " >& " ++ ts.testFileName ++ ".output" , msgBefore ) ; diff --git a/language-server/launcher/.settings/org.eclipse.jdt.core.prefs b/language-server/launcher/.settings/org.eclipse.jdt.core.prefs index cbcd33000..43781029c 100644 --- a/language-server/launcher/.settings/org.eclipse.jdt.core.prefs +++ b/language-server/launcher/.settings/org.eclipse.jdt.core.prefs @@ -33,7 +33,7 @@ org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=javax.annotation.Nonnull org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= -org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=javax.annotation.ParametersAreNonnullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullable.secondary= @@ -110,7 +110,7 @@ org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=wa org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning org.eclipse.jdt.core.compiler.problem.nullReference=warning org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning -org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=ignore org.eclipse.jdt.core.compiler.problem.overridingMethodWithoutSuperInvocation=ignore org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore diff --git a/runtime/java/src/common/CMDContextVisualization.java b/runtime/java/src/common/CMDContextVisualization.java new file mode 100644 index 000000000..8b748bc75 --- /dev/null +++ b/runtime/java/src/common/CMDContextVisualization.java @@ -0,0 +1,27 @@ +package common; + +import java.util.Iterator; + +public class CMDContextVisualization extends ContextVisualization { + private final String printFormat = "%s\n%s\n%s\n"; + protected String border; + + public CMDContextVisualization(String border) { + super(); + + this.border = border; + } + + @Override + public void show() { + // for(NodeContextMessage nodeContextMessage : this.contextStack.iterator()) { + // System.out.printf(this.printFormat, this.border, nodeContextMessage.toString(), this.border); + // } + + Iterator iterator = this.contextStack.iterator(); + while (iterator.hasNext()) { + NodeContextMessage nodeContextMessage = iterator.next(); + System.out.printf(this.printFormat, this.border, nodeContextMessage.toString(), this.border); + } + } +} diff --git a/runtime/java/src/common/ContextStack.java b/runtime/java/src/common/ContextStack.java new file mode 100644 index 000000000..0b56f570e --- /dev/null +++ b/runtime/java/src/common/ContextStack.java @@ -0,0 +1,63 @@ +package common; + +// Key intermediate structure of debugging contextualization. +// We push/pop nodes while navigating in Debug.java into this stack. +// A ContextStack is then a member of a SimplifiedContextStack, which +// produces the actual contextualization. + +// ContextStack is fundementally a stack of NodeContextMessage objects. +// Each of these objects represents a record of contextualization +// information we store about a single visited node (only maintain +// those on the path from root to the current node, like a DFS traversal). + +// Wrapped around built-in Java Stack class +// No error handling in current version + +import java.util.Iterator; +import java.util.Stack; + +import javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar; + +public class ContextStack { + + public void push(DecoratedNode n) { + + this.height++; + NodeContextMessage ncm = new NodeContextMessage(n, this.nextIndex++); + this.stack.push(ncm); + } + + public NodeContextMessage pop() { + + this.height--; + this.nextIndex--; + return this.stack.pop(); + } + + public NodeContextMessage peak() { + return this.stack.peek(); + } + + public int getHeight() { + return this.height; + } + + public Iterator iterator() { + return this.stack.iterator(); + } + + public NodeContextMessage get(int stackIndex) { + + // Index 0 is the bottom of the stack + if (stackIndex >= 0 && stackIndex < this.stack.size()) { + return this.stack.get(stackIndex); + } else { + throw new IndexOutOfBoundsException("Index " + stackIndex + " is out of bounds."); + } + } + + private Stack stack = new Stack(); + private int height = 0; + // Used for indices + private int nextIndex = 1; +} diff --git a/runtime/java/src/common/ContextVisualization.java b/runtime/java/src/common/ContextVisualization.java new file mode 100644 index 000000000..f3efd0b06 --- /dev/null +++ b/runtime/java/src/common/ContextVisualization.java @@ -0,0 +1,23 @@ +package common; + +public abstract class ContextVisualization { + protected ContextStack contextStack; + + public ContextVisualization() { + this.contextStack = new ContextStack(); + } + + public void push(DecoratedNode decoratedNode) { + this.contextStack.push(decoratedNode); + } + + public NodeContextMessage pop() { + return this.contextStack.pop(); + } + + public abstract void show(); + + public ContextStack getContextStack() { + return this.contextStack; + } +} diff --git a/runtime/java/src/common/Debug.java b/runtime/java/src/common/Debug.java new file mode 100644 index 000000000..c62262425 --- /dev/null +++ b/runtime/java/src/common/Debug.java @@ -0,0 +1,1198 @@ +// Auto uptade view and eq as we move + +//needed to run: ./silver-compile --force-origins --clean +package common; + +import java.io.IOException; +import java.io.PrintWriter; +import java.net.Socket; + +import java.util.HashMap; +import java.util.Map; +import java.util.Scanner; +import java.util.HashSet; +import java.util.Set; +import java.util.Stack; +import java.util.ArrayList; +import java.util.List; +import java.util.Arrays; + +import silver.core.NLocation; +import silver.core.NMaybe; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.util.Collections; + +import common.Util.*; + +import org.w3c.dom.Node; + +import common.RTTIManager.Nonterminalton; + +public class Debug { + public static DecoratedNode runDebug(DecoratedNode tree) + { + Debug debug = new Debug(); + //When Debugg is run runingDebug is called and does most the work + debug.runingDebug(tree); + return tree; + } + + public void runingDebug(DecoratedNode tree) { + //IO variables + Scanner inp = new Scanner(System.in); + String userInput; + String[] userInputList; + + //Variables for terminal displays + this.toggleNameDisplay = false; + this.toggleCStackDisplay = true; + this.toggleHeadlessAttributes = false; + this.toggleChoices = new String[] {"nameDisplay", "cStackDisplay", "fullAttributeNames"}; + + //A few Place holder variable + DecoratedNode childNode; + this.root = tree; + this.currentNode = tree; + + //This stack is used for the undo command + this.nodeStack = new Stack(); + + // These stacks are important for the file visualization + this.cStack = new FileContextVisualization("context.txt", "********************************"); + cStack.push(currentNode); + this.contextStack = (ContextStack)cStack.getContextStack(); + this.sStack = new SimplifiedContextStack(contextStack); + sStack.generateHTMLFile(); + + //Start of display + System.out.println("Enter characters, and 'q' to quit."); + if(toggleCStackDisplay){ + cStack.show(); + } + if(toggleNameDisplay){ + printName(currentNode); + } + + //Main Control loop + loop: do { + //After each command is done the user is prompted again + System.out.print(">DEBUGGER-PROMPT$"); + userInput = inp.nextLine(); + userInputList = userInput.split(" "); + + //The basic structure is we check if the user input matches any expected input + //If so we call the corresponding function where the work is done + //Most IO is done in this function and most logic is done in the auxiliary functions + switch (userInputList[0]) { + + //used for going to a parent of the current node + case "up": case "u": + + //up should not have any arguments + if (userInputList.length != 1) { + System.out.println("invalid, correct usage: up"); + break; + } + + //If so we can go to that node + if (up() == -1) + break; + + //Update the json and html and terminal to the new node + updateDisplay(); + break; + + //Used to navigate to children + case "down": case "d": + String childName = ""; + + //If the user does not provide a child we should list them out + if (userInputList.length == 1) { + String currentProduction = currentNode.undecorate().getProdleton().getTypeUnparse(); + String[] listCurrentProduction = currentProduction.split("\\s+"); + String[] childNames = Arrays.copyOfRange(listCurrentProduction, 2, listCurrentProduction.length); + System.out.println("Which child?"); + displayArray(childNames); + System.out.print(">DEBUGGER-PROMPT$"); + childName = inp.nextLine(); + } + + //Otherwise they should have typed one in + else if(userInputList.length == 2){ + childName = userInputList[1]; + } + + //We do not expect more than 2 arguments for down + else{ + System.out.println("invalid, correct usage: down "); + break; + } + + //Now that we have the child name we can try to go to it + try{ + if(down(childName) == -1) + System.out.println("invalid child"); + }catch(NullPointerException e){ + System.out.println("Null pointer"); + break; + }catch(IndexOutOfBoundsException e){ + System.out.println("Index out of bound"); + break; + } + + //Update the json and html and terminal to the new node + updateDisplay(); + break; + + //used to go back to the last node tracked on nodeStack + //FIXME: has some unexpected errors with forwarding nodes + case "undo": + //undo should not have any arguments + if (userInputList.length != 1) { + System.out.println("invalid, correct usage: undo"); + break; + } + + if(undo() == -1) + break; + + //Update the json and html and terminal to the new node + updateDisplay(); + break; + + //used to access forward nodes + case "forwards": case "f": + //forwards should not have any arguments + if (userInputList.length != 1) { + System.out.println("invalid, correct usage: forwards<>"); + break; + } + + //try to move forward + if(forwards() == -1) + break; + + //Update the json and html and terminal to the new node + updateDisplay(); + break; + + //used to access parents that forwarded to this node + case "backtrack": case "backwards": case "b": + //backtrack should not have any arguments + if (userInputList.length != 1) { + System.out.println("invalid, correct usage: backtrack<>"); + break; + } + + //try to move backwards + if(backtrack() == -1) + break; + + //Update the json and html and terminal to the new node + updateDisplay(); + break; + + //Used to specify what displays the user want to see + case "toggle": + String toggleInput = ""; + + //If the user does not provide a child we should list them out + if (userInputList.length == 1) { + System.out.println("Which toggle?"); + displayArray(toggleChoices); + System.out.print(">DEBUGGER-PROMPT$"); + toggleInput = inp.nextLine(); + } + + //Otherwise they should have typed one in + else if (userInputList.length == 2){ + toggleInput = userInputList[1]; + } + + //We do not expect more than 2 arguments for toggle + else{ + System.out.println("invalid, correct usage: toggle "); + break; + } + + //Activate the toggle + toggle(toggleInput); + break; + + //used to display the production name on the terminal + case "name": + + //name should not have any arguments + if (userInputList.length != 1) { + System.out.println("invalid, correct usage: name"); + break; + } + + //Print the name + printName(currentNode); + break; + + //used to jump to a specific equation + case "equation": case "eq": + String attributeNameInput = ""; + + //If the user does not provide a attribute we should list them out + if (userInputList.length == 1) { + List attributeListView = allAttributesList(currentNode); + String[] attributeArrayView = attributeListView.toArray(new String[attributeListView.size()]); + System.out.println("Which attribute?"); + displayArray(attributeArrayView); + System.out.print(">DEBUGGER-PROMPT$"); + attributeNameInput = inp.nextLine(); + } + + //Otherwise they should have typed one in + else if(userInputList.length == 2){ + attributeNameInput = userInputList[1]; + } + + //We do not expect more than 2 arguments for eq + else{ + System.out.println("invalid, correct usage: eq "); + break; + } + + try{ + if(equationHelper(attributeNameInput) == -1) + System.out.println("invalid attribute"); + }catch (IndexOutOfBoundsException e){ + System.out.println("Index out of bounds"); + break; + } + break; + + //used to list all attributes on the terminal + case "update": case "l": + //update should not have any arguments + if (userInputList.length != 1) { + System.out.println("invalid, correct usage: list"); + break; + } + + //Do the update + updateDisplay(); + break; + + //used to evaluate specific attributes + case "view": case "v": + String attributeInput = ""; + + //If the user does not provide a child we should list them out + if (userInputList.length == 1) { + List attributeList = allAttributesList(currentNode); + String[] attributeArray = attributeList.toArray(new String[attributeList.size()]); + System.out.println("Which attribute?"); + displayArray(attributeArray); + System.out.print(">DEBUGGER-PROMPT$"); + attributeInput = inp.nextLine(); + } + + //Otherwise they should have typed one in + else if(userInputList.length == 2){ + attributeInput = userInputList[1]; + } + + //We do not expect more than 2 arguments for down + else{ + System.out.println("invalid, correct usage: view "); + break; + } + + //Now that we have the attribute name we can try to go to it + if (attributeDataHTML(currentNode, attributeInput) == -1){ + System.out.println("invalid input"); + } + break; + + //Proof of concept function starts a algorithmic debugging session with a given attribute + case "algoDebug": case "a": + String attributeName = ""; + + //If the user does not provide a attribute we should list them out + if (userInputList.length == 1) { + List attributeList = allAttributesList(currentNode); + String[] attributeArray = attributeList.toArray(new String[attributeList.size()]); + System.out.println("Which attribute?"); + displayArray(attributeArray); + System.out.print(">DEBUGGER-PROMPT$"); + attributeName = inp.nextLine(); + } + + + //Otherwise they should have typed one in + else if(userInputList.length == 2){ + attributeName = userInputList[1]; + } + + //We do not expect more than 2 arguments for down + else{ + System.out.println("invalid, correct usage: view "); + break; + } + + algorithmicDebug(currentNode, attributeName, inp); + break; + + //TODO: known bug, don't know how to represent higher order nodes as decoratedNodes + //TODO: Implementing this function could be done in future work + // case "into": + // String attributeNameInto = ""; + + // //If the user does not provide a child we should list them out + // if (userInputList.length == 1) { + // List attributeListInto = allAttributesList(currentNode); + // String[] attributeArrayInto = attributeNameInto.toArray(new String[attributeListinto.size()]); + // System.out.println("Which attribute?"); + // displayArray(attributeArrayInto); + // System.out.print(">DEBUGGER-PROMPT$"); + // childName = inp.nextLine(); + // } + + // //Otherwise they should have typed one in + // else if(userInputList.length == 2){ + // childName = userInputList[1]; + // } + + // //We do not expect more than 2 arguments for into + // else{ + // System.out.println("invalid, correct usage: down "); + // break; + // } + + // if (into(currentNode, attributeNameInto) == -1){ + // System.out.println("invalid input"); + // break; + // } + // if(childNode == null){ + // System.out.println("invalid input"); + // } + // else{ + // System.out.println("going into"); + // currentNode = childNode; + // if(toggleNameDisplay){ + // printName(currentNode); + // } + // // if we navigate to a forward, push it on to the stack + // cStack.push(currentNode); + // // when we push, update and show the context + // cStack.show(); + // } + // break; + + //Display legal operations + case "help": + + //If called alone give operation names + if (userInputList.length != 2) { + System.out.println("call help with one of these keywords to see its functionality:"); + System.out.println("toggle "); + System.out.println("up"); + System.out.println("down "); + System.out.println("view "); + System.out.println("forwards"); + System.out.println("backtrack"); + System.out.println("prod"); + System.out.println("eq"); + System.out.println("update"); + System.out.println("exit"); + } + + //More detailed information about specific calls + else if(userInputList.length == 2){ + if(userInputList[1].equals("up")){ + System.out.println("The current node changes to its the parent"); + }else if(userInputList[1].equals("down")){ + System.out.println("The current node changes to its child"); + System.out.println("One optional input is the child number you want to travel to"); + System.out.println("If no input is provided you will be prompted with a choice of child"); + System.out.println("You cn call this function with \"d\""); + }else if(userInputList[1].equals("view")){ + System.out.println("look at the value of an attribute in the current node"); + System.out.println("One optional input is the attribute number you want to view"); + System.out.println("If no input is provided you will be prompted with a choice of attribute"); + System.out.println("You can call this function with \"v\""); + }else if(userInputList[1].equals("forwards")){ + System.out.println("The current node changes to its forward"); + }else if(userInputList[1].equals("backtrack")){ + System.out.println("The current node changes to its backtrack"); + }else if(userInputList[1].equals("prod")){ + System.out.println("prints the production of the current node"); + }else if(userInputList[1].equals("eq")){ + System.out.println("prints the equation of the current node"); + }else if(userInputList[1].equals("update")){ + System.out.println("prints the attributes of the current node"); + }else if(userInputList[1].equals("local")){ + System.out.println("prints the local attributes of the current node"); + }else if(userInputList[1].equals("into")){ + System.out.println("The current node changes to its higer order attribute"); + System.out.println("One optional input is the attribute number you want to go into"); + System.out.println("If no input is provided you will be prompted with a choice of attribute"); + }else if(userInputList[1].equals("toggle")){ + System.out.println("Activate or disactivate a feature"); + System.out.println("One input is the feature number you want to toggle"); + System.out.println("If no input is provided you will be prompted with a choice of toggles"); + }else{ + System.out.println("try just calling help"); + } + } + break; + + //Many ways to leave + case "exit": case "q": case "quit": + System.out.println("debugger out"); + break loop; + + //If the user call anything illegal + default: + System.out.println("invalid input call help for legal inputs"); + break; + } + } while(true); + } + + //variable declarations + private DecoratedNode root; + private DecoratedNode currentNode; + private Stack nodeStack; + private FileContextVisualization cStack; + private ContextStack contextStack; + private SimplifiedContextStack sStack; + private int currentLine; + private int currentColumn; + private boolean toggleNameDisplay; + private boolean toggleCStackDisplay; + private boolean toggleHeadlessAttributes; + private String[] toggleChoices; + + private boolean isRoot(DecoratedNode dn) { + return + dn.getParent() == null || + dn.getParent() instanceof TopNode || + dn.getParent().getParent() == null || + dn.getParent().getParent() instanceof TopNode; + } + + //Replaces currentNode with its parent + public Integer up() + { + + + //Make sure there is a parent to go up to + if (this.isRoot(currentNode)){ + System.out.println("Root Node has no parent"); + return -1; + } + + //NodeStack contains past nodes not current ones + nodeStack.push(currentNode); + + //Updates currentNode + currentNode = (DecoratedNode) currentNode.getParent(); + + //Update the various other stacks + cStack.pop(); + sStack.generateHTMLFile(); + return 1; + } + + //HACK: This function currently get the file line by going through the first attribute + //This means it will not work if there is no attribute. For future work it would be nice + //if nodes could access the file and have there own file line. + public void updateDisplay() + { + //First we want to update the json to point at the top of the current production + try{ + List attributeList = allAttributesList(currentNode); + Map lazyMap = allAttributesLazyMap(currentNode); + Lazy attributeLazy = lazyMap.get(attributeList.get(0)); + //FIXME: Known bug breaks after we forward + NLocation loc = attributeLazy.getSourceLocation(); + if(loc != null) { + String file = loc.synthesized(silver.core.Init.silver_core_filename__ON__silver_core_Location).toString(); + int attributeLine = (Integer)loc.synthesized(silver.core.Init.silver_core_line__ON__silver_core_Location); + int currentLineNumber = 1; + int productionLineNum = 0; + + try (BufferedReader reader = new BufferedReader(new FileReader(file))){ + String line; + while ((line = reader.readLine()) != null) { + //HACK:Relies on the the fact that "::=" is only and always used in production declarations + if (line.contains("::=")) { + productionLineNum = currentLineNumber; + } + if (currentLineNumber >= attributeLine) { + break; + } + currentLineNumber++; + } + + writeToJson(file, productionLineNum, productionLineNum); + // add a client server here, when it called send 1 + sendMessageToExtension("1"); + }catch (IOException e) { + e.printStackTrace(); + } + } + } + catch(NullPointerException e) + { + System.out.println("Failed to update json"); + } + + + //Next we want to update the html file with the attribute values + Map attributeMap = allAttributesThunkMap(currentNode); + try (BufferedWriter writer = new BufferedWriter(new FileWriter("attribute_values.html"))) { + writer.write("\n"); + writer.write("\n"); + writer.write("\n"); + writer.write("
\n");
+            for (Map.Entry entry : attributeMap.entrySet()) {
+                String key = entry.getKey();
+                Object value = entry.getValue();
+                if(value instanceof Thunk){
+                    writer.write(key + ": THUNKING...");
+                }else{
+                    writer.write(key + ": " + Util.genericShow(value));
+                }
+                writer.newLine();
+            }
+            writer.write("
\n"); + writer.write("\n"); + writer.write("\n"); + }catch (IOException e) { + System.err.println("Error writing to file: " + e.getMessage()); + } + + //Finally Print all information the user wants + if(toggleNameDisplay){ + printName(currentNode); + } + if(toggleCStackDisplay){ + cStack.show(); + } + } + + //Given a child name (or prefix) updates the currentNode to that child + public Integer down(String childName) + { + //Find the index of the given childName + String currentProduction = currentNode.undecorate().getProdleton().getTypeUnparse(); + String[] listCurrentProduction = currentProduction.split("\\s+"); + String[] childNames = Arrays.copyOfRange(listCurrentProduction, 2, listCurrentProduction.length); + int childNum = Arrays.binarySearch(childNames, childName); + + //If the child was not found we check if the input was a prefix + if(childNum < 0){ + childNum = prefixSearch(childNames, childName); + } + + //Try to return the child at the corresponding index + String childProductions[] = currentNode.undecorate().getProdleton().getChildTypes(); + if(childProductions[childNum].equals("null")){ + return -1; + } + nodeStack.push(currentNode); + currentNode = currentNode.childDecorated(childNum); + + // if we navigate down to a child, push it on to the stacks + cStack.push(currentNode); + sStack.generateHTMLFile(); + return 1; + } + + //helper for finding a element with a specific prefix + public Integer prefixSearch(String[] array, String prefix) + { + for (int i = 0; i < array.length; i++) { + if (array[i].startsWith(prefix)) { + return i; + } + } + return -1; + } + + //will go back in the stack + public Integer undo(){ + //Can't undo if no nodes have been visited + if(nodeStack.empty()){ + System.out.println("invalid no node to undo"); + return -1; + } + + //Now we can undo by just calling on the stack we tracked for this purpose + DecoratedNode newNode = nodeStack.pop(); + currentNode = newNode; + + //Update all stacks + cStack.pop(); + sStack.generateHTMLFile(); + + return 1; + } + + //updates the currentNode to its forward child + public Integer forwards() + { + if (isContractum(currentNode)){ + nodeStack.push(currentNode); + currentNode = currentNode.forward(); + + // if we navigate to a forward, push it on to the stack + cStack.push(currentNode); + sStack.generateHTMLFile(); + return 1; + } + System.out.println("invalid no node to forward"); + return -1; + } + + //updates the currentNode to its backwards parent + public Integer backtrack() + { + DecoratedNode nextNode = currentNode.getForwardParent(); + if(nextNode == null){ + System.out.println("invalid no node to backtrack to"); + return -1; + } + nodeStack.push(currentNode); + currentNode = nextNode; + + // if we navigate backwards, pop (?) + cStack.pop(); + sStack.generateHTMLFile(); + + return 1; + } + + //Just an organizational function, turns toggles on/off + public Integer toggle(String toggleInput){ + String toggleChoice = ""; + + //Given the toggleInput we can find the toggleChoice + if(Arrays.asList(toggleChoices).contains(toggleInput)){ + toggleChoice = toggleInput; + }else{ + int toggleNum = prefixSearch(toggleChoices, toggleInput); + if(toggleNum > -1){ + toggleChoice = toggleChoices[toggleNum]; + }else{ + System.out.println("No such toggle"); + return -1; + } + } + + //finally we can update the corresponding toggle + if(toggleChoice.equals("nameDisplay")){ + if(toggleNameDisplay){ + System.out.println("Production Display off"); + toggleNameDisplay = false; + }else{ + System.out.println("Production Display on"); + toggleNameDisplay = true; + } + }else if(toggleChoice.equals("fullAttributeNames")){ + if(toggleHeadlessAttributes){ + System.out.println("Headless Attributes off"); + toggleHeadlessAttributes = false; + }else{ + System.out.println("Headless Attributes on"); + toggleHeadlessAttributes = true; + } + }else if(toggleChoice.equals("cStackDisplay")){ + if(toggleCStackDisplay){ + System.out.println("cStack Display off"); + toggleCStackDisplay = false; + }else{ + System.out.println("cStack Display on"); + toggleCStackDisplay = true; + } + }else{ + System.out.println("legal toggles: nameDisplay, fullAttributeNames, cStackDisplay"); + } + return 1; + } + + //User friendly print + public void printName(DecoratedNode node) + { + String parentProduction = node.undecorate().getProdleton().getTypeUnparse(); + System.out.println(parentProduction); + } + + //Finds the corresponding equation updates the display + public Integer equationHelper(String attributeInput) + { + //Gets the attribute name from a user input + List attributeList = allAttributesList(currentNode); + String[] attributeArray = attributeList.toArray(new String[attributeList.size()]); + String attributeName = inputArrayFinder(attributeArray, attributeInput); + if(attributeName.equals("")){ + return -1; + } + + //Try to display the attribute at the corresponding index + displayEquation(currentNode, attributeName) ; + attributeDataHTML(currentNode, ""); + return 1; + } + + //helper for finding a element with a specific suffix + public static Integer suffixSearch(String[] array, String suffix) { + for (int i = 0; i < array.length; i++) { + if (array[i].endsWith(suffix)) { + return i; + } + } + return -1; + } + + //Helper for communicating with VS Code extension server + private void sendMessageToExtension(String message) { + String host = "127.0.0.1"; // Host of the VS Code extension server + int port = 19387; + + try (Socket socket = new Socket(host, port); + PrintWriter out = new PrintWriter(socket.getOutputStream(), true)) { + + out.println(message); + System.out.println("Message sent to extension: " + message); + + } catch (IOException e) { + System.err.println("Couldn't connect to the extension server at " + host + ":" + port); + System.err.println(e.getMessage()); + } + } + + // Popup the file and line where the attribute is defined + public void displayEquation(DecoratedNode node, String attributeName) + { + Map lazyMap = allAttributesLazyMap(node); + if (lazyMap.containsKey(attributeName)) { + Lazy attributeLazy = lazyMap.get(attributeName); + NLocation loc = attributeLazy.getSourceLocation(); + if(loc != null) { + //Get the data from the NLocation + String file = loc.synthesized(silver.core.Init.silver_core_filename__ON__silver_core_Location).toString(); + int line = (Integer)loc.synthesized(silver.core.Init.silver_core_line__ON__silver_core_Location); + int endline = (Integer)loc.synthesized(silver.core.Init.silver_core_endLine__ON__silver_core_Location); + + //write this data to a Json and tell the server to refresh + writeToJson(file, line, endline); + sendMessageToExtension("1"); + } + } + } + + // Helper for displayEquation + public void writeToJson(String filename, int lineNumber, int endline) + { + try (BufferedWriter writer = new BufferedWriter(new FileWriter(".debugger_communicator.json"))) { + String currentDirectory = System.getProperty("user.dir"); + int lastIndex = filename.lastIndexOf("/"); + String fileEnd = filename.substring(lastIndex + 1); + writer.write("{\"file_path\": \"" + currentDirectory + "/" + fileEnd + "\", \"line_begin\": " + lineNumber + ", \"line_end\": " + endline+ "}"); + }catch (IOException e) { + e.printStackTrace(); + } + } + + //Should this be in Util? + public List removeHeaders(List stringList){ + List headlessList = new ArrayList<>(); + for (String element : stringList){ + int lastIndex = element.lastIndexOf(":"); + if(lastIndex == -1){ + headlessList.add(element); + }else{ + headlessList.add(element.substring(lastIndex + 1)); + } + } + return headlessList; + } + + //Highlights the data of the specified attribute + public Integer attributeDataHTML(DecoratedNode node, String attributeName){ + //Gets the attribute name from a user input + List attributeList = allAttributesList(currentNode); + String[] attributeArray = attributeList.toArray(new String[attributeList.size()]); + String highlightAttribute = inputArrayFinder(attributeArray, attributeName); + if(attributeName.equals("")){ + return -1; + } + + Map attributeMap = allAttributesThunkMap(node); + try (BufferedWriter writer = new BufferedWriter(new FileWriter("attribute_values.html"))) { + writer.write("\n"); + writer.write("\n"); + writer.write("\n"); + writer.write("
\n");
+            for (Map.Entry entry : attributeMap.entrySet()) {
+                String key = entry.getKey();
+                Object value = entry.getValue();
+                if (key.equals(highlightAttribute)){
+                    writer.write("");
+                    writer.write(key + ": " + Util.genericShow(Util.demand(value)));
+                    writer.write("");
+                }else{
+                    if(value instanceof Thunk){
+                        writer.write(key + ": THUNKING...");
+                    }else{
+                        writer.write(key + ": " + Util.genericShow(value));
+                    }
+                }
+                writer.newLine();
+            }
+            writer.write("
\n"); + writer.write("\n"); + writer.write("\n"); + + }catch (IOException e) { + System.err.println("Error writing to file: " + e.getMessage()); + } + return 0; + } + + //Given a user input search an array for something that looks close enough + //should be in util? + public String inputArrayFinder(String[] array, String input){ + int index = Arrays.binarySearch(array, input); + String returnString = ""; + + //If the string was not found we check if the input was a prefix + if(index < 0){ + index = prefixSearch(array, input); + } + + //If the string was still not found we check if the input was a suffix + if(index < 0){ + index = suffixSearch(array, ":" + input); + } + + //The string is not in the array + if(index < 0){ + return ""; + } + + return array[index]; + } + + //HACK: this entire process is based on string meddling + //A better way to do this would be to have each attribute know what other attributes generate it + //This way we would not need to rely on specific string formatting + public int algorithmicDebug(DecoratedNode node, String attributeInput, Scanner inp) + { + //Gets the attribute name from a user input + List attributeList = allAttributesList(currentNode); + String[] attributeArray = attributeList.toArray(new String[attributeList.size()]); + String attributeName = inputArrayFinder(attributeArray, attributeInput); + if(attributeName.equals("")){ + System.out.print("invalid input"); + return -1; + } + + //Print out the equation for the given attribute + String equationString = ""; + Map lazyMap = allAttributesLazyMap(node); + if (lazyMap.containsKey(attributeName)) { + Lazy attributeLazy = lazyMap.get(attributeName); + NLocation loc = attributeLazy.getSourceLocation(); + if(loc != null) { + String filePath = loc.synthesized(silver.core.Init.silver_core_filename__ON__silver_core_Location).toString(); + int startLine = (Integer)loc.synthesized(silver.core.Init.silver_core_line__ON__silver_core_Location); + int endLine = (Integer)loc.synthesized(silver.core.Init.silver_core_endLine__ON__silver_core_Location); + + System.out.println("Equation:"); + try { + equationString = getLines(filePath, startLine, endLine); + System.out.println(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + //Next we want to get the LHS of the equation + System.out.println("Data:"); + Map attributeMap = allAttributesThunkMap(node); + String partentProduction = node.undecorate().getProdleton().getTypeUnparse(); + int index1 = partentProduction.indexOf("::"); + int index2 = attributeName.indexOf(":"); + String parentNameInEquation = partentProduction.substring(0, index1) + "." + attributeName.substring(index2+1); + System.out.println(parentNameInEquation + ": " + Util.genericShow(Util.demand(attributeMap.get(attributeName)))); + + //This generates a list of all children of the production and splits them + //into the attribute front name (ex. l) and back name (ex. value) + String currentProduction = node.undecorate().getProdleton().getTypeUnparse(); + String[] listCurrentProduction = currentProduction.split("\\s+"); + String[] childFullNames = Arrays.copyOfRange(listCurrentProduction, 2, listCurrentProduction.length); + String[] childFrontNames = new String[childFullNames.length]; + String[] childBackNames = new String[childFullNames.length]; + for (int i = 0; i < childFullNames.length; i++) { + index1 = childFullNames[i].indexOf("::"); + childFrontNames[i] = childFullNames[i].substring(0, index1) + "."; + index2 = childFullNames[i].indexOf(":"); + childBackNames[i] = childFullNames[i].substring(index2+2); + } + + //Here we are getting the RHS of the equation (all attributes / variables) + //These should fallow the form .attribute (ex. ds.pp) + List dependentAttributes = new ArrayList<>(); + String[] equationComponents = equationString.split("\\s+"); + for (String component : equationComponents) { + // Check if the word starts with any element from the array + for (String childFront : childFrontNames) { + if (component.startsWith(childFront)) { + dependentAttributes.add(component); + break; + } + } + } + + //For each of these relevant component we want to print to data at that component + for (String attribute : dependentAttributes) { + String[] attributeComponents = attribute.split("\\."); + String childName = ""; + for (int i = 0; i < childFullNames.length; i++){ + if (childFullNames[i].startsWith(attributeComponents[0] + "::")) { + DecoratedNode childNode = currentNode.childDecorated(i); + Map childMap = allAttributesThunkMap(childNode); + for (Map.Entry entry : childMap.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + if (key.endsWith(":" + attributeComponents[1])){ + System.out.println(attribute + ": " + Util.genericShow(Util.demand(value))); + } + } + } + } + } + + //Next the user will pick which of these variables they want to further investigate + //We split this into 2 parts index 0 is the Front name (ex. ds) + //the second is the attribute (ex. pp) + String[] dependentAttributesArray = dependentAttributes.toArray(new String[0]); + int inputInt = -1; + String chosenAttributeInput = ""; + if(dependentAttributesArray.length > 0){ + System.out.println(); + System.out.println("Pick the next node to investigate"); + displayArray(dependentAttributesArray); + System.out.print(">DEBUGGER-PROMPT$"); + chosenAttributeInput = inp.nextLine(); + }else{ + return 0; + } + + String chosenAttribute = inputArrayFinder(dependentAttributesArray, chosenAttributeInput); + if(chosenAttribute.equals("")){ + System.out.print("invalid input"); + return -1; + } + String[] chosenAttributeComponents = chosenAttribute.split("\\."); + + //Based on what the user chose we can solve for the child they want to travel to + //Because it will have the same Front name as the variable (ex. ds.pp -> ds::DeclList) + String nextChildName = ""; + for (String fullName : childFullNames){ + if (fullName.startsWith(chosenAttributeComponents[0] + "::")) { + nextChildName = fullName; + } + } + System.out.println(nextChildName); + + //Now that we know the child we can travel their + //Integer nextChildNum = Arrays.binarySearch(childFullNames, nextChildName); + if (down(nextChildName) == -1){ + System.out.println("invalid child"); + } + + //We also know what attribute they want to investigate + //it should have the same end as the chosen attribute + String nextAttributeName = ""; + for (String element : attributeList) { + String[] parts = element.split(":"); + if (parts.length == 2 && chosenAttributeComponents[1].startsWith(parts[1])) { + nextAttributeName = element; + } + } + System.out.println(nextAttributeName); + + //recursive time + if(nextChildName != ""){ + algorithmicDebug(currentNode, nextAttributeName, inp); + } + return -1; + } + + //helper for algorithmicDebugg + public static String getLines(String filePath, int startLine, int endLine) throws IOException { + String returnString = ""; + try (BufferedReader reader = new BufferedReader(new FileReader(filePath))) { + String line; + int currentLine = 1; + + // Read lines until reaching the start line + while ((line = reader.readLine()) != null && currentLine < startLine) { + currentLine++; + } + + // Print lines from startLine to endLine + while (line != null && currentLine <= endLine) { + System.out.println(line); //Comment this out + returnString += line; + line = reader.readLine(); + currentLine++; + } + }catch (IOException e) { + e.printStackTrace(); + } + return returnString; + } + + //List of all and only local attributes + public static List getLocalAttrs(DecoratedNode node) + { + int count = node.getNode().getNumberOfLocalAttrs(); + List listLocals = new ArrayList<>(); + + for(int i = 0; i < count; i++) + { + Lazy attribute = node.getNode().getLocal(i); + Object o = attribute.eval(node); + listLocals.add(node.getNode().getNameOfLocalAttr(i)); + } + return listLocals; + } + + //TODO: Add access to higher order attriburte + //Translation attribute or Decorated, locals only locals should all be decorated + // public Integer into(DecoratedNode node, String attributeInput){ + // String attributeName = inputArrayFinder(attributeArray, attributeInput); + // if(attributeName.equals("")){ + // return -1; + // } + + // Map attributeMap = allAttributesThunkMap(node); // will have to eval the thunk + // if (attributeMap.containsKey(attributeName)) { + // Object attributeObject = attributeMap.get(attributeName); + // currentNode = (DecoratedNode) attributeObject.demand(); //Does not work class translator.Pprogram cannot be cast to class common.DecoratedNode + // } + // return 0; + // } + + + //Creates a list of all Attributes + public static List allAttributesList(DecoratedNode node) + { + RTTIManager.Prodleton prodleton = node.getNode().getProdleton(); + RTTIManager.Nonterminalton nonterminalton = prodleton.getNonterminalton(); + List attributeList = nonterminalton.alphabeticalAttributes(); + List localAttributeList = getLocalAttrs(node); + + attributeList.addAll(localAttributeList); + attributeList.sort(null); + + return attributeList; + } + + //Creates a map of attribute names to there thunks that can be demanded to get the values of the attributes + public static Map allAttributesThunkMap(DecoratedNode node) + { + List attributeList = allAttributesList(node); + + //Thunks are found in a nodes Nonterminalton + RTTIManager.Prodleton prodleton = node.getNode().getProdleton(); + RTTIManager.Nonterminalton nonterminalton = prodleton.getNonterminalton(); + Map attributeMap = new HashMap<>(); + + //Find the corresponding thunk for each attribute + for(String attribute : attributeList) + { + //Synthesized attributes + if(nonterminalton.getSynOccursIndices().keySet().contains(attribute)){ + Integer index = nonterminalton.getSynOccursIndex(attribute); + Object o = node.contextSynthesizedLazy(index); + attributeMap.put(attribute, o); + } + + //Inherited attributes + else if(nonterminalton.getInhOccursIndices().keySet().contains(attribute)){ + Integer index = nonterminalton.getInhOccursIndex(attribute); + Object o = node.contextInheritedLazy(index); + attributeMap.put(attribute, o); + } + + //Local attributes + else{ + List listLocals = getLocalAttrs(node); + Integer index = listLocals.indexOf(attribute); + Object o = node.localLazy(index); + attributeMap.put(attribute, o); + } + } + return attributeMap; + } + + //maps attributes names to there lazy + public static Map allAttributesLazyMap(DecoratedNode node) + { + List attributeList = allAttributesList(node); + + //Lazy are found in a nodes Nonterminalton + RTTIManager.Prodleton prodleton = node.getNode().getProdleton(); + RTTIManager.Nonterminalton nonterminalton = prodleton.getNonterminalton(); + Map attributeMap = new HashMap<>(); + + //Find the corresponding Lazy for each attribute + for(String attribute : attributeList) + { + //Synthesized attributes + if(nonterminalton.getSynOccursIndices().keySet().contains(attribute)){ + Integer index = nonterminalton.getSynOccursIndex(attribute); + Lazy synthAttribute = node.getNode().getSynthesized(index); //breaks for forwarded nodes + attributeMap.put(attribute, synthAttribute); + } + + //Inherited attributes + else if(nonterminalton.getInhOccursIndices().keySet().contains(attribute)){ + Integer index = nonterminalton.getInhOccursIndex(attribute); + Lazy inheritedAttribute = node.getInheritedAttribute(index); + attributeMap.put(attribute, inheritedAttribute); + } + + //Local attributes + else{ + List listLocals = getLocalAttrs(node); + Integer index = listLocals.indexOf(attribute); + Lazy localAttribute = node.getNode().getLocal(index); + attributeMap.put(attribute, localAttribute); + } + } + return attributeMap; + } + + //Prints a array to the terminal + //Should be in util? + public static void displayArray(String[] array){ + for (String element : array){ + System.out.println(element); + } + } + + //Returns true if the given node has a forward child + public boolean isContractum(DecoratedNode node) + { + return node.getNode().hasForward(); + } +} \ No newline at end of file diff --git a/runtime/java/src/common/Debug.java.my b/runtime/java/src/common/Debug.java.my new file mode 100644 index 000000000..1f63016d6 --- /dev/null +++ b/runtime/java/src/common/Debug.java.my @@ -0,0 +1,574 @@ +//TODO: Error handling is not good right now + +package common; + +import java.util.HashMap; +import java.util.Map; +import java.util.Scanner; +import java.util.HashSet; +import java.util.Set; +import java.util.Stack; +import java.util.ArrayList; +import java.util.List; + + +import common.Util.*; + +import org.w3c.dom.Node; + +import common.RTTIManager.Nonterminalton; + +public class Debug { + public static DecoratedNode runDebug(DecoratedNode tree) + { + Debug debug = new Debug(); + debug.runingDebug(tree); + return tree; + } + + public void runingDebug(DecoratedNode tree) { + Scanner inp = new Scanner(System.in); + System.out.println("Enter characters, and 'q' to quit."); + String userInput; + String[] userInputList; + boolean toggleProdDisplay = true; + DecoratedNode childNode; + this.root = tree; + this.currentNode = tree; + this.nodeStack = new Stack(); + + if(toggleProdDisplay){ + printProduction(currentNode); + } + + // creating a context stack when we run the debugger + // CMDContextVisualization cStack = new CMDContextVisualization("****************"); + // // if we want a file visualization: + // // FileContextVisualization cStack = new FileContextVisualization(); + // // if we want an HTML visualization: + // // HTMLContextVisualization cStack = new HTMLContextVisualization(); + // cStack.push(currentNode); + // cStack.show(); + + //Control loop + loop: do { + userInput = inp.nextLine(); + userInputList = userInput.split(" "); + + //Each case has a set of conditionals to make everything is in order befor running + //in the final case they call a helper function that does most of the work + switch (userInputList[0]) { + + case "up": case "u": + if (userInputList.length != 1) { + System.out.println("invalid, correct usage: up<>"); + }else{ + if (currentNode.getParent().getParent() instanceof TopNode || currentNode.getParent() == null){ + System.out.println("Root Node has no parent"); + }else if (currentNode.getParent() == null){ + System.out.println("Null parent"); + }else{ + nodeStack.push(currentNode); + currentNode = currentNode.getParent(); + //System.out.println("going to parent"); + if(toggleProdDisplay){ + printProduction(currentNode); + } + // if we navigate up to a parent, push it on to the stack (?) + // cStack.pop(); + // when we push, update and show the context + // cStack.show(); + } + } + break; + + case "down": case "d": + int childNum = 0; + if (userInputList.length != 2) { + //System.out.println("invalid, correct usage: down "); + System.out.println("Which child?"); + printChildren(currentNode); + childNum = inp.nextInt(); + inp.nextLine(); + }else{ + //Explodes if the input is not a integer should gracefully exit + childNum = Integer.parseInt(userInputList[1]); + } + + childNode = down(childNum); + if(childNode == null){ + System.out.println("invalid child number"); + } + else{ + nodeStack.push(currentNode); + currentNode = childNode; + //System.out.println("going down"); + if(toggleProdDisplay){ + printProduction(currentNode); + } + // if we navigate down to a child, push it on to the stack + // cStack.push(currentNode); + // when we push, update and show the context + // cStack.show(); + } + break; + + case "undo": + if (userInputList.length != 1) { + System.out.println("invalid, correct usage: undo<>"); + }else{ + if(nodeStack.empty()){ + System.out.println("invalid no node to undo"); + } + else{ + DecoratedNode newNode = nodeStack.pop(); + currentNode = newNode; + //System.out.println("undoing last movement"); + if(toggleProdDisplay){ + printProduction(currentNode); + } + // remove from the stack + // cStack.pop(); + // cStack.show(); + } + } + break; + + //TODO: Untested, find good test case + case "forwards": + if (userInputList.length != 1) { + System.out.println("invalid, correct usage: forwards<>"); + }else{ + childNode = forwards(currentNode); + if(childNode == null){ + System.out.println("invalid no node to forward"); + } + else{ + System.out.println("going forward"); + currentNode = childNode; + if(toggleProdDisplay){ + printProduction(currentNode); + } + // if we navigate to a forward, push it on to the stack + // cStack.push(currentNode); + // when we push, update and show the context + // cStack.show(); + } + } + break; + + //TODO: Untested, find good test case + case "backtrack": + if (userInputList.length != 1) { + System.out.println("invalid, correct usage: backtrack<>"); + }else{ + childNode = backtrack(currentNode); + if(childNode == null){ + System.out.println("invalid no node to backtrack to"); + } + else{ + System.out.println("going backwrds"); + currentNode = childNode; + if(toggleProdDisplay){ + printProduction(currentNode); + } + // if we navigate backwards, push it on to the stack (?) + // cStack.push(currentNode); + // when we push, update and show the context + // cStack.show(); + } + } + break; + + case "toggle": + if (userInputList.length != 2) { + System.out.println("please indicate what you want to toggle ex: 'toggle prodDisplay'"); + }else{ + if(userInputList[1].equals("prodDisplay")){ + if(toggleProdDisplay){ + System.out.println("Production Display off"); + toggleProdDisplay = false; + }else{ + System.out.println("Production Display on"); + toggleProdDisplay = true; + } + } + else{ + System.out.println("legal toggles: prodDisplay"); + System.out.println(userInputList[1]); + } + } + break; + + + //Display the production + case "prod": + if (userInputList.length != 1) { + System.out.println("invalid, correct usage: prod<>"); + }else{ + printProduction(currentNode); + } + break; + + //TODO:Implement this - use genericShow + case "eq": + if (userInputList.length != 1 && userInputList.length != 2) { + System.out.println("invalid, correct usage: eq"); + }else{ + System.out.println("do the eq stuff"); + + } + break; + + //List synthesized attributes + case "listSynth": + if (userInputList.length != 1 && userInputList.length != 2) { + System.out.println("invalid, correct usage: listSynth"); + }else{ + if(listSynth(currentNode) == 0){ + System.out.println("no synthesized attributes"); + } + } + break; + + //List inherited attributes + case "listInher": + if (userInputList.length != 1 && userInputList.length != 2) { + System.out.println("invalid, correct usage: listInher"); + }else{ + if(listInher(currentNode) == 0){ + System.out.println("no inherited attributes"); + } + } + break; + + //list all attributes + case "list": case "l": + if (userInputList.length != 1 && userInputList.length != 2) { + System.out.println("invalid, correct usage: list"); + }else{ + // if(listSynth(currentNode) + listInher(currentNode) == 0){ + // System.out.println("no attributes"); + // } + printAttributes(currentNode); + } + break; + + //Show the values of a specific attribute + + //Clear the prefix that is identical + //Print names of children not just types + case "view": case "v": + String attributeName = ""; + Integer attributeNum = 0; + if (userInputList.length != 2) { + System.out.println("Which attribute?"); + printAttributes(currentNode); + attributeNum = inp.nextInt(); + inp.nextLine(); + attributeName = getAttributeNameFromNum(currentNode, attributeNum); + }else{ + //Explodes if the input is not a integer should gracefully exit + attributeNum = Integer.parseInt(userInputList[1]); + attributeName = getAttributeNameFromNum(currentNode, attributeNum); + } + printAttrFromName(currentNode, attributeName); + break; + + case "local": + listLocalAttrs(currentNode); + break; + + case "help": + System.out.println("up"); + System.out.println("down "); + System.out.println("view "); + System.out.println("forwards"); + System.out.println("backtrack"); + System.out.println("prod"); + System.out.println("eq"); + System.out.println("listSynth"); + System.out.println("listInher"); + System.out.println("list"); + System.out.println("exit"); + break; + + //Many ways to leave + case "exit": + case "q": + case "quit": + System.out.println("debugger out"); + break loop; + default: + System.out.println("invalid input call help for legal inputs"); + System.out.println(userInput); + break; + } + } while(true); + } + private DecoratedNode root; + private DecoratedNode currentNode; + private Stack nodeStack; + HashMap currentNodeSynthAttrs; + HashMap currentNodeInhAttrs; + HashMap currentNodeLocalAttrs; + private int currentLine; + private int currentColumn; + + public void setCurrentNode(DecoratedNode node) + { + currentNodeSynthAttrs = null; + currentNodeInhAttrs = null; + currentNodeLocalAttrs = null; + currentNode = node; + } + + public DecoratedNode up() + { + if (currentNode.getParent() != null) + { + currentNode = (DecoratedNode) currentNode.getParent(); + return currentNode; + } + return null; + } + + public DecoratedNode down(int child) + { + if (currentNode.getNode().getNumberOfChildren() > child) + { + DecoratedNode childNode = currentNode.childDecorated(child); + return childNode; + } + return null; + } + + public void printChildren(DecoratedNode node) + { + String child_productions[] = node.undecorate().getProdleton().getChildTypes(); + for (int i = 0; i < child_productions.length; i++){ + System.out.println(Integer.toString(i) + ": " + child_productions[i] + " "); + } + } + + public DecoratedNode forwards(DecoratedNode node) + { + if (node.getNode().hasForward()){ + currentNode = node.forward(); + return currentNode; + } + return null; + } + public DecoratedNode backtrack(DecoratedNode node) + { + currentNode = node.getForwardParent(); + return currentNode; + + } + + public void printProduction(DecoratedNode node) + { + String partent_production = node.undecorate().getProdleton().getName(); + String child_productions[] = node.undecorate().getProdleton().getChildTypes(); + System.out.print(partent_production + " "); + for (int i = 0; i < child_productions.length; i++){ + System.out.print(child_productions[i] + " "); + } + System.out.print("\n"); + } + + // Prints out the equation of the specified attr. + // If attr is not specified, prints out the equations for all the attributes on the current node. + // via eric we can just add equations as an attribute within our AG + public void eqSynth(int attribute) + { + + } + + public void eqInher(int attribute) + { + + } + + // no optional params in java, could use overloading or just pass in null + public int listSynth(DecoratedNode node) + { + RTTIManager.Prodleton prodleton = node.getNode().getProdleton(); + RTTIManager.Nonterminalton nonterminalton = prodleton.getNonterminalton(); + Set synAttrSet = nonterminalton.getAllSynth(); + int num_attr = 0; + + for (String synAttr : synAttrSet) + { + System.out.println("Attribute = " + synAttr); + num_attr++; + } + return num_attr; + } + + public int listInher(DecoratedNode node) + { + RTTIManager.Prodleton prodleton = node.getNode().getProdleton(); + RTTIManager.Nonterminalton nonterminalton = prodleton.getNonterminalton(); + Set inhAttrSet = nonterminalton.getAllInh(); + int num_attr = 0; + + for (String inhAttr : inhAttrSet) + { + System.out.println("Attribute = " + inhAttr); + num_attr++; + } + return num_attr; + } + + public void printAttributes(DecoratedNode node){ + RTTIManager.Prodleton prodleton = node.getNode().getProdleton(); + RTTIManager.Nonterminalton nonterminalton = prodleton.getNonterminalton(); + List attributeList = nonterminalton.alhpabeticalAttributes(); + int i = 0; + + for (String attribute : attributeList) + { + System.out.println(Integer.toString(i) + ": " + attribute); + i++; + } + } + + public String getAttributeNameFromNum(DecoratedNode node, Integer attributeNum){ + RTTIManager.Prodleton prodleton = node.getNode().getProdleton(); + RTTIManager.Nonterminalton nonterminalton = prodleton.getNonterminalton(); + List attributeList = nonterminalton.alhpabeticalAttributes(); + + return attributeList.get(attributeNum); + } + + // may want to rethink this such that view prints representation of attribute on current node, + // or allow an int to be passed in as the index of the child whose attribute you'd like to print info for + public int viewSynth(DecoratedNode node, String attribute) + { + RTTIManager.Prodleton prodleton = node.getNode().getProdleton(); + RTTIManager.Nonterminalton nonterminalton = prodleton.getNonterminalton(); + int index = 0; + if(nonterminalton.getSynOccursIndices().keySet().contains(attribute)){ + index = nonterminalton.getSynOccursIndex(attribute); + }else{ + System.out.println("Bad input, legal inputs:"); + Set synAttrSet = nonterminalton.getAllSynth(); + System.out.println("Keys: " + synAttrSet); + return -1; + } + Lazy synthAttribute = node.getNode().getSynthesized(index); + Object o = synthAttribute.eval(node); + System.out.println(Util.genericShow(o)); + return 1; + } + + public int viewInher(DecoratedNode node, String attribute) + { + RTTIManager.Prodleton prodleton = node.getNode().getProdleton(); + RTTIManager.Nonterminalton nonterminalton = prodleton.getNonterminalton(); + int index = 0; + if(nonterminalton.getInhOccursIndices().keySet().contains(attribute)){ + index = nonterminalton.getInhOccursIndex(attribute); + }else{ + System.out.println("Bad input, legal inputs:"); + Set inhAttrSet = nonterminalton.getAllInh(); + System.out.println("Keys: " + inhAttrSet); + return -1; + } + Object o = node.evalInhSomehowButPublic(index); + System.out.println(Util.genericShow(o)); + return 1; + } + + public Integer printAttrFromName(DecoratedNode node, String attribute) + { + RTTIManager.Prodleton prodleton = node.getNode().getProdleton(); + RTTIManager.Nonterminalton nonterminalton = prodleton.getNonterminalton(); + int index = 0; + boolean isSynth = false; + if(nonterminalton.getSynOccursIndices().keySet().contains(attribute)){ + index = nonterminalton.getSynOccursIndex(attribute); + isSynth = true; + }else if(nonterminalton.getInhOccursIndices().keySet().contains(attribute)){ + index = nonterminalton.getInhOccursIndex(attribute); + }else{ + // System.out.println("Bad input, legal inputs:"); + // Set allInputs = new HashSet(); + // Set synAttrSet = nonterminalton.getAllSynth(); + // Set inhAttrSet = nonterminalton.getAllInh(); + // allInputs.addAll(synAttrSet); + // allInputs.addAll(inhAttrSet); + // System.out.println("Keys: " + allInputs); + return -1; + } + if(isSynth){ + Lazy synthAttribute = node.getNode().getSynthesized(index); + Object o = synthAttribute.eval(node); + System.out.println(Util.genericShow(o)); + }else{ + Object o = node.evalInhSomehowButPublic(index); + System.out.println(Util.genericShow(o)); + } + return 1; + } + + public void viewLocals(DecoratedNode node, int attribute) + { + + } + + //TODO: Add to the other attributes + //TODO: Print alst if unique otherwise print entire + public void listLocalAttrs(DecoratedNode node) + { + // int count = node.getNode().getNumberOfLocalAttrs(); + // HashMap hash = new HashMap(); + // for(int i = 0; i < count; i++) + // { + // Lazy attribute = node.getNode().getLocal(i); + // // do whatever printing + // hash.put(i, new StringObjectPair(currentNode.getNameOfLocalAttr(i), currentNode.evalLocalDecorated(i))); + // System.out.println("Attribute = " + entry.getKey() + + // ", Index = " + entry.getValue()); + // } + // currentNodeLocalAttrs = hash; + + + + int count = node.getNode().getNumberOfLocalAttrs(); + //System.out.println("Attribute = " + Integer.toString(count)); + + for(int i = 0; i < count; i++) + { + Lazy attribute = node.getNode().getLocal(i); + Object o = attribute.eval(node); + // System.out.println(); + System.out.println("Attribute = " + node.getNode().getNameOfLocalAttr(i) + + "\nValue = " + Util.genericShow(o)); + } + } + + public boolean isContractum(DecoratedNode node) + { + return node.getNode().hasForward(); + } + + public static class StringObjectPair { + private String stringValue; + private Object objectValue; + + public StringObjectPair(String stringValue, Object objectValue) { + this.stringValue = stringValue; + this.objectValue = objectValue; + } + + public String getString() { + return stringValue; + } + + public Object getObject() { + return objectValue; + } + } +} \ No newline at end of file diff --git a/runtime/java/src/common/DecoratedNode.java b/runtime/java/src/common/DecoratedNode.java index 6fcf7d72b..f9d01d83d 100644 --- a/runtime/java/src/common/DecoratedNode.java +++ b/runtime/java/src/common/DecoratedNode.java @@ -1,6 +1,15 @@ package common; import java.util.Arrays; +import java.util.Collection; +import java.util.Map; + +import javax.sound.midi.SysexMessage; + +import silver.core.NOriginInfo; +// import silver.core.OriginsUtils; +import silver.core.PoriginOriginInfo; +import silver.core.PoriginAndRedexOriginInfo; import common.exceptions.MissingDefinitionException; import common.exceptions.SilverException; @@ -219,6 +228,21 @@ public final Node undecorate() { } } + public DecoratedNode getParent() + { + return parent; + } + + public DecoratedNode getForwardParent() + { + return forwardParent; + } + + //Getter added by Micahel + public Lazy getInheritedAttribute(int index) { + return inheritedAttributes[index]; + } + /** * Decorate this (unique decorated) node with additional inherited attributes. * This has no effect if the node already has a forward parent. @@ -874,4 +898,23 @@ public final String getDebugID() { public final String toString() { return getDebugID(); } + + //curesed function added by Michael who does not know how to get Inherited attributes otherwise + public final Object evalInhSomehowButPublic(final int attribute) { + // We specifically have to check here for inheritedAttributes == null, because + // that's what happens when we don't supply any inherited attributes... + // That is, unlike the unconditional access earlier for inheritedValues[attribute] + // (which could be null if *no inherited attributes occur at all* on this + // node), this could be the result of correctly compiled, but wrongly written user + // code. + if(inheritedAttributes != null && inheritedAttributes[attribute] != null) + return evalInhHere(attribute); + else + return evalInhViaFwdP(attribute); + } + } + + + + \ No newline at end of file diff --git a/runtime/java/src/common/Feature.java b/runtime/java/src/common/Feature.java new file mode 100644 index 000000000..f75f44465 --- /dev/null +++ b/runtime/java/src/common/Feature.java @@ -0,0 +1,66 @@ +package common; + +// The Feature class is a helper class for debugging +// contextualization. + +// It stores an individual label +// to be used in a SimplifiedContextBox. These possible +// labels are indended to be redex, contractum, and higher-order +// attribute-root. It stores one in a label. + +// The baseProd is the production name of the node +// this label is associated with. + +// The target is "other" the node that may be associated +// with a label (e.g., the redex of a contractum)/ + +// toString is the main functionality Feature offers when +// writing labels to a file as part of a SimplifiedContextStack. + + +public class Feature { + public String baseProd; + public String label; + public String target; + public String sep; + + public Feature(String baseProd, String label) { + this.baseProd = baseProd; + this.label = label; + this.target = ""; + this.sep = ""; + } + + public Feature(String baseProd, String label, String target) { + this.baseProd = baseProd; + this.label = label; + this.target = target; + this.sep = ""; + } + + private void setSep() { + if (this.label.contains("redex") && ! this.target.equals("")) { + this.sep = "to"; + } + else if (this.label.contains("contractum")) { + this.sep = "of"; + } + else if (this.label.contains("attribute")) { + this.sep = "of"; + } + else { + this.sep = "INVALID LABEL"; + } + } + + public String toString() { + this.setSep(); + if (! this.target.equals("")) { + return this.baseProd + ": " + this.label + + " (" + this.sep + " " + this.target + ")"; + } + else { + return this.baseProd + ": " + this.label; + } + } +} diff --git a/runtime/java/src/common/FileContextVisualization.java b/runtime/java/src/common/FileContextVisualization.java new file mode 100644 index 000000000..ca6a0e154 --- /dev/null +++ b/runtime/java/src/common/FileContextVisualization.java @@ -0,0 +1,35 @@ +package common; + +import java.io.File; +import java.io.FileWriter; +import java.io.FileNotFoundException; +import java.io.PrintStream; +import java.util.Iterator; +import java.io.IOException; + +public class FileContextVisualization extends CMDContextVisualization { + protected final String filename; + + public FileContextVisualization(String filename, String border) { + super(border); + + this.filename = filename; + } + + @Override + public void show() { + + try{ + FileWriter myWriter = new FileWriter(this.filename); + Iterator iterator = this.contextStack.iterator(); + while (iterator.hasNext()) { + NodeContextMessage nodeContextMessage = iterator.next(); + myWriter.write(this.border + "\n" + nodeContextMessage.toString() + "\n" + this.border); + } + myWriter.close(); + } + catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/runtime/java/src/common/FileCoordinate.java b/runtime/java/src/common/FileCoordinate.java new file mode 100644 index 000000000..6c941233e --- /dev/null +++ b/runtime/java/src/common/FileCoordinate.java @@ -0,0 +1,63 @@ +//package agnosis-context.libs.visualization; +package common; +import static java.lang.Math.max; + +/** + * A FileCoordinate object represents a coordinate in a file as a point (character) in a file + * specified by a row and a column. + */ +public class FileCoordinate { + private final int row, col; + + /** + * Constucts a FileCoordinate object with a row and column + * + * @param row the row of the coordinate + * @param col the column of the coordinate + */ + public FileCoordinate(int row, int col) { + if(row < 0 || col < 0) { + this.row = max(row, 0); + this.col = max(col, 0); + } else { + this.row = row; + this.col = col; + } + } + + /** + * Returns the row of the coordinate + * + * @return the row of the coordinate + */ + public int getRow() { + return row; + } + + /** + * Returns the column of the coordinate + * + * @return the column of the coordinate + */ + public int getCol() { + return col; + } + + @Override + public boolean equals(Object obj) { + if(this == obj) { + return true; + } else if(obj.getClass() != FileCoordinate.class) { + return false; + } + + FileCoordinate objFileCoordinate = (FileCoordinate) obj; + + return this.row == objFileCoordinate.row && this.col == objFileCoordinate.col; + } + + @Override + public String toString() { + return String.format("(%d,%d)", this.row, this.col); + } +} diff --git a/runtime/java/src/common/HTMLContextVisualization.java b/runtime/java/src/common/HTMLContextVisualization.java new file mode 100644 index 000000000..f97a6216a --- /dev/null +++ b/runtime/java/src/common/HTMLContextVisualization.java @@ -0,0 +1,39 @@ +package common; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.util.Scanner; + +public class HTMLContextVisualization extends FileContextVisualization { + private final String documentFormat = "\n\n\nContext Visualization\n\n\n

%s

\n\n"; + + public HTMLContextVisualization(String filename, String border) { + super(filename, border); + } + + public HTMLContextVisualization(String border) { + super("context.html", border); + } + + @Override + public void show() { + super.show(); + + try { + String content = new Scanner(new File(this.filename)).useDelimiter("\\Z").next(); + + File file = new File(this.filename); + BufferedWriter writer = new BufferedWriter(new FileWriter(file)); + writer.write(String.format(this.documentFormat, content)); + + writer.close(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/runtime/java/src/common/NodeContextMessage.java b/runtime/java/src/common/NodeContextMessage.java new file mode 100644 index 000000000..3d601933d --- /dev/null +++ b/runtime/java/src/common/NodeContextMessage.java @@ -0,0 +1,482 @@ +package common; + +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.IOException; +import java.util.Collection; +import java.util.Map; + +import silver.core.NLocation; +import silver.core.NMaybe; + +// Core of the debugging contextualization implementation. +// A NodeContextMessage records all debugging contextualization +// information we wish to keep about a navigated-to DecoratedNode node. + +// A stack of these makes up a "full" or verbose ContextStack. +// The ContextStack is then compressed to yield a better +// SimplifiedContextStack. + +// Section 1. (HEADERS). Headers are either TRANSLATION-X (for rewrite rules) or HIGHER-ORDER +// (for higher-order attributes). They represent the cumulative nesting of these constructs +// a current node has relative to the program root. Headers are dependent on a node's labels and +// its ancestors' labels. + +// Section 2. (CONCRETE SYNTAX). Concrete syntax representation of the current node. +// Should hold parsed concrete syntax from the source file if headers are empty +// (no rewrite rules or higher-order attributes traversed yet), or the node's +// pretty print attribute otherwise. + +// Section 3. (PRODUCTION). Store the production name (we currently keep +// file lines as well. But they are not needed for the current version of +// the SimplifiedContextStack). + +// SECTION 4. (labels). Labels represents whether the current node is involved with +// horizontal edges. Current possible labels are is-contractuma and is-redex +// (for forwarding relationship) and is-attribute-root (for higher-order attribute subtree roots). +// Labels are currently extracted from DecoratedNode itself. + +// If showing intermediate full stack representation (ContextStack), then use GetSection_(). +// where _ is 1, 2, 3, or 4. +// If accessing stored information to generate a SimplifiedContextBox, +// use header/label getters directly, e.g. getIsRedex() or getProdName(). +// All label/header contextualization fields are set by the constuctor calling +// the necessary info section-generating functions; +// the DecoratedNode to contextualize is passed directly in the constructor. + +// TODO. Add a new contextualization label/header framework for REFERENCE ATTRIBUTES. + +// TODO. Simplify this class. Remove all GetSection_() methods and just use a stack of +// NodeContextMessages as a store of information to make SimplifiedContextBoxes +// directly in SimplifiedContextStack + + +public class NodeContextMessage { + + // String representations for each section. + public String GetSection0() { + return Integer.toString(this.numIndex); + } + + public String GetSection1() { + String res = ""; + boolean firstSet = false; + if (this.translationX > 0) { + res += "TRANSLATION-" + this.translationX; + firstSet = true; + } + if (this.higherOrderY > 0) { + if (firstSet) { + res += " & "; + } + res += "HIGHER-ORDER-" + this.higherOrderY; + } + return res; + } + + public String GetSection2() { + return this.textRepr; + } + + public String GetSection3() { + + String res = "prod: " + this.prodName + "\n" + + this.filename + " lines: " + this.fcStart.getRow() + + ":" + this.fcStart.getCol() + " -> " + this.fcEnd.getRow() + + ":" + this.fcEnd.getCol(); + return res; + } + + // Not mutually exclusive labels + public String GetSection4() { + + String res = ""; + if (this.isRedex) { + res += "*is-redex\n"; + } + if (this.isContractum) { + res += "*is-contractum of " + this.contractumOf + "\n"; + } + if (this.isAttributeRoot) { + res += "*is-attribute_root\n"; + } + return res; + } + + // Constructor for NodeContextMessage + public NodeContextMessage(DecoratedNode node, int numIndex) { + + // Set the current index. Keep track of it in the stack + // to make decrementing on pop() easy + this.numIndex = numIndex; + + // Necessary order. + + // Section 2 + this.prodName = node.getNode().getName(); + this.fillInRowsAndCols(node); + + // Section 4 + this.setLabels(node); + + // Section 1--headers depend on label attributes + this.initializeHeaders(node); + + // Section 3. Determine file lines last + // because they depend on computing boolean attributes + if ((this.translationX > 0) || (this.higherOrderY > 0) || + this.isAttributeRoot || this.isContractum) { + // If headers are represent (non-"order" 0 node), its pretty print is used. + this.prettyPrint(node); + } + else { + // Otherwise file times are used for the text/concrete syntax representation. + this.pullFilelines(); + } + } + + // Set translationX and higherOrderY bools here + private void initializeHeaders(DecoratedNode node) { + + this.translationX = getIsTranslation(node); + this.higherOrderY = getIsAttribute(node); + } + + // Use file location method written in DecoratedNode + private void fillInRowsAndCols(DecoratedNode node){ + + this.fcStart = getStartCoordinates(node); + this.fcEnd = getEndCoordinates(node); + this.filename = getFilename(node); + } + + // Labels currently only regard forwarding and higher-order attributes. + private void setLabels(DecoratedNode node) { + + this.isRedex = getIsRedex(node); + this.isContractum = getIsContractum(node); + this.isAttributeRoot = getIsAttributeRoot(node); + + // Only relevant if these attributes are true + this.contractumOf = this.numIndex - 1; + this.attributeOf = this.numIndex - 1; + } + + // access pp attribute if present + private void prettyPrint(DecoratedNode node) { + + this.textRepr = Util.getPrettyPrint(node); + } + + // Basically extract file lines from row x col y to + // row x' to y' for the two FileCoordinates this class stores. + private void pullFilelines() { + + // Currently not the most efficient but should get the job done for now + try (BufferedReader br = new BufferedReader(new FileReader(this.filename))) { + + int row = 1; + int col = 1; + String res = ""; + for (; row < this.fcStart.getRow(); row++) { + // Skip these rows. + String line = br.readLine(); + } + // Advance to starting char + for (; col < this.fcStart.getCol(); col++) { + //Single char read + // System.out.println("skipping col: " + col); + int c = br.read(); + } + + // Now in correct row to start actually noting down file contents + + // Get whole lines here + for (; row < this.fcEnd.getRow(); row++) { + // System.out.println("reading row: " + row); + res += br.readLine(); + res += '\n'; // Since not added with readLine() + } + // Now row = row.end + for (; col <= this.fcEnd.getCol(); col++) { + // System.out.println("reading col: " + col); + char c = (char)br.read(); + res += Character.toString(c); + } + // Done. Can close file now + br.close(); + + // Just set filebytes (textRepr) to res + this.textRepr = res; + } + catch (IOException e) { + System.out.println("ERROR READING FROM FILE " + this.filename); + e.printStackTrace(); + } + } + + @Override + public String toString() { + return this.GetSection0() + "\n" + + this.GetSection1() + "\n" + + this.GetSection2() + "\n" + + this.GetSection3() + "\n" + + this.GetSection4(); + } + + + // Helper functions to extract info from DecoratedNode + public boolean getIsRedex(DecoratedNode dn) { + if (dn.getNode() == null) { + return false; + } + else if (dn.getNode().hasForward()) { + return true; + } + return false; + } + + public boolean getIsContractum(DecoratedNode dn) { + if (dn.getNode() == null) { + return false; + } + else if (dn.getForwardParent() != null) { + return true; + } + return false; + } + + public DecoratedNode getRedex(DecoratedNode dn) { + return this.getRedexHelper(dn); + } + + private DecoratedNode getRedexHelper(DecoratedNode dn) { + if (dn == null || isRoot(dn)) { + return null; + } + + if (getIsRedex(dn)) { + return dn; + } + else { + return getRedexHelper(dn.getParent()); + } + } + + public DecoratedNode getContractum(DecoratedNode dn) { + return this.getContractumHelper(dn); + } + + private DecoratedNode getContractumHelper(DecoratedNode dn) { + if (dn == null || isRoot(dn)) { + return null; + } + + if (getIsContractum(dn)) { + return dn; + } + else { + return getContractumHelper(dn.getParent()); + } + } + + // Get filename the associated with the concrete syntax location + // origin tacking follows back from this node + public String getFilename(DecoratedNode dn) { + + // boolean res = dn.getNode() instanceof silver.core.Alocation; + // res = dn.getNode() instanceof Tracked; + + if(dn.getNode() == null) { + return ""; + } + NLocation loc = null; + if(dn.getNode() instanceof silver.core.Alocation) { + loc = ((silver.core.Alocation)dn.getNode()).getAnno_silver_core_location(); + } else if(dn.getNode() instanceof Tracked) { + NMaybe maybeLoc = silver.core.PgetParsedOriginLocation.invoke(OriginContext.FFI_CONTEXT, dn.getNode()); + if(maybeLoc instanceof silver.core.Pjust) { + loc = (silver.core.NLocation)maybeLoc.getChild(0); + } + } + if(loc != null) { + String file = loc.synthesized(silver.core.Init.silver_core_filename__ON__silver_core_Location).toString(); + return file; + } + + return ""; + } + + // Get start coordinates for the file location associated with + // the concrete syntax location origin tacking follows back from this node + public FileCoordinate getStartCoordinates(DecoratedNode dn) { + + if(dn.getNode() == null) { + return new FileCoordinate(-2, -2); + } + NLocation loc = null; + if(dn.getNode() instanceof silver.core.Alocation) { + loc = ((silver.core.Alocation)dn.getNode()).getAnno_silver_core_location(); + } else if(dn.getNode() instanceof Tracked) { + NMaybe maybeLoc = silver.core.PgetParsedOriginLocation.invoke(OriginContext.FFI_CONTEXT, dn.getNode()); + if(maybeLoc instanceof silver.core.Pjust) { + loc = (silver.core.NLocation)maybeLoc.getChild(0); + } + } + if(loc != null) { + int line = (Integer)loc.synthesized(silver.core.Init.silver_core_line__ON__silver_core_Location); + int col = (Integer)loc.synthesized(silver.core.Init.silver_core_column__ON__silver_core_Location); + return new FileCoordinate(line, col); + } + + return new FileCoordinate(-1, -1); + } + + // Get end coordinates for the file location associated with + // the concrete syntax location origin tacking follows back from this node + public FileCoordinate getEndCoordinates(DecoratedNode dn) { + + if(dn.getNode() == null) { + return new FileCoordinate(-2, -2); + } + NLocation loc = null; + if(dn.getNode() instanceof silver.core.Alocation) { + loc = ((silver.core.Alocation)dn.getNode()).getAnno_silver_core_location(); + } else if(dn.getNode() instanceof Tracked) { + NMaybe maybeLoc = silver.core.PgetParsedOriginLocation.invoke(OriginContext.FFI_CONTEXT, dn.getNode()); + if(maybeLoc instanceof silver.core.Pjust) { + loc = (silver.core.NLocation)maybeLoc.getChild(0); + } + } + if(loc != null) { + int line = (Integer)loc.synthesized(silver.core.Init.silver_core_endLine__ON__silver_core_Location); + int col = (Integer)loc.synthesized(silver.core.Init.silver_core_endColumn__ON__silver_core_Location); + return new FileCoordinate(line, col); + } + + return new FileCoordinate(-1, -1); + } + // Catch program "root" + public boolean isRoot(DecoratedNode dn) { + return + dn.getParent() == null || + dn.getParent() instanceof TopNode || + dn.getParent().getParent() == null || + dn.getParent().getParent() instanceof TopNode; + } + + // only set isAttributeRoot once + public boolean getIsAttributeRoot(DecoratedNode dn) { + if (! (dn == null || isRoot(dn))) { + Map map = Debug.allAttributesThunkMap(dn.getParent()); + Collection values = map.values(); + for (Object obj: values) { + if (Util.demand(obj) == dn) { + return true; + } + } + } + return false; + } + + // Determine higher-order attribute nesting of this node. + public int getIsAttribute(DecoratedNode dn) { + if (dn == null || isRoot(dn)) { + return 0; + } + else { + if (getIsAttributeRoot(dn)) { + return 1 + getIsAttribute(dn.getParent()); + } + return getIsAttribute(dn.getParent()); + } + } + + // Determine how many forwarding edges were followed to get to this node. + public int getIsTranslation(DecoratedNode dn) { + // See how many parents are contractums + // Calling parent repeatedly will ignore forwarding nodes, so operate on + // getIsContractum only as the case to determine whether forwarding occurs or not + if (dn == null || isRoot(dn)) { + return 0; + } + else if (getIsContractum(dn)) { + return 1 + getIsTranslation(dn.getParent()); + } + else { + return getIsTranslation(dn.getParent()); + } + } + + + + // Section 0. Every context box will have a numeric index label + private int numIndex; + + // Section 1. Header will contain TRANSLATION and/or HIGHER-ORDER + public int getTranslationX() { + return this.translationX; + } + private int translationX; + + public int getHigherOrderY() { + return this.higherOrderY; + } + private int higherOrderY; + + // Section 2. Actual text representation + // (either copied from file or prity print (pp) represenation) + public String getTextRepr() { + return this.textRepr; + } + private String textRepr; + + // Section 3. Production name and file lines + public String getProdName() { + return this.prodName; + } + private String prodName; + + public String getFilenmae() { + return this.filename; + } + private String filename; + + public FileCoordinate getFileCoordianteStart() { + return this.fcStart; + } + private FileCoordinate fcStart; + + public FileCoordinate getFileCoordianteEnd() { + return this.fcEnd; + } + private FileCoordinate fcEnd; + + + // Section 4. Labels and associated info + public boolean isRedex() { + return isRedex; + } + private boolean isRedex; + + public boolean isContractum() { + return isContractum; + } + private boolean isContractum; + + public int getContractumOf() { + return contractumOf; + } + private int contractumOf; + + public boolean isAttributeRoot() { + return isAttributeRoot; + } + private boolean isAttributeRoot; + + public int getAttributeOf() { + return attributeOf; + } + private int attributeOf; + +} \ No newline at end of file diff --git a/runtime/java/src/common/ProductionName.java b/runtime/java/src/common/ProductionName.java new file mode 100644 index 000000000..fc0729697 --- /dev/null +++ b/runtime/java/src/common/ProductionName.java @@ -0,0 +1,33 @@ +package common; + +// The Production name class is a helper class for debugging +// contextualization. + +// It simply associated an index with a production name, which i +// is to be used when there are multiple productions with the same +// name encountered in a SimplifiedContextStack. + +public class ProductionName { + public String name; + public int index; + + public ProductionName(String name, int index) { + this.name = name; + this.index = index; + } + + // Default constructor + public ProductionName() { + this.name = ""; + this.index = 0; + } + + public String toString() { + if (this.index == 0) { + return this.name; + } + else { + return this.name + " (" + this.index + ")"; + } + } +} \ No newline at end of file diff --git a/runtime/java/src/common/RTTIManager.java b/runtime/java/src/common/RTTIManager.java index eee485aa8..fc72d060e 100644 --- a/runtime/java/src/common/RTTIManager.java +++ b/runtime/java/src/common/RTTIManager.java @@ -85,6 +85,7 @@ public abstract T constructDirect( final Object[] annos); // NO reify or other checking, used by native[De]Serialize public abstract String getName(); + //need to return an array literal public abstract Nonterminalton getNonterminalton(); public abstract String getTypeUnparse(); // Nominally opaque representation of the type @@ -118,6 +119,9 @@ public final boolean hasInh(String attrName) { public final boolean hasSyn(String attrName) { return synOccursIndices.containsKey(attrName); } + public final boolean hasAttribute(String attrName) { + return synOccursIndices.containsKey(attrName) || inhOccursIndices.containsKey(attrName); + } public final int getInhOccursIndex(String attrName) { if (!hasInh(attrName)) { throw new SilverError("Attribute " + attrName + " does not occur on " + getName() + "."); @@ -130,6 +134,34 @@ public final int getSynOccursIndex(String attrName) { } return synOccursIndices.get(attrName); } + // write a getAllInh() and getAllSyn() that return the keySet of each of these maps + public Set getAllInh() { + return inhOccursIndices.keySet(); + } + + public Set getAllSynth() { + return synOccursIndices.keySet(); + } + + public List alphabeticalAttributes() { + Set allAttributesSet = new HashSet<>(); + allAttributesSet.addAll(inhOccursIndices.keySet()); + allAttributesSet.addAll(synOccursIndices.keySet()); + List allAttributesList = new ArrayList<>(); + allAttributesList.addAll(allAttributesSet); + allAttributesList.sort(null); + return allAttributesList; + } + + public Map getSynOccursIndices() { + return synOccursIndices; + } + + public Map getInhOccursIndices() { + return inhOccursIndices; + } } -} + //TODO: Add way to access children names + +} \ No newline at end of file diff --git a/runtime/java/src/common/SimplifiedContextBox.java b/runtime/java/src/common/SimplifiedContextBox.java new file mode 100644 index 000000000..fa726b129 --- /dev/null +++ b/runtime/java/src/common/SimplifiedContextBox.java @@ -0,0 +1,191 @@ +package common; + +import java.util.ArrayList; +import java.util.List; + +// The SimplifiedContextBox maintains all information needed for +// an individual element as part of simplified debugging contextualization. + +// They are the elements of a SimplifiedContextStack. + +// It fully represents a path that has no horizontal edges. + // (forwarding/translation + // or higher-order attribute entry links) + +// The SimplifiedContextStack creates one of these boxes each time +// it encounters a horizontal edge (plus the original started at +// the program root). + +// Tree Order represents how many horizontal edges +// have been navigated across. + +// Text Syntax represents the current path through concrete syntax. +// textSyntax should store parsed concrete syntax when (x, y) from tree order +// are both 0. Otherwise, it will be the pretty print representation. This is for +// the first production associated with a SimplifiedContextBox (widest-spanning) + +// syntaxToHighlight should be highlighted within textSyntax. It represents +// the deepest (least-spanning) navigated-to node within the path of productions +// such a box represents. + +// TODO: some extra information while doing tree traversal +// will be needed to make highlighting unique +// if there are mulitple instances of syntaxToHighlight within textSyntax. + +// Productions Visited. Just a list of production names this box's abstract +// syntax tree path represents. They should be added with increasing tree depth. + +// Interesting Features. Records which nodes are associated with horizontal edges +// themselves. This info comes from NodeContextMessage objects stored in the +// basic ContextStack from which a SimplifiedContextStack is built from. + +// There are currently HTML and toString representations of an individual box. +// When adding/generating HTML, the headers are added within SimplifiedContextStack. + + +public class SimplifiedContextBox { + + // 4 sections + + // 1. Tree Order + public int translationX; + public int higherOrderY; + + // 2. Text Syntax + public String textSyntax; + public String syntaxToHighlight; + + // 3. Productions Visited + public ProductionName prodsVisited[]; + + // 4. Interesting Features + public List features; + + private String sectionSep = "--------------------\n"; + + // For HTML: no labels added + public String getTreeOrderHTML() { + if (this.translationX == 0 && this.higherOrderY == 0) { + return "0"; + } + String res = ""; + if (this.translationX > 0) { + res += "TRANSLATION-" + this.translationX; + } + if (this.higherOrderY > 0) { + res = ", HIGHER-ORDER-" + this.higherOrderY; + } + return res; + } + + public String getAllSyntaxHTML() { + return this.textSyntax; + } + + public String getsyntaxToHighlightHTML() { + return this.syntaxToHighlight; + } + + public String getProductionsVisitedHTML() { + String res = ""; + for (int i = 0; i < this.prodsVisited.length; i++) { + res += this.prodsVisited[i].toString() + "; "; + } + return res; + } + + public String getFeaturesHTML() { + if (this.features.size() == 0) { + return ""; + } + String res = ""; + for (Feature feature: this.features) { + res += feature.toString() + "; "; + } + return res; + } + + public String getHTMLBox() { + + // Section 1: Tree Order + String res = ""; + res += "

Tree Order:

"; + res += "

" + this.getTreeOrderHTML() + "

"; + + // Section 2: Syntax + // FIXME: ACTUALLY HIGHLIGHT WITHIN ALL SYNTAX + res += "

ALL SYNTAX

"; + res += "

" + this.getAllSyntaxHTML() + "

"; + + res += "

TO HIGHLIGHT

"; + res += "

" + this.getsyntaxToHighlightHTML() + "

"; + + // Section 3: Productions Visited + res += "

Productions Visited:

"; + res += "

" + this.getProductionsVisitedHTML() + "

"; + + // Section 4: Features + res += "

Features:

"; + res += "

" + this.getFeaturesHTML() + "

"; + + return res; + } + + public String getSection1Str() { + + String top = "Tree Order: "; + if (this.translationX == 0 && this.higherOrderY == 0) { + return top + "0\n"; + } + top += "\n"; + String trans = ""; + if (this.translationX > 0) { + trans = "TRANSLATION-" + this.translationX + "\n"; + } + String higher = ""; + if (this.higherOrderY > 0) { + higher = "HIGHER-ORDER-" + this.higherOrderY + "\n"; + } + return top + trans + higher; + } + + public String getSection2Str() { + + String header1 = "^^^^^ALL SYNTAX^^^^^\n"; + String header2 = "\n^^^^^TO HIGHLIGHT^^^^^\n"; + return header1 + this.textSyntax + header2 + this.syntaxToHighlight + "\n"; + } + + public String getSection3Str() { + + String res = "Productions Visited: \n"; + for (int i = 0; i < this.prodsVisited.length; i++) { + res += "\t" + this.prodsVisited[i].toString() + "\n"; + } + return res; + } + + public String getSection4Str() { + + if (this.features.size() == 0) { + return ""; + } + String res = "Features: \n"; + for (Feature feature: this.features) { + res += "\t" + feature.toString() + "\n"; + } + return res; + } + + public String toString() { + + return + getSection1Str() + + this.sectionSep + + getSection2Str() + + this.sectionSep + + getSection3Str() + + this.sectionSep + + getSection4Str(); + } +} \ No newline at end of file diff --git a/runtime/java/src/common/SimplifiedContextStack.java b/runtime/java/src/common/SimplifiedContextStack.java new file mode 100644 index 000000000..54eec9c4d --- /dev/null +++ b/runtime/java/src/common/SimplifiedContextStack.java @@ -0,0 +1,339 @@ +package common; + +import java.util.Iterator; +import java.util.Stack; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; +import java.io.FileWriter; +import java.io.FileNotFoundException; +import java.io.PrintStream; +import java.util.Iterator; +import java.io.IOException; +import java.io.BufferedWriter; + +// Core of contextualization for debugging: +// The SimplifiedContextStack is basically a heavyweight decorator +// over a ContextStack to generate a simplified (one node per tree order/ +// horizontal-edge encountered) stack. + +// Its ContextStack member fullStack is dynamically updated while debugging occurs. +// Then, extracting a contextualization from a SimplifiedContextStack requires +// calling updateSimplifiedStack() to create an updated SimplifiedContextStack +// (of SimplifiedConextBox objects) based on the current state of the ContextStack fullStack. + +// TODO. Move fullStack updating directly into here, +// i.e., push/pop nodes into the simplified stack directly. + +// TODO. Find better than O(n^2) time complexity for production name assignment. + +// It currently can print some primitive text representations to a text file, or generate +// a better HTML file. (Filenames can be specified upin SimplifiedContextStack construction). + +public class SimplifiedContextStack { + + public SimplifiedContextStack(ContextStack fullStack) { + this.fullStack = fullStack; + this.partition = new int[fullStack.getHeight()]; + this.filename = "simpleDebugContext.txt"; + this.filenameHTML = "simpleDebugContext.html"; + } + + public SimplifiedContextStack(ContextStack fullStack, String fn) { + this.fullStack = fullStack; + this.partition = new int[fullStack.getHeight()]; + this.filename = fn; + this.filenameHTML = "simpleDebugContext.html"; + } + + public SimplifiedContextStack(ContextStack fullStack, String fn, String fnHTML) { + this.fullStack = fullStack; + this.partition = new int[fullStack.getHeight()]; + this.filename = fn; + this.filenameHTML = fnHTML; + } + + + // KEY function called immediately when generateHTMLFile() or show() are called. + // Updates this.simpleStack based on any changes to this.fullStack + private void updateSimplifiedStack() { + this.needSetAllProds = true; + this.makeSimplifiedStack(); + } + + + // Create a basic text representation + public void show(){ + + this.updateSimplifiedStack(); + String border = "*******************"; + + try{ + FileWriter myWriter = new FileWriter(this.filename); + // Want to go backwards through stack. Render it from top down in the file + // java stack iterator doesn't support going backwards + for (int i = this.simpleStack.size() - 1; i >= 0; i--) { + SimplifiedContextBox sbox = this.simpleStack.get(i); + myWriter.write(border + "\n" + sbox.toString() + "\n" + border); + } + myWriter.close(); + } + catch (IOException e) { + e.printStackTrace(); + } + } + + + // Main function with extract a contextualization out. Must push to/pop to the separate ContextStack + // that was used to create + public void generateHTMLFile() { + + this.updateSimplifiedStack(); + + try (FileWriter myWriter = new FileWriter(this.filenameHTML)) { + myWriter.write("Simplified Context Stack\n"); + + // Iterate through the stack in reverse order + for (int i = this.simpleStack.size() - 1; i >= 0; i--) { + SimplifiedContextBox sbox = this.simpleStack.get(i); + + myWriter.write(sbox.getHTMLBox()); + + // Add a border between SimplifiedContextBoxes + myWriter.write("
"); + } + + myWriter.write(""); + } catch (IOException e) { + e.printStackTrace(); + } + } + + // Recreate the internal simplified stack based on an updated full ContextStack + private void makeSimplifiedStack() { + + // Clear previous simplified stack to get a brand new one + this.simpleStack = new Stack(); + + this.fillInPartition(); + + // Now make one box per partition + int prevPartitionIndex = 0; + int start = 0; + int end = -1; + + // System.out.println(this.partition[0]); + for (int i = 0; i < this.partition.length; i++) { + + if (this.partition[i] > prevPartitionIndex) { + // Make box on existing start and end + SimplifiedContextBox sbox = this.makeSimplifiedBox(start, end); + this.simpleStack.push(sbox); + start = i; + end = start; + prevPartitionIndex++; + } + else { + end++; + } + } + // Last one + SimplifiedContextBox sbox = this.makeSimplifiedBox(start, end); + this.simpleStack.push(sbox); + } + + + // Make a single box after partitioning has been done. + // Compress full stack nodes at (inclusive) indices i..j + // into a single SimplifiedContextBox. + private SimplifiedContextBox makeSimplifiedBox(int i, int j) { + + if (i > j) { + System.out.println("Invalid Partition Indices: " + i + ", " + j); + return null; + } + + // 4 sections to fill in + SimplifiedContextBox sbox = new SimplifiedContextBox(); + + NodeContextMessage first = this.fullStack.get(i); + NodeContextMessage last = this.fullStack.get(j); + + // 1. Tree Order Trivial + sbox.translationX = first.getTranslationX(); + sbox.higherOrderY = first.getHigherOrderY(); + + // 2. Text Syntax (highlight later when rendering) + sbox.textSyntax = first.getTextRepr(); + sbox.syntaxToHighlight = last.getTextRepr(); + + // 3. Need some counting logic to keep track of unique indices + this.SetAllProds(); + sbox.prodsVisited = Arrays.copyOfRange(this.productions, i, j + 1); + + // Make features list now (list, not array, since unknown length) + sbox.features = new ArrayList(); + this.fillInFeaturesList(sbox, i, j); + + return sbox; + } + + + // Helper to iterate through a sequence of NodeContextMessages within this.fullStack, + // extract their labels, and create a Feature list. + private void fillInFeaturesList(SimplifiedContextBox sbox, int i, int j) { + + for (int k = i; k <= j; k++) { + NodeContextMessage node = this.fullStack.get(k); + + if (node.isRedex()) { + String nodeName = productions[k].toString(); + String targetName = ""; + if (k < j) { + targetName = productions[k + 1].toString(); + } + Feature f = new Feature(nodeName, "redex", targetName); + sbox.features.add(f); + } + if (node.isContractum()) { + String nodeName = productions[k].toString(); + String targetName = ""; + if (k > 0) { + targetName = productions[k - 1].toString(); + } + Feature f = new Feature(nodeName, "contractum", targetName); + sbox.features.add(f); + } + if (node.isAttributeRoot()) { + String nodeName = productions[k].toString(); + String targetName = ""; + if (k > 0) { + targetName = productions[k - 1].toString(); + } + Feature f = new Feature(nodeName, "attribute root", targetName); + sbox.features.add(f); + } + } + } + + // Determine all production names before partitioning to give repeated names + // new indices. + private void SetAllProds() { + + if (! this.needSetAllProds) { + return; + } + // Only do this once + // Not worried about multiple instances of SimplifiedContextStack; + // rather, don't want to do this for every SimplifiedContextBox created + + ProductionName allProds[] = new ProductionName[this.fullStack.getHeight()]; + + for (int index = 0; index < this.fullStack.getHeight(); index++) { + ProductionName pn = new ProductionName(this.fullStack.get(index).getProdName(), -1); + allProds[index] = pn; + } + + + // Going to be fine with O(n^2) worst case time complexity here for now + // Simply a prototype implementation of simplified stack + + // Unique prod names get the 0 index (not to be displayed) + // Non-unique prod names are numbered from 1..n, so need extra + // scan afterwards to separate unique 1 -> 0 from actual 1 + for (int prodIndex = 0; prodIndex < allProds.length; prodIndex++) { + + int seqNum = 1; + String name = allProds[prodIndex].name; + + for (int visitIndex = 0; visitIndex < prodIndex; visitIndex++) { + String curName = allProds[visitIndex].name; + if (curName.compareTo(name) == 0) { + seqNum++; + } + } + allProds[prodIndex].index = seqNum; + } + + // All prod indices >= 1. Find if need to differentiate 1 into 0 now + // if truly unique and not start of 1..n sequence of indices + for (int prodIndex = 0; prodIndex < allProds.length; prodIndex++) { + + if (allProds[prodIndex].index == 1) { + boolean isUnique = true; + for (int k = 0; k < allProds.length; k++) { + if (k != prodIndex && + (allProds[k].name.compareTo(allProds[prodIndex].name) == 0)) { + isUnique = false; + break; + } + } + if (isUnique) { + allProds[prodIndex].index = 0; + } + } + } + + this.productions = allProds; + this.needSetAllProds = false; + + return; + } + + + // Determine partition of this.fullStack based on different headers. + // All nodes of the same header go into one partition element. + // Denote the partition by different sequential indices in the this.partition array. + private void fillInPartition() { + + this.partition = new int[fullStack.getHeight()]; + + int previousX = 0; + int previousY = 0; + int partitionIndex = 0; + for (int i = 0; i < this.fullStack.getHeight(); i++) { + NodeContextMessage node = this.fullStack.get(i); + int curX = node.getTranslationX(); + int curY = node.getHigherOrderY(); + if (curX == previousX && curY == previousY) { + // Within same set of partition + this.partition[i] = partitionIndex; + } + else { + previousX = curX; + previousY = curY; + // Increment partition index + partitionIndex++; + this.partition[i] = partitionIndex; + } + } + } + + + // The "full"/verbose stack holding the complete path of navigated-to nodes + // from root to the current node in a stack (basically maintain DFS traversal). + // Currently, nodes must be pushed/popped separately to fullStack first. + // TODO. Merge fullStack navigation into this stack. + private ContextStack fullStack; + + private String filename; + private String filenameHTML; + + // Actual contextualization comes from file rendering of the simpleStack. + private Stack simpleStack = + new Stack(); + + private boolean needSetAllProds = true; + private ProductionName productions[]; + + // Put 0 for each respective element in the first + // stack partition, then 1, etc. Index 0 into stack is bottom + private int[] partition; + +} + + + + diff --git a/runtime/java/src/common/Util.java b/runtime/java/src/common/Util.java index ebec4c5b0..edc0f02a9 100644 --- a/runtime/java/src/common/Util.java +++ b/runtime/java/src/common/Util.java @@ -192,6 +192,24 @@ public static int genInt() { public static void printStackCauses(Throwable e) { freeThisToPrintErrors = null; + // // Get all environment variables + // Map envVariables = System.getenv(); + + // // // Print all environment variables + // // for (Map.Entry entry : envVariables.entrySet()) { + // // String variableName = entry.getKey(); + // // String variableValue = entry.getValue(); + // // System.out.println(variableName + " = " + variableValue); + // // } + // String stackTraceString = envVariables.get("SILVERTRACE"); + // System.out.println("Value of SILVERTRACE: " + stackTraceString); + + // System.setProperty("SILVERTRACE", "1"); + + // stackTraceString = envVariables.get("SILVERTRACE"); + // System.out.println("Value of SILVERTRACE: " + stackTraceString); + + System.err.println("\nAn error occurred. Silver stack trace follows. (To see full traces including java elements, SILVERTRACE=1)\n"); if(! "1".equals(System.getenv("SILVERTRACE"))) { @@ -404,17 +422,56 @@ private static void hackyhackyUnparseList(ConsCell c, StringBuilder sb) { * @return A string representation. */ public static StringCatter genericShow(Object o) { + Object pp = null; try { Method genericPP = Class.forName("silver.langutil.reflect.PgenericPP") .getMethod("invoke", OriginContext.class, Object.class); + pp = genericPP.invoke(null, OriginContext.FFI_CONTEXT, o); + } catch(ClassNotFoundException | NoSuchMethodException | SecurityException | + IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + return hackyhackyUnparse(o); + } + return showDoc(pp); + } + + /** + * Reflective wrapper around silver:langutil:pp:showDoc. + * + * @param pp The Document value to render + * @return A string representation. + */ + public static StringCatter showDoc(Object pp) { + try { Method showDoc = Class.forName("silver.langutil.pp.PshowDoc") .getMethod("invoke", OriginContext.class, Object.class, Object.class); - Object pp = genericPP.invoke(null, OriginContext.FFI_CONTEXT, o); return (StringCatter)showDoc.invoke(null, OriginContext.FFI_CONTEXT, 80, pp); } catch(ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - return hackyhackyUnparse(o); + // If we already *have* a Document value, then the showDoc function should exist, + // so this should never happen. + throw new SilverInternalError("Error rendering pretty print", e); + } + } + + /** + * Get the pretty-print or unparse of a tree if available, + * otherwise falling back to genericShow. + * + * @param dn The tree to show + * @return A string representation. + */ + public static String getPrettyPrint(DecoratedNode dn) { + int numAttrs = dn.getNode().getNumberOfSynAttrs(); + for (int i = 0; i < numAttrs; i++) { + String attrName = dn.getNode().getNameOfSynAttr(i); + switch (attrName) { + case "silver:langutil:pp": + return showDoc(dn.synthesized(i)).toString(); + case "silver:langutil:unparse": + return dn.synthesized(i).toString(); + } } + return genericShow(dn.getNode()).toString(); } /** diff --git a/support/vs-code/agnosis/.eslintrc.json b/support/vs-code/agnosis/.eslintrc.json new file mode 100644 index 000000000..86c86f379 --- /dev/null +++ b/support/vs-code/agnosis/.eslintrc.json @@ -0,0 +1,30 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "plugins": [ + "@typescript-eslint" + ], + "rules": { + "@typescript-eslint/naming-convention": [ + "warn", + { + "selector": "import", + "format": [ "camelCase", "PascalCase" ] + } + ], + "@typescript-eslint/semi": "warn", + "curly": "warn", + "eqeqeq": "warn", + "no-throw-literal": "warn", + "semi": "off" + }, + "ignorePatterns": [ + "out", + "dist", + "**/*.d.ts" + ] +} \ No newline at end of file diff --git a/support/vs-code/agnosis/.gitignore b/support/vs-code/agnosis/.gitignore new file mode 100644 index 000000000..0b60dfa12 --- /dev/null +++ b/support/vs-code/agnosis/.gitignore @@ -0,0 +1,5 @@ +out +dist +node_modules +.vscode-test/ +*.vsix diff --git a/support/vs-code/agnosis/.vscode-test.mjs b/support/vs-code/agnosis/.vscode-test.mjs new file mode 100644 index 000000000..b62ba25f0 --- /dev/null +++ b/support/vs-code/agnosis/.vscode-test.mjs @@ -0,0 +1,5 @@ +import { defineConfig } from '@vscode/test-cli'; + +export default defineConfig({ + files: 'out/test/**/*.test.js', +}); diff --git a/support/vs-code/agnosis/.vscode/extensions.json b/support/vs-code/agnosis/.vscode/extensions.json new file mode 100644 index 000000000..db70f8889 --- /dev/null +++ b/support/vs-code/agnosis/.vscode/extensions.json @@ -0,0 +1,8 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "dbaeumer.vscode-eslint", + "ms-vscode.extension-test-runner" + ] +} diff --git a/support/vs-code/agnosis/.vscode/launch.json b/support/vs-code/agnosis/.vscode/launch.json new file mode 100644 index 000000000..b064923a8 --- /dev/null +++ b/support/vs-code/agnosis/.vscode/launch.json @@ -0,0 +1,22 @@ +// A launch configuration that compiles the extension and then opens it inside a new window +// Use IntelliSense to learn about possible attributes. +// Hover to view descriptions of existing attributes. +// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Run Extension", + "type": "extensionHost", + "request": "launch", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}", + "--folder-uri=file:///home/tardis/Documents/example_expr_translator-main/translator" + ], + "outFiles": [ + "${workspaceFolder}/out/**/*.js" + ], + "preLaunchTask": "${defaultBuildTask}" + } + ] +} diff --git a/support/vs-code/agnosis/.vscode/settings.json b/support/vs-code/agnosis/.vscode/settings.json new file mode 100644 index 000000000..30bf8c2d3 --- /dev/null +++ b/support/vs-code/agnosis/.vscode/settings.json @@ -0,0 +1,11 @@ +// Place your settings in this file to overwrite default and user settings. +{ + "files.exclude": { + "out": false // set this to true to hide the "out" folder with the compiled JS files + }, + "search.exclude": { + "out": true // set this to false to include "out" folder in search results + }, + // Turn off tsc task auto detection since we have the necessary tasks as npm scripts + "typescript.tsc.autoDetect": "off" +} \ No newline at end of file diff --git a/support/vs-code/agnosis/.vscode/tasks.json b/support/vs-code/agnosis/.vscode/tasks.json new file mode 100644 index 000000000..3b17e53b6 --- /dev/null +++ b/support/vs-code/agnosis/.vscode/tasks.json @@ -0,0 +1,20 @@ +// See https://go.microsoft.com/fwlink/?LinkId=733558 +// for the documentation about the tasks.json format +{ + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "watch", + "problemMatcher": "$tsc-watch", + "isBackground": true, + "presentation": { + "reveal": "never" + }, + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} diff --git a/support/vs-code/agnosis/.vscodeignore b/support/vs-code/agnosis/.vscodeignore new file mode 100644 index 000000000..72aa0fe2e --- /dev/null +++ b/support/vs-code/agnosis/.vscodeignore @@ -0,0 +1,11 @@ +.vscode/** +.vscode-test/** +src/** +.gitignore +.yarnrc +vsc-extension-quickstart.md +**/tsconfig.json +**/.eslintrc.json +**/*.map +**/*.ts +**/.vscode-test.* diff --git a/support/vs-code/agnosis/CHANGELOG.md b/support/vs-code/agnosis/CHANGELOG.md new file mode 100644 index 000000000..05d1b64fc --- /dev/null +++ b/support/vs-code/agnosis/CHANGELOG.md @@ -0,0 +1,9 @@ +# Change Log + +All notable changes to the "agnosis" extension will be documented in this file. + +Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. + +## [Unreleased] + +- Initial release \ No newline at end of file diff --git a/support/vs-code/agnosis/README.md b/support/vs-code/agnosis/README.md new file mode 100644 index 000000000..d0b5417bf --- /dev/null +++ b/support/vs-code/agnosis/README.md @@ -0,0 +1,71 @@ +# agnosis README + +This is the README for your extension "agnosis". After writing up a brief description, we recommend including the following sections. + +## Features + +Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. + +For example if there is an image subfolder under your extension project workspace: + +\!\[feature X\]\(images/feature-x.png\) + +> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. + +## Requirements + +If you have any requirements or dependencies, add a section describing those and how to install and configure them. + +## Extension Settings + +Include if your extension adds any VS Code settings through the `contributes.configuration` extension point. + +For example: + +This extension contributes the following settings: + +* `myExtension.enable`: Enable/disable this extension. +* `myExtension.thing`: Set to `blah` to do something. + +## Known Issues + +Calling out known issues can help limit users opening duplicate issues against your extension. + +## Release Notes + +Users appreciate release notes as you update your extension. + +### 1.0.0 + +Initial release of ... + +### 1.0.1 + +Fixed issue #. + +### 1.1.0 + +Added features X, Y, and Z. + +--- + +## Following extension guidelines + +Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension. + +* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines) + +## Working with Markdown + +You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: + +* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux). +* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux). +* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets. + +## For more information + +* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) +* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) + +**Enjoy!** diff --git a/support/vs-code/agnosis/package-lock.json b/support/vs-code/agnosis/package-lock.json new file mode 100644 index 000000000..0f3ea9373 --- /dev/null +++ b/support/vs-code/agnosis/package-lock.json @@ -0,0 +1,3030 @@ +{ + "name": "agnosis", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "agnosis", + "version": "0.0.1", + "devDependencies": { + "@types/mocha": "^10.0.6", + "@types/node": "18.x", + "@types/vscode": "^1.88.0", + "@typescript-eslint/eslint-plugin": "^7.0.2", + "@typescript-eslint/parser": "^7.0.2", + "@vscode/test-cli": "^0.0.6", + "@vscode/test-electron": "^2.3.9", + "eslint": "^8.56.0", + "typescript": "^5.3.3" + }, + "engines": { + "vscode": "^1.88.0" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "dev": true + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/mocha": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", + "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", + "dev": true + }, + "node_modules/@types/node": { + "version": "18.19.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.31.tgz", + "integrity": "sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, + "node_modules/@types/vscode": { + "version": "1.88.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.88.0.tgz", + "integrity": "sha512-rWY+Bs6j/f1lvr8jqZTyp5arRMfovdxolcqGi+//+cPDOh8SBvzXH90e7BiSXct5HJ9HGW6jATchbRTpTJpEkw==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz", + "integrity": "sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.7.1", + "@typescript-eslint/type-utils": "7.7.1", + "@typescript-eslint/utils": "7.7.1", + "@typescript-eslint/visitor-keys": "7.7.1", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.1.tgz", + "integrity": "sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "7.7.1", + "@typescript-eslint/types": "7.7.1", + "@typescript-eslint/typescript-estree": "7.7.1", + "@typescript-eslint/visitor-keys": "7.7.1", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz", + "integrity": "sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.7.1", + "@typescript-eslint/visitor-keys": "7.7.1" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz", + "integrity": "sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "7.7.1", + "@typescript-eslint/utils": "7.7.1", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.1.tgz", + "integrity": "sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==", + "dev": true, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz", + "integrity": "sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.7.1", + "@typescript-eslint/visitor-keys": "7.7.1", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.1.tgz", + "integrity": "sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.15", + "@types/semver": "^7.5.8", + "@typescript-eslint/scope-manager": "7.7.1", + "@typescript-eslint/types": "7.7.1", + "@typescript-eslint/typescript-estree": "7.7.1", + "semver": "^7.6.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz", + "integrity": "sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.7.1", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "node_modules/@vscode/test-cli": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@vscode/test-cli/-/test-cli-0.0.6.tgz", + "integrity": "sha512-4i61OUv5PQr3GxhHOuUgHdgBDfIO/kXTPCsEyFiMaY4SOqQTgkTmyZLagHehjOgCfsXdcrJa3zgQ7zoc+Dh6hQ==", + "dev": true, + "dependencies": { + "@types/mocha": "^10.0.2", + "c8": "^9.1.0", + "chokidar": "^3.5.3", + "enhanced-resolve": "^5.15.0", + "glob": "^10.3.10", + "minimatch": "^9.0.3", + "mocha": "^10.2.0", + "supports-color": "^9.4.0", + "yargs": "^17.7.2" + }, + "bin": { + "vscode-test": "out/bin.mjs" + } + }, + "node_modules/@vscode/test-electron": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.9.tgz", + "integrity": "sha512-z3eiChaCQXMqBnk2aHHSEkobmC2VRalFQN0ApOAtydL172zXGxTwGrRtviT5HnUB+Q+G3vtEYFtuQkYqBzYgMA==", + "dev": true, + "dependencies": { + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "jszip": "^3.10.1", + "semver": "^7.5.2" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/c8": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", + "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^3.1.1", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" + }, + "bin": { + "c8": "bin/c8.js" + }, + "engines": { + "node": ">=14.14.0" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/enhanced-resolve": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", + "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "10.3.12", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", + "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.6", + "minimatch": "^9.0.1", + "minipass": "^7.0.4", + "path-scurry": "^1.10.2" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "dependencies": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "dev": true + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "dev": true, + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dev": true, + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lru-cache": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.1.tgz", + "integrity": "sha512-tS24spDe/zXhWbNPErCHs/AGOzbKGHT+ybSBqmdLm8WZ1xXLWvH8Qn71QPAlqVhd0qUTWjy+Kl9JmISgDdEjsA==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mocha": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", + "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", + "dev": true, + "dependencies": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "8.1.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/mocha/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/mocha/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/mocha/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mocha/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/mocha/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/mocha/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", + "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "dev": true + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", + "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/support/vs-code/agnosis/package.json b/support/vs-code/agnosis/package.json new file mode 100644 index 000000000..3b587dfde --- /dev/null +++ b/support/vs-code/agnosis/package.json @@ -0,0 +1,65 @@ +{ + "name": "agnosis", + "displayName": "model_1", + "description": "a vscode extension for silver debugger", + "version": "0.0.1", + "engines": { + "vscode": "^1.87.0" + }, + "categories": [ + "Debuggers" + ], + "activationEvents": [], + "main": "./out/extension.js", + "contributes": { + "commands": [ + { + "command": "agnosis.helloWorld", + "title": "Hello World" + }, + { + "command": "agnosis.launchSilver", + "title": "Launch Silver" + }, + { + "command": "agnosis.RunSilver", + "title": "RunSilver" + }, + { + "command": "agnosis.RunCompile", + "title": "RunCompile" + }, + { + "command": "agnosis.HighlightSilver", + "title": "HighlightSilver" + }, + { + "command": "agnosis.showAttributeValuesHtml", + "title": "showAttributeValuesHtml" + }, + { + "command": "agnosis.showSimpleDebugContext", + "title": "showSimpleDebugContext" + } + ] + }, + "scripts": { + "vscode:prepublish": "npm run compile", + "compile": "tsc -p ./", + "watch": "tsc -watch -p ./", + "pretest": "npm run compile && npm run lint", + "lint": "eslint src --ext ts", + "test": "vscode-test" + }, + "devDependencies": { + "@types/vscode": "^1.87.0", + "@types/mocha": "^10.0.6", + "@types/node": "18.x", + "@typescript-eslint/eslint-plugin": "^7.0.2", + "@typescript-eslint/parser": "^7.0.2", + "eslint": "^8.56.0", + "typescript": "^5.3.3", + "@vscode/test-cli": "^0.0.6", + "@vscode/test-electron": "^2.3.9" + } +} diff --git a/support/vs-code/agnosis/src/extension.ts b/support/vs-code/agnosis/src/extension.ts new file mode 100644 index 000000000..7554fe682 --- /dev/null +++ b/support/vs-code/agnosis/src/extension.ts @@ -0,0 +1,227 @@ +// The module 'vscode' contains the VS Code extensibility API +// Import the module and reference it with the alias vscode in your code below +import * as vscode from 'vscode'; +import { WorkspaceFolder, DebugConfiguration, ProviderResult, CancellationToken } from 'vscode'; +import * as fs from 'fs'; +import * as path from 'path'; +import * as net from 'net'; + +let server: net.Server; + +// This method is called when your extension is activated +// Your extension is activated the very first time the command is executed +export function activate(context: vscode.ExtensionContext) { + + // Use the console to output diagnostic information (console.log) and errors (console.error) + // This line of code will only be executed once when your extension is activated + console.log('Congratulations, your extension "agnosis" is now active! And silver is on!'); + const terminal = vscode.window.createTerminal('Silver'); + // pop out the new terminal + terminal.show(); + // listen to port 24352 + + + + + let currentPath = vscode.workspace.workspaceFolders?.[0].uri.path || ''; + let current_path_split = currentPath.split('/'); + + + + // read the .debugger_communicator.json file, into a dictionary, it's under workspace folder + + // The command has been defined in the package.json file + // Now provide the implementation of the command with registerCommand + // The commandId parameter must match the command field in package.json + let disposable = vscode.commands.registerCommand('agnosis.helloWorld', () => { + // The code you place here will be executed every time your command is executed + // Display a message box to the user + vscode.window.showInformationMessage('hheeeeeeeeeelo'); + }); + + let launchSilver_dispoable = vscode.commands.registerCommand('agnosis.launchSilver', () => { + vscode.window.showInformationMessage('Launching Silver...'); + // run the command of silver in terminal + terminal.show(); + vscode.window.showInformationMessage(currentPath); + + }); + let run_compiler = vscode.commands.registerCommand('agnosis.RunCompile', () => { + vscode.window.showInformationMessage('Running Compiler...'); + terminal.sendText(`./silver-compile --force-origins --clean`); + }); + + + let run_traslator = vscode.commands.registerCommand('agnosis.RunSilver', () => { + vscode.window.showInformationMessage('Running Translator...'); + // terminal.sendText(`./silver-compile --force-origins --clean`); + // get current open tab file name + let working_file = vscode.window.activeTextEditor?.document.fileName || ''; + let working_file_split = working_file.split('/'); + working_file = working_file_split[working_file_split.length - 1]; + let direct_folder = current_path_split[current_path_split.length - 1]; + + vscode.window.showInformationMessage(working_file); + terminal.sendText(`java -jar ${direct_folder}.jar ${working_file}`); + }); + + + let HighlightSilver = vscode.commands.registerCommand('agnosis.HighlightSilver', () => { + let currentPath = vscode.workspace.workspaceFolders ? vscode.workspace.workspaceFolders[0].uri.fsPath : ''; + let debugger_communicator_path = path.join(currentPath, '.debugger_communicator.json'); + + interface FileHighlightInfo { + file_path: string; + line_begin: number; + line_end: number; + } + + fs.readFile(debugger_communicator_path, 'utf8', (err, data) => { + if (err) { + console.error(err); + return; + } + try { + let filesToHighlightDic: FileHighlightInfo = JSON.parse(data); + // if line_begin and line_end are the same value, make line_end + 1 + if (filesToHighlightDic.line_begin === filesToHighlightDic.line_end) { + filesToHighlightDic.line_end++; + } + + let viewColumn: vscode.ViewColumn; + + // Attempt to find an already opened document + const openedTextEditor = vscode.window.visibleTextEditors.find(editor => editor.document.uri.fsPath === filesToHighlightDic.file_path); + + if (openedTextEditor) { + // If the file is already open, use the existing view column + viewColumn = openedTextEditor.viewColumn ?? vscode.ViewColumn.One; + highlightRange(openedTextEditor, filesToHighlightDic); + } else { + // Determine view column if not already open + viewColumn = vscode.window.visibleTextEditors.length > 1 ? vscode.window.activeTextEditor?.viewColumn ?? vscode.ViewColumn.One : vscode.ViewColumn.Beside; + vscode.workspace.openTextDocument(filesToHighlightDic.file_path).then(doc => { + vscode.window.showTextDocument(doc, viewColumn).then(editor => { + highlightRange(editor, filesToHighlightDic); + }); + }); + } + } catch (parseErr) { + console.error('Error parsing JSON:', parseErr); + } + }); + + function highlightRange(editor: vscode.TextEditor, highlightInfo: FileHighlightInfo) { + editor.selection = new vscode.Selection( + new vscode.Position(highlightInfo.line_begin - 1, 0), + new vscode.Position(highlightInfo.line_end - 1, 0) + ); + editor.revealRange(editor.selection); + } + }); + + + + let attributeValuesPanel: vscode.WebviewPanel | undefined = undefined; + let simpleDebugContextPanel: vscode.WebviewPanel | undefined = undefined; + + const showAttributeValuesHtml = vscode.commands.registerCommand('agnosis.showAttributeValuesHtml', () => { + if (!attributeValuesPanel) { + attributeValuesPanel = vscode.window.createWebviewPanel( + 'attributeValues', + 'Attribute Values', + vscode.ViewColumn.One, + { enableScripts: true } + ); + + attributeValuesPanel.onDidDispose(() => { + attributeValuesPanel = undefined; + }); + } + + const updateAttributeValues = () => { + const filePath: string = vscode.workspace.workspaceFolders ? vscode.workspace.workspaceFolders[0].uri.fsPath : ''; + const htmlPath: string = path.join(filePath, 'attribute_values.html'); + const htmlContent: string = fs.readFileSync(htmlPath, 'utf8'); + if (attributeValuesPanel) { + attributeValuesPanel.webview.html = htmlContent; + } + }; + + updateAttributeValues(); + + const attributeWatcher: vscode.FileSystemWatcher = vscode.workspace.createFileSystemWatcher(new vscode.RelativePattern(vscode.workspace.workspaceFolders![0], 'attribute_values.html')); + attributeWatcher.onDidChange(updateAttributeValues); + attributeWatcher.onDidDelete(updateAttributeValues); + attributeWatcher.onDidCreate(updateAttributeValues); + }); + + const showSimpleDebugContext = vscode.commands.registerCommand('agnosis.showSimpleDebugContext', () => { + if (!simpleDebugContextPanel) { + simpleDebugContextPanel = vscode.window.createWebviewPanel( + 'simpleDebugContext', + 'Simple Debug Context', + vscode.ViewColumn.Two, // Optionally, place this in another column + { enableScripts: true } + ); + + simpleDebugContextPanel.onDidDispose(() => { + simpleDebugContextPanel = undefined; + }); + } + + const updateSimpleDebugContext = () => { + const filePath: string = vscode.workspace.workspaceFolders ? vscode.workspace.workspaceFolders[0].uri.fsPath : ''; + const htmlPath: string = path.join(filePath, 'simpleDebugContext.html'); + const htmlContent: string = fs.readFileSync(htmlPath, 'utf8'); + if (simpleDebugContextPanel) { + simpleDebugContextPanel.webview.html = htmlContent; + } + }; + + updateSimpleDebugContext(); + + const simpleDebugWatcher: vscode.FileSystemWatcher = vscode.workspace.createFileSystemWatcher(new vscode.RelativePattern(vscode.workspace.workspaceFolders![0], 'simpleDebugContext.html')); + simpleDebugWatcher.onDidChange(updateSimpleDebugContext); + simpleDebugWatcher.onDidDelete(updateSimpleDebugContext); + simpleDebugWatcher.onDidCreate(updateSimpleDebugContext); + }); + + + + + const server = net.createServer(socket => { + socket.on('data', data => { + let message = data.toString().trim(); + if (message === '1') { + vscode.commands.executeCommand('agnosis.HighlightSilver'); + // run showAttributeValuesHtml + vscode.commands.executeCommand('agnosis.showAttributeValuesHtml'); + vscode.commands.executeCommand('agnosis.showSimpleDebugContext'); + } + }); + }); + + server.listen(19387, '127.0.0.1', () => { + console.log('Server listening on port 19387'); + }); + + + + context.subscriptions.push(showAttributeValuesHtml); + context.subscriptions.push(showSimpleDebugContext); + context.subscriptions.push(disposable); + context.subscriptions.push(launchSilver_dispoable); + context.subscriptions.push(run_traslator); + context.subscriptions.push(run_compiler); + context.subscriptions.push(HighlightSilver); + context.subscriptions.push({ dispose: () => server.close() }); +} + +// This method is called when your extension is deactivated +export function deactivate() { + if (server) { + server.close(); + } + +} diff --git a/support/vs-code/agnosis/src/test/extension.test.ts b/support/vs-code/agnosis/src/test/extension.test.ts new file mode 100644 index 000000000..4ca0ab419 --- /dev/null +++ b/support/vs-code/agnosis/src/test/extension.test.ts @@ -0,0 +1,15 @@ +import * as assert from 'assert'; + +// You can import and use all API from the 'vscode' module +// as well as import your extension to test it +import * as vscode from 'vscode'; +// import * as myExtension from '../../extension'; + +suite('Extension Test Suite', () => { + vscode.window.showInformationMessage('Start all tests.'); + + test('Sample test', () => { + assert.strictEqual(-1, [1, 2, 3].indexOf(5)); + assert.strictEqual(-1, [1, 2, 3].indexOf(0)); + }); +}); diff --git a/support/vs-code/agnosis/tsconfig.json b/support/vs-code/agnosis/tsconfig.json new file mode 100644 index 000000000..6954702e0 --- /dev/null +++ b/support/vs-code/agnosis/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "module": "Node16", + "target": "ES2022", + "outDir": "out", + "lib": [ + "ES2022" + ], + "sourceMap": true, + "rootDir": "src", + "strict": true /* enable all strict type-checking options */ + /* Additional Checks */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + } +} diff --git a/support/vs-code/agnosis/vsc-extension-quickstart.md b/support/vs-code/agnosis/vsc-extension-quickstart.md new file mode 100644 index 000000000..3d8ce067d --- /dev/null +++ b/support/vs-code/agnosis/vsc-extension-quickstart.md @@ -0,0 +1,43 @@ +# Welcome to your VS Code Extension + +## What's in the folder + +* This folder contains all of the files necessary for your extension. +* `package.json` - this is the manifest file in which you declare your extension and command. + * The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesn’t yet need to load the plugin. +* `src/extension.ts` - this is the main file where you will provide the implementation of your command. + * The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`. + * We pass the function containing the implementation of the command as the second parameter to `registerCommand`. + +## Get up and running straight away + +* Press `F5` to open a new window with your extension loaded. +* Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`. +* Set breakpoints in your code inside `src/extension.ts` to debug your extension. +* Find output from your extension in the debug console. + +## Make changes + +* You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`. +* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. + +## Explore the API + +* You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`. + +## Run tests + +* Install the [Extension Test Runner](https://marketplace.visualstudio.com/items?itemName=ms-vscode.extension-test-runner) +* Run the "watch" task via the **Tasks: Run Task** command. Make sure this is running, or tests might not be discovered. +* Open the Testing view from the activity bar and click the Run Test" button, or use the hotkey `Ctrl/Cmd + ; A` +* See the output of the test result in the Test Results view. +* Make changes to `src/test/extension.test.ts` or create new test files inside the `test` folder. + * The provided test runner will only consider files matching the name pattern `**.test.ts`. + * You can create folders inside the `test` folder to structure your tests any way you want. + +## Go further + +* [Follow UX guidelines](https://code.visualstudio.com/api/ux-guidelines/overview) to create extensions that seamlessly integrate with VS Code's native interface and patterns. + * Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension). + * [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VS Code extension marketplace. + * Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration).