@mammothb/pi-web 6.0.0 → 6.0.2
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/package.json +2 -2
- package/searxng/.env +16 -0
- package/src/lib/headers.ts +1 -1
- package/src/lib/searxng-manager.ts +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mammothb/pi-web",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "A pi extension that adds WebFetch and WebSearch tools for fetching and searching web content",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"htmlparser2": "12.0.0",
|
|
25
25
|
"turndown": "7.2.4",
|
|
26
|
-
"@mammothb/pi-shared": "1.4.
|
|
26
|
+
"@mammothb/pi-shared": "1.4.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/turndown": "5.0.6"
|
package/searxng/.env
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Read the documentation before using the `docker-compose.yml` file:
|
|
2
|
+
# https://docs.searxng.org/admin/installation-docker.html
|
|
3
|
+
#
|
|
4
|
+
# Additional ENVs:
|
|
5
|
+
# https://docs.searxng.org/admin/settings/settings_general.html#settings-general
|
|
6
|
+
# https://docs.searxng.org/admin/settings/settings_server.html#settings-server
|
|
7
|
+
|
|
8
|
+
# Use a specific version tag. E.g. "latest" or "2026.3.25-541c6c3cb".
|
|
9
|
+
#SEARXNG_VERSION=latest
|
|
10
|
+
|
|
11
|
+
# Listen to a specific address.
|
|
12
|
+
#SEARXNG_HOST=[::]
|
|
13
|
+
|
|
14
|
+
# Listen to a specific port.
|
|
15
|
+
SEARXNG_PORT=8080
|
|
16
|
+
FORCE_OWNERSHIP=false
|
package/src/lib/headers.ts
CHANGED
|
@@ -106,18 +106,16 @@ export function runScript(
|
|
|
106
106
|
// The wrapper creates shutdown-<pid>.pid, runs the script, then
|
|
107
107
|
// removes the file. If the file remains on next startup, the
|
|
108
108
|
// shutdown was unclean.
|
|
109
|
+
// NOSONAR — CLI tool, PATH is user-controlled
|
|
109
110
|
const child = spawn(
|
|
110
111
|
"bash",
|
|
111
112
|
[
|
|
112
113
|
"-c",
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
rm -f "$PID_FILE"
|
|
119
|
-
exit $EXIT
|
|
120
|
-
`,
|
|
114
|
+
'PID_FILE="$1/shutdown-$$.pid"\necho $$ > "$PID_FILE"\n"$2" "$3"\nEXIT=$?\nrm -f "$PID_FILE"\nexit $EXIT',
|
|
115
|
+
"sh",
|
|
116
|
+
opts.shutdownPidDir,
|
|
117
|
+
script,
|
|
118
|
+
command,
|
|
121
119
|
],
|
|
122
120
|
{
|
|
123
121
|
stdio: "ignore",
|
|
@@ -132,6 +130,7 @@ export function runScript(
|
|
|
132
130
|
});
|
|
133
131
|
} else {
|
|
134
132
|
const child = spawn("bash", [script, command], {
|
|
133
|
+
// NOSONAR — CLI tool, PATH is user-controlled
|
|
135
134
|
stdio: "ignore",
|
|
136
135
|
detached: true,
|
|
137
136
|
});
|
|
@@ -148,6 +147,7 @@ export function runScript(
|
|
|
148
147
|
// Default mode: wait for completion, capture output
|
|
149
148
|
return new Promise((resolve, reject) => {
|
|
150
149
|
const child = spawn("bash", [script, command], {
|
|
150
|
+
// NOSONAR — CLI tool, PATH is user-controlled
|
|
151
151
|
stdio: "pipe",
|
|
152
152
|
});
|
|
153
153
|
|