Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Rooster212/event-driven-dynamodb-rules-engine
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.2.0
Choose a base ref
...
head repository: Rooster212/event-driven-dynamodb-rules-engine
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Aug 2, 2022

  1. Copy the full SHA
    0698d7f View commit details
  2. Copy the full SHA
    957f93e View commit details
  3. bump version number

    Rooster212 committed Aug 2, 2022
    Copy the full SHA
    8acf436 View commit details
  4. Merge pull request #4 from Rooster212/update-readme-and-use-package-lock

    Update README, use package-lock.json
    Rooster212 authored Aug 2, 2022
    Copy the full SHA
    e9c10c9 View commit details

Commits on Aug 17, 2022

  1. Copy the full SHA
    6fe6348 View commit details

Commits on Aug 18, 2022

  1. Copy the full SHA
    38f5dc3 View commit details
  2. Copy the full SHA
    a4ea449 View commit details
  3. Copy the full SHA
    e7aa8d4 View commit details

Commits on Aug 19, 2022

  1. Copy the full SHA
    7fab69f View commit details
  2. Copy the full SHA
    cb649a6 View commit details
  3. Copy the full SHA
    89b7c08 View commit details
  4. Copy the full SHA
    1c5abcd View commit details
  5. Update some comments

    Rooster212 committed Aug 19, 2022
    Copy the full SHA
    8793b81 View commit details
  6. Copy the full SHA
    0c0c2a7 View commit details
  7. Merge pull request #5 from Rooster212/secondary-indexing

    Add secondary indexing via partiton key support
    Rooster212 authored Aug 19, 2022
    Copy the full SHA
    95ff802 View commit details
  8. Copy the full SHA
    553ff49 View commit details
  9. Copy the full SHA
    b2f06b9 View commit details
  10. Merge pull request #6 from Rooster212/fix-exports-for-release

    Fix exports in index.ts for packaging, and add a dry-run publish to test
    Rooster212 authored Aug 19, 2022
    Copy the full SHA
    90f67f3 View commit details

Commits on Aug 22, 2022

  1. Copy the full SHA
    c86f619 View commit details
  2. Copy the full SHA
    417fed6 View commit details
  3. Copy the full SHA
    30bebe6 View commit details
  4. Merge pull request #7 from Rooster212/update-stream-lambda-construct

    Update stream Lambda to be declared via a CDK construct
    Rooster212 authored Aug 22, 2022
    Copy the full SHA
    3356ea1 View commit details
  5. rename construct

    Rooster212 committed Aug 22, 2022
    Copy the full SHA
    d3aa197 View commit details
  6. export construct

    Rooster212 committed Aug 22, 2022
    Copy the full SHA
    bb8b719 View commit details

Commits on Sep 7, 2022

  1. Copy the full SHA
    d1d153d View commit details
  2. Update version number

    Rooster212 committed Sep 7, 2022
    Copy the full SHA
    efa6652 View commit details
  3. Merge pull request #8 from Rooster212/update-stream-lambda

    Update stream lambda to work with changed item layout
    Rooster212 authored Sep 7, 2022
    Copy the full SHA
    06b0880 View commit details

Commits on Feb 27, 2023

  1. Copy the full SHA
    b0a305a View commit details
  2. update patch version

    Rooster212 committed Feb 27, 2023
    Copy the full SHA
    7bb0615 View commit details
  3. Merge pull request #9 from Rooster212/update-cdk-2.66.1

    Update CDK to 2.66.1 and SDK versions to 3.278.0
    Rooster212 authored Feb 27, 2023
    Copy the full SHA
    424aab4 View commit details

Commits on Aug 31, 2023

  1. Copy the full SHA
    0b3cab5 View commit details
  2. Merge pull request #10 from Rooster212/update-aws-sdk-3-398

    Update AWS SDK/CDK versions and run npm audit fix
    Rooster212 authored Aug 31, 2023
    Copy the full SHA
    96db093 View commit details

Commits on May 16, 2024

  1. Copy the full SHA
    3232940 View commit details
  2. Copy the full SHA
    183937b View commit details
  3. Copy the full SHA
    10f5703 View commit details
  4. Copy the full SHA
    bc5d5d6 View commit details

Commits on Oct 28, 2024

  1. update cdk package

    johnnezzi committed Oct 28, 2024
    Copy the full SHA
    76f9ca4 View commit details

Commits on Nov 11, 2024

  1. Merge pull request #11 from ClearCycle-UK/master

    Update CDK package
    Rooster212 authored Nov 11, 2024
    Copy the full SHA
    a8d0059 View commit details
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -11,18 +11,18 @@ jobs:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@rooster212'
node-version: 20
registry-url: "https://npm.pkg.github.com"
scope: "@rooster212"
- name: Install packages
run: npm ci
- name: Publish package
run: |
chmod +x ./publish.sh
./publish.sh
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 6 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -16,13 +16,15 @@ jobs:
- "8000:8000"
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
node-version: 20
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test
- name: Dry run a publish
run: ./publish.sh dry-run
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,14 +2,29 @@

A library for building event sourced database systems with DynamoDB.

There are examples in the `examples` folder - this
There are examples in the `examples` folder - to run the tests successfully you should run `npm run dynamodb` first, which will run DynamoDB locally in Docker.

## Original Documentation

Forked from original implementation here: https://github.com/a-h/hde. Many thanks to Adrian.

See blog posts:

* https://adrianhesketh.com/2020/08/28/event-sourced-dynamodb-design-with-typescript-part-1/
* https://adrianhesketh.com/2020/08/28/event-sourced-dynamodb-design-with-typescript-part-2/
- https://adrianhesketh.com/2020/08/28/event-sourced-dynamodb-design-with-typescript-part-1/
- https://adrianhesketh.com/2020/08/28/event-sourced-dynamodb-design-with-typescript-part-2/

## Using a package from the GitHub Package registry for NPM

There is full documentation [on the GitHub website here](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#installing-a-package). Using the package hosted on GitHub requires setting up an `.npmrc` file for the project's scope in the consuming project that looks like this:

```bash
@rooster212:registry=https://npm.pkg.github.com
```

You also have to login to the GitHub package registry (as this is a public package, it should work for anyone).

```bash
npm login --scope=@rooster212 --registry=https://npm.pkg.github.com
```

If you use MFA on your GitHub account, you will need to setup a Personal Access Token in your profile settings and use that in place of your password when prompted in the `npm login` step.
23 changes: 9 additions & 14 deletions examples/cdk/cdk.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Stack, StackProps } from "aws-cdk-lib";
import { AttributeType, BillingMode, StreamViewType, Table } from "aws-cdk-lib/aws-dynamodb";
import { EventBus, Rule } from "aws-cdk-lib/aws-events";
import { Runtime, StartingPosition } from "aws-cdk-lib/aws-lambda";
import { StartingPosition } from "aws-cdk-lib/aws-lambda";
import { DynamoEventSource } from "aws-cdk-lib/aws-lambda-event-sources";
import { NodejsFunction } from "aws-cdk-lib/aws-lambda-nodejs";
import { RetentionDays } from "aws-cdk-lib/aws-logs";
import { Construct } from "constructs";
import { DynamoDBStreamEventHandler } from "../../stream/dynamoDBStreamEventHandler";

export class ExampleDynamoDBEventDrivenArchitectureStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
@@ -27,18 +26,14 @@ export class ExampleDynamoDBEventDrivenArchitectureStack extends Stack {

const eventBus = new EventBus(this, "example-event-bus");

const dynamoDBStreamHandler = new NodejsFunction(this, "example-dynamodb-stream-handler", {
logRetention: RetentionDays.ONE_WEEK,
entry: "./examples/cdk/myDynamoDBStreamEventHandler.ts",
runtime: Runtime.NODEJS_16_X,
functionName: "my-dynamodb-stream-handler",
bundling: {
sourceMap: true,
const dynamoDBStreamHandler = new DynamoDBStreamEventHandler(
this,
"example-clear-cycle-dynamodb-stream-event-handler",
{
eventSource: "my-event-source",
targetEventBus: eventBus,
},
});

// This allows the stream handler to write to the event bus
eventBus.grantPutEventsTo(dynamoDBStreamHandler);
);

// Note how the stream handler is not given direct access to the DynamoDB table

3 changes: 0 additions & 3 deletions examples/cdk/myDynamoDBStreamEventHandler.ts

This file was deleted.

5 changes: 0 additions & 5 deletions examples/duplicate-message-handling/create-table.sh

This file was deleted.

239 changes: 0 additions & 239 deletions examples/duplicate-message-handling/index.ts

This file was deleted.

Loading