From 1c72d60761f4df15a0a38b78d2939e6b6c1d3870 Mon Sep 17 00:00:00 2001 From: Nemo Date: Sun, 18 Jul 2021 17:26:38 +0530 Subject: [PATCH] Re-organize directory structure --- README.md | 4 ++-- package.json | 6 +++--- finder.js => src/finder.js | 0 fingerprint.js => src/fingerprint.js | 0 index.js => src/index.js | 0 os.js => src/os.js | 0 utils.js => src/utils.js | 0 version.js => src/version.js | 0 versions.json => src/versions.json | 0 zip.js => src/zip.js | 0 tests/finder.js | 2 +- tests/fingerprint.js | 2 +- tests/os.js | 2 +- 13 files changed, 8 insertions(+), 8 deletions(-) rename finder.js => src/finder.js (100%) rename fingerprint.js => src/fingerprint.js (100%) rename index.js => src/index.js (100%) rename os.js => src/os.js (100%) rename utils.js => src/utils.js (100%) rename version.js => src/version.js (100%) rename versions.json => src/versions.json (100%) rename zip.js => src/zip.js (100%) diff --git a/README.md b/README.md index c28f711..dea886d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # which-electron ![](https://img.shields.io/badge/Status-Beta-orange) ![npm](https://img.shields.io/npm/v/which-electron) ![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/which-electron) ![NPM](https://img.shields.io/npm/l/which-electron) -Try to find out which Electron version is bundled inside an application. +Find out which Electron version is bundled inside an application. ## Usage @@ -33,7 +33,7 @@ We attempt multiple pathways: 4. A lookup table of [hashes from various electron releases](https://github.com/captn3m0/electron-fingerprints/) is used to guess the version. In case of multiple matches, it returns a range of versions. 5. Get the electron version from the electron binary (WIP) -Note that this can be run against untrusted binaries as it does not _try to run the application_. It has been tested against various file formats: zip/dmg/exe/AppImage/tar.gz etc. It extracts limited files using 7-zip. +Note that this can be run against untrusted binaries as it does not _try to run the application_. It has been tested against various file formats: zip/dmg/exe/AppImage/tar.gz etc. It extracts limited files using 7-zip to a temporary directory at runtime if needed. ## Known Issues diff --git a/package.json b/package.json index fde2fdc..a63c271 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "which-electron", - "version": "1.0.0", + "version": "1.0.1", "description": "Guess which electron version is bundled in an application", - "main": "index.js", + "main": "src/index.js", "bin": { - "which-electron": "index.js" + "which-electron": "src/index.js" }, "scripts": { "test": "kuta tests/*.js" diff --git a/finder.js b/src/finder.js similarity index 100% rename from finder.js rename to src/finder.js diff --git a/fingerprint.js b/src/fingerprint.js similarity index 100% rename from fingerprint.js rename to src/fingerprint.js diff --git a/index.js b/src/index.js similarity index 100% rename from index.js rename to src/index.js diff --git a/os.js b/src/os.js similarity index 100% rename from os.js rename to src/os.js diff --git a/utils.js b/src/utils.js similarity index 100% rename from utils.js rename to src/utils.js diff --git a/version.js b/src/version.js similarity index 100% rename from version.js rename to src/version.js diff --git a/versions.json b/src/versions.json similarity index 100% rename from versions.json rename to src/versions.json diff --git a/zip.js b/src/zip.js similarity index 100% rename from zip.js rename to src/zip.js diff --git a/tests/finder.js b/tests/finder.js index 1d821e2..7b9e03f 100644 --- a/tests/finder.js +++ b/tests/finder.js @@ -1,5 +1,5 @@ const test = require("kuta").test; -const finder = require("../finder"); +const finder = require("../src/finder"); const assert = require("assert"); const _ = require("./utils"); diff --git a/tests/fingerprint.js b/tests/fingerprint.js index 8023d72..9aa9d08 100644 --- a/tests/fingerprint.js +++ b/tests/fingerprint.js @@ -1,5 +1,5 @@ const test = require("kuta").test; -const fp = require("../fingerprint"); +const fp = require("../src/fingerprint"); const assert = require("assert"); test("it should work with a single fingerprint", () => { diff --git a/tests/os.js b/tests/os.js index 78928f0..839bf11 100644 --- a/tests/os.js +++ b/tests/os.js @@ -1,5 +1,5 @@ const test = require('kuta').test; -const os = require('../os') +const os = require('../src/os') const assert = require('assert') const _ = require('./utils')