@ffflorian/jszip-cli
Advanced tools
| import path from 'node:path'; | ||
| import fs from 'fs-extra'; | ||
| import { promises as fs } from 'node:fs'; | ||
| import JSZip from 'jszip'; | ||
@@ -4,0 +4,0 @@ import logdown from 'logdown'; |
+2
-2
| #!/usr/bin/env node | ||
| import fs from 'node:fs'; | ||
| import path from 'node:path'; | ||
| import { program as commander } from 'commander'; | ||
| import fs from 'fs-extra'; | ||
| import { JSZipCLI } from './JSZipCLI.js'; | ||
| const __dirname = import.meta.dirname; | ||
| const packageJsonPath = path.join(__dirname, '../package.json'); | ||
| const { description, name, version } = fs.readJSONSync(packageJsonPath); | ||
| const { description, name, version } = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8')); | ||
| commander | ||
@@ -10,0 +10,0 @@ .name(name.replace(/^@[^/]+\//, '')) |
@@ -0,4 +1,4 @@ | ||
| import fs from 'node:fs/promises'; | ||
| import os from 'node:os'; | ||
| import path from 'node:path'; | ||
| import fs from 'fs-extra'; | ||
| import JSZip from 'jszip'; | ||
@@ -29,3 +29,6 @@ import logdown from 'logdown'; | ||
| if (this.outputDir) { | ||
| await fs.ensureDir(this.outputDir); | ||
| try { | ||
| await fs.mkdir(this.outputDir, { recursive: true }); | ||
| } | ||
| catch (_a) { } | ||
| } | ||
@@ -53,3 +56,6 @@ const resolvedPath = path.resolve(entry); | ||
| if (entry.dir) { | ||
| await fs.ensureDir(resolvedFilePath); | ||
| try { | ||
| await fs.mkdir(resolvedFilePath, { recursive: true }); | ||
| } | ||
| catch (_b) { } | ||
| } | ||
@@ -56,0 +62,0 @@ else { |
@@ -0,3 +1,3 @@ | ||
| import fs from 'node:fs/promises'; | ||
| import path from 'node:path'; | ||
| import fs from 'fs-extra'; | ||
| import logdown from 'logdown'; | ||
@@ -28,3 +28,6 @@ export class FileService { | ||
| if (this.options.force) { | ||
| await fs.ensureDir(dirPath); | ||
| try { | ||
| await fs.mkdir(dirPath, { recursive: true }); | ||
| } | ||
| catch (_c) { } | ||
| return true; | ||
@@ -31,0 +34,0 @@ } |
+2
-4
@@ -7,3 +7,2 @@ { | ||
| "cosmiconfig": "9.0.0", | ||
| "fs-extra": "11.3.2", | ||
| "glob": "11.0.3", | ||
@@ -16,3 +15,2 @@ "jszip": "3.10.1", | ||
| "devDependencies": { | ||
| "@types/fs-extra": "11.0.4", | ||
| "@types/progress": "2.0.7", | ||
@@ -49,4 +47,4 @@ "cross-env": "10.1.0", | ||
| "type": "module", | ||
| "version": "3.9.1", | ||
| "gitHead": "f0960af4e8f76cf9995b1ac709201961c8d00dc2" | ||
| "version": "3.10.0", | ||
| "gitHead": "7af92a4eda3264ed76c22915d30080c4f12dbf55" | ||
| } |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
68238
0.41%6
-14.29%6
-14.29%732
1.24%3
-57.14%- Removed
- Removed
- Removed
- Removed
- Removed