This repository has been archived by the owner on Dec 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25bbbae
commit a3a3dfd
Showing
4 changed files
with
76 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { extend, extract } from '../../../src/index.js' | ||
|
||
export default [extend('presets/base/typescript-cdk'), extract()] |
25 changes: 25 additions & 0 deletions
25
presets/library/event-bus-message-form/templates/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<p align="center"> | ||
<a href="https://buttonize.io"> | ||
<img width="350" alt="Buttonize.io" src="https://user-images.githubusercontent.com/6282843/212024942-9fd50774-ea26-48ba-b2cf-ca2584498c9a.png"> | ||
</a> | ||
</p> | ||
|
||
--- | ||
|
||
## Event Bus Message Form | ||
|
||
[![Event Bus Message Form](https://github.com/buttonize/create-buttonize/assets/6282843/7ea788b0-1c93-4e2c-8a26-9ba74f8af16b)](https://buttonize.io/library/event-bus-message-form) | ||
|
||
Learn more about Event Bus Message Form Construct [here](https://buttonize.io/library/event-bus-message-form). | ||
|
||
## CDK | ||
|
||
The `cdk.json` file tells the CDK Toolkit how to execute your app. | ||
|
||
### Useful commands | ||
|
||
* `npm run build` compile typescript to js | ||
* `npm run watch` watch for changes and compile | ||
* `npx cdk deploy` deploy this stack to your default AWS account/region | ||
* `npx cdk diff` compare deployed stack with current state | ||
* `npx cdk synth` emits the synthesized CloudFormation template |
48 changes: 48 additions & 0 deletions
48
presets/library/event-bus-message-form/templates/lib/example-stack.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import * as cdk from 'aws-cdk-lib' | ||
import { Buttonize, Input } from 'buttonize/cdk' | ||
import { EventBusMessageForm } from 'buttonize/library' | ||
import { Construct } from 'constructs' | ||
|
||
export class ExampleStack extends cdk.Stack { | ||
constructor(scope: Construct, id: string, props?: cdk.StackProps) { | ||
super(scope, id, props) | ||
|
||
Buttonize.init(this, { | ||
apiKey: '@@apiKey' | ||
}) | ||
|
||
new EventBusMessageForm(this, 'EventBusMessageForm', { | ||
name: 'Product cache invalidation panel', | ||
description: | ||
'Trigger invalidation of a product in all the caches in the in the company systems', | ||
submitButtonLabel: 'Invalidate', | ||
|
||
fields: [ | ||
Input.text({ | ||
id: 'id', | ||
label: 'Product ID' | ||
}), | ||
Input.select({ | ||
id: 'reason', | ||
label: 'Reason', | ||
options: [ | ||
{ label: 'New manual update', value: 'manual_update' }, | ||
{ label: 'System bug', value: 'bug' } | ||
] | ||
}) | ||
], | ||
|
||
source: 'product-service', | ||
detailType: 'create-invalidation', | ||
|
||
detail: { | ||
product: { | ||
pid: '{{id}}' | ||
}, | ||
metadata: { | ||
reasonStatement: '{{reason.value}}' | ||
} | ||
} | ||
}) | ||
} | ||
} |
15 changes: 0 additions & 15 deletions
15
presets/library/sns-topic-message-form/templates/src/discount-generator.ts
This file was deleted.
Oops, something went wrong.