@qawolf/cli 2.3.0 → 2.5.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 +409 -37
- package/dist/runner-sdk.js +394 -29
- package/package.json +2 -2
- package/skills/qawolf-cli/SKILL.md +11 -1
- package/skills/qawolf-cli/references/run-results.md +15 -0
- package/skills/qawolf-cli/references/runner.md +58 -43
package/dist/cli.js
CHANGED
|
@@ -8969,7 +8969,6 @@ var runMessages = {
|
|
|
8969
8969
|
envFileUnparseable: (reason) => `The --env-file could not be read. ${reason}`,
|
|
8970
8970
|
envFileUnreadable: (path) => `No env file at ${path}. Pass a path that exists, or drop --env-file to send no environment.`,
|
|
8971
8971
|
envIdBlank: "--env-id was given nothing. Pass the id or alias of a QA Wolf environment, or drop the flag to send no environment.",
|
|
8972
|
-
envIdWithEnvFile: "--env-id and --env-file both give the run its environment, so only one may be passed. Use --env-id for a QA Wolf environment, which QA Wolf reads itself, or --env-file for a dotenv file on this machine.",
|
|
8973
8972
|
fileNotCollected: (path) => `"${path}" is not one of the files that travel to a runner. It must be inside the current directory and end in .ts, .tsx, .js, .mjs, .cjs or .json.`,
|
|
8974
8973
|
fileUnreadable: (path, reason) => `${path} is one of the files that travel to a runner, but it could not be read: ${reason}. Move it out of the current directory, or make it readable.`,
|
|
8975
8974
|
filesUnreadable: (reason) => `One of the files that travel to a runner could not be read: ${reason}.`,
|
|
@@ -8996,7 +8995,9 @@ var runMessages = {
|
|
|
8996
8995
|
unsearchedHistory: (stream) => `This read of ${stream} stopped before searching all of the runner's history, so older entries may exist that it did not look at. Page forwards with --since to reach them.`,
|
|
8997
8996
|
submitMayHaveStarted: "The runner did not answer, which does not mean the run did not start. Read qawolf runner events run-status before running the flow again, and use the newest run id there if one appeared.",
|
|
8998
8997
|
submitLostMayHaveStarted: "The run may have started before the connection failed. Read qawolf runner events run-status before running the flow again, and use the newest run id there if one appeared.",
|
|
8999
|
-
targetMismatch: (runnerName, requiredRunnerName) => `This flow needs a ${requiredRunnerName} runner and ${runnerName} is running. Launch one with --name ${requiredRunnerName}
|
|
8998
|
+
targetMismatch: (runnerName, requiredRunnerName) => `This flow needs a ${requiredRunnerName} runner and ${runnerName} is running. Launch one with --name ${requiredRunnerName}.`,
|
|
8999
|
+
varMalformed: (assignment) => `--env-var takes NAME=VALUE, and "${assignment}" names no variable.`,
|
|
9000
|
+
varRepeated: (name) => `--env-var gives ${name} more than once, so the run's value is unclear. Pass it once.`
|
|
9000
9001
|
};
|
|
9001
9002
|
|
|
9002
9003
|
// src/core/messages/interactiveRunner/index.ts
|
|
@@ -17132,6 +17133,37 @@ var defaultIdSchemas = {
|
|
|
17132
17133
|
};
|
|
17133
17134
|
var workspaceForEnvironmentRef = (workspace) => workspace.optional().describe("The workspace the environment belongs to, which an alias resolves in. Read it from whoami.");
|
|
17134
17135
|
|
|
17136
|
+
// node_modules/@qawolf/api-contracts/dist/v1/build/resource.js
|
|
17137
|
+
var buildPlatformSchema = _enum(["android", "ios"]).describe("The platform the build runs on, read from its file type.");
|
|
17138
|
+
var buildIdSchema = string2().regex(/^[a-z0-9]{24}obld$/, "Expected a build id from build.requestUpload.").describe("The id of the build, from build.requestUpload.");
|
|
17139
|
+
var makeBuildResourceSchema = (ids) => resource({
|
|
17140
|
+
appId: string2().describe("The package name (Android) or bundle ID (iOS) read from the file. A flow launches it with `launch({ app: { id } })`."),
|
|
17141
|
+
appName: string2().optional().describe("The app's display name, when the file names one."),
|
|
17142
|
+
branch: string2().optional().describe("The branch the uploader said the build came from."),
|
|
17143
|
+
buildNumber: string2().optional().describe("versionCode (Android) or CFBundleVersion (iOS), when the file has one."),
|
|
17144
|
+
commitSha: string2().optional().describe("The commit the uploader said the build came from."),
|
|
17145
|
+
createdAt: exports_iso.datetime().describe("When the build was created."),
|
|
17146
|
+
deletedAt: exports_iso.datetime().optional().describe("When the build was deleted. Runs never install it after."),
|
|
17147
|
+
environmentId: ids.environment.optional().describe("The environment whose runs install the build while it is the newest one there for its app and platform. Absent: only a run created with the build installs it."),
|
|
17148
|
+
fileName: string2().describe("The uploaded file's name."),
|
|
17149
|
+
id: buildIdSchema,
|
|
17150
|
+
platform: buildPlatformSchema,
|
|
17151
|
+
sizeBytes: number2().int().optional().describe("The file's size in bytes."),
|
|
17152
|
+
version: string2().optional().describe("versionName (Android) or CFBundleShortVersionString (iOS), when the file has one.")
|
|
17153
|
+
}, { urlFieldDescription: "Absolute URL of the team's Builds page." });
|
|
17154
|
+
var makeBuildEnvironmentSelectorSchema = (ids) => union([
|
|
17155
|
+
strictObject({
|
|
17156
|
+
id: ids.environment.describe("The id of an existing environment. Never creates an environment. Send an alias through name instead.")
|
|
17157
|
+
}),
|
|
17158
|
+
strictObject({
|
|
17159
|
+
baseEphemeralEnvironment: string2().trim().min(1).max(255).optional().describe("The alias or name of the environment a created ephemeral environment copies from. Only valid with ephemeral."),
|
|
17160
|
+
ephemeral: boolean2().optional().describe("Requests an ephemeral environment when the name creates one, such as a pull request's. A name that matches an existing environment keeps that environment's kind."),
|
|
17161
|
+
name: string2().trim().min(1).max(255).describe("The environment's alias or name, as deployment.reportStatus takes it. Creates the environment when none matches. It keeps its base's URL.")
|
|
17162
|
+
})
|
|
17163
|
+
], {
|
|
17164
|
+
error: "Send environment as either { id } or { name }, with optional ephemeral and baseEphemeralEnvironment."
|
|
17165
|
+
});
|
|
17166
|
+
|
|
17135
17167
|
// node_modules/@qawolf/api-contracts/dist/v1/run/flowSelection.js
|
|
17136
17168
|
var makeFlowSelectionSchema = (ids) => object({
|
|
17137
17169
|
flowIds: array(ids.flow).default([]),
|
|
@@ -17144,6 +17176,7 @@ var makeFlowSelectionSchema = (ids) => object({
|
|
|
17144
17176
|
var makeCreateRunContract = (ids) => {
|
|
17145
17177
|
const input = object({
|
|
17146
17178
|
aiTaskId: ids.aiTask.optional().describe("The AI task whose conversation should receive run status updates."),
|
|
17179
|
+
builds: array(buildIdSchema).min(1).max(20).optional().describe("Builds to install in this run only. Each replaces the environment's latest build of its app and platform."),
|
|
17147
17180
|
chatSessionId: ids.chatSession.optional().describe("The chat session whose transcript should receive run status updates."),
|
|
17148
17181
|
environmentId: ids.environmentRef,
|
|
17149
17182
|
environmentVariables: record(string2(), string2()).optional().describe("Environment variables for this run only, over the environment's own."),
|
|
@@ -17608,14 +17641,14 @@ var makeInspectMobileOnRunnerContract = (ids) => {
|
|
|
17608
17641
|
annotationJustifications: {
|
|
17609
17642
|
destructiveHint: "Does not change application data, edit tests, or stop the runner.",
|
|
17610
17643
|
openWorldHint: "Inspects the existing QA Wolf mobile runner without submitting application actions or contacting arbitrary services.",
|
|
17611
|
-
readOnlyHint: "Reads mobile session status, contexts, page source, or elements
|
|
17644
|
+
readOnlyHint: "Reads mobile session status, contexts, page source, or elements and refreshes activity, which can cancel an inactivity shutdown."
|
|
17612
17645
|
},
|
|
17613
17646
|
annotations: {
|
|
17614
17647
|
destructiveHint: false,
|
|
17615
17648
|
openWorldHint: false,
|
|
17616
|
-
readOnlyHint:
|
|
17649
|
+
readOnlyHint: false
|
|
17617
17650
|
},
|
|
17618
|
-
description: `Inspect one thing on a mobile or Windows interactive runner: the Appium session's status, the contexts available (WebViews on mobile, top-level windows on Windows), the current context's page source, or the elements at a point, carrying some text, or matching a selector. This
|
|
17651
|
+
description: `Inspect one thing on a mobile or Windows interactive runner: the Appium session's status, the contexts available (WebViews on mobile, top-level windows on Windows), the current context's page source, or the elements at a point, carrying some text, or matching a selector. This refreshes the inactivity timer and can extend the runner's billed lifetime. Mobile and Windows only — a browser runner answers \`runner-is-not-mobile\`; call \`runner.inspect\` for a browser's equivalent surface instead. \`what: "session"\` always answers with the session's own status rather than \`screen-needs-a-run\`, since that is the question it exists to answer; the other three request kinds need a live session first and answer the same \`screen-needs-a-run\` or \`screen-not-ready\` outcomes \`runner.performAction\` and \`runner.takeScreenshot\` use, instead of reading anything when there is none. \`screen-needs-a-run\` means no Appium session has started on this runner yet — call \`runner.runFlow\` with a flow that opens one, then inspect again. \`screen-not-ready\` means the runner's Appium session exists but did not answer this instant, or more than one is somehow live — retry once; if it persists, relaunch the runner. \`runner-is-not-mobile\` means there is nothing here to inspect, and retrying will never help — launch an \`android\`, \`ios\` or \`windows\` runner instead. \`invalid-selector\` (elements by selector only) means the selector itself could not be parsed under the given \`strategy\` — distinct from a selector that parsed fine but matched nothing, which answers \`matches: []\` instead. ${retryableRunnerUnreachableDescription}`,
|
|
17619
17652
|
input,
|
|
17620
17653
|
kind: "read",
|
|
17621
17654
|
name: "runner.inspectMobile",
|
|
@@ -17982,7 +18015,7 @@ var makeRecordOnRunnerContract = (ids) => {
|
|
|
17982
18015
|
openWorldHint: false,
|
|
17983
18016
|
readOnlyHint: false
|
|
17984
18017
|
},
|
|
17985
|
-
description: "Control video recording on a
|
|
18018
|
+
description: "Control video recording on a browser, mobile, Windows, or Mac runner. Start requires a caller-generated UUID; stop targets that UUID so retries cannot stop a later recording. Manual capture spans runs and suppresses automatic capture. Auto settings affect subsequent full runs. The URL opens recording history after the runner terminates. Videos may be unavailable after abrupt pod loss.",
|
|
17986
18019
|
input,
|
|
17987
18020
|
kind: "write",
|
|
17988
18021
|
name: "runner.record",
|
|
@@ -18062,6 +18095,7 @@ var makeTriggerActionSchema = (ids) => object({
|
|
|
18062
18095
|
investigateFailures: boolean2().optional().describe("Whether QA Wolf investigates failures in the resulting runs. Defaults to true."),
|
|
18063
18096
|
kind: triggerActionKindSchema.default("createSuite"),
|
|
18064
18097
|
runConcurrencyLimit: string2().trim().min(1).max(255).optional().describe(`How many runs of the resulting suite may execute at once: a whole number from 1 to 1000, "unlimited", or a concurrency expression, which the server validates. It replaces the environment's limit rather than capping below it. Omit it to leave the environment's limit in charge.`),
|
|
18098
|
+
suggestCoverage: boolean2().optional().describe("Whether QA Wolf explores the environment after the resulting runs and suggests coverage that nothing tests yet. Defaults to false."),
|
|
18065
18099
|
tagNames: array(string2().min(1)).default([]).describe("Tags naming the flows to run. Combined with flowIds.")
|
|
18066
18100
|
}).describe("What the trigger runs when it fires.");
|
|
18067
18101
|
var makeTriggerScheduleFields = (ids) => ({
|
|
@@ -18584,6 +18618,173 @@ var makeGetAttemptContract = (ids) => {
|
|
|
18584
18618
|
};
|
|
18585
18619
|
};
|
|
18586
18620
|
|
|
18621
|
+
// node_modules/@qawolf/api-contracts/dist/v1/build/create.js
|
|
18622
|
+
var makeCreateBuildContract = (ids) => {
|
|
18623
|
+
const input = object({
|
|
18624
|
+
branch: string2().trim().min(1).max(255).optional().describe("The branch the build came from. Shown with the build."),
|
|
18625
|
+
buildId: buildIdSchema.describe("The buildId build.requestUpload answered with. Upload the file first."),
|
|
18626
|
+
commitSha: string2().trim().min(1).max(255).optional().describe("The commit the build came from. Shown with the build."),
|
|
18627
|
+
environment: makeBuildEnvironmentSelectorSchema(ids).optional().describe("The environment whose runs install the build from now on, until a newer build of the same app and platform arrives. Omit for a build that only runs created with it install."),
|
|
18628
|
+
workspaceId: ids.workspace.optional().describe("The workspace of the build. Required when authenticating with an organization or user API key.")
|
|
18629
|
+
}).superRefine((value, context) => {
|
|
18630
|
+
if (value.environment !== undefined && "name" in value.environment && value.environment.baseEphemeralEnvironment !== undefined && value.environment.ephemeral !== true) {
|
|
18631
|
+
context.addIssue({
|
|
18632
|
+
code: "custom",
|
|
18633
|
+
message: "baseEphemeralEnvironment is only valid with ephemeral.",
|
|
18634
|
+
path: ["environment", "baseEphemeralEnvironment"]
|
|
18635
|
+
});
|
|
18636
|
+
}
|
|
18637
|
+
});
|
|
18638
|
+
const output = object({ build: makeBuildResourceSchema(ids) });
|
|
18639
|
+
return {
|
|
18640
|
+
annotationJustifications: {
|
|
18641
|
+
destructiveHint: "Creates a build. With an environment, later runs there install it instead of the previous build.",
|
|
18642
|
+
openWorldHint: "Reads the uploaded file from QA Wolf storage only.",
|
|
18643
|
+
readOnlyHint: "Creates a build, and can create the environment it names."
|
|
18644
|
+
},
|
|
18645
|
+
annotations: {
|
|
18646
|
+
destructiveHint: false,
|
|
18647
|
+
openWorldHint: false,
|
|
18648
|
+
readOnlyHint: false
|
|
18649
|
+
},
|
|
18650
|
+
description: "Create a build from a file uploaded with build.requestUpload. Reads the app ID, name, version and build number from the file before it answers, or refuses a file that isn't an app. Calling it again with the same buildId answers the build the first call created, unchanged: a repeated call's branch, commitSha and environment are ignored.",
|
|
18651
|
+
input,
|
|
18652
|
+
kind: "write",
|
|
18653
|
+
name: "build.create",
|
|
18654
|
+
output
|
|
18655
|
+
};
|
|
18656
|
+
};
|
|
18657
|
+
|
|
18658
|
+
// node_modules/@qawolf/api-contracts/dist/v1/build/delete.js
|
|
18659
|
+
var makeDeleteBuildContract = (ids) => {
|
|
18660
|
+
const input = object({
|
|
18661
|
+
buildId: buildIdSchema,
|
|
18662
|
+
workspaceId: ids.workspace.optional().describe("The workspace of the build. Required when authenticating with an organization or user API key.")
|
|
18663
|
+
});
|
|
18664
|
+
const output = object({ build: makeBuildResourceSchema(ids) });
|
|
18665
|
+
return {
|
|
18666
|
+
annotationJustifications: {
|
|
18667
|
+
destructiveHint: "Deletes the build. Runs never install it after, and when it is an environment's latest build, runs there install the previous one instead, if its file is still kept.",
|
|
18668
|
+
openWorldHint: "Changes QA Wolf data and storage only.",
|
|
18669
|
+
readOnlyHint: "Deletes one build."
|
|
18670
|
+
},
|
|
18671
|
+
annotations: {
|
|
18672
|
+
destructiveHint: true,
|
|
18673
|
+
openWorldHint: false,
|
|
18674
|
+
readOnlyHint: false
|
|
18675
|
+
},
|
|
18676
|
+
description: "Delete a build. Runs never install a deleted build. Deleting an environment's latest build makes the previous one its latest. Runs install that build only if its file is still kept: only the latest builds of static environments are kept past the bucket's expiry, 180 days after upload on QA Wolf's cloud. Answers the build with deletedAt set. Deleting a deleted build answers it unchanged.",
|
|
18677
|
+
input,
|
|
18678
|
+
kind: "write",
|
|
18679
|
+
name: "build.delete",
|
|
18680
|
+
output
|
|
18681
|
+
};
|
|
18682
|
+
};
|
|
18683
|
+
|
|
18684
|
+
// node_modules/@qawolf/api-contracts/dist/v1/build/get.js
|
|
18685
|
+
var makeGetBuildContract = (ids) => {
|
|
18686
|
+
const input = object({
|
|
18687
|
+
buildId: buildIdSchema,
|
|
18688
|
+
workspaceId: ids.workspace.optional().describe("The workspace of the build. Required when authenticating with an organization or user API key.")
|
|
18689
|
+
});
|
|
18690
|
+
const output = object({ build: makeBuildResourceSchema(ids) });
|
|
18691
|
+
return {
|
|
18692
|
+
annotationJustifications: {
|
|
18693
|
+
destructiveHint: "Does not change the build.",
|
|
18694
|
+
openWorldHint: "Reads QA Wolf data only.",
|
|
18695
|
+
readOnlyHint: "Reads one build."
|
|
18696
|
+
},
|
|
18697
|
+
annotations: {
|
|
18698
|
+
destructiveHint: false,
|
|
18699
|
+
openWorldHint: false,
|
|
18700
|
+
readOnlyHint: true
|
|
18701
|
+
},
|
|
18702
|
+
description: "Get a build: its app, platform, version and environment. Deleted builds are returned too.",
|
|
18703
|
+
input,
|
|
18704
|
+
kind: "read",
|
|
18705
|
+
name: "build.get",
|
|
18706
|
+
output
|
|
18707
|
+
};
|
|
18708
|
+
};
|
|
18709
|
+
|
|
18710
|
+
// node_modules/@qawolf/api-contracts/dist/v1/build/list.js
|
|
18711
|
+
var makeListBuildsContract = (ids) => {
|
|
18712
|
+
const input = object({
|
|
18713
|
+
appId: string2().trim().min(1).optional().describe("Only list builds of this package name or bundle ID."),
|
|
18714
|
+
environmentId: ids.environment.optional().describe("Only list builds on this environment."),
|
|
18715
|
+
latestOnly: boolean2().default(false).describe("List only the builds the environment's next run installs: the newest undeleted build of each app and platform. Requires environmentId."),
|
|
18716
|
+
workspaceId: ids.workspace.optional().describe("The workspace to list builds from. Required when authenticating with an organization or user API key."),
|
|
18717
|
+
...makePaginationInputFields({ defaultLimit: 20, maxLimit: 100 })
|
|
18718
|
+
}).refine((value) => !value.latestOnly || value.environmentId !== undefined, {
|
|
18719
|
+
message: "latestOnly requires environmentId.",
|
|
18720
|
+
path: ["latestOnly"]
|
|
18721
|
+
});
|
|
18722
|
+
const output = object({
|
|
18723
|
+
builds: array(makeBuildResourceSchema(ids)).describe("Undeleted builds, newest first."),
|
|
18724
|
+
nextCursor: nextCursorSchema
|
|
18725
|
+
});
|
|
18726
|
+
return {
|
|
18727
|
+
annotationJustifications: {
|
|
18728
|
+
destructiveHint: "Does not change any build.",
|
|
18729
|
+
openWorldHint: "Reads QA Wolf data only.",
|
|
18730
|
+
readOnlyHint: "Lists builds."
|
|
18731
|
+
},
|
|
18732
|
+
annotations: {
|
|
18733
|
+
destructiveHint: false,
|
|
18734
|
+
openWorldHint: false,
|
|
18735
|
+
readOnlyHint: true
|
|
18736
|
+
},
|
|
18737
|
+
description: "List the workspace's undeleted builds, newest first. With latestOnly, list what the environment's next run installs.",
|
|
18738
|
+
input,
|
|
18739
|
+
kind: "read",
|
|
18740
|
+
name: "build.list",
|
|
18741
|
+
output
|
|
18742
|
+
};
|
|
18743
|
+
};
|
|
18744
|
+
|
|
18745
|
+
// node_modules/@qawolf/api-contracts/dist/v1/build/requestUpload.js
|
|
18746
|
+
var maxBuildFileBytes = 500 * 1024 * 1024;
|
|
18747
|
+
var makeRequestBuildUploadContract = (ids) => {
|
|
18748
|
+
const input = object({
|
|
18749
|
+
buildId: buildIdSchema.optional().describe("Send the buildId of an earlier answer to get a fresh URL for the same build. Omit for a new build."),
|
|
18750
|
+
fileName: string2().regex(/^[A-Za-z0-9._-]{1,255}$/, "A file name is one path segment of letters, digits, dots, dashes and underscores, at most 255 characters.").refine((fileName) => /\.(apk|aab|ipa)$/i.test(fileName), "A build is an .apk, .aab or .ipa file.").describe("The file's name, such as `app-release.apk`, `app-release.aab` or `App.ipa`. Its extension sets the platform."),
|
|
18751
|
+
fileSizeBytes: number2().int().min(1).max(maxBuildFileBytes).describe("The file's exact size in bytes, at most 500 MB. The URL accepts only a file of this size."),
|
|
18752
|
+
workspaceId: ids.workspace.optional().describe("The workspace to upload into. Required when authenticating with an organization or user API key.")
|
|
18753
|
+
});
|
|
18754
|
+
const output = object({
|
|
18755
|
+
buildId: buildIdSchema.describe("Send this to build.create after the PUT."),
|
|
18756
|
+
expiresAt: exports_iso.datetime().describe("When uploadUrl stops working. Request another one after it."),
|
|
18757
|
+
uploadHeaders: record(string2(), string2()).describe("Send these headers with the PUT, exactly. The URL is signed for them."),
|
|
18758
|
+
uploadUrl: string2().describe("Send the file's bytes here with a single HTTP PUT carrying uploadHeaders, for example `curl -X PUT -H 'Content-Type: application/octet-stream' -H 'x-goog-if-generation-match: 0' --upload-file app.apk \"<uploadUrl>\"`. The URL only creates the file: it refuses to overwrite one.")
|
|
18759
|
+
});
|
|
18760
|
+
return {
|
|
18761
|
+
annotationJustifications: {
|
|
18762
|
+
destructiveHint: "The URL only creates a new file. It cannot overwrite or delete one.",
|
|
18763
|
+
openWorldHint: "The upload target is QA Wolf's run inputs storage, not an external service.",
|
|
18764
|
+
readOnlyHint: "Returns an expiring URL that permits writing one file to the workspace's storage."
|
|
18765
|
+
},
|
|
18766
|
+
annotations: {
|
|
18767
|
+
destructiveHint: false,
|
|
18768
|
+
openWorldHint: false,
|
|
18769
|
+
readOnlyHint: false
|
|
18770
|
+
},
|
|
18771
|
+
description: "Get a URL to upload an app build: an .apk, .aab or .ipa, up to 500 MB. PUT the file there with uploadHeaders, then call build.create with the buildId.",
|
|
18772
|
+
input,
|
|
18773
|
+
kind: "write",
|
|
18774
|
+
name: "build.requestUpload",
|
|
18775
|
+
output
|
|
18776
|
+
};
|
|
18777
|
+
};
|
|
18778
|
+
|
|
18779
|
+
// node_modules/@qawolf/api-contracts/dist/v1/build/index.js
|
|
18780
|
+
var makeBuildContracts = (ids) => ({
|
|
18781
|
+
create: makeCreateBuildContract(ids),
|
|
18782
|
+
delete: makeDeleteBuildContract(ids),
|
|
18783
|
+
get: makeGetBuildContract(ids),
|
|
18784
|
+
list: makeListBuildsContract(ids),
|
|
18785
|
+
requestUpload: makeRequestBuildUploadContract(ids)
|
|
18786
|
+
});
|
|
18787
|
+
|
|
18587
18788
|
// node_modules/@qawolf/api-contracts/dist/v1/codeHostIntegration/resource.js
|
|
18588
18789
|
var makeCodeHostIntegrationResourceSchema = () => resource({
|
|
18589
18790
|
connectedAt: exports_iso.datetime().describe("When the code host was connected to the workspace."),
|
|
@@ -18820,6 +19021,7 @@ var makeReportDeploymentStatusContract = (ids) => {
|
|
|
18820
19021
|
error: "Send environment as either { id } or { name }, with optional ephemeral and baseEphemeralEnvironment."
|
|
18821
19022
|
});
|
|
18822
19023
|
const input = strictObject({
|
|
19024
|
+
builds: array(buildIdSchema).min(1).max(20).optional().describe("The builds this deployment ships, from build.create. Runs this deployment starts install them. A report that omits this field keeps the stored builds."),
|
|
18823
19025
|
deployTarget: httpUrl().max(2048).describe("The URL the deployment serves, e.g. a preview URL. A mobile pipeline leaves it unset and reports a service instead.").optional(),
|
|
18824
19026
|
environment: environment.describe("Selects the environment the deployment reports into.").optional(),
|
|
18825
19027
|
environmentVariables: record(string2(), string2()).describe("Environment variable overrides for the runs this deployment requests. A report that omits this field keeps the stored values. A report that sends it replaces them.").optional(),
|
|
@@ -19713,12 +19915,28 @@ var makeGetIssueContract = (ids) => {
|
|
|
19713
19915
|
};
|
|
19714
19916
|
|
|
19715
19917
|
// node_modules/@qawolf/api-contracts/dist/v1/investigation/finding.js
|
|
19716
|
-
var investigationFindingStateDescription = 'What the investigation concluded about the cause. Known values: "investigating", "fixed", "fix-proposed", "reported", "report-proposed", "flake", "question" and "
|
|
19918
|
+
var investigationFindingStateDescription = 'What the investigation concluded about the cause. Known values: "investigating", "fixed", "fix-proposed", "reported", "report-proposed", "flake", "question", "dismissed" and "superseded". "superseded" means a newer run replaced this run before the investigation concluded. New values can appear.';
|
|
19919
|
+
var investigationQuestionSchema = object({
|
|
19920
|
+
answers: array(object({
|
|
19921
|
+
description: string2().optional(),
|
|
19922
|
+
title: string2(),
|
|
19923
|
+
value: string2().describe('What choosing this answer means. Known values: "apply", "dismiss", "report", "maintenance", "bug" and "baseline". New values can appear.')
|
|
19924
|
+
})),
|
|
19925
|
+
body: string2().optional().describe("Markdown details under the question: what the test expects, what the app does and what each answer changes. A value a person must copy is in a code block."),
|
|
19926
|
+
comparisonId: string2().optional().describe('The failed screenshot comparison a screenshot question is about, as `run listScreenshotComparisons` names it. Its answers are "bug" (the old screenshot is right), "maintenance" (both are right) and "baseline" (the new screenshot is right).'),
|
|
19927
|
+
text: string2()
|
|
19928
|
+
});
|
|
19717
19929
|
var makeInvestigationFindingSchema = (ids) => object({
|
|
19718
19930
|
actual: string2().optional(),
|
|
19719
19931
|
commitHash: string2().optional().describe("The commit of a commit fix. Same as `fix.commitHash`."),
|
|
19720
19932
|
decidedBy: _enum(["agent", "user"]).optional().describe("Who decided: the AI on its own, or a person who approved or dismissed it. Absent until someone decides."),
|
|
19721
19933
|
disputeReason: string2().optional().describe("Why a person disputed what the AI did. Present on a proposal the AI made again after that dispute."),
|
|
19934
|
+
earlierQuestions: array(object({
|
|
19935
|
+
answer: string2(),
|
|
19936
|
+
answeredAt: exports_iso.datetime(),
|
|
19937
|
+
body: string2().optional(),
|
|
19938
|
+
text: string2()
|
|
19939
|
+
})).optional().describe("Questions about this cause that a person already answered, oldest first. The AI acted on each answer."),
|
|
19722
19940
|
expected: string2().optional(),
|
|
19723
19941
|
findingId: string2(),
|
|
19724
19942
|
fix: discriminatedUnion("type", [
|
|
@@ -19745,15 +19963,7 @@ var makeInvestigationFindingSchema = (ids) => object({
|
|
|
19745
19963
|
reason: string2().describe("Why the investigation reached the verdict."),
|
|
19746
19964
|
verdict: string2().describe('Whether the pull request caused the failure. Known values: "caused", "not-caused" and "unclear". New values can appear.')
|
|
19747
19965
|
}).optional().describe("Whether the pull request the run tested caused this finding. Absent on a run that didn't test a pull request, and when the investigation didn't say."),
|
|
19748
|
-
question:
|
|
19749
|
-
answers: array(object({
|
|
19750
|
-
description: string2().optional(),
|
|
19751
|
-
title: string2(),
|
|
19752
|
-
value: string2().describe('What choosing this answer means. Known values: "apply", "dismiss", "report", "maintenance", "bug" and "baseline". New values can appear.')
|
|
19753
|
-
})),
|
|
19754
|
-
comparisonId: string2().optional().describe('The failed screenshot comparison a screenshot question is about, as `run listScreenshotComparisons` names it. Its answers are "bug" (the old screenshot is right), "maintenance" (both are right) and "baseline" (the new screenshot is right).'),
|
|
19755
|
-
text: string2()
|
|
19756
|
-
}).optional().describe("The question waiting for a person, with the answers offered."),
|
|
19966
|
+
question: investigationQuestionSchema.optional().describe("The question waiting for a person, with the answers offered."),
|
|
19757
19967
|
response: object({
|
|
19758
19968
|
answer: string2().optional(),
|
|
19759
19969
|
at: exports_iso.datetime(),
|
|
@@ -19765,6 +19975,7 @@ var makeInvestigationFindingSchema = (ids) => object({
|
|
|
19765
19975
|
steps: array(string2()).optional(),
|
|
19766
19976
|
subSessionIds: array(ids.chatSession),
|
|
19767
19977
|
summary: string2().optional(),
|
|
19978
|
+
supersededByRunId: ids.run.optional().describe('The newer run that replaced this run, on a "superseded" finding.'),
|
|
19768
19979
|
updatedAt: exports_iso.datetime()
|
|
19769
19980
|
});
|
|
19770
19981
|
|
|
@@ -19774,6 +19985,17 @@ var makeGetInvestigationContract = (ids) => {
|
|
|
19774
19985
|
const output = resource({
|
|
19775
19986
|
baselineChanges: _enum(["automatic", "needs-approval"]).describe('How the investigation can make a new screenshot the baseline. "automatic": it can accept a baseline on its own. ' + '"needs-approval": it proposes the baseline on a fix-proposed finding, and accepts it only after a person applies the proposal.'),
|
|
19776
19987
|
findings: array(makeInvestigationFindingSchema(ids)),
|
|
19988
|
+
questionsFromOtherRuns: array(object({
|
|
19989
|
+
answer: string2().optional().describe(`The person's answer, when status is "answered".`),
|
|
19990
|
+
answeredAt: exports_iso.datetime().optional(),
|
|
19991
|
+
body: string2().optional(),
|
|
19992
|
+
findingId: string2(),
|
|
19993
|
+
flowIds: array(ids.flow),
|
|
19994
|
+
headline: string2().optional().describe("The cause that the question is about."),
|
|
19995
|
+
runId: ids.run,
|
|
19996
|
+
status: string2().describe('Known values: "open" (waiting for a person) and "answered". New values can appear.'),
|
|
19997
|
+
text: string2()
|
|
19998
|
+
})).optional().describe("Questions that the workspace's other run investigations asked about the same flows in the last 7 days, newest first."),
|
|
19777
19999
|
runId: ids.run,
|
|
19778
20000
|
sessionId: ids.chatSession.optional().describe("The investigation session. Absent when the run has none."),
|
|
19779
20001
|
status: _enum(["investigating", "finished", "not-investigated", "not-enabled"]).describe('Whether the lead or any child investigator is still working. "not-investigated" when the run has no investigation. ' + '"not-enabled" when automatic investigation does not cover this run, because its workspace has it off or investigates only pull request runs: read its failures with run.get and attempt.get instead.'),
|
|
@@ -19801,9 +20023,55 @@ var makeGetInvestigationContract = (ids) => {
|
|
|
19801
20023
|
};
|
|
19802
20024
|
};
|
|
19803
20025
|
|
|
20026
|
+
// node_modules/@qawolf/api-contracts/dist/v1/investigation/question/find.js
|
|
20027
|
+
var makeFindInvestigationQuestionsContract = (ids) => {
|
|
20028
|
+
const input = object({
|
|
20029
|
+
...makePaginationInputFields({ defaultLimit: 20, maxLimit: 100 }),
|
|
20030
|
+
environmentId: ids.environmentRef.optional().describe("Only list the questions of runs in this environment. Omit to list the questions of every environment."),
|
|
20031
|
+
statuses: array(_enum(["open"])).min(1).default(["open"]).describe(`Question statuses to include. "open" (waiting for a person's answer) is the only status today.`),
|
|
20032
|
+
workspaceId: ids.workspace.optional().describe("The workspace to list questions from. Required when authenticating with an organization or user API key.")
|
|
20033
|
+
});
|
|
20034
|
+
const output = object({
|
|
20035
|
+
nextCursor: nextCursorSchema,
|
|
20036
|
+
questions: array(resource({
|
|
20037
|
+
askedAt: exports_iso.datetime().describe("When the investigation first recorded the finding that asks the question."),
|
|
20038
|
+
findingId: string2(),
|
|
20039
|
+
flows: array(object({ flowId: ids.flow, name: string2() })).describe("The failed flows the question is about."),
|
|
20040
|
+
headline: string2().optional(),
|
|
20041
|
+
question: investigationQuestionSchema,
|
|
20042
|
+
runId: ids.run,
|
|
20043
|
+
sessionId: ids.chatSession.describe("The investigation session. Answer the question by sending the person's answer to it with agent.send."),
|
|
20044
|
+
summary: string2().optional()
|
|
20045
|
+
}, { urlFieldDescription: "The run in the QA Wolf app." })).describe("Questions that wait for a person's answer, the most recently recorded first. A page can hold fewer than limit questions, or none, while nextCursor is present.")
|
|
20046
|
+
});
|
|
20047
|
+
return {
|
|
20048
|
+
annotationJustifications: {
|
|
20049
|
+
destructiveHint: "Does not answer, dismiss or change any question.",
|
|
20050
|
+
openWorldHint: "Reads recorded QA Wolf findings without changing the application under test.",
|
|
20051
|
+
readOnlyHint: "Lists the open questions of a workspace's investigations without answering them."
|
|
20052
|
+
},
|
|
20053
|
+
annotations: {
|
|
20054
|
+
destructiveHint: false,
|
|
20055
|
+
openWorldHint: false,
|
|
20056
|
+
readOnlyHint: true
|
|
20057
|
+
},
|
|
20058
|
+
description: "List the questions the QA Wolf AI investigating failed runs is waiting for a person to answer, across a workspace's runs. " + "Each question names its run, flows, details and offered answers. " + "To answer one, send the person's answer to its sessionId with agent.send.",
|
|
20059
|
+
input,
|
|
20060
|
+
kind: "read",
|
|
20061
|
+
name: "investigation.question.find",
|
|
20062
|
+
output
|
|
20063
|
+
};
|
|
20064
|
+
};
|
|
20065
|
+
|
|
20066
|
+
// node_modules/@qawolf/api-contracts/dist/v1/investigation/question/index.js
|
|
20067
|
+
var makeInvestigationQuestionContracts = (ids) => ({
|
|
20068
|
+
find: makeFindInvestigationQuestionsContract(ids)
|
|
20069
|
+
});
|
|
20070
|
+
|
|
19804
20071
|
// node_modules/@qawolf/api-contracts/dist/v1/investigation/index.js
|
|
19805
20072
|
var makeInvestigationContracts = (ids) => ({
|
|
19806
|
-
get: makeGetInvestigationContract(ids)
|
|
20073
|
+
get: makeGetInvestigationContract(ids),
|
|
20074
|
+
question: makeInvestigationQuestionContracts(ids)
|
|
19807
20075
|
});
|
|
19808
20076
|
|
|
19809
20077
|
// node_modules/@qawolf/api-contracts/dist/v1/issue/addFlows.js
|
|
@@ -19893,6 +20161,35 @@ var makeCreateIssueContract = (ids) => {
|
|
|
19893
20161
|
};
|
|
19894
20162
|
};
|
|
19895
20163
|
|
|
20164
|
+
// node_modules/@qawolf/api-contracts/dist/v1/issue/decideSuggestion.js
|
|
20165
|
+
var makeDecideSuggestionContract = (ids) => {
|
|
20166
|
+
const input = object({
|
|
20167
|
+
decision: _enum(["add", "report", "skip", "undo", "activate"]).describe("add: turn on the suggested flow. report: file the potential bug. skip: decline the suggestion. undo: take back an add, report or skip before the flow joins. activate: retry a suggestion that QA Wolf held."),
|
|
20168
|
+
issueId: ids.issue.describe("The coverage request or bug report that QA Wolf opened for a suggestion."),
|
|
20169
|
+
skipReason: _enum(["not-worth-testing", "already-covered", "feature-removed"]).optional().describe("Why the suggestion is skipped. Required for skip.")
|
|
20170
|
+
}).refine(({ decision, skipReason }) => decision !== "skip" || skipReason !== undefined, { message: "skipReason is required when the decision is skip." });
|
|
20171
|
+
const output = object({
|
|
20172
|
+
issue: makeIssueResourceSchema(ids)
|
|
20173
|
+
});
|
|
20174
|
+
return {
|
|
20175
|
+
annotationJustifications: {
|
|
20176
|
+
destructiveHint: "Every decision can be undone until the flow joins, and nothing is deleted.",
|
|
20177
|
+
openWorldHint: "An added suggestion writes its flow to the environment's flow code repository.",
|
|
20178
|
+
readOnlyHint: "Records a decision on a suggestion and changes the issue's status."
|
|
20179
|
+
},
|
|
20180
|
+
annotations: {
|
|
20181
|
+
destructiveHint: false,
|
|
20182
|
+
openWorldHint: true,
|
|
20183
|
+
readOnlyHint: false
|
|
20184
|
+
},
|
|
20185
|
+
description: "Decide a coverage request or bug report that QA Wolf suggested after exploring an environment. " + "Add turns on the suggested flow in the environment. Report files a potential bug. " + "Skip declines the suggestion. Undo takes back a decision before the flow joins. " + "The issue's status follows the decision, so change the status only through this tool while the suggestion is undecided.",
|
|
20186
|
+
input,
|
|
20187
|
+
kind: "write",
|
|
20188
|
+
name: "issue.decideSuggestion",
|
|
20189
|
+
output
|
|
20190
|
+
};
|
|
20191
|
+
};
|
|
20192
|
+
|
|
19896
20193
|
// node_modules/@qawolf/api-contracts/dist/v1/issue/listActivity.js
|
|
19897
20194
|
var issueActivityTypeSchema = _enum([
|
|
19898
20195
|
"created",
|
|
@@ -20152,6 +20449,35 @@ var makeLegacyTriggerContracts = (ids) => ({
|
|
|
20152
20449
|
resume: makeResumeLegacyTriggerContract(ids)
|
|
20153
20450
|
});
|
|
20154
20451
|
|
|
20452
|
+
// node_modules/@qawolf/api-contracts/dist/v1/mcpServer/connect.js
|
|
20453
|
+
var makeConnectMcpServerContract = (ids) => {
|
|
20454
|
+
const input = object({
|
|
20455
|
+
server: string2().trim().min(1).describe("The server to connect, by its catalog id or name, such as linear or Linear."),
|
|
20456
|
+
workspaceId: ids.workspace.optional().describe("The workspace to connect the server to. Required when authenticating with an organization or user API key.")
|
|
20457
|
+
});
|
|
20458
|
+
const output = object({
|
|
20459
|
+
authorizationUrl: string2().url().describe("The server's sign-in page. Show it to the user: the connection is ready once they approve access there."),
|
|
20460
|
+
serverName: string2().describe("The catalog name of the server.")
|
|
20461
|
+
});
|
|
20462
|
+
return {
|
|
20463
|
+
annotationJustifications: {
|
|
20464
|
+
destructiveHint: "Starts a sign-in without changing or removing existing connections.",
|
|
20465
|
+
openWorldHint: "Asks the external server's OAuth provider for a sign-in page.",
|
|
20466
|
+
readOnlyHint: "Records a pending connection on the workspace."
|
|
20467
|
+
},
|
|
20468
|
+
annotations: {
|
|
20469
|
+
destructiveHint: false,
|
|
20470
|
+
openWorldHint: true,
|
|
20471
|
+
readOnlyHint: false
|
|
20472
|
+
},
|
|
20473
|
+
description: "Start connecting an MCP server from the workspace's catalog, such as Linear, so Tester can use its tools. Returns a sign-in link to show the user.",
|
|
20474
|
+
input,
|
|
20475
|
+
kind: "write",
|
|
20476
|
+
name: "mcpServer.connect",
|
|
20477
|
+
output
|
|
20478
|
+
};
|
|
20479
|
+
};
|
|
20480
|
+
|
|
20155
20481
|
// node_modules/@qawolf/api-contracts/dist/v1/run/investigationSessionId.js
|
|
20156
20482
|
var investigationSessionId = string2().trim().min(1).max(100).optional();
|
|
20157
20483
|
|
|
@@ -20235,6 +20561,7 @@ var makeDiagnoseRunContract = (ids) => {
|
|
|
20235
20561
|
// node_modules/@qawolf/api-contracts/dist/v1/run/find.js
|
|
20236
20562
|
var makeFindRunsContract = (ids) => {
|
|
20237
20563
|
const input = object({
|
|
20564
|
+
buildId: buildIdSchema.optional().describe("Only include runs that installed this build."),
|
|
20238
20565
|
createdAfter: exports_iso.datetime({ offset: true }).optional().describe("Only include runs created after this instant, e.g. the runs since a deploy."),
|
|
20239
20566
|
...makePaginationInputFields({ defaultLimit: 20, maxLimit: 100 }),
|
|
20240
20567
|
environmentId: ids.environmentRef,
|
|
@@ -20359,6 +20686,7 @@ var makeGetRunContract = (ids) => {
|
|
|
20359
20686
|
const output = resource({
|
|
20360
20687
|
...makeRunSummaryFields(ids),
|
|
20361
20688
|
blockingBugCount: number2().int().nonnegative().describe("How many bugs this run found are blocking: still open, and priority urgent, high, or unprioritized — unprioritized counts because nobody has ruled it out yet. This is what `failed` is derived from, so it explains a failure rather than adding a second verdict: gate on `status`, then read this to say how many bugs are holding the build. It counts a bug filed against a later run by an investigation that carried over from this one, and it drops a bug once that bug is resolved."),
|
|
20689
|
+
builds: array(makeBuildResourceSchema(ids)).describe("The builds the run installs, one per app and platform. Empty when the run has none."),
|
|
20362
20690
|
flows,
|
|
20363
20691
|
runId: ids.run.describe("The run this response describes. Treat it as canonical: it can differ from the id you asked for. A deploy notification returns a run id before the run exists, and if a second notification for the same commit is folded into an earlier run, that id resolves to the earlier run instead.")
|
|
20364
20692
|
}, { urlFieldDescription: "Absolute URL of the run page." });
|
|
@@ -20835,7 +21163,7 @@ var makeReadRunnerJournalContract = (ids) => {
|
|
|
20835
21163
|
openWorldHint: false,
|
|
20836
21164
|
readOnlyHint: false
|
|
20837
21165
|
},
|
|
20838
|
-
description: `Read a window of one of an interactive runner's journal streams — the newest few, everything after a cursor, or everything belonging to one run. This is how a flow run's outcome and output are followed: \`run-status\` settles it, \`run-logs\` and \`run-events\` carry what it produced, and \`recorder\` carries the browser actions the runner recorded. A read counts as activity, so working through history does not get the runner reaped underneath you. ${retryableRunnerUnreachableDescription}`,
|
|
21166
|
+
description: `Read a window of one of an interactive runner's journal streams — the newest few, everything after a cursor, or everything belonging to one run. This is how a flow run's outcome and output are followed: \`run-status\` settles it, \`run-logs\` and \`run-events\` carry what it produced, and \`recorder\` carries the browser actions the runner recorded. A read counts as activity, so working through history does not get the runner reaped underneath you. Polling \`runner.get\` or \`runner.list\` does not count as activity, so the inactivity clock keeps running until the runner is reaped. The journal lives only on the runner: once it is terminated or stops after inactivity, the journal is gone and this read answers not-found. ${retryableRunnerUnreachableDescription}`,
|
|
20839
21167
|
input,
|
|
20840
21168
|
kind: "read",
|
|
20841
21169
|
name: "runner.readJournal",
|
|
@@ -20985,7 +21313,7 @@ var makeTakeScreenshotOnRunnerContract = (ids) => {
|
|
|
20985
21313
|
openWorldHint: false,
|
|
20986
21314
|
readOnlyHint: false
|
|
20987
21315
|
},
|
|
20988
|
-
description: `Take one screenshot of an interactive runner's screen. On a runner with a browser the image is the whole virtual desktop, browser window and all
|
|
21316
|
+
description: `Take one screenshot of an interactive runner's screen. This refreshes the inactivity timer and can extend the runner's billed lifetime. On a runner with a browser the image is the whole virtual desktop, browser window and all. On a mobile runner it is the device's own screen, and on Windows the VM's whole desktop, re-encoded to JPEG on the pod so this contract reads one image format regardless of runner family. ${screenNeedsARunDescription} ${screenNotReadyDescription} On a mobile or Windows runner, \`screen-not-ready\` can also mean its Appium session did not answer in time; if it persists after 3 tries, terminate the runner and launch it again with the same id and runnerName. ${runnerHasNoScreenDescription} ${retryableRunnerUnreachableDescription}`,
|
|
20989
21317
|
input,
|
|
20990
21318
|
kind: "read",
|
|
20991
21319
|
name: "runner.takeScreenshot",
|
|
@@ -21120,6 +21448,7 @@ var makeContractsV1 = (ids) => {
|
|
|
21120
21448
|
attempt: {
|
|
21121
21449
|
get: makeGetAttemptContract(resolvedIds)
|
|
21122
21450
|
},
|
|
21451
|
+
build: makeBuildContracts(resolvedIds),
|
|
21123
21452
|
codeHostIntegration: {
|
|
21124
21453
|
find: makeFindCodeHostIntegrationsContract(resolvedIds),
|
|
21125
21454
|
listRepositories: makeListCodeHostRepositoriesContract(resolvedIds)
|
|
@@ -21157,6 +21486,7 @@ var makeContractsV1 = (ids) => {
|
|
|
21157
21486
|
issue: {
|
|
21158
21487
|
addFlows: makeAddFlowsToIssueContract(resolvedIds),
|
|
21159
21488
|
create: makeCreateIssueContract(resolvedIds),
|
|
21489
|
+
decideSuggestion: makeDecideSuggestionContract(resolvedIds),
|
|
21160
21490
|
find: makeFindIssuesContract(resolvedIds),
|
|
21161
21491
|
get: makeGetIssueContract(resolvedIds),
|
|
21162
21492
|
listActivity: makeListIssueActivityContract(resolvedIds),
|
|
@@ -21164,6 +21494,9 @@ var makeContractsV1 = (ids) => {
|
|
|
21164
21494
|
update: makeUpdateIssueContract(resolvedIds)
|
|
21165
21495
|
},
|
|
21166
21496
|
legacyTrigger: makeLegacyTriggerContracts(resolvedIds),
|
|
21497
|
+
mcpServer: {
|
|
21498
|
+
connect: makeConnectMcpServerContract(resolvedIds)
|
|
21499
|
+
},
|
|
21167
21500
|
promotion: makePromotionContracts(resolvedIds),
|
|
21168
21501
|
run: {
|
|
21169
21502
|
acceptScreenshotBaseline: makeAcceptScreenshotBaselineContract(resolvedIds),
|
|
@@ -23691,7 +24024,7 @@ function startUpdateCheck(deps) {
|
|
|
23691
24024
|
// package.json
|
|
23692
24025
|
var package_default = {
|
|
23693
24026
|
name: "@qawolf/cli",
|
|
23694
|
-
version: "2.
|
|
24027
|
+
version: "2.5.0",
|
|
23695
24028
|
description: "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
|
|
23696
24029
|
keywords: [
|
|
23697
24030
|
"automation",
|
|
@@ -23763,7 +24096,7 @@ var package_default = {
|
|
|
23763
24096
|
"@clack/prompts": "1.5.1",
|
|
23764
24097
|
"@napi-rs/keyring": "1.3.0",
|
|
23765
24098
|
"@oxc-node/core": "0.1.0",
|
|
23766
|
-
"@qawolf/api-contracts": "0.
|
|
24099
|
+
"@qawolf/api-contracts": "0.104.0",
|
|
23767
24100
|
"@qawolf/emails": "1.1.1",
|
|
23768
24101
|
"@qawolf/flow-targets": "2.0.0",
|
|
23769
24102
|
"@qawolf/flows": "0.3.0",
|
|
@@ -39715,13 +40048,18 @@ A --lines selection is the one call that does not need a run first. If the runne
|
|
|
39715
40048
|
|
|
39716
40049
|
# Environment variables
|
|
39717
40050
|
|
|
39718
|
-
A run
|
|
40051
|
+
A run's variables come from up to three places, each on top of the one before:
|
|
40052
|
+
- --env-id names a QA Wolf environment by id or alias, the same reference \`qawolf flows\` takes as --env.
|
|
40053
|
+
- --env-file .env reads a dotenv file, in the format \`qawolf flows pull\` writes.
|
|
40054
|
+
- --env-var NAME=VALUE, or --var for short, gives one variable, and can be repeated. It splits on the first =, so a value may hold one.
|
|
40055
|
+
|
|
40056
|
+
A later source replaces a variable of the same name from an earlier one, for this run only; the QA Wolf environment itself is not changed. Use that to run against something the environment does not hold, such as a new app build: \`--env-var RUN_INPUT_PATH=uploads/app.apk\`.
|
|
39719
40057
|
|
|
39720
|
-
A run with
|
|
40058
|
+
A run with no --env-id falls back to QAWOLF_ENVIRONMENT, the same variable \`qawolf flows\` reads, so one export covers both. The run says on stderr which environment it picked up, because those variables reach your flow's code and a run should never be given an environment silently. --env-id wins over it, and --env-file alone suppresses it, so a run reading a dotenv file is not handed a second environment unless you name one with --env-id. --env-var keeps it, since an --env-var adds to the environment rather than replacing it.
|
|
39721
40059
|
|
|
39722
40060
|
Prefer --env-id. QA Wolf reads and decrypts the environment itself, so the values never leave the server, nothing has to be pulled to disk first, and no size limit applies to them. It is the only way to run a flow whose environment holds something large, such as a session cookie.
|
|
39723
40061
|
|
|
39724
|
-
|
|
40062
|
+
The variables sent with --env-file and --env-var together may number at most 200, each value at most 16 KiB. Names follow what a shell accepts, and QAWOLF_TEAM_ID is reserved because QA Wolf sets it from the key you authenticated with. QAWOLF_ENVIRONMENT_ID, QAWOLF_ENVIRONMENT_NAME and QAWOLF_TEAM_API_KEY are set by QA Wolf for a run given an environment, and replace any value of yours. All of the refusals are made before a runner is addressed, naming the variable at fault.
|
|
39725
40063
|
`;
|
|
39726
40064
|
|
|
39727
40065
|
// src/commands/runner/guides/screenshot.txt
|
|
@@ -41319,12 +41657,36 @@ function buildRunEnvironment(content) {
|
|
|
41319
41657
|
ok: false
|
|
41320
41658
|
};
|
|
41321
41659
|
}
|
|
41322
|
-
|
|
41660
|
+
return checkRunEnvironment(parsed);
|
|
41661
|
+
}
|
|
41662
|
+
function checkRunEnvironment(environment) {
|
|
41663
|
+
const checked = runEnvironmentSchema.safeParse(environment);
|
|
41323
41664
|
if (!checked.success) {
|
|
41324
41665
|
return { error: prettifyError(checked.error), ok: false };
|
|
41325
41666
|
}
|
|
41326
41667
|
return { environment: checked.data, ok: true };
|
|
41327
41668
|
}
|
|
41669
|
+
function parseRunVariables(assignments) {
|
|
41670
|
+
const environment = {};
|
|
41671
|
+
for (const assignment of assignments) {
|
|
41672
|
+
const separator = assignment.indexOf("=");
|
|
41673
|
+
const name = separator === -1 ? "" : assignment.slice(0, separator).trim();
|
|
41674
|
+
if (name === "") {
|
|
41675
|
+
return {
|
|
41676
|
+
error: interactiveRunnerMessages.varMalformed(assignment),
|
|
41677
|
+
ok: false
|
|
41678
|
+
};
|
|
41679
|
+
}
|
|
41680
|
+
if (Object.hasOwn(environment, name)) {
|
|
41681
|
+
return {
|
|
41682
|
+
error: interactiveRunnerMessages.varRepeated(name),
|
|
41683
|
+
ok: false
|
|
41684
|
+
};
|
|
41685
|
+
}
|
|
41686
|
+
environment[name] = assignment.slice(separator + 1);
|
|
41687
|
+
}
|
|
41688
|
+
return { environment, ok: true };
|
|
41689
|
+
}
|
|
41328
41690
|
|
|
41329
41691
|
// src/domains/interactiveRunner/collectFiles.ts
|
|
41330
41692
|
async function collectRunFiles2(deps, roots) {
|
|
@@ -41353,12 +41715,12 @@ var refused = (error, exitCode) => ({
|
|
|
41353
41715
|
});
|
|
41354
41716
|
async function prepareRun(options, deps) {
|
|
41355
41717
|
const explicitEnvId = options.envId?.trim();
|
|
41356
|
-
if (explicitEnvId !== undefined && options.envFile !== undefined) {
|
|
41357
|
-
return refused(interactiveRunnerMessages.envIdWithEnvFile, exitCodes.invalidArgs);
|
|
41358
|
-
}
|
|
41359
41718
|
if (explicitEnvId === "") {
|
|
41360
41719
|
return refused(interactiveRunnerMessages.envIdBlank, exitCodes.invalidArgs);
|
|
41361
41720
|
}
|
|
41721
|
+
const fromVars = parseRunVariables(options.vars);
|
|
41722
|
+
if (!fromVars.ok)
|
|
41723
|
+
return refused(fromVars.error, exitCodes.invalidArgs);
|
|
41362
41724
|
const fromEnvVar = deps.env["QAWOLF_ENVIRONMENT"]?.trim();
|
|
41363
41725
|
const environmentId = explicitEnvId ?? (options.envFile === undefined && fromEnvVar ? fromEnvVar : undefined);
|
|
41364
41726
|
const linesFilePath = options.linesFile === undefined ? undefined : toCollectedPath(deps.cwd, options.linesFile);
|
|
@@ -41371,11 +41733,18 @@ async function prepareRun(options, deps) {
|
|
|
41371
41733
|
if (check.type !== "ok") {
|
|
41372
41734
|
return refused(describeRunFilesCheck(check), exitCodes.invalidArgs);
|
|
41373
41735
|
}
|
|
41374
|
-
const
|
|
41375
|
-
if (
|
|
41376
|
-
return refused(
|
|
41736
|
+
const fromFile = await readEnvironment(options.envFile, deps);
|
|
41737
|
+
if (fromFile !== undefined && !fromFile.ok) {
|
|
41738
|
+
return refused(fromFile.error, exitCodes.config);
|
|
41739
|
+
}
|
|
41740
|
+
const combined = fromFile === undefined && options.vars.length === 0 ? undefined : checkRunEnvironment({
|
|
41741
|
+
...fromFile?.environment,
|
|
41742
|
+
...fromVars.environment
|
|
41743
|
+
});
|
|
41744
|
+
if (combined !== undefined && !combined.ok) {
|
|
41745
|
+
return refused(combined.error, exitCodes.invalidArgs);
|
|
41377
41746
|
}
|
|
41378
|
-
const given =
|
|
41747
|
+
const given = combined?.environment;
|
|
41379
41748
|
if (options.lines === undefined) {
|
|
41380
41749
|
return options.linesFile === undefined ? {
|
|
41381
41750
|
environment: given,
|
|
@@ -41570,7 +41939,8 @@ async function handleRunnerRun(ctx, options, deps) {
|
|
|
41570
41939
|
envFile: options.envFile,
|
|
41571
41940
|
envId: options.envId,
|
|
41572
41941
|
lines: options.lines,
|
|
41573
|
-
linesFile: options.linesFile
|
|
41942
|
+
linesFile: options.linesFile,
|
|
41943
|
+
vars: options.vars
|
|
41574
41944
|
}, deps);
|
|
41575
41945
|
if (!prepared.ok) {
|
|
41576
41946
|
return { error: prepared.error, exitCode: prepared.exitCode };
|
|
@@ -41633,9 +42003,10 @@ Examples:
|
|
|
41633
42003
|
$ qawolf runner run flows/checkout.flow.ts --follow --logs
|
|
41634
42004
|
$ qawolf runner run flows/checkout.flow.ts --lines 12-40
|
|
41635
42005
|
$ qawolf runner run flows/checkout.flow.ts --lines 4-9 --lines-file pages/login.ts
|
|
41636
|
-
$ qawolf runner run flows/checkout.flow.ts --env-id staging
|
|
42006
|
+
$ qawolf runner run flows/checkout.flow.ts --env-id staging
|
|
42007
|
+
$ qawolf runner run flows/checkout.flow.ts --env-var RUN_INPUT_PATH=uploads/app.apk`;
|
|
41637
42008
|
function registerRunCommand(runner, signals) {
|
|
41638
|
-
declareCommandKind(runner.command("run <flowFile>"), "write").description("Run a flow on an interactive runner, shipping the flow and what it imports").option("--follow", "Report the run's status until it settles: in progress, then passed or failed", false).option("--logs", "Stream every log line the run produces while following. Implies --follow", false).option("--run-events", "Stream the run's progress events as JSON lines while following. Implies --follow", false).option("--recorder-events", "Stream the browser actions the runner records as JSON lines while following, from an anchor taken just before submission: the recorder is runner-wide, not run-scoped. Implies --follow", false).option("--env-id <env>", "QA Wolf environment whose variables the run is given, by id or alias. Defaults to QAWOLF_ENVIRONMENT. QA Wolf reads and decrypts them itself, so they never leave the server and no size limit applies to them").option("--env-file <path>", "Dotenv file on this machine whose variables the run is given.
|
|
42009
|
+
declareCommandKind(runner.command("run <flowFile>"), "write").description("Run a flow on an interactive runner, shipping the flow and what it imports").option("--follow", "Report the run's status until it settles: in progress, then passed or failed", false).option("--logs", "Stream every log line the run produces while following. Implies --follow", false).option("--run-events", "Stream the run's progress events as JSON lines while following. Implies --follow", false).option("--recorder-events", "Stream the browser actions the runner records as JSON lines while following, from an anchor taken just before submission: the recorder is runner-wide, not run-scoped. Implies --follow", false).option("--env-id <env>", "QA Wolf environment whose variables the run is given, by id or alias. Defaults to QAWOLF_ENVIRONMENT unless --env-file is passed. QA Wolf reads and decrypts them itself, so they never leave the server and no size limit applies to them").option("--env-file <path>", "Dotenv file on this machine whose variables the run is given. With --env-id, they go on top of that environment's").option("--var, --env-var <name=value>", "One variable for this run only, on top of the environment and --env-file; repeat for several", collectValue, []).option("--lines <start-end>", "Run only these 1-indexed lines against the browser as it stands, instead of the whole flow from a fresh one").option("--lines-file <path>", "File the --lines range lives in. Defaults to <flowFile>; pass it only when the lines are in another file, such as a page object").option("--runner <id>", runnerFlagDescription).option("--timeout <seconds>", "Give up following after this long. Following keeps the runner alive, so a run that never settles would otherwise bill until the terminal closed", String(defaultFollowTimeoutSeconds)).addHelpText("after", runExamples2).addHelpText("after", runnerGuides.run).action((flowFile, opts, command) => withRunnerContext(signals, (ctx) => handleRunnerRun(ctx, {
|
|
41639
42010
|
entryPoint: flowFile,
|
|
41640
42011
|
envFile: opts.envFile,
|
|
41641
42012
|
envId: opts.envId,
|
|
@@ -41646,7 +42017,8 @@ function registerRunCommand(runner, signals) {
|
|
|
41646
42017
|
recorderEvents: opts.recorderEvents,
|
|
41647
42018
|
runEvents: opts.runEvents,
|
|
41648
42019
|
runner: opts.runner,
|
|
41649
|
-
timeout: opts.timeout
|
|
42020
|
+
timeout: opts.timeout,
|
|
42021
|
+
vars: opts.envVar
|
|
41650
42022
|
}, runnerDeps(ctx)))(opts, command));
|
|
41651
42023
|
}
|
|
41652
42024
|
|
|
@@ -41898,4 +42270,4 @@ createProgram({ signals }).parseAsync().catch(() => {
|
|
|
41898
42270
|
process.exitCode = 1;
|
|
41899
42271
|
}).finally(() => exitWhenIdle(typeof process.exitCode === "number" ? process.exitCode : 0));
|
|
41900
42272
|
|
|
41901
|
-
//# debugId=
|
|
42273
|
+
//# debugId=38256B41DD722AA164756E2164756E21
|