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

dpacker

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dpacker - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

16

dist/index.js

@@ -0,1 +1,2 @@

#!/usr/bin/env node
"use strict";

@@ -11,6 +12,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

const webpack_unpack_1 = __importDefault(require("webpack-unpack"));
if (fs_1.default.existsSync("out")) {
rimraf_1.sync("out");
const currDir = process.cwd();
const outDir = path_1.default.join(currDir, "out");
if (fs_1.default.existsSync(outDir)) {
rimraf_1.sync(outDir);
}
fs_1.default.mkdirSync("out");
fs_1.default.mkdirSync(outDir);
if (process.argv.length < 3)

@@ -30,3 +33,4 @@ console.log("invalid path provided..."), process.exit();

const newFileName = genNewFilePath(item.id);
const newFile = path_1.default.join("out", `${newFileName}.js`);
const newFile = path_1.default.join(outDir, `${newFileName}.js`);
console.log(newFile);
if (beautifyIt) {

@@ -41,5 +45,5 @@ item.source = js_beautify_1.default(item.source);

function genNewFilePath(fileName, i = 0) {
if (!fs_1.default.existsSync(path_1.default.join("out", `${fileName}.js`)))
if (!fs_1.default.existsSync(path_1.default.join(outDir, `${fileName}.js`)))
return fileName;
const p = path_1.default.join("out", `${fileName}-${i}.js`);
const p = path_1.default.join(outDir, `${fileName}-${i}.js`);
if (fs_1.default.existsSync(p)) {

@@ -46,0 +50,0 @@ genNewFilePath(fileName, ++i);

{
"name": "dpacker",
"version": "1.0.3",
"version": "1.0.4",
"main": "dist/index.js",

@@ -11,3 +11,3 @@ "license": "MIT",

"bin": {
"dpacker": "./dist/index.js"
"dpacker": "node ./dist/index.js"
},

@@ -14,0 +14,0 @@ "dependencies": {

@@ -7,7 +7,10 @@ import fs from "fs";

const currDir = process.cwd();
const outDir = path.join(currDir, "out");
// delete & remake out dir
if (fs.existsSync("out")) {
rimraf("out");
if (fs.existsSync(outDir)) {
rimraf(outDir);
}
fs.mkdirSync("out");
fs.mkdirSync(outDir);

@@ -36,3 +39,4 @@ // must be at least 3 args

const newFileName = genNewFilePath(item.id);
const newFile = path.join("out", `${newFileName}.js`);
const newFile = path.join(outDir, `${newFileName}.js`);
console.log(newFile);

@@ -50,5 +54,5 @@ if (beautifyIt) {

function genNewFilePath(fileName: string | number, i = 0) {
if (!fs.existsSync(path.join("out", `${fileName}.js`))) return fileName;
if (!fs.existsSync(path.join(outDir, `${fileName}.js`))) return fileName;
const p = path.join("out", `${fileName}-${i}.js`);
const p = path.join(outDir, `${fileName}-${i}.js`);

@@ -55,0 +59,0 @@ if (fs.existsSync(p)) {

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