mountable-cli 0.0.0 → 0.1.0
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/README.md +9 -3
- package/bin/mountable-darwin-arm64 +0 -0
- package/bin/mountable-darwin-x64 +0 -0
- package/bin/mountable-linux-arm64 +0 -0
- package/bin/mountable-linux-x64 +0 -0
- package/bin/mountable.js +27 -2
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
# Mountable CLI
|
|
1
|
+
# Mountable CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`mountable` mounts a [Mountable](https://mountable.io) filesystem on Linux or
|
|
4
|
+
macOS (x64 and arm64).
|
|
4
5
|
|
|
5
6
|
```sh
|
|
6
|
-
npx -y mountable-cli
|
|
7
|
+
npx -y mountable-cli mount <filesystem> /mnt/work # npm
|
|
8
|
+
uvx mountable mount <filesystem> /mnt/work # PyPI
|
|
9
|
+
curl -fsSL https://mountable.io/install.sh | sh # installs to ~/.local/bin
|
|
7
10
|
```
|
|
8
11
|
|
|
12
|
+
Mounting needs FUSE (`/dev/fuse` on Linux). `mountable version` prints the CLI
|
|
13
|
+
and SeaweedFS versions.
|
|
14
|
+
|
|
9
15
|
Documentation: https://mountable.io/docs
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/mountable.js
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
// Runs the mountable binary for this platform with the same arguments,
|
|
3
|
+
// stdio, exit code and signals.
|
|
2
4
|
"use strict";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
const { spawn } = require("node:child_process");
|
|
6
|
+
const path = require("node:path");
|
|
7
|
+
|
|
8
|
+
const target = `${process.platform}-${process.arch}`;
|
|
9
|
+
if (!["linux-x64", "linux-arm64", "darwin-x64", "darwin-arm64"].includes(target)) {
|
|
10
|
+
console.error(`mountable: ${target} is not supported; Mountable runs on Linux and macOS (x64, arm64).`);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const child = spawn(path.join(__dirname, `mountable-${target}`), process.argv.slice(2), { stdio: "inherit" });
|
|
15
|
+
// `mountable mount` unmounts on SIGINT/SIGTERM, so a signal sent to this
|
|
16
|
+
// launcher must reach it.
|
|
17
|
+
for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) process.on(signal, () => child.kill(signal));
|
|
18
|
+
child.on("error", (error) => {
|
|
19
|
+
console.error(`mountable: ${error.message}`);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
});
|
|
22
|
+
child.on("exit", (code, signal) => {
|
|
23
|
+
if (signal) {
|
|
24
|
+
process.removeAllListeners(signal);
|
|
25
|
+
process.kill(process.pid, signal);
|
|
26
|
+
} else {
|
|
27
|
+
process.exit(code);
|
|
28
|
+
}
|
|
29
|
+
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mountable-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "The Mountable CLI: mount a Mountable filesystem on Linux or macOS.",
|
|
5
5
|
"homepage": "https://mountable.io/docs",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"bin": {
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"bin/"
|
|
12
12
|
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=18"
|
|
15
|
+
},
|
|
13
16
|
"repository": {
|
|
14
17
|
"type": "git",
|
|
15
18
|
"url": "git+https://github.com/writeitai/mountable.git"
|