coomer-downloader 3.4.1 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env -S node --no-warnings=ExperimentalWarning
2
2
 
3
3
  import process from 'node:process';
4
- import { apiHandler } from './api';
4
+ import { resolveAPI } from './api';
5
5
  import { argumentHander } from './cli/args-handler';
6
6
  import { createReactInk } from './cli/ui';
7
7
  import { useInkStore } from './cli/ui/store';
8
- import { Downloader } from './services/downloader';
8
+ import { Downloader } from './core';
9
9
  import { parseSizeValue } from './utils/filters';
10
10
  import { setGlobalHeaders } from './utils/requests';
11
11
 
@@ -15,7 +15,7 @@ async function run() {
15
15
  const { url, dir, media, include, exclude, minSize, maxSize, skip, removeDupilicates } =
16
16
  argumentHander();
17
17
 
18
- const filelist = await apiHandler(url);
18
+ const filelist = await resolveAPI(url);
19
19
 
20
20
  filelist
21
21
  .setDirPath(dir)
@@ -1,10 +0,0 @@
1
- import { CoomerFile } from '../services/file';
2
- import { CoomerFileList } from '../services/filelist';
3
-
4
- export async function getPlainFileData(url: string): Promise<CoomerFileList> {
5
- const name = url.split('/').pop() as string;
6
- const file = CoomerFile.from({ name, url });
7
- const filelist = new CoomerFileList([file]);
8
- filelist.dirName = '';
9
- return filelist;
10
- }
File without changes
File without changes