New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

diginext-utils

Package Overview
Dependencies
Maintainers
2
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diginext-utils - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

babel.config.json

26

package.json
{
"name": "diginext-utils",
"version": "1.0.2",
"version": "1.0.3",
"author": {

@@ -8,14 +8,14 @@ "name": "TOP GROUP (a.k.a Digitop)",

},
"source": "index.js",
"main": "dist/main.js",
"module": "dist/module.js",
"main": "dist/index.js",
"module": "dist/index.js",
"scripts": {
"publish": "parcel build && npm publish",
"publish": "npm publish",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"watch": "parcel watch",
"build": "parcel build"
"build": "rm -rf dist && NODE_ENV=production babel src --out-dir dist --copy-files"
},
"dependencies": {
"chalk": "^5.0.1",
"dayjs": "^1.11.3",
"@babel/polyfill": "^7.12.1",
"@babel/preset-react": "^7.18.6",
"@babel/runtime": "^7.18.9",
"gsap": "^3.10.4",
"lodash": "^4.17.21"

@@ -27,6 +27,6 @@ },

"devDependencies": {
"parcel": "latest",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0"
"@babel/cli": "^7.18.10",
"@babel/core": "^7.18.10",
"@babel/preset-env": "^7.18.10"
}
}
}

@@ -1,58 +0,58 @@

import JSZip from "jszip";
import ObjectExtra from "plugins/utils/ObjectExtra";
import createDir from "../file/createDir";
const fs = require("fs");
const path = require("path");
// import JSZip from "jszip";
// import ObjectExtra from "plugins/utils/ObjectExtra";
// import createDir from "../file/createDir";
// const fs = require("fs");
// const path = require("path");
/**
*
* @param {string} zipPath
* @param {string} directory
* @param {Function} forEach
*/
const extractZip = async (zipPath, directory, forEach) => {
// let id = -1;
// let isCallcb = false;
fs.readFile(zipPath, async function (err, data) {
if (err) throw err;
JSZip.loadAsync(data)
.then(async function (zip) {
const _length = ObjectExtra.toArray(zip).length;
zip.forEach((filePath, fileObj) => {
console.log(filePath);
var fileName = path.resolve(directory, filePath);
if (fileName.indexOf(".DS_Store") >= 0) {
return;
}
if (fileName.indexOf("__MACOSX/") >= 0) {
return;
}
// /**
// *
// * @param {string} zipPath
// * @param {string} directory
// * @param {Function} forEach
// */
// const extractZip = async (zipPath, directory, forEach) => {
// // let id = -1;
// // let isCallcb = false;
// fs.readFile(zipPath, async function (err, data) {
// if (err) throw err;
// JSZip.loadAsync(data)
// .then(async function (zip) {
// const _length = ObjectExtra.toArray(zip).length;
// zip.forEach((filePath, fileObj) => {
// console.log(filePath);
// var fileName = path.resolve(directory, filePath);
// if (fileName.indexOf(".DS_Store") >= 0) {
// return;
// }
// if (fileName.indexOf("__MACOSX/") >= 0) {
// return;
// }
// console.log(fileName)
if (fileObj.dir) {
createDir(fileName);
if (forEach) forEach(fileName, false);
} else {
try {
fileObj.async("nodebuffer").then((buff) => {
fs.writeFileSync(fileName, buff);
if (forEach) forEach(fileName, true);
// // console.log(fileName)
// if (fileObj.dir) {
// createDir(fileName);
// if (forEach) forEach(fileName, false);
// } else {
// try {
// fileObj.async("nodebuffer").then((buff) => {
// fs.writeFileSync(fileName, buff);
// if (forEach) forEach(fileName, true);
// id++;
// if (id >= _length) if (callback && !isCallcb) {
// console.log("4")
// isCallcb = true;
// if (callback) callback();
// }
});
} catch (error) {
cosole.log("extractZip ERROR", error);
}
}
});
})
.then(function () {});
});
};
// // id++;
// // if (id >= _length) if (callback && !isCallcb) {
// // console.log("4")
// // isCallcb = true;
// // if (callback) callback();
// // }
// });
// } catch (error) {
// cosole.log("extractZip ERROR", error);
// }
// }
// });
// })
// .then(function () {});
// });
// };
export default extractZip;
// export default extractZip;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc