cloudflare/kumo

Public

mirrored from https://github.com/cloudflare/kumoAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
main

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

ci/scripts/write-npm-report.ts

41lines · modecode

1#!/usr/bin/env tsx
2
3/**
4 * Write NPM Release Report Artifact
5 *
6 * Outputs a report artifact for the npm beta release.
7 * Called by publish-beta.sh after successful publication.
8 *
9 * Required environment variables:
10 * - PACKAGE_VERSION: Published package version
11 * - PACKAGE_NAME: Package name (default: @cloudflare/kumo)
12 */
13
14import {
15 writeReportArtifact,
16 npmReleaseReporter,
17 buildContextFromEnv,
18} from "../reporters";
19
20async function main() {
21 const context = buildContextFromEnv();
22
23 if (!context.packageVersion) {
24 console.error("❌ PACKAGE_VERSION environment variable is required");
25 process.exit(1);
26 }
27
28 const item = await npmReleaseReporter.collect(context);
29
30 if (item) {
31 writeReportArtifact(item);
32 console.log("✅ NPM release report artifact written");
33 } else {
34 console.log("ℹ️ No report item generated");
35 }
36}
37
38main().catch((error) => {
39 console.error("❌ Failed to write NPM report:", error);
40 process.exit(1);
41});
42