Class JavaScriptRewriteRpc

java.lang.Object
org.openrewrite.rpc.RewriteRpc
org.openrewrite.javascript.rpc.JavaScriptRewriteRpc

public class JavaScriptRewriteRpc extends org.openrewrite.rpc.RewriteRpc
  • Method Details

    • get

      public static @Nullable JavaScriptRewriteRpc get()
    • getOrStart

      public static JavaScriptRewriteRpc getOrStart()
    • setFactory

      public static void setFactory(JavaScriptRewriteRpc.Builder builder)
    • shutdown

      public void shutdown()
      Overrides:
      shutdown in class org.openrewrite.rpc.RewriteRpc
    • shutdownCurrent

      public static void shutdownCurrent()
    • resetCurrent

      public static void resetCurrent()
    • installRecipes

      public InstallRecipesResponse installRecipes(File recipes)
    • installRecipes

      public InstallRecipesResponse installRecipes(String packageName)
    • installRecipes

      public InstallRecipesResponse installRecipes(String packageName, @Nullable String version)
    • parseProject

      public Stream<org.openrewrite.SourceFile> parseProject(Path projectPath, org.openrewrite.ExecutionContext ctx)
      Parses an entire JavaScript/TypeScript project directory. Discovers and parses all relevant source files, package.json files, and lock files.
      Parameters:
      projectPath - Path to the project directory to parse
      ctx - Execution context for parsing
      Returns:
      Stream of parsed source files
    • parseProject

      public Stream<org.openrewrite.SourceFile> parseProject(Path projectPath, @Nullable List<String> exclusions, org.openrewrite.ExecutionContext ctx)
      Parses an entire JavaScript/TypeScript project directory. Discovers and parses all relevant source files, package.json files, and lock files.
      Parameters:
      projectPath - Path to the project directory to parse
      exclusions - Optional glob patterns to exclude from parsing
      ctx - Execution context for parsing
      Returns:
      Stream of parsed source files
    • parseProject

      public Stream<org.openrewrite.SourceFile> parseProject(Path projectPath, @Nullable List<String> exclusions, @Nullable Path relativeTo, org.openrewrite.ExecutionContext ctx)
      Parses an entire JavaScript/TypeScript project directory. Discovers and parses all relevant source files, package.json files, and lock files.
      Parameters:
      projectPath - Path to the project directory to parse
      exclusions - Optional glob patterns to exclude from parsing
      relativeTo - Optional path to make source file paths relative to. If not specified, paths are relative to projectPath. Use this when parsing a subdirectory but wanting paths relative to the repository root.
      ctx - Execution context for parsing
      Returns:
      Stream of parsed source files
    • builder

      public static JavaScriptRewriteRpc.Builder builder()