Commit Graph
4 Commits
Author SHA1 Message Date
Hector Ventura 0c4dc28d96 fix(config): report a self-referencing alias instead of overflowing the stack in config validate
A recursive alias is a collection that contains itself. The reader now stops at 64 levels of nesting and reports the file, so the command still prints its validation report.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 10:27:18 -05:00
Hector Ventura bdaade5f8f fix(config): bound alias expansion and read Compose scalars as YAML 1.2 in config validate
A few nested aliases can describe millions of values; the reader now stops at 100000 and reports the file instead of using up memory. Only true and false are booleans, so a service named on, off, yes or no keeps its name.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 10:17:27 -05:00
Hector Ventura 70df2b1020 fix(config): accept Compose files that use YAML anchors and merge keys in config validate
config validate read the file without resolving anchors, aliases or merge keys, so a service built from an anchor looked empty and a valid file got two errors and exit 1. The file is now read with its anchors resolved, the way Compose reads it. snakeyaml was already on the classpath through Jackson's YAML module and is now declared, since it is used directly.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 09:49:07 -05:00
Hector Ventura 6b06382516 feat(config): validate Compose files by their structure, with -o json and three more checks (#61)
* feat(config): validate Compose files by their structure, with -o json and three more checks

config validate now parses the Compose file and checks the emulator's own service: any host port mapped to the emulator port is accepted (5566:4566 was rejected), -o json and -o yaml report the findings, and it flags a read-only or file-bound data volume, a data volume without persistent storage mode (and the reverse), and an image tag older than the supported minimum.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* feat(config): check the socket target, TCP mappings and bind types, and report unparsable files as JSON

The socket has to land at /var/run/docker.sock in the container, a UDP mapping no longer counts, a long-form bind with a bare name is checked as a path, an env_file makes the storage mode unknown, and a file that cannot be parsed still gets a structured report.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 09:01:14 -05:00