diff --git a/.github/workflows/nightly-dev-release.yml b/.github/workflows/nightly-dev-release.yml index 658cc4873..eadecc33c 100644 --- a/.github/workflows/nightly-dev-release.yml +++ b/.github/workflows/nightly-dev-release.yml @@ -4,6 +4,17 @@ on: schedule: - cron: 0 2 * * * # Every day at 02:00 workflow_dispatch: # Manually on demand + inputs: + versionBump: + description: 'Type of version bump' + required: true + default: 'prerelease' + type: choice + options: + - prerelease + - prepatch + - preminor + - premajor jobs: publish-config: @@ -65,6 +76,8 @@ jobs: - name: Determine the version bump if: steps.changes.outputs.result == 'ok' + env: + VERSION_BUMP: ${{ inputs.versionBump }} id: version uses: actions/github-script@v7 with: @@ -94,12 +107,13 @@ jobs: } // Figure out the next version - const nightlyVersion = `${semver.inc(parsed, "prerelease", prereleaseIdentifier)}-${dateStr}-${sha}`; + const versionBump = process.env.VERSION_BUMP || 'prerelease'; + const nightlyVersion = `${parsed.inc(process.env.VERSION_BUMP, prereleaseIdentifier)}-${dateStr}-${sha}`; // ensure that io-pack is in sync const fs = require('fs'); const ioPack = JSON.parse(fs.readFileSync(`${process.env.GITHUB_WORKSPACE}/packages/controller/io-package.json`)); - ioPack.common.version = semver.inc(nightlyVersion, 'patch');; + ioPack.common.version = semver.inc(nightlyVersion, 'patch'); fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/packages/controller/io-package.json`, JSON.stringify(ioPack, null, 2)); return nightlyVersion; diff --git a/CHANGELOG.md b/CHANGELOG.md index 08fc86a67..0182eed31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,16 +3,30 @@ Placeholder for the next version (at the beginning of the line): ## **WORK IN PROGRESS** --> -## **WORK IN PROGRESS** -* (bluefox) Added support for dynamic notification layout (in Admin) -* (@foxriver76) updated plugin base and sentry plugin to version 2 -* (@foxriver76) enhanced translations for the `diskSpaceIssues` notification category +## **WORK IN PROGRESS** - Lucy +**Breaking changes** +* Backups created with 7.0.x cannot be restored with previous version + +**Features** +* (@GermanBluefox) Added support for dynamic notification data +(with this feature developers can create interactive notifications in the Admin adapter) +* (@GermanBluefox/@foxriver76) implemented automatic upload on adapter start if version mismatch is detected +* (@foxriver76) improved backup/restore process to work for arbitrary large installations * (@foxriver76) added notification if new image is available on Docker Hub (for official docker systems) + +**Optimizations and fixes** * (@foxriver76) extend the time to wait until controller is stopped on controller UI upgrade -* (@foxriver76) improved backup/restore process to work for arbitrary large installations -* (@GermanBluefox/@foxriver76) implemented automatic upload on adapter start if version mismatch is detected +* (@foxriver76) enhanced translations for the `diskSpaceIssues` notification category * (@foxriver76) enriched logging on upload with version information +**Developer relevant new features** +* (@GermanBluefox) On `registerNotification` developers can now pass additional context data +e.g. for dynamic notifications with Admin adapter + +**Developer relevant Optimizations and Fixes** +* (@foxriver76) updated plugin base and sentry plugin to version 2 +* (@GermanBluefox/@foxriver76) multiple improvements on type level + ## 6.0.11 (2024-08-21) - Kiera * (foxriver76) only generate `packageUpdates` notification, if new updates detected @@ -171,7 +185,7 @@ * (foxriver76) new `io-package` flag `common.supportedMessages` to replace `messagebox` and other messagebox-related properties * (foxriver76) `adapter.sendTo` now accepts an optional `timeout` argument -* **Developer relevant Optimizations and Fixes** +**Developer relevant Optimizations and Fixes** * (foxriver76) Ensure setObjectNotExists returns id on success * (foxriver76) Fix Typings for sendTo/sendToHost * (Bluefox) Add User permission check to requireLog diff --git a/README.md b/README.md index ca76d643f..9fe1c48a9 100644 --- a/README.md +++ b/README.md @@ -512,7 +512,7 @@ This method takes the following parameters: * scope: scope to be addressed * category: category to be addressed, if a null message will be checked by regex of given scope * message: message to be stored/checked -* options: Available with js-controller version 6.1. Additional options for the notification, currently you can provide additional `contextData` which is also stored with the notification information. Notification processing adapters can use this data +* options: Available with js-controller version 7.0. Additional options for the notification, currently you can provide additional `contextData` which is also stored with the notification information. Notification processing adapters can use this data Note, that the structure of the `contextData` which can be stored via the options object is not defined by the controller. Adapters which handle messages can use individual data attributes. Currently, it is planned to support individual notification customization in the `admin` adapter. More information will be available in the `admin` adapter as soon as this feature is ready. @@ -1309,7 +1309,7 @@ Feature status: **stable** There are several environment variables which are respected by the js-controller. -#### `IOB_NO_SETCAP` (up from js-controller 6.1.X) +#### `IOB_NO_SETCAP` (up from js-controller 7.0.X) By default, the js-controller sets some capabilities on the Node.js executable. Currently, `cap_net_admin`, `cap_net_bind_service`, `cap_net_raw` are set to e.g. allow Node.js to start/stop BLE advertising without root privileges. On installation these are set by the ioBroker installer. However, on upgrades of Node.js these get lost. If js-controller detects a Node.js upgrade, it will ensure that these capabilities are set again. diff --git a/packages/adapter/src/lib/adapter/adapter.ts b/packages/adapter/src/lib/adapter/adapter.ts index b75cefd8d..1b0f8a711 100644 --- a/packages/adapter/src/lib/adapter/adapter.ts +++ b/packages/adapter/src/lib/adapter/adapter.ts @@ -5140,7 +5140,7 @@ export class AdapterClass extends EventEmitter { */ createDevice(deviceName: unknown, common: unknown, _native?: unknown, options?: unknown, callback?: unknown): any { this._logger.info( - `${this.namespaceLog} Method "createDevice" is deprecated and will be removed in js-controller 7, use "extendObject/setObjectNotExists" instead`, + `${this.namespaceLog} Method "createDevice" is deprecated and will be removed in js-controller 7.1, use "extendObject/setObjectNotExists" instead`, ); if (typeof options === 'function') { @@ -5243,7 +5243,7 @@ export class AdapterClass extends EventEmitter { callback?: unknown, ): any { this._logger.info( - `${this.namespaceLog} Method "createChannel" is deprecated and will be removed in js-controller 7, use "extendObject/setObjectNotExists" instead`, + `${this.namespaceLog} Method "createChannel" is deprecated and will be removed in js-controller 7.1, use "extendObject/setObjectNotExists" instead`, ); if (typeof options === 'function') { @@ -5354,7 +5354,7 @@ export class AdapterClass extends EventEmitter { callback?: unknown, ): any { this._logger.info( - `${this.namespaceLog} Method "createState" is deprecated and will be removed in js-controller 7, use "extendObject/setObjectNotExists" instead`, + `${this.namespaceLog} Method "createState" is deprecated and will be removed in js-controller 7.1, use "extendObject/setObjectNotExists" instead`, ); if (typeof options === 'function') { @@ -5543,7 +5543,7 @@ export class AdapterClass extends EventEmitter { */ deleteDevice(deviceName: unknown, options: unknown, callback?: unknown): any { this._logger.info( - `${this.namespaceLog} Method "deleteDevice" is deprecated and will be removed in js-controller 7, use "delObject" instead`, + `${this.namespaceLog} Method "deleteDevice" is deprecated and will be removed in js-controller 7.1, use "delObject" instead`, ); if (typeof options === 'function') { @@ -5873,7 +5873,7 @@ export class AdapterClass extends EventEmitter { */ deleteChannel(parentDevice: unknown, channelName: unknown, options?: unknown, callback?: unknown): any { this._logger.info( - `${this.namespaceLog} Method "deleteChannel" is deprecated and will be removed in js-controller 7, use "delObject" instead`, + `${this.namespaceLog} Method "deleteChannel" is deprecated and will be removed in js-controller 7.1, use "delObject" instead`, ); if (typeof options === 'function') { @@ -5989,7 +5989,7 @@ export class AdapterClass extends EventEmitter { callback?: unknown, ): any { this._logger.info( - `${this.namespaceLog} Method "deleteState" is deprecated and will be removed in js-controller 7, use "delObject" instead`, + `${this.namespaceLog} Method "deleteState" is deprecated and will be removed in js-controller 7.1, use "delObject" instead`, ); if (typeof parentChannel === 'function' && stateName === undefined) { diff --git a/packages/adapter/src/lib/adapter/constants.ts b/packages/adapter/src/lib/adapter/constants.ts index e2bcd4e65..288d3c14d 100644 --- a/packages/adapter/src/lib/adapter/constants.ts +++ b/packages/adapter/src/lib/adapter/constants.ts @@ -63,7 +63,6 @@ const SUPPORTED_FEATURES_INTERNAL = [ 'CONTROLLER_LICENSE_MANAGER', // Controller can read licenses from iobroker.net. Since js-controller 4.0 'CONTROLLER_OS_PACKAGE_UPGRADE', // Controller can upgrade OS packages 'DEL_INSTANCE_CUSTOM', // instances/adapter can be deleted with --custom flag to remove corresponding custom of all objects. Since js-controller 4.0 - 'BINARY_STATE_EVENT', // stateChange event could be received for binary states too. Deprecated in js-controller 5.0 'CUSTOM_FULL_VIEW', // `getObjectView('system', 'custom-full', ...)` will return full objects and not only `common.custom` part. Since `js-controller` 5.0 'ADAPTER_GET_OBJECTS_BY_ARRAY', // getForeignObjects supports an array of ids too. Since js-controller 5.0 'CONTROLLER_UI_UPGRADE', // Controller can be updated via sendToHost('upgradeController', ...) diff --git a/packages/cli/src/lib/setup.ts b/packages/cli/src/lib/setup.ts index a06859fb6..f5997c687 100644 --- a/packages/cli/src/lib/setup.ts +++ b/packages/cli/src/lib/setup.ts @@ -1302,7 +1302,7 @@ async function processCommand( try { const filePath = await backup.createBackup(name); console.log(`Backup created: ${filePath}`); - console.log('This backup can only be restored with js-controller version 6.1 or higher'); + console.log('This backup can only be restored with js-controller version 7.0 or higher'); return void callback(EXIT_CODES.NO_ERROR); } catch (e) { console.log(`Cannot create backup: ${e.message}`);