@speedkit/cli 2.18.0 → 2.19.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 (122) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +36 -5
  3. package/dist/commands/build-parameter-query.js +5 -5
  4. package/dist/commands/build-prewarm-query.js +4 -4
  5. package/dist/commands/{param-diff.d.ts → diff-url-parameters.d.ts} +3 -1
  6. package/dist/commands/{param-diff.js → diff-url-parameters.js} +26 -24
  7. package/dist/commands/find-pops.js +9 -9
  8. package/dist/commands/generate-customer-config.d.ts +1 -1
  9. package/dist/commands/generate-customer-config.js +7 -7
  10. package/dist/commands/generate-pop-config.js +2 -2
  11. package/dist/commands/login.js +5 -4
  12. package/dist/commands/pop-prewarm.d.ts +3 -3
  13. package/dist/commands/pop-prewarm.js +19 -16
  14. package/dist/commands/prewarm.js +10 -10
  15. package/dist/commands/wpt-launcher.d.ts +1 -1
  16. package/dist/commands/wpt-launcher.js +9 -9
  17. package/dist/helpers/build-query-helper.d.ts +3 -3
  18. package/dist/helpers/build-query-helper.js +70 -69
  19. package/dist/helpers/cli-config.js +6 -5
  20. package/dist/helpers/{CustomerConfig.d.ts → customer-config.d.ts} +6 -6
  21. package/dist/helpers/{CustomerConfig.js → customer-config.js} +39 -39
  22. package/dist/helpers/file-helper.d.ts +1 -1
  23. package/dist/helpers/file-helper.js +5 -5
  24. package/dist/helpers/{getChromePath.js → get-chrome-path.js} +8 -8
  25. package/dist/helpers/get-parsed-config.d.ts +1 -1
  26. package/dist/helpers/get-parsed-config.js +7 -7
  27. package/dist/helpers/is-directory.d.ts +1 -0
  28. package/dist/helpers/{isDirectory.js → is-directory.js} +6 -6
  29. package/dist/helpers/{isExecutable.js → is-executable.js} +3 -3
  30. package/dist/helpers/{isFile.js → is-file.js} +4 -4
  31. package/dist/helpers/logging-helper.d.ts +3 -3
  32. package/dist/helpers/logging-helper.js +6 -6
  33. package/dist/helpers/normalize.d.ts +6 -6
  34. package/dist/helpers/normalize.js +35 -33
  35. package/dist/helpers/safe.d.ts +1 -1
  36. package/dist/helpers/safe.js +12 -12
  37. package/dist/helpers/{speedKitRuleToRegExp.js → speed-kit-rule-to-reg-exp.js} +3 -3
  38. package/dist/helpers/{watchFiles.js → watch-files.js} +2 -2
  39. package/dist/models/cli-parameters.d.ts +3 -3
  40. package/dist/models/cli-parameters.js +3 -3
  41. package/dist/services/athena/athena-service.js +2 -2
  42. package/dist/services/bundler/bundle-service.js +14 -14
  43. package/dist/services/cli/cli-service.js +8 -4
  44. package/dist/services/cli/hooks.js +3 -3
  45. package/dist/services/config-api/client.js +7 -6
  46. package/dist/services/config-api/factory/config-api-service-factory.js +4 -4
  47. package/dist/services/config-api/factory/entity-manager-factory.js +1 -1
  48. package/dist/services/config-api-service.d.ts +1 -1
  49. package/dist/services/config-api-service.js +7 -7
  50. package/dist/services/customer-config/customer-config-service-context.d.ts +2 -2
  51. package/dist/services/customer-config/customer-config-service-context.js +4 -4
  52. package/dist/services/customer-config/customer-config-service.js +45 -44
  53. package/dist/services/deploy/builder/install-resource-builder.d.ts +2 -2
  54. package/dist/services/deploy/builder/install-resource-builder.js +7 -7
  55. package/dist/services/deploy/checks/post-deploy/revalidated-module-check.js +1 -1
  56. package/dist/services/deploy/checks/post-deploy/save-files-check.js +4 -4
  57. package/dist/services/deploy/deploy-service.js +2 -4
  58. package/dist/services/deploy/error/create-find-temporary-directory-error.d.ts +4 -0
  59. package/dist/services/deploy/error/{create-find-temp-directory-error.js → create-find-temporary-directory-error.js} +2 -2
  60. package/dist/services/deploy/handler/customer-config-handler.js +1 -1
  61. package/dist/services/deploy/handler/install-resource-handler.js +8 -11
  62. package/dist/services/deploy/handler/install-resource-modifier/deleted-file-check.js +2 -2
  63. package/dist/services/deploy/handler/module-handler.js +8 -8
  64. package/dist/services/deploy/handler/server-config-handler.js +4 -4
  65. package/dist/services/diff/diff-service.d.ts +2 -2
  66. package/dist/services/diff/diff-service.js +22 -22
  67. package/dist/services/diff-service.d.ts +1 -1
  68. package/dist/services/diff-service.js +13 -13
  69. package/dist/services/document-handler-runtime/context/document-handler-runtime-context.js +10 -8
  70. package/dist/services/document-handler-runtime/document-handler-runtime-service.js +10 -10
  71. package/dist/services/document-handler-runtime/document-handler-server.js +12 -12
  72. package/dist/services/document-handler-runtime/factory/document-handler-runtime-service-factory.js +2 -2
  73. package/dist/services/document-handler-runtime/interface/template-interface.d.ts +2 -2
  74. package/dist/services/document-handler-runtime/interface/{template-param-interface.d.ts → template-parameter-interface.d.ts} +1 -1
  75. package/dist/services/document-handler-runtime/templates/abstract-template.d.ts +2 -2
  76. package/dist/services/document-handler-runtime/templates/abstract-template.js +3 -3
  77. package/dist/services/error-handling/factory/error-handling-factory.d.ts +1 -4
  78. package/dist/services/error-handling/factory/error-handling-factory.js +2 -1
  79. package/dist/services/integration-api/factory/integration-api-service-factory.js +1 -1
  80. package/dist/services/integration-api/file-list.js +4 -3
  81. package/dist/services/integration-api/file-reader.d.ts +1 -1
  82. package/dist/services/integration-api/file-reader.js +29 -26
  83. package/dist/services/integration-api/file-writer.js +3 -3
  84. package/dist/services/integration-api/handler/file-handler.js +1 -1
  85. package/dist/services/integration-api/handler/install-resource-handler.js +1 -1
  86. package/dist/services/integration-api/handler/module-handler.js +1 -1
  87. package/dist/services/integration-api/handler/server-config-handler.js +1 -1
  88. package/dist/services/integration-api/integration-api-service.js +2 -3
  89. package/dist/services/integration-api/struct/customer-config.d.ts +1 -1
  90. package/dist/services/integration-api/struct/customer-config.js +4 -4
  91. package/dist/services/integration-api/struct/file.js +1 -1
  92. package/dist/services/integration-api/validator/customer-config-validator.js +2 -2
  93. package/dist/services/integration-api/validator/mandatory-files-validator.js +7 -6
  94. package/dist/services/integration-api/virtual/external-recipe.js +2 -1
  95. package/dist/services/onboarding/browser/baqend-response.js +1 -2
  96. package/dist/services/onboarding/config-renderer/speed-kit-install-context.js +1 -1
  97. package/dist/services/onboarding/dashboard/index.d.ts +3 -3
  98. package/dist/services/onboarding/dashboard/index.js +12 -12
  99. package/dist/services/onboarding/dashboard/{param-query-builder.d.ts → parameter-query-builder.d.ts} +1 -1
  100. package/dist/services/onboarding/dashboard/{param-query-builder.js → parameter-query-builder.js} +6 -6
  101. package/dist/services/onboarding/dashboard/request-diff-service.js +24 -22
  102. package/dist/services/onboarding/fetch-events/customer-domain-document-response.js +8 -8
  103. package/dist/services/onboarding/fetch-events/speed-kit-asset-request.js +7 -7
  104. package/dist/services/onboarding/onboarding-model.js +4 -4
  105. package/dist/services/onboarding/onboarding-service-factory.js +3 -3
  106. package/dist/services/onboarding/onboarding-service.js +2 -1
  107. package/dist/services/onboarding/todo-collector.js +1 -1
  108. package/dist/services/prewarm-service.d.ts +1 -1
  109. package/dist/services/prewarm-service.js +8 -7
  110. package/dist/services/pull/pull-service.js +2 -2
  111. package/oclif.manifest.json +45 -42
  112. package/package.json +2 -1
  113. package/dist/helpers/isDirectory.d.ts +0 -1
  114. package/dist/services/context/app-context.d.ts +0 -1
  115. package/dist/services/deploy/error/create-find-temp-directory-error.d.ts +0 -4
  116. package/dist/services/document-handler-runtime/interface/template-param-interface.js +0 -2
  117. /package/dist/helpers/{getChromePath.d.ts → get-chrome-path.d.ts} +0 -0
  118. /package/dist/helpers/{isExecutable.d.ts → is-executable.d.ts} +0 -0
  119. /package/dist/helpers/{isFile.d.ts → is-file.d.ts} +0 -0
  120. /package/dist/helpers/{speedKitRuleToRegExp.d.ts → speed-kit-rule-to-reg-exp.d.ts} +0 -0
  121. /package/dist/helpers/{watchFiles.d.ts → watch-files.d.ts} +0 -0
  122. /package/dist/services/{context/app-context.js → document-handler-runtime/interface/template-parameter-interface.js} +0 -0
@@ -7,21 +7,21 @@ const chalk_1 = tslib_1.__importDefault(require("chalk"));
7
7
  /**
8
8
  * Logs the given message 'green' in the console.
9
9
  */
10
- function logInfo(message, ...optionalParams) {
11
- console.log(chalk_1.default.green(message), ...optionalParams);
10
+ function logInfo(message, ...optionalParameters) {
11
+ console.log(chalk_1.default.green(message), ...optionalParameters);
12
12
  }
13
13
  exports.logInfo = logInfo;
14
14
  /**
15
15
  * Logs the given message 'red' in the console.
16
16
  */
17
- function logError(message, ...optionalParams) {
18
- console.log(chalk_1.default.red(message), ...optionalParams);
17
+ function logError(message, ...optionalParameters) {
18
+ console.log(chalk_1.default.red(message), ...optionalParameters);
19
19
  }
20
20
  exports.logError = logError;
21
21
  /**
22
22
  * Logs the given message 'yellow' in the console.
23
23
  */
24
- function logWarning(message, ...optionalParams) {
25
- console.log(chalk_1.default.yellow(message), ...optionalParams);
24
+ function logWarning(message, ...optionalParameters) {
25
+ console.log(chalk_1.default.yellow(message), ...optionalParameters);
26
26
  }
27
27
  exports.logWarning = logWarning;
@@ -1,11 +1,11 @@
1
1
  /// <reference types="node" />
2
- import { URL } from "url";
2
+ import { URL } from "node:url";
3
3
  /**
4
4
  * Sorts all urls params manually.
5
5
  *
6
- * @param searchParams - Params to sort.
6
+ * @param searchParameters - Params to sort.
7
7
  */
8
- export declare function sortParams(searchParams: URLSearchParams): void;
8
+ export declare function sortParameters(searchParameters: URLSearchParams): void;
9
9
  /**
10
10
  * Converts parameters back to origin form.
11
11
  *
@@ -31,12 +31,12 @@ export declare function convertNotEncodedParameters(url: URL, manipulatedUrl: UR
31
31
  * @param url - The original URL.
32
32
  * @param manipulatedUrl - The manipulated URL to remove the "=" from.
33
33
  */
34
- export declare function transformNoValueParams(url: URL, manipulatedUrl: URL): void;
34
+ export declare function transformNoValueParameters(url: URL, manipulatedUrl: URL): void;
35
35
  /**
36
36
  * Normalizes a given URL.
37
37
  *
38
38
  * @param urlString - The URL to be normalized.
39
- * @param sortParameters - Activates alphabetical sorting of the URL parameters.
39
+ * @param withParameterSorting - Activates alphabetical sorting of the URL parameters.
40
40
  * @returns The normalized URL.
41
41
  */
42
- export declare function normalize(urlString: string, sortParameters: boolean): string;
42
+ export declare function normalize(urlString: string, withParameterSorting: boolean): string;
@@ -1,25 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalize = exports.transformNoValueParams = exports.convertNotEncodedParameters = exports.sortParams = void 0;
4
- const url_1 = require("url");
3
+ exports.normalize = exports.transformNoValueParameters = exports.convertNotEncodedParameters = exports.sortParameters = void 0;
4
+ const node_url_1 = require("node:url");
5
5
  /**
6
6
  * Sorts all urls params manually.
7
7
  *
8
- * @param searchParams - Params to sort.
8
+ * @param searchParameters - Params to sort.
9
9
  */
10
- function sortParams(searchParams) {
11
- const entries = [...searchParams.entries()].sort((a, b) => {
10
+ function sortParameters(searchParameters) {
11
+ const entries = [...searchParameters.entries()].sort((a, b) => {
12
12
  if (a[0] === b[0]) {
13
13
  return a[1] < b[1] ? -1 : 1;
14
14
  }
15
15
  return a[0] < b[0] ? -1 : 1;
16
16
  });
17
17
  // Clear search params before appending sorted params
18
- entries.forEach((key) => searchParams.delete(key[0]));
18
+ for (const key of entries)
19
+ searchParameters.delete(key[0]);
19
20
  // Append sorted params without overwriting keys
20
- entries.forEach((key) => searchParams.append(key[0], key[1]));
21
+ for (const key of entries)
22
+ searchParameters.append(key[0], key[1]);
21
23
  }
22
- exports.sortParams = sortParams;
24
+ exports.sortParameters = sortParameters;
23
25
  /**
24
26
  * Encodes the parameter key as URL object would encode query params.
25
27
  *
@@ -28,7 +30,7 @@ exports.sortParams = sortParams;
28
30
  * @return The encoded parameter key and value without ?.
29
31
  */
30
32
  function encodeUrlComponent(parameterKey, parameterValue) {
31
- const url = new url_1.URL("https://www.baqend.com/");
33
+ const url = new node_url_1.URL("https://www.baqend.com/");
32
34
  url.searchParams.append(parameterKey, parameterValue);
33
35
  return url.search.replace(/\?/, "");
34
36
  }
@@ -51,21 +53,21 @@ function convertNotEncodedParameters(url, manipulatedUrl) {
51
53
  if (manipulatedUrl.search.length === 0) {
52
54
  return;
53
55
  }
54
- const originalParamsMap = new Map();
55
- const originalParams = url.search.substring(1).split("&");
56
+ const originalParametersMap = new Map();
57
+ const originalParameters = url.search.slice(1).split("&");
56
58
  let index = 0;
57
- url.searchParams.forEach((value, param) => {
58
- const paramWithValue = originalParams[index];
59
- if (paramWithValue) {
60
- originalParamsMap.set(encodeUrlComponent(param, value), paramWithValue);
59
+ for (const [parameter, value] of url.searchParams.entries()) {
60
+ const parameterWithValue = originalParameters[index];
61
+ if (parameterWithValue) {
62
+ originalParametersMap.set(encodeUrlComponent(parameter, value), parameterWithValue);
61
63
  }
62
64
  index += 1;
63
- });
65
+ }
64
66
  const search = [...manipulatedUrl.searchParams].map((entry) => {
65
67
  const [key, value] = entry;
66
- const originalParamWithValue = originalParamsMap.get(encodeUrlComponent(key, value));
67
- if (originalParamWithValue) {
68
- return `${originalParamWithValue}`;
68
+ const originalParameterWithValue = originalParametersMap.get(encodeUrlComponent(key, value));
69
+ if (originalParameterWithValue) {
70
+ return `${originalParameterWithValue}`;
69
71
  }
70
72
  return `${key}=${value}`;
71
73
  });
@@ -81,34 +83,34 @@ exports.convertNotEncodedParameters = convertNotEncodedParameters;
81
83
  * @param url - The original URL.
82
84
  * @param manipulatedUrl - The manipulated URL to remove the "=" from.
83
85
  */
84
- function transformNoValueParams(url, manipulatedUrl) {
85
- const paramsWithoutValue = url.search
86
- .split(/[?&]/)
87
- .filter((e) => e && !e.includes("="));
88
- for (const param of paramsWithoutValue) {
89
- manipulatedUrl.search = manipulatedUrl.search.replace(`${param}=`, param);
86
+ function transformNoValueParameters(url, manipulatedUrl) {
87
+ const parametersWithoutValue = url.search
88
+ .split(/[&?]/)
89
+ .filter((parameter) => parameter && !parameter.includes("="));
90
+ for (const parameter of parametersWithoutValue) {
91
+ manipulatedUrl.search = manipulatedUrl.search.replace(`${parameter}=`, parameter);
90
92
  }
91
93
  }
92
- exports.transformNoValueParams = transformNoValueParams;
94
+ exports.transformNoValueParameters = transformNoValueParameters;
93
95
  /**
94
96
  * Normalizes a given URL.
95
97
  *
96
98
  * @param urlString - The URL to be normalized.
97
- * @param sortParameters - Activates alphabetical sorting of the URL parameters.
99
+ * @param withParameterSorting - Activates alphabetical sorting of the URL parameters.
98
100
  * @returns The normalized URL.
99
101
  */
100
- function normalize(urlString, sortParameters) {
101
- const url = new url_1.URL(urlString);
102
+ function normalize(urlString, withParameterSorting) {
103
+ const url = new node_url_1.URL(urlString);
102
104
  // Remove the hash part of the URL if exists
103
105
  if (url.hash) {
104
106
  url.hash = "";
105
107
  }
106
- if (!sortParameters) {
108
+ if (!withParameterSorting) {
107
109
  // Sort search params to normalize encoding and order of params
108
- sortParams(url.searchParams);
110
+ sortParameters(url.searchParams);
109
111
  }
110
- convertNotEncodedParameters(new url_1.URL(urlString), url);
111
- transformNoValueParams(new url_1.URL(urlString), url);
112
+ convertNotEncodedParameters(new node_url_1.URL(urlString), url);
113
+ transformNoValueParameters(new node_url_1.URL(urlString), url);
112
114
  return url.toString();
113
115
  }
114
116
  exports.normalize = normalize;
@@ -7,4 +7,4 @@ export type Safe<T> = {
7
7
  errorObj?: Error;
8
8
  };
9
9
  export declare function safe<T>(promise: Promise<T>): Promise<Safe<T>>;
10
- export declare function safe<T>(func: () => T): Safe<T>;
10
+ export declare function safe<T>(function_: () => T): Safe<T>;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.safe = void 0;
4
- function safe(promiseOrFunc) {
5
- if (promiseOrFunc instanceof Promise) {
6
- return safeAsync(promiseOrFunc);
4
+ function safe(promiseOrFunction) {
5
+ if (promiseOrFunction instanceof Promise) {
6
+ return safeAsync(promiseOrFunction);
7
7
  }
8
- return safeSync(promiseOrFunc);
8
+ return safeSync(promiseOrFunction);
9
9
  }
10
10
  exports.safe = safe;
11
11
  async function safeAsync(promise) {
@@ -13,21 +13,21 @@ async function safeAsync(promise) {
13
13
  const data = await promise;
14
14
  return { data, success: true };
15
15
  }
16
- catch (e) {
17
- if (e instanceof Error) {
18
- return { success: false, error: e.message, errorObj: e };
16
+ catch (error) {
17
+ if (error instanceof Error) {
18
+ return { success: false, error: error.message, errorObj: error };
19
19
  }
20
20
  return { success: false, error: "Something went wrong" };
21
21
  }
22
22
  }
23
- function safeSync(func) {
23
+ function safeSync(function_) {
24
24
  try {
25
- const data = func();
25
+ const data = function_();
26
26
  return { data, success: true };
27
27
  }
28
- catch (e) {
29
- if (e instanceof Error) {
30
- return { success: false, error: e.message, errorObj: e };
28
+ catch (error) {
29
+ if (error instanceof Error) {
30
+ return { success: false, error: error.message, errorObj: error };
31
31
  }
32
32
  return { success: false, error: "Something went wrong" };
33
33
  }
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.speedKitRuleToRegExp = void 0;
4
- function escapeRegExp(str) {
5
- return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
4
+ function escapeRegExp(string_) {
5
+ return string_.replaceAll(/[\s#$()*+,.?[\\\]^{|}-]/g, "\\$&");
6
6
  }
7
7
  function speedKitRuleToRegExp(url) {
8
- return new RegExp(`^${escapeRegExp(url).replace(/\\\*/g, ".*")}$`);
8
+ return new RegExp(`^${escapeRegExp(url).replaceAll("\\*", ".*")}$`);
9
9
  }
10
10
  exports.speedKitRuleToRegExp = speedKitRuleToRegExp;
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.watchFiles = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
- const fs_1 = tslib_1.__importDefault(require("fs"));
6
+ const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
7
7
  function watchFiles(filenames, listener) {
8
8
  for (const filename of filenames) {
9
9
  if (!filename) {
10
10
  // asset comes not from the local filesystem
11
11
  continue;
12
12
  }
13
- fs_1.default.watchFile(filename, async () => {
13
+ node_fs_1.default.watchFile(filename, async () => {
14
14
  console.info((0, chalk_1.default) `Updated {bold ${filename}}`);
15
15
  await listener();
16
16
  });
@@ -6,7 +6,7 @@ export declare enum CLIParameters {
6
6
  Cookies = "cookies",
7
7
  CreateTests = "CreateTests",
8
8
  CustomerPath = "customerPath",
9
- CustomersDir = "customersDir",
9
+ CustomersDirectory = "customersDirectory",
10
10
  Delay = "delay",
11
11
  DryRun = "dryRun",
12
12
  Group = "group",
@@ -30,7 +30,7 @@ export declare enum CLIParametersChar {
30
30
  Cookies = "c",
31
31
  CreateTests = "t",
32
32
  CustomerPath = "p",
33
- CustomersDir = "d",
33
+ CustomersDirectory = "d",
34
34
  Delay = "d",
35
35
  DryRun = "d",
36
36
  Group = "g",
@@ -50,7 +50,7 @@ export declare enum CLIParametersExample {
50
50
  ContentTypes = "image,style",
51
51
  Cookies = "consentCookies",
52
52
  CustomerPath = "customer/decathlon.de",
53
- CustomersDir = "customers",
53
+ CustomersDirectory = "customers",
54
54
  Delay = "1200",
55
55
  Group = "B",
56
56
  Ips = "151.101.120.194",
@@ -11,7 +11,7 @@ var CLIParameters;
11
11
  CLIParameters["Cookies"] = "cookies";
12
12
  CLIParameters["CreateTests"] = "CreateTests";
13
13
  CLIParameters["CustomerPath"] = "customerPath";
14
- CLIParameters["CustomersDir"] = "customersDir";
14
+ CLIParameters["CustomersDirectory"] = "customersDirectory";
15
15
  CLIParameters["Delay"] = "delay";
16
16
  CLIParameters["DryRun"] = "dryRun";
17
17
  CLIParameters["Group"] = "group";
@@ -37,7 +37,7 @@ var CLIParametersChar;
37
37
  CLIParametersChar["Cookies"] = "c";
38
38
  CLIParametersChar["CreateTests"] = "t";
39
39
  CLIParametersChar["CustomerPath"] = "p";
40
- CLIParametersChar["CustomersDir"] = "d";
40
+ CLIParametersChar["CustomersDirectory"] = "d";
41
41
  CLIParametersChar["Delay"] = "d";
42
42
  CLIParametersChar["DryRun"] = "d";
43
43
  CLIParametersChar["Group"] = "g";
@@ -59,7 +59,7 @@ var CLIParametersExample;
59
59
  CLIParametersExample["ContentTypes"] = "image,style";
60
60
  CLIParametersExample["Cookies"] = "consentCookies";
61
61
  CLIParametersExample["CustomerPath"] = "customer/decathlon.de";
62
- CLIParametersExample["CustomersDir"] = "customers";
62
+ CLIParametersExample["CustomersDirectory"] = "customers";
63
63
  CLIParametersExample["Delay"] = "1200";
64
64
  CLIParametersExample["Group"] = "B";
65
65
  CLIParametersExample["Ips"] = "151.101.120.194";
@@ -50,8 +50,8 @@ class AthenaService {
50
50
  continue; // the first row contains the column names
51
51
  }
52
52
  const row = {};
53
- for (let i = 0; i < rowRaw.Data.length; i++) {
54
- row[columns[i]] = this.castValueToType(rowRaw.Data[i].VarCharValue, types[i]);
53
+ for (let index = 0; index < rowRaw.Data.length; index++) {
54
+ row[columns[index]] = this.castValueToType(rowRaw.Data[index].VarCharValue, types[index]);
55
55
  }
56
56
  rows.push(row);
57
57
  }
@@ -23,7 +23,7 @@ class BundleService {
23
23
  logLevel,
24
24
  });
25
25
  return result.outputFiles
26
- .map((e) => e.text)
26
+ .map((outputFile) => outputFile.text)
27
27
  .join("")
28
28
  .trim();
29
29
  }
@@ -31,18 +31,18 @@ class BundleService {
31
31
  return {
32
32
  name: "entryPoints",
33
33
  setup(build) {
34
- build.onResolve({ filter: /.*/ }, (args) => {
35
- if (!entryPoints[args.path]) {
36
- throw new Error("Could not resolve " + args.path);
34
+ build.onResolve({ filter: /.*/ }, (arguments_) => {
35
+ if (!entryPoints[arguments_.path]) {
36
+ throw new Error("Could not resolve " + arguments_.path);
37
37
  }
38
38
  return {
39
- path: args.path,
39
+ path: arguments_.path,
40
40
  namespace: "entryPoint",
41
41
  };
42
42
  });
43
- build.onLoad({ filter: /.*/, namespace: "entryPoint" }, (args) => {
43
+ build.onLoad({ filter: /.*/, namespace: "entryPoint" }, (arguments_) => {
44
44
  return {
45
- contents: entryPoints[args.path],
45
+ contents: entryPoints[arguments_.path],
46
46
  loader: "js",
47
47
  };
48
48
  });
@@ -54,8 +54,8 @@ class BundleService {
54
54
  return {
55
55
  name: "baqend",
56
56
  setup(build) {
57
- build.onResolve({ filter }, (args) => {
58
- const [base, path] = args.path.split("/", 2);
57
+ build.onResolve({ filter }, (arguments_) => {
58
+ const [base, path] = arguments_.path.split("/", 2);
59
59
  const url = new node_url_1.URL(path, basePaths[base]).toString();
60
60
  if (!url.startsWith(basePaths[base])) {
61
61
  throw new Error(`Importing ${path} failed. Can't resolve the path`);
@@ -65,12 +65,12 @@ class BundleService {
65
65
  namespace: "baqend-url",
66
66
  };
67
67
  });
68
- build.onResolve({ filter: /.*/, namespace: "baqend-url" }, (args) => ({
69
- path: new node_url_1.URL(args.path, args.importer).toString(),
70
- namespace: args.namespace,
68
+ build.onResolve({ filter: /.*/, namespace: "baqend-url" }, (arguments_) => ({
69
+ path: new node_url_1.URL(arguments_.path, arguments_.importer).toString(),
70
+ namespace: arguments_.namespace,
71
71
  }));
72
- build.onLoad({ filter: /.*/, namespace: "baqend-url" }, async (args) => {
73
- const url = args.path + (!args.path.endsWith(".js") ? ".js" : "");
72
+ build.onLoad({ filter: /.*/, namespace: "baqend-url" }, async (arguments_) => {
73
+ const url = arguments_.path + (arguments_.path.endsWith(".js") ? "" : ".js");
74
74
  if (importCache[url]) {
75
75
  return { contents: importCache[url] };
76
76
  }
@@ -92,17 +92,21 @@ class CliService {
92
92
  }
93
93
  endAction(status) {
94
94
  switch (status) {
95
- case cli_service_model_1.CliActionStatus.COMPLETED:
95
+ case cli_service_model_1.CliActionStatus.COMPLETED: {
96
96
  core_1.ux.action.stop(this.style.green(cli_service_model_1.CliActionStatus.COMPLETED));
97
97
  break;
98
- case cli_service_model_1.CliActionStatus.FAILED:
98
+ }
99
+ case cli_service_model_1.CliActionStatus.FAILED: {
99
100
  core_1.ux.action.stop(this.style.red(cli_service_model_1.CliActionStatus.FAILED));
100
101
  break;
101
- case cli_service_model_1.CliActionStatus.SKIPPED:
102
+ }
103
+ case cli_service_model_1.CliActionStatus.SKIPPED: {
102
104
  core_1.ux.action.stop(this.style.yellow(cli_service_model_1.CliActionStatus.SKIPPED));
103
105
  break;
104
- default:
106
+ }
107
+ default: {
105
108
  core_1.ux.action.stop();
109
+ }
106
110
  }
107
111
  }
108
112
  writeBuffer() {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const child_process_1 = require("child_process");
3
+ const node_child_process_1 = require("node:child_process");
4
4
  class Hooks {
5
5
  preHook;
6
6
  postHook;
@@ -20,14 +20,14 @@ class Hooks {
20
20
  return;
21
21
  }
22
22
  this.cli.writeSuccess(this.preHook);
23
- this.cli.write((0, child_process_1.execSync)(this.preHook) + "");
23
+ this.cli.write((0, node_child_process_1.execSync)(this.preHook) + "");
24
24
  }
25
25
  async runPostHook() {
26
26
  if (!this.postHook) {
27
27
  return;
28
28
  }
29
29
  this.cli.writeSuccess(this.postHook);
30
- this.cli.write((0, child_process_1.execSync)(this.postHook) + "");
30
+ this.cli.write((0, node_child_process_1.execSync)(this.postHook) + "");
31
31
  }
32
32
  }
33
33
  exports.default = Hooks;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const https_1 = require("https");
4
+ const node_https_1 = require("node:https");
5
5
  const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
6
6
  const deepmerge_1 = tslib_1.__importDefault(require("deepmerge"));
7
7
  const race_1 = require("../../helpers/race");
@@ -14,14 +14,15 @@ class Client {
14
14
  constructor(app, entityManagerFactory) {
15
15
  this.app = app;
16
16
  this.entityManagerFactory = entityManagerFactory;
17
- this.agent = new https_1.Agent({ rejectUnauthorized: false, keepAlive: true });
17
+ this.agent = new node_https_1.Agent({ rejectUnauthorized: false, keepAlive: true });
18
18
  }
19
19
  async send(url, requestExtension = {}) {
20
- const res = await (0, node_fetch_1.default)(url, await this.createRequest(requestExtension));
21
- if (res.status !== 200) {
22
- throw new Error((await res.json()).message);
20
+ const response = await (0, node_fetch_1.default)(url, await this.createRequest(requestExtension));
21
+ if (response.status !== 200) {
22
+ const json = await response.json();
23
+ throw new Error(json.message);
23
24
  }
24
- return await res.json();
25
+ return await response.json();
25
26
  }
26
27
  async getModule(moduleName) {
27
28
  const entityManager = await this.getEntityManager();
@@ -6,8 +6,8 @@ const client_1 = tslib_1.__importDefault(require("../client"));
6
6
  const entity_manager_factory_1 = tslib_1.__importDefault(require("./entity-manager-factory"));
7
7
  const context_runtime_error_1 = tslib_1.__importDefault(require("../../context/error/context-runtime-error"));
8
8
  const node_fs_1 = require("node:fs");
9
- const os_1 = tslib_1.__importDefault(require("os"));
10
- const path_1 = tslib_1.__importDefault(require("path"));
9
+ const node_os_1 = tslib_1.__importDefault(require("node:os"));
10
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
11
11
  class ConfigApiServiceFactory {
12
12
  context;
13
13
  service = undefined;
@@ -30,8 +30,8 @@ class ConfigApiServiceFactory {
30
30
  this.service = new config_api_service_1.default(this.context.app, client);
31
31
  }
32
32
  createLoginTokenFileIfNotExists() {
33
- if (!(0, node_fs_1.existsSync)(path_1.default.resolve(os_1.default.homedir(), ".baqend"))) {
34
- (0, node_fs_1.writeFileSync)(path_1.default.resolve(os_1.default.homedir(), ".baqend"), "{}");
33
+ if (!(0, node_fs_1.existsSync)(node_path_1.default.resolve(node_os_1.default.homedir(), ".baqend"))) {
34
+ (0, node_fs_1.writeFileSync)(node_path_1.default.resolve(node_os_1.default.homedir(), ".baqend"), "{}");
35
35
  }
36
36
  }
37
37
  }
@@ -13,7 +13,7 @@ class EntityManagerFactory {
13
13
  this.EntityManager = await cli_1.account.login({ app });
14
14
  return this.EntityManager;
15
15
  }
16
- catch (e) {
16
+ catch {
17
17
  throw new login_error_1.default(app);
18
18
  }
19
19
  }
@@ -4,7 +4,7 @@ export default class ConfigApiService {
4
4
  private db;
5
5
  private readonly app;
6
6
  private readonly requestInit;
7
- constructor(db: EntityManager, app: string);
7
+ constructor(database: EntityManager, app: string);
8
8
  fetchActiveInstall(configName: string): Promise<Install | null>;
9
9
  activateInstall(install: Install): Promise<Install>;
10
10
  updateInstall(install: Install): Promise<Install | null>;
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const fs = tslib_1.__importStar(require("fs-extra"));
5
5
  const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
6
- const https_1 = tslib_1.__importDefault(require("https"));
7
- const agent = new https_1.default.Agent({
6
+ const node_https_1 = tslib_1.__importDefault(require("node:https"));
7
+ const agent = new node_https_1.default.Agent({
8
8
  rejectUnauthorized: false,
9
9
  keepAlive: true,
10
10
  });
@@ -13,8 +13,8 @@ class ConfigApiService {
13
13
  db;
14
14
  app;
15
15
  requestInit;
16
- constructor(db, app) {
17
- this.db = db;
16
+ constructor(database, app) {
17
+ this.db = database;
18
18
  this.app = app;
19
19
  this.requestInit = {
20
20
  agent,
@@ -97,9 +97,9 @@ class ConfigApiService {
97
97
  await this.fetchAndGetBody(urlPath, putInit);
98
98
  }
99
99
  async fetchAndGetBody(url, requestInit = this.requestInit) {
100
- const res = await (0, node_fetch_1.default)(url, requestInit);
101
- const body = await res.json();
102
- if (res.status !== 200) {
100
+ const response = await (0, node_fetch_1.default)(url, requestInit);
101
+ const body = await response.json();
102
+ if (response.status !== 200) {
103
103
  throw new Error(body.message);
104
104
  }
105
105
  return body;
@@ -1,5 +1,5 @@
1
1
  export declare class CustomerConfigServiceContext {
2
2
  appName: string;
3
- customersDir: string;
4
- constructor(appName?: string, customersDir?: string);
3
+ customersDirectory: string;
4
+ constructor(appName?: string, customersDirectory?: string);
5
5
  }
@@ -4,12 +4,12 @@ exports.CustomerConfigServiceContext = void 0;
4
4
  const cli_parameters_1 = require("../../models/cli-parameters");
5
5
  class CustomerConfigServiceContext {
6
6
  appName;
7
- customersDir;
8
- constructor(appName = "", customersDir = cli_parameters_1.CLIParametersExample.CustomersDir) {
7
+ customersDirectory;
8
+ constructor(appName = "", customersDirectory = cli_parameters_1.CLIParametersExample.CustomersDirectory) {
9
9
  this.appName = appName;
10
- this.customersDir = customersDir;
10
+ this.customersDirectory = customersDirectory;
11
11
  this.appName = appName;
12
- this.customersDir = customersDir;
12
+ this.customersDirectory = customersDirectory;
13
13
  }
14
14
  }
15
15
  exports.CustomerConfigServiceContext = CustomerConfigServiceContext;