ntn 0.14.2 → 0.15.1

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/ntn CHANGED
@@ -8,6 +8,7 @@ const PLATFORMS = {
8
8
  "darwin-x64": "ntn-darwin-x64",
9
9
  "linux-arm64": "ntn-linux-arm64",
10
10
  "linux-x64": "ntn-linux-x64",
11
+ "win32-x64": "ntn-win32-x64",
11
12
  };
12
13
 
13
14
  const key = `${process.platform}-${process.arch}`;
@@ -20,7 +21,8 @@ if (!dir) {
20
21
  process.exit(1);
21
22
  }
22
23
 
23
- const bin = path.join(__dirname, "..", "dist", dir, "ntn");
24
+ const exe = process.platform === "win32" ? "ntn.exe" : "ntn";
25
+ const bin = path.join(__dirname, "..", "dist", dir, exe);
24
26
 
25
27
  try {
26
28
  const result = execFileSync(bin, process.argv.slice(2), {
Binary file
Binary file
Binary file
Binary file
Binary file
package/install.cjs CHANGED
@@ -6,6 +6,7 @@ const PLATFORMS = {
6
6
  "darwin-x64": "ntn-darwin-x64",
7
7
  "linux-arm64": "ntn-linux-arm64",
8
8
  "linux-x64": "ntn-linux-x64",
9
+ "win32-x64": "ntn-win32-x64",
9
10
  };
10
11
 
11
12
  const actions = { install, uninstall };
@@ -33,16 +34,20 @@ function install() {
33
34
  process.exit(1);
34
35
  }
35
36
 
36
- const src = path.join(__dirname, "dist", dir, "ntn");
37
- const dest = path.join(__dirname, "bin", "ntn");
37
+ const exe = process.platform === "win32" ? "ntn.exe" : "ntn";
38
+ const src = path.join(__dirname, "dist", dir, exe);
39
+ const dest = path.join(__dirname, "bin", exe);
38
40
 
39
41
  fs.mkdirSync(path.dirname(dest), { recursive: true });
40
42
  fs.copyFileSync(src, dest);
41
- fs.chmodSync(dest, 0o755);
43
+ if (process.platform !== "win32") {
44
+ fs.chmodSync(dest, 0o755);
45
+ }
42
46
  }
43
47
 
44
48
  function uninstall() {
45
- const dest = path.join(__dirname, "bin", "ntn");
49
+ const exe = process.platform === "win32" ? "ntn.exe" : "ntn";
50
+ const dest = path.join(__dirname, "bin", exe);
46
51
  try {
47
52
  fs.unlinkSync(dest);
48
53
  } catch (_) {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ntn",
3
- "version": "0.14.2",
3
+ "version": "0.15.1",
4
4
  "description": "Notion CLI",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -22,7 +22,8 @@
22
22
  },
23
23
  "os": [
24
24
  "darwin",
25
- "linux"
25
+ "linux",
26
+ "win32"
26
27
  ],
27
28
  "cpu": [
28
29
  "arm64",