@openscout/web 0.2.36 → 0.2.37
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.
|
@@ -4267,7 +4267,8 @@ function resolveBrokerServiceConfig() {
|
|
|
4267
4267
|
const supportPaths = resolveOpenScoutSupportPaths();
|
|
4268
4268
|
const supportDirectory = supportPaths.supportDirectory;
|
|
4269
4269
|
const logsDirectory = supportPaths.brokerLogsDirectory;
|
|
4270
|
-
const
|
|
4270
|
+
const rawControlHome = supportPaths.controlHome;
|
|
4271
|
+
const controlHome = /^\/(?:private\/)?tmp\//.test(rawControlHome) ? join9(homedir6(), ".openscout", "control-plane") : rawControlHome;
|
|
4271
4272
|
const brokerHost = process.env.OPENSCOUT_BROKER_HOST ?? DEFAULT_BROKER_HOST;
|
|
4272
4273
|
const brokerPort = Number.parseInt(process.env.OPENSCOUT_BROKER_PORT ?? String(DEFAULT_BROKER_PORT), 10);
|
|
4273
4274
|
const brokerUrl = process.env.OPENSCOUT_BROKER_URL ?? buildDefaultBrokerUrl(brokerHost, brokerPort);
|
|
@@ -7876,11 +7877,19 @@ function resolveDbPath() {
|
|
|
7876
7877
|
return join7(controlHome, "control-plane.sqlite");
|
|
7877
7878
|
}
|
|
7878
7879
|
var _db = null;
|
|
7880
|
+
var _dbOpenedAt = 0;
|
|
7881
|
+
var DB_REOPEN_MS = 2000;
|
|
7879
7882
|
function db() {
|
|
7883
|
+
const now = Date.now();
|
|
7884
|
+
if (_db && now - _dbOpenedAt > DB_REOPEN_MS) {
|
|
7885
|
+
_db.close();
|
|
7886
|
+
_db = null;
|
|
7887
|
+
}
|
|
7880
7888
|
if (!_db) {
|
|
7881
7889
|
_db = new Database(resolveDbPath(), { readonly: true });
|
|
7882
7890
|
_db.exec("PRAGMA busy_timeout = 5000");
|
|
7883
7891
|
_db.exec("PRAGMA journal_mode = WAL");
|
|
7892
|
+
_dbOpenedAt = now;
|
|
7884
7893
|
}
|
|
7885
7894
|
return _db;
|
|
7886
7895
|
}
|
package/dist/pair-supervisor.mjs
CHANGED
|
@@ -4842,7 +4842,8 @@ function resolveBrokerServiceConfig() {
|
|
|
4842
4842
|
const supportPaths = resolveOpenScoutSupportPaths();
|
|
4843
4843
|
const supportDirectory = supportPaths.supportDirectory;
|
|
4844
4844
|
const logsDirectory = supportPaths.brokerLogsDirectory;
|
|
4845
|
-
const
|
|
4845
|
+
const rawControlHome = supportPaths.controlHome;
|
|
4846
|
+
const controlHome = /^\/(?:private\/)?tmp\//.test(rawControlHome) ? join12(homedir11(), ".openscout", "control-plane") : rawControlHome;
|
|
4846
4847
|
const brokerHost = process.env.OPENSCOUT_BROKER_HOST ?? DEFAULT_BROKER_HOST;
|
|
4847
4848
|
const brokerPort = Number.parseInt(process.env.OPENSCOUT_BROKER_PORT ?? String(DEFAULT_BROKER_PORT), 10);
|
|
4848
4849
|
const brokerUrl = process.env.OPENSCOUT_BROKER_URL ?? buildDefaultBrokerUrl(brokerHost, brokerPort);
|
|
@@ -27965,11 +27966,19 @@ function resolveDbPath() {
|
|
|
27965
27966
|
return join15(controlHome, "control-plane.sqlite");
|
|
27966
27967
|
}
|
|
27967
27968
|
var _db = null;
|
|
27969
|
+
var _dbOpenedAt = 0;
|
|
27970
|
+
var DB_REOPEN_MS = 2000;
|
|
27968
27971
|
function db() {
|
|
27972
|
+
const now = Date.now();
|
|
27973
|
+
if (_db && now - _dbOpenedAt > DB_REOPEN_MS) {
|
|
27974
|
+
_db.close();
|
|
27975
|
+
_db = null;
|
|
27976
|
+
}
|
|
27969
27977
|
if (!_db) {
|
|
27970
27978
|
_db = new Database(resolveDbPath(), { readonly: true });
|
|
27971
27979
|
_db.exec("PRAGMA busy_timeout = 5000");
|
|
27972
27980
|
_db.exec("PRAGMA journal_mode = WAL");
|
|
27981
|
+
_dbOpenedAt = now;
|
|
27973
27982
|
}
|
|
27974
27983
|
return _db;
|
|
27975
27984
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openscout/web",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.37",
|
|
4
4
|
"description": "Standalone lightweight Scout web UI with its own bundled Bun server",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"build:server": "bun build ./server/index.ts --target=bun --format=esm --outfile ./dist/openscout-web-server.mjs && bun build ./server/pair-supervisor.ts --target=bun --format=esm --outfile ./dist/pair-supervisor.mjs",
|
|
19
19
|
"dev": "vite",
|
|
20
20
|
"prepack": "npm run build && node ../../scripts/prepare-publish-manifest.mjs .",
|
|
21
|
-
"
|
|
21
|
+
"postpublish": "node ../../scripts/restore-publish-manifest.mjs .",
|
|
22
22
|
"test:happy": "node --test test/*.test.mjs"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@noble/ciphers": "^2.1.1",
|
|
35
35
|
"@noble/curves": "^2.0.1",
|
|
36
36
|
"@noble/hashes": "^2.0.1",
|
|
37
|
-
"@openscout/protocol": "0.2.
|
|
38
|
-
"@openscout/runtime": "0.2.
|
|
37
|
+
"@openscout/protocol": "0.2.37",
|
|
38
|
+
"@openscout/runtime": "0.2.37",
|
|
39
39
|
"@trpc/server": "^11.16.0",
|
|
40
40
|
"@types/react": "^19",
|
|
41
41
|
"@types/react-dom": "^19",
|