@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yt-kit/core",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/index.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  // Funcionalidades del programa
2
- export * from './tasks/download/downloadVideo'
2
+ export * from '@core/tasks/download/downloadVideo'
3
3
 
4
4
  // Tipos
5
- export * from './types/videoTypes'
6
- export * from './types/processTypes'
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 './lib/constants'
9
+ export { STANDARD_RESOLUTIONS } from '@core/lib/constants'
@@ -1,6 +1,6 @@
1
1
  import { spawn } from 'node:child_process'
2
- import type { CommandKey } from '../types/processTypes'
3
- import { COMMANDS } from './constants'
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 'src/interfaces/Downloader'
3
- import { formYoutubeUrl } from 'src/lib/ytUtils'
4
- import { YtDlpDownloader } from 'src/yt-dlp-downloader/YtDlpDownloader'
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
@@ -1,4 +1,4 @@
1
- import type { COMMANDS } from '../lib/constants'
1
+ import type { COMMANDS } from '@core/lib/constants'
2
2
 
3
3
  export type CommandKey = keyof typeof COMMANDS
4
4
  export type Command = typeof COMMANDS[keyof typeof COMMANDS]
@@ -1,4 +1,4 @@
1
- import type { STANDARD_RESOLUTIONS } from '../lib/constants'
1
+ import type { STANDARD_RESOLUTIONS } from '@core/lib/constants'
2
2
 
3
3
  export type Height = typeof STANDARD_RESOLUTIONS[number]
4
4
  export type Resolution = `${Height}p`
@@ -1,6 +1,6 @@
1
- import type { Downloader, DownloadOptions, DownloadResult } from '../interfaces/Downloader'
2
- import { RUTAS } from '../lib/constants'
3
- import { spawnAsync } from '../lib/spawnAsync'
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> {
package/tsconfig.json CHANGED
@@ -14,6 +14,9 @@
14
14
 
15
15
  "esModuleInterop": true,
16
16
  "resolveJsonModule": true,
17
- "baseUrl": "."
17
+ "baseUrl": ".",
18
+ "paths": {
19
+ "@core/*": ["src/*"]
20
+ }
18
21
  }
19
22
  }