Skip to content

Commit

Permalink
update version for adding naming for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechsTech committed Dec 27, 2020
1 parent 2f2b5ef commit 6709435
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Full 7zip Console Commands.
The `7z` and `7za` binary on your system is located in directory: ...\...\node-7z-archive\binaries\...
```

> ____This package is a rewrite of [node-7z-forall](https://github.com/techno-express/node-7z-forall)____. The original author has removed the version it was a fork of [node-7z](https://github.com/quentinrossetti/node-7z).
> ____This package is a rewrite of [node-7z-forall](https://github.com/techno-express/node-7z-forall)____. The original author has removed the version it was a fork of [node-7z](https://github.com/quentinrossetti/node-7z). The methods are still backwards compatible with previous naming of `add`, `delete`, `extract`, `extractFull`, `list`, `rename`, `test`, `update`.
API
---
Expand Down
20 changes: 10 additions & 10 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Files, ReplaceNativeSeparator, Run } from './utility.js';
import { createSfx } from './createSfx.js';
import { isWindows } from 'node-sys';

function retry(command, options, override, progress, onprogress, resolve, reject, archive, noRetry = false) {
function retry(command, options, override, progress, onprogress, resolve, reject, archive) {
// Start the command
return Run('7z', command, options, override)
.progress(function (data) {
Expand Down Expand Up @@ -50,7 +50,7 @@ function retry(command, options, override, progress, onprogress, resolve, reject
*
* @returns {Promise} Promise
*/
export const createArchive = SevenZip.createArchive = function (filepath, files, options, override = false) {
export const createArchive = SevenZip.createArchive = SevenZip.add = function (filepath, files, options, override = false) {
return when.promise(function (resolve, reject, progress) {
/**
* When a stdout is emitted, parse each line and search for a pattern.When
Expand Down Expand Up @@ -91,7 +91,7 @@ export const createArchive = SevenZip.createArchive = function (filepath, files,
*
* @returns {Promise} Promise
*/
export const deleteArchive = SevenZip.deleteArchive = function (filepath, files, options, override = false) {
export const deleteArchive = SevenZip.deleteArchive = SevenZip.delete = function (filepath, files, options, override = false) {
return new Promise(function (resolve, reject) {

// Convert array of files into a string if needed.
Expand Down Expand Up @@ -136,7 +136,7 @@ export const deleteArchive = SevenZip.deleteArchive = function (filepath, files,
*
* @returns {Promise} Promise
*/
export const extractArchive = SevenZip.extractArchive = function (filepath, dest = '*', options = {}, override = false) {
export const extractArchive = SevenZip.extractArchive = SevenZip.extract = function (filepath, dest = '*', options = {}, override = false) {
return when.promise(function (resolve, reject, progress) {
/**
* When a stdout is emitted, parse each line and search for a pattern.When
Expand Down Expand Up @@ -175,7 +175,7 @@ export const extractArchive = SevenZip.extractArchive = function (filepath, dest
*
* @returns {Promise} Promise
*/
export const fullArchive = SevenZip.fullArchive = function (filepath, dest = '*', options = {}, override = false) {
export const fullArchive = SevenZip.fullArchive = SevenZip.extractFull = function (filepath, dest = '*', options = {}, override = false) {
return when.promise(function (resolve, reject, progress) {
/**
* When a stdout is emitted, parse each line and search for a pattern.When
Expand Down Expand Up @@ -212,7 +212,7 @@ export const fullArchive = SevenZip.fullArchive = function (filepath, dest = '*'
*
* @returns {Promise} Promise
*/
export const listArchive = SevenZip.listArchive = function (filepath, options, override = false) {
export const listArchive = SevenZip.listArchive = SevenZip.list = function (filepath, options, override = false) {
return when.promise(function (resolve, reject, progress) {
let spec = {};
/* jshint maxlen: 130 */
Expand Down Expand Up @@ -310,7 +310,7 @@ export const listArchive = SevenZip.listArchive = function (filepath, options, o
*
* @returns {Promise} Promise
*/
export const onlyArchive = SevenZip.onlyArchive = function (filepath, dest, files, options = {}, override = false) {
export const onlyArchive = SevenZip.onlyArchive = SevenZip.only = function (filepath, dest, files, options = {}, override = false) {
return when.promise(function (resolve, reject, progress) {
options = Object.assign(options, { files: files });

Expand Down Expand Up @@ -351,7 +351,7 @@ export const onlyArchive = SevenZip.onlyArchive = function (filepath, dest, file
*
* @returns {Promise} Promise
*/
export const renameArchive = SevenZip.renameArchive = function (filepath, files, options, override = false) {
export const renameArchive = SevenZip.renameArchive = SevenZip.rename = function (filepath, files, options, override = false) {
return when.promise(function (resolve, reject, progress) {
/**
* When a stdout is emitted, parse each line and search for a pattern.When
Expand Down Expand Up @@ -392,7 +392,7 @@ export const renameArchive = SevenZip.renameArchive = function (filepath, files,
*
* @returns {Promise} Promise
*/
export const testArchive = SevenZip.testArchive = function (filepath, options, override = false) {
export const testArchive = SevenZip.testArchive = SevenZip.test = function (filepath, options, override = false) {
return when.promise(function (resolve, reject, progress) {
/**
* When a stdout is emitted, parse each line and search for a pattern.When
Expand Down Expand Up @@ -431,7 +431,7 @@ export const testArchive = SevenZip.testArchive = function (filepath, options, o
*
* @returns {Promise} Promise
*/
export const updateArchive = SevenZip.updateArchive = function (filepath, files, options, override = false) {
export const updateArchive = SevenZip.updateArchive = SevenZip.update = function (filepath, files, options, override = false) {
return when.promise(function (resolve, reject, progress) {
/**
* When a stdout is emitted, parse each line and search for a pattern.When
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-7z-archive",
"version": "1.0.3",
"version": "1.0.4",
"description": "ESM front-end to 7-Zip, featuring alternative full 7z CLI tools, binaries for Linux, Windows, Mac OSX, seamlessly create 7zip SFX self extracting archives targeting different platforms.",
"type": "module",
"main": "lib/index.js",
Expand Down

0 comments on commit 6709435

Please sign in to comment.