stella-coder 5.3.5 → 5.3.6
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 +1 -1
- package/pnpm-workspace.yaml +1 -0
- package/stella-cli/index.mjs +1 -1
- package/stella-cli/web-parser.mjs +11 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stella-coder",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Stella Coder 5.0 — AI coding agent with Telegram bot, huge context, TDD, Git ecosystem, presentations, computer control, smart home, Office automation, and antivirus",
|
|
6
6
|
"main": "stella-cli/index.mjs",
|
package/pnpm-workspace.yaml
CHANGED
package/stella-cli/index.mjs
CHANGED
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
generateAdminCode, listAuthorizedUsers,
|
|
53
53
|
} from "./telegram-bot.mjs"
|
|
54
54
|
|
|
55
|
-
const VERSION = "5.3.
|
|
55
|
+
const VERSION = "5.3.6"
|
|
56
56
|
const CONFIG_DIR = path.join(os.homedir(), ".stella")
|
|
57
57
|
const CONFIG_PATH = path.join(CONFIG_DIR, "config.json")
|
|
58
58
|
const HISTORY_PATH = path.join(CONFIG_DIR, "history.json")
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import http from "http"
|
|
2
2
|
import https from "https"
|
|
3
|
-
|
|
3
|
+
let JSDOM
|
|
4
|
+
try { const m = await import("jsdom"); JSDOM = m.JSDOM } catch { JSDOM = null }
|
|
5
|
+
|
|
6
|
+
function requireJsdom() {
|
|
7
|
+
if (!JSDOM) throw new Error("jsdom не установлен. Установи: npm install jsdom")
|
|
8
|
+
}
|
|
4
9
|
|
|
5
10
|
function fetchUrl(url, options = {}) {
|
|
6
11
|
return new Promise((resolve, reject) => {
|
|
@@ -44,6 +49,7 @@ export class WebParser {
|
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
const result = await fetchUrl(url)
|
|
52
|
+
requireJsdom()
|
|
47
53
|
const dom = new JSDOM(result.html)
|
|
48
54
|
const doc = dom.window.document
|
|
49
55
|
|
|
@@ -100,6 +106,7 @@ export class WebParser {
|
|
|
100
106
|
|
|
101
107
|
async extractForms(url) {
|
|
102
108
|
const page = await this.fetchPage(url)
|
|
109
|
+
requireJsdom()
|
|
103
110
|
const dom = new JSDOM(page.html)
|
|
104
111
|
const doc = dom.window.document
|
|
105
112
|
|
|
@@ -126,6 +133,7 @@ export class WebParser {
|
|
|
126
133
|
if (engine === "duckduckgo") {
|
|
127
134
|
const url = `https://html.duckduckgo.com/html/?q=${encodeURIComponent(query)}`
|
|
128
135
|
const page = await this.fetchPage(url)
|
|
136
|
+
requireJsdom()
|
|
129
137
|
const dom = new JSDOM(page.html)
|
|
130
138
|
const doc = dom.window.document
|
|
131
139
|
|
|
@@ -141,6 +149,7 @@ export class WebParser {
|
|
|
141
149
|
if (engine === "google") {
|
|
142
150
|
const url = `https://www.google.com/search?q=${encodeURIComponent(query)}`
|
|
143
151
|
const page = await this.fetchPage(url)
|
|
152
|
+
requireJsdom()
|
|
144
153
|
const dom = new JSDOM(page.html)
|
|
145
154
|
const doc = dom.window.document
|
|
146
155
|
|
|
@@ -158,6 +167,7 @@ export class WebParser {
|
|
|
158
167
|
|
|
159
168
|
async getSEO(url) {
|
|
160
169
|
const page = await this.fetchPage(url)
|
|
170
|
+
requireJsdom()
|
|
161
171
|
const dom = new JSDOM(page.html)
|
|
162
172
|
const doc = dom.window.document
|
|
163
173
|
|