@@ -24,6 +24,11 @@ id = "trigger-fileserver-downloads"
2424component = " fileserver-downloads"
2525route = " /downloads/..."
2626
27+ [[trigger .http ]]
28+ id = " trigger-redirect-spin-index"
29+ component = " redirect-spin-index"
30+ route = " /spin"
31+
2732[[trigger .http ]]
2833id = " trigger-redirect-cloud-index"
2934component = " redirect-cloud-index"
@@ -134,6 +139,26 @@ id = "trigger-serverless-ai"
134139component = " serverless-ai"
135140route = " /cloud/serverless-ai"
136141
142+ [[trigger .http ]]
143+ id = " trigger-spin-version-proxy"
144+ component = " spin-version-proxy"
145+ route = " /spin/..."
146+
147+ [[trigger .http ]]
148+ id = " trigger-bartholomew-spin-v1"
149+ component = " bartholomew-spin-v1"
150+ route = " /spin/v1/..."
151+
152+ [[trigger .http ]]
153+ id = " trigger-bartholomew-spin-v2"
154+ component = " bartholomew-spin-v2"
155+ route = " /spin/v2/..."
156+
157+ [[trigger .http ]]
158+ id = " trigger-bartholomew-spin-v3"
159+ component = " bartholomew-spin-v3"
160+ route = " /spin/v3/..."
161+
137162[[trigger .http ]]
138163id = " trigger-redirect-wasm-langs-root"
139164component = " redirect-wasm-langs-root"
@@ -159,21 +184,6 @@ id = "trigger-spin-kubernetes-known-issues"
159184component = " redirect-spin-kubernetes-known-issues"
160185route = " /spin/v2/kubernetes-known-issues"
161186
162- [[trigger .http ]]
163- id = " trigger-spin-deploying-to-fermyon"
164- component = " redirect-spin-deploying-to-fermyon"
165- route = " /spin/deploying-to-fermyon"
166-
167- [[trigger .http ]]
168- id = " trigger-spin-developing"
169- component = " redirect-spin-developing"
170- route = " /spin/developing"
171-
172- [[trigger .http ]]
173- id = " trigger-spin-wildcard-redirect-to-spinframework"
174- component = " wildcard-redirect-to-spinframework"
175- route = " /spin/..."
176-
177187[component .bartholomew ]
178188# Using build from bartholomew main
179189source = " modules/bartholomew.wasm"
@@ -192,6 +202,11 @@ files = [{ source = "static/", destination = "/" }]
192202source = " modules/spin_static_fs.wasm"
193203files = [{ source = " downloads/" , destination = " /" }]
194204
205+ # Redirect /spin to /spin/index
206+ [component .redirect-spin-index ]
207+ source = " modules/redirect.wasm"
208+ environment = { DESTINATION = " /spin/index" }
209+
195210# Redirect /cloud to /cloud/index
196211[component .redirect-cloud-index ]
197212source = " modules/redirect.wasm"
@@ -202,90 +217,90 @@ environment = { DESTINATION = "/cloud/index" }
202217source = " modules/redirect.wasm"
203218environment = { DESTINATION = " /bartholomew/index" }
204219
205- # Redirect /spin/rust-components/http-trigger to https://spinframework.dev /http-trigger
220+ # Redirect /spin/rust-components/http-trigger to /spin /http-trigger
206221[component .redirect-spin-rust-components-http-trigger ]
207222source = " modules/redirect.wasm"
208- environment = { DESTINATION = " https://spinframework.dev/ http-trigger" , STATUSCODE = " 301 " }
223+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ http-trigger" }
209224
210- # Redirect /spin/contributing/extending-and-embedding to https://spinframework.dev /extending-and-embedding
225+ # Redirect /spin/contributing/extending-and-embedding to /spin /extending-and-embedding
211226[component .spin-contributing-extending-and-embedding ]
212227source = " modules/redirect.wasm"
213- environment = { DESTINATION = " https://spinframework.dev/ extending-and-embedding" , STATUSCODE = " 301 " }
228+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ extending-and-embedding" }
214229
215- # Redirect /spin/rust-components/redis-trigger to https://spinframework.dev /redis-trigger
230+ # Redirect /spin/rust-components/redis-trigger to /spin /redis-trigger
216231[component .spin-rust-components-redis-trigger ]
217232source = " modules/redirect.wasm"
218- environment = { DESTINATION = " https://spinframework.dev/ redis-trigger" , STATUSCODE = " 301 " }
233+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ redis-trigger" }
219234
220- # Redirect /spin/configuration to https://spinframework.dev /writing-apps
235+ # Redirect /spin/configuration to /spin /writing-apps
221236[component .spin-configuration ]
222237source = " modules/redirect.wasm"
223- environment = { DESTINATION = " https://spinframework.dev/ writing-apps" , STATUSCODE = " 301 " }
238+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ writing-apps" }
224239
225- # Redirect /spin/configuration/http-trigger to https://spinframework.dev /http-trigger
240+ # Redirect /spin/configuration/http-trigger to /spin /http-trigger
226241[component .spin-configuration-http-trigger ]
227242source = " modules/redirect.wasm"
228- environment = { DESTINATION = " https://spinframework.dev/ http-trigger" , STATUSCODE = " 301 " }
243+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ http-trigger" }
229244
230- # Redirect /spin/configuration/redis-trigger to https://spinframework.dev /redis-trigger
245+ # Redirect /spin/configuration/redis-trigger to /spin /redis-trigger
231246[component .spin-configuration-redis-trigger ]
232247source = " modules/redirect.wasm"
233- environment = { DESTINATION = " https://spinframework.dev/ redis-trigger" , STATUSCODE = " 301 " }
248+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ redis-trigger" }
234249
235- # Redirect /spin/quickstart/developing to https://spinframework.dev /quickstart
250+ # Redirect /spin/quickstart/developing to /spin /quickstart
236251[component .spin-quickstart-developing ]
237252source = " modules/redirect.wasm"
238- environment = { DESTINATION = " https://spinframework.dev /quickstart" }
253+ environment = { DESTINATION = " https://developer.fermyon.com/spin /quickstart" }
239254
240- # Redirect /spin/quickstart/configuration to https://spinframework.dev /writing-apps
255+ # Redirect /spin/quickstart/configuration to /spin /writing-apps
241256[component .spin-quickstart-configuration ]
242257source = " modules/redirect.wasm"
243- environment = { DESTINATION = " https://spinframework.dev/ writing-apps" , STATUSCODE = " 301 " }
258+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ writing-apps" }
244259
245- # Redirect /spin/quickstart/install to https://spinframework.dev /install
260+ # Redirect /spin/quickstart/install to /spin /install
246261[component .spin-quickstart-install ]
247262source = " modules/redirect.wasm"
248- environment = { DESTINATION = " https://spinframework.dev/ install" , STATUSCODE = " 301 " }
263+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ install" }
249264
250- # Redirect /spin/quickstart/go-components to https://spinframework.dev /go-components
265+ # Redirect /spin/quickstart/go-components to /spin /go-components
251266[component .spin-quickstart-go-components ]
252267source = " modules/redirect.wasm"
253- environment = { DESTINATION = " https://spinframework.dev/ go-components" , STATUSCODE = " 301 " }
268+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ go-components" }
254269
255- # Redirect /spin/quickstart/rust-components to https://spinframework.dev /rust-components
270+ # Redirect /spin/quickstart/rust-components to /spin /rust-components
256271[component .spin-quickstart-rust-components ]
257272source = " modules/redirect.wasm"
258- environment = { DESTINATION = " https://spinframework.dev/ rust-components" , STATUSCODE = " 301 " }
273+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ rust-components" }
259274
260- # Redirect /spin/contributing/ to https://spinframework.dev /contributing-spin
275+ # Redirect /spin/contributing/ to spin /contributing-spin
261276[component .spin-contributing ]
262277source = " modules/redirect.wasm"
263- environment = { DESTINATION = " https://spinframework.dev/ contributing-spin" , STATUSCODE = " 301 " }
278+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ contributing-spin" }
264279
265- # Redirect /spin/kv-store/ to https://spinframework.dev /key-value-store-tutorial
280+ # Redirect /spin/kv-store/ to spin /key-value-store-tutorial
266281[component .spin-kv-store-tutorial ]
267282source = " modules/redirect.wasm"
268- environment = { DESTINATION = " https://spinframework.dev /kv-store-tutorial" }
283+ environment = { DESTINATION = " https://developer.fermyon.com/spin /kv-store-tutorial" }
269284
270285# Redirecting from common to spin incase someone had it bookmarked before removal of common
271286[component .redirect-contributing-common-to-spin ]
272287source = " modules/redirect.wasm"
273- environment = { DESTINATION = " https://spinframework.dev/ cli-reference" , STATUSCODE = " 301 " }
288+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ cli-reference" }
274289
275- # Redirect /spin/kubernetes-dynamic-configuration to https://spinframework.dev /kubernetes
290+ # Redirect /spin/kubernetes-dynamic-configuration to /spin /kubernetes
276291[component .redirect-spin-kubernetes-dynamic-configuration ]
277292source = " modules/redirect.wasm"
278- environment = { DESTINATION = " https://spinframework.dev/ kubernetes" , STATUSCODE = " 301 " }
293+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ kubernetes" }
279294
280- # Redirect /spin/kubernetes-sidecars to https://spinframework.dev /kubernetes
295+ # Redirect /spin/kubernetes-sidecars to /spin /kubernetes
281296[component .redirect-spin-kubernetes-sidecars ]
282297source = " modules/redirect.wasm"
283- environment = { DESTINATION = " https://spinframework.dev/ kubernetes" , STATUSCODE = " 301 " }
298+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ kubernetes" }
284299
285- # Redirect /spin/kubernetes-known-issues to https://spinframework.dev /kubernetes
300+ # Redirect /spin/kubernetes-known-issues to /spin /kubernetes
286301[component .redirect-spin-kubernetes-known-issues ]
287302source = " modules/redirect.wasm"
288- environment = { DESTINATION = " https://spinframework.dev/ kubernetes" , STATUSCODE = " 301 " }
303+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ kubernetes" }
289304
290305[component .hub-fileserver-static ]
291306source = { url = " https://github.com/fermyon/spin-fileserver/releases/download/v0.0.2/spin_static_fs.wasm" , digest = " sha256:65456bf4e84cf81b62075e761b2b0afaffaef2d0aeda521b245150f76b96421b" }
@@ -296,45 +311,30 @@ files = [{ source = "spin-up-hub/dist/", destination = "/" }]
296311command = " npm run build"
297312workdir = " spin-up-hub"
298313
299- # Redirect /spin/spin-oci to https://spinframework.dev /registry-tutorial
314+ # Redirect /spin/spin-oci to /spin /registry-tutorial
300315[component .registry-tutorial ]
301316source = " modules/redirect.wasm"
302- environment = { DESTINATION = " https://spinframework.dev/ registry-tutorial" , STATUSCODE = " 301 " }
317+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ registry-tutorial" }
303318
304- # Redirect /spin/url-shortener to https://spinframework.dev /url-shortener-tutorial
319+ # Redirect /spin/url-shortener to /spin /url-shortener-tutorial
305320[component .url-shortener-tutorial ]
306321source = " modules/redirect.wasm"
307- environment = { DESTINATION = " https://spinframework.dev/ url-shortener-tutorial" , STATUSCODE = " 301 " }
322+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ url-shortener-tutorial" }
308323
309- # Redirect /spin/kv-store-tutorial to https://spinframework.dev /key-value-store-tutorial
324+ # Redirect /spin/kv-store-tutorial to /spin /key-value-store-tutorial
310325[component .key-value-store-tutorial ]
311326source = " modules/redirect.wasm"
312- environment = { DESTINATION = " https://spinframework.dev/ key-value-store-tutorial" , STATUSCODE = " 301 " }
327+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ key-value-store-tutorial" }
313328
314- # Redirect /spin/serverless-ai-tutorial to https://spinframework.dev /ai-sentiment-analysis-api-tutorial
329+ # Redirect /spin/serverless-ai-tutorial to /spin /ai-sentiment-analysis-api-tutorial
315330[component .ai-sentiment-analysis-api-tutorial ]
316331source = " modules/redirect.wasm"
317- environment = { DESTINATION = " https://spinframework.dev/ ai-sentiment-analysis-api-tutorial" , STATUSCODE = " 301 " }
332+ environment = { DESTINATION = " https://developer.fermyon.com/spin/ ai-sentiment-analysis-api-tutorial" }
318333
319- # Redirect /cloud/serverless-ai to https://spinframework.dev /serverless-ai-hello-world
334+ # Redirect /cloud/serverless-ai to /spin /serverless-ai-hello-world
320335[component .serverless-ai ]
321336source = " modules/redirect.wasm"
322- environment = { DESTINATION = " https://spinframework.dev/serverless-ai-hello-world.md" , STATUSCODE = " 301" }
323-
324- # Redirect /spin/deploying-to-fermyon to https://spinframework.dev/deploying
325- [component .redirect-spin-deploying-to-fermyon ]
326- source = " modules/redirect.wasm"
327- environment = { DESTINATION = " https://spinframework.dev/deploying" , STATUSCODE = " 301" }
328-
329- # Redirect /spin/developing to https://spinframework.dev/quickstart
330- [component .redirect-spin-developing ]
331- source = " modules/redirect.wasm"
332- environment = { DESTINATION = " https://spinframework.dev/quickstart" , STATUSCODE = " 301" }
333-
334- # Redirect /spin/... to spinframework.dev/...
335- [component .wildcard-redirect-to-spinframework ]
336- source = " modules/redirect.wasm"
337- environment = { DESTINATION = " https://spinframework.dev" , STATUSCODE = " 301" , INCLUDE_PATH = " true" , TRIM_PREFIX = " /spin" }
337+ environment = { DESTINATION = " https://developer.fermyon.com/spin/serverless-ai-hello-world.md" }
338338
339339# Redirect /wasm-languages to /wasm-languages/webassembly-language-support
340340[component .redirect-wasm-langs-root ]
@@ -345,3 +345,41 @@ environment = { DESTINATION = "/wasm-languages/webassembly-language-support" }
345345[component .redirect-wasm-functions-root ]
346346source = " modules/redirect.wasm"
347347environment = { DESTINATION = " /wasm-functions/index" }
348+
349+ # Component to give us clean versioned URLs for spin from the root
350+ [component .spin-version-proxy ]
351+ source = " modules/spin-redirecter.wasm"
352+ variables = { latest_spin_version = " v3" }
353+ files = [" spin-redirect.json" ]
354+ exclude_files = [" **/node_modules" ]
355+ allowed_outbound_hosts = [" http://self" ]
356+ # Need to modify action to get the js2wasm plugin
357+ # [component.build]
358+ # workdir = "spin-redirecter"
359+ # command = "npm install && npm run build"
360+
361+ [component .bartholomew-spin-v1 ]
362+ # Using build from bartholomew main
363+ source = " modules/bartholomew.wasm"
364+ environment = { PREVIEW_MODE = " 0" }
365+ files = [" content/**/*" , " templates/*" , " scripts/*" , " config/*" , " shortcodes/*" ]
366+
367+ [component .bartholomew-spin-v1 .build ]
368+ command = " npm run build-index && npm run build-hub-index"
369+ watch = [" content/**/*" , " templates/*" ]
370+
371+ [component .bartholomew-spin-v2 ]
372+ # Using build from bartholomew main
373+ source = " modules/bartholomew.wasm"
374+ environment = { PREVIEW_MODE = " 0" }
375+ files = [" content/**/*" , " templates/*" , " scripts/*" , " config/*" , " shortcodes/*" ]
376+
377+ [component .bartholomew-spin-v2 .build ]
378+ command = " npm run build-index && npm run build-hub-index"
379+ watch = [" content/**/*" , " templates/*" ]
380+
381+ [component .bartholomew-spin-v3 ]
382+ # Using build from bartholomew main
383+ source = " modules/bartholomew.wasm"
384+ environment = { PREVIEW_MODE = " 0" }
385+ files = [" content/**/*" , " templates/*" , " scripts/*" , " config/*" , " shortcodes/*" ]
0 commit comments