Skip to content

Commit

Permalink
feat(stac-catalog): pretty print the Catalog output file (#446)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfouquet authored May 15, 2023
1 parent 95280ca commit 40c0201
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/commands/stac-catalog/stac.catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ export const commandStacCatalog = command({

handler: async (args) => {
registerCli(args);

logger.info('StacCatalogCreation:Start');

const catalog = await fsa.readJson<st.StacCatalog>(args.template);
if (catalog.stac_extensions == null) catalog.stac_extensions = [];
// Add the file extension for "file:checksum" the links
Expand All @@ -70,7 +68,7 @@ export const commandStacCatalog = command({

catalog.links = await createLinks(args.path, catalog.links);

await fsa.write(args.output, JSON.stringify(catalog));
await fsa.write(args.output, JSON.stringify(catalog, null, 2));
logger.info(
{ catalogId: catalog.id, collections: catalog.links.length - templateLinkCount },
'StacCatalogCreation:Done',
Expand Down

0 comments on commit 40c0201

Please sign in to comment.