rterm-backend 3.1.2 → 3.1.3
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/gybackend.cjs +36 -0
- package/package.json +2 -2
package/bin/gybackend.cjs
CHANGED
|
@@ -374858,6 +374858,7 @@ function pickBackendSnapshot(raw) {
|
|
|
374858
374858
|
cloud: raw.cloud,
|
|
374859
374859
|
agentspan: raw.agentspan,
|
|
374860
374860
|
webIntel: raw.webIntel,
|
|
374861
|
+
nats: raw.nats,
|
|
374861
374862
|
gateway: raw.gateway,
|
|
374862
374863
|
layout: raw.layout,
|
|
374863
374864
|
recursionLimit: raw.recursionLimit,
|
|
@@ -374938,6 +374939,7 @@ function normalizeBackendSettings(settings) {
|
|
|
374938
374939
|
next.cloud = normalizeCloudSettings(next.cloud);
|
|
374939
374940
|
next.agentspan = normalizeAgentspanSettings(next.agentspan);
|
|
374940
374941
|
next.webIntel = normalizeWebIntelSettings(next.webIntel);
|
|
374942
|
+
next.nats = normalizeNatsSettings(next.nats);
|
|
374941
374943
|
next.schemaVersion = BACKEND_SETTINGS_SCHEMA_VERSION;
|
|
374942
374944
|
return next;
|
|
374943
374945
|
}
|
|
@@ -375122,6 +375124,40 @@ function normalizeWebIntelSettings(raw) {
|
|
|
375122
375124
|
warmupOnInit: src.warmupOnInit === true
|
|
375123
375125
|
};
|
|
375124
375126
|
}
|
|
375127
|
+
function normalizeNatsSettings(raw) {
|
|
375128
|
+
const src = isObject5(raw) ? raw : {};
|
|
375129
|
+
const url2 = typeof src.url === "string" && src.url.trim() ? src.url.trim() : void 0;
|
|
375130
|
+
const servers = Array.isArray(src.servers) ? src.servers.filter((s) => typeof s === "string" && s.trim().length > 0).map((s) => s.trim()) : void 0;
|
|
375131
|
+
const prefix = typeof src.prefix === "string" && src.prefix.trim() ? src.prefix.trim() : void 0;
|
|
375132
|
+
const queue2 = typeof src.queue === "string" && src.queue.trim() ? src.queue.trim() : void 0;
|
|
375133
|
+
const num3 = (v) => typeof v === "number" && Number.isFinite(v) ? v : void 0;
|
|
375134
|
+
const rawAuth = isObject5(src.auth) ? src.auth : void 0;
|
|
375135
|
+
const str3 = (v) => typeof v === "string" && v.trim() ? v : void 0;
|
|
375136
|
+
const auth2 = rawAuth ? {
|
|
375137
|
+
...str3(rawAuth.token) ? { token: str3(rawAuth.token) } : {},
|
|
375138
|
+
...str3(rawAuth.username) ? { username: str3(rawAuth.username) } : {},
|
|
375139
|
+
...str3(rawAuth.password) ? { password: str3(rawAuth.password) } : {},
|
|
375140
|
+
...str3(rawAuth.nkeySeed) ? { nkeySeed: str3(rawAuth.nkeySeed) } : {},
|
|
375141
|
+
...str3(rawAuth.jwt) ? { jwt: str3(rawAuth.jwt) } : {},
|
|
375142
|
+
...str3(rawAuth.jwtSeed) ? { jwtSeed: str3(rawAuth.jwtSeed) } : {},
|
|
375143
|
+
...str3(rawAuth.creds) ? { creds: str3(rawAuth.creds) } : {},
|
|
375144
|
+
...str3(rawAuth.tlsCert) ? { tlsCert: str3(rawAuth.tlsCert) } : {},
|
|
375145
|
+
...str3(rawAuth.tlsKey) ? { tlsKey: str3(rawAuth.tlsKey) } : {},
|
|
375146
|
+
...str3(rawAuth.tlsCa) ? { tlsCa: str3(rawAuth.tlsCa) } : {}
|
|
375147
|
+
} : void 0;
|
|
375148
|
+
const hasAuth = auth2 && Object.keys(auth2).length > 0;
|
|
375149
|
+
return {
|
|
375150
|
+
enabled: src.enabled !== false,
|
|
375151
|
+
...url2 ? { url: url2 } : {},
|
|
375152
|
+
...servers && servers.length > 0 ? { servers } : {},
|
|
375153
|
+
...prefix ? { prefix } : {},
|
|
375154
|
+
...queue2 ? { queue: queue2 } : {},
|
|
375155
|
+
...num3(src.maxReconnectAttempts) !== void 0 ? { maxReconnectAttempts: num3(src.maxReconnectAttempts) } : {},
|
|
375156
|
+
...num3(src.reconnectTimeWait) !== void 0 ? { reconnectTimeWait: num3(src.reconnectTimeWait) } : {},
|
|
375157
|
+
...num3(src.timeout) !== void 0 ? { timeout: num3(src.timeout) } : {},
|
|
375158
|
+
...hasAuth ? { auth: auth2 } : {}
|
|
375159
|
+
};
|
|
375160
|
+
}
|
|
375125
375161
|
function migrateBackendToV3(settings) {
|
|
375126
375162
|
const next = { ...settings };
|
|
375127
375163
|
delete next.language;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rterm-backend",
|
|
3
|
-
"version": "3.1.
|
|
4
|
-
"description": "Headless AI-native backend for RTerm / neuralOS — v3.1.
|
|
3
|
+
"version": "3.1.3",
|
|
4
|
+
"description": "Headless AI-native backend for RTerm / neuralOS — v3.1.3: settings.nats preserved through migration (NATS mesh now configurable). v3.1.2 added the comprehensive NATS event mesh (token/user-pass/NKey/JWT/creds/TLS auth, JetStream, Key-Value, request/reply). Transports (SSH/serial/local) and SQLite install automatically.",
|
|
5
5
|
"main": "bin/gybackend.cjs",
|
|
6
6
|
"bin": { "gybackend": "bin/gybackend.cjs" },
|
|
7
7
|
"license": "MIT",
|