@iobroker/adapter-core
Advanced tools
Comparing version 2.3.1 to 2.4.0
@@ -12,1 +12,39 @@ /// <reference types="iobroker" /> | ||
export declare function getAbsoluteInstanceDataDir(adapterObject: ioBroker.Adapter): string; | ||
export declare const EXIT_CODES: Readonly<{ | ||
NO_ERROR: number; | ||
JS_CONTROLLER_STOPPED: number; | ||
INVALID_ADAPTER_CONFIG: number; | ||
NO_ADAPTER_CONFIG_FOUND: number; | ||
INVALID_CONFIG_OBJECT: number; | ||
INVALID_ADAPTER_ID: number; | ||
UNCAUGHT_EXCEPTION: number; | ||
ADAPTER_ALREADY_RUNNING: number; | ||
INSTANCE_IS_DISABLED: number; | ||
CANNOT_GZIP_DIRECTORY: number; | ||
CANNOT_FIND_ADAPTER_DIR: number; | ||
ADAPTER_REQUESTED_TERMINATION: number; | ||
UNKNOWN_PACKET_NAME: number; | ||
ADAPTER_REQUESTED_REBUILD: number; | ||
CANNOT_READ_INSTANCES: number; | ||
NO_MULTIPLE_INSTANCES_ALLOWED: number; | ||
NO_MULTIPLE_INSTANCES_ALLOWED_ON_HOST: number; | ||
NO_CONNECTION_TO_OBJ_DB: number; | ||
NO_CONNECTION_TO_STATES_DB: number; | ||
INSTANCE_ALREADY_EXISTS: number; | ||
CANNOT_INSTALL_NPM_PACKET: number; | ||
CANNOT_EXTRACT_FROM_ZIP: number; | ||
INVALID_IO_PACKAGE_JSON: number; | ||
CANNOT_COPY_DIR: number; | ||
MISSING_ADAPTER_FILES: number; | ||
INVALID_NPM_VERSION: number; | ||
INVALID_NODE_VERSION: number; | ||
INVALID_OS: number; | ||
INVALID_DEPENDENCY_VERSION: number; | ||
INVALID_ARGUMENTS: number; | ||
INVALID_PASSWORD: number; | ||
MISSING_CONFIG_JSON: number; | ||
CANNOT_DELETE_NON_DELETABLE: number; | ||
CANNOT_GET_STATES: number; | ||
CANNOT_GET_REPO_LIST: number; | ||
START_IMMEDIATELY_AFTER_STOP: number; | ||
}>; |
"use strict"; | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
function __export(m) { | ||
@@ -7,6 +6,7 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const path = require("path"); | ||
const utils = require("./utils"); | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
// Export all methods that used to be in utils.js | ||
__export(require("./utils")); | ||
const path = require("path"); | ||
const utils = require("./utils"); | ||
// Export some additional utility methods | ||
@@ -30,1 +30,2 @@ const controllerTools = require(path.join(utils.controllerDir, "lib/tools")); | ||
// TODO: Expose some system utilities here, e.g. for installing npm modules (GH#1) | ||
exports.EXIT_CODES = Object.freeze(Object.assign({}, require(path.join(utils.controllerDir, "lib/exitCodes")))); |
{ | ||
"name": "@iobroker/adapter-core", | ||
"version": "2.3.1", | ||
"version": "2.4.0", | ||
"description": "Core module to be used in ioBroker adapters. Acts as the bridge to js-controller.", | ||
@@ -55,3 +55,3 @@ "author": { | ||
"rimraf": "^3.0.0", | ||
"sinon": "^8.0.2", | ||
"sinon": "^9.0.2", | ||
"sinon-chai": "^3.3.0", | ||
@@ -63,4 +63,4 @@ "source-map-support": "^0.5.9", | ||
"dependencies": { | ||
"@types/iobroker": "^3.0.4" | ||
"@types/iobroker": "^3.0.6" | ||
} | ||
} |
@@ -50,2 +50,13 @@ # Adapter-Core | ||
### `EXIT_CODES` | ||
```js | ||
adapter.terminate( | ||
"for some reason", | ||
utils.EXIT_CODES.ADAPTER_REQUESTED_TERMINATION, | ||
); | ||
``` | ||
Use standardized exit codes if your adapter needs to terminate. | ||
## Automatic backup of data files | ||
@@ -79,2 +90,7 @@ | ||
### v2.4.0 (2020-05-03) | ||
- (AlCalzone) Updated core declarations to v3.0.6. | ||
- (AlCalzone) Expose the predefined collection of adapter exit codes as `utils.EXIT_CODES` | ||
### v2.3.1 (2020-04-17) | ||
@@ -81,0 +97,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18574
13
263
140
5
Updated@types/iobroker@^3.0.6