layerbase 0.0.1 → 0.0.3

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 ADDED
@@ -0,0 +1,11 @@
1
+ # layerbase
2
+
3
+ ## A module for layerbase database tool
4
+
5
+ ## Status:
6
+
7
+ ```json
8
+ {
9
+ "published": false
10
+ }
11
+ ```
package/bin/main.js ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawn } from "node:child_process";
4
+
5
+ // migration in progress from spindb and hostdb
6
+ function detectPackageManager() {
7
+ const userAgent = process.env.npm_config_user_agent || "";
8
+
9
+ if (userAgent.startsWith("pnpm")) {
10
+ return "pnpx";
11
+ }
12
+ if (userAgent.startsWith("bun")) {
13
+ return "bunx";
14
+ }
15
+ return "npx";
16
+ }
17
+
18
+ const runner = detectPackageManager();
19
+
20
+ spawn(runner, ["spindb"], { stdio: "inherit" });
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "layerbase",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Layerbase CLI",
5
5
  "type": "module",
6
6
  "bin": {
7
- "layerbase": "./bin/layerbase.js"
7
+ "layerbase": "./bin/main.js"
8
8
  },
9
9
  "files": [
10
10
  "bin"
package/bin/layerbase.js DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- console.log('in progress')