@qawolf/cli 2.13.1 → 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 +539 -57
- package/dist/runner-sdk.js +478 -51
- package/package.json +2 -2
- package/skills/qawolf-cli/SKILL.md +14 -7
- package/skills/qawolf-cli/references/run-results.md +6 -5
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 };
|
|
@@ -18649,14 +18669,17 @@ var issueFileSchema = object({
|
|
|
18649
18669
|
sizeBytes: number2().int().nonnegative()
|
|
18650
18670
|
});
|
|
18651
18671
|
|
|
18672
|
+
// node_modules/@qawolf/api-contracts/dist/v1/extensibleValue.js
|
|
18673
|
+
var extensibleValue = (values, meanings) => string2().describe(`One of ${values.join(", ")}; newer servers may add values, so ignore any you don't know. ${meanings}`);
|
|
18674
|
+
|
|
18652
18675
|
// node_modules/@qawolf/api-contracts/dist/v1/build/resource.js
|
|
18653
|
-
var buildPlatformSchema =
|
|
18676
|
+
var buildPlatformSchema = extensibleValue(["android", "ios", "linux"], "The OS the build runs on, read from its file type. `linux` builds are Electron apps that Electron flows launch.");
|
|
18654
18677
|
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.");
|
|
18655
18678
|
var makeBuildResourceSchema = (ids) => resource({
|
|
18656
|
-
appId: string2().describe("The package name (Android) or bundle ID (iOS) read from the file. A flow launches it with `launch({ app: { id } })`."),
|
|
18679
|
+
appId: string2().describe("The package name (Android, Linux) or bundle ID (iOS) read from the file. A flow launches it with `launch({ app: { id } })`."),
|
|
18657
18680
|
appName: string2().optional().describe("The app's display name, when the file names one."),
|
|
18658
18681
|
branch: string2().optional().describe("The branch the uploader said the build came from."),
|
|
18659
|
-
buildNumber: string2().optional().describe("versionCode (Android)
|
|
18682
|
+
buildNumber: string2().optional().describe("versionCode (Android), CFBundleVersion (iOS) or RPM release (Linux), when the file has one."),
|
|
18660
18683
|
commitSha: string2().optional().describe("The commit the uploader said the build came from."),
|
|
18661
18684
|
createdAt: exports_iso.datetime().describe("When the build was created."),
|
|
18662
18685
|
deletedAt: exports_iso.datetime().optional().describe("When the build was deleted. Runs never install it after."),
|
|
@@ -18665,7 +18688,7 @@ var makeBuildResourceSchema = (ids) => resource({
|
|
|
18665
18688
|
id: buildIdSchema,
|
|
18666
18689
|
platform: buildPlatformSchema,
|
|
18667
18690
|
sizeBytes: number2().int().optional().describe("The file's size in bytes."),
|
|
18668
|
-
version: string2().optional().describe("versionName (Android)
|
|
18691
|
+
version: string2().optional().describe("versionName (Android), CFBundleShortVersionString (iOS) or package version (Linux), when the file has one.")
|
|
18669
18692
|
}, { urlFieldDescription: "Absolute URL of the team's Builds page." });
|
|
18670
18693
|
var makeBuildEnvironmentSelectorSchema = (ids) => union([
|
|
18671
18694
|
strictObject({
|
|
@@ -19624,18 +19647,22 @@ var triggerDayOfWeekSchema = _enum([
|
|
|
19624
19647
|
"saturday",
|
|
19625
19648
|
"sunday"
|
|
19626
19649
|
]).describe("A day of the week, named rather than numbered.");
|
|
19627
|
-
var
|
|
19628
|
-
var
|
|
19650
|
+
var actionKindDescription = "createSuite runs the flows named by flowIds and tagNames. generativeSuite lets QA Wolf choose the flows from the deployment's changes, and is not available to a schedule.";
|
|
19651
|
+
var triggerActionKindSchema = _enum(["createSuite", "generativeSuite", "startAgent"]).describe(`${actionKindDescription} startAgent starts a QA Wolf session that carries out instructions.`);
|
|
19652
|
+
var triggerConfigurationActionKindSchema = _enum(["createSuite", "generativeSuite"]).describe(actionKindDescription);
|
|
19653
|
+
var triggerActionKindField = triggerActionKindSchema.default("createSuite");
|
|
19654
|
+
var triggerConfigurationActionKindField = triggerConfigurationActionKindSchema.default("createSuite");
|
|
19655
|
+
var makeTriggerActionSchema = (ids, actionKind) => object({
|
|
19629
19656
|
flowIds: array(ids.flow).default([]).describe("Flows to run. Combined with tagNames."),
|
|
19630
|
-
instructions: string2().min(1).optional().describe("
|
|
19657
|
+
instructions: string2().min(1).optional().describe("For generativeSuite, optional guidance for QA Wolf. For startAgent, required: the task QA Wolf carries out each time the trigger fires."),
|
|
19631
19658
|
investigateFailures: boolean2().optional().describe("Whether QA Wolf investigates failures in the resulting runs. Defaults to true."),
|
|
19632
|
-
kind:
|
|
19659
|
+
kind: actionKind,
|
|
19633
19660
|
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.`),
|
|
19634
19661
|
suggestCoverage: boolean2().optional().describe("Whether QA Wolf explores the environment after the resulting runs and suggests coverage that nothing tests yet. Defaults to false."),
|
|
19635
19662
|
tagNames: array(string2().min(1)).default([]).describe("Tags naming the flows to run. Combined with flowIds.")
|
|
19636
19663
|
}).describe("What the trigger runs when it fires.");
|
|
19637
|
-
var makeTriggerScheduleFields = (ids) => ({
|
|
19638
|
-
action: makeTriggerActionSchema(ids),
|
|
19664
|
+
var makeTriggerScheduleFields = (ids, actionKind) => ({
|
|
19665
|
+
action: makeTriggerActionSchema(ids, actionKind),
|
|
19639
19666
|
cadence: triggerCadenceSchema,
|
|
19640
19667
|
dayOfWeek: triggerDayOfWeekSchema.optional().describe("The day a weekly schedule fires on, read in timezoneId. Required when cadence is weekly."),
|
|
19641
19668
|
daysOfWeek: array(triggerDayOfWeekSchema).min(1).refine((daysOfWeek) => new Set(daysOfWeek).size === daysOfWeek.length, {
|
|
@@ -19792,7 +19819,48 @@ var checkScheduleRepeat = (value, ctx) => {
|
|
|
19792
19819
|
};
|
|
19793
19820
|
|
|
19794
19821
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/configurationRules.js
|
|
19822
|
+
var startAgentInstructionsMaxLength = 1e4;
|
|
19823
|
+
var suiteOnlyFields = [
|
|
19824
|
+
"investigateFailures",
|
|
19825
|
+
"runConcurrencyLimit",
|
|
19826
|
+
"suggestCoverage"
|
|
19827
|
+
];
|
|
19828
|
+
var checkStartAgent = (action, ctx) => {
|
|
19829
|
+
if (action.flowIds.length + action.tagNames.length > 0) {
|
|
19830
|
+
ctx.addIssue({
|
|
19831
|
+
code: "custom",
|
|
19832
|
+
message: "flowIds and tagNames do not apply when the action is startAgent.",
|
|
19833
|
+
path: ["action", "flowIds"]
|
|
19834
|
+
});
|
|
19835
|
+
}
|
|
19836
|
+
for (const field of suiteOnlyFields.filter((name) => action[name] !== undefined)) {
|
|
19837
|
+
ctx.addIssue({
|
|
19838
|
+
code: "custom",
|
|
19839
|
+
message: `${field} does not apply when the action is startAgent.`,
|
|
19840
|
+
path: ["action", field]
|
|
19841
|
+
});
|
|
19842
|
+
}
|
|
19843
|
+
if (action.instructions === undefined || !action.instructions.trim()) {
|
|
19844
|
+
ctx.addIssue({
|
|
19845
|
+
code: "custom",
|
|
19846
|
+
message: "A startAgent action needs instructions.",
|
|
19847
|
+
path: ["action", "instructions"]
|
|
19848
|
+
});
|
|
19849
|
+
return;
|
|
19850
|
+
}
|
|
19851
|
+
if (action.instructions.trim().length > startAgentInstructionsMaxLength) {
|
|
19852
|
+
ctx.addIssue({
|
|
19853
|
+
code: "custom",
|
|
19854
|
+
message: `instructions must be at most ${startAgentInstructionsMaxLength} characters.`,
|
|
19855
|
+
path: ["action", "instructions"]
|
|
19856
|
+
});
|
|
19857
|
+
}
|
|
19858
|
+
};
|
|
19795
19859
|
var checkAction = (action, ctx) => {
|
|
19860
|
+
if (action.kind === "startAgent") {
|
|
19861
|
+
checkStartAgent(action, ctx);
|
|
19862
|
+
return;
|
|
19863
|
+
}
|
|
19796
19864
|
const namesFlows = action.flowIds.length + action.tagNames.length > 0;
|
|
19797
19865
|
if (action.kind === "generativeSuite") {
|
|
19798
19866
|
if (namesFlows) {
|
|
@@ -19807,7 +19875,7 @@ var checkAction = (action, ctx) => {
|
|
|
19807
19875
|
if (action.instructions !== undefined) {
|
|
19808
19876
|
ctx.addIssue({
|
|
19809
19877
|
code: "custom",
|
|
19810
|
-
message: "instructions apply to a generativeSuite action only.",
|
|
19878
|
+
message: "instructions apply to a generativeSuite or startAgent action only.",
|
|
19811
19879
|
path: ["action", "instructions"]
|
|
19812
19880
|
});
|
|
19813
19881
|
}
|
|
@@ -19848,8 +19916,8 @@ var checkTriggerConfiguration = (value, ctx) => value.kind === "schedule" ? chec
|
|
|
19848
19916
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/deploymentFields.js
|
|
19849
19917
|
var patternSyntax = "The pattern ignores case: * matches any text, / included; {main,hotfix} matches any one of its comma-separated options; a leading ! matches every value the rest does not; every other character, ? and [ included, matches only itself.";
|
|
19850
19918
|
var describePattern = (meaning) => `${meaning} ${patternSyntax}`;
|
|
19851
|
-
var makeTriggerDeploymentFields = (ids) => ({
|
|
19852
|
-
action: makeTriggerActionSchema(ids),
|
|
19919
|
+
var makeTriggerDeploymentFields = (ids, actionKind) => ({
|
|
19920
|
+
action: makeTriggerActionSchema(ids, actionKind),
|
|
19853
19921
|
branchPattern: string2().min(1).optional().describe(describePattern("Only fire for deployments of a branch matching this pattern.")),
|
|
19854
19922
|
deployTargetPattern: string2().min(1).optional().describe(describePattern("Only fire for deployments whose deploy target matches this pattern. A deploy target is the URL the deploy reported, which many deployments do not carry.")),
|
|
19855
19923
|
environmentIds: array(ids.environment).default([]).describe("Only fire for deployments to these environments. Mutually exclusive with environmentPattern."),
|
|
@@ -19858,54 +19926,62 @@ var makeTriggerDeploymentFields = (ids) => ({
|
|
|
19858
19926
|
servicePattern: string2().min(1).optional().describe(describePattern("Only fire for deployments whose service matches this pattern. A deployment that names no service never matches it."))
|
|
19859
19927
|
});
|
|
19860
19928
|
|
|
19929
|
+
// node_modules/@qawolf/api-contracts/dist/v1/trigger/describedFields.js
|
|
19930
|
+
var triggerDescriptionMaxLength = 500;
|
|
19931
|
+
var triggerDescriptionSchema = string2().trim().min(1).max(triggerDescriptionMaxLength);
|
|
19932
|
+
var triggerPausedReasonSchema = _enum(["no-owner", "owner-left-team"]).describe("Why QA Wolf paused the trigger. no-owner: it runs AI and no person owns it, as when a team API key made it. owner-left-team: its owner is no longer a member. A person resumes it by taking ownership in the app.");
|
|
19933
|
+
|
|
19861
19934
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/resource.js
|
|
19862
|
-
var
|
|
19935
|
+
var makeFlatConfigurationArms = (ids, actionKind) => [
|
|
19863
19936
|
object({
|
|
19864
|
-
...makeTriggerScheduleFields({
|
|
19865
|
-
environmentId: ids.environment,
|
|
19866
|
-
flow: ids.flow
|
|
19867
|
-
}),
|
|
19937
|
+
...makeTriggerScheduleFields({ environmentId: ids.environment, flow: ids.flow }, actionKind),
|
|
19868
19938
|
kind: literal("schedule")
|
|
19869
19939
|
}),
|
|
19870
19940
|
object({
|
|
19871
|
-
...makeTriggerDeploymentFields(ids),
|
|
19941
|
+
...makeTriggerDeploymentFields(ids, actionKind),
|
|
19872
19942
|
kind: literal("deployment")
|
|
19873
|
-
})
|
|
19943
|
+
})
|
|
19944
|
+
];
|
|
19945
|
+
var makeTriggerConfigurationSchema = (ids) => discriminatedUnion("kind", [
|
|
19946
|
+
...makeFlatConfigurationArms(ids, triggerConfigurationActionKindField),
|
|
19874
19947
|
object({
|
|
19875
19948
|
actionCount: number2().int().describe("How many actions it runs."),
|
|
19876
19949
|
kind: literal("advanced"),
|
|
19877
19950
|
whenCount: number2().int().describe("How many separate match conditions it has.")
|
|
19878
19951
|
})
|
|
19879
19952
|
]);
|
|
19953
|
+
var makeTriggerDefinitionSchema = (ids) => discriminatedUnion("kind", makeFlatConfigurationArms(ids, triggerActionKindField)).optional().catch(undefined).describe("The trigger's full configuration, which trigger.update accepts back. Absent for an advanced trigger, and for a kind this client does not know.");
|
|
19880
19954
|
var makeTriggerResourceSchema = (ids) => resource({
|
|
19881
19955
|
configuration: makeTriggerConfigurationSchema(ids),
|
|
19882
19956
|
createdAt: exports_iso.datetime(),
|
|
19957
|
+
definition: makeTriggerDefinitionSchema(ids),
|
|
19958
|
+
description: string2().optional().describe("What the trigger is for, in the team's words."),
|
|
19883
19959
|
id: ids.trigger,
|
|
19884
19960
|
isPaused: boolean2().describe("A paused trigger never fires, on any path."),
|
|
19885
19961
|
name: string2(),
|
|
19886
19962
|
nextScheduledAt: exports_iso.datetime().optional().describe("When a schedule trigger next fires. Absent for a deployment trigger, and while a schedule trigger is paused."),
|
|
19887
19963
|
pausedAt: exports_iso.datetime().optional().describe("When it was paused."),
|
|
19964
|
+
pausedReason: triggerPausedReasonSchema.optional().catch(undefined),
|
|
19888
19965
|
updatedAt: exports_iso.datetime()
|
|
19889
19966
|
}, { urlFieldDescription: "Absolute URL of the team's triggers page." });
|
|
19890
19967
|
|
|
19891
19968
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/create.js
|
|
19892
19969
|
var makeCreateTriggerContract = (ids) => {
|
|
19893
19970
|
const commonFields = {
|
|
19971
|
+
description: triggerDescriptionSchema.optional().describe("What the trigger is for, in the team's words."),
|
|
19972
|
+
isPaused: boolean2().optional().describe("Create the trigger paused, so it never fires until trigger.resume. Defaults to false."),
|
|
19894
19973
|
name: string2().trim().min(1).max(255),
|
|
19895
19974
|
workspaceId: ids.workspace.optional().describe("The workspace to create the trigger in. Required when authenticating with an organization or user API key.")
|
|
19896
19975
|
};
|
|
19897
19976
|
const input = discriminatedUnion("kind", [
|
|
19898
19977
|
object({
|
|
19899
19978
|
...commonFields,
|
|
19900
|
-
...makeTriggerScheduleFields({
|
|
19901
|
-
environmentId: ids.environmentRef,
|
|
19902
|
-
flow: ids.flow
|
|
19903
|
-
}),
|
|
19979
|
+
...makeTriggerScheduleFields({ environmentId: ids.environmentRef, flow: ids.flow }, triggerActionKindField),
|
|
19904
19980
|
kind: literal("schedule")
|
|
19905
19981
|
}),
|
|
19906
19982
|
object({
|
|
19907
19983
|
...commonFields,
|
|
19908
|
-
...makeTriggerDeploymentFields(ids),
|
|
19984
|
+
...makeTriggerDeploymentFields(ids, triggerActionKindField),
|
|
19909
19985
|
kind: literal("deployment")
|
|
19910
19986
|
})
|
|
19911
19987
|
]).superRefine(checkTriggerConfiguration);
|
|
@@ -19921,7 +19997,7 @@ var makeCreateTriggerContract = (ids) => {
|
|
|
19921
19997
|
openWorldHint: true,
|
|
19922
19998
|
readOnlyHint: false
|
|
19923
19999
|
},
|
|
19924
|
-
description: "Create a trigger. A schedule trigger
|
|
20000
|
+
description: "Create a trigger. A schedule trigger fires on a cadence; " + "a deployment trigger fires when a matching deployment is reported. Its action runs " + "flows, or, as startAgent, starts a QA Wolf session that carries out its instructions. " + "A startAgent trigger made with a team API key has no owner, so it stays paused until " + "a person takes ownership of it in the app.",
|
|
19925
20001
|
input,
|
|
19926
20002
|
kind: "write",
|
|
19927
20003
|
name: "trigger.create",
|
|
@@ -20047,24 +20123,92 @@ var makeDeleteTriggerContract = (ids) => {
|
|
|
20047
20123
|
};
|
|
20048
20124
|
};
|
|
20049
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
|
+
|
|
20050
20195
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/update.js
|
|
20051
20196
|
var makeUpdateTriggerContract = (ids) => {
|
|
20052
20197
|
const commonFields = {
|
|
20198
|
+
description: triggerDescriptionSchema.optional().describe("What the trigger is for, in the team's words. Omit it to keep the current description."),
|
|
20199
|
+
isPaused: boolean2().optional().describe("Pause or resume the trigger once the configuration is written. Omit it to leave the trigger as it is. To keep a running trigger from firing on the new configuration, pause it with trigger.pause first."),
|
|
20053
20200
|
name: string2().trim().min(1).max(255),
|
|
20054
20201
|
triggerId: ids.trigger
|
|
20055
20202
|
};
|
|
20056
20203
|
const input = discriminatedUnion("kind", [
|
|
20057
20204
|
object({
|
|
20058
20205
|
...commonFields,
|
|
20059
|
-
...makeTriggerScheduleFields({
|
|
20060
|
-
environmentId: ids.environmentRef,
|
|
20061
|
-
flow: ids.flow
|
|
20062
|
-
}),
|
|
20206
|
+
...makeTriggerScheduleFields({ environmentId: ids.environmentRef, flow: ids.flow }, triggerActionKindField),
|
|
20063
20207
|
kind: literal("schedule")
|
|
20064
20208
|
}),
|
|
20065
20209
|
object({
|
|
20066
20210
|
...commonFields,
|
|
20067
|
-
...makeTriggerDeploymentFields(ids),
|
|
20211
|
+
...makeTriggerDeploymentFields(ids, triggerActionKindField),
|
|
20068
20212
|
kind: literal("deployment")
|
|
20069
20213
|
})
|
|
20070
20214
|
]).superRefine(checkTriggerConfiguration);
|
|
@@ -20080,7 +20224,7 @@ var makeUpdateTriggerContract = (ids) => {
|
|
|
20080
20224
|
openWorldHint: true,
|
|
20081
20225
|
readOnlyHint: false
|
|
20082
20226
|
},
|
|
20083
|
-
description: "Replace a trigger's configuration. Every field is written, so read the
|
|
20227
|
+
description: "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.",
|
|
20084
20228
|
input,
|
|
20085
20229
|
kind: "write",
|
|
20086
20230
|
name: "trigger.update",
|
|
@@ -20094,8 +20238,10 @@ var makeTriggerContracts = (ids) => ({
|
|
|
20094
20238
|
delete: makeDeleteTriggerContract(ids),
|
|
20095
20239
|
find: makeFindTriggersContract(ids),
|
|
20096
20240
|
get: makeGetTriggerContract(ids),
|
|
20241
|
+
listFirings: makeListTriggerFiringsContract(ids),
|
|
20097
20242
|
pause: makePauseTriggerContract(ids),
|
|
20098
20243
|
resume: makeResumeTriggerContract(ids),
|
|
20244
|
+
runNow: makeRunTriggerNowContract(ids),
|
|
20099
20245
|
update: makeUpdateTriggerContract(ids)
|
|
20100
20246
|
});
|
|
20101
20247
|
// node_modules/@qawolf/api-contracts/dist/v1/agent/get.js
|
|
@@ -20221,6 +20367,7 @@ var makeGetAttemptContract = (ids) => {
|
|
|
20221
20367
|
const failuresTruncated = boolean2().optional().describe("True when the attempt reached the 100-failure limit, so failures may leave some out. Present whenever failures is.");
|
|
20222
20368
|
const artifactUrls = {
|
|
20223
20369
|
logsUrl: url().optional(),
|
|
20370
|
+
networkLogsUrl: url().optional().describe("Signed URL for the attempt's iOS network log, as NDJSON: request and connection lines are HAR 1.2 entries, DNS and WebSocket lines are `_qawolf` objects, and the last line is a summary. For up to 2 minutes after the attempt ends, the file can be partial or 404 while the runner uploads it; it is final once the summary line is there. Signed for every attempt; after that, a 404 means the attempt captured no network."),
|
|
20224
20371
|
traceUrl: url().optional(),
|
|
20225
20372
|
videoUrl: url().optional()
|
|
20226
20373
|
};
|
|
@@ -20329,7 +20476,7 @@ var makeDeleteBuildContract = (ids) => {
|
|
|
20329
20476
|
openWorldHint: false,
|
|
20330
20477
|
readOnlyHint: false
|
|
20331
20478
|
},
|
|
20332
|
-
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
|
|
20479
|
+
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. On QA Wolf's cloud, the latest builds of static environments are always kept. Otherwise the newest 50 builds of each app and platform in an environment, and the newest 100 with no environment, are kept up to 180 days after upload; older ones are deleted 7 days after they fall out. The builds of a terminated preview environment are deleted 7 days after it terminates. Answers the build with deletedAt set. Deleting a deleted build answers it unchanged.",
|
|
20333
20480
|
input,
|
|
20334
20481
|
kind: "write",
|
|
20335
20482
|
name: "build.delete",
|
|
@@ -20432,7 +20579,7 @@ var makeRequestBuildDownloadContract = (ids) => {
|
|
|
20432
20579
|
var makeRequestBuildUploadContract = (ids) => {
|
|
20433
20580
|
const input = object({
|
|
20434
20581
|
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."),
|
|
20435
|
-
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 .
|
|
20582
|
+
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|deb|rpm)$/i.test(fileName), "A build is an .apk, .aab, .ipa, .deb or .rpm file.").describe("The file's name, such as `app-release.apk`, `app-release.aab`, `App.ipa` or `my-app_1.0.0_amd64.deb`. Its extension sets the platform."),
|
|
20436
20583
|
fileSizeBytes: number2().int().min(1).describe("The file's exact size in bytes, at most the workspace's limit, 1 GB by default. The URL accepts only a file of this size."),
|
|
20437
20584
|
workspaceId: ids.workspace.optional().describe("The workspace to upload into. Required when authenticating with an organization or user API key.")
|
|
20438
20585
|
});
|
|
@@ -20453,7 +20600,7 @@ var makeRequestBuildUploadContract = (ids) => {
|
|
|
20453
20600
|
openWorldHint: false,
|
|
20454
20601
|
readOnlyHint: false
|
|
20455
20602
|
},
|
|
20456
|
-
description: "Get a URL to upload an app build: an .apk, .aab or .
|
|
20603
|
+
description: "Get a URL to upload an app build: an .apk, .aab, .ipa, or a Linux Electron app as a .deb or .rpm, up to 1 GB by default. PUT the file there with uploadHeaders, then call build.create with the buildId.",
|
|
20457
20604
|
input,
|
|
20458
20605
|
kind: "write",
|
|
20459
20606
|
name: "build.requestUpload",
|
|
@@ -20514,6 +20661,66 @@ var makeFindCodeHostIntegrationsContract = (ids) => {
|
|
|
20514
20661
|
};
|
|
20515
20662
|
};
|
|
20516
20663
|
|
|
20664
|
+
// node_modules/@qawolf/api-contracts/dist/v1/codeHostIntegration/findForRepository.js
|
|
20665
|
+
var scpLikeUser = /^([^@/]+)@[^@/:]+:(?!\/\/)/;
|
|
20666
|
+
function carriesCredentials(url2) {
|
|
20667
|
+
const trimmed = url2.trim();
|
|
20668
|
+
if (URL.canParse(trimmed)) {
|
|
20669
|
+
const { password, username } = new URL(trimmed);
|
|
20670
|
+
return password !== "" || username !== "" && username !== "git";
|
|
20671
|
+
}
|
|
20672
|
+
const user = scpLikeUser.exec(trimmed)?.[1];
|
|
20673
|
+
return user !== undefined && user !== "git";
|
|
20674
|
+
}
|
|
20675
|
+
var settingsUrl = url().describe("Absolute URL of the workspace's integrations settings page.");
|
|
20676
|
+
var makeFindCodeHostIntegrationForRepositoryContract = (ids) => {
|
|
20677
|
+
const input = object({
|
|
20678
|
+
url: string2().min(1).max(2048).refine((url2) => !carriesCredentials(url2), {
|
|
20679
|
+
message: "The URL carries credentials, and it is sent in the request address. Remove the credentials, such as a token before the host, and send the URL again."
|
|
20680
|
+
}).describe(`The repository's URL, as a CI job or a git remote names it: "https://github.com/acme/storefront", "ssh://git@github.com/acme/storefront.git" or "git@gitlab.com:acme/web/storefront.git". The URL is sent in the request address, so it must carry no credentials: QA Wolf refuses one with a user other than "git" or a password. QA Wolf does not fetch or store the URL.`),
|
|
20681
|
+
workspaceId: ids.workspace.optional().describe("The workspace to check. Required when authenticating with an organization or user API key.")
|
|
20682
|
+
});
|
|
20683
|
+
const output = discriminatedUnion("coverage", [
|
|
20684
|
+
object({
|
|
20685
|
+
coverage: literal("covered").describe("A code host integration of the workspace covers the repository."),
|
|
20686
|
+
fullName: string2().describe(`The repository's full name as QA Wolf knows it, such as "acme/storefront". Report deployments of this repository with this exact name.`),
|
|
20687
|
+
permissions: object({
|
|
20688
|
+
code: _enum(["no-access", "read", "write"]).describe(`Access to the repository's code and commits. The QA Wolf Code GitHub app has "write" once QA Wolf turns on code access for the workspace, and "no-access" until then. With "no-access", QA Wolf only knows about changes pushed straight to a branch when a deployment report includes them.`),
|
|
20689
|
+
pullRequests: _enum(["read", "write"]).describe("Access to the repository's pull requests.")
|
|
20690
|
+
}).describe("What the covering integration lets QA Wolf do in the repository."),
|
|
20691
|
+
provider: _enum(["github", "gitlab"]).describe("The code host the covering integration connects."),
|
|
20692
|
+
settingsUrl
|
|
20693
|
+
}),
|
|
20694
|
+
object({
|
|
20695
|
+
coverage: literal("not-covered").describe("No code host integration of the workspace covers the repository, or the integration is suspended. QA Wolf only knows the changes a deployment report includes."),
|
|
20696
|
+
settingsUrl
|
|
20697
|
+
}),
|
|
20698
|
+
object({
|
|
20699
|
+
coverage: literal("unsupported-host").describe("The URL names a code host QA Wolf does not connect to. QA Wolf connects to github.com and gitlab.com.")
|
|
20700
|
+
}),
|
|
20701
|
+
object({
|
|
20702
|
+
coverage: literal("unrecognized-url").describe("The URL is not a repository URL QA Wolf recognizes.")
|
|
20703
|
+
})
|
|
20704
|
+
]);
|
|
20705
|
+
return {
|
|
20706
|
+
annotationJustifications: {
|
|
20707
|
+
destructiveHint: "Does not connect, disconnect or change code host integrations.",
|
|
20708
|
+
openWorldHint: "Answers from QA Wolf integration records without contacting the URL, GitHub or GitLab.",
|
|
20709
|
+
readOnlyHint: "Looks the repository up in the workspace's integrations and stores nothing."
|
|
20710
|
+
},
|
|
20711
|
+
annotations: {
|
|
20712
|
+
destructiveHint: false,
|
|
20713
|
+
openWorldHint: false,
|
|
20714
|
+
readOnlyHint: true
|
|
20715
|
+
},
|
|
20716
|
+
description: "Check whether QA Wolf can read a repository through the workspace's code host integrations, and what it can access: the repository's code and its pull requests. A CI job calls this before reporting a deployment to decide which changes to include. Not covered means QA Wolf only knows the changes the report includes; settingsUrl is where a workspace admin connects the code host.",
|
|
20717
|
+
input,
|
|
20718
|
+
kind: "read",
|
|
20719
|
+
name: "codeHostIntegration.findForRepository",
|
|
20720
|
+
output
|
|
20721
|
+
};
|
|
20722
|
+
};
|
|
20723
|
+
|
|
20517
20724
|
// node_modules/@qawolf/api-contracts/dist/v1/codeHostIntegration/listRepositories.js
|
|
20518
20725
|
var makeListCodeHostRepositoriesContract = (ids) => {
|
|
20519
20726
|
const input = object({
|
|
@@ -20544,6 +20751,13 @@ var makeListCodeHostRepositoriesContract = (ids) => {
|
|
|
20544
20751
|
};
|
|
20545
20752
|
};
|
|
20546
20753
|
|
|
20754
|
+
// node_modules/@qawolf/api-contracts/dist/v1/codeHostIntegration/index.js
|
|
20755
|
+
var makeCodeHostIntegrationContracts = (ids) => ({
|
|
20756
|
+
find: makeFindCodeHostIntegrationsContract(ids),
|
|
20757
|
+
findForRepository: makeFindCodeHostIntegrationForRepositoryContract(ids),
|
|
20758
|
+
listRepositories: makeListCodeHostRepositoriesContract(ids)
|
|
20759
|
+
});
|
|
20760
|
+
|
|
20547
20761
|
// node_modules/@qawolf/api-contracts/dist/v1/deployment/resource.js
|
|
20548
20762
|
var makeDeploymentResourceSchema = (ids) => resource({
|
|
20549
20763
|
branch: string2().optional().describe("The git branch the deployed commit is on. Absent when neither the deployer nor the code host declared one."),
|
|
@@ -20555,9 +20769,17 @@ var makeDeploymentResourceSchema = (ids) => resource({
|
|
|
20555
20769
|
deployTarget: string2().optional().describe("The URL the deployment serves. A trigger's deployTargetPattern matches against it."),
|
|
20556
20770
|
environmentId: ids.environment.describe("The QA Wolf environment the deployment reported into."),
|
|
20557
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."),
|
|
20558
20779
|
id: ids.deployment,
|
|
20559
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."),
|
|
20560
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."),
|
|
20561
20783
|
service: string2().optional().describe("Which application was deployed, as the deployer named it. Absent when the deployer named none."),
|
|
20562
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.")
|
|
20563
20785
|
}, {
|
|
@@ -20675,16 +20897,44 @@ var makeListDeploymentTriggerEvaluationsContract = (ids) => {
|
|
|
20675
20897
|
// node_modules/@qawolf/api-contracts/dist/v1/deployment/reportStatusChanges.js
|
|
20676
20898
|
var maxChangesBytes = 256 * 1024;
|
|
20677
20899
|
var text = (max) => string2().trim().min(1).max(max);
|
|
20678
|
-
var
|
|
20900
|
+
var sha = (description) => string2().regex(/^[0-9a-f]{7,64}$/iu).describe(description).optional();
|
|
20901
|
+
var number4 = (description) => number2().int().positive().describe(description).optional();
|
|
20902
|
+
var sharedFields = {
|
|
20679
20903
|
changedPaths: array(text(1024)).max(1000).describe("Paths of the files this change touched, without their contents.").optional(),
|
|
20680
20904
|
description: text(4000).describe("The pull request description or the commit message body. Ticket ids and titles belong here or in the title.").optional(),
|
|
20681
|
-
kind: _enum(["pull-request", "commit"]).describe("pull-request for a merged pull request, commit for a commit pushed without one."),
|
|
20682
20905
|
title: text(512).describe('The pull request title or the commit subject, e.g. "Recalculate the cart total with discounts".'),
|
|
20683
20906
|
url: httpUrl().max(2048).describe("A link to the pull request or commit.").optional()
|
|
20684
|
-
}
|
|
20907
|
+
};
|
|
20908
|
+
var changeItem = discriminatedUnion("kind", [
|
|
20909
|
+
strictObject({
|
|
20910
|
+
...sharedFields,
|
|
20911
|
+
kind: literal("pull-request").describe("A merged pull or merge request."),
|
|
20912
|
+
mergeCommitSha: sha("The sha of the commit the pull request landed as: its merge, squash or last rebased commit, at least 7 characters. Lets QA Wolf list a pull request it also reads from your code host only once."),
|
|
20913
|
+
number: number4("The pull or merge request number. Lets QA Wolf list a pull request it also reads from your code host only once.")
|
|
20914
|
+
}),
|
|
20915
|
+
strictObject({
|
|
20916
|
+
...sharedFields,
|
|
20917
|
+
kind: literal("commit").describe("A commit, such as one pushed without a pull request."),
|
|
20918
|
+
pullRequestNumber: number4('The number of the pull or merge request the commit came in through, e.g. 12 for "Fix the total (#12)".'),
|
|
20919
|
+
sha: sha("The commit sha, at least 7 characters. Lets QA Wolf list a commit it also reads from your code host only once.")
|
|
20920
|
+
})
|
|
20921
|
+
]);
|
|
20922
|
+
var collectionProblem = discriminatedUnion("kind", [
|
|
20923
|
+
strictObject({
|
|
20924
|
+
kind: literal("filter-failed").describe("The filter that edits the changes before they're sent failed, so the changes it would have sent are missing.")
|
|
20925
|
+
}),
|
|
20926
|
+
strictObject({
|
|
20927
|
+
kind: literal("history-unavailable").describe("The CI checkout's git history was too shallow to hold every change since the previous deploy, so changes are missing.")
|
|
20928
|
+
}),
|
|
20929
|
+
strictObject({
|
|
20930
|
+
kind: literal("since-not-found").describe("The commit or tag the changes are collected since isn't in the CI checkout, so the changes couldn't be read.")
|
|
20931
|
+
})
|
|
20932
|
+
]);
|
|
20685
20933
|
var deploymentReportChanges = strictObject({
|
|
20934
|
+
ci: text(64).describe('The CI system that collected the changes, e.g. "GitHub Actions". QA Wolf names it when it tells you collecting them went wrong.').optional(),
|
|
20686
20935
|
items: array(changeItem).max(250).describe("The pull requests and commits the deployment ships, newest first.").optional(),
|
|
20687
20936
|
omittedCount: number2().int().nonnegative().describe("How many pull requests or commits you left out of items to stay within the limits.").optional(),
|
|
20937
|
+
problems: array(collectionProblem).max(10).describe("What went wrong collecting the changes, so QA Wolf can tell you in the Inbox and work with what it has. Send items too when only some changes are missing. Empty or absent means collecting them went fine.").optional(),
|
|
20688
20938
|
releaseNotes: text(16000).describe("Release notes written for the deployment.").optional()
|
|
20689
20939
|
}).refine((value) => new TextEncoder().encode(JSON.stringify(value)).length <= maxChangesBytes, { message: "changes must be at most 256 KB." });
|
|
20690
20940
|
|
|
@@ -20724,7 +20974,7 @@ var makeReportDeploymentStatusContract = (ids) => {
|
|
|
20724
20974
|
});
|
|
20725
20975
|
const input = strictObject({
|
|
20726
20976
|
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."),
|
|
20727
|
-
changes: deploymentReportChanges.describe("What the deployment changed, as text a reader can act on, which lets a trigger where QA Wolf chooses the flows work without a pull request: each merged pull request or pushed commit with its title, description and changed file paths, plus release notes. Code is never accepted: there is no field for diffs or file contents, and unknown keys are refused. A report that omits this field keeps the stored summary, a report that sends it replaces it, and one with no items
|
|
20977
|
+
changes: deploymentReportChanges.describe("What the deployment changed, as text a reader can act on, which lets a trigger where QA Wolf chooses the flows work without a pull request: each merged pull request or pushed commit with its title, description and changed file paths, plus release notes. Code is never accepted: there is no field for diffs or file contents, and unknown keys are refused. A report that omits this field keeps the stored summary, a report that sends it replaces it, and one with no items, no release notes and no problems counts as not sent. Triggers are evaluated on the first success report, so send it on that report or earlier. In the QA Wolf CLI, pass it as one JSON value.").optional(),
|
|
20728
20978
|
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(),
|
|
20729
20979
|
environment: environment.describe("Selects the environment the deployment reports into.").optional(),
|
|
20730
20980
|
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(),
|
|
@@ -21685,6 +21935,7 @@ var makeInvestigationFindingSchema = (ids) => object({
|
|
|
21685
21935
|
text: string2().optional().describe("A person's answer in their own words, when they typed one."),
|
|
21686
21936
|
type: string2().describe('Known values: "answer", "dispute" and "reply". New values can appear.')
|
|
21687
21937
|
}).optional().describe("A person's answer or dispute that the investigation hasn't acted on yet."),
|
|
21938
|
+
revalidationSkippedAttemptId: string2().optional().describe("The failed attempt whose linked bug revalidation could not finish because the runner was unavailable."),
|
|
21688
21939
|
state: string2().describe(investigationFindingStateDescription),
|
|
21689
21940
|
steps: array(string2()).optional(),
|
|
21690
21941
|
subSessionIds: array(ids.chatSession),
|
|
@@ -21701,8 +21952,18 @@ var makeGetInvestigationContract = (ids) => {
|
|
|
21701
21952
|
completion: object({
|
|
21702
21953
|
remainingFlows: array(object({
|
|
21703
21954
|
flowId: ids.flow,
|
|
21704
|
-
reason: string2()
|
|
21955
|
+
reason: string2(),
|
|
21956
|
+
runAttemptId: string2().optional()
|
|
21705
21957
|
})),
|
|
21958
|
+
transferredFlows: array(object({
|
|
21959
|
+
flowId: ids.flow,
|
|
21960
|
+
runId: ids.run,
|
|
21961
|
+
status: _enum([
|
|
21962
|
+
"checkpoint-pending",
|
|
21963
|
+
"checkpoint-saved",
|
|
21964
|
+
"source-unavailable"
|
|
21965
|
+
])
|
|
21966
|
+
})).optional(),
|
|
21706
21967
|
waitingFlowIds: array(ids.flow)
|
|
21707
21968
|
}).optional().describe("Current per-flow completion check. Continue every remaining flow before ending. Questions cover only waitingFlowIds. Missing completion means coverage cannot be verified."),
|
|
21708
21969
|
findings: array(makeInvestigationFindingSchema(ids)),
|
|
@@ -22095,6 +22356,35 @@ var makeListIssueCommentsContract = (ids) => {
|
|
|
22095
22356
|
};
|
|
22096
22357
|
};
|
|
22097
22358
|
|
|
22359
|
+
// node_modules/@qawolf/api-contracts/dist/v1/issue/markFixReadyForReview.js
|
|
22360
|
+
var makeMarkFixReadyForReviewContract = (ids) => {
|
|
22361
|
+
const input = object({ issueId: ids.issue });
|
|
22362
|
+
const output = object({
|
|
22363
|
+
fix: object({
|
|
22364
|
+
id: string2().describe("The fix's ID."),
|
|
22365
|
+
pullRequestUrl: url().describe("The fix's pull request, which is now ready for review.")
|
|
22366
|
+
}),
|
|
22367
|
+
outcome: _enum(["marked-ready", "already-ready"]).describe("marked-ready: this call marked the draft pull request ready for review. already-ready: the pull request was already ready for review.")
|
|
22368
|
+
});
|
|
22369
|
+
return {
|
|
22370
|
+
annotationJustifications: {
|
|
22371
|
+
destructiveHint: "Marks a draft pull request ready for review and never removes or overwrites data.",
|
|
22372
|
+
openWorldHint: "Changes a pull request in the team's own repository on its code host.",
|
|
22373
|
+
readOnlyHint: "Changes the draft state of the fix's pull request."
|
|
22374
|
+
},
|
|
22375
|
+
annotations: {
|
|
22376
|
+
destructiveHint: false,
|
|
22377
|
+
openWorldHint: true,
|
|
22378
|
+
readOnlyHint: false
|
|
22379
|
+
},
|
|
22380
|
+
description: "Mark the draft pull request of the bug's fix ready for review, so the code host asks its code owners. " + "The pull request stays a draft unless a loop's instructions ask for this. " + "Only a QA Wolf session that a loop started can call it. " + "Refused as no-fix-pull-request when the bug's fix has no open pull request.",
|
|
22381
|
+
input,
|
|
22382
|
+
kind: "write",
|
|
22383
|
+
name: "issue.markFixReadyForReview",
|
|
22384
|
+
output
|
|
22385
|
+
};
|
|
22386
|
+
};
|
|
22387
|
+
|
|
22098
22388
|
// node_modules/@qawolf/api-contracts/dist/v1/issue/removeFlows.js
|
|
22099
22389
|
var makeRemoveFlowsFromIssueContract = (ids) => {
|
|
22100
22390
|
const input = object({
|
|
@@ -22124,6 +22414,76 @@ var makeRemoveFlowsFromIssueContract = (ids) => {
|
|
|
22124
22414
|
};
|
|
22125
22415
|
};
|
|
22126
22416
|
|
|
22417
|
+
// node_modules/@qawolf/api-contracts/dist/v1/issue/requestFix.js
|
|
22418
|
+
var codeFixStates = [
|
|
22419
|
+
"sent",
|
|
22420
|
+
"fixing",
|
|
22421
|
+
"pull-request-open",
|
|
22422
|
+
"no-fix",
|
|
22423
|
+
"failed"
|
|
22424
|
+
];
|
|
22425
|
+
var makeRequestFixForIssueContract = (ids) => {
|
|
22426
|
+
const input = object({
|
|
22427
|
+
issueId: ids.issue,
|
|
22428
|
+
repository: string2().regex(/^[\w.-]+\/[\w.-]+$/, "repository must be owner/name").optional().describe("The repository, as owner/name, that the loop's instructions name. Omit it to let QA Wolf pick the bug's repository.")
|
|
22429
|
+
});
|
|
22430
|
+
const output = object({
|
|
22431
|
+
fix: object({
|
|
22432
|
+
id: string2().describe("The fix's ID."),
|
|
22433
|
+
repository: string2().describe("The repository, as owner/name, whose coding agent fixes the bug."),
|
|
22434
|
+
state: _enum(codeFixStates).describe("sent: QA Wolf started the team's workflow. fixing: the coding agent started. pull-request-open: the fix has a pull request. no-fix and failed: the fix ended.")
|
|
22435
|
+
}),
|
|
22436
|
+
outcome: _enum(["requested", "joined-open-fix"]).describe("requested: this call started a new fix. joined-open-fix: the bug already had an open fix, and this is it.")
|
|
22437
|
+
});
|
|
22438
|
+
return {
|
|
22439
|
+
annotationJustifications: {
|
|
22440
|
+
destructiveHint: "Starts a fix and never removes or overwrites data.",
|
|
22441
|
+
openWorldHint: "Starts a workflow in the team's own repository on its code host.",
|
|
22442
|
+
readOnlyHint: "Records a fix and starts the team's coding agent."
|
|
22443
|
+
},
|
|
22444
|
+
annotations: {
|
|
22445
|
+
destructiveHint: false,
|
|
22446
|
+
openWorldHint: true,
|
|
22447
|
+
readOnlyHint: false
|
|
22448
|
+
},
|
|
22449
|
+
description: "Hand a bug report to the team's own coding agent, which fixes it in the team's CI. " + "Only a QA Wolf session that a loop started can call it, when the loop's instructions use /coding-agent. " + "A bug has one open fix: a second request returns that fix.",
|
|
22450
|
+
input,
|
|
22451
|
+
kind: "write",
|
|
22452
|
+
name: "issue.requestFix",
|
|
22453
|
+
output
|
|
22454
|
+
};
|
|
22455
|
+
};
|
|
22456
|
+
|
|
22457
|
+
// node_modules/@qawolf/api-contracts/dist/v1/issue/retryFix.js
|
|
22458
|
+
var makeRetryFixForIssueContract = (ids) => {
|
|
22459
|
+
const input = object({ issueId: ids.issue });
|
|
22460
|
+
const output = object({
|
|
22461
|
+
fix: object({
|
|
22462
|
+
id: string2().describe("The ID of the fix that makes the extra try."),
|
|
22463
|
+
repository: string2().describe("The repository, as owner/name, whose coding agent fixes the bug."),
|
|
22464
|
+
state: _enum(codeFixStates).describe("sent: QA Wolf started the team's workflow. fixing: the coding agent started. pull-request-open: the fix has a pull request. no-fix and failed: the fix ended.")
|
|
22465
|
+
}),
|
|
22466
|
+
outcome: _enum(["requested", "joined-open-fix"]).describe("requested: this call started the extra try. joined-open-fix: the extra try was already open, and this is it.")
|
|
22467
|
+
});
|
|
22468
|
+
return {
|
|
22469
|
+
annotationJustifications: {
|
|
22470
|
+
destructiveHint: "Starts a fix and never removes or overwrites data.",
|
|
22471
|
+
openWorldHint: "Starts a workflow in the team's own repository on its code host.",
|
|
22472
|
+
readOnlyHint: "Records a fix and starts the team's coding agent."
|
|
22473
|
+
},
|
|
22474
|
+
annotations: {
|
|
22475
|
+
destructiveHint: false,
|
|
22476
|
+
openWorldHint: true,
|
|
22477
|
+
readOnlyHint: false
|
|
22478
|
+
},
|
|
22479
|
+
description: "Ask the team's coding agent for one more try at a bug that the check of its fix still shows. " + "QA Wolf sends the same agent the failure of the check's run, as a new fix on the same branch, and checks again. " + "Only a QA Wolf session that a loop started can call it, when the loop's instructions ask for it. " + "A bug gets one extra try at most. " + "Refused as bug-not-still-showing when the check of the bug's fix does not show the bug, and as no-tries-left after the extra try.",
|
|
22480
|
+
input,
|
|
22481
|
+
kind: "write",
|
|
22482
|
+
name: "issue.retryFix",
|
|
22483
|
+
output
|
|
22484
|
+
};
|
|
22485
|
+
};
|
|
22486
|
+
|
|
22127
22487
|
// node_modules/@qawolf/api-contracts/dist/v1/issue/update.js
|
|
22128
22488
|
var makeUpdateIssueContract = (ids) => {
|
|
22129
22489
|
const descriptionSchema = string2().describe(issueDescriptionDescription);
|
|
@@ -22169,7 +22529,10 @@ var makeIssueContracts = (ids) => ({
|
|
|
22169
22529
|
get: makeGetIssueContract(ids),
|
|
22170
22530
|
listActivity: makeListIssueActivityContract(ids),
|
|
22171
22531
|
listComments: makeListIssueCommentsContract(ids),
|
|
22532
|
+
markFixReadyForReview: makeMarkFixReadyForReviewContract(ids),
|
|
22172
22533
|
removeFlows: makeRemoveFlowsFromIssueContract(ids),
|
|
22534
|
+
requestFix: makeRequestFixForIssueContract(ids),
|
|
22535
|
+
retryFix: makeRetryFixForIssueContract(ids),
|
|
22173
22536
|
update: makeUpdateIssueContract(ids)
|
|
22174
22537
|
});
|
|
22175
22538
|
|
|
@@ -22519,6 +22882,7 @@ var runAlertNotificationsSchema = array(runAlertNotificationSchema).describe("Wh
|
|
|
22519
22882
|
var makeFlowAttemptsSchema = (ids) => {
|
|
22520
22883
|
const artifactUrls = {
|
|
22521
22884
|
logsUrl: url().optional().describe("Signed URL for the attempt's execution logs."),
|
|
22885
|
+
networkLogsUrl: url().optional().describe("Signed URL for the attempt's iOS network log, as NDJSON: request and connection lines are HAR 1.2 entries, DNS and WebSocket lines are `_qawolf` objects, and the last line is a summary. For up to 2 minutes after the attempt ends, the file can be partial or 404 while the runner uploads it; it is final once the summary line is there. Signed for every attempt; after that, a 404 means the attempt captured no network."),
|
|
22522
22886
|
traceUrl: url().optional().describe("Signed URL for the attempt's Playwright trace (a trace.zip; open it with `npx playwright show-trace`)."),
|
|
22523
22887
|
videoUrl: url().optional().describe("Signed URL for the attempt's screen recording.")
|
|
22524
22888
|
};
|
|
@@ -22588,7 +22952,6 @@ var makeFlowFailureSchema = (ids) => {
|
|
|
22588
22952
|
};
|
|
22589
22953
|
|
|
22590
22954
|
// node_modules/@qawolf/api-contracts/dist/v1/run/versions.js
|
|
22591
|
-
var extensibleValue = (values, meanings) => string2().describe(`One of ${values.join(", ")}; newer servers may add values, so ignore any you don't know. ${meanings}`);
|
|
22592
22955
|
var attemptCount = number2().int().positive().describe("How many attempts reported it.");
|
|
22593
22956
|
var runBuildVersionSchema = object({
|
|
22594
22957
|
appId: string2().describe("The package name (Android) or bundle ID (iOS) of the app."),
|
|
@@ -23520,6 +23883,88 @@ var makeListTagsContract = (ids) => {
|
|
|
23520
23883
|
};
|
|
23521
23884
|
};
|
|
23522
23885
|
|
|
23886
|
+
// node_modules/@qawolf/api-contracts/dist/v1/tag/contracts.js
|
|
23887
|
+
var makeTagContracts = (ids) => ({
|
|
23888
|
+
create: makeCreateTagContract(ids),
|
|
23889
|
+
list: makeListTagsContract(ids)
|
|
23890
|
+
});
|
|
23891
|
+
|
|
23892
|
+
// node_modules/@qawolf/api-contracts/dist/v1/usage/breakdown.js
|
|
23893
|
+
var maxUsageBreakdownDays = 366;
|
|
23894
|
+
var usageGroupings = [
|
|
23895
|
+
"day",
|
|
23896
|
+
"week",
|
|
23897
|
+
"month",
|
|
23898
|
+
"workspace",
|
|
23899
|
+
"environment",
|
|
23900
|
+
"platform",
|
|
23901
|
+
"source",
|
|
23902
|
+
"trigger",
|
|
23903
|
+
"user"
|
|
23904
|
+
];
|
|
23905
|
+
var usageDay = string2().regex(/^\d{4}-\d{2}-\d{2}$/).describe("A UTC day as YYYY-MM-DD.");
|
|
23906
|
+
var totals = object({
|
|
23907
|
+
flowRuns: number2().describe("Flow runs that used credits. A flow run counts once for each source that used its credits (its trigger, and each person who reran it), on the day of that source's first charge."),
|
|
23908
|
+
runCredits: number2().describe("Credits that flow runs used."),
|
|
23909
|
+
sessionCredits: number2().describe("Credits of runners open outside a run. In a row, the exact share of the session time, so it can be a fraction."),
|
|
23910
|
+
sessionSeconds: number2().describe("Seconds of runners open outside a run.")
|
|
23911
|
+
});
|
|
23912
|
+
var group = object({
|
|
23913
|
+
day: string2().optional(),
|
|
23914
|
+
environment: string2().optional(),
|
|
23915
|
+
month: string2().optional(),
|
|
23916
|
+
platform: string2().optional(),
|
|
23917
|
+
source: string2().optional(),
|
|
23918
|
+
trigger: string2().optional(),
|
|
23919
|
+
user: string2().optional(),
|
|
23920
|
+
week: string2().optional(),
|
|
23921
|
+
workspace: string2().optional()
|
|
23922
|
+
}).describe("The value of each groupBy grouping for this row. day and week are YYYY-MM-DD (a week starts on Monday), month is YYYY-MM, platform is web, ios, android, windows or mac, and source is person, trigger, api, unknown or session-time. workspace, environment, trigger and user hold ids, named in labels. A grouping is absent when the usage has no value for it, for example the environment of a runner opened through the API, or the trigger of session time.");
|
|
23923
|
+
var labels = record(string2(), string2()).describe("Names by id. An id with no name was deleted, or belongs to a workspace you cannot see.");
|
|
23924
|
+
var makeUsageBreakdownContract = (ids) => {
|
|
23925
|
+
const input = object({
|
|
23926
|
+
from: usageDay.describe("The first UTC day of the range, YYYY-MM-DD."),
|
|
23927
|
+
groupBy: array(_enum(usageGroupings)).max(2).default([]).describe("Up to two groupings, for example [day, environment]. Empty gives one row with all usage."),
|
|
23928
|
+
limit: number2().int().min(1).max(1000).default(100).describe("The most rows to return, most credits first. The rest are added up in others."),
|
|
23929
|
+
scope: _enum(["workspace", "organization"]).default("workspace").describe("workspace reads one workspace. organization reads every workspace of its organization whose usage you can see. It needs an organization API key or a billing manager; with a user credential, send workspaceId to name the organization. An organization API key is not a billing manager: it sees only the workspaces whose Usage page is open to customers."),
|
|
23930
|
+
to: usageDay.describe(`The last UTC day of the range, YYYY-MM-DD. The range holds at most ${maxUsageBreakdownDays} days, including both ends.`),
|
|
23931
|
+
workspaceId: ids.workspace.optional().describe("The workspace to read, or whose organization to read. Required with a user API key, and with an organization API key for the workspace scope.")
|
|
23932
|
+
});
|
|
23933
|
+
const output = object({
|
|
23934
|
+
labels: object({
|
|
23935
|
+
environments: labels,
|
|
23936
|
+
triggers: labels,
|
|
23937
|
+
users: labels,
|
|
23938
|
+
workspaces: labels
|
|
23939
|
+
}),
|
|
23940
|
+
others: totals.optional().describe("The rows after limit, added up. Absent when none was left out."),
|
|
23941
|
+
rows: array(totals.extend({ group })).describe("Most credits first."),
|
|
23942
|
+
totals: totals.describe("All usage of the range. sessionCredits here are whole credits, counted for each UTC month and platform, so the rows can add up to a little less.")
|
|
23943
|
+
});
|
|
23944
|
+
return {
|
|
23945
|
+
annotationJustifications: {
|
|
23946
|
+
destructiveHint: "Only reads usage.",
|
|
23947
|
+
openWorldHint: "Reads QA Wolf usage records only.",
|
|
23948
|
+
readOnlyHint: "Adds up recorded usage without changing anything."
|
|
23949
|
+
},
|
|
23950
|
+
annotations: {
|
|
23951
|
+
destructiveHint: false,
|
|
23952
|
+
openWorldHint: false,
|
|
23953
|
+
readOnlyHint: true
|
|
23954
|
+
},
|
|
23955
|
+
description: "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.",
|
|
23956
|
+
input,
|
|
23957
|
+
kind: "read",
|
|
23958
|
+
name: "usage.breakdown",
|
|
23959
|
+
output
|
|
23960
|
+
};
|
|
23961
|
+
};
|
|
23962
|
+
|
|
23963
|
+
// node_modules/@qawolf/api-contracts/dist/v1/usage/index.js
|
|
23964
|
+
var makeUsageContracts = (ids) => ({
|
|
23965
|
+
breakdown: makeUsageBreakdownContract(ids)
|
|
23966
|
+
});
|
|
23967
|
+
|
|
23523
23968
|
// node_modules/@qawolf/api-contracts/dist/v1/index.js
|
|
23524
23969
|
var makeContractsV1 = (ids) => {
|
|
23525
23970
|
const resolvedIds = {
|
|
@@ -23541,10 +23986,7 @@ var makeContractsV1 = (ids) => {
|
|
|
23541
23986
|
get: makeGetAttemptContract(resolvedIds)
|
|
23542
23987
|
},
|
|
23543
23988
|
build: makeBuildContracts(resolvedIds),
|
|
23544
|
-
codeHostIntegration:
|
|
23545
|
-
find: makeFindCodeHostIntegrationsContract(resolvedIds),
|
|
23546
|
-
listRepositories: makeListCodeHostRepositoriesContract(resolvedIds)
|
|
23547
|
-
},
|
|
23989
|
+
codeHostIntegration: makeCodeHostIntegrationContracts(resolvedIds),
|
|
23548
23990
|
deployment: makeDeploymentContracts(resolvedIds),
|
|
23549
23991
|
email: {
|
|
23550
23992
|
find: makeFindEmailsContract(resolvedIds),
|
|
@@ -23599,11 +24041,9 @@ var makeContractsV1 = (ids) => {
|
|
|
23599
24041
|
runner: makeRunnerContracts(resolvedIds),
|
|
23600
24042
|
skill: makeSkillContracts(),
|
|
23601
24043
|
suggestion: makeSuggestionContracts(resolvedIds),
|
|
23602
|
-
tag:
|
|
23603
|
-
|
|
23604
|
-
|
|
23605
|
-
},
|
|
23606
|
-
trigger: makeTriggerContracts(resolvedIds)
|
|
24044
|
+
tag: makeTagContracts(resolvedIds),
|
|
24045
|
+
trigger: makeTriggerContracts(resolvedIds),
|
|
24046
|
+
usage: makeUsageContracts(resolvedIds)
|
|
23607
24047
|
};
|
|
23608
24048
|
};
|
|
23609
24049
|
var publicContractsV1 = makeContractsV1(defaultIdSchemas);
|
|
@@ -26111,7 +26551,7 @@ function startUpdateCheck(deps) {
|
|
|
26111
26551
|
// package.json
|
|
26112
26552
|
var package_default = {
|
|
26113
26553
|
name: "@qawolf/cli",
|
|
26114
|
-
version: "2.
|
|
26554
|
+
version: "2.15.0",
|
|
26115
26555
|
description: "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
|
|
26116
26556
|
keywords: [
|
|
26117
26557
|
"automation",
|
|
@@ -26183,7 +26623,7 @@ var package_default = {
|
|
|
26183
26623
|
"@clack/prompts": "1.5.1",
|
|
26184
26624
|
"@napi-rs/keyring": "1.3.0",
|
|
26185
26625
|
"@oxc-node/core": "0.1.0",
|
|
26186
|
-
"@qawolf/api-contracts": "0.
|
|
26626
|
+
"@qawolf/api-contracts": "0.144.0",
|
|
26187
26627
|
"@qawolf/emails": "1.1.1",
|
|
26188
26628
|
"@qawolf/flow-targets": "2.0.0",
|
|
26189
26629
|
commander: "14.0.3",
|
|
@@ -28390,6 +28830,7 @@ var uploadExamples = `
|
|
|
28390
28830
|
Examples:
|
|
28391
28831
|
$ qawolf build upload app-release.apk
|
|
28392
28832
|
$ qawolf build upload App.ipa --environment-id <id>
|
|
28833
|
+
$ qawolf build upload my-app_1.0.0_amd64.deb --environment-id <id>
|
|
28393
28834
|
$ qawolf build upload app-release.aab --environment-name pr-42 --environment-ephemeral --environment-base-ephemeral-environment staging --branch feat/login --commit-sha 1a2b3c4
|
|
28394
28835
|
|
|
28395
28836
|
Without an environment flag, the build belongs to no environment: only a run
|
|
@@ -28405,7 +28846,7 @@ var toUploadOptions = (filePath, opts) => ({
|
|
|
28405
28846
|
workspaceId: opts.workspaceId
|
|
28406
28847
|
});
|
|
28407
28848
|
function registerBuildUploadCommand(build, signals) {
|
|
28408
|
-
declareCommandKind(build.command("upload <file>"), "write").description("Upload an app file (.apk, .aab or .
|
|
28849
|
+
declareCommandKind(build.command("upload <file>"), "write").description("Upload an app file (.apk, .aab, .ipa, or a Linux Electron .deb or .rpm, up to 1 GB by default) and create a build from it. Runs build requestUpload, the PUT and build create in one step").option("--environment-id <id>", "Put the build on this existing environment: its runs install it from now on, until a newer build of the same app and platform arrives").option("--environment-name <name>", "Put the build on the environment with this alias or name, and create the environment when none matches").option("--environment-ephemeral", "With --environment-name, create an ephemeral environment when the name creates one, such as a pull request's").option("--environment-base-ephemeral-environment <name>", "With --environment-ephemeral, the alias or name of the environment a created ephemeral environment copies from").option("--branch <branch>", "The branch the build came from").option("--commit-sha <sha>", "The commit the build came from").option("--workspace-id <id>", "The workspace to upload into. Required when authenticating with an organization or user API key").addHelpText("after", uploadExamples).action((filePath, opts, command) => withAuthContext(signals, (ctx) => handleBuildUpload(ctx, toUploadOptions(filePath, opts), {
|
|
28409
28850
|
openFile: (path) => openFileAsBlob(ctx.fs, path),
|
|
28410
28851
|
putFile: (args) => putSignedUrl(args)
|
|
28411
28852
|
}))(opts, command));
|
|
@@ -38771,7 +39212,7 @@ function normalizeBrowserName(browser) {
|
|
|
38771
39212
|
return "webkit";
|
|
38772
39213
|
return "chromium";
|
|
38773
39214
|
}
|
|
38774
|
-
function
|
|
39215
|
+
function notSupported2(name) {
|
|
38775
39216
|
return () => {
|
|
38776
39217
|
throw new Error(runnerMessages.notSupportedInCli(name));
|
|
38777
39218
|
};
|
|
@@ -38843,7 +39284,7 @@ async function runAndroidFlow({
|
|
|
38843
39284
|
path: flowPath,
|
|
38844
39285
|
callback: async (flowDeps) => {
|
|
38845
39286
|
const androidDeps = {
|
|
38846
|
-
...Object.fromEntries(unsupportedAndroidDepNames.map((name) => [name,
|
|
39287
|
+
...Object.fromEntries(unsupportedAndroidDepNames.map((name) => [name, notSupported2(name)])),
|
|
38847
39288
|
...deps.flowRuntimeDeps,
|
|
38848
39289
|
inputs: flowDeps.flowInputs,
|
|
38849
39290
|
workflowInputs: flowDeps.flowInputs,
|
|
@@ -39173,7 +39614,7 @@ async function runWebFlow({
|
|
|
39173
39614
|
path: flowPath,
|
|
39174
39615
|
callback: async (flowDeps) => {
|
|
39175
39616
|
const webDeps = {
|
|
39176
|
-
...Object.fromEntries(unsupportedWebDepNames.map((name) => [name,
|
|
39617
|
+
...Object.fromEntries(unsupportedWebDepNames.map((name) => [name, notSupported2(name)])),
|
|
39177
39618
|
...deps.flowRuntimeDeps,
|
|
39178
39619
|
launch,
|
|
39179
39620
|
launchWithGpu: launch,
|
|
@@ -41238,6 +41679,44 @@ async function readJsonFlagSources(flags, options, deps) {
|
|
|
41238
41679
|
return { ok: true, options: resolved };
|
|
41239
41680
|
}
|
|
41240
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
|
+
|
|
41241
41720
|
// src/domains/publicApi/handle.ts
|
|
41242
41721
|
var isRecord4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
41243
41722
|
function setAtPath(input, path, value) {
|
|
@@ -41305,6 +41784,9 @@ async function handlePublicApiCommand(ctx, spec, options, stdin = { readStdin: r
|
|
|
41305
41784
|
const result = await ctx.platformClient.callPublicApi(spec.contract, parsed.data);
|
|
41306
41785
|
if (!result.ok)
|
|
41307
41786
|
return failureFields(result);
|
|
41787
|
+
const unconfirmedPause = await enforceRequestedPause(ctx, spec, parsed.data, result.value);
|
|
41788
|
+
if (unconfirmedPause)
|
|
41789
|
+
return unconfirmedPause;
|
|
41308
41790
|
ctx.ui.output(result.value, renderHuman(result.value));
|
|
41309
41791
|
return;
|
|
41310
41792
|
}
|
|
@@ -44797,4 +45279,4 @@ createProgram({ signals }).parseAsync().catch(() => {
|
|
|
44797
45279
|
process.exitCode = 1;
|
|
44798
45280
|
}).finally(() => exitWhenIdle(typeof process.exitCode === "number" ? process.exitCode : 0));
|
|
44799
45281
|
|
|
44800
|
-
//# debugId=
|
|
45282
|
+
//# debugId=A305E95D82772A0E64756E2164756E21
|