@harperfast/harper 5.2.5 → 5.2.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/bin/restart.ts +48 -23
- package/bin/restartExitWatchdog.ts +99 -0
- package/bin/run.ts +16 -10
- package/dist/bin/restart.js +39 -21
- package/dist/bin/restart.js.map +1 -1
- package/dist/bin/restartExitWatchdog.d.ts +5 -0
- package/dist/bin/restartExitWatchdog.js +100 -0
- package/dist/bin/restartExitWatchdog.js.map +1 -0
- package/dist/bin/run.d.ts +2 -0
- package/dist/bin/run.js +17 -10
- package/dist/bin/run.js.map +1 -1
- package/dist/resources/DatabaseTransaction.d.ts +18 -1
- package/dist/resources/DatabaseTransaction.js +63 -1
- package/dist/resources/DatabaseTransaction.js.map +1 -1
- package/dist/resources/LMDBTransaction.d.ts +2 -0
- package/dist/resources/LMDBTransaction.js +7 -1
- package/dist/resources/LMDBTransaction.js.map +1 -1
- package/dist/resources/Resource.js +5 -4
- package/dist/resources/Resource.js.map +1 -1
- package/dist/resources/ResourceInterface.d.ts +5 -0
- package/dist/resources/ResourceInterface.js.map +1 -1
- package/dist/resources/Table.js +53 -9
- package/dist/resources/Table.js.map +1 -1
- package/dist/resources/transaction.js +1 -1
- package/dist/resources/transaction.js.map +1 -1
- package/dist/server/threads/manageThreads.d.ts +1 -0
- package/dist/server/threads/manageThreads.js +20 -3
- package/dist/server/threads/manageThreads.js.map +1 -1
- package/dist/utility/processManagement/processManagement.js +21 -3
- package/dist/utility/processManagement/processManagement.js.map +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/resources/DESIGN.md +19 -19
- package/resources/DatabaseTransaction.ts +63 -2
- package/resources/LMDBTransaction.ts +7 -1
- package/resources/Resource.ts +6 -5
- package/resources/ResourceInterface.ts +5 -0
- package/resources/Table.ts +57 -8
- package/resources/transaction.ts +2 -2
- package/server/DESIGN.md +6 -0
- package/server/threads/manageThreads.js +17 -3
- package/studio/web/assets/{Chat-Lgj1d-8d.js → Chat-BNHY84-Z.js} +1 -1
- package/studio/web/assets/{FloatingChat-jLWvR4kI.js → FloatingChat-BbztUci0.js} +3 -3
- package/studio/web/assets/{apiToken-DYI4DqWa.js → apiToken-D0x_S8Wq.js} +1 -1
- package/studio/web/assets/{applications-DCmc9-lk.js → applications-BU83fSEG.js} +1 -1
- package/studio/web/assets/{index-CqbCnqsT.js → index-BQB9R8Ug.js} +4 -4
- package/studio/web/assets/{index.lazy-BNqr3j0f.js → index.lazy-CtErm5q7.js} +3 -3
- package/studio/web/assets/{notifications-Bb2cj14_.js → notifications-B8rDagJM.js} +1 -1
- package/studio/web/assets/{notifications-DVlKonbI.js → notifications-CPwYKDDH.js} +1 -1
- package/studio/web/assets/{profile-BSQWfYfq.js → profile-D0hB1xdm.js} +1 -1
- package/studio/web/assets/{regions-Dk3g8bBF.js → regions-y_jxsBpN.js} +1 -1
- package/studio/web/assets/{setComponentFile-DoITgNLb.js → setComponentFile-DSHbURTI.js} +1 -1
- package/studio/web/assets/{setup-CiEALLa7.js → setup-J5SrM1Kp.js} +1 -1
- package/studio/web/assets/{status-CK9tD-Nd.js → status-IoJkDzlx.js} +1 -1
- package/studio/web/assets/{swagger-ui-react-CxjCDFB-.js → swagger-ui-react-BlgSS25O.js} +1 -1
- package/studio/web/assets/{useEntityRestURL-Cy-0i1UZ.js → useEntityRestURL-qfahJnvr.js} +1 -1
- package/studio/web/index.html +1 -1
- package/utility/processManagement/processManagement.js +19 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./authStore-B3IhXrn6.js";import{k as t,z as n}from"./vendor-tanstack-FsM5XZNE.js";import{a as r}from"./pollUnlessForbidden-DIDXGBc5.js";import{nn as i}from"./index-
|
|
1
|
+
import{n as e}from"./authStore-B3IhXrn6.js";import{k as t,z as n}from"./vendor-tanstack-FsM5XZNE.js";import{a as r}from"./pollUnlessForbidden-DIDXGBc5.js";import{nn as i}from"./index-BQB9R8Ug.js";function a(e){return new URL(e.match(/^https?:\/\//i)?e:`https://${e}`).toString()}function o(e){if(e?.domains){for(let t of e.domains)if(t.domain)return a(t.domain)}return e?.fqdn?a(e.fqdn):null}function s(){let{clusterId:a,instanceId:s}=t({strict:!1}),c=r(),{data:l}=n(i(a));return a&&e.checkForFabricConnect(a)||s&&e.checkForFabricConnect(s)||l&&!s?o(l):c.defaults.baseURL?c.defaults.baseURL.replace(/:9925\/?/,``):null}export{s as t};
|
package/studio/web/index.html
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
} catch (e) {}
|
|
22
22
|
})();
|
|
23
23
|
</script>
|
|
24
|
-
<script type="module" crossorigin src="/assets/index-
|
|
24
|
+
<script type="module" crossorigin src="/assets/index-BQB9R8Ug.js"></script>
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-B0Z9INg1.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/vendor-core-CddkYGh5.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/vendor-datadog-XDrpA25D.js">
|
|
@@ -10,6 +10,8 @@ const path = require('node:path');
|
|
|
10
10
|
const { setTimeout: delay } = require('node:timers/promises');
|
|
11
11
|
const { execFile, fork } = require('node:child_process');
|
|
12
12
|
|
|
13
|
+
const INIT_PROCESS_NAMES = new Set(['catatonit', 'docker-init', 'dumb-init', 'init', 's6-svscan', 'systemd', 'tini']);
|
|
14
|
+
|
|
13
15
|
module.exports = {
|
|
14
16
|
start,
|
|
15
17
|
restart,
|
|
@@ -119,13 +121,27 @@ function getHdbPid() {
|
|
|
119
121
|
if (!harperPath) return;
|
|
120
122
|
const pidFile = path.join(harperPath, hdbTerms.HDB_PID_FILE);
|
|
121
123
|
const hdbPid = readPidFile(pidFile);
|
|
122
|
-
// If the pid file doesn't exist or the pid is the same as the current process, return.
|
|
123
|
-
// In a Docker container, the pid is usually 1, and so if a previous process crashed, there will still
|
|
124
|
-
// be a pid file with 1, even though this process is also 1 (and is running, but is not another harper process).
|
|
125
124
|
if (!hdbPid || hdbPid === process.pid) return;
|
|
125
|
+
// A persistent volume from an older image may contain PID 1 after the current image puts an init at that PID.
|
|
126
|
+
if (hdbPid === 1 && isInitProcess(hdbPid)) return;
|
|
126
127
|
if (isProcessRunning(hdbPid)) return hdbPid;
|
|
127
128
|
// return undefined
|
|
128
129
|
}
|
|
130
|
+
|
|
131
|
+
function isInitProcess(pid) {
|
|
132
|
+
try {
|
|
133
|
+
const executable = path.basename(fs.readlinkSync(`/proc/${pid}/exe`)).replace(/ \(deleted\)$/, '');
|
|
134
|
+
if (INIT_PROCESS_NAMES.has(executable)) return true;
|
|
135
|
+
} catch {
|
|
136
|
+
// Some procfs configurations expose the process name but restrict the executable symlink.
|
|
137
|
+
}
|
|
138
|
+
try {
|
|
139
|
+
return INIT_PROCESS_NAMES.has(fs.readFileSync(`/proc/${pid}/comm`, 'utf8').trim());
|
|
140
|
+
} catch {
|
|
141
|
+
// Fail closed: an unidentified live PID still blocks a second Harper process.
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
129
145
|
function kill() {
|
|
130
146
|
for (let process of childProcesses) {
|
|
131
147
|
process.kill();
|