@yt-kit/core 0.2.0 → 0.2.1
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/package.json +1 -1
- package/src/index.ts +4 -4
- package/src/lib/spawnAsync.ts +2 -2
- package/src/tasks/download/downloadVideo.ts +3 -3
- package/src/types/processTypes.ts +1 -1
- package/src/types/videoTypes.ts +1 -1
- package/src/yt-dlp-downloader/YtDlpDownloader.ts +3 -3
- package/tsconfig.json +4 -1
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Funcionalidades del programa
|
|
2
|
-
export * from '
|
|
2
|
+
export * from '@core/tasks/download/downloadVideo'
|
|
3
3
|
|
|
4
4
|
// Tipos
|
|
5
|
-
export * from '
|
|
6
|
-
export * from '
|
|
5
|
+
export * from '@core/types/videoTypes'
|
|
6
|
+
export * from '@core/types/processTypes'
|
|
7
7
|
|
|
8
8
|
// Constantes públicas (seguras de exportar)
|
|
9
|
-
export { STANDARD_RESOLUTIONS } from '
|
|
9
|
+
export { STANDARD_RESOLUTIONS } from '@core/lib/constants'
|
package/src/lib/spawnAsync.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process'
|
|
2
|
-
import type { CommandKey } from '
|
|
3
|
-
import { COMMANDS } from '
|
|
2
|
+
import type { CommandKey } from '@core/types/processTypes'
|
|
3
|
+
import { COMMANDS } from '@core/lib/constants'
|
|
4
4
|
|
|
5
5
|
export function spawnAsync (command: CommandKey, args: string[], showOutput?: boolean) {
|
|
6
6
|
const _command = COMMANDS[command]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// import { spawnAsync } from 'src/core/lib/spawnAsync'
|
|
2
|
-
import type { DownloadOptions } from '
|
|
3
|
-
import { formYoutubeUrl } from '
|
|
4
|
-
import { YtDlpDownloader } from '
|
|
2
|
+
import type { DownloadOptions } from '@core/interfaces/Downloader'
|
|
3
|
+
import { formYoutubeUrl } from '@core/lib/ytUtils'
|
|
4
|
+
import { YtDlpDownloader } from '@core/yt-dlp-downloader/YtDlpDownloader'
|
|
5
5
|
|
|
6
6
|
export async function downloadVideo (ytId: string, id: string) {
|
|
7
7
|
if (!ytId || !id) return
|
package/src/types/videoTypes.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Downloader, DownloadOptions, DownloadResult } from '
|
|
2
|
-
import { RUTAS } from '
|
|
3
|
-
import { spawnAsync } from '
|
|
1
|
+
import type { Downloader, DownloadOptions, DownloadResult } from '@core/interfaces/Downloader'
|
|
2
|
+
import { RUTAS } from '@core/lib/constants'
|
|
3
|
+
import { spawnAsync } from '@core/lib/spawnAsync'
|
|
4
4
|
|
|
5
5
|
export class YtDlpDownloader implements Downloader {
|
|
6
6
|
async download (url: string, options: DownloadOptions): Promise<DownloadResult> {
|