Socket
Socket
Sign inDemoInstall

aws-cdk-dynamodb-seeder

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-cdk-dynamodb-seeder - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

lib/index.d.ts

8

package.json
{
"name": "aws-cdk-dynamodb-seeder",
"version": "1.0.0",
"version": "1.1.0",
"description": "A simple CDK JSON seeder for DynamoDB",

@@ -17,4 +17,4 @@ "scripts": {

},
"main": "lib/seeder.js",
"types": "lib/seeder.d.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"repository": {

@@ -29,3 +29,3 @@ "type": "git",

"seed",
"json"
"seeder"
],

@@ -32,0 +32,0 @@ "author": "Justin Taylor <jtaylor@elegantdevelopment.co.uk> (https://www.linkedin.com/in/jsdtaylor)",

# aws-cdk-dynamodb-seeder
![Node.js CI](https://github.com/elegantdevelopment/aws-cdk-dynamodb-seeder/workflows/Node.js%20CI/badge.svg)
[![npm version](https://badge.fury.io/js/aws-cdk-dynamodb-seeder.svg)](https://badge.fury.io/js/aws-cdk-dynamodb-seeder)
![npm](https://img.shields.io/npm/dt/aws-cdk-dynamodb-seeder)

@@ -17,11 +19,23 @@ A simple CDK JSON seeder for DynamoDB

Install using your favourite package manager:
```sh
yarn add aws-cdk-dynamodb-seeder
```
### Example usage
```ts
new Seeder(stack, 'MySeeder', {
table: new Table(stack, 'MyTable', {
tableName: 'MyTable',
partitionKey: { name: 'Id', type: AttributeType.STRING },
}),
tableName: "TestTable",
json: require("./my-seed-data.json")
import { Seeder } from 'aws-cdk-dynamodb-seeder';
...
const myTable = new Table(stack, "MyTable", {
tableName: "MyTable",
partitionKey: { name: "Id", type: AttributeType.STRING },
});
...
new Seeder(stack, "MySeeder", {
table: myTable,
tableName: "MyTable",
setup: require("./my-seed-data.json")
});
```

@@ -31,7 +45,6 @@

Seed data is imported via a JSON file and can either be a single object or an array of objects.
Seed data is imported/deleted via an arrays of objects.
Just remember that the objects _must_ match your table's key definitions.
Just remember that the objects *must* match your table's key definitions.
[AWS CDK]: https://aws.amazon.com/cdk
[Amazon DynamoDB]: https://aws.amazon.com/dynamodb
[aws cdk]: https://aws.amazon.com/cdk
[amazon dynamodb]: https://aws.amazon.com/dynamodb
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc