vouchington-tooling 0.0.5 → 0.0.7
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/index.d.mts
CHANGED
|
@@ -7,7 +7,7 @@ export { auditCiJobRuntime, parseWorkflowNameMatch } from './gha-runtime-audit/i
|
|
|
7
7
|
export type { GhApiExecutor, RuntimeAuditOptions, RuntimeAuditResult, RuntimeAuditWorkflowFilter, RuntimeJobResult, RuntimeSample, } from './gha-runtime-audit/index.mts';
|
|
8
8
|
export { createVitestBlobManifest, inspectVitestBlobBundle, parseVitestBlobManifest, serializeVitestBlobManifest, VITEST_BLOB_MANIFEST_FILENAME, VITEST_BLOB_MANIFEST_VERSION, vitestBlobBundlePaths, writeVitestBlobManifest, } from './vitest-blob-manifest/index.mts';
|
|
9
9
|
export type { InspectedVitestBlobBundle, VitestBlobIdentity, VitestBlobManifest, } from './vitest-blob-manifest/index.mts';
|
|
10
|
-
export { formatReleaseAgeFailure, isReleaseAgeViolation, parseInstallOptions, parseReleaseAgeViolations, runInstallLifecycle, } from './pnpm-install/index.mts';
|
|
10
|
+
export { findWorkspaceLinkMismatches, formatReleaseAgeFailure, INSTALL_TERMINATION_FAILED, isReleaseAgeViolation, parseInstallOptions, parseReleaseAgeViolations, runInstallLifecycle, } from './pnpm-install/index.mts';
|
|
11
11
|
export type { InstallOptions, Lifecycle } from './pnpm-install/index.mts';
|
|
12
12
|
export { buildContextFromTrackedFiles, buildSharedContext, gitEnv, runNamedChecks, } from './shared-context/index.mts';
|
|
13
13
|
export type { NamedCheck, SharedContext } from './shared-context/index.mts';
|
package/dist/index.mjs
CHANGED
|
@@ -3,5 +3,5 @@ export { extractAlterTableAddColumnLocations, extractCreateIndexMetadata, extrac
|
|
|
3
3
|
export { dollarQuoteEnd, lineOf, maskSqlQuotedText, readDollarQuoteDelimiter, readStringLiteral, splitSqlStatements, sqlFragments, stripSqlComments, } from './sql-scanner/index.mjs';
|
|
4
4
|
export { auditCiJobRuntime, parseWorkflowNameMatch } from './gha-runtime-audit/index.mjs';
|
|
5
5
|
export { createVitestBlobManifest, inspectVitestBlobBundle, parseVitestBlobManifest, serializeVitestBlobManifest, VITEST_BLOB_MANIFEST_FILENAME, VITEST_BLOB_MANIFEST_VERSION, vitestBlobBundlePaths, writeVitestBlobManifest, } from './vitest-blob-manifest/index.mjs';
|
|
6
|
-
export { formatReleaseAgeFailure, isReleaseAgeViolation, parseInstallOptions, parseReleaseAgeViolations, runInstallLifecycle, } from './pnpm-install/index.mjs';
|
|
6
|
+
export { findWorkspaceLinkMismatches, formatReleaseAgeFailure, INSTALL_TERMINATION_FAILED, isReleaseAgeViolation, parseInstallOptions, parseReleaseAgeViolations, runInstallLifecycle, } from './pnpm-install/index.mjs';
|
|
7
7
|
export { buildContextFromTrackedFiles, buildSharedContext, gitEnv, runNamedChecks, } from './shared-context/index.mjs';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { runInstallLifecycle } from './runner.mts';
|
|
2
|
-
export {
|
|
3
|
-
export
|
|
2
|
+
export { runPnpm } from './exec.mts';
|
|
3
|
+
export { baseInstallArgs, findWorkspaceLinkMismatches, listWorkspaces, logWorkspaceLinkMismatches, parseInstallOptions, reportGlibcVersionRuntime, } from './support.mts';
|
|
4
|
+
export type { CaptureCommand, CommandResult, InstallOptions, Lifecycle, Workspace, WorkspaceLinkMismatch, } from './support.mts';
|
|
4
5
|
export { formatReleaseAgeFailure, isReleaseAgeViolation, parseReleaseAgeViolations, } from './release-age.mts';
|
|
5
|
-
export { INSTALL_TERMINATION_FAILED } from './process.mts';
|
|
6
|
+
export { INSTALL_TERMINATION_FAILED, installExitCode, safeProcessGroup, startInstallHeartbeat, terminateProcessGroup, terminateSafeProcessGroup, } from './process.mts';
|
|
7
|
+
export { persistentDependencyTreeIsCold, persistentMetadataFingerprint, persistentMetadataMatches, writePersistentMetadataStamp, } from './metadata.mts';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { runInstallLifecycle } from './runner.mjs';
|
|
2
|
-
export {
|
|
2
|
+
export { runPnpm } from './exec.mjs';
|
|
3
|
+
export { baseInstallArgs, findWorkspaceLinkMismatches, listWorkspaces, logWorkspaceLinkMismatches, parseInstallOptions, reportGlibcVersionRuntime, } from './support.mjs';
|
|
3
4
|
export { formatReleaseAgeFailure, isReleaseAgeViolation, parseReleaseAgeViolations, } from './release-age.mjs';
|
|
4
|
-
export { INSTALL_TERMINATION_FAILED } from './process.mjs';
|
|
5
|
+
export { INSTALL_TERMINATION_FAILED, installExitCode, safeProcessGroup, startInstallHeartbeat, terminateProcessGroup, terminateSafeProcessGroup, } from './process.mjs';
|
|
6
|
+
export { persistentDependencyTreeIsCold, persistentMetadataFingerprint, persistentMetadataMatches, writePersistentMetadataStamp, } from './metadata.mjs';
|
|
@@ -58,7 +58,7 @@ export async function persistentMetadataFingerprint(runCapture, installScripts)
|
|
|
58
58
|
export async function persistentMetadataMatches(fingerprint) {
|
|
59
59
|
try {
|
|
60
60
|
const stamp = JSON.parse(await readFile(persistentMetadataStampPath(), 'utf8'));
|
|
61
|
-
return stamp.version ===
|
|
61
|
+
return stamp.version === 2 && stamp.fingerprint === fingerprint;
|
|
62
62
|
}
|
|
63
63
|
catch {
|
|
64
64
|
return false;
|
|
@@ -82,7 +82,7 @@ export async function writePersistentMetadataStamp(fingerprint) {
|
|
|
82
82
|
const temporary = `${stampPath}.${process.pid}.tmp`;
|
|
83
83
|
await mkdir(directory, { recursive: true });
|
|
84
84
|
try {
|
|
85
|
-
await writeFile(temporary, `${JSON.stringify({ fingerprint, version:
|
|
85
|
+
await writeFile(temporary, `${JSON.stringify({ fingerprint, version: 2 })}\n`);
|
|
86
86
|
await rename(temporary, stampPath);
|
|
87
87
|
}
|
|
88
88
|
finally {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vouchington-tooling",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Vouchington CLI and extractable tooling libraries.",
|
|
5
5
|
"homepage": "https://github.com/vouchington/vouchington-tooling/tree/main/packages/vouchington-tooling#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -297,6 +297,14 @@ def read_pid(path: Path) -> int | None:
|
|
|
297
297
|
return None
|
|
298
298
|
|
|
299
299
|
|
|
300
|
+
def workspace_holder_pid(workspace: str) -> int | None:
|
|
301
|
+
identity = durable_identity_dir(workspace)
|
|
302
|
+
pid = read_pid(identity / "pid")
|
|
303
|
+
if pid is None or not pid_is_alive(pid) or not is_our_holder(pid, workspace):
|
|
304
|
+
return None
|
|
305
|
+
return pid
|
|
306
|
+
|
|
307
|
+
|
|
300
308
|
def reap_stale_holder(workspace: str) -> None:
|
|
301
309
|
identity = durable_identity_dir(workspace)
|
|
302
310
|
pid_path = identity / "pid"
|
|
@@ -595,6 +603,10 @@ def request_stop(hold_dir: Path, workspace: str) -> None:
|
|
|
595
603
|
if current is None or not pid_is_alive(current):
|
|
596
604
|
break
|
|
597
605
|
time.sleep(HOLD_POLL_SECONDS)
|
|
606
|
+
successor = workspace_holder_pid(workspace)
|
|
607
|
+
if successor is not None and successor != pid:
|
|
608
|
+
# A replacement holder for this workspace already reaped us and took the ports.
|
|
609
|
+
return
|
|
598
610
|
for port in remaining:
|
|
599
611
|
wait_until_port_bindable(port)
|
|
600
612
|
|