@knockdata/objectexplorer 0.3.16 → 0.4.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/cli.js CHANGED
@@ -74,7 +74,12 @@ const server = await WebServer({
74
74
  const listenPort = await server.start()
75
75
  const url = `http://localhost:${listenPort}`
76
76
  console.log(`ObjectExplorer running at ${url}`)
77
- openBrowser(url)
77
+ if (args.open === "0") {
78
+ // a test driver already has a browser; opening another one is noise
79
+ }
80
+ else {
81
+ openBrowser(url)
82
+ }
78
83
 
79
84
  function seedFolder(userData, folderPath) {
80
85
  const foldersFile = path.join(userData, "folders.json")
@@ -106,12 +111,22 @@ function folderName(folderPath) {
106
111
 
107
112
  function openBrowser(target) {
108
113
  if (process.platform === "darwin") {
109
- spawn("open", [target], { stdio: "ignore", detached: true }).unref()
114
+ launch("open", [target])
110
115
  }
111
116
  else if (process.platform === "win32") {
112
- spawn(process.env.COMSPEC || "cmd.exe", ["/c", "start", "", target], { stdio: "ignore", detached: true }).unref()
117
+ launch(process.env.COMSPEC || "cmd.exe", ["/c", "start", "", target])
113
118
  }
114
119
  else {
115
- spawn("xdg-open", [target], { stdio: "ignore", detached: true }).unref()
120
+ launch("xdg-open", [target])
116
121
  }
117
122
  }
123
+
124
+ // A machine without xdg-open (a bare container, a CI runner) emits an unhandled 'error' event that
125
+ // takes the whole server down with it. The server is running by now; the browser is a convenience.
126
+ function launch(command, commandArgs) {
127
+ const child = spawn(command, commandArgs, { stdio: "ignore", detached: true })
128
+ child.on("error", function (error) {
129
+ console.log(`could not open a browser (${command}): ${error.message}`)
130
+ })
131
+ child.unref()
132
+ }
package/package.json CHANGED
@@ -1,9 +1,14 @@
1
1
  {
2
2
  "name": "@knockdata/objectexplorer",
3
- "version": "0.3.16",
3
+ "version": "0.4.0",
4
4
  "description": "The VSCode for Cloud Storage — Explore, Analyze, Search your cloud storage locally with single click",
5
5
  "type": "module",
6
6
  "license": "ISC",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/knockdata/objectexplorer.git"
10
+ },
11
+ "homepage": "https://objectexplorer.com",
7
12
  "bin": {
8
13
  "objectexplorer": "./cli.js"
9
14
  },
@@ -14,11 +19,9 @@
14
19
  "./package.json": "./package.json"
15
20
  },
16
21
  "dependencies": {
17
- "@duckdb/duckdb-wasm": "^1.32.0",
18
- "@ffmpeg/core": "0.12.10"
19
- },
20
- "optionalDependencies": {
21
- "@duckdb/node-api": "^1.5.5-r.3"
22
+ "@ffmpeg/core": "0.12.10",
23
+ "@knockdata/duckdb": "1.5.5-r.3",
24
+ "@knockdata/sqlite": "3.51.3-r.2"
22
25
  },
23
26
  "files": [
24
27
  "cli.js",
@@ -32,4 +35,4 @@
32
35
  "engines": {
33
36
  "node": ">=20"
34
37
  }
35
- }
38
+ }