@clovapi/cli 0.1.1 → 0.1.6

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/bin/clovapi.js CHANGED
@@ -1,25 +1,25 @@
1
- #!/usr/bin/env node
2
-
3
- const { spawnSync } = require("node:child_process");
4
- const fs = require("node:fs");
5
- const path = require("node:path");
6
-
7
- const exeName = process.platform === "win32" ? "clovapi.exe" : "clovapi";
8
- const binPath = path.join(__dirname, "..", "vendor", exeName);
9
-
10
- if (!fs.existsSync(binPath)) {
11
- console.error("clovapi binary is not installed.");
12
- console.error("Reinstall with: npm i -g @clovapi/cli");
13
- process.exit(1);
14
- }
15
-
16
- const result = spawnSync(binPath, process.argv.slice(2), {
17
- stdio: "inherit",
18
- });
19
-
20
- if (result.error) {
21
- console.error(result.error.message);
22
- process.exit(1);
23
- }
24
-
25
- process.exit(result.status ?? 0);
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require("node:child_process");
4
+ const fs = require("node:fs");
5
+ const path = require("node:path");
6
+
7
+ const exeName = process.platform === "win32" ? "clovapi.exe" : "clovapi";
8
+ const binPath = path.join(__dirname, "..", "vendor", exeName);
9
+
10
+ if (!fs.existsSync(binPath)) {
11
+ console.error("clovapi binary is not installed.");
12
+ console.error("Reinstall with: npm i -g @clovapi/cli");
13
+ process.exit(1);
14
+ }
15
+
16
+ const result = spawnSync(binPath, process.argv.slice(2), {
17
+ stdio: "inherit",
18
+ });
19
+
20
+ if (result.error) {
21
+ console.error(result.error.message);
22
+ process.exit(1);
23
+ }
24
+
25
+ process.exit(result.status ?? 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clovapi/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.6",
4
4
  "description": "Install clovapi CLI from GitHub Releases",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,8 +36,9 @@ function getReleaseCoordinates() {
36
36
  }
37
37
 
38
38
  const versionTag = `v${pkg.version}`;
39
+ const artifactVersion = pkg.version;
39
40
  const ext = osName === "windows" ? "zip" : "tar.gz";
40
- const archiveName = `clovapi_${versionTag}_${osName}_${archName}.${ext}`;
41
+ const archiveName = `clovapi_${artifactVersion}_${osName}_${archName}.${ext}`;
41
42
 
42
43
  return {
43
44
  osName,
package/vendor/.gitkeep CHANGED
@@ -1 +1 @@
1
-
1
+