Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
parrot-core
Advanced tools
parrot-core abstracts the matching, logging, and resolving functionality of Parrot away from each implementation. parrot-middleware and parrot-fetch use parrot-core and any new implementations could extend parrot-core in a similar way.
import Parrot from 'parrot-core';
class ParrotNew extends Parrot {
constructor(scenarios) {
super(scenarios);
// any constructor logic that is needed
}
normalizeRequest = (request) => {
// conform incoming requests to match the scenarios structure
}
resolver = (request) => (response) => {
// resolve the matched response to the implementation platform
}
}
export default ParrotNew;
parrot-core also defines several methods that can be used to interact with the scenarios that are passed in.
getActiveScenario()
Returns the name of the currently active scenario.
setActiveScenario(name)
Sets the currently active scenario.
name
(String): Scenario name.getScenarios()
Returns an array of scenario objects.
setScenarios(scenarios)
Sets scenarios
as the array of available scenarios.
scenarios
(Array or Object): Scenarios descriptor.getScenario(name)
Returns the scenario object with matching name
.
name
(String): Scenario name.setScenario(name, mocks)
Sets the mocks for scenario with matching name
.
name
(String): Scenario name.mocks
(Array): Array of mock objects.getMock(name, index)
Returns the mock at index
for scenario with matching name
.
name
(String): Scenario name.index
(Number): Mock index.setMock(name, index, mock)
Sets the mock at index
for scenario with matching name
.
name
(String): Scenario name.index
(Number): Mock index.mock
(Object): Mock object.FAQs
Common Parrot functionality.
The npm package parrot-core receives a total of 410 weekly downloads. As such, parrot-core popularity was classified as not popular.
We found that parrot-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.