@goodfoot/wiki 0.5.18 → 0.5.20
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/wiki +4 -0
- package/package.json +6 -6
- package/scripts/postinstall.js +9 -19
package/bin/wiki
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodfoot/wiki",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.20",
|
|
4
4
|
"bin": "bin/wiki",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"postinstall": "node scripts/postinstall.js",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"scripts/postinstall.js"
|
|
16
16
|
],
|
|
17
17
|
"optionalDependencies": {
|
|
18
|
-
"@goodfoot/wiki-darwin-arm64": "0.5.
|
|
19
|
-
"@goodfoot/wiki-darwin-x64": "0.5.
|
|
20
|
-
"@goodfoot/wiki-linux-arm64": "0.5.
|
|
21
|
-
"@goodfoot/wiki-linux-x64": "0.5.
|
|
22
|
-
"@goodfoot/wiki-win32-x64": "0.5.
|
|
18
|
+
"@goodfoot/wiki-darwin-arm64": "0.5.20",
|
|
19
|
+
"@goodfoot/wiki-darwin-x64": "0.5.20",
|
|
20
|
+
"@goodfoot/wiki-linux-arm64": "0.5.20",
|
|
21
|
+
"@goodfoot/wiki-linux-x64": "0.5.20",
|
|
22
|
+
"@goodfoot/wiki-win32-x64": "0.5.20"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
package/scripts/postinstall.js
CHANGED
|
@@ -27,7 +27,6 @@ function main() {
|
|
|
27
27
|
|
|
28
28
|
const packageName = `@goodfoot/wiki-${platform}-${arch}`;
|
|
29
29
|
const sourceBinaryName = process.platform === 'win32' ? 'wiki.exe' : 'wiki';
|
|
30
|
-
const runtimeBinaryName = 'wiki';
|
|
31
30
|
|
|
32
31
|
let packageDir;
|
|
33
32
|
try {
|
|
@@ -44,32 +43,23 @@ function main() {
|
|
|
44
43
|
process.exit(0);
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
const
|
|
48
|
-
const runtimeBinary = path.join(targetDir, runtimeBinaryName);
|
|
46
|
+
const binWiki = path.join(__dirname, '..', 'bin', 'wiki');
|
|
49
47
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
fs.unlinkSync(targetPath);
|
|
55
|
-
} catch {
|
|
56
|
-
// Ignore if it doesn't exist
|
|
57
|
-
}
|
|
48
|
+
try {
|
|
49
|
+
fs.unlinkSync(binWiki);
|
|
50
|
+
} catch {
|
|
51
|
+
// Ignore if it doesn't exist
|
|
58
52
|
}
|
|
59
53
|
|
|
60
54
|
// Try symlink first, fall back to copy
|
|
61
55
|
try {
|
|
62
|
-
fs.symlinkSync(sourceBinary,
|
|
56
|
+
fs.symlinkSync(sourceBinary, binWiki);
|
|
63
57
|
} catch {
|
|
64
|
-
fs.copyFileSync(sourceBinary,
|
|
65
|
-
fs.chmodSync(
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (sourceBinaryName !== runtimeBinaryName) {
|
|
69
|
-
fs.copyFileSync(runtimeBinary, path.join(targetDir, sourceBinaryName));
|
|
58
|
+
fs.copyFileSync(sourceBinary, binWiki);
|
|
59
|
+
fs.chmodSync(binWiki, 0o755);
|
|
70
60
|
}
|
|
71
61
|
|
|
72
|
-
console.log(`@goodfoot/wiki: Installed
|
|
62
|
+
console.log(`@goodfoot/wiki: Installed wiki from ${packageName}`);
|
|
73
63
|
}
|
|
74
64
|
|
|
75
65
|
main();
|