@memlab/cli 1.0.13 → 1.0.14
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/preinstall +23 -0
- package/package.json +4 -2
package/bin/preinstall
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*
|
|
9
|
+
* @format
|
|
10
|
+
* @oncall ws_labs
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const path = require("path");
|
|
14
|
+
const fs = require("fs");
|
|
15
|
+
if (process.platform !== "win32") {
|
|
16
|
+
const memlabFile = path.join(__dirname, "../bin/memlab.js");
|
|
17
|
+
const content = fs.readFileSync(memlabFile, "UTF-8");
|
|
18
|
+
fs.writeFileSync(
|
|
19
|
+
memlabFile,
|
|
20
|
+
content.replace("#!/usr/bin/env node", "#!/usr/bin/env -S node"),
|
|
21
|
+
"UTF-8"
|
|
22
|
+
);
|
|
23
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memlab/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "command line interface for memlab",
|
|
6
6
|
"author": "Liang Gong <lgong@fb.com>",
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
],
|
|
16
16
|
"main": "dist/index.js",
|
|
17
17
|
"files": [
|
|
18
|
-
"dist"
|
|
18
|
+
"dist",
|
|
19
|
+
"bin",
|
|
20
|
+
"LICENSE"
|
|
19
21
|
],
|
|
20
22
|
"bin": {
|
|
21
23
|
"memlab": "bin/memlab.js"
|