udsl-sdk 1.0.2 → 1.0.5
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/cli/index.js +12 -0
- package/cli/installer.js +33 -0
- package/package.json +6 -2
package/cli/index.js
ADDED
package/cli/installer.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const { execSync } = require("child_process");
|
|
2
|
+
|
|
3
|
+
function run(cmd) {
|
|
4
|
+
return execSync(cmd, { stdio: "inherit" });
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function start() {
|
|
8
|
+
console.log("🚀 Starting UDSL...");
|
|
9
|
+
|
|
10
|
+
try {
|
|
11
|
+
run("docker --version");
|
|
12
|
+
} catch {
|
|
13
|
+
console.log("❌ Docker is not installed");
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
console.log("📦 Pulling UDSL image...");
|
|
18
|
+
run("docker pull omghadage/udsl-server:latest");
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
run("docker rm -f udsl-server");
|
|
22
|
+
} catch {}
|
|
23
|
+
|
|
24
|
+
console.log("🔥 Starting server...");
|
|
25
|
+
|
|
26
|
+
run(
|
|
27
|
+
"docker run -d -p 3001:3001 --name udsl-server omghadage/udsl-server:latest"
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
console.log("✅ UDSL running at http://localhost:3001");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
module.exports = { start };
|
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "udsl-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Crash-safe data recovery SDK (WAL + Snapshot based)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
-
"dist"
|
|
8
|
+
"dist",
|
|
9
|
+
"cli"
|
|
9
10
|
],
|
|
11
|
+
"bin": {
|
|
12
|
+
"udsl": "./cli/index.js"
|
|
13
|
+
},
|
|
10
14
|
"scripts": {
|
|
11
15
|
"build": "tsc",
|
|
12
16
|
"prepublishOnly": "npm run build"
|