@devframes/plugin-assets 0.7.15 → 0.7.16
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/dist/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/node/index.mjs +1 -1
- package/dist/{node-qqFgpP7-.mjs → node-Bpl891iK.mjs} +5 -1
- package/dist/spa/assets/index-D9rGP3AJ.js +6 -0
- package/dist/spa/index.html +1 -1
- package/dist/{src-DuJ-iEes.mjs → src-DABuDvK7.mjs} +2 -2
- package/dist/vite.mjs +1 -1
- package/package.json +3 -3
- package/dist/spa/assets/index-E5-oQb8O.js +0 -6
package/dist/cli.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createAssetsDevframe, r as DEFAULT_ALLOWED_UPLOAD_EXTENSIONS, t as assetsDevframe } from "./src-
|
|
1
|
+
import { n as createAssetsDevframe, r as DEFAULT_ALLOWED_UPLOAD_EXTENSIONS, t as assetsDevframe } from "./src-DABuDvK7.mjs";
|
|
2
2
|
export { DEFAULT_ALLOWED_UPLOAD_EXTENSIONS, createAssetsDevframe, assetsDevframe as default };
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as setupAssets, t as disposeAssetsWatcher } from "../node-
|
|
1
|
+
import { n as setupAssets, t as disposeAssetsWatcher } from "../node-Bpl891iK.mjs";
|
|
2
2
|
import { b as getAssetsContext, m as scanAssets, p as guessAssetType, x as resolveAssetPath, y as configureAssets } from "../rpc-lfFykVQ_.mjs";
|
|
3
3
|
export { configureAssets, disposeAssetsWatcher, getAssetsContext, guessAssetType, resolveAssetPath, scanAssets, setupAssets };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { _ as UPLOAD_CHANNEL, i as writeFunctions, n as readFunctions, t as alwaysFunctions, y as configureAssets } from "./rpc-lfFykVQ_.mjs";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import fsp from "node:fs/promises";
|
|
4
|
+
import process from "node:process";
|
|
4
5
|
import { watch } from "chokidar";
|
|
5
6
|
import { debounce } from "perfect-debounce";
|
|
6
7
|
//#region src/constants.ts
|
|
@@ -28,7 +29,10 @@ function watchAssetsDir(ctx, dir) {
|
|
|
28
29
|
depth: 32
|
|
29
30
|
});
|
|
30
31
|
watcher.on("add", () => void notify()).on("unlink", () => void notify()).on("addDir", () => void notify()).on("unlinkDir", () => void notify()).on("change", () => void notify());
|
|
31
|
-
return () =>
|
|
32
|
+
return async () => {
|
|
33
|
+
await watcher.close();
|
|
34
|
+
if (process.platform === "win32") await new Promise((resolve) => setTimeout(resolve, 200));
|
|
35
|
+
};
|
|
32
36
|
}
|
|
33
37
|
//#endregion
|
|
34
38
|
//#region src/node/index.ts
|