Package org.openrewrite.javascript.rpc
Class JavaScriptRewriteRpc
java.lang.Object
org.openrewrite.rpc.RewriteRpc
org.openrewrite.javascript.rpc.JavaScriptRewriteRpc
public class JavaScriptRewriteRpc
extends org.openrewrite.rpc.RewriteRpc
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic JavaScriptRewriteRpc.Builderbuilder()static @Nullable JavaScriptRewriteRpcget()static JavaScriptRewriteRpcinstallRecipes(File recipes) installRecipes(String packageName) installRecipes(String packageName, @Nullable String version) 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.Stream<org.openrewrite.SourceFile> parseProject(Path projectPath, @Nullable List<String> exclusions, org.openrewrite.ExecutionContext ctx) Parses an entire JavaScript/TypeScript project directory.Stream<org.openrewrite.SourceFile> parseProject(Path projectPath, org.openrewrite.ExecutionContext ctx) Parses an entire JavaScript/TypeScript project directory.static voidsetFactory(JavaScriptRewriteRpc.Builder builder) voidshutdown()static voidMethods inherited from class org.openrewrite.rpc.RewriteRpc
batchSize, generate, getLanguages, getMarketplace, getObject, livenessCheck, log, parse, prepareRecipe, prepareRecipe, print, print, print, print, send, timeout, traceGetObject, visit, visit
-
Method Details
-
get
-
getOrStart
-
setFactory
-
shutdown
public void shutdown()- Overrides:
shutdownin classorg.openrewrite.rpc.RewriteRpc
-
shutdownCurrent
public static void shutdownCurrent() -
installRecipes
-
installRecipes
-
installRecipes
-
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 parsectx- 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 parseexclusions- Optional glob patterns to exclude from parsingctx- 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 parseexclusions- Optional glob patterns to exclude from parsingrelativeTo- 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
-