@iobroker/js-controller-cli 6.0.9 → 6.0.10-alpha.0-20240804-d9be20474

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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Install adapter
3
3
  *
4
- * Copyright 2013-2023 bluefox <dogafox@gmail.com>
4
+ * Copyright 2013-2024 bluefox <dogafox@gmail.com>
5
5
  *
6
6
  * MIT License
7
7
  *
@@ -188,7 +188,7 @@ export declare class Install {
188
188
  */
189
189
  deleteInstance(adapter: string, instance?: number): Promise<void | EXIT_CODES.CANNOT_DELETE_DEPENDENCY>;
190
190
  /**
191
- * Remove all node modules which has been installed by this instance
191
+ * Remove all node modules that has been installed by this instance
192
192
  *
193
193
  * @param adapter adapter name like hm-rpc
194
194
  * @param instance e.g. 1, if undefined deletes all instances
@@ -212,7 +212,7 @@ export declare class Install {
212
212
  *
213
213
  * @param adapter adapter name
214
214
  * @param instance instance, like 1
215
- * @returns if dependent exists returns adapter name
215
+ * @returns if dependent exists, returns adapter name
216
216
  */
217
217
  private _hasDependentInstances;
218
218
  /**
@@ -221,7 +221,7 @@ export declare class Install {
221
221
  * @param adapter adapter name
222
222
  * @param instancesRows all instances objects view rows
223
223
  * @param scopedHostname hostname which should be assumed as local
224
- * @returns true if an instance is present on other host
224
+ * @returns true if an instance is present on another host
225
225
  */
226
226
  private _checkDependencyFulfilledForeignHosts;
227
227
  /**
@@ -167,7 +167,7 @@ class Install {
167
167
  return { packetName, stoppedList };
168
168
  }
169
169
  }
170
- console.error(`host.${hostname} Unknown packetName ${packetName}. Please install packages from outside the repository using "${import_js_controller_common.tools.appNameLowerCase} url <url-or-package>"!`);
170
+ console.error(`host.${hostname} Unknown packet name ${packetName}. Please install packages from outside the repository using "${import_js_controller_common.tools.appNameLowerCase} url <url-or-package>"!`);
171
171
  throw new import_customError.IoBrokerError({
172
172
  code: import_js_controller_common.EXIT_CODES.UNKNOWN_PACKET_NAME,
173
173
  message: `Unknown packetName ${packetName}. Please install packages from outside the repository using npm!`
@@ -1140,14 +1140,14 @@ class Install {
1140
1140
  }
1141
1141
  console.log(`install ${url}`);
1142
1142
  if (!name) {
1143
- const reNpmPacket = new RegExp("^" + import_js_controller_common.tools.appName + "\\.([-_\\w\\d]+)(@.*)?$", "i");
1143
+ const reNpmPacket = new RegExp(`^${import_js_controller_common.tools.appName}\\.([-_\\w\\d]+)(@.*)?$`, "i");
1144
1144
  const match = reNpmPacket.exec(url);
1145
1145
  if (match) {
1146
1146
  name = match[1];
1147
1147
  } else if (url.match(/\.(tgz|gz|zip|tar\.gz)$/)) {
1148
1148
  const parts = url.split("/");
1149
1149
  const last = parts.pop();
1150
- const mm = last.match(/\.([-_\w\d]+)-[.\d]+/);
1150
+ const mm = last.match(/\.([-_\w]+)-[.\d]+/);
1151
1151
  if (mm) {
1152
1152
  name = mm[1];
1153
1153
  }
@@ -1158,7 +1158,7 @@ class Install {
1158
1158
  } else {
1159
1159
  name = url;
1160
1160
  }
1161
- const reG = new RegExp(import_js_controller_common.tools.appName + "\\.([-_\\w\\d]+)$", "i");
1161
+ const reG = new RegExp(`${import_js_controller_common.tools.appName}\\.([-_\\w\\d]+)$`, "i");
1162
1162
  const match2 = reG.exec(name);
1163
1163
  if (match2) {
1164
1164
  name = match2[1];