hyper-nano 1.4.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/index.js +7 -5
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -8,15 +8,17 @@ const { dirname, join } = require('path')
8
8
  const chalk = require('chalk')
9
9
  const ora = require('ora')
10
10
 
11
- const destDir = join(dirname(__filename))
11
+ const { version } = require('../package.json')
12
+
13
+ const destDir = join(dirname('.'))
12
14
  const binaryDest = join(destDir, 'hyper-nano')
13
15
 
14
16
  function getBinary() {
15
17
  const binaries = {
16
- linux: 'hyper-x86_64-unknown-linux-gnu',
17
- win32: 'hyper-x86_64-pc-windows-msvc.exe',
18
- darwinx86_64: 'hyper-x86_64-apple-darwin',
19
- darwinarm64: 'hyper-aarch64-apple-darwin',
18
+ linux: `hyper-x86_64-unknown-linux-gnu-${version}`,
19
+ win32: `hyper-x86_64-pc-windows-msvc-${version}.exe`,
20
+ darwinx86_64: `hyper-x86_64-apple-darwin-${version}`,
21
+ darwinarm64: `hyper-aarch64-apple-darwin-${version}`,
20
22
  }
21
23
 
22
24
  const os = platform()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyper-nano",
3
- "version": "1.4.0",
3
+ "version": "2.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "In-Memory hyper http server using in-memory adapters",
6
6
  "homepage": "https://github.com/hyper63/hyper/tree/main/images/nano",