@getnote/cli 1.3.0 → 1.3.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/getnote.js +25 -0
- package/package.json +3 -3
- package/bin/getnote +0 -0
package/bin/getnote.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Platform-agnostic launcher for getnote binary
|
|
3
|
+
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
const { spawn } = require('child_process');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
const os = require('os');
|
|
9
|
+
|
|
10
|
+
const platform = os.platform();
|
|
11
|
+
const binaryName = platform === 'win32' ? 'getnote.exe' : 'getnote';
|
|
12
|
+
const binaryPath = path.join(__dirname, binaryName);
|
|
13
|
+
|
|
14
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
15
|
+
stdio: 'inherit',
|
|
16
|
+
windowsHide: true
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
child.on('exit', (code, signal) => {
|
|
20
|
+
if (signal) {
|
|
21
|
+
process.kill(process.pid, signal);
|
|
22
|
+
} else {
|
|
23
|
+
process.exit(code);
|
|
24
|
+
}
|
|
25
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getnote/cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "CLI tool for 得到大脑(Get笔记) — manage notes and knowledge bases from the terminal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"getnote",
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"bin": {
|
|
18
|
-
"getnote": "./bin/getnote"
|
|
18
|
+
"getnote": "./bin/getnote.js"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"postinstall": "node scripts/postinstall.js"
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
|
-
"bin/",
|
|
24
|
+
"bin/getnote.js",
|
|
25
25
|
"scripts/",
|
|
26
26
|
"skills/",
|
|
27
27
|
"README.md"
|
package/bin/getnote
DELETED
|
Binary file
|