@speedkit/cli 4.47.0 → 4.49.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +103 -1
  3. package/dist/commands/onboarding.d.ts +2 -0
  4. package/dist/commands/onboarding.js +1 -0
  5. package/dist/commands/revalidate/jobs.d.ts +16 -0
  6. package/dist/commands/revalidate/jobs.js +80 -0
  7. package/dist/commands/revalidate/start.d.ts +15 -0
  8. package/dist/commands/revalidate/start.js +25 -0
  9. package/dist/commands/revalidate/unblock.d.ts +12 -0
  10. package/dist/commands/revalidate/unblock.js +13 -0
  11. package/dist/commands/revalidate/wait.d.ts +12 -0
  12. package/dist/commands/revalidate/wait.js +13 -0
  13. package/dist/services/browser-fetch/device-emulation.d.ts +16 -3
  14. package/dist/services/browser-fetch/device-emulation.js +32 -17
  15. package/dist/services/browser-fetch/spec/device-emulation.spec.js +20 -0
  16. package/dist/services/onboarding/browser/emulate-device.d.ts +13 -0
  17. package/dist/services/onboarding/browser/emulate-device.js +50 -0
  18. package/dist/services/onboarding/browser/launch-browser.js +7 -2
  19. package/dist/services/onboarding/onboarding-model.d.ts +27 -6
  20. package/dist/services/onboarding/onboarding-model.js +88 -15
  21. package/dist/services/onboarding/onboarding-service-build-context.d.ts +7 -0
  22. package/dist/services/onboarding/onboarding-service-build-context.js +12 -0
  23. package/dist/services/onboarding/onboarding-service-factory.d.ts +7 -0
  24. package/dist/services/onboarding/onboarding-service-factory.js +34 -1
  25. package/dist/services/onboarding/spec/onboarding-model.spec.js +93 -2
  26. package/dist/services/onboarding/spec/onboarding-service-build-context.spec.js +16 -1
  27. package/dist/services/revalidate/index.d.ts +1 -0
  28. package/dist/services/revalidate/index.js +1 -0
  29. package/dist/services/revalidate/revalidate-factory.d.ts +1 -1
  30. package/dist/services/revalidate/revalidate-jobs-build-context.d.ts +56 -0
  31. package/dist/services/revalidate/revalidate-jobs-build-context.js +69 -0
  32. package/dist/services/revalidate/revalidate-model.d.ts +30 -0
  33. package/dist/services/revalidate/revalidate-model.js +22 -0
  34. package/dist/services/revalidate/revalidate-service.d.ts +29 -1
  35. package/dist/services/revalidate/revalidate-service.js +89 -1
  36. package/dist/services/revalidate/spec/revalidate-jobs.spec.d.ts +1 -0
  37. package/dist/services/revalidate/spec/revalidate-jobs.spec.js +130 -0
  38. package/oclif.manifest.json +187 -1
  39. package/package.json +1 -1
@@ -0,0 +1,69 @@
1
+ import { Args, Flags } from "@oclif/core";
2
+ import { Context } from "../../models/context.js";
3
+ import { ACTIVE_STATES, JOB_STATES } from "./revalidate-model.js";
4
+ const app = Args.string({
5
+ name: "app",
6
+ required: true,
7
+ description: "The customer app name",
8
+ });
9
+ const appArgs = { app };
10
+ /** `sk revalidate unblock` and `sk revalidate wait`: the app alone. */
11
+ export class RevalidateAppBuildContext extends Context() {
12
+ static args = appArgs;
13
+ static flags = {};
14
+ static create(parsedArgs, _parsedFlags, environment) {
15
+ return new RevalidateAppBuildContext({ environment, app: parsedArgs.app });
16
+ }
17
+ }
18
+ RevalidateAppBuildContext;
19
+ const jobsArgs = {
20
+ app,
21
+ revId: Args.string({
22
+ name: "revId",
23
+ required: false,
24
+ description: "Show this job in full instead of the list.",
25
+ }),
26
+ };
27
+ const jobsFlags = {
28
+ ["state"]: Flags.string({
29
+ multiple: true,
30
+ options: [...JOB_STATES],
31
+ default: ACTIVE_STATES,
32
+ description: "List the jobs in these states. Repeatable. The default is every state of a job that has not ended.",
33
+ }),
34
+ };
35
+ /** `sk revalidate jobs`: the app, one job to show, and the states to list. */
36
+ export class RevalidateJobsBuildContext extends Context() {
37
+ static args = jobsArgs;
38
+ static flags = jobsFlags;
39
+ static create(parsedArgs, _parsedFlags, environment) {
40
+ return new RevalidateJobsBuildContext({ environment, app: parsedArgs.app });
41
+ }
42
+ }
43
+ RevalidateJobsBuildContext;
44
+ const startArgs = {
45
+ app,
46
+ revId: Args.string({
47
+ name: "revId",
48
+ required: true,
49
+ description: "The scheduled job to start now.",
50
+ }),
51
+ };
52
+ const startFlags = {
53
+ ["wait"]: Flags.boolean({
54
+ default: false,
55
+ description: "Wait until the job ends.",
56
+ }),
57
+ };
58
+ /** `sk revalidate start`: the app and the scheduled job to start. */
59
+ export class RevalidateStartBuildContext extends Context() {
60
+ static args = startArgs;
61
+ static flags = startFlags;
62
+ static create(parsedArgs, _parsedFlags, environment) {
63
+ return new RevalidateStartBuildContext({
64
+ environment,
65
+ app: parsedArgs.app,
66
+ });
67
+ }
68
+ }
69
+ RevalidateStartBuildContext;
@@ -35,6 +35,36 @@ export interface RevalidateJobStatusInterface {
35
35
  changedCount?: number;
36
36
  error?: string | null;
37
37
  }
38
+ export declare const JOB_STATES: readonly ["CREATED", "SCHEDULED", "DEFERRED", "RUNNING", "FINISHED", "ERROR", "CANCELLED"];
39
+ export type JobState = (typeof JOB_STATES)[number];
40
+ /** The states of a job that has not ended yet. */
41
+ export declare const ACTIVE_STATES: JobState[];
42
+ /**
43
+ * The states of a deployment job that block the HTML in its scope: Speed Kit
44
+ * answers ServerScheduledDeploymentJob (306) and serves from origin. A RUNNING
45
+ * deployment job serves again.
46
+ */
47
+ export declare const BLOCKING_STATES: JobState[];
48
+ /** One job as the revalidation API lists it. */
49
+ export interface RevalidateJobInterface extends RevalidateJobStatusInterface {
50
+ revId: string;
51
+ type?: RevalidateType;
52
+ name?: string;
53
+ /** What started it: `deploymentDetection`, `changeDetection`, `sk-cli`, … */
54
+ triggeredBy?: string;
55
+ /** Why it started. A detected deployment names the changed asset here. */
56
+ reason?: string | null;
57
+ /** How long a scheduled job waits before it runs, in ms. */
58
+ scheduleIn?: number;
59
+ scheduledAt?: string | null;
60
+ startedAt?: string | null;
61
+ finishedAt?: string | null;
62
+ filter?: {
63
+ origins?: string[];
64
+ contentTypes?: string[];
65
+ urls?: string[];
66
+ };
67
+ }
38
68
  export interface RevalidatePreviewInterface {
39
69
  count: number;
40
70
  sample: string[];
@@ -24,3 +24,25 @@ export const DROPPING_TYPES = new Set([
24
24
  "PURGE",
25
25
  "DEPLOYMENT",
26
26
  ]);
27
+ export const JOB_STATES = [
28
+ "CREATED",
29
+ "SCHEDULED",
30
+ "DEFERRED",
31
+ "RUNNING",
32
+ "FINISHED",
33
+ "ERROR",
34
+ "CANCELLED",
35
+ ];
36
+ /** The states of a job that has not ended yet. */
37
+ export const ACTIVE_STATES = [
38
+ "CREATED",
39
+ "SCHEDULED",
40
+ "DEFERRED",
41
+ "RUNNING",
42
+ ];
43
+ /**
44
+ * The states of a deployment job that block the HTML in its scope: Speed Kit
45
+ * answers ServerScheduledDeploymentJob (306) and serves from origin. A RUNNING
46
+ * deployment job serves again.
47
+ */
48
+ export const BLOCKING_STATES = ["CREATED", "SCHEDULED"];
@@ -1,6 +1,6 @@
1
1
  import { CliServiceInterface } from "../cli/index.js";
2
2
  import { ConfigApiService } from "../config-api/index.js";
3
- import { RevalidateFilterInterface, RevalidateJobStatusInterface, RevalidatePreviewInterface, RevalidateType } from "./revalidate-model.js";
3
+ import { JobState, RevalidateFilterInterface, RevalidateJobInterface, RevalidateJobStatusInterface, RevalidatePreviewInterface, RevalidateType } from "./revalidate-model.js";
4
4
  /**
5
5
  * Reads the literal head of an anchored pattern, which is the prefix the job needs.
6
6
  *
@@ -42,6 +42,18 @@ export declare class RevalidateService {
42
42
  /** Submits the job and returns its status id. */
43
43
  submit(filter: RevalidateFilterInterface, type: RevalidateType): Promise<string>;
44
44
  status(statusId: string): Promise<RevalidateJobStatusInterface>;
45
+ /**
46
+ * Lists the jobs in the given states, newest first. The API filters by one
47
+ * state per request and answers `{ status: { <revId>: job } }`.
48
+ */
49
+ list(states: JobState[]): Promise<RevalidateJobInterface[]>;
50
+ /** One job in full. */
51
+ job(revId: string): Promise<RevalidateJobInterface>;
52
+ /**
53
+ * Starts a scheduled job now instead of after its `scheduleIn`. The server
54
+ * accepts only `{"status":"RUNNING"}`, and only on a SCHEDULED job.
55
+ */
56
+ resume(revId: string): Promise<void>;
45
57
  /**
46
58
  * Issues the request itself instead of going through the shared client. A
47
59
  * submitted job answers 202, and the shared client reports every status other
@@ -50,6 +62,22 @@ export declare class RevalidateService {
50
62
  private request;
51
63
  /** Polls until the job reaches a terminal state, and reports each state change. */
52
64
  waitFor(statusId: string): Promise<RevalidateJobStatusInterface>;
65
+ /** The deployment jobs in the given states. Other jobs are small and many on a live app. */
66
+ deployments(states: JobState[]): Promise<RevalidateJobInterface[]>;
67
+ /** Polls until no deployment job blocks the HTML, and reports each change of the count. */
68
+ waitForDeployments(): Promise<void>;
69
+ /**
70
+ * Starts every scheduled deployment job, until no deployment job blocks the
71
+ * HTML. A started job renders the pages again and can discover a new asset
72
+ * version, so a new job may follow, and this repeats.
73
+ *
74
+ * An asset whose version changes without a release schedules a new job on
75
+ * every run, and the loop would never end. So it stops after `maxRounds`
76
+ * starts and names the reasons that kept coming back.
77
+ */
78
+ settleDeployments(maxRounds?: number): Promise<void>;
79
+ /** A job can leave SCHEDULED between the listing and the start; the server then answers 400 "Job is …". */
80
+ private startIfScheduled;
53
81
  /**
54
82
  * Mirrors the job's filter as one MongoDB query, so the dry run reports the set
55
83
  * the job takes and not every URL the query alone would match.
@@ -1,7 +1,10 @@
1
1
  import ApplicationError from "../error-handling/error/application-error.js";
2
- import { ASSET_TABLE, } from "./revalidate-model.js";
2
+ import { ASSET_TABLE, BLOCKING_STATES, } from "./revalidate-model.js";
3
3
  const POLL_INTERVAL = 3000;
4
4
  const TERMINAL_STATES = new Set(["FINISHED", "ERROR", "CANCELLED"]);
5
+ /** How often settleDeployments starts the scheduled jobs before it gives up. */
6
+ const SETTLE_ROUNDS = 10;
7
+ const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
5
8
  /** Escapes a prefix so it can go into the dry-run query as a literal. */
6
9
  function escapeRegExp(value) {
7
10
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -147,6 +150,27 @@ export class RevalidateService {
147
150
  async status(statusId) {
148
151
  return this.request(`https://${this.app}.app.baqend.com/v1/asset/revalidate/${statusId}`);
149
152
  }
153
+ /**
154
+ * Lists the jobs in the given states, newest first. The API filters by one
155
+ * state per request and answers `{ status: { <revId>: job } }`.
156
+ */
157
+ async list(states) {
158
+ const answers = await Promise.all(states.map((state) => this.request(`https://${this.app}.app.baqend.com/v1/asset/revalidate?state=${state}`)));
159
+ return answers
160
+ .flatMap((answer) => Object.values(answer.status ?? {}))
161
+ .sort((a, b) => (b.startedAt ?? "").localeCompare(a.startedAt ?? ""));
162
+ }
163
+ /** One job in full. */
164
+ async job(revId) {
165
+ return this.request(`https://${this.app}.app.baqend.com/v1/asset/revalidate/${revId}`);
166
+ }
167
+ /**
168
+ * Starts a scheduled job now instead of after its `scheduleIn`. The server
169
+ * accepts only `{"status":"RUNNING"}`, and only on a SCHEDULED job.
170
+ */
171
+ async resume(revId) {
172
+ await this.request(`https://${this.app}.app.baqend.com/v1/asset/revalidate/${revId}`, { method: "POST", body: JSON.stringify({ status: "RUNNING" }) });
173
+ }
150
174
  /**
151
175
  * Issues the request itself instead of going through the shared client. A
152
176
  * submitted job answers 202, and the shared client reports every status other
@@ -177,6 +201,70 @@ export class RevalidateService {
177
201
  await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL));
178
202
  }
179
203
  }
204
+ /** The deployment jobs in the given states. Other jobs are small and many on a live app. */
205
+ async deployments(states) {
206
+ return (await this.list(states)).filter((job) => job.type === "DEPLOYMENT");
207
+ }
208
+ /** Polls until no deployment job blocks the HTML, and reports each change of the count. */
209
+ async waitForDeployments() {
210
+ let lastCount = -1;
211
+ for (;;) {
212
+ const count = (await this.deployments(BLOCKING_STATES)).length;
213
+ if (count !== lastCount) {
214
+ this.cli.write(`${count} deployment job(s) block the HTML`);
215
+ lastCount = count;
216
+ }
217
+ if (count === 0)
218
+ return;
219
+ await sleep(POLL_INTERVAL);
220
+ }
221
+ }
222
+ /**
223
+ * Starts every scheduled deployment job, until no deployment job blocks the
224
+ * HTML. A started job renders the pages again and can discover a new asset
225
+ * version, so a new job may follow, and this repeats.
226
+ *
227
+ * An asset whose version changes without a release schedules a new job on
228
+ * every run, and the loop would never end. So it stops after `maxRounds`
229
+ * starts and names the reasons that kept coming back.
230
+ */
231
+ async settleDeployments(maxRounds = SETTLE_ROUNDS) {
232
+ const reasons = [];
233
+ let rounds = 0;
234
+ for (;;) {
235
+ const blocking = await this.deployments(BLOCKING_STATES);
236
+ if (blocking.length === 0)
237
+ return;
238
+ const scheduled = blocking.filter((job) => job.state === "SCHEDULED");
239
+ if (scheduled.length > 0) {
240
+ if (++rounds > maxRounds) {
241
+ throw new ApplicationError(`deployment jobs kept coming back after ${maxRounds} starts`, [
242
+ ...new Set(reasons.slice(-5)),
243
+ "An asset whose version changes without a release schedules a job on every run. Compare its content instead of its URL: in config_documentHandler.js, set executeDeploymentDetection.compareAssetVersions for a timestamp or random value in the URL, or compareContentHashes for an asset without any version.",
244
+ "Use ignoreAssets only for an asset that is not part of the shop's release, such as a third-party bundle.",
245
+ ]);
246
+ }
247
+ for (const job of scheduled) {
248
+ if (job.reason)
249
+ reasons.push(job.reason);
250
+ await this.startIfScheduled(job.revId, job.reason);
251
+ }
252
+ }
253
+ await sleep(POLL_INTERVAL);
254
+ }
255
+ }
256
+ /** A job can leave SCHEDULED between the listing and the start; the server then answers 400 "Job is …". */
257
+ async startIfScheduled(revId, reason) {
258
+ try {
259
+ await this.resume(revId);
260
+ this.cli.write(`started ${revId}${reason ? ` — ${reason}` : ""}`);
261
+ }
262
+ catch (error) {
263
+ if (!String(error.suggestions ?? "").includes("Job is")) {
264
+ throw error;
265
+ }
266
+ }
267
+ }
180
268
  /**
181
269
  * Mirrors the job's filter as one MongoDB query, so the dry run reports the set
182
270
  * the job takes and not every URL the query alone would match.
@@ -0,0 +1,130 @@
1
+ import { expect } from "chai";
2
+ import { afterEach, describe, it } from "mocha";
3
+ import nock from "nock";
4
+ import { RevalidateService } from "../revalidate-service.js";
5
+ const HOST = "https://example-shop.app.baqend.com";
6
+ function service(written = []) {
7
+ const configApi = {
8
+ client: { createRequest: async (extension = {}) => ({ ...extension }) },
9
+ };
10
+ return new RevalidateService(configApi, {
11
+ write: (line) => {
12
+ written.push(line);
13
+ },
14
+ }, "example-shop");
15
+ }
16
+ describe("RevalidateService jobs", () => {
17
+ afterEach(() => nock.cleanAll());
18
+ it("merges one request per state, newest first", async () => {
19
+ nock(HOST)
20
+ .get("/v1/asset/revalidate")
21
+ .query({ state: "SCHEDULED" })
22
+ .reply(200, {
23
+ fastlane: {},
24
+ status: {
25
+ a: {
26
+ revId: "a",
27
+ state: "SCHEDULED",
28
+ startedAt: "2026-10-16T10:00:00Z",
29
+ },
30
+ },
31
+ })
32
+ .get("/v1/asset/revalidate")
33
+ .query({ state: "RUNNING" })
34
+ .reply(200, {
35
+ fastlane: {},
36
+ status: {
37
+ b: {
38
+ revId: "b",
39
+ state: "RUNNING",
40
+ startedAt: "2026-10-16T11:00:00Z",
41
+ },
42
+ },
43
+ });
44
+ const jobs = await service().list(["SCHEDULED", "RUNNING"]);
45
+ expect(jobs.map((job) => job.revId)).to.deep.equal(["b", "a"]);
46
+ });
47
+ it("reads an empty state as no job", async () => {
48
+ nock(HOST)
49
+ .get("/v1/asset/revalidate")
50
+ .query({ state: "SCHEDULED" })
51
+ .reply(200, { fastlane: {}, status: {} });
52
+ expect(await service().list(["SCHEDULED"])).to.deep.equal([]);
53
+ });
54
+ it("resumes with status RUNNING, the body the API accepts", async () => {
55
+ let body;
56
+ nock(HOST)
57
+ .post("/v1/asset/revalidate/a", (sent) => {
58
+ body = sent;
59
+ return true;
60
+ })
61
+ .reply(204);
62
+ await service().resume("a");
63
+ expect(body).to.deep.equal({ status: "RUNNING" });
64
+ });
65
+ /** Answers each listing round: one reply per blocking state, CREATED first. */
66
+ function rounds(...scheduled) {
67
+ const scope = nock(HOST);
68
+ for (const answer of scheduled) {
69
+ scope
70
+ .get("/v1/asset/revalidate")
71
+ .query({ state: "CREATED" })
72
+ .reply(200, { status: {} })
73
+ .get("/v1/asset/revalidate")
74
+ .query({ state: "SCHEDULED" })
75
+ .reply(200, answer);
76
+ }
77
+ return scope;
78
+ }
79
+ const deployment = (reason = "Changed asset x.js") => ({
80
+ status: {
81
+ a: { revId: "a", state: "SCHEDULED", type: "DEPLOYMENT", reason },
82
+ b: { revId: "b", state: "SCHEDULED", type: "REFRESH" },
83
+ },
84
+ });
85
+ const onlySmallJobs = {
86
+ status: { b: { revId: "b", state: "SCHEDULED", type: "REFRESH" } },
87
+ };
88
+ it("waits until no deployment job blocks the HTML, and ignores the small jobs", async () => {
89
+ rounds(deployment(), onlySmallJobs);
90
+ const written = [];
91
+ await service(written).waitForDeployments();
92
+ expect(written).to.deep.equal([
93
+ "1 deployment job(s) block the HTML",
94
+ "0 deployment job(s) block the HTML",
95
+ ]);
96
+ }).timeout(10000);
97
+ describe("settleDeployments", () => {
98
+ it("starts only the scheduled deployment jobs, until none blocks the HTML", async () => {
99
+ const started = [];
100
+ rounds(deployment(), onlySmallJobs)
101
+ .post(/\/v1\/asset\/revalidate\/.+/)
102
+ .reply(204, (uri) => {
103
+ started.push(uri.split("/").pop() ?? "");
104
+ return "";
105
+ });
106
+ await service([]).settleDeployments();
107
+ expect(started).to.deep.equal(["a"]);
108
+ }).timeout(10000);
109
+ it("skips a job that left SCHEDULED before the start", async () => {
110
+ rounds(deployment(), onlySmallJobs)
111
+ .post("/v1/asset/revalidate/a")
112
+ .reply(400, { message: "Job is RUNNING" });
113
+ await service([]).settleDeployments();
114
+ }).timeout(10000);
115
+ it("gives up on a job that keeps coming back, and names its reason", async () => {
116
+ rounds(deployment("Changed asset main.js?c=17"), deployment("Changed asset main.js?c=18"))
117
+ .post("/v1/asset/revalidate/a")
118
+ .reply(204);
119
+ let error;
120
+ try {
121
+ await service([]).settleDeployments(1);
122
+ }
123
+ catch (caught) {
124
+ error = caught;
125
+ }
126
+ expect(error?.message).to.contain("kept coming back");
127
+ expect(JSON.stringify(error)).to.contain("main.js?c=17");
128
+ }).timeout(10000);
129
+ });
130
+ });
@@ -790,6 +790,7 @@
790
790
  "$ sk onboarding customers/decathlon.de -c production -d www.decathlon.de",
791
791
  "$ sk onboarding --browse -d www.decathlon.de --headless --debugPort 9290",
792
792
  "$ sk onboarding customers/decathlon.de --browse -p",
793
+ "$ sk onboarding customers/decathlon.de -p --device tablet",
793
794
  "$ sk onboarding customers/decathlon.de --inject",
794
795
  "$ sk onboarding customers/decathlon.de --inject <installationId>"
795
796
  ],
@@ -865,6 +866,28 @@
865
866
  "allowNo": false,
866
867
  "type": "boolean"
867
868
  },
869
+ "device": {
870
+ "description": "Emulate a device in every page and Service Worker: user agent, client hints, viewport, pointer and touch. Without it, Chrome runs as it launches.",
871
+ "name": "device",
872
+ "hasDynamicHelp": false,
873
+ "multiple": false,
874
+ "options": [
875
+ "mobile",
876
+ "tablet",
877
+ "desktop"
878
+ ],
879
+ "type": "option"
880
+ },
881
+ "mobile": {
882
+ "char": "m",
883
+ "description": "Same as --device mobile",
884
+ "exclusive": [
885
+ "device"
886
+ ],
887
+ "name": "mobile",
888
+ "allowNo": false,
889
+ "type": "boolean"
890
+ },
868
891
  "browse": {
869
892
  "description": "Open the live site in the onboarding Chrome, with its extensions, but without request interception or Speed Kit injection. Takes the domain from -d or from the customer config.",
870
893
  "name": "browse",
@@ -1925,7 +1948,170 @@
1925
1948
  "query",
1926
1949
  "prewarm.js"
1927
1950
  ]
1951
+ },
1952
+ "revalidate:jobs": {
1953
+ "aliases": [],
1954
+ "args": {
1955
+ "app": {
1956
+ "description": "The customer app name",
1957
+ "name": "app",
1958
+ "required": true
1959
+ },
1960
+ "revId": {
1961
+ "description": "Show this job in full instead of the list.",
1962
+ "name": "revId",
1963
+ "required": false
1964
+ }
1965
+ },
1966
+ "description": "List the revalidation jobs of an app that have not ended, or show one in full. In a terminal, it asks which job to show or to start.",
1967
+ "examples": [
1968
+ "$ sk revalidate jobs example-shop",
1969
+ "$ sk revalidate jobs example-shop --state SCHEDULED --state CANCELLED",
1970
+ "$ sk revalidate jobs example-shop <revId>"
1971
+ ],
1972
+ "flags": {
1973
+ "state": {
1974
+ "description": "List the jobs in these states. Repeatable. The default is every state of a job that has not ended.",
1975
+ "name": "state",
1976
+ "default": [
1977
+ "CREATED",
1978
+ "SCHEDULED",
1979
+ "DEFERRED",
1980
+ "RUNNING"
1981
+ ],
1982
+ "hasDynamicHelp": false,
1983
+ "multiple": true,
1984
+ "options": [
1985
+ "CREATED",
1986
+ "SCHEDULED",
1987
+ "DEFERRED",
1988
+ "RUNNING",
1989
+ "FINISHED",
1990
+ "ERROR",
1991
+ "CANCELLED"
1992
+ ],
1993
+ "type": "option"
1994
+ }
1995
+ },
1996
+ "hasDynamicHelp": false,
1997
+ "hiddenAliases": [],
1998
+ "id": "revalidate:jobs",
1999
+ "pluginAlias": "@speedkit/cli",
2000
+ "pluginName": "@speedkit/cli",
2001
+ "pluginType": "core",
2002
+ "strict": true,
2003
+ "enableJsonFlag": false,
2004
+ "isESM": true,
2005
+ "relativePath": [
2006
+ "dist",
2007
+ "commands",
2008
+ "revalidate",
2009
+ "jobs.js"
2010
+ ]
2011
+ },
2012
+ "revalidate:start": {
2013
+ "aliases": [],
2014
+ "args": {
2015
+ "app": {
2016
+ "description": "The customer app name",
2017
+ "name": "app",
2018
+ "required": true
2019
+ },
2020
+ "revId": {
2021
+ "description": "The scheduled job to start now.",
2022
+ "name": "revId",
2023
+ "required": true
2024
+ }
2025
+ },
2026
+ "description": "Start a scheduled revalidation job now instead of after its wait.",
2027
+ "examples": [
2028
+ "$ sk revalidate start example-shop <revId>",
2029
+ "$ sk revalidate start example-shop <revId> --wait"
2030
+ ],
2031
+ "flags": {
2032
+ "wait": {
2033
+ "description": "Wait until the job ends.",
2034
+ "name": "wait",
2035
+ "allowNo": false,
2036
+ "type": "boolean"
2037
+ }
2038
+ },
2039
+ "hasDynamicHelp": false,
2040
+ "hiddenAliases": [],
2041
+ "id": "revalidate:start",
2042
+ "pluginAlias": "@speedkit/cli",
2043
+ "pluginName": "@speedkit/cli",
2044
+ "pluginType": "core",
2045
+ "strict": true,
2046
+ "enableJsonFlag": false,
2047
+ "isESM": true,
2048
+ "relativePath": [
2049
+ "dist",
2050
+ "commands",
2051
+ "revalidate",
2052
+ "start.js"
2053
+ ]
2054
+ },
2055
+ "revalidate:unblock": {
2056
+ "aliases": [],
2057
+ "args": {
2058
+ "app": {
2059
+ "description": "The customer app name",
2060
+ "name": "app",
2061
+ "required": true
2062
+ }
2063
+ },
2064
+ "description": "Start the scheduled deployment jobs of an app until none blocks the HTML. A scheduled deployment job makes Speed Kit answer 306 and serve from origin. Use it while the app runs at 0%: above 0%, let the jobs run on their own schedule and use `sk revalidate wait`.",
2065
+ "examples": [
2066
+ "$ sk revalidate unblock example-shop"
2067
+ ],
2068
+ "flags": {},
2069
+ "hasDynamicHelp": false,
2070
+ "hiddenAliases": [],
2071
+ "id": "revalidate:unblock",
2072
+ "pluginAlias": "@speedkit/cli",
2073
+ "pluginName": "@speedkit/cli",
2074
+ "pluginType": "core",
2075
+ "strict": true,
2076
+ "enableJsonFlag": false,
2077
+ "isESM": true,
2078
+ "relativePath": [
2079
+ "dist",
2080
+ "commands",
2081
+ "revalidate",
2082
+ "unblock.js"
2083
+ ]
2084
+ },
2085
+ "revalidate:wait": {
2086
+ "aliases": [],
2087
+ "args": {
2088
+ "app": {
2089
+ "description": "The customer app name",
2090
+ "name": "app",
2091
+ "required": true
2092
+ }
2093
+ },
2094
+ "description": "Wait until no deployment job of an app blocks the HTML. It starts nothing.",
2095
+ "examples": [
2096
+ "$ sk revalidate wait example-shop"
2097
+ ],
2098
+ "flags": {},
2099
+ "hasDynamicHelp": false,
2100
+ "hiddenAliases": [],
2101
+ "id": "revalidate:wait",
2102
+ "pluginAlias": "@speedkit/cli",
2103
+ "pluginName": "@speedkit/cli",
2104
+ "pluginType": "core",
2105
+ "strict": true,
2106
+ "enableJsonFlag": false,
2107
+ "isESM": true,
2108
+ "relativePath": [
2109
+ "dist",
2110
+ "commands",
2111
+ "revalidate",
2112
+ "wait.js"
2113
+ ]
1928
2114
  }
1929
2115
  },
1930
- "version": "4.47.0"
2116
+ "version": "4.49.0"
1931
2117
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@speedkit/cli",
3
3
  "description": "Speed Kit CLI",
4
- "version": "4.47.0",
4
+ "version": "4.49.0",
5
5
  "author": {
6
6
  "name": "Baqend.com",
7
7
  "email": "info@baqend.com"