Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
d8709d8b94 | |||
43799f3431 | |||
f4cbdd51e1 | |||
1340c1c248 |
13
changelog.md
13
changelog.md
@@ -1,5 +1,18 @@
|
||||
# Changelog
|
||||
|
||||
## 2025-08-30 - 5.4.2 - fix(cli/process/logs)
|
||||
Reset log sequence on process restart to avoid false log gap warnings
|
||||
|
||||
- Track process runId when streaming logs and initialize lastRunId from fetched logs
|
||||
- When a new runId is detected, reset lastSeq so that subsequent streamed logs are accepted (prevents spurious gap warnings)
|
||||
- Emit an informational message when a restart/runId change is detected to aid debugging of log streams
|
||||
|
||||
## 2025-08-30 - 5.4.1 - fix(processmonitor)
|
||||
Bump tsbuild devDependency and relax ps-tree callback typing in ProcessMonitor
|
||||
|
||||
- Update devDependency @git.zone/tsbuild from ^2.6.7 to ^2.6.8
|
||||
- Change psTree callback types in ts/daemon/processmonitor.ts to accept any error and ReadonlyArray for children to improve type compatibility
|
||||
|
||||
## 2025-08-30 - 5.4.0 - feat(daemon)
|
||||
Add CLI systemd service refresh on version mismatch and fix daemon memory leak; update dependencies
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@git.zone/tspm",
|
||||
"version": "5.4.0",
|
||||
"version": "5.4.2",
|
||||
"private": false,
|
||||
"description": "a no fuzz process manager",
|
||||
"main": "dist_ts/index.js",
|
||||
@@ -24,7 +24,7 @@
|
||||
"tspm": "./cli.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@git.zone/tsbuild": "^2.6.7",
|
||||
"@git.zone/tsbuild": "^2.6.8",
|
||||
"@git.zone/tsbundle": "^2.5.1",
|
||||
"@git.zone/tsrun": "^1.2.46",
|
||||
"@git.zone/tstest": "^2.3.5",
|
||||
|
58
pnpm-lock.yaml
generated
58
pnpm-lock.yaml
generated
@@ -49,8 +49,8 @@ importers:
|
||||
version: 4.20.5
|
||||
devDependencies:
|
||||
'@git.zone/tsbuild':
|
||||
specifier: ^2.6.7
|
||||
version: 2.6.7
|
||||
specifier: ^2.6.8
|
||||
version: 2.6.8
|
||||
'@git.zone/tsbundle':
|
||||
specifier: ^2.5.1
|
||||
version: 2.5.1
|
||||
@@ -536,8 +536,8 @@ packages:
|
||||
'@esm-bundle/chai@4.3.4-fix.0':
|
||||
resolution: {integrity: sha512-26SKdM4uvDWlY8/OOOxSB1AqQWeBosCX3wRYUZO7enTAj03CtVxIiCimYVG2WpULcyV51qapK4qTovwkUr5Mlw==}
|
||||
|
||||
'@git.zone/tsbuild@2.6.7':
|
||||
resolution: {integrity: sha512-nLRYk1V4gxdEAp5mbLYNdr/in9mFA26L4MPKBKqzASID4lXSYya5sDbLRdDTv+mD0ZRBgdn6e+WMylA0SU4hSw==}
|
||||
'@git.zone/tsbuild@2.6.8':
|
||||
resolution: {integrity: sha512-g1z7+MxiYD0xMfuqn8NSWitbfK1OaF0Qolmw7WOmUsHmNF60T1AR02Lo4DtNmnjSpchA+xzDFAQzL1xTcQA39w==}
|
||||
hasBin: true
|
||||
|
||||
'@git.zone/tsbundle@2.5.1':
|
||||
@@ -775,8 +775,8 @@ packages:
|
||||
'@push.rocks/isounique@1.0.5':
|
||||
resolution: {integrity: sha512-Z0BVqZZOCif1THTbIKWMgg0wxCzt9CyBtBBqQJiZ+jJ0KlQFrQHNHrPt81/LXe/L4x0cxWsn0bpL6W5DNSvNLw==}
|
||||
|
||||
'@push.rocks/levelcache@3.1.1':
|
||||
resolution: {integrity: sha512-+JpDNEt+EuvmbtADGH9SkODxBy+slHDDzs43mAbuMbwpVvi6uNuMK0Mkhrfz9UFpxUSp+cJE/jl/OxdpD0xL1A==}
|
||||
'@push.rocks/levelcache@3.2.0':
|
||||
resolution: {integrity: sha512-Ch0Oguta2I0SVi704kHghhBcgfyfS92ua1elRu9d8X1/9LMRYuqvvBAnyXyFxQzI3S8q8QC6EkRdd8CAAYSzRg==}
|
||||
|
||||
'@push.rocks/lik@6.1.0':
|
||||
resolution: {integrity: sha512-BoSAIRFNryQ8Sd5EP+35ZBj6vAQ1C60/XjZIO2O65XDyLG8xz7xJ+u5Wm8/fjIJ0WX3h8GkkaCz2tJM34nFT3A==}
|
||||
@@ -811,6 +811,9 @@ packages:
|
||||
'@push.rocks/smartcache@1.0.16':
|
||||
resolution: {integrity: sha512-UAXf74eDuH4/RebJhydIbHlYVR3ACYJjniEY/9ZePblu7bIPgwFZqLBE9g1lcKVogbH9yY62dk3rSpgBzenyfQ==}
|
||||
|
||||
'@push.rocks/smartcache@1.0.18':
|
||||
resolution: {integrity: sha512-3+cmLu9chbnmi4yD4kjlFP/Tn4NReaZIoicEcGTtwbcokTrSDMs3YPdJzIpDZkAs83PW7OcVSHa3Ak5KU5OWzA==}
|
||||
|
||||
'@push.rocks/smartchok@1.1.1':
|
||||
resolution: {integrity: sha512-WmNigGmn1muBJMANVuJb4F8x3TzgYrnn6YZm6ixTsG+0WFbYevivEwp+J4S7npobLHsR7ynf+Ky8LxRYmsL50A==}
|
||||
|
||||
@@ -838,6 +841,9 @@ packages:
|
||||
'@push.rocks/smartenv@5.0.13':
|
||||
resolution: {integrity: sha512-ACXmUcHZHl2CF2jnVuRw9saRRrZvJblCRs2d+K5aLR1DfkYFX3eA21kcMlKeLisI3aGNbIj9vz/rowN5qkRkfA==}
|
||||
|
||||
'@push.rocks/smarterror@2.0.1':
|
||||
resolution: {integrity: sha512-iCcH1D8tlDJgMFsaJ6lhdOTKhbU0KoprNv9MRP9o7691QOx4JEDXiHtr/lNtxVo8BUtdb9CF6kazaknO9KuORA==}
|
||||
|
||||
'@push.rocks/smartexit@1.0.23':
|
||||
resolution: {integrity: sha512-WmwKYcwbHBByoABhHHB+PAjr5475AtD/xBh1mDcqPrFsOOUOZq3BBUdpq25wI3ccu/SZB5IwaimiVzadls6HkA==}
|
||||
|
||||
@@ -1018,6 +1024,9 @@ packages:
|
||||
'@push.rocks/tapbundle@6.0.3':
|
||||
resolution: {integrity: sha512-SuP14V6TPdtd1y1CYTvwTKJdpHa7EzY55NfaaEMxW4oRKvHgJiOiPEiR/IrtL9tSiDMSfrx12waTMgZheYaBug==}
|
||||
|
||||
'@push.rocks/taskbuffer@3.1.10':
|
||||
resolution: {integrity: sha512-jT+FxRSk0+IP17q9LD1/Ks8GJBn5TZWgLtfnKRHW/LAZ1bHX/2ARZvAV8fm1T4WMU5s7PyId+y4fkoohG/5Nkg==}
|
||||
|
||||
'@push.rocks/taskbuffer@3.1.7':
|
||||
resolution: {integrity: sha512-QktGVJPucqQmW/QNGnscf4FAigT1H7JWKFGFdRuDEaOHKFh9qN+PXG3QY7DtZ4jfXdGLxPN4yAufDuPSAJYFnw==}
|
||||
|
||||
@@ -5611,7 +5620,7 @@ snapshots:
|
||||
dependencies:
|
||||
'@types/chai': 4.3.20
|
||||
|
||||
'@git.zone/tsbuild@2.6.7':
|
||||
'@git.zone/tsbuild@2.6.8':
|
||||
dependencies:
|
||||
'@git.zone/tspublish': 1.10.3
|
||||
'@push.rocks/early': 4.0.4
|
||||
@@ -6027,21 +6036,21 @@ snapshots:
|
||||
|
||||
'@push.rocks/isounique@1.0.5': {}
|
||||
|
||||
'@push.rocks/levelcache@3.1.1':
|
||||
'@push.rocks/levelcache@3.2.0':
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.2.2
|
||||
'@push.rocks/smartbucket': 3.3.10
|
||||
'@push.rocks/smartcache': 1.0.16
|
||||
'@push.rocks/smartcache': 1.0.18
|
||||
'@push.rocks/smartenv': 5.0.13
|
||||
'@push.rocks/smartexit': 1.0.23
|
||||
'@push.rocks/smartfile': 11.2.7
|
||||
'@push.rocks/smartjson': 5.0.20
|
||||
'@push.rocks/smartpath': 5.1.0
|
||||
'@push.rocks/smartpath': 6.0.0
|
||||
'@push.rocks/smartpromise': 4.2.3
|
||||
'@push.rocks/smartstring': 4.0.15
|
||||
'@push.rocks/smartunique': 3.0.9
|
||||
'@push.rocks/taskbuffer': 3.1.7
|
||||
'@tsclass/tsclass': 4.4.4
|
||||
'@push.rocks/taskbuffer': 3.1.10
|
||||
'@tsclass/tsclass': 9.2.0
|
||||
transitivePeerDependencies:
|
||||
- aws-crt
|
||||
|
||||
@@ -6170,6 +6179,14 @@ snapshots:
|
||||
'@pushrocks/smartpromise': 3.1.10
|
||||
'@pushrocks/smarttime': 4.0.1
|
||||
|
||||
'@push.rocks/smartcache@1.0.18':
|
||||
dependencies:
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smarterror': 2.0.1
|
||||
'@push.rocks/smarthash': 3.2.3
|
||||
'@push.rocks/smartpromise': 4.2.3
|
||||
'@push.rocks/smarttime': 4.1.1
|
||||
|
||||
'@push.rocks/smartchok@1.1.1':
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.2.2
|
||||
@@ -6249,6 +6266,11 @@ snapshots:
|
||||
dependencies:
|
||||
'@push.rocks/smartpromise': 4.2.3
|
||||
|
||||
'@push.rocks/smarterror@2.0.1':
|
||||
dependencies:
|
||||
clean-stack: 1.3.0
|
||||
make-error-cause: 2.3.0
|
||||
|
||||
'@push.rocks/smartexit@1.0.23':
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.1.0
|
||||
@@ -6455,7 +6477,7 @@ snapshots:
|
||||
'@push.rocks/smartnpm@2.0.6':
|
||||
dependencies:
|
||||
'@push.rocks/consolecolor': 2.0.3
|
||||
'@push.rocks/levelcache': 3.1.1
|
||||
'@push.rocks/levelcache': 3.2.0
|
||||
'@push.rocks/smartarchive': 4.2.2
|
||||
'@push.rocks/smartfile': 11.2.7
|
||||
'@push.rocks/smartpath': 6.0.0
|
||||
@@ -6757,6 +6779,16 @@ snapshots:
|
||||
- supports-color
|
||||
- utf-8-validate
|
||||
|
||||
'@push.rocks/taskbuffer@3.1.10':
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.2.2
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartlog': 3.1.8
|
||||
'@push.rocks/smartpromise': 4.2.3
|
||||
'@push.rocks/smartrx': 3.0.10
|
||||
'@push.rocks/smarttime': 4.1.1
|
||||
'@push.rocks/smartunique': 3.0.9
|
||||
|
||||
'@push.rocks/taskbuffer@3.1.7':
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.2.2
|
||||
|
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tspm',
|
||||
version: '5.4.0',
|
||||
version: '5.4.2',
|
||||
description: 'a no fuzz process manager'
|
||||
}
|
||||
|
@@ -50,6 +50,7 @@ export function registerLogsCommand(smartcli: plugins.smartcli.Smartcli) {
|
||||
console.log('─'.repeat(60));
|
||||
|
||||
let lastSeq = 0;
|
||||
let lastRunId: string | undefined = undefined;
|
||||
for (const log of response.logs) {
|
||||
const timestamp = new Date(log.timestamp).toLocaleTimeString();
|
||||
const prefix =
|
||||
@@ -60,11 +61,18 @@ export function registerLogsCommand(smartcli: plugins.smartcli.Smartcli) {
|
||||
: '[SYS]';
|
||||
console.log(`${timestamp} ${prefix} ${log.message}`);
|
||||
if (log.seq !== undefined) lastSeq = Math.max(lastSeq, log.seq);
|
||||
if ((log as any).runId) lastRunId = (log as any).runId;
|
||||
}
|
||||
|
||||
await withStreamingLifecycle(
|
||||
async () => {
|
||||
await tspmIpcClient.subscribe(id, (log: any) => {
|
||||
// Reset sequence if runId changed (e.g., process restarted)
|
||||
if (log.runId && log.runId !== lastRunId) {
|
||||
console.log(`[INFO] Detected process restart (runId changed).`);
|
||||
lastSeq = -1;
|
||||
lastRunId = log.runId;
|
||||
}
|
||||
if (log.seq !== undefined && log.seq <= lastSeq) return;
|
||||
if (log.seq !== undefined && log.seq > lastSeq + 1) {
|
||||
console.log(
|
||||
|
@@ -311,7 +311,7 @@ export class ProcessMonitor extends EventEmitter {
|
||||
|
||||
plugins.psTree(
|
||||
pid,
|
||||
(err: Error | null, children: Array<{ PID: string }>) => {
|
||||
(err: any, children: ReadonlyArray<{ PID: string }>) => {
|
||||
if (err) {
|
||||
const processError = new ProcessError(
|
||||
`Failed to get process tree: ${err.message}`,
|
||||
|
Reference in New Issue
Block a user