Skip to content

Commit

Permalink
Modified NPM install after testing
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Shanley <dave@quobix.com>
  • Loading branch information
daveshanley committed Jul 19, 2022
1 parent 23dad99 commit 1055ed7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 25 deletions.
10 changes: 5 additions & 5 deletions npm-install/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ export const CONFIG = {
url: "https://github.com/daveshanley/vacuum/releases/download/v{{version}}/{{bin_name}}_{{version}}_{{platform}}_{{arch}}.tar.gz",
};
export const ARCH_MAPPING = {
ia32: "386",
x64: "amd64",
ia32: "i386",
x64: "x86_64",
arm64: "arm64",
};
export const PLATFORM_MAPPING = {
darwin: "darwin",
linux: "linux",
win32: "windows",
darwin: "Darwin",
linux: "Linux",
win32: "Windows",
};
2 changes: 2 additions & 0 deletions npm-install/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ async function install() {
url = url.replace(/{{version}}/g, version);
url = url.replace(/{{bin_name}}/g, binName);


console.log('fetching from URL', url)
const response = await fetch(url);
if (!response.ok) {
throw new Error("Failed fetching the binary: " + response.statusText);
Expand Down
20 changes: 3 additions & 17 deletions package-lock.json

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

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@quobix/vacuum",
"version": "0.0.12",
"version": "0.0.13",
"description": "The world's fastest, most scalable and complete OpenAPI parser",
"type": "module",
"author": "Dave Shanley",
Expand All @@ -24,8 +24,7 @@
],
"dependencies": {
"node-fetch": "^3.1.0",
"tar": "^6.1.11",
"vacuum": "^0.1.3"
"tar": "^6.1.11"
},
"bugs": {
"url": "https://github.com/daveshanley/vacuum/issues"
Expand Down

0 comments on commit 1055ed7

Please sign in to comment.