feat(ql3): establish 3.0 incubation baseline

This commit is contained in:
whyour
2026-08-12 00:25:26 +08:00
parent 4bf92dcfeb
commit c699c32461
2817 changed files with 779642 additions and 653 deletions
@@ -0,0 +1,35 @@
import {
normalizeLocalArtifactRetentionCursor,
type LocalArtifactRetentionCursor,
} from './localArtifactRetention';
export interface LocalArtifactRetentionCheckpoint {
version: number;
cursor?: LocalArtifactRetentionCursor;
}
export function normalizeLocalArtifactRetentionCheckpoint(
value: LocalArtifactRetentionCheckpoint,
): Readonly<LocalArtifactRetentionCheckpoint> {
if (!value || typeof value !== 'object' || Array.isArray(value)) {
throw new TypeError(
'Local Artifact retention checkpoint must be an object',
);
}
if (
!Number.isSafeInteger(value.version) ||
value.version < 0 ||
value.version >= Number.MAX_SAFE_INTEGER
) {
throw new TypeError(
'Local Artifact retention checkpoint version is invalid',
);
}
const cursor = value.cursor
? normalizeLocalArtifactRetentionCursor(value.cursor)
: undefined;
return Object.freeze({
version: value.version,
...(cursor ? { cursor } : {}),
});
}