@astrojs/cloudflare 0.5.0 → 1.0.2

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.
@@ -1,5 +1,5 @@
1
- @astrojs/cloudflare:build: cache hit, replaying output 6b7581791e59c114
2
- @astrojs/cloudflare:build: 
3
- @astrojs/cloudflare:build: > @astrojs/cloudflare@0.5.0 build /home/runner/work/astro/astro/packages/integrations/cloudflare
4
- @astrojs/cloudflare:build: > astro-scripts build "src/**/*.ts" && tsc
5
- @astrojs/cloudflare:build: 
1
+ @astrojs/cloudflare:build: cache hit, replaying output d70be9427369f04f
2
+ @astrojs/cloudflare:build: 
3
+ @astrojs/cloudflare:build: > @astrojs/cloudflare@1.0.2 build /home/runner/work/astro/astro/packages/integrations/cloudflare
4
+ @astrojs/cloudflare:build: > astro-scripts build "src/**/*.ts" && tsc
5
+ @astrojs/cloudflare:build: 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @astrojs/cloudflare
2
2
 
3
+ ## 1.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#4558](https://github.com/withastro/astro/pull/4558) [`742966456`](https://github.com/withastro/astro/commit/7429664566f05ecebf6d57906f950627e62e690c) Thanks [@tony-sull](https://github.com/tony-sull)! - Adding the `withastro` keyword to include the adapters on the [Integrations Catalog](https://astro.build/integrations)
8
+
9
+ ## 1.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#4232](https://github.com/withastro/astro/pull/4232) [`bfbd32588`](https://github.com/withastro/astro/commit/bfbd32588f7e2c0a9e43cd1a571a0dc9c5f7e645) Thanks [@Ekwuno](https://github.com/Ekwuno)! - Update README
14
+
15
+ ## 1.0.0
16
+
17
+ ### Major Changes
18
+
19
+ - [`04ad44563`](https://github.com/withastro/astro/commit/04ad445632c67bdd60c1704e1e0dcbcaa27b9308) - > Astro v1.0 is out! Read the [official announcement post](https://astro.build/blog/astro-1/).
20
+
21
+ **No breaking changes**. This package is now officially stable and compatible with `astro@1.0.0`!
22
+
3
23
  ## 0.5.0
4
24
 
5
25
  ### Minor Changes
package/README.md CHANGED
@@ -27,7 +27,7 @@ Cloudflare Pages has 2 different modes for deploying functions, `advanced` mode
27
27
 
28
28
  For most projects the adaptor default of `advanced` will be sufficiant, when in this mode the `dist` folder will contain your compiled project. However if you'd like to use [pages plugins](https://developers.cloudflare.com/pages/platform/functions/plugins/) such as [Sentry](https://developers.cloudflare.com/pages/platform/functions/plugins/sentry/) for example to enable logging, you'll need to use directory mode.
29
29
 
30
- In directory mode the adaptor will compile the client side part of you app the same way, but it will move the worker script into a `functions` folder in the project root. The adaptor will only ever place a `[[path]].js` in that folder, allowing you to add additional plugins and pages middlewhere which can be checked into version control .
30
+ In directory mode the adaptor will compile the client side part of you app the same way, but it will move the worker script into a `functions` folder in the project root. The adaptor will only ever place a `[[path]].js` in that folder, allowing you to add additional plugins and pages middleware which can be checked into version control.
31
31
 
32
32
  ```ts
33
33
  // directory mode
@@ -45,7 +45,7 @@ In order for preview to work you must install `wrangler`
45
45
  $ pnpm install wrangler --save-dev
46
46
  ```
47
47
 
48
- It's then possible to update the preview script in your `package.json` to `"preview": "wrangler pages dev ./dist"`
48
+ It's then possible to update the preview script in your `package.json` to `"preview": "wrangler pages dev ./dist"`.This will allow you run your entire application locally with [Wrangler](https://github.com/cloudflare/wrangler2), which supports secrets, environment variables, KV namespaces, Durable Objects and [all other supported Cloudflare bindings](https://developers.cloudflare.com/pages/platform/functions/#adding-bindings).
49
49
 
50
50
  ## Streams
51
51
 
@@ -54,3 +54,18 @@ Some integrations such as [React](https://github.com/withastro/astro/tree/main/p
54
54
  In order to work around this:
55
55
  - install the `"web-streams-polyfill"` package
56
56
  - 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.
57
+
58
+ ## Environment Variables
59
+
60
+ As Cloudflare Pages Functions [provides environment variables differently](https://developers.cloudflare.com/pages/platform/functions/#adding-environment-variables-locally), private environment variables needs to be set through [`vite.define`](https://vitejs.dev/config/shared-options.html#define) to work in builds.
61
+
62
+ ```js
63
+ // astro.config.mjs
64
+ export default {
65
+ vite: {
66
+ define: {
67
+ 'process.env.MY_SECRET': JSON.stringify(process.env.MY_SECRET),
68
+ },
69
+ },
70
+ }
71
+ ```
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.5.0",
4
+ "version": "1.0.2",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "author": "withastro",
@@ -12,6 +12,7 @@
12
12
  "directory": "packages/integrations/cloudflare"
13
13
  },
14
14
  "keywords": [
15
+ "withastro",
15
16
  "astro-adapter"
16
17
  ],
17
18
  "bugs": "https://github.com/withastro/astro/issues",
@@ -26,8 +27,8 @@
26
27
  "esbuild": "^0.14.42"
27
28
  },
28
29
  "devDependencies": {
29
- "astro": "1.0.0-rc.8",
30
- "astro-scripts": "0.0.6",
30
+ "astro": "1.1.3",
31
+ "astro-scripts": "0.0.7",
31
32
  "wrangler": "^2.0.23"
32
33
  },
33
34
  "scripts": {