openmates 0.12.0-alpha.21 → 0.12.0-alpha.22

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.
@@ -44905,6 +44905,25 @@ async function printSettingsMutationResult(resultPromise, flags) {
44905
44905
  process.stdout.write("\x1B[32m\u2713\x1B[0m Settings updated\n");
44906
44906
  if (result && typeof result === "object") printGenericObject(result);
44907
44907
  }
44908
+ function printReportIssueCreateResult(result, flags) {
44909
+ if (flags.json === true) {
44910
+ printJson2(result);
44911
+ return;
44912
+ }
44913
+ process.stdout.write("\x1B[32m\u2713\x1B[0m Issue reported\n");
44914
+ const obj = result && typeof result === "object" ? result : {};
44915
+ const issueId = typeof obj.issue_id === "string" ? obj.issue_id : "";
44916
+ const shortIssueId = typeof obj.short_issue_id === "string" ? obj.short_issue_id : "";
44917
+ if (shortIssueId || issueId) {
44918
+ console.log(`Issue reference: ${shortIssueId || issueId}`);
44919
+ }
44920
+ if (issueId && shortIssueId && issueId !== shortIssueId) {
44921
+ console.log(`Internal issue ID: ${issueId}`);
44922
+ }
44923
+ if (typeof obj.message === "string") {
44924
+ console.log(obj.message);
44925
+ }
44926
+ }
44908
44927
  function addQueryParam(params, key, value) {
44909
44928
  if (typeof value === "string" && value.length > 0) params.set(key, value);
44910
44929
  }
@@ -45768,7 +45787,8 @@ async function handleSettings(client, subcommand, rest, flags) {
45768
45787
  const title = typeof flags.title === "string" ? flags.title : void 0;
45769
45788
  const body = typeof flags.body === "string" ? flags.body : void 0;
45770
45789
  if (!title || !body) throw new Error("Provide --title and --body.");
45771
- await printSettingsMutationResult(client.settingsPost("issues", { title, description: body }), flags);
45790
+ const result = await client.settingsPost("issues", { title, description: body });
45791
+ printReportIssueCreateResult(result, flags);
45772
45792
  return;
45773
45793
  }
45774
45794
  if (matches(tokens, ["report-issue", "status"])) {
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getExtForLang,
4
4
  serializeToYaml
5
- } from "./chunk-REXWGRCR.js";
5
+ } from "./chunk-PHFCP5AM.js";
6
6
  import "./chunk-AXNRPVLE.js";
7
7
  export {
8
8
  getExtForLang,
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  deriveAppUrl,
10
10
  getExtForLang,
11
11
  serializeToYaml
12
- } from "./chunk-REXWGRCR.js";
12
+ } from "./chunk-PHFCP5AM.js";
13
13
  import "./chunk-AXNRPVLE.js";
14
14
  export {
15
15
  ASSISTANT_FEEDBACK_REPORT_TITLE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.12.0-alpha.21",
3
+ "version": "0.12.0-alpha.22",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",