@astrojs/cloudflare 9.0.0 → 9.0.1
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,4 +1,4 @@
|
|
|
1
|
-
import { mkdirSync, readFileSync, statSync, writeFileSync } from 'fs';
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'fs';
|
|
2
2
|
import assert from 'node:assert';
|
|
3
3
|
import { fileURLToPath } from 'url';
|
|
4
4
|
import TOML from '@iarna/toml';
|
|
@@ -111,7 +111,9 @@ class LocalRuntime {
|
|
|
111
111
|
const CF_ENDPOINT = 'https://workers.cloudflare.com/cf.json';
|
|
112
112
|
if (!this.cfObject) {
|
|
113
113
|
this.cfObject = await fetch(CF_ENDPOINT).then((res) => res.json());
|
|
114
|
-
|
|
114
|
+
if (!existsSync(this._astroConfig.cacheDir)) {
|
|
115
|
+
mkdirSync(this._astroConfig.cacheDir);
|
|
116
|
+
}
|
|
115
117
|
writeFileSync(fileURLToPath(new URL('cf.json', this._astroConfig.cacheDir)), JSON.stringify(this.cfObject), 'utf8');
|
|
116
118
|
}
|
|
117
119
|
return this.cfObject;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"//comment": "test changeset-bot",
|
|
3
3
|
"name": "@astrojs/cloudflare",
|
|
4
4
|
"description": "Deploy your site to Cloudflare Workers/Pages",
|
|
5
|
-
"version": "9.0.
|
|
5
|
+
"version": "9.0.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"author": "withastro",
|
|
@@ -47,19 +47,17 @@
|
|
|
47
47
|
"fast-glob": "^3.3.1",
|
|
48
48
|
"@types/iarna__toml": "^2.0.2",
|
|
49
49
|
"strip-ansi": "^7.1.0",
|
|
50
|
-
"astro": "^4.
|
|
51
|
-
"chai": "^4.3.10",
|
|
50
|
+
"astro": "^4.3.5",
|
|
52
51
|
"cheerio": "1.0.0-rc.12",
|
|
53
|
-
"mocha": "^10.2.0",
|
|
54
52
|
"wrangler": "^3.15.0",
|
|
55
|
-
"@astrojs/test-utils": "0.0.1"
|
|
53
|
+
"@astrojs/test-utils": "0.0.1",
|
|
54
|
+
"astro-scripts": "0.0.14"
|
|
56
55
|
},
|
|
57
56
|
"publishConfig": {
|
|
58
57
|
"provenance": true
|
|
59
58
|
},
|
|
60
59
|
"scripts": {
|
|
61
60
|
"build": "tsc",
|
|
62
|
-
"test": "
|
|
63
|
-
"test:match": "mocha --exit --timeout 30000 -g"
|
|
61
|
+
"test": "astro-scripts test \"test/**/*.test.js\""
|
|
64
62
|
}
|
|
65
63
|
}
|