New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rx7z

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rx7z

RxJS 7zip Interface

latest
Source
npmnpm
Version
0.0.10
Version published
Maintainers
1
Created
Source

Rx7zip

Getting Started

npm install rx7z --save

About Rx7z

Rx7z installs the latest 7zip from 7zip.org for Windows. Other operating systems (p7zip) have not been configured yet. Plans for an assumed global installation of (p)7zip via configuration is on the table for discussion.

For simplicity sake i took a redux-ish approach because i would like to implement compression ques and other features in the future.

Example

let rx7 = new Rx7z();
let files = [
    `${path.join('c:/','path','tofiles')}*.txt`,
    `${path.join('c:/','path','tofiles')}*.jpg`
];
rx7.Manager.subscribe((action: Rx7zActions) => {
    switch (action.type) {
        case Rx7zActionType.CreateArchiveProgress: {
            // contains the string value of percentage complete.
            console.log(action);
        }
        case Rx7zActionType.CreateArchiveCurrentFile: {
            // do something when current file changes.
            console.log(action);
        }
        case Rx7zActionType.CreateArchiveError: {
            console.log(action);
        }
        case Rx7zActionType.CreateArchiveFailure: {
            // do something if it fails.
        }
        case Rx7zActionType.CreateArchiveSuccess: {
            // Do something when its done.
        }
        default:
            break;
    }
})

// Dispatch the action to create an archive with the files passed in.
rx7.Archive.createArchive('./test.7z', ...files);

// Dispatch the action to create an archive with the files passed in.
rx7.dispatch(new CreateArchiveAction('output/path/to/archive.7z', files));

Keywords

rx

FAQs

Package last updated on 27 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts