Skip to content

Commit 1b17302

Browse files
committed
feat(new tool): Docker Compose Converter
- Convert Docker Compose files between V1, 2.x, 3.x and CommonSpec - Expand Ports and Volumes syntaxes
1 parent 22e836b commit 1b17302

File tree

7 files changed

+246
-37
lines changed

7 files changed

+246
-37
lines changed

components.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ declare module '@vue/runtime-core' {
6969
DemoWrapper: typeof import('./src/ui/demo/demo-wrapper.vue')['default']
7070
DeviceInformation: typeof import('./src/tools/device-information/device-information.vue')['default']
7171
DiffViewer: typeof import('./src/tools/json-diff/diff-viewer/diff-viewer.vue')['default']
72+
DockerComposeConverter: typeof import('./src/tools/docker-compose-converter/docker-compose-converter.vue')['default']
7273
DockerRunToDockerComposeConverter: typeof import('./src/tools/docker-run-to-docker-compose-converter/docker-run-to-docker-compose-converter.vue')['default']
7374
DynamicValues: typeof import('./src/tools/benchmark-builder/dynamic-values.vue')['default']
7475
Editor: typeof import('./src/tools/html-wysiwyg-editor/editor/editor.vue')['default']

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"change-case": "^4.1.2",
5252
"colord": "^2.9.3",
5353
"composerize-ts": "^0.6.2",
54+
"composeverter": "^1.6.2",
5455
"country-code-lookup": "^0.1.0",
5556
"cron-validator": "^1.3.1",
5657
"cronstrue": "^2.26.0",

pnpm-lock.yaml

Lines changed: 67 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
declare module 'composeverter' {
2+
interface Configuration {
3+
expandVolumes?: boolean;
4+
expandPorts?: boolean;
5+
indent?: number;
6+
}
7+
interface DockerComposeValidatioError {
8+
line?: number;
9+
message: string;
10+
helpLink?: string;
11+
}
12+
export function validateDockerComposeToCommonSpec(content: string): DockerComposeValidatioError[];
13+
export function migrateFromV2xToV3x(content: string, configuration?: Configuration = null): string;
14+
export function migrateFromV3xToV2x(content: string, configuration?: Configuration = null): string;
15+
export function migrateFromV1ToV2x(content: string, configuration?: Configuration = null): string;
16+
export function migrateToCommonSpec(content: string, configuration?: Configuration = null): string;
17+
export function migrateFromV2xToV3x(content: string, configuration?: Configuration = null): string;
18+
export function getDockerComposeSchemaWithoutFormats(): object;
19+
}

0 commit comments

Comments
 (0)