hostdb 0.43.0 → 0.43.1
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.
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which GitHub releases the manifest is allowed to describe.
|
|
3
|
+
*
|
|
4
|
+
* `releases.json` is rebuilt from the GitHub Releases list, and that list
|
|
5
|
+
* includes DRAFTS for anyone holding a token with write access - which the
|
|
6
|
+
* `update-releases` job does. A draft is a release still being assembled: its
|
|
7
|
+
* assets are whatever has finished uploading so far, its `published_at` is
|
|
8
|
+
* null, and its tag does not exist in git yet.
|
|
9
|
+
*
|
|
10
|
+
* On 2026-09-17 the MariaDB manifest job ran while the 12.3.3 draft still had
|
|
11
|
+
* three of its five platforms uploaded, and committed exactly that to main and
|
|
12
|
+
* to R2: `12.3.3` with 3 platforms and `releasedAt: null`. The next manifest
|
|
13
|
+
* run healed it, but between the two a consumer resolving 12.3.3 saw two of its
|
|
14
|
+
* platforms simply missing. Drafts are skipped outright rather than tolerated,
|
|
15
|
+
* because a half-uploaded release is never something to snapshot.
|
|
16
|
+
*
|
|
17
|
+
* (builds/common/publish-release.sh closes the same gap from the other side by
|
|
18
|
+
* keeping a release a draft until every asset is uploaded and verified. This
|
|
19
|
+
* filter is what makes a draft harmless regardless of how it got there.)
|
|
20
|
+
*/
|
|
21
|
+
export type ReleaseDraftState = {
|
|
22
|
+
tag_name: string;
|
|
23
|
+
draft?: boolean;
|
|
24
|
+
published_at?: string | null;
|
|
25
|
+
};
|
|
26
|
+
/** True when a release is a draft, or has never been published. */
|
|
27
|
+
export declare function isDraftRelease(release: ReleaseDraftState): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Drop every draft from a fetched release list.
|
|
30
|
+
*
|
|
31
|
+
* Returns the publishable releases plus the tags that were skipped, so the
|
|
32
|
+
* caller can say so in its log rather than silently shrinking the manifest.
|
|
33
|
+
*/
|
|
34
|
+
export declare function selectPublishedReleases<T extends ReleaseDraftState>(releases: readonly T[]): {
|
|
35
|
+
published: T[];
|
|
36
|
+
skippedDraftTags: string[];
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=github-releases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-releases.d.ts","sourceRoot":"","sources":["../lib/github-releases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B,CAAA;AAED,mEAAmE;AACnE,wBAAgB,cAAc,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAMlE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,iBAAiB,EACjE,QAAQ,EAAE,SAAS,CAAC,EAAE,GACrB;IAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAAC,gBAAgB,EAAE,MAAM,EAAE,CAAA;CAAE,CAahD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which GitHub releases the manifest is allowed to describe.
|
|
3
|
+
*
|
|
4
|
+
* `releases.json` is rebuilt from the GitHub Releases list, and that list
|
|
5
|
+
* includes DRAFTS for anyone holding a token with write access - which the
|
|
6
|
+
* `update-releases` job does. A draft is a release still being assembled: its
|
|
7
|
+
* assets are whatever has finished uploading so far, its `published_at` is
|
|
8
|
+
* null, and its tag does not exist in git yet.
|
|
9
|
+
*
|
|
10
|
+
* On 2026-09-17 the MariaDB manifest job ran while the 12.3.3 draft still had
|
|
11
|
+
* three of its five platforms uploaded, and committed exactly that to main and
|
|
12
|
+
* to R2: `12.3.3` with 3 platforms and `releasedAt: null`. The next manifest
|
|
13
|
+
* run healed it, but between the two a consumer resolving 12.3.3 saw two of its
|
|
14
|
+
* platforms simply missing. Drafts are skipped outright rather than tolerated,
|
|
15
|
+
* because a half-uploaded release is never something to snapshot.
|
|
16
|
+
*
|
|
17
|
+
* (builds/common/publish-release.sh closes the same gap from the other side by
|
|
18
|
+
* keeping a release a draft until every asset is uploaded and verified. This
|
|
19
|
+
* filter is what makes a draft harmless regardless of how it got there.)
|
|
20
|
+
*/
|
|
21
|
+
/** True when a release is a draft, or has never been published. */
|
|
22
|
+
export function isDraftRelease(release) {
|
|
23
|
+
return (release.draft === true ||
|
|
24
|
+
release.published_at === null ||
|
|
25
|
+
release.published_at === undefined);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Drop every draft from a fetched release list.
|
|
29
|
+
*
|
|
30
|
+
* Returns the publishable releases plus the tags that were skipped, so the
|
|
31
|
+
* caller can say so in its log rather than silently shrinking the manifest.
|
|
32
|
+
*/
|
|
33
|
+
export function selectPublishedReleases(releases) {
|
|
34
|
+
const published = [];
|
|
35
|
+
const skippedDraftTags = [];
|
|
36
|
+
for (const release of releases) {
|
|
37
|
+
if (isDraftRelease(release)) {
|
|
38
|
+
skippedDraftTags.push(release.tag_name);
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
published.push(release);
|
|
42
|
+
}
|
|
43
|
+
return { published, skippedDraftTags };
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=github-releases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-releases.js","sourceRoot":"","sources":["../lib/github-releases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAQH,mEAAmE;AACnE,MAAM,UAAU,cAAc,CAAC,OAA0B;IACvD,OAAO,CACL,OAAO,CAAC,KAAK,KAAK,IAAI;QACtB,OAAO,CAAC,YAAY,KAAK,IAAI;QAC7B,OAAO,CAAC,YAAY,KAAK,SAAS,CACnC,CAAA;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CACrC,QAAsB;IAEtB,MAAM,SAAS,GAAQ,EAAE,CAAA;IACzB,MAAM,gBAAgB,GAAa,EAAE,CAAA;IAErC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5B,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;YACvC,SAAQ;QACV,CAAC;QACD,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACzB,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAA;AACxC,CAAC"}
|
package/package.json
CHANGED