ellm-proxy 0.0.11 → 0.0.12
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/dist/cli.js +7 -3
- package/dist/server.js +6 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -35172,7 +35172,8 @@ var AUTOSTART_CMD = "ellm-proxy-autostart.cmd";
|
|
|
35172
35172
|
var PLIST_LABEL = "com.ellm-proxy.autostart";
|
|
35173
35173
|
var LINUX_UNIT = "ellm-proxy.service";
|
|
35174
35174
|
var OPT_OUT_FILE = "autostart.opt-out";
|
|
35175
|
-
var MARKER = "ellm-proxy-
|
|
35175
|
+
var MARKER = "ellm-proxy-v3";
|
|
35176
|
+
var V2_MARKER = "ellm-proxy-v2";
|
|
35176
35177
|
var ENV_WHITELIST_PREFIX = "ELLM_";
|
|
35177
35178
|
var ENV_WHITELIST_KEYS = /* @__PURE__ */ new Set(["WEBUI_USERNAME", "WEBUI_PASSWORD"]);
|
|
35178
35179
|
function collectAutostartEnv(env10 = process.env) {
|
|
@@ -35214,6 +35215,8 @@ function windowsBody(nodePath, target) {
|
|
|
35214
35215
|
const logPath = join6(target.appDir, "logs", "autostart.log");
|
|
35215
35216
|
const lines = [
|
|
35216
35217
|
"@echo off",
|
|
35218
|
+
// echo 按 OEM 代码页(GBK)写重定向,node 按 UTF-8 写——不切页日志会两种编码混写必然一半乱码
|
|
35219
|
+
"chcp 65001 >nul",
|
|
35217
35220
|
`rem Auto-generated by "ellm-proxy autostart on" (${MARKER}). Disable with "ellm-proxy autostart off".`,
|
|
35218
35221
|
...Object.entries(target.env).map(([k, v]) => `set "${k}=${v}"`),
|
|
35219
35222
|
`>> "${logPath}" echo [%date% %time%] autostart launching.`,
|
|
@@ -35358,7 +35361,8 @@ function autostartStatus(appDir) {
|
|
|
35358
35361
|
const legacyCmd = join6(windowsStartupDir(), AUTOSTART_CMD);
|
|
35359
35362
|
if (existsSync2(legacyCmd)) {
|
|
35360
35363
|
try {
|
|
35361
|
-
if (readTextDetectingBom(legacyCmd).includes(MARKER)
|
|
35364
|
+
if (readTextDetectingBom(legacyCmd).includes(MARKER) || readTextDetectingBom(legacyCmd).includes(V2_MARKER))
|
|
35365
|
+
outdated = true;
|
|
35362
35366
|
} catch {
|
|
35363
35367
|
}
|
|
35364
35368
|
}
|
|
@@ -35400,7 +35404,7 @@ async function ensureAutostartOnStart(target) {
|
|
|
35400
35404
|
if (status.enabled) return;
|
|
35401
35405
|
if (status.optOut) return;
|
|
35402
35406
|
const { itemPath } = await enableAutostart(target);
|
|
35403
|
-
console.log(status.outdated ? `\u5DF2\
|
|
35407
|
+
console.log(status.outdated ? `\u5DF2\u66F4\u65B0\u5F00\u673A\u81EA\u542F\u9879: ${itemPath}` : `\u5DF2\u81EA\u52A8\u6CE8\u518C\u5F00\u673A\u81EA\u542F: ${itemPath}`);
|
|
35404
35408
|
console.log("\u7981\u7528\u65B9\u5F0F: ellm-proxy autostart off \u6216\u7BA1\u7406\u53F0\u8BBE\u7F6E\u9875\u3002");
|
|
35405
35409
|
} catch (err) {
|
|
35406
35410
|
console.warn(`\u5F00\u673A\u81EA\u542F\u6CE8\u518C\u5931\u8D25\uFF08\u4E0D\u5F71\u54CD\u672C\u6B21\u542F\u52A8\uFF09: ${err instanceof Error ? err.message : String(err)}`);
|
package/dist/server.js
CHANGED
|
@@ -20591,7 +20591,8 @@ var AUTOSTART_CMD = "ellm-proxy-autostart.cmd";
|
|
|
20591
20591
|
var PLIST_LABEL = "com.ellm-proxy.autostart";
|
|
20592
20592
|
var LINUX_UNIT = "ellm-proxy.service";
|
|
20593
20593
|
var OPT_OUT_FILE = "autostart.opt-out";
|
|
20594
|
-
var MARKER = "ellm-proxy-
|
|
20594
|
+
var MARKER = "ellm-proxy-v3";
|
|
20595
|
+
var V2_MARKER = "ellm-proxy-v2";
|
|
20595
20596
|
var ENV_WHITELIST_PREFIX = "ELLM_";
|
|
20596
20597
|
var ENV_WHITELIST_KEYS = /* @__PURE__ */ new Set(["WEBUI_USERNAME", "WEBUI_PASSWORD"]);
|
|
20597
20598
|
function collectAutostartEnv(env = process.env) {
|
|
@@ -20633,6 +20634,8 @@ function windowsBody(nodePath, target) {
|
|
|
20633
20634
|
const logPath = join5(target.appDir, "logs", "autostart.log");
|
|
20634
20635
|
const lines = [
|
|
20635
20636
|
"@echo off",
|
|
20637
|
+
// echo 按 OEM 代码页(GBK)写重定向,node 按 UTF-8 写——不切页日志会两种编码混写必然一半乱码
|
|
20638
|
+
"chcp 65001 >nul",
|
|
20636
20639
|
`rem Auto-generated by "ellm-proxy autostart on" (${MARKER}). Disable with "ellm-proxy autostart off".`,
|
|
20637
20640
|
...Object.entries(target.env).map(([k, v]) => `set "${k}=${v}"`),
|
|
20638
20641
|
`>> "${logPath}" echo [%date% %time%] autostart launching.`,
|
|
@@ -20777,7 +20780,8 @@ function autostartStatus(appDir) {
|
|
|
20777
20780
|
const legacyCmd = join5(windowsStartupDir(), AUTOSTART_CMD);
|
|
20778
20781
|
if (existsSync7(legacyCmd)) {
|
|
20779
20782
|
try {
|
|
20780
|
-
if (readTextDetectingBom(legacyCmd).includes(MARKER)
|
|
20783
|
+
if (readTextDetectingBom(legacyCmd).includes(MARKER) || readTextDetectingBom(legacyCmd).includes(V2_MARKER))
|
|
20784
|
+
outdated = true;
|
|
20781
20785
|
} catch {
|
|
20782
20786
|
}
|
|
20783
20787
|
}
|