@automatify-au/cli 0.1.7 → 0.1.8

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.
package/README.md CHANGED
@@ -188,6 +188,32 @@ Machine-readable output:
188
188
  automatify testops allure upload ABC-123 ./allure-report.zip --dry-run --json
189
189
  ```
190
190
 
191
+ After a real upload, JSON output includes Jira attachment metadata when Jira returns it:
192
+
193
+ ```json
194
+ {
195
+ "issueKey": "ABC-123",
196
+ "uploaded": true,
197
+ "commentAdded": true,
198
+ "dryRun": false,
199
+ "summary": {
200
+ "total": 128,
201
+ "passed": 120,
202
+ "failed": 5,
203
+ "broken": 1,
204
+ "skipped": 2,
205
+ "unknown": 0
206
+ },
207
+ "attachment": {
208
+ "filename": "allure-report.zip",
209
+ "id": "10001",
210
+ "self": "https://example.atlassian.net/rest/api/3/attachment/10001",
211
+ "content": "https://example.atlassian.net/rest/api/3/attachment/content/10001",
212
+ "size": 4096
213
+ }
214
+ }
215
+ ```
216
+
191
217
  ### Optional gated maintenance commands
192
218
 
193
219
  - `sync`
@@ -12701,6 +12701,21 @@ function formatHumanSummary(summary) {
12701
12701
  ];
12702
12702
  }
12703
12703
  function buildJsonOutput(params) {
12704
+ const attachment = {
12705
+ filename: params.attachment.filename
12706
+ };
12707
+ if (params.attachment.id) {
12708
+ attachment.id = params.attachment.id;
12709
+ }
12710
+ if (params.attachment.self) {
12711
+ attachment.self = params.attachment.self;
12712
+ }
12713
+ if (params.attachment.content) {
12714
+ attachment.content = params.attachment.content;
12715
+ }
12716
+ if (typeof params.attachment.size === "number") {
12717
+ attachment.size = params.attachment.size;
12718
+ }
12704
12719
  return {
12705
12720
  issueKey: params.issueKey,
12706
12721
  uploaded: params.uploaded,
@@ -12714,9 +12729,7 @@ function buildJsonOutput(params) {
12714
12729
  skipped: params.summary.counts.skipped,
12715
12730
  unknown: params.summary.counts.unknown
12716
12731
  },
12717
- attachment: {
12718
- filename: params.attachmentFilename
12719
- }
12732
+ attachment
12720
12733
  };
12721
12734
  }
12722
12735
  function createAllureHandler(deps = {}) {
@@ -12792,7 +12805,7 @@ function createAllureHandler(deps = {}) {
12792
12805
  commentAdded: false,
12793
12806
  dryRun: true,
12794
12807
  summary,
12795
- attachmentFilename
12808
+ attachment: { filename: attachmentFilename }
12796
12809
  }))
12797
12810
  };
12798
12811
  }
@@ -12839,7 +12852,7 @@ function createAllureHandler(deps = {}) {
12839
12852
  commentAdded,
12840
12853
  dryRun: false,
12841
12854
  summary,
12842
- attachmentFilename
12855
+ attachment
12843
12856
  }))
12844
12857
  };
12845
12858
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automatify-au/cli",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Forge-first CLI for Automatify Jira TestOps",
5
5
  "type": "module",
6
6
  "bin": {