Skip to content
Merged
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
13 changes: 13 additions & 0 deletions Configs/MyAwesomeAPI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
service: swift-breeze-rest-my-awesome-api
awsRegion: us-east-1
swiftVersion: 6.1.2
swiftConfiguration: release
packageName: BreezeMyAwesomeAPI
buildPath: build
cors: false
breezeLambdaAPI:
targetName: MyAwesomeAPI
itemCodable: Item
itemKey: itemKey
httpAPIPath: /my-awesome-items
dynamoDBTableNamePrefix: items
11 changes: 11 additions & 0 deletions Configs/MyAwesomeGithubWebhook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
service: swift-breeze-myawesome-github-webhook
awsRegion: us-east-1
swiftVersion: 6.1.2
swiftConfiguration: release
packageName: BreezeMyAwesomeGitHubWebHook
buildPath: build
cors: false
breezeGithubWebhook:
targetName: GitHubWebHook
httpPath: /myawesome-github-webhook
secret: ${ssm:/dev/swift-webhook/webhook_secret}
10 changes: 10 additions & 0 deletions Configs/MyAwesomeWebhook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
service: swift-breeze-myawewesome-webhook
awsRegion: us-east-1
swiftVersion: 6.1.2
swiftConfiguration: release
packageName: BreezeMyAwesomeWebhook
buildPath: build
cors: false
breezeWebhook:
targetName: WebHook
httpPath: /myawewesome-webhook
89 changes: 31 additions & 58 deletions Docs/GenerateLambdaAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,72 +179,45 @@ If you don't want to use a custom authorizer, remove the `authorizer` section.
The following command will run using the example configuration file and generate the deployment files in the `.build/temp` folder.

```bash
swift run breeze -c Sources/BreezeCommand/Resources/breeze.yml -t .build/temp
swift run breeze generate-lambda-api -c Sources/BreezeCommand/Resources/breeze.yml -t .build/temp
```

output:

```bash
⚙️ Loading configuration file

/Users/andreascuderi/Documents/workspace/Breeze/Sources/BreezeCommand/Resources/breeze.yml

\ | /
| / -----< -
----< - | \
/ | \ /
░▒░░░░ \ ----< -
░░▒░░░░▒░░ ->-- / \
░▒░░▒▒░▒░░▒░ /
░░░▒░░▓█░▒▒░░░
░▒▒░▒████░░░░░
▒░░░░░█▓░▒░▒▒░ ░████████
░░░░█░▒░░▒░░ ░██ ░██
░░█░▒░▒░░▒ ░██ ░██ ░██████ ░████████ ░████████ ░█████████ ░████████
█░░░░░▒ ░████████ ░██ ░██ ░██ ░██ ░███ ░██
▓█ ░██ ░██ ░██████ ░████████ ░████████ ░███ ░████████
▓█ ░██ ░██ ░██ ░██ ░██ ░██ ░███ ░██
██ ░█████████ ░██ ░██ ░████████ ░████████ ░█████████ ░████████


service: swift-breeze-rest-item-api
awsRegion: us-east-1
swiftVersion: 5.10.1
swiftConfiguration: release
packageName: BreezeItemAPI
buildPath: build
cors: false
breezeLambdaAPI:
targetName: ItemAPI
itemCodable: Item
itemKey: itemKey
httpAPIPath: /items
dynamoDBTableNamePrefix: items

🔎 Verifing target path

🧹 .build/temp

✅ Target path ready!

📁 Generating project from template

📄 /Users/andreascuderi/Documents/workspace/Breeze/.build/temp/SwiftPackage/Package.swift
📄 /Users/andreascuderi/Documents/workspace/Breeze/.build/temp/SwiftPackage/Sources/SwiftTarget/main.swift
📄 /Users/andreascuderi/Documents/workspace/Breeze/.build/temp/Dockerfile
📄 /Users/andreascuderi/Documents/workspace/Breeze/.build/temp/remove.sh
📄 /Users/andreascuderi/Documents/workspace/Breeze/.build/temp/.gitignore
📄 /Users/andreascuderi/Documents/workspace/Breeze/.build/temp/deploy.sh
📄 /Users/andreascuderi/Documents/workspace/Breeze/.build/temp/update.sh
📄 /Users/andreascuderi/Documents/workspace/Breeze/.build/temp/Makefile
📄 /Users/andreascuderi/Documents/workspace/Breeze/.build/temp/README.md
📄 /Users/andreascuderi/Documents/workspace/Breeze/.build/temp/build.sh
📄 /Users/andreascuderi/Documents/workspace/Breeze/.build/temp/swagger.json
🛫 .build/temp/SwiftPackage/Sources/SwiftTarget
🛬 .build/temp/SwiftPackage/Sources/ItemAPI
🛫 .build/temp/SwiftPackage
🛬 .build/temp/BreezeItemAPI
📄 /Users/andreascuderi/Documents/workspace/Breeze/.build/temp/serverless.yml
📄 /Users/andreascuderi/Documents/workspace/Breeze/.build/temp/serverless-x86_64.yml

✅ Project is ready at target-path

.build/temp

🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵
🎵💨💨💨💨💨💨🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵
🎵💨🎵🎵🎵🎵🎵💨🎵💨💨💨💨💨🎵🎵💨💨💨💨💨💨🎵💨💨💨💨💨💨🎵💨💨💨💨💨💨🎵💨💨💨💨💨💨🎵
🎵💨🎵🎵🎵🎵🎵💨🎵💨🎵🎵🎵🎵💨🎵💨🎵🎵🎵🎵🎵🎵💨🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵💨🎵🎵💨🎵🎵🎵🎵🎵🎵
🎵💨💨💨💨💨💨🎵🎵💨🎵🎵🎵🎵💨🎵💨💨💨💨💨🎵🎵💨💨💨💨💨🎵🎵🎵🎵🎵💨🎵🎵🎵💨💨💨💨💨🎵🎵
🎵💨🎵🎵🎵🎵🎵💨🎵💨💨💨💨💨🎵🎵💨🎵🎵🎵🎵🎵🎵💨🎵🎵🎵🎵🎵🎵🎵🎵💨🎵🎵🎵🎵💨🎵🎵🎵🎵🎵🎵
🎵💨🎵🎵🎵🎵🎵💨🎵💨🎵🎵🎵💨🎵🎵💨🎵🎵🎵🎵🎵🎵💨🎵🎵🎵🎵🎵🎵🎵💨🎵🎵🎵🎵🎵💨🎵🎵🎵🎵🎵🎵
🎵💨💨💨💨💨💨🎵🎵💨🎵🎵🎵🎵💨🎵💨💨💨💨💨💨🎵💨💨💨💨💨💨🎵💨💨💨💨💨💨🎵💨💨💨💨💨💨🎵
🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵🎵

💨 Use the following commands to build & deploy

ℹ︎ Loading configuration
from: ~/Documents/workspace/Breeze/Sources/BreezeCommand/Resources/breeze.yml
✔︎ Configuration loaded [0.0s]
✔︎ Target path is valid
✔︎ Project genereration succeeded

✔ Success
Project is ready at path: .build/temp

i Info
Use the following commands to build & deploy:

cd .build/temp
./build.sh
./deploy.sh
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ EXAMPLE_PATH = ./Examples/ItemAPI
EXAMPLE_GITHUB_WEBHOOK_PATH = ./Examples/GitHubWebhook
EXAMPLE_WEBHOOK_PATH = ./Examples/Webhook
BUILD_TEMP = .build/temp
SWIFT_VERSION= 5.10
SWIFT_VERSION= 6.1.2
OS = ubuntu
DOCKER_TAG = breeze:$(SWIFT_VERSION)-$(OS)
DOCKERFILE = docker/$(SWIFT_VERSION)/$(OS)/.
Expand Down
40 changes: 38 additions & 2 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.7
// swift-tools-version: 5.8.1
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -18,14 +18,16 @@ let package = Package(
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.0.0"),
.package(url: "https://github.com/stencilproject/Stencil.git", from: "0.15.1"),
.package(url: "https://github.com/swift-serverless/swift-sls-adapter", from: "0.2.1"),
.package(url: "https://github.com/tuist/Noora.git", from: "0.45.0")
],
targets: [
.executableTarget(
name: "BreezeCommand",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "SLSAdapter", package: "swift-sls-adapter"),
.product(name: "Stencil", package: "Stencil")
.product(name: "Stencil", package: "Stencil"),
.product(name: "Noora", package: "Noora")
],
resources: [.copy("Resources")]
),
Expand Down
Loading