@qodestack/dl-yt-playlist
Advanced tools
Comparing version 8.0.0 to 8.1.0
@@ -5,3 +5,3 @@ // Generated by dts-bundle-generator v9.5.1 | ||
import { GaxiosResponse } from 'googleapis-common'; | ||
import { BaseIssue, InferIssue } from 'valibot'; | ||
import { BaseIssue, InferInput, InferIssue } from 'valibot'; | ||
@@ -66,36 +66,37 @@ declare const PlaylistItemSchema: import("valibot").ObjectSchema<{ | ||
}, undefined>; | ||
export type Video = { | ||
declare const VideoSchema: import("valibot").ObjectSchema<{ | ||
/** listApi.snippet.resourceId.videoId */ | ||
id: string; | ||
readonly id: import("valibot").StringSchema<undefined>; | ||
/** listApi.id */ | ||
playlistItemId: string; | ||
readonly playlistItemId: import("valibot").StringSchema<undefined>; | ||
/** listApi.snippet.title */ | ||
title: string; | ||
readonly title: import("valibot").StringSchema<undefined>; | ||
/** listApi.snippet.description */ | ||
description: string; | ||
readonly description: import("valibot").StringSchema<undefined>; | ||
/** listApi.snippet.videoOwnerChannelId */ | ||
channelId: string; | ||
readonly channelId: import("valibot").StringSchema<undefined>; | ||
/** listApi.snippet.videoOwnerChannelTitle */ | ||
channelName: string; | ||
readonly channelName: import("valibot").StringSchema<undefined>; | ||
/** listApi.contentDetails.videoPublishedAt */ | ||
dateCreated: string; | ||
readonly dateCreated: import("valibot").StringSchema<undefined>; | ||
/** listApi.snippet.publishedAt */ | ||
dateAddedToPlaylist: string; | ||
readonly dateAddedToPlaylist: import("valibot").StringSchema<undefined>; | ||
/** listApi.snippet.thumbnails[maxres | standard | high | medium | default].url */ | ||
thumbnailUrls: string[]; | ||
readonly thumbnailUrls: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>; | ||
/** videosApi.contentDetails.duration */ | ||
durationInSeconds: number; | ||
readonly durationInSeconds: import("valibot").NumberSchema<undefined>; | ||
/** Constructed from `id` - URL to the video */ | ||
url: string; | ||
readonly url: import("valibot").StringSchema<undefined>; | ||
/** Constructed from `channelId` - URL to the video owner's channel */ | ||
channelUrl: string | null; | ||
readonly channelUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, never>; | ||
/** Derived from yt-dlp */ | ||
audioFileExtension: string | null; | ||
readonly audioFileExtension: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, never>; | ||
/** Derived from yt-dlp */ | ||
videoFileExtension: string | null; | ||
readonly videoFileExtension: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, never>; | ||
/** Derived from the listApi missing certain fields */ | ||
isUnavailable: boolean; | ||
readonly isUnavailable: import("valibot").BooleanSchema<undefined>; | ||
/** LUFS value, as calculated by ffmpeg */ | ||
lufs: number | null; | ||
}; | ||
readonly lufs: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, never>; | ||
}, undefined>; | ||
export type Video = InferInput<typeof VideoSchema>; | ||
export type Failure = { | ||
@@ -102,0 +103,0 @@ date: number; |
// @bun | ||
// src/schemas.ts | ||
import { object, string, number, optional, array, minLength, pipe } from "valibot"; | ||
import { | ||
object, | ||
string, | ||
number, | ||
optional, | ||
array, | ||
minLength, | ||
pipe, | ||
nullable, | ||
boolean | ||
} from "valibot"; | ||
var PlaylistItemSchema = object({ | ||
@@ -47,2 +57,20 @@ id: string(), | ||
}); | ||
var VideoSchema = object({ | ||
id: string(), | ||
playlistItemId: string(), | ||
title: string(), | ||
description: string(), | ||
channelId: string(), | ||
channelName: string(), | ||
dateCreated: string(), | ||
dateAddedToPlaylist: string(), | ||
thumbnailUrls: array(string()), | ||
durationInSeconds: number(), | ||
url: string(), | ||
channelUrl: nullable(string()), | ||
audioFileExtension: nullable(string()), | ||
videoFileExtension: nullable(string()), | ||
isUnavailable: boolean(), | ||
lufs: nullable(number()) | ||
}); | ||
@@ -49,0 +77,0 @@ // src/main.ts |
@@ -77,3 +77,37 @@ // Generated by dts-bundle-generator v9.5.1 | ||
}, undefined>; | ||
export declare const VideoSchema: import("valibot").ObjectSchema<{ | ||
/** listApi.snippet.resourceId.videoId */ | ||
readonly id: import("valibot").StringSchema<undefined>; | ||
/** listApi.id */ | ||
readonly playlistItemId: import("valibot").StringSchema<undefined>; | ||
/** listApi.snippet.title */ | ||
readonly title: import("valibot").StringSchema<undefined>; | ||
/** listApi.snippet.description */ | ||
readonly description: import("valibot").StringSchema<undefined>; | ||
/** listApi.snippet.videoOwnerChannelId */ | ||
readonly channelId: import("valibot").StringSchema<undefined>; | ||
/** listApi.snippet.videoOwnerChannelTitle */ | ||
readonly channelName: import("valibot").StringSchema<undefined>; | ||
/** listApi.contentDetails.videoPublishedAt */ | ||
readonly dateCreated: import("valibot").StringSchema<undefined>; | ||
/** listApi.snippet.publishedAt */ | ||
readonly dateAddedToPlaylist: import("valibot").StringSchema<undefined>; | ||
/** listApi.snippet.thumbnails[maxres | standard | high | medium | default].url */ | ||
readonly thumbnailUrls: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>; | ||
/** videosApi.contentDetails.duration */ | ||
readonly durationInSeconds: import("valibot").NumberSchema<undefined>; | ||
/** Constructed from `id` - URL to the video */ | ||
readonly url: import("valibot").StringSchema<undefined>; | ||
/** Constructed from `channelId` - URL to the video owner's channel */ | ||
readonly channelUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, never>; | ||
/** Derived from yt-dlp */ | ||
readonly audioFileExtension: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, never>; | ||
/** Derived from yt-dlp */ | ||
readonly videoFileExtension: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, never>; | ||
/** Derived from the listApi missing certain fields */ | ||
readonly isUnavailable: import("valibot").BooleanSchema<undefined>; | ||
/** LUFS value, as calculated by ffmpeg */ | ||
readonly lufs: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, never>; | ||
}, undefined>; | ||
export {}; |
// @bun | ||
// src/schemas.ts | ||
import { object, string, number, optional, array, minLength, pipe } from "valibot"; | ||
import { | ||
object, | ||
string, | ||
number, | ||
optional, | ||
array, | ||
minLength, | ||
pipe, | ||
nullable, | ||
boolean | ||
} from "valibot"; | ||
var PlaylistItemSchema = object({ | ||
@@ -47,6 +57,25 @@ id: string(), | ||
}); | ||
var VideoSchema = object({ | ||
id: string(), | ||
playlistItemId: string(), | ||
title: string(), | ||
description: string(), | ||
channelId: string(), | ||
channelName: string(), | ||
dateCreated: string(), | ||
dateAddedToPlaylist: string(), | ||
thumbnailUrls: array(string()), | ||
durationInSeconds: number(), | ||
url: string(), | ||
channelUrl: nullable(string()), | ||
audioFileExtension: nullable(string()), | ||
videoFileExtension: nullable(string()), | ||
isUnavailable: boolean(), | ||
lufs: nullable(number()) | ||
}); | ||
export { | ||
YtDlpJsonSchema, | ||
VideosListItemSchema, | ||
VideoSchema, | ||
PlaylistItemSchema | ||
}; |
@@ -6,3 +6,3 @@ { | ||
"type": "module", | ||
"version": "8.0.0", | ||
"version": "8.1.0", | ||
"exports": { | ||
@@ -9,0 +9,0 @@ ".": { |
@@ -1,2 +0,12 @@ | ||
import {object, string, number, optional, array, minLength, pipe} from 'valibot' | ||
import { | ||
object, | ||
string, | ||
number, | ||
optional, | ||
array, | ||
minLength, | ||
pipe, | ||
nullable, | ||
boolean, | ||
} from 'valibot' | ||
@@ -71,1 +81,50 @@ /** | ||
}) | ||
export const VideoSchema = object({ | ||
/** listApi.snippet.resourceId.videoId */ | ||
id: string(), | ||
/** listApi.id */ | ||
playlistItemId: string(), | ||
/** listApi.snippet.title */ | ||
title: string(), | ||
/** listApi.snippet.description */ | ||
description: string(), | ||
/** listApi.snippet.videoOwnerChannelId */ | ||
channelId: string(), | ||
/** listApi.snippet.videoOwnerChannelTitle */ | ||
channelName: string(), | ||
/** listApi.contentDetails.videoPublishedAt */ | ||
dateCreated: string(), | ||
/** listApi.snippet.publishedAt */ | ||
dateAddedToPlaylist: string(), | ||
/** listApi.snippet.thumbnails[maxres | standard | high | medium | default].url */ | ||
thumbnailUrls: array(string()), | ||
/** videosApi.contentDetails.duration */ | ||
durationInSeconds: number(), | ||
/** Constructed from `id` - URL to the video */ | ||
url: string(), | ||
/** Constructed from `channelId` - URL to the video owner's channel */ | ||
channelUrl: nullable(string()), | ||
/** Derived from yt-dlp */ | ||
audioFileExtension: nullable(string()), | ||
/** Derived from yt-dlp */ | ||
videoFileExtension: nullable(string()), | ||
/** Derived from the listApi missing certain fields */ | ||
isUnavailable: boolean(), | ||
/** LUFS value, as calculated by ffmpeg */ | ||
lufs: nullable(number()), | ||
}) |
import type {youtube_v3} from '@googleapis/youtube' | ||
import type {GaxiosResponse} from 'googleapis-common' | ||
import {InferIssue} from 'valibot' | ||
import {InferInput, InferIssue} from 'valibot' | ||
import { | ||
PlaylistItemSchema, | ||
VideoSchema, | ||
VideosListItemSchema, | ||
@@ -12,36 +13,3 @@ YtDlpJsonSchema, | ||
export type Video = { | ||
/** listApi.snippet.resourceId.videoId */ | ||
id: string | ||
/** listApi.id */ | ||
playlistItemId: string | ||
/** listApi.snippet.title */ | ||
title: string | ||
/** listApi.snippet.description */ | ||
description: string | ||
/** listApi.snippet.videoOwnerChannelId */ | ||
channelId: string | ||
/** listApi.snippet.videoOwnerChannelTitle */ | ||
channelName: string | ||
/** listApi.contentDetails.videoPublishedAt */ | ||
dateCreated: string | ||
/** listApi.snippet.publishedAt */ | ||
dateAddedToPlaylist: string | ||
/** listApi.snippet.thumbnails[maxres | standard | high | medium | default].url */ | ||
thumbnailUrls: string[] | ||
/** videosApi.contentDetails.duration */ | ||
durationInSeconds: number | ||
/** Constructed from `id` - URL to the video */ | ||
url: string | ||
/** Constructed from `channelId` - URL to the video owner's channel */ | ||
channelUrl: string | null | ||
/** Derived from yt-dlp */ | ||
audioFileExtension: string | null | ||
/** Derived from yt-dlp */ | ||
videoFileExtension: string | null | ||
/** Derived from the listApi missing certain fields */ | ||
isUnavailable: boolean | ||
/** LUFS value, as calculated by ffmpeg */ | ||
lufs: number | null | ||
} | ||
export type Video = InferInput<typeof VideoSchema> | ||
@@ -48,0 +16,0 @@ export type PartialVideo = Omit< |
@@ -245,3 +245,3 @@ import fs from 'node:fs' | ||
test.only('unavailable video (title is "Private video" or "Deleted video")', async () => { | ||
test('unavailable video (title is "Private video" or "Deleted video")', async () => { | ||
await genMockYoutubeResponses({ | ||
@@ -248,0 +248,0 @@ deletedIds: ['JKEJBeoEGfk', 'SL22bO3Luw8', 'y6ZeWhBtKVk', 'H4mCs2Mg-dc'], |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
254658
3430
2