masume 0.0.8 → 0.0.10
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 +3 -3
- package/bin/masume.js +15 -7
- package/checksums.txt +12 -10
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A database client for the terminal. PostgreSQL, MySQL, SQL Server, ClickHouse, SQLite and MongoDB, with an SQL editor, notebooks, an AI chat and an MCP server.
|
|
4
4
|
|
|
5
|
-
See the [project README](https://github.com/
|
|
5
|
+
See the [project README](https://github.com/masumedb/masume#readme) for the full description, the screenshots and the configuration.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -17,9 +17,9 @@ Or run it without an install:
|
|
|
17
17
|
npx masume
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
macOS and
|
|
20
|
+
macOS, Linux and Windows, on x64 and arm64. Node 18 or later.
|
|
21
21
|
|
|
22
|
-
The package holds no binary. On install it downloads the release archive for the current platform from [GitHub](https://github.com/
|
|
22
|
+
The package holds no binary. On install it downloads the release archive for the current platform from [GitHub](https://github.com/masumedb/masume/releases) and checks it against the `checksums.txt` copy inside the package. With `--ignore-scripts` the download runs on the first `masume` command instead.
|
|
23
23
|
|
|
24
24
|
## License
|
|
25
25
|
|
package/bin/masume.js
CHANGED
|
@@ -7,9 +7,11 @@ const path = require("node:path");
|
|
|
7
7
|
|
|
8
8
|
const packageDirectory = path.join(__dirname, "..");
|
|
9
9
|
const { version, goBinary } = require("../package.json");
|
|
10
|
-
const
|
|
10
|
+
const onWindows = process.platform === "win32";
|
|
11
|
+
const binaryName = onWindows ? `${goBinary.name}.exe` : goBinary.name;
|
|
12
|
+
const binaryPath = path.join(__dirname, binaryName);
|
|
11
13
|
|
|
12
|
-
const operatingSystems = { darwin: "darwin", linux: "linux" };
|
|
14
|
+
const operatingSystems = { darwin: "darwin", linux: "linux", win32: "windows" };
|
|
13
15
|
const architectures = { x64: "amd64", arm64: "arm64" };
|
|
14
16
|
|
|
15
17
|
function buildDownloadUrl() {
|
|
@@ -21,7 +23,8 @@ function buildDownloadUrl() {
|
|
|
21
23
|
return goBinary.url
|
|
22
24
|
.replace(/{{version}}/g, version)
|
|
23
25
|
.replace(/{{platform}}/g, operatingSystem)
|
|
24
|
-
.replace(/{{arch}}/g, architecture)
|
|
26
|
+
.replace(/{{arch}}/g, architecture)
|
|
27
|
+
.replace(/{{ext}}/g, onWindows ? "zip" : "tar.gz");
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
function findExpectedChecksum(archiveName) {
|
|
@@ -52,7 +55,9 @@ async function downloadArchive(url, expectedChecksum) {
|
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
function extractBinary(directory, archiveName) {
|
|
55
|
-
|
|
58
|
+
// Windows 10 and later ship bsdtar as tar, which reads a zip as well as a tar.gz.
|
|
59
|
+
const flags = onWindows ? "-xf" : "-xzf";
|
|
60
|
+
const extraction = spawnSync("tar", [flags, archiveName, binaryName], {
|
|
56
61
|
cwd: directory,
|
|
57
62
|
stdio: "inherit",
|
|
58
63
|
});
|
|
@@ -60,10 +65,13 @@ function extractBinary(directory, archiveName) {
|
|
|
60
65
|
throw new Error(`tar cannot run: ${extraction.error.message}`);
|
|
61
66
|
}
|
|
62
67
|
if (extraction.status !== 0) {
|
|
63
|
-
throw new Error(`${archiveName} holds no ${
|
|
68
|
+
throw new Error(`${archiveName} holds no ${binaryName} binary`);
|
|
64
69
|
}
|
|
65
|
-
fs.copyFileSync(path.join(directory,
|
|
66
|
-
|
|
70
|
+
fs.copyFileSync(path.join(directory, binaryName), `${binaryPath}.download`);
|
|
71
|
+
if (!onWindows) {
|
|
72
|
+
fs.chmodSync(`${binaryPath}.download`, 0o755);
|
|
73
|
+
}
|
|
74
|
+
fs.rmSync(binaryPath, { force: true });
|
|
67
75
|
fs.renameSync(`${binaryPath}.download`, binaryPath);
|
|
68
76
|
}
|
|
69
77
|
|
package/checksums.txt
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
d05d4b61c2339d801ff1711b29ec062835f4c5db586745979832f7f5b626b456 masume_0.0.10_darwin_amd64.tar.gz
|
|
2
|
+
15776aa7a003604634ae8180c722c58201a7660bbf1753478635ccbff0e83f16 masume_0.0.10_darwin_arm64.tar.gz
|
|
3
|
+
c8ae2b0f670c70138cc28dd88b14aaecc9c4767394b3e6ccebd085b3968de26c masume_0.0.10_linux_amd64.apk
|
|
4
|
+
99f287c46fc89ef4ea1b70b30fce32ad6a2713882e194ea9c45cae8a66391917 masume_0.0.10_linux_amd64.deb
|
|
5
|
+
b62f419cddda36fb4759240fa333db5f5d25b5ddac5f995f0d9482fb8f486de4 masume_0.0.10_linux_amd64.rpm
|
|
6
|
+
5d6ff9be352796a59cbba068978d9bdc442c7423aae385f73775f25ad4170e86 masume_0.0.10_linux_amd64.tar.gz
|
|
7
|
+
4a4bef5e5fabf95e90202cd1dc97b91459494e33803e8674b7e5aa886b45dd7d masume_0.0.10_linux_arm64.apk
|
|
8
|
+
fcfbf00829bbeb913d3d65b7d8217eda8de89d71997bc54ff67148edbccba087 masume_0.0.10_linux_arm64.deb
|
|
9
|
+
00f3c73e53d81ec672346d8d6b3d03b2abfac2809953ffd5e4a40fab376895ab masume_0.0.10_linux_arm64.rpm
|
|
10
|
+
f23f8cc5f592deea71e9f05d01f81249ca2e15472617fea094d24c4ac57b2216 masume_0.0.10_linux_arm64.tar.gz
|
|
11
|
+
392aa1c15900730a909c198a6e95c57bb980bb67bf086ce66e6492f2c704f0ee masume_0.0.10_windows_amd64.zip
|
|
12
|
+
58069f39a954a8c33f4c794b3788e3c3804bd17dda804404cb04109e58d04ce5 masume_0.0.10_windows_arm64.zip
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "masume",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "A database client for the terminal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"database",
|
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
"mongodb",
|
|
17
17
|
"mcp"
|
|
18
18
|
],
|
|
19
|
-
"homepage": "https://github.com/
|
|
20
|
-
"bugs": "https://github.com/
|
|
19
|
+
"homepage": "https://github.com/masumedb/masume",
|
|
20
|
+
"bugs": "https://github.com/masumedb/masume/issues",
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
23
|
-
"url": "git+https://github.com/
|
|
23
|
+
"url": "git+https://github.com/masumedb/masume.git"
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"author": "Turan Mahmudov",
|
|
27
27
|
"type": "commonjs",
|
|
28
28
|
"goBinary": {
|
|
29
29
|
"name": "masume",
|
|
30
|
-
"url": "https://github.com/
|
|
30
|
+
"url": "https://github.com/masumedb/masume/releases/download/v{{version}}/masume_{{version}}_{{platform}}_{{arch}}.{{ext}}"
|
|
31
31
|
},
|
|
32
32
|
"bin": {
|
|
33
33
|
"masume": "bin/masume.js"
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
},
|
|
45
45
|
"os": [
|
|
46
46
|
"darwin",
|
|
47
|
-
"linux"
|
|
47
|
+
"linux",
|
|
48
|
+
"win32"
|
|
48
49
|
],
|
|
49
50
|
"cpu": [
|
|
50
51
|
"x64",
|