-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(*): migrate examples/templates/tests to Spin manifest v2 #206
Merged
vdice
merged 8 commits into
fermyon:main
from
vdice:chore/examples-templates-manifest-v2
Oct 30, 2023
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7a2eb66
chore(examples): migrate to Spin manifest v2 + README/misc updates
vdice 38b5268
chore(templates): migrate to Spin manifest v2
vdice b924b07
chore(test): update test-app to Spin manifest v2
vdice ff5647a
docs(README.md): a few updates
vdice bdf3999
fix(test-app/spin.toml): s/spin_version/spin_manifest_version
vdice 917137d
further example tidying
vdice a3837df
examples(outbound): add allowed_outbound_hosts config where applicable
vdice f3410b2
docs(README.md): add note re: Spin version and examples
vdice File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
spin_manifest_version = "1" | ||
spin_manifest_version = 2 | ||
|
||
[application] | ||
authors = ["Fermyon Engineering <[email protected]>"] | ||
name = "spin-http-js" | ||
trigger = { type = "http", base = "/" } | ||
version = "1.0.0" | ||
|
||
[[component]] | ||
id = "hello" | ||
source = "target/spin-http-js.wasm" | ||
[component.trigger] | ||
[[trigger.http]] | ||
route = "/hello" | ||
[component.build] | ||
component = "hello" | ||
|
||
[component.hello] | ||
source = "target/spin-http-js.wasm" | ||
[component.hello.build] | ||
command = "npm install && npm run build" |
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
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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
spin_manifest_version = "1" | ||
spin_manifest_version = 2 | ||
|
||
[application] | ||
authors = ["Thorsten Hans <[email protected]>"] | ||
description = "Sample to demonstrate the usage of the HTTP router" | ||
name = "http-router" | ||
trigger = { type = "http", base = "/" } | ||
version = "0.1.0" | ||
|
||
[[component]] | ||
id = "http-router" | ||
[[trigger.http]] | ||
route = "/..." | ||
component = "http-router" | ||
|
||
[component.http-router] | ||
source = "target/http-router.wasm" | ||
exclude_files = ["**/node_modules"] | ||
[component.trigger] | ||
route = "/..." | ||
[component.build] | ||
[component.http-router.build] | ||
command = "npm run build" |
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
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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
spin_manifest_version = "1" | ||
spin_manifest_version = 2 | ||
|
||
[application] | ||
authors = ["Thorsten Hans <[email protected]>"] | ||
description = "Demonstrates how to use key-value store APIs in JS" | ||
name = "kv" | ||
trigger = { type = "http", base = "/" } | ||
version = "0.1.0" | ||
|
||
[[component]] | ||
id = "kv" | ||
[[trigger.http]] | ||
route = "/..." | ||
component = "kv" | ||
|
||
[component.kv] | ||
source = "target/kv.wasm" | ||
key_value_stores = ["default"] | ||
exclude_files = ["**/node_modules"] | ||
[component.trigger] | ||
route = "/..." | ||
[component.build] | ||
[component.kv.build] | ||
command = "npm run build" |
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
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
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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
spin_manifest_version = "1" | ||
spin_manifest_version = 2 | ||
|
||
[application] | ||
authors = ["Fermyon Engineering <[email protected]>"] | ||
name = "spin-http-js" | ||
trigger = { type = "http", base = "/" } | ||
name = "spin-outbound-http" | ||
version = "1.0.0" | ||
|
||
[[component]] | ||
id = "hello" | ||
source = "target/spin-http-js.wasm" | ||
allowed_http_hosts = ["https://some-random-api.ml"] | ||
files = ["src/index.html"] | ||
[component.trigger] | ||
[[trigger.http]] | ||
route = "/hello" | ||
[component.build] | ||
component = "hello" | ||
|
||
[component.hello] | ||
source = "target/spin-outbound-http.wasm" | ||
allowed_http_hosts = ["random-data-api.fermyon.app"] | ||
files = ["src/index.js"] | ||
[component.hello.build] | ||
command = "npm run build" |
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
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
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
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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
spin_manifest_version = "1" | ||
spin_manifest_version = 2 | ||
|
||
[application] | ||
authors = ["Fermyon Engineering <[email protected]>"] | ||
name = "spin-http-js" | ||
trigger = { type = "http", base = "/" } | ||
name = "spin-planetscale" | ||
version = "1.0.0" | ||
|
||
[[component]] | ||
id = "planetscale" | ||
source = "target/spin-http-js.wasm" | ||
allowed_http_hosts = ["https://aws.connect.psdb.cloud"] | ||
files = ["src/index.html"] | ||
[component.trigger] | ||
[[trigger.http]] | ||
route = "/hello" | ||
[component.build] | ||
component = "planetscale" | ||
|
||
[component.planetscale] | ||
source = "target/spin-planetscale.wasm" | ||
allowed_http_hosts = ["aws.connect.psdb.cloud"] | ||
files = ["src/index.js"] | ||
[component.planetscale.build] | ||
command = "npm run build" |
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
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
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 |
---|---|---|
@@ -1,23 +1,24 @@ | ||
spin_manifest_version = "1" | ||
spin_manifest_version = 2 | ||
|
||
[application] | ||
authors = ["Fermyon Engineering <[email protected]>"] | ||
name = "spin-http-js" | ||
trigger = { type = "http", base = "/" } | ||
name = "spin-simple-ssr" | ||
version = "1.0.0" | ||
|
||
[[trigger.http]] | ||
route = "/hello" | ||
component = "SSR" | ||
|
||
[[trigger.http]] | ||
route = "/static/..." | ||
component = "fileserver" | ||
|
||
[[component]] | ||
id = "SSR" | ||
source = "target/spin-http-js.wasm" | ||
allowed_http_hosts = ["https://some-random-api.ml"] | ||
[component.SSR] | ||
source = "target/spin-simple-ssr.wasm" | ||
files = [{source = "src/public", destination = "/"} ] | ||
[component.trigger] | ||
route = "/hello" | ||
[component.build] | ||
[component.SSR.build] | ||
command = "npm run build" | ||
|
||
[[component]] | ||
[component.fileserver] | ||
source = "modules/spin_static_fs.wasm" | ||
id = "fileserver" | ||
files = [{ source = "dist/static", destination = "/" }, ] | ||
[component.trigger] | ||
route = "/static/..." |
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
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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
spin_manifest_version = "1" | ||
spin_manifest_version = 2 | ||
|
||
[application] | ||
authors = ["Ryan Levick <[email protected]>"] | ||
description = "" | ||
name = "sqlite" | ||
trigger = { type = "http", base = "/" } | ||
version = "0.1.0" | ||
|
||
[[component]] | ||
id = "sqlite" | ||
[[trigger.http]] | ||
route = "/..." | ||
component = "sqlite" | ||
|
||
[component.sqlite] | ||
source = "target/sqlite.wasm" | ||
exclude_files = ["**/node_modules"] | ||
sqlite_databases = ["default"] | ||
[component.trigger] | ||
route = "/..." | ||
[component.build] | ||
[component.sqlite.build] | ||
command = "npm run build" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am puzzled why this excludes files that were not included but maybe safer to leave it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Yes I think I'll leave this one for another day