@speedkit/cli 4.23.2 → 4.23.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [4.23.3](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.23.2...v4.23.3) (2026-08-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deploy:** match refresh job names by prefix ([c593d9d](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/c593d9d69db8e05ccb71b320cb4f9c7cbda5cdac))
7
+
1
8
  ## [4.23.2](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.23.1...v4.23.2) (2026-08-21)
2
9
 
3
10
 
package/README.md CHANGED
@@ -21,7 +21,7 @@ $ npm install -g @speedkit/cli
21
21
  $ sk COMMAND
22
22
  running command...
23
23
  $ sk (--version)
24
- @speedkit/cli/4.23.2 linux-x64 node-v22.23.2
24
+ @speedkit/cli/4.23.3 linux-x64 node-v22.23.2
25
25
  $ sk --help [COMMAND]
26
26
  USAGE
27
27
  $ sk COMMAND
@@ -1,4 +1,3 @@
1
- import { Set } from "baqend";
2
1
  import ApplicationError from "../../../error-handling/error/application-error.js";
3
2
  export class RefreshDeploymentJobCheck {
4
3
  entityManager;
@@ -12,8 +11,10 @@ export class RefreshDeploymentJobCheck {
12
11
  .find()
13
12
  .resultList();
14
13
  const requiredJobs = ["HTML", "Landing Page", "CSS, JS, Font"];
15
- const foundJobNames = new Set(jobs.map((job) => job?.data?.name || " "));
16
- const missingRequiredJobs = requiredJobs.filter((job) => !foundJobNames.has(job));
14
+ // Job names are free text and sometimes suffixed (e.g. "Landing Page (RegExp)"),
15
+ // so match on the prefix instead of the full name.
16
+ const foundJobNames = jobs.map((job) => (job?.data?.name || "").trim().toLowerCase());
17
+ const missingRequiredJobs = requiredJobs.filter((required) => !foundJobNames.some((name) => name.startsWith(required.toLowerCase())));
17
18
  // Deployment jobs: soft warning only
18
19
  const deploymentJobsMissing = jobs.filter((job) => job.type === "Deploymentjob" && job.created !== true);
19
20
  if (deploymentJobsMissing.length > 0) {
@@ -0,0 +1,33 @@
1
+ import { expect } from "chai";
2
+ import { describe, it } from "mocha";
3
+ import { RefreshDeploymentJobCheck } from "./refresh-deployment-job-check.js";
4
+ import ApplicationError from "../../../error-handling/error/application-error.js";
5
+ function entityManagerWithJobs(names) {
6
+ const jobs = names.map((name) => ({ data: { name }, type: "Refreshjob" }));
7
+ return {
8
+ "jobs.Definition": {
9
+ find: () => ({ resultList: async () => jobs }),
10
+ },
11
+ };
12
+ }
13
+ const cli = { writeWarning: () => undefined };
14
+ async function runCheck(names) {
15
+ try {
16
+ await new RefreshDeploymentJobCheck(entityManagerWithJobs(names), cli).check();
17
+ }
18
+ catch (error) {
19
+ return error;
20
+ }
21
+ return undefined;
22
+ }
23
+ describe("RefreshDeploymentJobCheck", () => {
24
+ it("accepts jobs whose names carry a suffix", async () => {
25
+ // As used by zeg and tectake.
26
+ expect(await runCheck(["HTML", "Landing Page (RegExp)", "CSS, JS, Font"])).to.equal(undefined);
27
+ });
28
+ it("reports jobs that are missing entirely", async () => {
29
+ const error = await runCheck(["HTML", "Images"]);
30
+ expect(error).to.be.instanceOf(ApplicationError);
31
+ expect(error.suggestions[0]).to.equal("Missing required jobs: Landing Page, CSS, JS, Font");
32
+ });
33
+ });
@@ -1220,5 +1220,5 @@
1220
1220
  ]
1221
1221
  }
1222
1222
  },
1223
- "version": "4.23.2"
1223
+ "version": "4.23.3"
1224
1224
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@speedkit/cli",
3
3
  "description": "Speed Kit CLI",
4
- "version": "4.23.2",
4
+ "version": "4.23.3",
5
5
  "author": {
6
6
  "name": "Baqend.com",
7
7
  "email": "info@baqend.com"