Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@ffflorian/jszip-cli

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ffflorian/jszip-cli - npm Package Compare versions

Comparing version
3.10.0
to
3.10.1
+1
-1
dist/BuildService.d.ts

@@ -13,3 +13,3 @@ import { TerminalOptions } from './interfaces.js';

constructor(options: Required<TerminalOptions>);
add(rawEntries: string[]): BuildService;
add(rawEntries: string[]): Promise<BuildService>;
save(): Promise<BuildService>;

@@ -16,0 +16,0 @@ /**

@@ -6,3 +6,3 @@ import path from 'node:path';

import progress from 'progress';
import { globSync } from 'glob';
import { glob } from 'glob';
import { FileService } from './FileService.js';

@@ -30,13 +30,14 @@ export class BuildService {

}
add(rawEntries) {
async add(rawEntries) {
this.logger.info(`Adding ${rawEntries.length} entr${rawEntries.length === 1 ? 'y' : 'ies'} to ZIP file.`);
const normalizedEntries = this.normalizePaths(rawEntries);
this.entries = globSync(normalizedEntries).map(rawEntry => {
this.entries = [];
for (const rawEntry of await glob(normalizedEntries)) {
const resolvedPath = path.resolve(rawEntry);
const baseName = path.basename(rawEntry);
return {
this.entries.push({
resolvedPath,
zipPath: baseName,
};
});
});
}
return this;

@@ -43,0 +44,0 @@ }

@@ -53,3 +53,3 @@ #!/usr/bin/env node

});
jszip.add(entries);
await jszip.add(entries);
const { outputFile, compressedFilesCount } = await jszip.save();

@@ -56,0 +56,0 @@ if (options.output && !options.quiet) {

@@ -18,3 +18,3 @@ import { BuildService } from './BuildService.js';

*/
add(rawEntries?: string[]): BuildService;
add(rawEntries?: string[]): Promise<BuildService>;
/**

@@ -21,0 +21,0 @@ * Add files and directories to the ZIP file.

@@ -72,3 +72,4 @@ import { cosmiconfigSync } from 'cosmiconfig';

if (this.options.mode === 'add') {
const { outputFile, compressedFilesCount } = await this.add().save();
const buildService = await this.add();
const { outputFile, compressedFilesCount } = await buildService.save();
if (this.options.outputEntry && !this.options.quiet) {

@@ -75,0 +76,0 @@ console.info(`Done compressing ${compressedFilesCount} files to "${outputFile}".`);

@@ -45,4 +45,4 @@ {

"type": "module",
"version": "3.10.0",
"gitHead": "7af92a4eda3264ed76c22915d30080c4f12dbf55"
"version": "3.10.1",
"gitHead": "eedb2984fd69190a0b69a992d18fe451e714e04d"
}