Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions all-in-one/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.swc/
cdk.out/
node_modules/
3 changes: 3 additions & 0 deletions all-in-one/cdk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"app": "node -r 'functionless/register' ./src/app.ts"
}
35 changes: 35 additions & 0 deletions all-in-one/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "all-in-one",
"version": "0.1.0",
"private": true,
"scripts": {
"deploy": "cdk deploy",
"synth": "cdk synth",
"test": "jest",
"validate": "functionless"
},
"devDependencies": {
"@aws-cdk/aws-appsync-alpha": "^2.41.0-alpha.0",
"@functionless/ast-reflection": "^0.3.1",
"@functionless/language-service": "^0.0.4",
"@types/jest": "^29.0.2",
"@types/node": "^18.7.17",
"aws-cdk": "^2.41.0",
"aws-cdk-lib": "^2.41.0",
"aws-sdk": "^2.1215.0",
"constructs": "^10.1.101",
"esbuild": "^0.15.7",
"functionless": "^0.22.20",
"jest": "^29.0.3",
"typesafe-dynamodb": "^0.2.2",
"typescript": "^4.8.3"
},
"jest": {
"transform": {
"^.+\\.(t|j)sx?$": [
"functionless/jest",
{}
]
}
}
}
19 changes: 19 additions & 0 deletions all-in-one/src/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { App, Stack } from "aws-cdk-lib";
import { Function, StepFunction } from "functionless";

const app = new App();

const stack = new Stack(app, "MyStack");

const sayFunction = new Function(
stack,
"SayFunction",
async (event: { message: string }) => {
console.log(event.message);
return;
}
);

new StepFunction(stack, "Workflow", async (event: { name: string }) => {
await sayFunction({ message: `Hello ${event.name}` });
});
15 changes: 15 additions & 0 deletions all-in-one/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"target": "es2019",
"module": "commonjs",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"plugins": [
{
"name": "@functionless/language-service"
}
]
}
}
Loading