Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added desiredDependencies #3011

Merged
merged 8 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions packages/types-dev/objects.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
ifInstalledDependencies?: { [adapterName: string]: string }[];
GermanBluefox marked this conversation as resolved.
Show resolved Hide resolved
/** Which files outside the README.md have documentation for the adapter */
docs?: Partial<Record<Languages, string | string[]>>;
/** Whether new instances should be enabled by default. *Should* be `false`! */
Expand Down Expand Up @@ -797,7 +799,7 @@ declare global {
ignoreVersion?: string;
/** Sentry and other plugins */
plugins?: { [pluginName: string]: Record<string, any> };
/** Rules blocks for Javascript rules */
/** Rules blocks for JavaScript rules */
javascriptRules?: {
/** Translations */
i18n?: boolean | Record<string, Record<ioBroker.Languages, string>> | Record<string, string>;
Expand Down
9 changes: 9 additions & 0 deletions schemas/io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading