@speedkit/cli 4.14.0 → 4.15.1
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 +15 -0
- package/README.md +1 -1
- package/dist/services/deploy/checks/post-deploy/refresh-deployment-job-check.d.ts +9 -0
- package/dist/services/deploy/checks/post-deploy/refresh-deployment-job-check.js +31 -0
- package/dist/services/deploy/deploy-service-factory.js +4 -2
- package/dist/services/integration-api/file-reader.d.ts +2 -1
- package/dist/services/integration-api/file-reader.js +5 -1
- package/dist/services/integration-api/integration-api-factory.js +1 -1
- package/dist/services/integration-api/integration-api-model.d.ts +3 -1
- package/dist/services/integration-api/integration-api-model.js +11 -2
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [4.15.1](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.15.0...v4.15.1) (2026-07-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* ignore page-examples.json for deployments ([209fec8](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/209fec89d17f7b6c34a5891fb761564cdcdad35c))
|
|
7
|
+
|
|
8
|
+
# [4.15.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.14.0...v4.15.0) (2026-07-03)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **post-deploy:** post deployment job ([9c1cf71](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/9c1cf71ec608b78bbcd422ef3ebda992084c32ee))
|
|
14
|
+
* **post-deploy:** post deployment job check ([72fc000](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/72fc000472728f2c2accca3a025363bcdaa713b0))
|
|
15
|
+
|
|
1
16
|
# [4.14.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.13.0...v4.14.0) (2026-06-29)
|
|
2
17
|
|
|
3
18
|
|
package/README.md
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EntityManager } from "baqend";
|
|
2
|
+
import { PostDeployCheckInterface } from "../../deploy-service-model.js";
|
|
3
|
+
import { CliService } from "../../../cli/index.js";
|
|
4
|
+
export declare class RefreshDeploymentJobCheck implements PostDeployCheckInterface {
|
|
5
|
+
private entityManager;
|
|
6
|
+
private cli;
|
|
7
|
+
constructor(entityManager: EntityManager, cli: CliService);
|
|
8
|
+
check(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Set } from "baqend";
|
|
2
|
+
import ApplicationError from "../../../error-handling/error/application-error.js";
|
|
3
|
+
export class RefreshDeploymentJobCheck {
|
|
4
|
+
entityManager;
|
|
5
|
+
cli;
|
|
6
|
+
constructor(entityManager, cli) {
|
|
7
|
+
this.entityManager = entityManager;
|
|
8
|
+
this.cli = cli;
|
|
9
|
+
}
|
|
10
|
+
async check() {
|
|
11
|
+
const jobs = await this.entityManager["jobs.Definition"]
|
|
12
|
+
.find()
|
|
13
|
+
.resultList();
|
|
14
|
+
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));
|
|
17
|
+
// Deployment jobs: soft warning only
|
|
18
|
+
const deploymentJobsMissing = jobs.filter((job) => job.type === "Deploymentjob" && job.created !== true);
|
|
19
|
+
if (deploymentJobsMissing.length > 0) {
|
|
20
|
+
this.cli.writeWarning(" Deployment jobs are missing. These are normally created on first deployment run.");
|
|
21
|
+
}
|
|
22
|
+
if (missingRequiredJobs.length > 0) {
|
|
23
|
+
throw new ApplicationError("MISSING JOBS", [
|
|
24
|
+
`Missing required jobs: ${missingRequiredJobs.join(", ")}`,
|
|
25
|
+
'To create missing jobs, follow the steps here:",\n' +
|
|
26
|
+
' "https://www.notion.so/baqend/How-to-create-missing-Jobs-306de49f8a9980f397c2ebe693da4aac?v=fcdbfc994dca4aa6be42228b37609d48&source=copy_link"\n' +
|
|
27
|
+
" ",
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -14,6 +14,7 @@ import { SplitChangeCheck } from "./checks/pre-deploy/split-change-check.js";
|
|
|
14
14
|
import { ConfigApiContext, ConfigApiServiceFactory, } from "../config-api/index.js";
|
|
15
15
|
import { DeprecatedDeploymentDetectionCheck } from "./checks/post-deploy/deprecated-deployment-detection-check.js";
|
|
16
16
|
import { DeviceDetectionChangedCheck } from "./checks/pre-deploy/device-detection-changed-check.js";
|
|
17
|
+
import { RefreshDeploymentJobCheck } from "./checks/post-deploy/refresh-deployment-job-check.js";
|
|
17
18
|
export default class DeployServiceFactory {
|
|
18
19
|
context;
|
|
19
20
|
cliConfig;
|
|
@@ -45,7 +46,7 @@ export default class DeployServiceFactory {
|
|
|
45
46
|
], cliService, [
|
|
46
47
|
new SplitChangeCheck(cliService, files, configApi, customer, configName, this.context.isProduction),
|
|
47
48
|
new DeviceDetectionChangedCheck(cliService, files, configApi, customer, configName, this.context.isProduction),
|
|
48
|
-
], this.getPostDeployChecks(files, cliService, configApi, customer.app), this.context.dryRun);
|
|
49
|
+
], await this.getPostDeployChecks(files, cliService, configApi, customer.app), this.context.dryRun);
|
|
49
50
|
}
|
|
50
51
|
getConfigApi(app) {
|
|
51
52
|
const configApiContext = new ConfigApiContext(app);
|
|
@@ -56,11 +57,12 @@ export default class DeployServiceFactory {
|
|
|
56
57
|
const integrationApi = new IntegrationApiFactory(integrationApiContext, this.cliConfig).buildService();
|
|
57
58
|
return integrationApi.run();
|
|
58
59
|
}
|
|
59
|
-
getPostDeployChecks(files, cliService, configApi, app) {
|
|
60
|
+
async getPostDeployChecks(files, cliService, configApi, app) {
|
|
60
61
|
return [
|
|
61
62
|
new SaveFilesCheck(files, cliService),
|
|
62
63
|
new RevalidatedModuleCheck(configApi, cliService, app),
|
|
63
64
|
new DeprecatedDeploymentDetectionCheck(files, cliService, configApi, app),
|
|
65
|
+
new RefreshDeploymentJobCheck(await configApi.client.getEntityManager(), cliService),
|
|
64
66
|
];
|
|
65
67
|
}
|
|
66
68
|
}
|
|
@@ -5,13 +5,14 @@ export default class FileReader {
|
|
|
5
5
|
private readonly basePath;
|
|
6
6
|
private readonly whiteList;
|
|
7
7
|
private readonly blockedFolders;
|
|
8
|
+
private readonly blockedFiles;
|
|
8
9
|
allowedExtensions: string[];
|
|
9
10
|
constructor(fileSystem: {
|
|
10
11
|
readFileSync: (path: string, options: "utf-8") => string;
|
|
11
12
|
readdirSync: (path: string, options: {
|
|
12
13
|
withFileTypes: boolean;
|
|
13
14
|
}) => Dirent[];
|
|
14
|
-
}, configName: string, basePath: string, whiteList?: string[], blockedFolders?: string[]);
|
|
15
|
+
}, configName: string, basePath: string, whiteList?: string[], blockedFolders?: string[], blockedFiles?: string[]);
|
|
15
16
|
getFileList(basePath?: string): string[];
|
|
16
17
|
getContent(path: string): Promise<string>;
|
|
17
18
|
private isAllowedFolder;
|
|
@@ -9,13 +9,15 @@ export default class FileReader {
|
|
|
9
9
|
basePath;
|
|
10
10
|
whiteList;
|
|
11
11
|
blockedFolders;
|
|
12
|
+
blockedFiles;
|
|
12
13
|
allowedExtensions = ["js", "es6", "json", "css"];
|
|
13
|
-
constructor(fileSystem, configName, basePath, whiteList = [], blockedFolders = []) {
|
|
14
|
+
constructor(fileSystem, configName, basePath, whiteList = [], blockedFolders = [], blockedFiles = []) {
|
|
14
15
|
this.fileSystem = fileSystem;
|
|
15
16
|
this.configName = configName;
|
|
16
17
|
this.basePath = basePath;
|
|
17
18
|
this.whiteList = whiteList;
|
|
18
19
|
this.blockedFolders = blockedFolders;
|
|
20
|
+
this.blockedFiles = blockedFiles;
|
|
19
21
|
}
|
|
20
22
|
getFileList(basePath = this.basePath) {
|
|
21
23
|
let files = [];
|
|
@@ -54,6 +56,8 @@ export default class FileReader {
|
|
|
54
56
|
}
|
|
55
57
|
isAllowedFile(fileName) {
|
|
56
58
|
const extension = this.getFileExtension(fileName);
|
|
59
|
+
if (this.blockedFiles.some((file) => fileName.includes(file)))
|
|
60
|
+
return false;
|
|
57
61
|
return (this.allowedExtensions.includes(extension) && this.isWhiteListed(fileName));
|
|
58
62
|
}
|
|
59
63
|
getFileExtension(fileName) {
|
|
@@ -38,7 +38,7 @@ export class IntegrationApiFactory {
|
|
|
38
38
|
}
|
|
39
39
|
getFileReader() {
|
|
40
40
|
if (!this.fileReader) {
|
|
41
|
-
this.fileReader = new FileReader(fs, this.context.configName, this.context.basePath, this.context.whitelist, this.context.blockedFolders);
|
|
41
|
+
this.fileReader = new FileReader(fs, this.context.configName, this.context.basePath, this.context.whitelist, this.context.blockedFolders, this.context.blockedFiles);
|
|
42
42
|
}
|
|
43
43
|
return this.fileReader;
|
|
44
44
|
}
|
|
@@ -100,11 +100,13 @@ export interface VirtualFileConfig {
|
|
|
100
100
|
overrideLocalFile?: boolean;
|
|
101
101
|
}
|
|
102
102
|
export declare const DEFAULT_BLOCKED_FOLDERS: string[];
|
|
103
|
+
export declare const DEFAULT_BLOCKED_FILES: string[];
|
|
103
104
|
export declare class IntegrationApiContext {
|
|
104
105
|
readonly basePath: string;
|
|
105
106
|
readonly configName: string;
|
|
106
107
|
readonly whitelist: string[];
|
|
107
108
|
readonly blockedFolders: string[];
|
|
108
109
|
readonly useTestConfig: boolean;
|
|
109
|
-
|
|
110
|
+
readonly blockedFiles: string[];
|
|
111
|
+
constructor(basePath: string, configName: string, whitelist?: string[], blockedFolders?: string[], useTestConfig?: boolean, blockedFiles?: string[]);
|
|
110
112
|
}
|
|
@@ -19,18 +19,27 @@ export var FILE_TYPE;
|
|
|
19
19
|
FILE_TYPE["READONLY_FILE"] = "readonly";
|
|
20
20
|
FILE_TYPE["CUSTOMER_FILE"] = "customer";
|
|
21
21
|
})(FILE_TYPE || (FILE_TYPE = {}));
|
|
22
|
-
export const DEFAULT_BLOCKED_FOLDERS = [
|
|
22
|
+
export const DEFAULT_BLOCKED_FOLDERS = [
|
|
23
|
+
"test",
|
|
24
|
+
".local",
|
|
25
|
+
".git",
|
|
26
|
+
".idea",
|
|
27
|
+
"page-examples",
|
|
28
|
+
];
|
|
29
|
+
export const DEFAULT_BLOCKED_FILES = ["page-examples"];
|
|
23
30
|
export class IntegrationApiContext {
|
|
24
31
|
basePath;
|
|
25
32
|
configName;
|
|
26
33
|
whitelist;
|
|
27
34
|
blockedFolders;
|
|
28
35
|
useTestConfig;
|
|
29
|
-
|
|
36
|
+
blockedFiles;
|
|
37
|
+
constructor(basePath, configName, whitelist = [], blockedFolders = DEFAULT_BLOCKED_FOLDERS, useTestConfig = false, blockedFiles = DEFAULT_BLOCKED_FILES) {
|
|
30
38
|
this.basePath = basePath;
|
|
31
39
|
this.configName = configName;
|
|
32
40
|
this.whitelist = whitelist;
|
|
33
41
|
this.blockedFolders = blockedFolders;
|
|
34
42
|
this.useTestConfig = useTestConfig;
|
|
43
|
+
this.blockedFiles = blockedFiles;
|
|
35
44
|
}
|
|
36
45
|
}
|
package/oclif.manifest.json
CHANGED