@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 +7 -0
- package/README.md +1 -1
- package/dist/services/deploy/checks/post-deploy/refresh-deployment-job-check.js +4 -3
- package/dist/services/deploy/checks/post-deploy/refresh-deployment-job-check.spec.d.ts +1 -0
- package/dist/services/deploy/checks/post-deploy/refresh-deployment-job-check.spec.js +33 -0
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
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
|
@@ -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
|
-
|
|
16
|
-
|
|
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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
+
});
|
package/oclif.manifest.json
CHANGED