mnemex 1.0.0 → 1.0.2
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/mnemex +22 -0
- package/package.json +1 -1
- package/scripts/postinstall.js +4 -3
- package/packages/linux-x64/README.md +0 -11
- package/packages/linux-x64/bin/mnemex +0 -0
- package/packages/linux-x64/package.json +0 -17
- package/publish.sh +0 -24
package/bin/mnemex
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { execFileSync } = require('child_process');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
|
|
6
|
+
// Find the actual binary
|
|
7
|
+
const binDir = __dirname;
|
|
8
|
+
const platform = process.platform;
|
|
9
|
+
const binName = platform === 'win32' ? 'mnemex.exe' : 'mnemex-bin';
|
|
10
|
+
const binPath = path.join(binDir, binName);
|
|
11
|
+
|
|
12
|
+
if (!fs.existsSync(binPath)) {
|
|
13
|
+
console.error('mnemex binary not found. Please reinstall: npm install -g mnemex');
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Execute the binary with all arguments
|
|
18
|
+
try {
|
|
19
|
+
execFileSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
|
|
20
|
+
} catch (err) {
|
|
21
|
+
process.exit(err.status || 1);
|
|
22
|
+
}
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -31,9 +31,10 @@ if (!pkgName) {
|
|
|
31
31
|
try {
|
|
32
32
|
const pkgPath = require.resolve(`${pkgName}/package.json`);
|
|
33
33
|
const pkgDir = path.dirname(pkgPath);
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
34
|
+
const srcBinName = PLATFORM === 'win32' ? 'mnemex.exe' : 'mnemex';
|
|
35
|
+
const destBinName = PLATFORM === 'win32' ? 'mnemex.exe' : 'mnemex-bin';
|
|
36
|
+
const srcBin = path.join(pkgDir, 'bin', srcBinName);
|
|
37
|
+
const destBin = path.join(__dirname, '..', 'bin', destBinName);
|
|
37
38
|
|
|
38
39
|
// Check if source binary exists
|
|
39
40
|
if (!fs.existsSync(srcBin)) {
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# @mnemex/linux-x64
|
|
2
|
-
|
|
3
|
-
Linux x64 binary for [mnemex](https://www.npmjs.com/package/mnemex).
|
|
4
|
-
|
|
5
|
-
This package is installed automatically as an optional dependency. You should not install this package directly.
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install -g mnemex
|
|
11
|
-
```
|
|
Binary file
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dgtise/mnemex-linux-x64",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "Mnemex binary for Linux x64",
|
|
5
|
-
"os": ["linux"],
|
|
6
|
-
"cpu": ["x64"],
|
|
7
|
-
"main": "bin/mnemex",
|
|
8
|
-
"files": ["bin/mnemex"],
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "https://github.com/dgtise25/mnemex"
|
|
12
|
-
},
|
|
13
|
-
"license": "MIT",
|
|
14
|
-
"publishConfig": {
|
|
15
|
-
"access": "public"
|
|
16
|
-
}
|
|
17
|
-
}
|
package/publish.sh
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Publish mnemex to npm
|
|
3
|
-
# Run this after `npm login`
|
|
4
|
-
|
|
5
|
-
set -e
|
|
6
|
-
|
|
7
|
-
cd "$(dirname "$0")"
|
|
8
|
-
|
|
9
|
-
echo "Publishing @dgtise/mnemex-linux-x64..."
|
|
10
|
-
cd packages/linux-x64
|
|
11
|
-
npm publish --access public
|
|
12
|
-
cd ../..
|
|
13
|
-
|
|
14
|
-
echo ""
|
|
15
|
-
echo "Publishing mnemex (main package)..."
|
|
16
|
-
npm publish --access public
|
|
17
|
-
|
|
18
|
-
echo ""
|
|
19
|
-
echo "Done! Published:"
|
|
20
|
-
echo " - @dgtise/mnemex-linux-x64@1.0.0"
|
|
21
|
-
echo " - mnemex@1.0.0"
|
|
22
|
-
echo ""
|
|
23
|
-
echo "Users can now install with:"
|
|
24
|
-
echo " npm install -g mnemex"
|