@sap/cli-core 2026.2.1 → 2026.3.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.
@@ -120,7 +120,6 @@ export class SecretsStorageImpl {
120
120
  this.secrets.forEach((secret) => {
121
121
  Object.keys(secret).forEach((key) => {
122
122
  if (!ALLOWED_SECRET_TYPES.includes(key)) {
123
- // eslint-disable-next-line no-param-reassign
124
123
  delete secret[key];
125
124
  }
126
125
  });
@@ -46,9 +46,7 @@ export async function updateUrls(secret) {
46
46
  if (!tokenUrl || !authorizationUrl) {
47
47
  throw new Error("invalid token url or authorization url");
48
48
  }
49
- // eslint-disable-next-line no-param-reassign
50
49
  secret.authorization_url = removeQueryParametersFromUrl(authorizationUrl);
51
- // eslint-disable-next-line no-param-reassign
52
50
  secret.token_url = removeQueryParametersFromUrl(tokenUrl);
53
51
  }
54
52
  return secret;
@@ -5,8 +5,6 @@ export function getLowerVersion(a, b) {
5
5
  }
6
6
  export function mergeDiscoveries(discovery, newDiscovery) {
7
7
  merge(discovery, newDiscovery);
8
- // eslint-disable-next-line no-param-reassign
9
8
  discovery.info.version = getLowerVersion(discovery.info.version, newDiscovery.info.version);
10
- // eslint-disable-next-line no-param-reassign
11
9
  discovery.info["x-document-version"] = getLowerVersion(discovery.info["x-document-version"], newDiscovery.info["x-document-version"]);
12
10
  }
@@ -44,6 +44,7 @@ export const retrieveCode = async () => new Promise((resolve, reject) => {
44
44
  const secrets = await SecretsStorageSingleton.SINGLETON.getDefaultSecret();
45
45
  const defaultPort = secrets.customClient ? "8080" : "65000";
46
46
  const PORT = parseInt(process.env.CLI_HTTP_PORT ?? defaultPort, 10);
47
+ // eslint-disable-next-line prefer-const
47
48
  let timeout;
48
49
  const server = createServer((req, res) => {
49
50
  void (async () => {
@@ -44,16 +44,13 @@ export const handleMappingIn = (mapping, url, value, headers, bodyWrapper) => {
44
44
  url.searchParams.append(mapping.name, value);
45
45
  }
46
46
  else if (mapping.in === "header") {
47
- // eslint-disable-next-line no-param-reassign
48
47
  headers[mapping.name] = value;
49
48
  }
50
49
  else if (mapping.in === "path") {
51
- // eslint-disable-next-line no-param-reassign
52
50
  url.pathname = url.pathname.replace(new RegExp(`${CURLY_OPEN_ENCODED}${mapping.name}${CURLY_CLOSED_ENCODED}`, "g"), encodeURIComponent(value));
53
51
  }
54
52
  else {
55
53
  if (!bodyWrapper.body) {
56
- // eslint-disable-next-line no-param-reassign
57
54
  bodyWrapper.body = {};
58
55
  }
59
56
  set(bodyWrapper.body, mapping.name, value);
@@ -16,7 +16,7 @@ export const verifyHost = async () => async () => {
16
16
  const url = getTenantUrl();
17
17
  logger.debug(`url defined as ${url}`);
18
18
  }
19
- catch (err) {
19
+ catch {
20
20
  logger.error("tenant URL not defined. use option -H, --host");
21
21
  logVerbose(logger, "specify the tenant URL using option --host");
22
22
  throw new Error("tenant URL not defined. use option -H, --host");
@@ -41,7 +41,7 @@ const initializeCache = async () => async () => {
41
41
  getOptionValueFromConfig(OPTION_HOST);
42
42
  await (await init())();
43
43
  }
44
- catch (err) {
44
+ catch {
45
45
  warn(`option ${buildOptionName(ROOT_COMMAND, OPTION_HOST)} not defined, skipping cache init`);
46
46
  }
47
47
  };
@@ -41,7 +41,6 @@ const addCommandToArray = (document, commands, segments, index) => {
41
41
  return { command, remove: () => commands.splice(commands.length - 1, 1) };
42
42
  };
43
43
  const setHandler = (command, method, path, parameterMappings, readPathResponseHandler, ...handler) => {
44
- // eslint-disable-next-line no-param-reassign
45
44
  command.handler = createNextHandler("openAPI.command", createParseArgumentsHandler(), createMandatoryOptionsHandler(), createAuthenticationHandler(), ...handler, createFetchHandler(method, path, parameterMappings, readPathResponseHandler));
46
45
  };
47
46
  export const addCommands = async (program) => {
@@ -107,7 +107,6 @@ const getKeysFromSchema = (schema, doc, key = "", required = false) => {
107
107
  const { trace } = getLogger();
108
108
  trace(`retrieving keys for key ${key} from schema ${JSON.stringify(schema)}`);
109
109
  if (schema.$ref) {
110
- // eslint-disable-next-line no-param-reassign
111
110
  schema = getSchema(schema, doc);
112
111
  }
113
112
  if (schema.type === "object" && schema.properties) {
@@ -302,7 +301,6 @@ export const handleParameters = (operation, doc, parameterMappings, command, top
302
301
  };
303
302
  export const handleDeprecationNotice = (operation, command) => {
304
303
  if (operation.deprecated && command.type === "command") {
305
- // eslint-disable-next-line no-param-reassign
306
304
  command.deprecationInfo = {
307
305
  deprecated: true,
308
306
  deprecatedWithWave: operation["x-deprecated-with-wave"],
package/config/index.js CHANGED
@@ -64,7 +64,6 @@ export const setCustomConfig = () => {
64
64
  setCustomConfig();
65
65
  const setTenant = (tenant) => {
66
66
  const info = getInfoFromTenant(tenant, config.verbose);
67
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
68
67
  set({ ...info, newTenant: tenant });
69
68
  };
70
69
  export const set = (c) => {
package/dwc/dwc.js CHANGED
@@ -134,7 +134,6 @@ export const executeCommand = async (command) => {
134
134
  };
135
135
  const buildCommandsObject = (name, command, object = {}) => {
136
136
  const commandName = name || "dwc";
137
- // eslint-disable-next-line no-param-reassign
138
137
  object[commandName] = async (options) => {
139
138
  await executeCommand(new Array(2)
140
139
  .fill("dummy")
package/logger/index.js CHANGED
@@ -35,7 +35,6 @@ const logMessage = (namespace, level) => (...args) => {
35
35
  ? // @ts-expect-error ts(7053)
36
36
  customLogger[LogLevel2Console[level]](...args)
37
37
  : // @ts-expect-error ts(7053)
38
- // eslint-disable-next-line
39
38
  console[LogLevel2Console[level]](...[
40
39
  `[${namespace}:${level === LogLevel.TRACE ? "trace" : LogLevel2Console[level]}:${new Date().toISOString()}] ${args[0]}`,
41
40
  ...args.slice(1),
@@ -46,8 +45,7 @@ export const get = (namespace) => {
46
45
  return {
47
46
  output: customLogger?.output
48
47
  ? customLogger.output
49
- : // eslint-disable-next-line
50
- (...args) => console.log(...args),
48
+ : (...args) => console.log(...args),
51
49
  error: logMessage(namespace, LogLevel.ERROR),
52
50
  warn: logMessage(namespace, LogLevel.WARN),
53
51
  info: logMessage(namespace, LogLevel.INFO),
package/module.js CHANGED
@@ -1,4 +1,3 @@
1
- /* eslint-disable import/first */
2
1
  import * as dotenv from "dotenv";
3
2
  import { configureLoggers } from "./configureLoggers.js";
4
3
  dotenv.config({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cli-core",
3
- "version": "2026.2.1",
3
+ "version": "2026.3.0",
4
4
  "description": "Command-Line Interface (CLI) Core Module",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "SAP SE",
@@ -20,19 +20,18 @@
20
20
  "dependencies": {
21
21
  "ajv": "8.17.1",
22
22
  "axios": "1.13.2",
23
- "commander": "12.1.0",
23
+ "commander": "14.0.2",
24
24
  "compare-versions": "6.1.1",
25
25
  "config": "4.1.1",
26
26
  "dotenv": "17.2.3",
27
27
  "form-data": "4.0.5",
28
- "fs-extra": "11.3.2",
29
- "https": "1.0.0",
28
+ "fs-extra": "11.3.3",
30
29
  "https-proxy-agent": "7.0.6",
31
30
  "jszip": "3.10.1",
32
- "lodash-es": "4.17.21",
31
+ "lodash-es": "4.17.22",
33
32
  "open": "11.0.0",
34
33
  "path": "0.12.7",
35
34
  "prompts": "2.4.2",
36
- "qs": "6.14.0"
35
+ "qs": "6.14.1"
37
36
  }
38
37
  }
package/utils/commands.js CHANGED
@@ -29,6 +29,7 @@ export const createCommand = (name) => {
29
29
  command.exitOverride();
30
30
  command.configureOutput({ writeErr: output, writeOut: output });
31
31
  command.allowUnknownOption();
32
+ command.allowExcessArguments();
32
33
  return command;
33
34
  };
34
35
  export function getAbsoluteCommandName(command) {
@@ -77,7 +78,7 @@ export const registerLongName = (command, option) => {
77
78
  try {
78
79
  return getShortFlagForLongName(command, option);
79
80
  }
80
- catch (err) {
81
+ catch {
81
82
  let possibleShortFlags = getInitialShortFlagOptions(option);
82
83
  possibleShortFlags = removeUsedShortFlags(possibleShortFlags);
83
84
  if (possibleShortFlags.length === 0) {
@@ -10,18 +10,19 @@ export async function getSupportedBrowsers() {
10
10
  for (const key of Object.keys(apps)) {
11
11
  const name = key;
12
12
  // Skip private browser
13
- if (name !== "browserPrivate") {
14
- try {
15
- // Access the lazy property - may throw if not supported on this platform
16
- const value = apps[name];
17
- if (value !== undefined) {
18
- browsers.push({ name, app: value });
19
- }
20
- }
21
- catch {
22
- // Silently skip apps not supported on this platform (e.g., safari on Windows)
13
+ if (name === "browserPrivate") {
14
+ continue;
15
+ }
16
+ try {
17
+ // Access the lazy property - may throw if not supported on this platform
18
+ const value = apps[name];
19
+ if (value !== undefined) {
20
+ browsers.push({ name, app: value });
23
21
  }
24
22
  }
23
+ catch {
24
+ // Silently skip apps not supported on this platform (e.g., safari on Windows)
25
+ }
25
26
  }
26
27
  return browsers;
27
28
  }
package/utils/utils.js CHANGED
@@ -35,7 +35,7 @@ export const readPackageJson = (cwd = "", force = false) => {
35
35
  trace(`reading ${p}`);
36
36
  pgk = requireFile(p);
37
37
  }
38
- catch (err2) {
38
+ catch {
39
39
  trace("failed to read package.json second time", err.stack);
40
40
  const p = path.join(cwdPath, "../../package.json");
41
41
  trace(`reading ${p}`);
@@ -89,7 +89,6 @@ export const parseTenant = (tenant) => {
89
89
  export function isValidURL(url) {
90
90
  const { debug, error } = getLogger();
91
91
  try {
92
- // eslint-disable-next-line no-new
93
92
  new URL(url);
94
93
  debug(`url ${url} is valid`);
95
94
  return true;