bcc-code / directus-schema-sync

The better way to sync your Directus schema and data between environments
Apache License 2.0
110 stars 4 forks source link

Collection exporter issue - throw clearer error #41

Closed StevenMalaihollo closed 4 months ago

StevenMalaihollo commented 4 months ago

Description

image

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}"