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.
- package/dist/{chunk-REXWGRCR.js → chunk-PHFCP5AM.js} +21 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
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
package/dist/index.js
CHANGED