mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-19 05:37:53 +00:00
Move Compose(Network|Volume)Config to top level types
This reduces dependencies from 80 to 47 Change-type: patch
This commit is contained in:
parent
234e0de075
commit
bef5e78440
@ -8,27 +8,9 @@ import type {
|
||||
export interface NetworkInspectInfo extends DockerNetworkInspectInfo {
|
||||
ConfigOnly: boolean;
|
||||
}
|
||||
import type { ComposeNetworkConfig } from '../../types';
|
||||
export type { ComposeNetworkConfig } from '../../types';
|
||||
|
||||
export interface ComposeNetworkConfig {
|
||||
driver: string;
|
||||
driver_opts: Dictionary<string>;
|
||||
ipam: {
|
||||
driver: string;
|
||||
config: Array<
|
||||
Partial<{
|
||||
subnet: string;
|
||||
ip_range: string;
|
||||
gateway: string;
|
||||
aux_addresses: Dictionary<string>;
|
||||
}>
|
||||
>;
|
||||
options: Dictionary<string>;
|
||||
};
|
||||
enable_ipv6: boolean;
|
||||
internal: boolean;
|
||||
labels: Dictionary<string>;
|
||||
config_only: boolean;
|
||||
}
|
||||
export interface NetworkConfig {
|
||||
driver: string;
|
||||
ipam: {
|
||||
|
@ -1,5 +1,6 @@
|
||||
import type { LabelObject } from '../../types';
|
||||
import type { VolumeInspectInfo } from 'dockerode';
|
||||
export type { ComposeVolumeConfig } from '../../types';
|
||||
|
||||
export interface VolumeConfig {
|
||||
labels: LabelObject;
|
||||
@ -7,12 +8,6 @@ export interface VolumeConfig {
|
||||
driverOpts: VolumeInspectInfo['Options'];
|
||||
}
|
||||
|
||||
export interface ComposeVolumeConfig {
|
||||
driver: string;
|
||||
driver_opts: Dictionary<string>;
|
||||
labels: LabelObject;
|
||||
}
|
||||
|
||||
export interface Volume {
|
||||
name: string;
|
||||
appId: number;
|
||||
|
@ -13,10 +13,32 @@ import {
|
||||
nonEmptyRecord,
|
||||
} from './basic';
|
||||
|
||||
import type {
|
||||
ComposeVolumeConfig,
|
||||
ComposeNetworkConfig,
|
||||
} from '../compose/types';
|
||||
export interface ComposeVolumeConfig {
|
||||
driver: string;
|
||||
driver_opts: Dictionary<string>;
|
||||
labels: LabelObject;
|
||||
}
|
||||
|
||||
export interface ComposeNetworkConfig {
|
||||
driver: string;
|
||||
driver_opts: Dictionary<string>;
|
||||
ipam: {
|
||||
driver: string;
|
||||
config: Array<
|
||||
Partial<{
|
||||
subnet: string;
|
||||
ip_range: string;
|
||||
gateway: string;
|
||||
aux_addresses: Dictionary<string>;
|
||||
}>
|
||||
>;
|
||||
options: Dictionary<string>;
|
||||
};
|
||||
enable_ipv6: boolean;
|
||||
internal: boolean;
|
||||
labels: Dictionary<string>;
|
||||
config_only: boolean;
|
||||
}
|
||||
|
||||
export type DeviceLegacyReport = Partial<{
|
||||
api_port: number;
|
||||
|
Loading…
Reference in New Issue
Block a user