@yaakapp/cli 0.0.10 → 0.0.11

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.
package/install.cjs CHANGED
@@ -10,7 +10,7 @@ const VERSION = "0.0.10";
10
10
  const binaryName = process.platform === "win32" ? "yaakcli.exe" : "yaakcli";
11
11
 
12
12
  // Compute the path we want to emit the binary to
13
- const binaryDstPath = path.join(__dirname, "bin", binaryName);
13
+ const binaryDstPath = path.join(__dirname, "yaakcli", binaryName);
14
14
 
15
15
  function makeRequest(url) {
16
16
  return new Promise((resolve, reject) => {
@@ -71,7 +71,7 @@ function extractFileFromTarball(tarballBuffer, filepath) {
71
71
  }
72
72
  }
73
73
 
74
- async function downloadBinaryFromNpm() {
74
+ async function downloadBinary() {
75
75
  // Download the tarball of the right binary distribution package
76
76
  const platform = process.platform === 'win32' ? 'windows' : process.platform;
77
77
  const arch = process.arch === 'x64' ? 'amd64' : process.arch;
@@ -101,12 +101,12 @@ async function downloadBinaryFromNpm() {
101
101
  }
102
102
 
103
103
  function isPlatformSpecificPackageInstalled() {
104
- return fs.existsSync(path.join(__dirname, "bin", "yaakcli"))
104
+ return fs.existsSync(binaryDstPath)
105
105
  }
106
106
 
107
107
  // Skip downloading the binary if it was already installed via optionalDependencies
108
108
  if (!isPlatformSpecificPackageInstalled()) {
109
- downloadBinaryFromNpm().catch(console.error);
109
+ downloadBinary().catch(console.error);
110
110
  } else {
111
- console.log("yaakapp binary already exists");
111
+ console.log(`yaakcli already exists at ${binaryDstPath}`);
112
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaakapp/cli",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "scripts": {
5
5
  "postinstall": "node ./install.cjs"
6
6
  },
Binary file