mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-05-25 03:44:20 +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 {
|
export interface NetworkInspectInfo extends DockerNetworkInspectInfo {
|
||||||
ConfigOnly: boolean;
|
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 {
|
export interface NetworkConfig {
|
||||||
driver: string;
|
driver: string;
|
||||||
ipam: {
|
ipam: {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import type { LabelObject } from '../../types';
|
import type { LabelObject } from '../../types';
|
||||||
import type { VolumeInspectInfo } from 'dockerode';
|
import type { VolumeInspectInfo } from 'dockerode';
|
||||||
|
export type { ComposeVolumeConfig } from '../../types';
|
||||||
|
|
||||||
export interface VolumeConfig {
|
export interface VolumeConfig {
|
||||||
labels: LabelObject;
|
labels: LabelObject;
|
||||||
@ -7,12 +8,6 @@ export interface VolumeConfig {
|
|||||||
driverOpts: VolumeInspectInfo['Options'];
|
driverOpts: VolumeInspectInfo['Options'];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ComposeVolumeConfig {
|
|
||||||
driver: string;
|
|
||||||
driver_opts: Dictionary<string>;
|
|
||||||
labels: LabelObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Volume {
|
export interface Volume {
|
||||||
name: string;
|
name: string;
|
||||||
appId: number;
|
appId: number;
|
||||||
|
@ -13,10 +13,32 @@ import {
|
|||||||
nonEmptyRecord,
|
nonEmptyRecord,
|
||||||
} from './basic';
|
} from './basic';
|
||||||
|
|
||||||
import type {
|
export interface ComposeVolumeConfig {
|
||||||
ComposeVolumeConfig,
|
driver: string;
|
||||||
ComposeNetworkConfig,
|
driver_opts: Dictionary<string>;
|
||||||
} from '../compose/types';
|
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<{
|
export type DeviceLegacyReport = Partial<{
|
||||||
api_port: number;
|
api_port: number;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user