prismcast 1.10.2 → 1.10.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/dist/app.d.ts +5 -3
- package/dist/app.js +42 -41
- package/dist/app.js.map +1 -1
- package/dist/browser/hlsPlaylistObserver.d.ts +38 -0
- package/dist/browser/hlsPlaylistObserver.js +113 -0
- package/dist/browser/hlsPlaylistObserver.js.map +1 -0
- package/dist/browser/index.d.ts +26 -16
- package/dist/browser/index.js +95 -70
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/manifestInterceptor.d.ts +29 -29
- package/dist/browser/manifestInterceptor.js +106 -212
- package/dist/browser/manifestInterceptor.js.map +1 -1
- package/dist/browser/tabNetworkObserver.d.ts +48 -0
- package/dist/browser/tabNetworkObserver.js +140 -0
- package/dist/browser/tabNetworkObserver.js.map +1 -0
- package/dist/config/consistencyProbe.js +13 -11
- package/dist/config/consistencyProbe.js.map +1 -1
- package/dist/config/paths.d.ts +3 -8
- package/dist/config/paths.js +3 -10
- package/dist/config/paths.js.map +1 -1
- package/dist/config/profiles.d.ts +1 -1
- package/dist/config/profiles.js +6 -6
- package/dist/config/profiles.js.map +1 -1
- package/dist/config/services.d.ts +5 -5
- package/dist/config/services.js +8 -8
- package/dist/config/services.js.map +1 -1
- package/dist/config/sites.d.ts +2 -2
- package/dist/config/sites.js +6 -6
- package/dist/config/sites.js.map +1 -1
- package/dist/config/userChannels.d.ts +108 -14
- package/dist/config/userChannels.js +291 -37
- package/dist/config/userChannels.js.map +1 -1
- package/dist/config/userConfig.js +1 -1
- package/dist/config/userConfig.js.map +1 -1
- package/dist/config/userProfiles.d.ts +3 -3
- package/dist/config/userProfiles.js +19 -19
- package/dist/config/userProfiles.js.map +1 -1
- package/dist/index.js +7 -9
- package/dist/index.js.map +1 -1
- package/dist/native/index.d.ts +1 -1
- package/dist/native/index.js +9 -18
- package/dist/native/index.js.map +1 -1
- package/dist/native/proxy.d.ts +1 -4
- package/dist/native/proxy.js +0 -9
- package/dist/native/proxy.js.map +1 -1
- package/dist/routes/clientActions.d.ts +97 -0
- package/dist/routes/clientActions.js +113 -0
- package/dist/routes/clientActions.js.map +1 -0
- package/dist/routes/components.d.ts +4 -3
- package/dist/routes/components.js +36 -39
- package/dist/routes/components.js.map +1 -1
- package/dist/routes/config/channels/endpoints/browse.js.map +1 -1
- package/dist/routes/config/channels/endpoints/crud.js +37 -72
- package/dist/routes/config/channels/endpoints/crud.js.map +1 -1
- package/dist/routes/config/channels/endpoints/importExport.js.map +1 -1
- package/dist/routes/config/channels/healthBridge.d.ts +23 -0
- package/dist/routes/config/channels/healthBridge.js +71 -0
- package/dist/routes/config/channels/healthBridge.js.map +1 -0
- package/dist/routes/config/channels/table.js +97 -84
- package/dist/routes/config/channels/table.js.map +1 -1
- package/dist/routes/config/services.js +25 -22
- package/dist/routes/config/services.js.map +1 -1
- package/dist/routes/config/settings.js +9 -6
- package/dist/routes/config/settings.js.map +1 -1
- package/dist/routes/debug.js +277 -139
- package/dist/routes/debug.js.map +1 -1
- package/dist/routes/logs.js +1 -1
- package/dist/routes/logs.js.map +1 -1
- package/dist/routes/root/content.js +18 -14
- package/dist/routes/root/content.js.map +1 -1
- package/dist/routes/root/index.js +17 -14
- package/dist/routes/root/index.js.map +1 -1
- package/dist/routes/root/scripts/channels.js +50 -21
- package/dist/routes/root/scripts/channels.js.map +1 -1
- package/dist/routes/root/scripts/config.js +72 -3
- package/dist/routes/root/scripts/config.js.map +1 -1
- package/dist/routes/root/scripts/shared.js +60 -0
- package/dist/routes/root/scripts/shared.js.map +1 -1
- package/dist/routes/root/scripts/status.handlers.d.ts +5 -27
- package/dist/routes/root/scripts/status.handlers.js +8 -60
- package/dist/routes/root/scripts/status.handlers.js.map +1 -1
- package/dist/routes/root/scripts/status.js +6 -1
- package/dist/routes/root/scripts/status.js.map +1 -1
- package/dist/routes/streams.js +5 -3
- package/dist/routes/streams.js.map +1 -1
- package/dist/service/commands.context.js +1 -1
- package/dist/service/commands.context.js.map +1 -1
- package/dist/service/generators.context.js +1 -1
- package/dist/service/generators.context.js.map +1 -1
- package/dist/service/generators.d.ts +1 -1
- package/dist/service/generators.js +3 -11
- package/dist/service/generators.js.map +1 -1
- package/dist/streaming/hls.js +1 -5
- package/dist/streaming/hls.js.map +1 -1
- package/dist/streaming/hlsSegments.d.ts +1 -1
- package/dist/streaming/hlsSegments.js.map +1 -1
- package/dist/streaming/preroll.d.ts +1 -1
- package/dist/streaming/preroll.js +1 -5
- package/dist/streaming/preroll.js.map +1 -1
- package/dist/streaming/statusEmitter.d.ts +5 -8
- package/dist/streaming/statusEmitter.js +0 -5
- package/dist/streaming/statusEmitter.js.map +1 -1
- package/dist/types/channels.d.ts +9 -0
- package/dist/types/channels.js.map +1 -1
- package/dist/types/profiles.d.ts +2 -2
- package/dist/upgrade/commands.context.js +14 -10
- package/dist/upgrade/commands.context.js.map +1 -1
- package/dist/upgrade/commands.d.ts +7 -15
- package/dist/upgrade/commands.js +27 -28
- package/dist/upgrade/commands.js.map +1 -1
- package/dist/upgrade/detection.context.js +2 -1
- package/dist/upgrade/detection.context.js.map +1 -1
- package/dist/upgrade/detection.d.ts +2 -1
- package/dist/upgrade/detection.js +20 -51
- package/dist/upgrade/detection.js.map +1 -1
- package/dist/upgrade/index.d.ts +1 -0
- package/dist/upgrade/index.js +1 -0
- package/dist/upgrade/index.js.map +1 -1
- package/dist/upgrade/lifecycle.context.d.ts +19 -0
- package/dist/upgrade/lifecycle.context.js +47 -0
- package/dist/upgrade/lifecycle.context.js.map +1 -0
- package/dist/upgrade/lifecycle.d.ts +72 -0
- package/dist/upgrade/lifecycle.js +176 -0
- package/dist/upgrade/lifecycle.js.map +1 -0
- package/dist/upgrade/pathHandle.d.ts +28 -0
- package/dist/upgrade/pathHandle.js +101 -0
- package/dist/upgrade/pathHandle.js.map +1 -0
- package/dist/utils/bootSession.context.d.ts +15 -0
- package/dist/utils/bootSession.context.js +59 -0
- package/dist/utils/bootSession.context.js.map +1 -0
- package/dist/utils/bootSession.d.ts +16 -0
- package/dist/utils/bootSession.js +20 -0
- package/dist/utils/bootSession.js.map +1 -0
- package/dist/utils/clock.js +1 -1
- package/dist/utils/ffmpeg.js +1 -1
- package/dist/utils/ffmpeg.js.map +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/markup.d.ts +10 -0
- package/dist/utils/markup.js +23 -0
- package/dist/utils/markup.js.map +1 -1
- package/dist/utils/pid.d.ts +2 -25
- package/dist/utils/pid.js +10 -49
- package/dist/utils/pid.js.map +1 -1
- package/dist/utils/processInspector.context.d.ts +7 -0
- package/dist/utils/processInspector.context.js +104 -0
- package/dist/utils/processInspector.context.js.map +1 -0
- package/dist/utils/processInspector.d.ts +54 -0
- package/dist/utils/processInspector.js +125 -0
- package/dist/utils/processInspector.js.map +1 -0
- package/dist/utils/retry.d.ts +1 -1
- package/dist/utils/retry.js +1 -1
- package/dist/utils/retry.js.map +1 -1
- package/dist/utils/runtimeIdentity.context.d.ts +6 -0
- package/dist/utils/runtimeIdentity.context.js +13 -0
- package/dist/utils/runtimeIdentity.context.js.map +1 -0
- package/dist/utils/runtimeIdentity.d.ts +96 -0
- package/dist/utils/runtimeIdentity.js +171 -0
- package/dist/utils/runtimeIdentity.js.map +1 -0
- package/dist/utils/timing.d.ts +1 -1
- package/dist/utils/timing.js +0 -5
- package/dist/utils/timing.js.map +1 -1
- package/dist/utils/version.js +40 -10
- package/dist/utils/version.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { Nullable } from "../types/index.ts";
|
|
2
|
+
/**
|
|
3
|
+
* The structured identity record persisted to disk.
|
|
4
|
+
*/
|
|
5
|
+
export interface IdentityRecord {
|
|
6
|
+
readonly bootId: string;
|
|
7
|
+
readonly pid: number;
|
|
8
|
+
readonly startedAt: string;
|
|
9
|
+
readonly version: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Discriminated union representing the on-disk state at a given path. Every branch is exhaustive at compile time, so callers must handle each variant
|
|
13
|
+
* explicitly and the type system catches any new state added in the future.
|
|
14
|
+
*/
|
|
15
|
+
export type IdentityState = {
|
|
16
|
+
kind: "free";
|
|
17
|
+
} | {
|
|
18
|
+
kind: "held-live";
|
|
19
|
+
record: IdentityRecord;
|
|
20
|
+
} | {
|
|
21
|
+
kind: "stale-different-boot";
|
|
22
|
+
record: IdentityRecord;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "stale-dead-pid";
|
|
25
|
+
record: IdentityRecord;
|
|
26
|
+
} | {
|
|
27
|
+
kind: "stale-malformed";
|
|
28
|
+
raw: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Outcome of a claim attempt. ok: true means we now own the slot; ok: false means another live instance holds it and we should not start.
|
|
32
|
+
*/
|
|
33
|
+
export type ClaimResult = {
|
|
34
|
+
ok: true;
|
|
35
|
+
record: IdentityRecord;
|
|
36
|
+
} | {
|
|
37
|
+
ok: false;
|
|
38
|
+
conflict: IdentityRecord;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* The runtime capability set inspect/claim consume. Production wires the defaults from real I/O via createDefaultRuntimeIdentityContext; tests pass a context
|
|
42
|
+
* literal to drive each state-machine branch deterministically.
|
|
43
|
+
*/
|
|
44
|
+
export interface RuntimeIdentityContext {
|
|
45
|
+
readonly getBootSessionId: () => string;
|
|
46
|
+
readonly isProcessRunning: (pid: number) => boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Inspects the identity file at the given path and reports the current state. Reads the file, parses the record, and combines boot session match with PID
|
|
50
|
+
* liveness to classify which branch of the state machine applies. Never mutates disk state.
|
|
51
|
+
* @param filePath - The absolute path to the identity file.
|
|
52
|
+
* @param ctx - The runtime identity context. Defaults to real I/O wiring.
|
|
53
|
+
* @returns The current state.
|
|
54
|
+
*/
|
|
55
|
+
export declare function inspect(filePath: string, ctx?: RuntimeIdentityContext): IdentityState;
|
|
56
|
+
/**
|
|
57
|
+
* Attempts to claim the identity slot at the given path for the current process. If the slot is free or in any "stale-*" state, the record is overwritten
|
|
58
|
+
* with our identity and { ok: true } is returned. If the slot is held-live by another process, no write occurs and { ok: false } is returned with the
|
|
59
|
+
* conflicting holder's record so the caller can surface a precise diagnostic.
|
|
60
|
+
* @param filePath - The absolute path to the identity file.
|
|
61
|
+
* @param metadata - Caller-supplied metadata (the version string at minimum) that ends up in the persisted record.
|
|
62
|
+
* @param ctx - The runtime identity context. Defaults to real I/O wiring.
|
|
63
|
+
* @returns The claim result.
|
|
64
|
+
*/
|
|
65
|
+
export declare function claim(filePath: string, metadata: {
|
|
66
|
+
version: string;
|
|
67
|
+
}, ctx?: RuntimeIdentityContext): ClaimResult;
|
|
68
|
+
/**
|
|
69
|
+
* Releases the identity slot by removing the file at the given path - but only if the file's record identifies the current process. The PID-match check
|
|
70
|
+
* inside makes ownership structural: a rejected duplicate startup's exit handler sees a held-live record belonging to a different PID and leaves the file
|
|
71
|
+
* alone, while the legitimate holder sees its own PID and cleans up. Idempotent: a missing file is not an error. Release is purely hygiene - a process that
|
|
72
|
+
* fails to release on death has its file recovered transparently on the next startup via the stale-different-boot or stale-dead-pid branches.
|
|
73
|
+
* @param filePath - The absolute path to the identity file.
|
|
74
|
+
* @param ctx - The runtime identity context. Defaults to real I/O wiring.
|
|
75
|
+
*/
|
|
76
|
+
export declare function release(filePath: string, ctx?: RuntimeIdentityContext): void;
|
|
77
|
+
/**
|
|
78
|
+
* Unconditionally removes the identity file at the given path. Intended for recovery flows (e.g., a `prismcast cleanup` command) where a user has explicitly
|
|
79
|
+
* asked to clear stale state without the safety check that release() provides. Prefer release() for normal lifecycle cleanup.
|
|
80
|
+
* @param filePath - The absolute path to the identity file.
|
|
81
|
+
*/
|
|
82
|
+
export declare function forceRelease(filePath: string): void;
|
|
83
|
+
/**
|
|
84
|
+
* Serializes a record to its on-disk representation. The first line is the bare PID for backwards compatibility with shell tooling; subsequent lines are
|
|
85
|
+
* key=value pairs in deterministic order. The trailing newline keeps the file well-formed for POSIX text-file tools.
|
|
86
|
+
* @param record - The identity record to serialize.
|
|
87
|
+
* @returns The serialized payload.
|
|
88
|
+
*/
|
|
89
|
+
export declare function serializeRecord(record: IdentityRecord): string;
|
|
90
|
+
/**
|
|
91
|
+
* Parses the on-disk representation of an identity record. Returns null when the payload cannot be interpreted as a complete record (missing or non-integer
|
|
92
|
+
* pid, missing bootId). Unknown key=value pairs are silently ignored so future fields can be added without breaking older readers.
|
|
93
|
+
* @param raw - The raw file contents.
|
|
94
|
+
* @returns The parsed record, or null when the payload is unusable.
|
|
95
|
+
*/
|
|
96
|
+
export declare function parseRecord(raw: string): Nullable<IdentityRecord>;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { clearPidFile } from "./pid.js";
|
|
2
|
+
import { createDefaultRuntimeIdentityContext } from "./runtimeIdentity.context.js";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
/**
|
|
5
|
+
* Inspects the identity file at the given path and reports the current state. Reads the file, parses the record, and combines boot session match with PID
|
|
6
|
+
* liveness to classify which branch of the state machine applies. Never mutates disk state.
|
|
7
|
+
* @param filePath - The absolute path to the identity file.
|
|
8
|
+
* @param ctx - The runtime identity context. Defaults to real I/O wiring.
|
|
9
|
+
* @returns The current state.
|
|
10
|
+
*/
|
|
11
|
+
export function inspect(filePath, ctx = createDefaultRuntimeIdentityContext()) {
|
|
12
|
+
let raw;
|
|
13
|
+
try {
|
|
14
|
+
raw = fs.readFileSync(filePath, "utf-8");
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
// ENOENT is the canonical "no file" case: the slot is free.
|
|
18
|
+
if (error.code === "ENOENT") {
|
|
19
|
+
return { kind: "free" };
|
|
20
|
+
}
|
|
21
|
+
// Any other read error (EACCES, EIO, ...) is reported as malformed-with-empty-raw so callers fall through to the overwrite path rather than crashing on
|
|
22
|
+
// transient I/O.
|
|
23
|
+
return { kind: "stale-malformed", raw: "" };
|
|
24
|
+
}
|
|
25
|
+
const record = parseRecord(raw);
|
|
26
|
+
if (record === null) {
|
|
27
|
+
return { kind: "stale-malformed", raw };
|
|
28
|
+
}
|
|
29
|
+
if (record.bootId !== ctx.getBootSessionId()) {
|
|
30
|
+
return { kind: "stale-different-boot", record };
|
|
31
|
+
}
|
|
32
|
+
if (!ctx.isProcessRunning(record.pid)) {
|
|
33
|
+
return { kind: "stale-dead-pid", record };
|
|
34
|
+
}
|
|
35
|
+
return { kind: "held-live", record };
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Attempts to claim the identity slot at the given path for the current process. If the slot is free or in any "stale-*" state, the record is overwritten
|
|
39
|
+
* with our identity and { ok: true } is returned. If the slot is held-live by another process, no write occurs and { ok: false } is returned with the
|
|
40
|
+
* conflicting holder's record so the caller can surface a precise diagnostic.
|
|
41
|
+
* @param filePath - The absolute path to the identity file.
|
|
42
|
+
* @param metadata - Caller-supplied metadata (the version string at minimum) that ends up in the persisted record.
|
|
43
|
+
* @param ctx - The runtime identity context. Defaults to real I/O wiring.
|
|
44
|
+
* @returns The claim result.
|
|
45
|
+
*/
|
|
46
|
+
export function claim(filePath, metadata, ctx = createDefaultRuntimeIdentityContext()) {
|
|
47
|
+
const state = inspect(filePath, ctx);
|
|
48
|
+
if (state.kind === "held-live") {
|
|
49
|
+
return { conflict: state.record, ok: false };
|
|
50
|
+
}
|
|
51
|
+
const record = {
|
|
52
|
+
bootId: ctx.getBootSessionId(),
|
|
53
|
+
pid: process.pid,
|
|
54
|
+
startedAt: new Date().toISOString(),
|
|
55
|
+
version: metadata.version
|
|
56
|
+
};
|
|
57
|
+
writeRecord(filePath, record);
|
|
58
|
+
return { ok: true, record };
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Releases the identity slot by removing the file at the given path - but only if the file's record identifies the current process. The PID-match check
|
|
62
|
+
* inside makes ownership structural: a rejected duplicate startup's exit handler sees a held-live record belonging to a different PID and leaves the file
|
|
63
|
+
* alone, while the legitimate holder sees its own PID and cleans up. Idempotent: a missing file is not an error. Release is purely hygiene - a process that
|
|
64
|
+
* fails to release on death has its file recovered transparently on the next startup via the stale-different-boot or stale-dead-pid branches.
|
|
65
|
+
* @param filePath - The absolute path to the identity file.
|
|
66
|
+
* @param ctx - The runtime identity context. Defaults to real I/O wiring.
|
|
67
|
+
*/
|
|
68
|
+
export function release(filePath, ctx = createDefaultRuntimeIdentityContext()) {
|
|
69
|
+
const state = inspect(filePath, ctx);
|
|
70
|
+
// Only remove the file when it identifies us. Any other state (free, stale, or held-live by another process) means it is not ours to remove.
|
|
71
|
+
if ((state.kind !== "held-live") || (state.record.pid !== process.pid)) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
clearPidFile(filePath, "identity");
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Unconditionally removes the identity file at the given path. Intended for recovery flows (e.g., a `prismcast cleanup` command) where a user has explicitly
|
|
78
|
+
* asked to clear stale state without the safety check that release() provides. Prefer release() for normal lifecycle cleanup.
|
|
79
|
+
* @param filePath - The absolute path to the identity file.
|
|
80
|
+
*/
|
|
81
|
+
export function forceRelease(filePath) {
|
|
82
|
+
clearPidFile(filePath, "identity");
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Serializes a record to its on-disk representation. The first line is the bare PID for backwards compatibility with shell tooling; subsequent lines are
|
|
86
|
+
* key=value pairs in deterministic order. The trailing newline keeps the file well-formed for POSIX text-file tools.
|
|
87
|
+
* @param record - The identity record to serialize.
|
|
88
|
+
* @returns The serialized payload.
|
|
89
|
+
*/
|
|
90
|
+
export function serializeRecord(record) {
|
|
91
|
+
return String(record.pid) + "\n" +
|
|
92
|
+
"bootId=" + record.bootId + "\n" +
|
|
93
|
+
"startedAt=" + record.startedAt + "\n" +
|
|
94
|
+
"version=" + record.version + "\n";
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Parses the on-disk representation of an identity record. Returns null when the payload cannot be interpreted as a complete record (missing or non-integer
|
|
98
|
+
* pid, missing bootId). Unknown key=value pairs are silently ignored so future fields can be added without breaking older readers.
|
|
99
|
+
* @param raw - The raw file contents.
|
|
100
|
+
* @returns The parsed record, or null when the payload is unusable.
|
|
101
|
+
*/
|
|
102
|
+
export function parseRecord(raw) {
|
|
103
|
+
const lines = raw.split("\n");
|
|
104
|
+
if (lines.length === 0) {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
const firstLine = lines[0];
|
|
108
|
+
if (firstLine === undefined) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
const pid = parseInt(firstLine.trim(), 10);
|
|
112
|
+
if (Number.isNaN(pid)) {
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
let bootId = null;
|
|
116
|
+
let startedAt = "";
|
|
117
|
+
let version = "";
|
|
118
|
+
for (let i = 1; i < lines.length; i++) {
|
|
119
|
+
const line = lines[i];
|
|
120
|
+
if (line === undefined) {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
const trimmed = line.trim();
|
|
124
|
+
if (trimmed === "") {
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
const eq = trimmed.indexOf("=");
|
|
128
|
+
if (eq === -1) {
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
const key = trimmed.slice(0, eq);
|
|
132
|
+
const value = trimmed.slice(eq + 1);
|
|
133
|
+
switch (key) {
|
|
134
|
+
case "bootId": {
|
|
135
|
+
bootId = value;
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
case "startedAt": {
|
|
139
|
+
startedAt = value;
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
case "version": {
|
|
143
|
+
version = value;
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
default: {
|
|
147
|
+
// Unknown keys are silently ignored to support forward compatibility - older readers must tolerate fields added in newer writers.
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
// bootId is the only required metadata field. A file without one was written by a pre-runtimeIdentity PrismCast (or by an external tool) and is treated as
|
|
152
|
+
// malformed for state-machine purposes.
|
|
153
|
+
if (bootId === null) {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
return { bootId, pid, startedAt, version };
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Persists a record to disk via atomic write (write-temp + rename). On POSIX rename is atomic within a filesystem; on Windows the rename is best-effort but
|
|
160
|
+
* the partial-write window remains negligible. A torn write would parse as malformed, which the state machine recovers from on the next inspect - so atomicity
|
|
161
|
+
* here is hygiene rather than load-bearing.
|
|
162
|
+
* @param filePath - The absolute path to the identity file.
|
|
163
|
+
* @param record - The record to persist.
|
|
164
|
+
*/
|
|
165
|
+
function writeRecord(filePath, record) {
|
|
166
|
+
const payload = serializeRecord(record);
|
|
167
|
+
const tempPath = filePath + ".tmp";
|
|
168
|
+
fs.writeFileSync(tempPath, payload, "utf-8");
|
|
169
|
+
fs.renameSync(tempPath, filePath);
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=runtimeIdentity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtimeIdentity.js","sourceRoot":"","sources":["../../src/utils/runtimeIdentity.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,mCAAmC,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,MAAM,SAAS,CAAC;AAmDzB;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,QAAgB,EAAE,MAA8B,mCAAmC,EAAE;IAE3G,IAAI,GAAW,CAAC;IAEhB,IAAI,CAAC;QAEH,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAM,KAAc,EAAE,C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gBAElB,MAAM;YACR,CAAC;YAED,KAAK,SAAS,CAAC,CAAC,CAAC;gBAEf,OAAO,GAAG,KAAK,CAAC;gBAEhB,MAAM;YACR,CAAC;YAED,OAAO,CAAC,CAAC,CAAC;gBAER,kIAAkI;YACpI,CAAC;QACH,CAAC;IACH,CAAC;IAED,2JAA2J;IAC3J,wCAAwC;IACxC,IAAG,MAAM,KAAK,IAAI,EAAE,CAAC;QAEnB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AAC7C,CAAC;AAED;;;;;;GAMG;AACH,SAAS,WAAW,CAAC,QAAgB,EAAE,MAAsB;IAE3D,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IAEnC,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC7C,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACpC,CAAC"}
|
package/dist/utils/timing.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Clock } from "./clock.ts";
|
|
2
2
|
/**
|
|
3
3
|
* Creates a lightweight elapsed-time closure. Captures the clock's current reading at creation and rounds the elapsed delta on each call. Production callers
|
|
4
4
|
* pass no argument and consume the realClock default; tests inject a fake clock for deterministic time control.
|
package/dist/utils/timing.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/* Copyright(C) 2024-2026, HJD (https://github.com/hjdhjd). All rights reserved.
|
|
2
|
-
*
|
|
3
|
-
* timing.ts: Timing measurement utilities for PrismCast. Reads the clock through the Clock port (see clock.ts) so tests can inject a deterministic time source;
|
|
4
|
-
* production callers omit the argument and the default-argument wires through to realClock which delegates to performance.now().
|
|
5
|
-
*/
|
|
6
1
|
import { realClock } from "./clock.js";
|
|
7
2
|
/**
|
|
8
3
|
* Creates a lightweight elapsed-time closure. Captures the clock's current reading at creation and rounds the elapsed delta on each call. Production callers
|
package/dist/utils/timing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timing.js","sourceRoot":"","sources":["../../src/utils/timing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"timing.js","sourceRoot":"","sources":["../../src/utils/timing.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,QAAe,SAAS;IAEjD,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC;IAE1B,OAAO,GAAW,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;AACvD,CAAC"}
|
package/dist/utils/version.js
CHANGED
|
@@ -56,22 +56,52 @@ export function isVersionLessThan(a, b) {
|
|
|
56
56
|
}
|
|
57
57
|
return false;
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Performs a timed fetch with explicit timer lifecycle management. The standard `AbortSignal.timeout(ms)` helper schedules a setTimeout whose handle libuv must
|
|
61
|
+
* dispose during natural process exit; on Windows that disposal can race with pending TLS-socket cleanup and trigger the `UV_HANDLE_CLOSING` assertion in
|
|
62
|
+
* libuv's `src\win\async.c`. By owning the AbortController and the timer explicitly and clearing the timer in `finally`
|
|
63
|
+
* before we return, we guarantee the handle is disposed while the event loop is still healthy, sidestepping the race regardless of how soon after the fetch the
|
|
64
|
+
* process exits. The behavior of the public callers is unchanged: a null return still means "treat the response as unavailable", whether the cause was a network
|
|
65
|
+
* error, a non-2xx response, or a timeout.
|
|
66
|
+
*
|
|
67
|
+
* @param url - The URL to fetch.
|
|
68
|
+
* @param timeoutMs - The hard timeout in milliseconds.
|
|
69
|
+
* @param failureLogTemplate - The LOG.debug template for failures...the formatError(error) string is interpolated via the standard %s placeholder.
|
|
70
|
+
* @returns The Response on a 2xx outcome, null otherwise.
|
|
71
|
+
*/
|
|
72
|
+
async function fetchWithTimeout(url, timeoutMs, failureLogTemplate) {
|
|
73
|
+
const controller = new AbortController();
|
|
74
|
+
const timer = setTimeout(() => {
|
|
75
|
+
controller.abort();
|
|
76
|
+
}, timeoutMs);
|
|
77
|
+
try {
|
|
78
|
+
const response = await fetch(url, { signal: controller.signal });
|
|
79
|
+
return response.ok ? response : null;
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
LOG.debug("config:general", failureLogTemplate, formatError(error));
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
finally {
|
|
86
|
+
clearTimeout(timer);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
59
89
|
/**
|
|
60
90
|
* Fetches the latest version from the npm registry.
|
|
61
91
|
* @returns The latest version string, or null if the fetch failed.
|
|
62
92
|
*/
|
|
63
93
|
export async function fetchLatestVersion() {
|
|
94
|
+
const response = await fetchWithTimeout("https://registry.npmjs.org/" + NPM_PACKAGE_NAME, 5000, "Failed to fetch latest version from npm: %s.");
|
|
95
|
+
if (!response) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
64
98
|
try {
|
|
65
|
-
const response = await fetch("https://registry.npmjs.org/" + NPM_PACKAGE_NAME, { signal: AbortSignal.timeout(5000) });
|
|
66
|
-
if (!response.ok) {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
99
|
const data = await response.json();
|
|
70
100
|
const latest = data["dist-tags"]?.latest;
|
|
71
101
|
return latest ? normalizeVersion(latest) : null;
|
|
72
102
|
}
|
|
73
103
|
catch (error) {
|
|
74
|
-
LOG.debug("config:general", "Failed to
|
|
104
|
+
LOG.debug("config:general", "Failed to parse latest version response from npm: %s.", formatError(error));
|
|
75
105
|
return null;
|
|
76
106
|
}
|
|
77
107
|
}
|
|
@@ -80,15 +110,15 @@ export async function fetchLatestVersion() {
|
|
|
80
110
|
* @returns The full changelog content, or null if the fetch failed.
|
|
81
111
|
*/
|
|
82
112
|
async function fetchChangelogContent() {
|
|
113
|
+
const response = await fetchWithTimeout(CHANGELOG_URL, 5000, "Failed to fetch changelog from GitHub: %s.");
|
|
114
|
+
if (!response) {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
83
117
|
try {
|
|
84
|
-
const response = await fetch(CHANGELOG_URL, { signal: AbortSignal.timeout(5000) });
|
|
85
|
-
if (!response.ok) {
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
118
|
return await response.text();
|
|
89
119
|
}
|
|
90
120
|
catch (error) {
|
|
91
|
-
LOG.debug("config:general", "Failed to
|
|
121
|
+
LOG.debug("config:general", "Failed to read changelog response from GitHub: %s.", formatError(error));
|
|
92
122
|
return null;
|
|
93
123
|
}
|
|
94
124
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,WAAW,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEnE,yCAAyC;AACzC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAErC;;;;GAIG;AACH,MAAM,UAAU,iBAAiB;IAE/B,OAAO,WAAW,CAAC,OAAO,CAAC;AAC7B,CAAC;AAED,yCAAyC;AACzC,MAAM,aAAa,GAAG,sEAAsE,CAAC;AAE7F,4DAA4D;AAC5D,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEjD,2JAA2J;AAC3J,2JAA2J;AAC3J,MAAM,qBAAqB,GAAG,EAAE,GAAG,IAAI,CAAC;AAExC,8BAA8B;AAC9B,IAAI,mBAAmB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AEV,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,cAAsB;IAExD,MAAM,OAAO,GAAG,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAEjD,uBAAuB;IACvB,KAAK,eAAe,CAAC,OAAO,CAAC,CAAC;IAE9B,4BAA4B;IAC5B,mBAAmB,KAAK,WAAW,CAAC,GAAG,EAAE,CAAC,KAAK,eAAe,CAAC,OAAO,CAAC,EAAE,qBAAqB,CAAC,CAAC;AAClG,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAEhC,IAAG,mBAAmB,EAAE,CAAC;QAEvB,aAAa,CAAC,mBAAmB,CAAC,CAAC;QACnC,mBAAmB,GAAG,IAAI,CAAC;IAC7B,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prismcast",
|
|
3
3
|
"displayName": "PrismCast",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.3",
|
|
5
5
|
"description": "Browser-based live TV capture server for Channels DVR, Plex, and other streaming clients.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "HJD",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"ffmpeg-for-homebridge": "2.2.2",
|
|
74
74
|
"morgan": "1.10.1",
|
|
75
75
|
"puppeteer-core": "24.43.1",
|
|
76
|
-
"puppeteer-stream": "3.0.
|
|
76
|
+
"puppeteer-stream": "3.0.22",
|
|
77
77
|
"ws": "^8.20.1"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|