@getmagical/cli 0.2.7 → 0.2.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/dist/index.js +46 -4
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15582,6 +15582,41 @@ query GetAutomations($ids: [ID!]!) {
|
|
|
15582
15582
|
}
|
|
15583
15583
|
}
|
|
15584
15584
|
}
|
|
15585
|
+
}`
|
|
15586
|
+
}),
|
|
15587
|
+
createOperationSpec({
|
|
15588
|
+
operationName: "ViewAutomationReview",
|
|
15589
|
+
kind: "query",
|
|
15590
|
+
inputSchema: z25.object({
|
|
15591
|
+
automationId: z25.string().min(1)
|
|
15592
|
+
}),
|
|
15593
|
+
cli: {
|
|
15594
|
+
name: "view-automation-review",
|
|
15595
|
+
path: ["automations", "view-review"],
|
|
15596
|
+
description: "View the successful review for the current automation version.",
|
|
15597
|
+
resultKey: "automationReviewReport",
|
|
15598
|
+
options: [
|
|
15599
|
+
stringOption({
|
|
15600
|
+
inputKey: "automationId",
|
|
15601
|
+
flagName: "automation-id",
|
|
15602
|
+
description: "Automation ID.",
|
|
15603
|
+
required: true
|
|
15604
|
+
}),
|
|
15605
|
+
booleanOption({
|
|
15606
|
+
clientOnly: true,
|
|
15607
|
+
inputKey: "open",
|
|
15608
|
+
flagName: "open",
|
|
15609
|
+
description: "Open the signed report URL in the default browser."
|
|
15610
|
+
})
|
|
15611
|
+
]
|
|
15612
|
+
},
|
|
15613
|
+
mcp: { fileName: "automationReviewReport.graphql" },
|
|
15614
|
+
document: `# View the successful review for the exact current automation version
|
|
15615
|
+
query ViewAutomationReview($automationId: ID!) {
|
|
15616
|
+
automationReviewReport(automationId: $automationId) {
|
|
15617
|
+
reportUrl
|
|
15618
|
+
html
|
|
15619
|
+
}
|
|
15585
15620
|
}`
|
|
15586
15621
|
}),
|
|
15587
15622
|
createOperationSpec({
|
|
@@ -21076,11 +21111,18 @@ async function handleOperationCommand(dependencies, operationSpec, commandOption
|
|
|
21076
21111
|
...state,
|
|
21077
21112
|
lastUsedOrgId: organization.id
|
|
21078
21113
|
});
|
|
21079
|
-
|
|
21080
|
-
|
|
21081
|
-
|
|
21114
|
+
writeCommandOutput({
|
|
21115
|
+
dependencies,
|
|
21116
|
+
json: commandOptions.json,
|
|
21117
|
+
result
|
|
21118
|
+
});
|
|
21119
|
+
if (operationSpec.operationName === "ViewAutomationReview" && commandOptions["open"] && isRecord5(result) && typeof result["reportUrl"] === "string") {
|
|
21120
|
+
await dependencies.openExternalUrl(result["reportUrl"]).catch((error) => {
|
|
21121
|
+
dependencies.io.error(
|
|
21122
|
+
`Warning: Failed to open the automation review in the default browser: ${getErrorMessage(error)}`
|
|
21123
|
+
);
|
|
21124
|
+
});
|
|
21082
21125
|
}
|
|
21083
|
-
dependencies.io.info(formatHumanReadableOutput(result));
|
|
21084
21126
|
}
|
|
21085
21127
|
function getOperation(operationName) {
|
|
21086
21128
|
const operationSpec = operationSpecs.find(
|