Came across an issue where the CollectionExporter was a little bit unclear in it's output when running the directus schema-sync import command. When trying to export an empty file, "Failed loading..." is shown many times. But the broken collection is not mentioned.
Replaced this with a check that throws the error "Collection ${this.name} has invalid JSON: ${json}"
Description
Came across an issue where the
CollectionExporter
was a little bit unclear in it's output when running thedirectus schema-sync import
command. When trying to export an empty file, "Failed loading..." is shown many times. But the broken collection is not mentioned.Replaced this with a check that throws the error "
Collection ${this.name} has invalid JSON: ${json}
"