Skip to content

Commit b835d92

Browse files
authored
chore: add logs in cli (#401)
1 parent 7299df1 commit b835d92

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed

packages/app/server/routes/publish.post.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,11 @@ export default eventHandler(async (event) => {
319319
return {
320320
ok: true,
321321
urls,
322+
debug: {
323+
workflowData,
324+
key,
325+
runId,
326+
},
322327
};
323328
});
324329

packages/cli/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { isBinaryFile } from "isbinaryfile";
2121
import { writePackageJSON, type PackageJson } from "pkg-types";
2222
import pkg from "./package.json" with { type: "json" };
2323
import { createDefaultTemplate } from "./template";
24+
import * as core from "@actions/core";
2425

2526
declare global {
2627
const API_URL: string;
@@ -516,6 +517,12 @@ const main = defineCommand({
516517
`publishing failed: ${await res.text()}`,
517518
);
518519

520+
const debug = laterRes.debug;
521+
522+
core.startGroup("🔍 Info");
523+
core.notice(JSON.stringify(debug, null, 2));
524+
core.endGroup();
525+
519526
console.warn("\n");
520527
console.warn("⚡️ Your npm packages are published.\n");
521528

packages/cli/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"author": "",
2222
"license": "MIT",
2323
"dependencies": {
24+
"@actions/core": "^1.11.1",
2425
"@jsdevtools/ez-spawn": "^3.0.4",
2526
"@octokit/action": "^6.1.0",
2627
"ignore": "^5.3.1",

pnpm-lock.yaml

Lines changed: 37 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)