@astrojs/db 0.1.22 → 0.2.0
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.
|
@@ -52,7 +52,19 @@ function fileURLIntegration() {
|
|
|
52
52
|
config = _config;
|
|
53
53
|
},
|
|
54
54
|
async "astro:build:done"() {
|
|
55
|
-
if (config.output
|
|
55
|
+
if (config.output === "static") {
|
|
56
|
+
const unlinks = [];
|
|
57
|
+
for (const fileName of fileNames) {
|
|
58
|
+
const url = new URL(fileName, config.outDir);
|
|
59
|
+
unlinks.push(fs.promises.unlink(url));
|
|
60
|
+
}
|
|
61
|
+
await Promise.all(unlinks);
|
|
62
|
+
const assetDir = new URL(config.build.assets, config.outDir);
|
|
63
|
+
const assetFiles = await fs.promises.readdir(assetDir);
|
|
64
|
+
if (!assetFiles.length) {
|
|
65
|
+
await fs.promises.rmdir(assetDir);
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
56
68
|
const moves = [];
|
|
57
69
|
for (const fileName of fileNames) {
|
|
58
70
|
const fromUrl = new URL(fileName, config.build.client);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/db",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"mocha": "^10.2.0",
|
|
65
65
|
"typescript": "^5.2.2",
|
|
66
66
|
"vite": "^4.4.11",
|
|
67
|
-
"astro
|
|
68
|
-
"astro": "
|
|
67
|
+
"astro": "4.2.4",
|
|
68
|
+
"astro-scripts": "0.0.14"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"build": "astro-scripts build \"src/**/*.ts\" && tsc",
|