Skip to content

Commit f328e70

Browse files
authored
Merge pull request #7751 from QwikDev/v2-merge-main
chore: merge v1.15 into v2
2 parents 299a865 + 4508cfb commit f328e70

File tree

45 files changed

+421
-103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+421
-103
lines changed

packages/create-qwik/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@
3232

3333
## 2.0.0-alpha.0
3434

35+
## 1.15.0
36+
37+
### Patch Changes
38+
39+
- 🐞🩹 fix up vercel starter config (by [@cmbartschat](https://github.com/cmbartschat) in [#7663](https://github.com/QwikDev/qwik/pull/7663))
40+
41+
- 🛠 update devDependencies and configurations (by [@JerryWu1234](https://github.com/JerryWu1234) in [#7695](https://github.com/QwikDev/qwik/pull/7695))
42+
3543
## 1.14.1
3644

3745
### Patch Changes
Lines changed: 3 additions & 0 deletions
Loading

packages/docs/src/routes/(ecosystem)/ecosystem.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@
121121
"title": "Vercel",
122122
"href": "/docs/deployments/vercel-edge/",
123123
"imgSrc": "/ecosystem/vercel.svg"
124+
},
125+
{
126+
"title": "Azion",
127+
"href": "/docs/deployments/azion/",
128+
"imgSrc": "/ecosystem/azion.svg"
124129
}
125130
],
126131
"libraries": [

packages/docs/src/routes/api/qwik-router-middleware-request-handler/api.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@
443443
],
444444
"kind": "Class",
445445
"content": "```typescript\nexport declare class ServerError<T = any> extends Error \n```\n**Extends:** Error\n\n\n<table><thead><tr><th>\n\nConstructor\n\n\n</th><th>\n\nModifiers\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\n[(constructor)(status, data)](./router.servererror._constructor_.md)\n\n\n</td><td>\n\n\n</td><td>\n\nConstructs a new instance of the `ServerError` class\n\n\n</td></tr>\n</tbody></table>\n\n\n<table><thead><tr><th>\n\nProperty\n\n\n</th><th>\n\nModifiers\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\n[data](#servererror-data)\n\n\n</td><td>\n\n\n</td><td>\n\nT\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\n[status](#servererror-status)\n\n\n</td><td>\n\n\n</td><td>\n\nnumber\n\n\n</td><td>\n\n\n</td></tr>\n</tbody></table>",
446-
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/middleware/request-handler/error-handler.ts",
446+
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/middleware/request-handler/server-error.ts",
447447
"mdFile": "router.servererror.md"
448448
},
449449
{
@@ -456,7 +456,7 @@
456456
}
457457
],
458458
"kind": "Interface",
459-
"content": "```typescript\nexport interface ServerRenderOptions extends RenderOptions \n```\n**Extends:** RenderOptions\n\n\n<table><thead><tr><th>\n\nProperty\n\n\n</th><th>\n\nModifiers\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\n[checkOrigin?](./router.serverrenderoptions.checkorigin.md)\n\n\n</td><td>\n\n\n</td><td>\n\nboolean\n\n\n</td><td>\n\n_(Optional)_ Protection against cross-site request forgery (CSRF) attacks.\n\nWhen `true`<!-- -->, for every incoming POST, PUT, PATCH, or DELETE form submissions, the request origin is checked to match the server's origin.\n\nBe careful when disabling this option as it may lead to CSRF attacks.\n\nDefaults to `true`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[qwikCityPlan?](./router.serverrenderoptions.qwikcityplan.md)\n\n\n</td><td>\n\n\n</td><td>\n\nQwikCityPlan\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n<tr><td>\n\n[qwikRouterConfig?](./router.serverrenderoptions.qwikrouterconfig.md)\n\n\n</td><td>\n\n\n</td><td>\n\nQwikRouterConfig\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n<tr><td>\n\n[render](./router.serverrenderoptions.render.md)\n\n\n</td><td>\n\n\n</td><td>\n\nRender\n\n\n</td><td>\n\n\n</td></tr>\n</tbody></table>",
459+
"content": "```typescript\nexport interface ServerRenderOptions extends RenderOptions \n```\n**Extends:** RenderOptions\n\n\n<table><thead><tr><th>\n\nProperty\n\n\n</th><th>\n\nModifiers\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\n[checkOrigin?](./router.serverrenderoptions.checkorigin.md)\n\n\n</td><td>\n\n\n</td><td>\n\nboolean \\| 'lax-proto'\n\n\n</td><td>\n\n_(Optional)_ Protection against cross-site request forgery (CSRF) attacks.\n\nWhen `true`<!-- -->, for every incoming POST, PUT, PATCH, or DELETE form submissions, the request origin is checked to match the server's origin. `lax-proto` is for SSL-terminating proxies\n\nBe careful when disabling this option as it may lead to CSRF attacks.\n\nDefaults to `true`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[qwikCityPlan?](./router.serverrenderoptions.qwikcityplan.md)\n\n\n</td><td>\n\n\n</td><td>\n\nQwikCityPlan\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n<tr><td>\n\n[qwikRouterConfig?](./router.serverrenderoptions.qwikrouterconfig.md)\n\n\n</td><td>\n\n\n</td><td>\n\nQwikRouterConfig\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n<tr><td>\n\n[render](./router.serverrenderoptions.render.md)\n\n\n</td><td>\n\n\n</td><td>\n\nRender\n\n\n</td><td>\n\n\n</td></tr>\n</tbody></table>",
460460
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/middleware/request-handler/types.ts",
461461
"mdFile": "router.serverrenderoptions.md"
462462
},

packages/docs/src/routes/api/qwik-router-middleware-request-handler/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ number
16591659
</td></tr>
16601660
</tbody></table>
16611661
1662-
[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/middleware/request-handler/error-handler.ts)
1662+
[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/middleware/request-handler/server-error.ts)
16631663
16641664
## ServerRenderOptions
16651665
@@ -1694,13 +1694,13 @@ Description
16941694
16951695
</td><td>
16961696
1697-
boolean
1697+
boolean \| 'lax-proto'
16981698
16991699
</td><td>
17001700
17011701
_(Optional)_ Protection against cross-site request forgery (CSRF) attacks.
17021702
1703-
When `true`, for every incoming POST, PUT, PATCH, or DELETE form submissions, the request origin is checked to match the server's origin.
1703+
When `true`, for every incoming POST, PUT, PATCH, or DELETE form submissions, the request origin is checked to match the server's origin. `lax-proto` is for SSL-terminating proxies
17041704
17051705
Be careful when disabling this option as it may lead to CSRF attacks.
17061706

packages/docs/src/routes/docs/(qwikrouter)/error-handling/index.mdx

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,20 @@ Intercepting errors with middleware has a few usecases: you might want to hide e
6666
```tsx
6767
// src/routes/[email protected]
6868
import { type RequestHandler } from '@qwik.dev/router'
69-
import { RedirectMessage } from '@qwik.dev/router/middleware/request-handler'
69+
import { RedirectMessage, ServerError } from '@qwik.dev/router/middleware/request-handler'
7070
import { isDev } from '@qwik.dev/core/build'
7171

7272
export const onRequest: RequestHandler = async ({ next }) => {
7373
try {
7474
return await next();
7575
} catch (err) {
7676
// Pass through 3xx redirects
77-
if (isRedirectMessage(err)) {
77+
if (err instanceof RedirectMessage) {
7878
throw err
7979
}
8080

8181
// Pass through ServerErrors
82-
if (isServerError(err)) {
82+
if (err instanceof ServerError) {
8383
throw err
8484
}
8585

@@ -94,19 +94,6 @@ export const onRequest: RequestHandler = async ({ next }) => {
9494
}
9595
};
9696

97-
function isServerError(err: unknown): err is ServerError {
98-
return (
99-
err instanceof ServerError ||
100-
// This is required for dev environments due to an issue with vite: https://github.com/vitejs/vite/issues/3910
101-
(isDev && err instanceof Error && err.constructor.name === "ServerError")
102-
);
103-
}
104-
105-
function isRedirectMessage(err: unknown): err is RedirectMessage {
106-
return (
107-
err instanceof RedirectMessage ||
108-
// This is required for dev environments due to an issue with vite: https://github.com/vitejs/vite/issues/3910
109-
(isDev && err instanceof Error && err.constructor.name === "RedirectMessage")
110-
);
111-
}
97+
98+
11299
```

packages/docs/src/routes/docs/(qwikrouter)/middleware/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ Set stream response.
606606
import type { RequestHandler } from '@qwik.dev/router';
607607

608608
export const onGet: RequestHandler = async (requestEvent) => {
609+
requestEvent.headers.set('content-type','text/event-stream')
609610
const writableStream = requestEvent.getWritableStream();
610611
const writer = writableStream.getWriter();
611612
const encoder = new TextEncoder();

packages/docs/src/routes/docs/cookbook/streaming-deferred-loaders/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ By returning an asynchronous function from our `routeLoader$` we can stream/defe
1919
import { Resource, component$ } from '@qwik.dev/core';
2020
import { routeLoader$ } from '@qwik.dev/router';
2121

22-
export const useMyData = routeLoader$(() => {
22+
export const useMyData = routeLoader$(async () => {
2323
return async () => {
2424
await delay(4_000);
2525
return 'MyData ' + Math.random();
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: Azion Web Platform | Deployments
3+
contributors:
4+
- egermano
5+
updated_at: '2025-06-17T11:37:18Z'
6+
created_at: '2025-06-17T11:37:18Z'
7+
---
8+
9+
import PackageManagerTabs from '~/components/package-manager-tabs/index.tsx';
10+
11+
# Azion Web Platform
12+
13+
[Azion](https://azion.com) is a web platform that allows you to deploy your Qwik applications globally. It provides a fast and secure way to serve your applications with low latency.
14+
15+
## Installation
16+
17+
Currently, Azion only supports SSG Qwik applications. To deploy your Qwik application to Azion, you need to use the `static-site` adapter.
18+
19+
To integrate the `static-site` adapter, use the `add` command:
20+
21+
<PackageManagerTabs>
22+
<span q:slot="pnpm">
23+
```shell
24+
pnpm run qwik add static
25+
```
26+
</span>
27+
<span q:slot="npm">
28+
```shell
29+
npm run qwik add static
30+
```
31+
</span>
32+
<span q:slot="yarn">
33+
```shell
34+
yarn run qwik add static
35+
```
36+
</span>
37+
<span q:slot="bun">
38+
```shell
39+
bun run qwik add static
40+
```
41+
</span>
42+
</PackageManagerTabs>
43+
44+
Above command will create a directory at project root named `adapters/static/vite.config.ts` with the below code.
45+
46+
```ts title="adapters/static/vite.config.ts"
47+
import { staticAdapter } from "@builder.io/qwik-city/adapters/static/vite";
48+
import { extendConfig } from '@builder.io/qwik-city/vite';
49+
import baseConfig from '../../vite.config';
50+
51+
export default extendConfig(baseConfig, () => {
52+
return {
53+
build: {
54+
ssr: true,
55+
rollupOptions: {
56+
input: ['@qwik-city-plan'],
57+
},
58+
},
59+
plugins: [
60+
staticAdapter({
61+
origin: 'https://yoursite.qwik.dev',
62+
}),
63+
],
64+
};
65+
});
66+
```
67+
68+
> Remember to change the `origin` in this file to your domain.
69+
70+
Now, you can generate static site while using `Qwik`'s rich ecosystem, file based routing and many more.
71+
72+
## Deploy to Azion
73+
74+
To deploy your Qwik application to Azion, you need to install the Azion CLI. You can install it by following this [guide](https://www.azion.com/en/documentation/products/azion-cli/overview/#installing-azion-cli).
75+
76+
Once you have the Azion CLI installed, you can deploy your application by following these steps:
77+
78+
1. Link your application. This will create a new project in Azion and link it to your local application.
79+
80+
```shell
81+
azion link
82+
```
83+
84+
Confirm the linking of the project to Azion:
85+
86+
```shell
87+
? Do you want to link /[your-application-folder] to Azion? (y/N)
88+
```
89+
90+
Enter the desired name for your **application**:
91+
92+
```shell
93+
? (Hit enter to accept the suggested name in parenthesis) Your application's name: (nimble-tyrion)
94+
```
95+
96+
Choose a **preset**, `Qwik` is the option you are looking for:
97+
98+
```shell
99+
? Choose a preset: [Use arrows to move, type to filter]
100+
...
101+
> Qwik
102+
...
103+
```
104+
105+
Now, the application will be linked to Azion. Different processes occur based on the selected preset, so you need to answer the interactions that are presented.
106+
107+
2. Deploy your application. This will build your application and deploy it to Azion.
108+
109+
```shell
110+
azion deploy
111+
```
112+
113+
3. Wait while the project is built and deployed to the Azion Web Platform.
114+
115+
> Once the deployment is triggered, Azion will open the browser and take you to a page on the Azion Console where the deployment logs and process can be monitored. If it doesn't open automatically, just click on the provided link.
116+
After the deployment is complete, you'll receive a domain to access your Qwik project on the Azion Platform.
117+
118+
Wait a few minutes for propagation to take place, and then access your application using the provided domain, which should be similar to `https://xxxxxxx.map.azionedge.net`.
119+
120+
For more information about the Azion Platform, check the [Azion documentation](https://www.azion.com/en/documentation/).

packages/docs/src/routes/docs/integrations/i18n/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Alternatively, you can use the `deepl-localize` command to translate your string
176176

177177
It supports both runtime and compile-time translations.
178178

179-
See the [Qwik-specific instructions](https://github.com/wmertens/compiled-i18n/blob/main/qwik.md).
179+
See the [Qwik-specific instructions](https://github.com/wmertens/compiled-i18n/blob/main/docs/qwik.md).
180180

181181
Automatic translation is supported via [deepl-localize](https://github.com/tzdesign/deepl-localize).
182182

0 commit comments

Comments
 (0)