
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@takeshape/vitest-docker-dynamodb
Advanced tools
Provides an easy way to start and stop docker-compose
projects with vitest
tests. Additional functionality to easily set up dynamodb table fixtures.
npm i @takeshape/vitest-docker-dynamodb -D
# or
yarn add @takeshape/vitest-docker-dynamodb -D
# or
pnpm add @takeshape/vitest-docker-dynamodb -D
globalSetup
in vitest.config.ts
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globalSetup: ['@takeshape/vitest-docker-dynamodb']
}
});
If you have a docker-compose.yml
file living beside your vitest.config.ts
file
you can simple run vitest
and it should be run on setup, and stopped on teardown.
If you want to configure dynamodb
, or do anything custom read along...
In your project root, create a config file, e.g., vitest-docker-dynamodb.json
with the docker-compose.yml
file location, or a configuration directly inline.
Optionally, add configuration for dynamodb.
{
"dynamodb": {
"basePort": 8099
},
"projectName": "my-vitest-container",
"config": {
"services": {
"dynamodb": {
"image": "amazon/dynamodb-local",
"environment": {
"_JAVA_OPTIONS": "-Xms512m -Xmx512m"
},
"ports": ["8099:8000"]
}
}
}
}
// vitest-docker-dynamodb.mjs
export default () => {
return {
dynamodb: {
basePort: 8000,
tables: [
{
TableName: 'table',
KeySchema: [{ AttributeName: 'id', KeyType: 'HASH' }],
AttributeDefinitions: [{ AttributeName: 'id', AttributeType: 'S' }],
ProvisionedThroughput: {
ReadCapacityUnits: 1,
WriteCapacityUnits: 1
}
}
]
}
};
};
const client = new DynamoDBClient({
...yourConfig,
...(process.env.MOCK_DYNAMODB_ENDPOINT && {
endpoint: process.env.MOCK_DYNAMODB_ENDPOINT,
region: 'local'
})
});
Check out the types here.
Check out the code here.
This project is deeply indebted to vitest-dynamodb-local. You'll see a lot of similarity in the code and
process, but swapping in docker-compose
for dynamo-db-local
.
FAQs
Bootstrap vitest tests with docker-compose and dynamodb.
The npm package @takeshape/vitest-docker-dynamodb receives a total of 15 weekly downloads. As such, @takeshape/vitest-docker-dynamodb popularity was classified as not popular.
We found that @takeshape/vitest-docker-dynamodb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.