@ulpi/browse 1.0.3 → 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/bin/browse +15 -0
- package/bin/browse.ts +11 -0
- package/dist/browse.cjs +5 -3
- package/package.json +3 -2
package/bin/browse
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Resolve symlinks to find the actual package directory
|
|
3
|
+
SELF="$0"
|
|
4
|
+
while [ -L "$SELF" ]; do
|
|
5
|
+
DIR="$(cd "$(dirname "$SELF")" && pwd)"
|
|
6
|
+
SELF="$(readlink "$SELF")"
|
|
7
|
+
case "$SELF" in /*) ;; *) SELF="$DIR/$SELF" ;; esac
|
|
8
|
+
done
|
|
9
|
+
SCRIPT_DIR="$(cd "$(dirname "$SELF")/.." && pwd)"
|
|
10
|
+
CLI="$SCRIPT_DIR/dist/browse.cjs"
|
|
11
|
+
if command -v bun >/dev/null 2>&1; then
|
|
12
|
+
exec bun "$CLI" "$@"
|
|
13
|
+
else
|
|
14
|
+
exec node "$CLI" "$@"
|
|
15
|
+
fi
|
package/bin/browse.ts
ADDED
package/dist/browse.cjs
CHANGED
|
@@ -124,7 +124,7 @@ var require_package = __commonJS({
|
|
|
124
124
|
"package.json"(exports2, module2) {
|
|
125
125
|
module2.exports = {
|
|
126
126
|
name: "@ulpi/browse",
|
|
127
|
-
version: "1.0.
|
|
127
|
+
version: "1.0.5",
|
|
128
128
|
repository: {
|
|
129
129
|
type: "git",
|
|
130
130
|
url: "https://github.com/ulpi-io/browse"
|
|
@@ -138,13 +138,14 @@ var require_package = __commonJS({
|
|
|
138
138
|
"playwright-core": "^1.58.2"
|
|
139
139
|
},
|
|
140
140
|
bin: {
|
|
141
|
-
browse: "
|
|
141
|
+
browse: "bin/browse"
|
|
142
142
|
},
|
|
143
143
|
description: "Fast headless browser CLI \u2014 persistent Chromium daemon via Playwright.",
|
|
144
144
|
engines: {
|
|
145
145
|
node: ">=18.0.0"
|
|
146
146
|
},
|
|
147
147
|
files: [
|
|
148
|
+
"bin/",
|
|
148
149
|
"dist/",
|
|
149
150
|
"skill/",
|
|
150
151
|
"LICENSE",
|
|
@@ -6531,8 +6532,9 @@ async function startServer() {
|
|
|
6531
6532
|
}
|
|
6532
6533
|
} catch {
|
|
6533
6534
|
}
|
|
6535
|
+
const nodeExec = process.execPath.includes("bun") ? "node" : process.execPath;
|
|
6534
6536
|
const selfPath = (0, import_url3.fileURLToPath)(__import_meta_url);
|
|
6535
|
-
const spawnCmd = SERVER_SCRIPT === "__self__" ? [
|
|
6537
|
+
const spawnCmd = SERVER_SCRIPT === "__self__" ? [nodeExec, selfPath] : [nodeExec, "--import", "tsx", SERVER_SCRIPT];
|
|
6536
6538
|
const spawnEnv = { ...process.env, __BROWSE_SERVER_MODE: "1", BROWSE_LOCAL_DIR: LOCAL_DIR3, BROWSE_INSTANCE: BROWSE_INSTANCE2, ...cliFlags.headed ? { BROWSE_HEADED: "1" } : {}, ...cliFlags.cdpUrl ? { BROWSE_CDP_URL: cliFlags.cdpUrl } : {}, ...cliFlags.profile ? { BROWSE_PROFILE: cliFlags.profile } : {} };
|
|
6537
6539
|
const proc = (0, import_child_process3.spawn)(spawnCmd[0], spawnCmd.slice(1), {
|
|
6538
6540
|
stdio: ["ignore", "ignore", "pipe"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ulpi/browse",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/ulpi-io/browse"
|
|
@@ -14,13 +14,14 @@
|
|
|
14
14
|
"playwright-core": "^1.58.2"
|
|
15
15
|
},
|
|
16
16
|
"bin": {
|
|
17
|
-
"browse": "
|
|
17
|
+
"browse": "bin/browse"
|
|
18
18
|
},
|
|
19
19
|
"description": "Fast headless browser CLI — persistent Chromium daemon via Playwright.",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=18.0.0"
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
|
+
"bin/",
|
|
24
25
|
"dist/",
|
|
25
26
|
"skill/",
|
|
26
27
|
"LICENSE",
|