@yaakapp/cli 0.0.40 → 0.0.41

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/cli.js +2 -14
  2. package/package.json +5 -5
package/bin/cli.js CHANGED
@@ -2,24 +2,12 @@
2
2
 
3
3
  const path = require("path");
4
4
  const childProcess = require("child_process");
5
- const {BINARY_NAME} = require("../common");
6
-
7
- // Lookup table for all platforms and binary distribution packages
8
- const BINARY_DISTRIBUTION_PACKAGES = {
9
- darwin: "npm-binary-example-darwin",
10
- linux: "npm-binary-example-linux",
11
- freebsd: "npm-binary-example-linux",
12
- win32: "npm-binary-example-win32",
13
- };
14
-
15
- // Determine package name for this platform
16
- const platformSpecificPackageName =
17
- BINARY_DISTRIBUTION_PACKAGES[process.platform];
5
+ const {BINARY_NAME, PLATFORM_SPECIFIC_PACKAGE_NAME} = require("../common");
18
6
 
19
7
  function getBinaryPath() {
20
8
  try {
21
9
  // Resolving will fail if the optionalDependency was not installed
22
- return require.resolve(`${platformSpecificPackageName}/bin/${BINARY_NAME}`);
10
+ return require.resolve(`${PLATFORM_SPECIFIC_PACKAGE_NAME}/bin/${BINARY_NAME}`);
23
11
  } catch (e) {
24
12
  return path.join(__dirname, "..", BINARY_NAME);
25
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaakapp/cli",
3
- "version": "v0.0.40",
3
+ "version": "v0.0.41",
4
4
  "main": "./index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,9 +13,9 @@
13
13
  "yaakcli": "bin/cli.js"
14
14
  },
15
15
  "optionalDependencies": {
16
- "@yaakapp/cli-darwin-x64": "v0.0.40",
17
- "@yaakapp/cli-darwin-arm64": "v0.0.40",
18
- "@yaakapp/cli-linux-x64": "v0.0.40",
19
- "@yaakapp/cli-win32-x64": "v0.0.40"
16
+ "@yaakapp/cli-darwin-x64": "v0.0.41",
17
+ "@yaakapp/cli-darwin-arm64": "v0.0.41",
18
+ "@yaakapp/cli-linux-x64": "v0.0.41",
19
+ "@yaakapp/cli-win32-x64": "v0.0.41"
20
20
  }
21
21
  }