@astrojs/cloudflare 6.1.1 → 6.1.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.
- package/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +9 -0
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/src/index.ts +1 -1
- package/test/directory.test.js +6 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
1
|
+
[34m@astrojs/cloudflare:build: [0mcache hit, replaying output [2m58c9f74829c66203[0m
|
|
2
|
+
[34m@astrojs/cloudflare:build: [0m
|
|
3
|
+
[34m@astrojs/cloudflare:build: [0m> @astrojs/cloudflare@6.1.2 build /home/runner/work/astro/astro/packages/integrations/cloudflare
|
|
4
|
+
[34m@astrojs/cloudflare:build: [0m> astro-scripts build "src/**/*.ts" && tsc
|
|
5
|
+
[34m@astrojs/cloudflare:build: [0m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @astrojs/cloudflare
|
|
2
2
|
|
|
3
|
+
## 6.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#6075](https://github.com/withastro/astro/pull/6075) [`45b41d98f`](https://github.com/withastro/astro/commit/45b41d98f50dc9f76a5004a8b3346f393f1a6cb6) Thanks [@NachoVazquez](https://github.com/NachoVazquez)! - Uses config root path as location for Cloudflare Pages Functions
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`f6fc662c3`](https://github.com/withastro/astro/commit/f6fc662c3c59d164584c6287a930fcd1c9086ee6), [`592386b75`](https://github.com/withastro/astro/commit/592386b75541f3b7f7d95c631f86024b7e2d314d), [`1b591a143`](https://github.com/withastro/astro/commit/1b591a1431b44eacd239ed8f76809916cabca1db), [`bf8d7366a`](https://github.com/withastro/astro/commit/bf8d7366acb57e1b21181cc40fff55a821d8119e), [`ec38a8921`](https://github.com/withastro/astro/commit/ec38a8921f02a275949abcababe1b8afdf8184a2), [`f20a85b64`](https://github.com/withastro/astro/commit/f20a85b642994f240d8c94260fc55ffa1fd14294), [`9f22ac3d0`](https://github.com/withastro/astro/commit/9f22ac3d097ef2cb3b2bbe5343b8a8a49d83425d), [`cee70f5c6`](https://github.com/withastro/astro/commit/cee70f5c6ac9b0d2edc1f8a6f8f5043605576026), [`ac7fb04d6`](https://github.com/withastro/astro/commit/ac7fb04d6b162f28a337918138d5737e2c0fffad), [`d1f5611fe`](https://github.com/withastro/astro/commit/d1f5611febfd020cca4078c71bafe599015edd16), [`2189170be`](https://github.com/withastro/astro/commit/2189170be523f74f244e84ccab22c655219773ce), [`32abe49bd`](https://github.com/withastro/astro/commit/32abe49bd073417b480b1b990f432a837c12eb6f)]:
|
|
10
|
+
- astro@2.0.7
|
|
11
|
+
|
|
3
12
|
## 6.1.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -138,7 +138,7 @@ function createIntegration(args) {
|
|
|
138
138
|
);
|
|
139
139
|
}
|
|
140
140
|
if (isModeDirectory) {
|
|
141
|
-
const functionsUrl = new URL(
|
|
141
|
+
const functionsUrl = new URL("functions", _config.root);
|
|
142
142
|
await fs.promises.mkdir(functionsUrl, { recursive: true });
|
|
143
143
|
const directoryUrl = new URL("[[path]].js", functionsUrl);
|
|
144
144
|
await fs.promises.rename(finalBuildUrl, directoryUrl);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/cloudflare",
|
|
3
3
|
"description": "Deploy your site to cloudflare workers or cloudflare pages",
|
|
4
|
-
"version": "6.1.
|
|
4
|
+
"version": "6.1.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"tiny-glob": "^0.2.9"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"astro": "^2.0.
|
|
35
|
+
"astro": "^2.0.7"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"astro": "2.0.
|
|
38
|
+
"astro": "2.0.7",
|
|
39
39
|
"astro-scripts": "0.0.10",
|
|
40
40
|
"chai": "^4.3.6",
|
|
41
41
|
"cheerio": "^1.0.0-rc.11",
|
package/src/index.ts
CHANGED
|
@@ -203,7 +203,7 @@ export default function createIntegration(args?: Options): AstroIntegration {
|
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
if (isModeDirectory) {
|
|
206
|
-
const functionsUrl = new URL(
|
|
206
|
+
const functionsUrl = new URL('functions', _config.root);
|
|
207
207
|
await fs.promises.mkdir(functionsUrl, { recursive: true });
|
|
208
208
|
const directoryUrl = new URL('[[path]].js', functionsUrl);
|
|
209
209
|
await fs.promises.rename(finalBuildUrl, directoryUrl);
|
package/test/directory.test.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { loadFixture
|
|
1
|
+
import { loadFixture } from './test-utils.js';
|
|
2
2
|
import { expect } from 'chai';
|
|
3
|
-
import * as cheerio from 'cheerio';
|
|
4
3
|
import cloudflare from '../dist/index.js';
|
|
5
4
|
|
|
5
|
+
/** @type {import('./test-utils').Fixture} */
|
|
6
6
|
describe('mode: "directory"', () => {
|
|
7
|
-
/** @type {import('./test-utils').Fixture} */
|
|
8
7
|
let fixture;
|
|
9
8
|
|
|
10
9
|
before(async () => {
|
|
11
10
|
fixture = await loadFixture({
|
|
12
11
|
root: './fixtures/basics/',
|
|
12
|
+
output: 'server',
|
|
13
13
|
adapter: cloudflare({ mode: 'directory' }),
|
|
14
14
|
});
|
|
15
|
+
await fixture.build();
|
|
15
16
|
});
|
|
16
17
|
|
|
17
|
-
it('
|
|
18
|
-
await fixture.
|
|
18
|
+
it('generates functions folder inside the project root', async () => {
|
|
19
|
+
expect(await fixture.pathExists('../functions')).to.be.true;
|
|
19
20
|
});
|
|
20
21
|
});
|