@zksecurity/zkao-cli 0.13.0-next.8 → 0.15.0-next.10

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.
Files changed (2) hide show
  1. package/dist/index.js +18 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -804,6 +804,16 @@ scans.command("launch").description("Launch a scan").requiredOption("--repo <id>
804
804
  "audit area to scope the scan to (repeatable; see `zkao areas list`)",
805
805
  collect,
806
806
  []
807
+ ).option(
808
+ "--trigger <kind>",
809
+ "where this launch came from, shown on the scan page: github_action, pr_comment, agent or api"
810
+ ).option(
811
+ "--pull-request <number>",
812
+ "pull request this scan is about, linked from the scan page",
813
+ toInt
814
+ ).option(
815
+ "--comment-id <id>",
816
+ "the comment that asked for the scan, so the scan page links to it (needs --pull-request)"
807
817
  ).action(
808
818
  (opts) => {
809
819
  const body = {
@@ -815,7 +825,14 @@ scans.command("launch").description("Launch a scan").requiredOption("--repo <id>
815
825
  baseCommit: opts.base,
816
826
  commitMessage: opts.message ?? null,
817
827
  auditAreaKeys: opts.area.length > 0 ? opts.area : void 0,
818
- ...opts.guidance !== void 0 ? { guidance: readContentArg(opts.guidance) } : {}
828
+ ...opts.guidance !== void 0 ? { guidance: readContentArg(opts.guidance) } : {},
829
+ ...opts.trigger ? {
830
+ trigger: {
831
+ kind: opts.trigger,
832
+ ...opts.pullRequest ? { pullRequest: opts.pullRequest } : {},
833
+ ...opts.commentId ? { commentId: opts.commentId } : {}
834
+ }
835
+ } : {}
819
836
  };
820
837
  return run((c) => c.launchScan(body));
821
838
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zksecurity/zkao-cli",
3
- "version": "0.13.0-next.8",
3
+ "version": "0.15.0-next.10",
4
4
  "description": "Command-line interface for the zkao Project API",
5
5
  "license": "MIT",
6
6
  "author": "zkSecurity",
@@ -39,7 +39,7 @@
39
39
  "prepublishOnly": "node -e \"if (!(process.env.npm_config_user_agent || '').includes('bun/')) { console.error('Publish with bun publish: npm ships the literal workspace:* dependency and breaks installs.'); process.exit(1); }\""
40
40
  },
41
41
  "dependencies": {
42
- "@zksecurity/zkao-sdk": "0.13.0-next.8",
42
+ "@zksecurity/zkao-sdk": "0.15.0-next.10",
43
43
  "commander": "^12.1.0"
44
44
  },
45
45
  "devDependencies": {