Package org.openrewrite.python.internal
Class LockFileRegeneration
java.lang.Object
org.openrewrite.python.internal.LockFileRegeneration
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LockFileRegenerationstatic final LockFileRegeneration -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable LockFileRegenerationforPackageManager(@Nullable PythonResolutionResult.PackageManager pm) regenerate(String dependenciesContent) regenerate(String dependenciesContent, @Nullable String existingLockContent) regenerate(String dependenciesContent, @Nullable String existingLockContent, Map<String, String> environment) Regenerate the lock file from the given dependencies content.
-
Field Details
-
UV
-
PIPENV
-
-
Method Details
-
forPackageManager
public static @Nullable LockFileRegeneration forPackageManager(@Nullable PythonResolutionResult.PackageManager pm) -
regenerate
-
regenerate
public LockFileRegeneration.Result regenerate(String dependenciesContent, @Nullable String existingLockContent) -
regenerate
public LockFileRegeneration.Result regenerate(String dependenciesContent, @Nullable String existingLockContent, Map<String, String> environment) Regenerate the lock file from the given dependencies content. When an existing lock file is provided it is seeded into the working directory so the package manager performs a minimal update rather than re-resolving every dependency from scratch.- Parameters:
dependenciesContent- the dependencies-file content to lockexistingLockContent- the current lock file content, ornullenvironment- additional environment variables (e.g., SSL_CERT_FILE)- Returns:
- a result containing the new lock file content, or an error message
-