@astrojs/cloudflare 0.2.1 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +5 -0
- package/CHANGELOG.md +18 -0
- package/README.md +3 -3
- package/dist/server.js +1 -1
- package/package.json +7 -4
- package/src/server.ts +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
[32m@astrojs/cloudflare:build: [0mcache hit, replaying output [2maf6a8235acaf44a1[0m
|
|
2
|
+
[32m@astrojs/cloudflare:build: [0m
|
|
3
|
+
[32m@astrojs/cloudflare:build: [0m> @astrojs/cloudflare@0.2.4 build /home/runner/work/astro/astro/packages/integrations/cloudflare
|
|
4
|
+
[32m@astrojs/cloudflare:build: [0m> astro-scripts build "src/**/*.ts" && tsc
|
|
5
|
+
[32m@astrojs/cloudflare:build: [0m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @astrojs/cloudflare
|
|
2
2
|
|
|
3
|
+
## 0.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#3885](https://github.com/withastro/astro/pull/3885) [`bf5d1cc1e`](https://github.com/withastro/astro/commit/bf5d1cc1e71da38a14658c615e9481f2145cc6e7) Thanks [@delucis](https://github.com/delucis)! - Integration README fixes
|
|
8
|
+
|
|
9
|
+
## 0.2.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#3854](https://github.com/withastro/astro/pull/3854) [`b012ee55`](https://github.com/withastro/astro/commit/b012ee55b107dea0730286263b27d83e530fad5d) Thanks [@bholmesdev](https://github.com/bholmesdev)! - [astro add] Support adapters and third party packages
|
|
14
|
+
|
|
15
|
+
## 0.2.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#3777](https://github.com/withastro/astro/pull/3777) [`976e1f17`](https://github.com/withastro/astro/commit/976e1f175a95ea39f737b8575e4fdf3c3d89e1ee) Thanks [@tony-sull](https://github.com/tony-sull)! - Disables HTTP streaming in Cloudflare Pages deployments
|
|
20
|
+
|
|
3
21
|
## 0.2.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
An SSR adapter for use with Cloudflare Pages Functions targets. Write your code in Astro/Node and deploy to Cloudflare Pages.
|
|
4
4
|
|
|
5
|
-
In your astro.config.mjs use:
|
|
5
|
+
In your `astro.config.mjs` use:
|
|
6
6
|
|
|
7
7
|
```js
|
|
8
8
|
import { defineConfig } from 'astro/config';
|
|
@@ -25,8 +25,8 @@ It's then possible to update the preview script in your `package.json` to `"prev
|
|
|
25
25
|
|
|
26
26
|
## Streams
|
|
27
27
|
|
|
28
|
-
Some integrations such as (
|
|
28
|
+
Some integrations such as [React](https://github.com/withastro/astro/tree/main/packages/integrations/react) rely on web streams. Currently Cloudflare Pages functions are in beta and don't support the `streams_enable_constructors` feature flag.
|
|
29
29
|
|
|
30
30
|
In order to work around this:
|
|
31
31
|
- install the `"web-streams-polyfill"` package
|
|
32
|
-
- add `import "web-streams-polyfill/es2018";` to the top of the front matter of every page which requires streams, such as server rendering a React component.
|
|
32
|
+
- add `import "web-streams-polyfill/es2018";` to the top of the front matter of every page which requires streams, such as server rendering a React component.
|
package/dist/server.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./shim.js";
|
|
2
2
|
import { App } from "astro/app";
|
|
3
3
|
function createExports(manifest) {
|
|
4
|
-
const app = new App(manifest);
|
|
4
|
+
const app = new App(manifest, false);
|
|
5
5
|
const fetch = async (request, env) => {
|
|
6
6
|
const { origin, pathname } = new URL(request.url);
|
|
7
7
|
if (manifest.assets.has(pathname)) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/cloudflare",
|
|
3
3
|
"description": "Deploy your site to cloudflare pages functions",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -11,8 +11,11 @@
|
|
|
11
11
|
"url": "https://github.com/withastro/astro.git",
|
|
12
12
|
"directory": "packages/integrations/cloudflare"
|
|
13
13
|
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"astro-adapter"
|
|
16
|
+
],
|
|
14
17
|
"bugs": "https://github.com/withastro/astro/issues",
|
|
15
|
-
"homepage": "https://astro.build",
|
|
18
|
+
"homepage": "https://docs.astro.build/en/guides/integrations-guide/cloudflare/",
|
|
16
19
|
"exports": {
|
|
17
20
|
".": "./dist/index.js",
|
|
18
21
|
"./server.js": "./dist/server.js",
|
|
@@ -22,8 +25,8 @@
|
|
|
22
25
|
"esbuild": "^0.14.42"
|
|
23
26
|
},
|
|
24
27
|
"devDependencies": {
|
|
25
|
-
"astro": "1.0.0-beta.
|
|
26
|
-
"astro-scripts": "0.0.
|
|
28
|
+
"astro": "1.0.0-beta.69",
|
|
29
|
+
"astro-scripts": "0.0.6"
|
|
27
30
|
},
|
|
28
31
|
"scripts": {
|
|
29
32
|
"build": "astro-scripts build \"src/**/*.ts\" && tsc",
|
package/src/server.ts
CHANGED
|
@@ -8,7 +8,7 @@ type Env = {
|
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export function createExports(manifest: SSRManifest) {
|
|
11
|
-
const app = new App(manifest);
|
|
11
|
+
const app = new App(manifest, false);
|
|
12
12
|
|
|
13
13
|
const fetch = async (request: Request, env: Env) => {
|
|
14
14
|
const { origin, pathname } = new URL(request.url);
|