diginext-utils
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"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; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
Found 1 instance in 1 package
58
165776
5
5528
8
1
+ Added@babel/polyfill@^7.12.1
+ Added@babel/preset-react@^7.18.6
+ Added@babel/runtime@^7.18.9
+ Addedgsap@^3.10.4
+ Added@ampproject/remapping@2.3.0(transitive)
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/compat-data@7.26.8(transitive)
+ Added@babel/core@7.26.9(transitive)
+ Added@babel/generator@7.26.9(transitive)
+ Added@babel/helper-annotate-as-pure@7.25.9(transitive)
+ Added@babel/helper-compilation-targets@7.26.5(transitive)
+ Added@babel/helper-module-imports@7.25.9(transitive)
+ Added@babel/helper-module-transforms@7.26.0(transitive)
+ Added@babel/helper-plugin-utils@7.26.5(transitive)
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/helper-validator-option@7.25.9(transitive)
+ Added@babel/helpers@7.26.9(transitive)
+ Added@babel/parser@7.26.9(transitive)
+ Added@babel/plugin-syntax-jsx@7.25.9(transitive)
+ Added@babel/plugin-transform-react-display-name@7.25.9(transitive)
+ Added@babel/plugin-transform-react-jsx@7.25.9(transitive)
+ Added@babel/plugin-transform-react-jsx-development@7.25.9(transitive)
+ Added@babel/plugin-transform-react-pure-annotations@7.25.9(transitive)
+ Added@babel/polyfill@7.12.1(transitive)
+ Added@babel/preset-react@7.26.3(transitive)
+ Added@babel/runtime@7.26.9(transitive)
+ Added@babel/template@7.26.9(transitive)
+ Added@babel/traverse@7.26.9(transitive)
+ Added@babel/types@7.26.9(transitive)
+ Added@jridgewell/gen-mapping@0.3.8(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Addedbrowserslist@4.24.4(transitive)
+ Addedcaniuse-lite@1.0.30001700(transitive)
+ Addedconvert-source-map@2.0.0(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addedelectron-to-chromium@1.5.104(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedgensync@1.0.0-beta.2(transitive)
+ Addedglobals@11.12.0(transitive)
+ Addedgsap@3.12.7(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjsesc@3.1.0(transitive)
+ Addedjson5@2.2.3(transitive)
+ Addedlru-cache@5.1.1(transitive)
+ Addedms@2.1.3(transitive)
+ Addednode-releases@2.0.19(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedregenerator-runtime@0.13.110.14.1(transitive)
+ Addedsemver@6.3.1(transitive)
+ Addedupdate-browserslist-db@1.1.2(transitive)
+ Addedyallist@3.1.1(transitive)
- Removedchalk@^5.0.1
- Removeddayjs@^1.11.3
- Removedchalk@5.4.1(transitive)
- Removeddayjs@1.11.13(transitive)