diff --git a/packages/msar/src/bin/commands/download.ts b/packages/msar/src/bin/commands/download.ts index c6e6a7b..abf4c23 100644 --- a/packages/msar/src/bin/commands/download.ts +++ b/packages/msar/src/bin/commands/download.ts @@ -32,6 +32,11 @@ import * as Snapshot from '../../workflows/Snapshot.js'; const snapshotPath = path.resolve(process.cwd(), snapshotPathArg!); + /* + * TODO abstract as much of bin/download into workflow/Download as possible + * The basic design is that the bin scripts are just UI wrappers around + * real objects, not _part_ of the objects + */ if (!outputPath) { outputPath = path.join( path.dirname(snapshotPath!), @@ -113,6 +118,7 @@ import * as Snapshot from '../../workflows/Snapshot.js'; 'index.json' ); await common.output.writeJSON(indexPath, index, { pretty }); + // TODO output metadata.json of CLI arguments for downloads too if (quit) { await spider.quit(); diff --git a/packages/msar/src/workflows/Download/Downloader/AuthenticatedFetch.ts b/packages/msar/src/workflows/Download/Downloader/AuthenticatedFetch.ts index f9cfb6c..68e04ab 100644 --- a/packages/msar/src/workflows/Download/Downloader/AuthenticatedFetch.ts +++ b/packages/msar/src/workflows/Download/Downloader/AuthenticatedFetch.ts @@ -39,6 +39,7 @@ export class Downloader outputOptions: { outputPath }, ...options }: Options) { + // FIXME AuthenticatedFetch is instantiating headless super(`https://${host}`, options); if (!outputPath) { throw new common.output.OutputError(