@dev_ailaw/venus 1.371.0 → 1.372.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.
Files changed (2) hide show
  1. package/dist/venus.es.js +3 -8
  2. package/package.json +1 -1
package/dist/venus.es.js CHANGED
@@ -848,15 +848,10 @@ const selectFolderAndCreateZip = async () => {
848
848
  if (handle.kind === "directory") {
849
849
  const currentPath = path2 ? `${path2}/${handle.name}` : handle.name;
850
850
  folderSet.add(currentPath);
851
- for await (const [, childHandle] of handle.entries()) {
851
+ for await (const entry of handle.entries()) {
852
+ const childHandle = entry[1];
852
853
  await traverseHandle(childHandle, currentPath);
853
854
  }
854
- } else if (handle.kind === "file") {
855
- const file = await handle.getFile();
856
- if (file.name.includes(".DS_Store"))
857
- return;
858
- const filePath = path2 ? `${path2}/${file.name}` : file.name;
859
- zip.file(filePath, await file.arrayBuffer());
860
855
  }
861
856
  };
862
857
  await traverseHandle(dirHandle, "");
@@ -865,7 +860,7 @@ const selectFolderAndCreateZip = async () => {
865
860
  const blob = await zip.generateAsync({ type: "blob" });
866
861
  const zipFileName = `${dirHandle.name}_package.zip`;
867
862
  return new File([blob], zipFileName, {
868
- type: "application/zip"
863
+ type: "text/plain"
869
864
  });
870
865
  }).then((result) => resolve(result)).catch((err) => {
871
866
  console.log("Directory picker cancelled or failed", err);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.371.0",
6
+ "version": "1.372.0",
7
7
  "files": [
8
8
  "dist"
9
9
  ],