Skip to main contentModule detect
Source - ScriptSetupStatus
- Status of setup script configuration (both postinstall and dependencies).
- PackageManager
- Package manager type for selecting the correct command prefix.
- generate_updated_script
- Generate an updated script that includes the socket-patch apply command.
If already configured, returns unchanged. Otherwise prepends the command.
- is_setup_configured
- Check if package.json scripts are properly configured for socket-patch.
Checks both the postinstall and dependencies lifecycle scripts.
- is_setup_configured_str
- Check if a package.json content string is properly configured.
- update_package_json_content
- Parse package.json content and update it with socket-patch scripts.
Returns (modified, new_content, old_postinstall, new_postinstall,
old_dependencies, new_dependencies).
- update_package_json_object
- Update a package.json Value with socket-patch in both postinstall and
dependencies scripts.
Returns (modified, new_postinstall, new_dependencies).