@qawolf/cli 2.14.0 → 2.15.0
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/cli.js +146 -6
- package/dist/runner-sdk.js +87 -1
- package/package.json +2 -2
- package/skills/qawolf-cli/SKILL.md +2 -0
package/dist/cli.js
CHANGED
|
@@ -8450,6 +8450,7 @@ var authErrorMessages = {
|
|
|
8450
8450
|
runIdMayBeRunnerLocal: (runId) => `A run id printed by qawolf runner run belongs to that runner rather than to the platform, so this command cannot resolve it. Read that run with qawolf runner events run-status --run ${runId ?? "<id>"}.`,
|
|
8451
8451
|
notFound404Record: (noun, id) => `QA Wolf has no ${noun} ${id} (HTTP 404).`,
|
|
8452
8452
|
notFound404: (noun) => noun === undefined ? "QA Wolf found nothing matching the request (HTTP 404)." : `QA Wolf found nothing matching the ${noun} request (HTTP 404).`,
|
|
8453
|
+
notServedYet: (noun, baseUrl) => `QA Wolf at ${baseUrl} does not support ${noun ?? "this request"} yet (HTTP 404). This CLI is newer than the server, so try again once the server has been updated.`,
|
|
8453
8454
|
failedWithStatus: (status, noun) => `QA Wolf API${noun ? ` ${noun}` : ""} request failed (HTTP ${status}).`,
|
|
8454
8455
|
notSent: "Nothing was sent, so this request did not take effect.",
|
|
8455
8456
|
networkUnreachable: (options) => `Could not reach the QA Wolf API at ${options.baseUrl}${options.noun ? ` to fetch ${options.noun}` : ""}${options.cause ? ` (${options.cause})` : ""}. Check your network connection and QAWOLF_HOST_URL.`,
|
|
@@ -9072,6 +9073,19 @@ ${dir}`,
|
|
|
9072
9073
|
tsconfigUnparsedNotice: (projectDir) => `Not resolving path aliases: ${projectDir}/tsconfig.json is not valid JSON. Comments and trailing commas are not supported, here or on the platform. Remove them so "compilerOptions.paths" can be read.`,
|
|
9073
9074
|
pathAliasNotFoundHint: (specifier, projectDir) => projectDir === undefined ? `Hint: '${specifier}' looks like a tsconfig path alias. Run from within your flows project so its tsconfig.json can be found.` : `Hint: '${specifier}' looks like a tsconfig path alias. Ensure "compilerOptions.paths" in ${projectDir}/tsconfig.json maps it to a file that exists.`
|
|
9074
9075
|
};
|
|
9076
|
+
// src/core/messages/triggers.ts
|
|
9077
|
+
var notSupported = ({ baseUrl, command }) => `QA Wolf at ${baseUrl} does not support --is-paused on qawolf ${command} yet, so it ignored the flag.`;
|
|
9078
|
+
var pauseItNow = (triggerId, url) => `Pause it now with qawolf trigger pause --trigger-id ${triggerId}${url ? `, or from its page: ${url}` : ""}.`;
|
|
9079
|
+
var triggerMessages = {
|
|
9080
|
+
pausedAfterwards: (write) => ({
|
|
9081
|
+
error: `${notSupported(write)} Trigger ${write.triggerId} was left running, so the CLI paused it with qawolf trigger pause.`,
|
|
9082
|
+
errorBody: `It stays paused. Check it, then turn it on with qawolf trigger resume --trigger-id ${write.triggerId}.`
|
|
9083
|
+
}),
|
|
9084
|
+
leftLive: (write) => ({
|
|
9085
|
+
error: `Trigger ${write.triggerId} is live and will fire. ${notSupported(write)} Pausing it afterwards failed: ${write.reason}`,
|
|
9086
|
+
errorBody: pauseItNow(write.triggerId, write.url)
|
|
9087
|
+
})
|
|
9088
|
+
};
|
|
9075
9089
|
// src/core/messages/updateCheck.ts
|
|
9076
9090
|
var updateCheckMessages = {
|
|
9077
9091
|
title: "Update available",
|
|
@@ -16792,6 +16806,7 @@ function describeIdentityError(err) {
|
|
|
16792
16806
|
}
|
|
16793
16807
|
return { error: m2.identity.unexpectedFormat };
|
|
16794
16808
|
}
|
|
16809
|
+
var isUnservedRoute = (reason) => /^No (procedure found|"\w+"-procedure) on path /.test(reason);
|
|
16795
16810
|
function describeRequestError(err, baseUrl, noun, notFound) {
|
|
16796
16811
|
if (err.kind === "http") {
|
|
16797
16812
|
const reason = parseErrorBody(err.body);
|
|
@@ -16810,6 +16825,11 @@ function describeRequestError(err, baseUrl, noun, notFound) {
|
|
|
16810
16825
|
};
|
|
16811
16826
|
if (err.status === 403)
|
|
16812
16827
|
return parseJson(err.body) === undefined ? { error: m2.request.blocked403(noun) } : { error: m2.request.rejected403(noun), ...body };
|
|
16828
|
+
if (err.status === 404 && isUnservedRoute(reason))
|
|
16829
|
+
return {
|
|
16830
|
+
error: m2.request.notServedYet(noun, baseUrl),
|
|
16831
|
+
exitCode: exitCodes.notFound
|
|
16832
|
+
};
|
|
16813
16833
|
if (err.status === 404)
|
|
16814
16834
|
return describeNotFound(notFound, noun, reason);
|
|
16815
16835
|
return { error: m2.request.failedWithStatus(err.status, noun), ...body };
|
|
@@ -20103,6 +20123,75 @@ var makeDeleteTriggerContract = (ids) => {
|
|
|
20103
20123
|
};
|
|
20104
20124
|
};
|
|
20105
20125
|
|
|
20126
|
+
// node_modules/@qawolf/api-contracts/dist/v1/trigger/listFirings.js
|
|
20127
|
+
var makeFiringSchema = (ids) => object({
|
|
20128
|
+
deploymentId: ids.deployment.optional().describe("The deployment it fired on, for a deployment or by hand."),
|
|
20129
|
+
environmentId: ids.environment.optional().describe("The environment it fired in. Absent for a pull request or QA Wolf event firing."),
|
|
20130
|
+
firedAt: exports_iso.datetime(),
|
|
20131
|
+
id: string2().describe("The firing's id."),
|
|
20132
|
+
occasion: string2().describe("What fired it: deployment, schedule, or manual for trigger.runNow and the app's Run now. Later versions add kinds."),
|
|
20133
|
+
outcome: string2().describe("fired: the trigger started its action. skipped: it chose not to, and reason says why. failed: it could not start it."),
|
|
20134
|
+
reason: string2().optional().describe("Why a skipped or failed firing started nothing, as a stable code such as trigger-paused, session-limit-reached or no-enabled-workflows. Later versions add codes."),
|
|
20135
|
+
runId: ids.run.optional().describe("The run the firing started."),
|
|
20136
|
+
sessionId: ids.chatSession.optional().describe("The QA Wolf session a startAgent firing started."),
|
|
20137
|
+
sessionStatus: string2().optional().describe("How that session stands now, as agent.send reports it: working, waiting-for-you, completed, failed or cancelled."),
|
|
20138
|
+
startedBy: string2().optional().describe("Who fired it by hand. Absent for any other firing.")
|
|
20139
|
+
});
|
|
20140
|
+
var makeListTriggerFiringsContract = (ids) => {
|
|
20141
|
+
const input = object({
|
|
20142
|
+
triggerId: ids.trigger,
|
|
20143
|
+
...makePaginationInputFields({ defaultLimit: 20, maxLimit: 100 })
|
|
20144
|
+
});
|
|
20145
|
+
const output = object({
|
|
20146
|
+
firings: array(makeFiringSchema(ids)).describe("The trigger's firings, newest first."),
|
|
20147
|
+
nextCursor: nextCursorSchema
|
|
20148
|
+
});
|
|
20149
|
+
return {
|
|
20150
|
+
annotationJustifications: {
|
|
20151
|
+
destructiveHint: "Does not modify the trigger, its runs or its sessions.",
|
|
20152
|
+
openWorldHint: "Reads private QA Wolf trigger history without changing external systems.",
|
|
20153
|
+
readOnlyHint: "Lists when one authorized trigger fired and what each firing started."
|
|
20154
|
+
},
|
|
20155
|
+
annotations: {
|
|
20156
|
+
destructiveHint: false,
|
|
20157
|
+
openWorldHint: false,
|
|
20158
|
+
readOnlyHint: true
|
|
20159
|
+
},
|
|
20160
|
+
description: "List when a trigger fired and what each firing started: a run, a QA Wolf " + "session, or nothing and why.",
|
|
20161
|
+
input,
|
|
20162
|
+
kind: "read",
|
|
20163
|
+
name: "trigger.listFirings",
|
|
20164
|
+
output
|
|
20165
|
+
};
|
|
20166
|
+
};
|
|
20167
|
+
|
|
20168
|
+
// node_modules/@qawolf/api-contracts/dist/v1/trigger/runNow.js
|
|
20169
|
+
var makeRunTriggerNowContract = (ids) => {
|
|
20170
|
+
const input = object({
|
|
20171
|
+
deploymentId: ids.deployment.optional().describe("The recent deployment a deployment trigger fires on, which must match the trigger. The trigger's first when decides its kind: a deployment trigger requires this, and a schedule trigger refuses it, firing on its own environment as if its slot came now."),
|
|
20172
|
+
requestId: string2().trim().min(1).max(100).describe("Any string that is new for each firing. Repeating a request with the same requestId fires the trigger once."),
|
|
20173
|
+
triggerId: ids.trigger
|
|
20174
|
+
});
|
|
20175
|
+
const output = object({ trigger: makeTriggerResourceSchema(ids) });
|
|
20176
|
+
return {
|
|
20177
|
+
annotationJustifications: {
|
|
20178
|
+
destructiveHint: "Starts the trigger's action, which can run tests that change or delete application data.",
|
|
20179
|
+
openWorldHint: "The firing can start test runs or a QA Wolf session against external applications.",
|
|
20180
|
+
readOnlyHint: "Fires the trigger once, starting its runs or its QA Wolf session."
|
|
20181
|
+
},
|
|
20182
|
+
annotations: {
|
|
20183
|
+
destructiveHint: true,
|
|
20184
|
+
openWorldHint: true,
|
|
20185
|
+
readOnlyHint: false
|
|
20186
|
+
},
|
|
20187
|
+
description: "Fire a trigger once by hand. It works on a " + "paused trigger too, and does the same as any other firing, except that a run it " + "starts is not linked to the deployment or its pull request. Follow the firing with " + "trigger.listFirings.",
|
|
20188
|
+
input,
|
|
20189
|
+
kind: "write",
|
|
20190
|
+
name: "trigger.runNow",
|
|
20191
|
+
output
|
|
20192
|
+
};
|
|
20193
|
+
};
|
|
20194
|
+
|
|
20106
20195
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/update.js
|
|
20107
20196
|
var makeUpdateTriggerContract = (ids) => {
|
|
20108
20197
|
const commonFields = {
|
|
@@ -20149,8 +20238,10 @@ var makeTriggerContracts = (ids) => ({
|
|
|
20149
20238
|
delete: makeDeleteTriggerContract(ids),
|
|
20150
20239
|
find: makeFindTriggersContract(ids),
|
|
20151
20240
|
get: makeGetTriggerContract(ids),
|
|
20241
|
+
listFirings: makeListTriggerFiringsContract(ids),
|
|
20152
20242
|
pause: makePauseTriggerContract(ids),
|
|
20153
20243
|
resume: makeResumeTriggerContract(ids),
|
|
20244
|
+
runNow: makeRunTriggerNowContract(ids),
|
|
20154
20245
|
update: makeUpdateTriggerContract(ids)
|
|
20155
20246
|
});
|
|
20156
20247
|
// node_modules/@qawolf/api-contracts/dist/v1/agent/get.js
|
|
@@ -20678,9 +20769,17 @@ var makeDeploymentResourceSchema = (ids) => resource({
|
|
|
20678
20769
|
deployTarget: string2().optional().describe("The URL the deployment serves. A trigger's deployTargetPattern matches against it."),
|
|
20679
20770
|
environmentId: ids.environment.describe("The QA Wolf environment the deployment reported into."),
|
|
20680
20771
|
environmentName: string2().optional().describe("The environment's name. Absent when the environment has since been deleted."),
|
|
20772
|
+
environmentVariables: object({
|
|
20773
|
+
secretNames: array(string2()).describe("Override names that are secret in the deployment's environment, sorted. Their values are never returned."),
|
|
20774
|
+
variables: array(object({
|
|
20775
|
+
name: string2(),
|
|
20776
|
+
value: string2().describe("The override value. Handle as a secret.")
|
|
20777
|
+
})).describe("The overrides that are not secret, sorted by name.")
|
|
20778
|
+
}).optional().describe("The environment variable overrides that the deployment report set for the runs this deployment requests. A deployer often puts the version or build number of the release here. Absent when the report set none."),
|
|
20681
20779
|
id: ids.deployment,
|
|
20682
20780
|
provider: _enum(["github", "gitlab", "api"]).optional().describe("How QA Wolf received the deployment: a GitHub webhook, a GitLab webhook, or the deployment.reportStatus API."),
|
|
20683
20781
|
repository: string2().optional().describe(`The repository the deployment came from, as "owner/name". Absent when neither the code host nor the deployment report named one. A trigger's repositoryPattern matches against it.`),
|
|
20782
|
+
runIds: array(ids.run).describe("The runs that tested this deployment, newest first. Empty when no run tested it. run.get reads each one."),
|
|
20684
20783
|
service: string2().optional().describe("Which application was deployed, as the deployer named it. Absent when the deployer named none."),
|
|
20685
20784
|
status: _enum(["pending", "success", "failure", "inactive"]).optional().describe("The deployment's lifecycle status, in the vocabulary deployment.reportStatus accepts. Absent when no status was ever reported.")
|
|
20686
20785
|
}, {
|
|
@@ -26452,7 +26551,7 @@ function startUpdateCheck(deps) {
|
|
|
26452
26551
|
// package.json
|
|
26453
26552
|
var package_default = {
|
|
26454
26553
|
name: "@qawolf/cli",
|
|
26455
|
-
version: "2.
|
|
26554
|
+
version: "2.15.0",
|
|
26456
26555
|
description: "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
|
|
26457
26556
|
keywords: [
|
|
26458
26557
|
"automation",
|
|
@@ -26524,7 +26623,7 @@ var package_default = {
|
|
|
26524
26623
|
"@clack/prompts": "1.5.1",
|
|
26525
26624
|
"@napi-rs/keyring": "1.3.0",
|
|
26526
26625
|
"@oxc-node/core": "0.1.0",
|
|
26527
|
-
"@qawolf/api-contracts": "0.
|
|
26626
|
+
"@qawolf/api-contracts": "0.144.0",
|
|
26528
26627
|
"@qawolf/emails": "1.1.1",
|
|
26529
26628
|
"@qawolf/flow-targets": "2.0.0",
|
|
26530
26629
|
commander: "14.0.3",
|
|
@@ -39113,7 +39212,7 @@ function normalizeBrowserName(browser) {
|
|
|
39113
39212
|
return "webkit";
|
|
39114
39213
|
return "chromium";
|
|
39115
39214
|
}
|
|
39116
|
-
function
|
|
39215
|
+
function notSupported2(name) {
|
|
39117
39216
|
return () => {
|
|
39118
39217
|
throw new Error(runnerMessages.notSupportedInCli(name));
|
|
39119
39218
|
};
|
|
@@ -39185,7 +39284,7 @@ async function runAndroidFlow({
|
|
|
39185
39284
|
path: flowPath,
|
|
39186
39285
|
callback: async (flowDeps) => {
|
|
39187
39286
|
const androidDeps = {
|
|
39188
|
-
...Object.fromEntries(unsupportedAndroidDepNames.map((name) => [name,
|
|
39287
|
+
...Object.fromEntries(unsupportedAndroidDepNames.map((name) => [name, notSupported2(name)])),
|
|
39189
39288
|
...deps.flowRuntimeDeps,
|
|
39190
39289
|
inputs: flowDeps.flowInputs,
|
|
39191
39290
|
workflowInputs: flowDeps.flowInputs,
|
|
@@ -39515,7 +39614,7 @@ async function runWebFlow({
|
|
|
39515
39614
|
path: flowPath,
|
|
39516
39615
|
callback: async (flowDeps) => {
|
|
39517
39616
|
const webDeps = {
|
|
39518
|
-
...Object.fromEntries(unsupportedWebDepNames.map((name) => [name,
|
|
39617
|
+
...Object.fromEntries(unsupportedWebDepNames.map((name) => [name, notSupported2(name)])),
|
|
39519
39618
|
...deps.flowRuntimeDeps,
|
|
39520
39619
|
launch,
|
|
39521
39620
|
launchWithGpu: launch,
|
|
@@ -41580,6 +41679,44 @@ async function readJsonFlagSources(flags, options, deps) {
|
|
|
41580
41679
|
return { ok: true, options: resolved };
|
|
41581
41680
|
}
|
|
41582
41681
|
|
|
41682
|
+
// src/domains/publicApi/requestedPause.ts
|
|
41683
|
+
var contractsThatTakeAPause = new Set([
|
|
41684
|
+
"trigger.create",
|
|
41685
|
+
"trigger.update"
|
|
41686
|
+
]);
|
|
41687
|
+
var reportedTrigger = object({
|
|
41688
|
+
trigger: object({
|
|
41689
|
+
id: string2(),
|
|
41690
|
+
isPaused: boolean2(),
|
|
41691
|
+
url: string2().optional()
|
|
41692
|
+
})
|
|
41693
|
+
});
|
|
41694
|
+
var askedForPause = (spec, input) => contractsThatTakeAPause.has(spec.contract.name) && object({ isPaused: literal(true) }).safeParse(input).success;
|
|
41695
|
+
async function enforceRequestedPause(ctx, spec, input, output) {
|
|
41696
|
+
if (!askedForPause(spec, input))
|
|
41697
|
+
return;
|
|
41698
|
+
const write = {
|
|
41699
|
+
baseUrl: ctx.apiBaseUrl,
|
|
41700
|
+
command: spec.commandPath.join(" ")
|
|
41701
|
+
};
|
|
41702
|
+
const { trigger } = reportedTrigger.parse(output);
|
|
41703
|
+
if (trigger.isPaused)
|
|
41704
|
+
return;
|
|
41705
|
+
const paused = await ctx.platformClient.callPublicApi(publicContractsV1.trigger.pause, { triggerId: trigger.id });
|
|
41706
|
+
if (paused.ok && paused.value.trigger.isPaused) {
|
|
41707
|
+
return triggerMessages.pausedAfterwards({
|
|
41708
|
+
...write,
|
|
41709
|
+
triggerId: trigger.id
|
|
41710
|
+
});
|
|
41711
|
+
}
|
|
41712
|
+
return triggerMessages.leftLive({
|
|
41713
|
+
...write,
|
|
41714
|
+
reason: paused.ok ? "the server still reports it running." : paused.error,
|
|
41715
|
+
triggerId: trigger.id,
|
|
41716
|
+
url: trigger.url
|
|
41717
|
+
});
|
|
41718
|
+
}
|
|
41719
|
+
|
|
41583
41720
|
// src/domains/publicApi/handle.ts
|
|
41584
41721
|
var isRecord4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
41585
41722
|
function setAtPath(input, path, value) {
|
|
@@ -41647,6 +41784,9 @@ async function handlePublicApiCommand(ctx, spec, options, stdin = { readStdin: r
|
|
|
41647
41784
|
const result = await ctx.platformClient.callPublicApi(spec.contract, parsed.data);
|
|
41648
41785
|
if (!result.ok)
|
|
41649
41786
|
return failureFields(result);
|
|
41787
|
+
const unconfirmedPause = await enforceRequestedPause(ctx, spec, parsed.data, result.value);
|
|
41788
|
+
if (unconfirmedPause)
|
|
41789
|
+
return unconfirmedPause;
|
|
41650
41790
|
ctx.ui.output(result.value, renderHuman(result.value));
|
|
41651
41791
|
return;
|
|
41652
41792
|
}
|
|
@@ -45139,4 +45279,4 @@ createProgram({ signals }).parseAsync().catch(() => {
|
|
|
45139
45279
|
process.exitCode = 1;
|
|
45140
45280
|
}).finally(() => exitWhenIdle(typeof process.exitCode === "number" ? process.exitCode : 0));
|
|
45141
45281
|
|
|
45142
|
-
//# debugId=
|
|
45282
|
+
//# debugId=A305E95D82772A0E64756E2164756E21
|
package/dist/runner-sdk.js
CHANGED
|
@@ -10295,6 +10295,75 @@ var makeDeleteTriggerContract = (ids) => {
|
|
|
10295
10295
|
};
|
|
10296
10296
|
};
|
|
10297
10297
|
|
|
10298
|
+
// node_modules/@qawolf/api-contracts/dist/v1/trigger/listFirings.js
|
|
10299
|
+
var makeFiringSchema = (ids) => object({
|
|
10300
|
+
deploymentId: ids.deployment.optional().describe("The deployment it fired on, for a deployment or by hand."),
|
|
10301
|
+
environmentId: ids.environment.optional().describe("The environment it fired in. Absent for a pull request or QA Wolf event firing."),
|
|
10302
|
+
firedAt: exports_iso.datetime(),
|
|
10303
|
+
id: string2().describe("The firing's id."),
|
|
10304
|
+
occasion: string2().describe("What fired it: deployment, schedule, or manual for trigger.runNow and the app's Run now. Later versions add kinds."),
|
|
10305
|
+
outcome: string2().describe("fired: the trigger started its action. skipped: it chose not to, and reason says why. failed: it could not start it."),
|
|
10306
|
+
reason: string2().optional().describe("Why a skipped or failed firing started nothing, as a stable code such as trigger-paused, session-limit-reached or no-enabled-workflows. Later versions add codes."),
|
|
10307
|
+
runId: ids.run.optional().describe("The run the firing started."),
|
|
10308
|
+
sessionId: ids.chatSession.optional().describe("The QA Wolf session a startAgent firing started."),
|
|
10309
|
+
sessionStatus: string2().optional().describe("How that session stands now, as agent.send reports it: working, waiting-for-you, completed, failed or cancelled."),
|
|
10310
|
+
startedBy: string2().optional().describe("Who fired it by hand. Absent for any other firing.")
|
|
10311
|
+
});
|
|
10312
|
+
var makeListTriggerFiringsContract = (ids) => {
|
|
10313
|
+
const input = object({
|
|
10314
|
+
triggerId: ids.trigger,
|
|
10315
|
+
...makePaginationInputFields({ defaultLimit: 20, maxLimit: 100 })
|
|
10316
|
+
});
|
|
10317
|
+
const output = object({
|
|
10318
|
+
firings: array(makeFiringSchema(ids)).describe("The trigger's firings, newest first."),
|
|
10319
|
+
nextCursor: nextCursorSchema
|
|
10320
|
+
});
|
|
10321
|
+
return {
|
|
10322
|
+
annotationJustifications: {
|
|
10323
|
+
destructiveHint: "Does not modify the trigger, its runs or its sessions.",
|
|
10324
|
+
openWorldHint: "Reads private QA Wolf trigger history without changing external systems.",
|
|
10325
|
+
readOnlyHint: "Lists when one authorized trigger fired and what each firing started."
|
|
10326
|
+
},
|
|
10327
|
+
annotations: {
|
|
10328
|
+
destructiveHint: false,
|
|
10329
|
+
openWorldHint: false,
|
|
10330
|
+
readOnlyHint: true
|
|
10331
|
+
},
|
|
10332
|
+
description: "List when a trigger fired and what each firing started: a run, a QA Wolf " + "session, or nothing and why.",
|
|
10333
|
+
input,
|
|
10334
|
+
kind: "read",
|
|
10335
|
+
name: "trigger.listFirings",
|
|
10336
|
+
output
|
|
10337
|
+
};
|
|
10338
|
+
};
|
|
10339
|
+
|
|
10340
|
+
// node_modules/@qawolf/api-contracts/dist/v1/trigger/runNow.js
|
|
10341
|
+
var makeRunTriggerNowContract = (ids) => {
|
|
10342
|
+
const input = object({
|
|
10343
|
+
deploymentId: ids.deployment.optional().describe("The recent deployment a deployment trigger fires on, which must match the trigger. The trigger's first when decides its kind: a deployment trigger requires this, and a schedule trigger refuses it, firing on its own environment as if its slot came now."),
|
|
10344
|
+
requestId: string2().trim().min(1).max(100).describe("Any string that is new for each firing. Repeating a request with the same requestId fires the trigger once."),
|
|
10345
|
+
triggerId: ids.trigger
|
|
10346
|
+
});
|
|
10347
|
+
const output = object({ trigger: makeTriggerResourceSchema(ids) });
|
|
10348
|
+
return {
|
|
10349
|
+
annotationJustifications: {
|
|
10350
|
+
destructiveHint: "Starts the trigger's action, which can run tests that change or delete application data.",
|
|
10351
|
+
openWorldHint: "The firing can start test runs or a QA Wolf session against external applications.",
|
|
10352
|
+
readOnlyHint: "Fires the trigger once, starting its runs or its QA Wolf session."
|
|
10353
|
+
},
|
|
10354
|
+
annotations: {
|
|
10355
|
+
destructiveHint: true,
|
|
10356
|
+
openWorldHint: true,
|
|
10357
|
+
readOnlyHint: false
|
|
10358
|
+
},
|
|
10359
|
+
description: "Fire a trigger once by hand. It works on a " + "paused trigger too, and does the same as any other firing, except that a run it " + "starts is not linked to the deployment or its pull request. Follow the firing with " + "trigger.listFirings.",
|
|
10360
|
+
input,
|
|
10361
|
+
kind: "write",
|
|
10362
|
+
name: "trigger.runNow",
|
|
10363
|
+
output
|
|
10364
|
+
};
|
|
10365
|
+
};
|
|
10366
|
+
|
|
10298
10367
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/update.js
|
|
10299
10368
|
var makeUpdateTriggerContract = (ids) => {
|
|
10300
10369
|
const commonFields = {
|
|
@@ -10341,8 +10410,10 @@ var makeTriggerContracts = (ids) => ({
|
|
|
10341
10410
|
delete: makeDeleteTriggerContract(ids),
|
|
10342
10411
|
find: makeFindTriggersContract(ids),
|
|
10343
10412
|
get: makeGetTriggerContract(ids),
|
|
10413
|
+
listFirings: makeListTriggerFiringsContract(ids),
|
|
10344
10414
|
pause: makePauseTriggerContract(ids),
|
|
10345
10415
|
resume: makeResumeTriggerContract(ids),
|
|
10416
|
+
runNow: makeRunTriggerNowContract(ids),
|
|
10346
10417
|
update: makeUpdateTriggerContract(ids)
|
|
10347
10418
|
});
|
|
10348
10419
|
// node_modules/@qawolf/api-contracts/dist/v1/agent/get.js
|
|
@@ -10870,9 +10941,17 @@ var makeDeploymentResourceSchema = (ids) => resource({
|
|
|
10870
10941
|
deployTarget: string2().optional().describe("The URL the deployment serves. A trigger's deployTargetPattern matches against it."),
|
|
10871
10942
|
environmentId: ids.environment.describe("The QA Wolf environment the deployment reported into."),
|
|
10872
10943
|
environmentName: string2().optional().describe("The environment's name. Absent when the environment has since been deleted."),
|
|
10944
|
+
environmentVariables: object({
|
|
10945
|
+
secretNames: array(string2()).describe("Override names that are secret in the deployment's environment, sorted. Their values are never returned."),
|
|
10946
|
+
variables: array(object({
|
|
10947
|
+
name: string2(),
|
|
10948
|
+
value: string2().describe("The override value. Handle as a secret.")
|
|
10949
|
+
})).describe("The overrides that are not secret, sorted by name.")
|
|
10950
|
+
}).optional().describe("The environment variable overrides that the deployment report set for the runs this deployment requests. A deployer often puts the version or build number of the release here. Absent when the report set none."),
|
|
10873
10951
|
id: ids.deployment,
|
|
10874
10952
|
provider: _enum(["github", "gitlab", "api"]).optional().describe("How QA Wolf received the deployment: a GitHub webhook, a GitLab webhook, or the deployment.reportStatus API."),
|
|
10875
10953
|
repository: string2().optional().describe(`The repository the deployment came from, as "owner/name". Absent when neither the code host nor the deployment report named one. A trigger's repositoryPattern matches against it.`),
|
|
10954
|
+
runIds: array(ids.run).describe("The runs that tested this deployment, newest first. Empty when no run tested it. run.get reads each one."),
|
|
10876
10955
|
service: string2().optional().describe("Which application was deployed, as the deployer named it. Absent when the deployer named none."),
|
|
10877
10956
|
status: _enum(["pending", "success", "failure", "inactive"]).optional().describe("The deployment's lifecycle status, in the vocabulary deployment.reportStatus accepts. Absent when no status was ever reported.")
|
|
10878
10957
|
}, {
|
|
@@ -14172,6 +14251,7 @@ var authErrorMessages = {
|
|
|
14172
14251
|
runIdMayBeRunnerLocal: (runId) => `A run id printed by qawolf runner run belongs to that runner rather than to the platform, so this command cannot resolve it. Read that run with qawolf runner events run-status --run ${runId ?? "<id>"}.`,
|
|
14173
14252
|
notFound404Record: (noun, id) => `QA Wolf has no ${noun} ${id} (HTTP 404).`,
|
|
14174
14253
|
notFound404: (noun) => noun === undefined ? "QA Wolf found nothing matching the request (HTTP 404)." : `QA Wolf found nothing matching the ${noun} request (HTTP 404).`,
|
|
14254
|
+
notServedYet: (noun, baseUrl) => `QA Wolf at ${baseUrl} does not support ${noun ?? "this request"} yet (HTTP 404). This CLI is newer than the server, so try again once the server has been updated.`,
|
|
14175
14255
|
failedWithStatus: (status, noun) => `QA Wolf API${noun ? ` ${noun}` : ""} request failed (HTTP ${status}).`,
|
|
14176
14256
|
notSent: "Nothing was sent, so this request did not take effect.",
|
|
14177
14257
|
networkUnreachable: (options) => `Could not reach the QA Wolf API at ${options.baseUrl}${options.noun ? ` to fetch ${options.noun}` : ""}${options.cause ? ` (${options.cause})` : ""}. Check your network connection and QAWOLF_HOST_URL.`,
|
|
@@ -16504,6 +16584,7 @@ function describeIdentityError(err) {
|
|
|
16504
16584
|
}
|
|
16505
16585
|
return { error: m2.identity.unexpectedFormat };
|
|
16506
16586
|
}
|
|
16587
|
+
var isUnservedRoute = (reason) => /^No (procedure found|"\w+"-procedure) on path /.test(reason);
|
|
16507
16588
|
function describeRequestError(err, baseUrl, noun, notFound) {
|
|
16508
16589
|
if (err.kind === "http") {
|
|
16509
16590
|
const reason = parseErrorBody(err.body);
|
|
@@ -16522,6 +16603,11 @@ function describeRequestError(err, baseUrl, noun, notFound) {
|
|
|
16522
16603
|
};
|
|
16523
16604
|
if (err.status === 403)
|
|
16524
16605
|
return parseJson(err.body) === undefined ? { error: m2.request.blocked403(noun) } : { error: m2.request.rejected403(noun), ...body };
|
|
16606
|
+
if (err.status === 404 && isUnservedRoute(reason))
|
|
16607
|
+
return {
|
|
16608
|
+
error: m2.request.notServedYet(noun, baseUrl),
|
|
16609
|
+
exitCode: exitCodes.notFound
|
|
16610
|
+
};
|
|
16525
16611
|
if (err.status === 404)
|
|
16526
16612
|
return describeNotFound(notFound, noun, reason);
|
|
16527
16613
|
return { error: m2.request.failedWithStatus(err.status, noun), ...body };
|
|
@@ -18916,4 +19002,4 @@ export {
|
|
|
18916
19002
|
createRunnerSdk
|
|
18917
19003
|
};
|
|
18918
19004
|
|
|
18919
|
-
//# debugId=
|
|
19005
|
+
//# debugId=A4292F6B29FCE6D964756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qawolf/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"description": "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@clack/prompts": "1.5.1",
|
|
73
73
|
"@napi-rs/keyring": "1.3.0",
|
|
74
74
|
"@oxc-node/core": "0.1.0",
|
|
75
|
-
"@qawolf/api-contracts": "0.
|
|
75
|
+
"@qawolf/api-contracts": "0.144.0",
|
|
76
76
|
"@qawolf/emails": "1.1.1",
|
|
77
77
|
"@qawolf/flow-targets": "2.0.0",
|
|
78
78
|
"commander": "14.0.3",
|
|
@@ -263,8 +263,10 @@ that `url`; never guess a route and never send a repository link in its place.
|
|
|
263
263
|
| `qawolf trigger delete` | write | Delete a trigger permanently. The runs it already created are kept. To stop a trigger without losing it, use trigger.pause. |
|
|
264
264
|
| `qawolf trigger find` | read | List the team's triggers, newest first. |
|
|
265
265
|
| `qawolf trigger get` | read | Get one trigger by id. |
|
|
266
|
+
| `qawolf trigger listFirings` | read | List when a trigger fired and what each firing started: a run, a QA Wolf session, or nothing and why. |
|
|
266
267
|
| `qawolf trigger pause` | write | Pause a trigger so it stops firing. Pausing is idempotent. A team whose triggers are all paused reports no trigger activity at all. |
|
|
267
268
|
| `qawolf trigger resume` | write | Resume a paused trigger. A schedule trigger restarts from the next upcoming slot: the slots it missed while paused do not run. |
|
|
269
|
+
| `qawolf trigger runNow` | write | Fire a trigger once by hand. It works on a paused trigger too, and does the same as any other firing, except that a run it starts is not linked to the deployment or its pull request. Follow the firing with trigger.listFirings. |
|
|
268
270
|
| `qawolf trigger update` | write | Replace a trigger's configuration. Every configuration field is written, so read the trigger first and send its definition back with your changes applied. isPaused and description are kept when omitted. |
|
|
269
271
|
| `qawolf usage breakdown` | read | Show where credits went over a range of UTC days, grouped by time, workspace, environment, platform, source, trigger or user. Use it to find what uses the most credits, or to build a usage dashboard. Credits only, no dollar amounts. |
|
|
270
272
|
|