@devframes/plugin-assets 0.7.15 → 0.8.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.
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as createAssetsDevframe } from "./src-DuJ-iEes.mjs";
1
+ import { n as createAssetsDevframe } from "./src-BOFCks3-.mjs";
2
2
  import { createCac } from "devframe/adapters/cac";
3
3
  //#region src/cli.ts
4
4
  function createAssetsCli() {
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-DuJ-iEes.mjs";
1
+ import { n as createAssetsDevframe, r as DEFAULT_ALLOWED_UPLOAD_EXTENSIONS, t as assetsDevframe } from "./src-BOFCks3-.mjs";
2
2
  export { DEFAULT_ALLOWED_UPLOAD_EXTENSIONS, createAssetsDevframe, assetsDevframe as default };
@@ -1,3 +1,3 @@
1
- import { n as setupAssets, t as disposeAssetsWatcher } from "../node-qqFgpP7-.mjs";
2
- import { b as getAssetsContext, m as scanAssets, p as guessAssetType, x as resolveAssetPath, y as configureAssets } from "../rpc-lfFykVQ_.mjs";
1
+ import { n as setupAssets, t as disposeAssetsWatcher } from "../node-BYWWO6JH.mjs";
2
+ import { b as getAssetsContext, m as scanAssets, p as guessAssetType, x as resolveAssetPath, y as configureAssets } from "../rpc-BHri4K4-.mjs";
3
3
  export { configureAssets, disposeAssetsWatcher, getAssetsContext, guessAssetType, resolveAssetPath, scanAssets, setupAssets };
@@ -1,6 +1,7 @@
1
- import { _ as UPLOAD_CHANNEL, i as writeFunctions, n as readFunctions, t as alwaysFunctions, y as configureAssets } from "./rpc-lfFykVQ_.mjs";
1
+ import { _ as UPLOAD_CHANNEL, i as writeFunctions, n as readFunctions, t as alwaysFunctions, y as configureAssets } from "./rpc-BHri4K4-.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 () => watcher.close();
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