From e6374aba7c9b60e14edf3de7ee29520524e2c508 Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Thu, 23 Jan 2025 17:59:37 +0000 Subject: [PATCH 1/8] Added desiredDependencies --- packages/types-dev/objects.d.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/types-dev/objects.d.ts b/packages/types-dev/objects.d.ts index 69448614f..ce6bc652e 100644 --- a/packages/types-dev/objects.d.ts +++ b/packages/types-dev/objects.d.ts @@ -593,7 +593,7 @@ declare global { }; /** Format for local and global dependencies */ - type Depdendencies = { [adapterName: string]: string }[] | string[]; + type Dependencies = { [adapterName: string]: string }[] | string[]; interface AdapterCommon extends ObjectCommon { /** Custom attributes to be shown in admin in the object browser */ @@ -635,9 +635,11 @@ declare global { /** How the adapter will mainly receive its data. Set this together with @see connectionType */ dataSource?: 'poll' | 'push' | 'assumption'; /** A record of ioBroker adapters (including "js-controller") and version ranges which are required for this adapter on the same host. */ - dependencies?: Depdendencies; + dependencies?: Dependencies; /** A record of ioBroker adapters (including "js-controller") and version ranges which are required for this adapter in the whole system. */ - globalDependencies?: Depdendencies; + globalDependencies?: Dependencies; + /** Similar to `dependencies`, but only checked if the specified adapter is already installed. If the adapter is not installed, the version check will pass */ + desiredDependencies?: Dependencies; /** Which files outside the README.md have documentation for the adapter */ docs?: Partial>; /** Whether new instances should be enabled by default. *Should* be `false`! */ @@ -797,7 +799,7 @@ declare global { ignoreVersion?: string; /** Sentry and other plugins */ plugins?: { [pluginName: string]: Record }; - /** Rules blocks for Javascript rules */ + /** Rules blocks for JavaScript rules */ javascriptRules?: { /** Translations */ i18n?: boolean | Record> | Record; From 1c7062f994d6b6c6a62d877ec72828989e5ab49b Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Thu, 23 Jan 2025 18:23:42 +0000 Subject: [PATCH 2/8] Changed desiredDependencies --- packages/types-dev/objects.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/types-dev/objects.d.ts b/packages/types-dev/objects.d.ts index ce6bc652e..f57b6020f 100644 --- a/packages/types-dev/objects.d.ts +++ b/packages/types-dev/objects.d.ts @@ -639,7 +639,7 @@ declare global { /** A record of ioBroker adapters (including "js-controller") and version ranges which are required for this adapter in the whole system. */ globalDependencies?: Dependencies; /** Similar to `dependencies`, but only checked if the specified adapter is already installed. If the adapter is not installed, the version check will pass */ - desiredDependencies?: Dependencies; + desiredDependencies?: { [adapterName: string]: string }[]; /** Which files outside the README.md have documentation for the adapter */ docs?: Partial>; /** Whether new instances should be enabled by default. *Should* be `false`! */ From 82b47aa3dba278c9df7b75d882cab07954cd77ef Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Thu, 23 Jan 2025 18:30:58 +0000 Subject: [PATCH 3/8] Changed desiredDependencies to ifInstalledDependencies --- packages/types-dev/objects.d.ts | 2 +- schemas/io-package.json | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/types-dev/objects.d.ts b/packages/types-dev/objects.d.ts index f57b6020f..dc7629d39 100644 --- a/packages/types-dev/objects.d.ts +++ b/packages/types-dev/objects.d.ts @@ -639,7 +639,7 @@ declare global { /** A record of ioBroker adapters (including "js-controller") and version ranges which are required for this adapter in the whole system. */ globalDependencies?: Dependencies; /** Similar to `dependencies`, but only checked if the specified adapter is already installed. If the adapter is not installed, the version check will pass */ - desiredDependencies?: { [adapterName: string]: string }[]; + ifInstalledDependencies?: { [adapterName: string]: string }[]; /** Which files outside the README.md have documentation for the adapter */ docs?: Partial>; /** Whether new instances should be enabled by default. *Should* be `false`! */ diff --git a/schemas/io-package.json b/schemas/io-package.json index 33a064901..04e7ab2bf 100644 --- a/schemas/io-package.json +++ b/schemas/io-package.json @@ -1181,6 +1181,15 @@ ] } }, + "ifInstalledDependencies": { + "description": "Array like [{\"admin\": \">=2.0.0\"}] that describes which ioBroker versions of modules are required for this adapter on one of the hosts, but only if this adapter is installed", + "type": "array", + "items": { + "type": [ + "object" + ] + } + }, "icon": { "description": "name of the local icon (should be located in subdirectory \"admin\")", "type": "string" From 5cb41d930741a079b0d17741cc436740263d9d7b Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Fri, 24 Jan 2025 09:58:22 +0000 Subject: [PATCH 4/8] Changed ifInstalledDependencies to object --- packages/types-dev/objects.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/types-dev/objects.d.ts b/packages/types-dev/objects.d.ts index dc7629d39..280a82613 100644 --- a/packages/types-dev/objects.d.ts +++ b/packages/types-dev/objects.d.ts @@ -639,7 +639,7 @@ declare global { /** A record of ioBroker adapters (including "js-controller") and version ranges which are required for this adapter in the whole system. */ globalDependencies?: Dependencies; /** Similar to `dependencies`, but only checked if the specified adapter is already installed. If the adapter is not installed, the version check will pass */ - ifInstalledDependencies?: { [adapterName: string]: string }[]; + ifInstalledDependencies?: { [adapterName: string]: string }; /** Which files outside the README.md have documentation for the adapter */ docs?: Partial>; /** Whether new instances should be enabled by default. *Should* be `false`! */ From d2e50b130e0fa71b17ab01392a2c2c468fd16126 Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Fri, 24 Jan 2025 10:01:14 +0000 Subject: [PATCH 5/8] Changed ifInstalledDependencies to object --- schemas/io-package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/schemas/io-package.json b/schemas/io-package.json index 04e7ab2bf..9e2baad44 100644 --- a/schemas/io-package.json +++ b/schemas/io-package.json @@ -1183,11 +1183,11 @@ }, "ifInstalledDependencies": { "description": "Array like [{\"admin\": \">=2.0.0\"}] that describes which ioBroker versions of modules are required for this adapter on one of the hosts, but only if this adapter is installed", - "type": "array", - "items": { - "type": [ - "object" - ] + "type": "object", + "patternProperties": { + ".+": { + "type": "string" + } } }, "icon": { From a57c2cd33c507921b20c81cf8f9695bd17d0efe3 Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Fri, 24 Jan 2025 10:01:45 +0000 Subject: [PATCH 6/8] Changed ifInstalledDependencies to object --- schemas/io-package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/io-package.json b/schemas/io-package.json index 9e2baad44..3d340f58a 100644 --- a/schemas/io-package.json +++ b/schemas/io-package.json @@ -1182,7 +1182,7 @@ } }, "ifInstalledDependencies": { - "description": "Array like [{\"admin\": \">=2.0.0\"}] that describes which ioBroker versions of modules are required for this adapter on one of the hosts, but only if this adapter is installed", + "description": "Array like {\"admin\": \">=2.0.0\", \"javascript\": \">=3.0.0\"} that describes which ioBroker versions of modules are required for this adapter on one of the hosts, but only if this adapter is installed", "type": "object", "patternProperties": { ".+": { From 82bb3ac6a963df5689f8885f6828bd577057defd Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Fri, 24 Jan 2025 10:01:58 +0000 Subject: [PATCH 7/8] Changed ifInstalledDependencies to object --- schemas/io-package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/io-package.json b/schemas/io-package.json index 3d340f58a..b7ca67ece 100644 --- a/schemas/io-package.json +++ b/schemas/io-package.json @@ -1182,7 +1182,7 @@ } }, "ifInstalledDependencies": { - "description": "Array like {\"admin\": \">=2.0.0\", \"javascript\": \">=3.0.0\"} that describes which ioBroker versions of modules are required for this adapter on one of the hosts, but only if this adapter is installed", + "description": "Object like {\"admin\": \">=2.0.0\", \"javascript\": \">=3.0.0\"} that describes which ioBroker versions of modules are required for this adapter on one of the hosts, but only if this adapter is installed", "type": "object", "patternProperties": { ".+": { From 41ce9915241428d0f464eb09d0e9a7a103202921 Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Fri, 24 Jan 2025 10:11:02 +0000 Subject: [PATCH 8/8] Changed comment --- schemas/io-package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/io-package.json b/schemas/io-package.json index b7ca67ece..c71373ba7 100644 --- a/schemas/io-package.json +++ b/schemas/io-package.json @@ -1182,7 +1182,7 @@ } }, "ifInstalledDependencies": { - "description": "Object like {\"admin\": \">=2.0.0\", \"javascript\": \">=3.0.0\"} that describes which ioBroker versions of modules are required for this adapter on one of the hosts, but only if this adapter is installed", + "description": "Object like {\"admin\": \">=2.0.0\", \"javascript\": \">=3.0.0\"} that describes which versions of ioBroker modules are required for this adapter on one of the hosts, but only if this adapter is installed", "type": "object", "patternProperties": { ".+": {