@farhan0431/db-snap 0.0.0-stage → 0.3.8
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/dbsnap.js +34 -0
- package/binaries/aarch64-apple-darwin/dbsnap +0 -0
- package/binaries/aarch64-unknown-linux-gnu/dbsnap +0 -0
- package/binaries/x86_64-apple-darwin/dbsnap +0 -0
- package/binaries/x86_64-pc-windows-msvc/dbsnap.exe +0 -0
- package/binaries/x86_64-unknown-linux-gnu/dbsnap +0 -0
- package/binaries/x86_64-unknown-linux-musl/dbsnap +0 -0
- package/package.json +30 -4
- package/README.md +0 -3
package/bin/dbsnap.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// Run the binary bundled for this operating system and architecture.
|
|
5
|
+
const { spawn } = require("child_process");
|
|
6
|
+
const path = require("path");
|
|
7
|
+
const fs = require("fs");
|
|
8
|
+
|
|
9
|
+
function fail(message) {
|
|
10
|
+
console.error("dbsnap: " + message);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const targets = {
|
|
15
|
+
"win32-x64": "x86_64-pc-windows-msvc",
|
|
16
|
+
"darwin-arm64": "aarch64-apple-darwin",
|
|
17
|
+
"darwin-x64": "x86_64-apple-darwin",
|
|
18
|
+
"linux-arm64": "aarch64-unknown-linux-gnu",
|
|
19
|
+
};
|
|
20
|
+
const platform = `${process.platform}-${process.arch}`;
|
|
21
|
+
let target = targets[platform];
|
|
22
|
+
if (platform === "linux-x64") {
|
|
23
|
+
const report = process.report && process.report.getReport();
|
|
24
|
+
target = report && report.header.glibcVersionRuntime
|
|
25
|
+
? "x86_64-unknown-linux-gnu"
|
|
26
|
+
: "x86_64-unknown-linux-musl";
|
|
27
|
+
}
|
|
28
|
+
if (!target) fail(`no bundled binary for ${platform}`);
|
|
29
|
+
const binary = path.join(__dirname, "..", "binaries", target,
|
|
30
|
+
process.platform === "win32" ? "dbsnap.exe" : "dbsnap");
|
|
31
|
+
if (!fs.existsSync(binary)) fail(`bundled binary is missing for ${target}; reinstall @farhan0431/db-snap`);
|
|
32
|
+
const child = spawn(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
33
|
+
child.on("error", (err) => fail(`failed to launch ${binary}: ${err.message}`));
|
|
34
|
+
child.on("close", (code) => process.exit(code ?? 1));
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farhan0431/db-snap",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.3.8",
|
|
4
|
+
"description": "Instant physical database time-machine and MCP server for AI coding agents — git commit/checkout for your local database, powered by Rust.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"bin": {
|
|
7
|
+
"dbsnap": "bin/dbsnap.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin",
|
|
11
|
+
"binaries"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=16"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"database",
|
|
18
|
+
"sqlite",
|
|
19
|
+
"mcp",
|
|
20
|
+
"snapshot",
|
|
21
|
+
"ai",
|
|
22
|
+
"cursor",
|
|
23
|
+
"claude",
|
|
24
|
+
"windsurf",
|
|
25
|
+
"backup",
|
|
26
|
+
"migration"
|
|
27
|
+
],
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/farhan0431/db-snap.git"
|
|
31
|
+
}
|
|
32
|
+
}
|
package/README.md
DELETED