Prefix core module imports with node:

This commit is contained in:
absidue 2021-10-28 19:40:19 +02:00
parent a13e588246
commit 90867b9430
9 changed files with 17 additions and 17 deletions

View File

@ -1,5 +1,5 @@
import tls, { TLSSocket } from 'tls';
import { URL } from 'url';
import tls, { TLSSocket } from 'node:tls';
import { URL } from 'node:url';
interface ProxyOptions extends tls.ConnectionOptions {
method: 'GET';

View File

@ -1,6 +1,6 @@
import http, { ClientRequest, IncomingMessage } from 'http';
import https, { RequestOptions } from 'https';
import { URL } from 'url';
import http, { ClientRequest, IncomingMessage } from 'node:http';
import https, { RequestOptions } from 'node:https';
import { URL } from 'node:url';
import { getCookies, setCookie, uploadCookie } from '../YouTube/utils/cookie';
import { Proxy } from './classes';

View File

@ -1,6 +1,6 @@
import { request, request_stream } from '../Request';
import { Readable } from 'stream';
import { IncomingMessage } from 'http';
import { Readable } from 'node:stream';
import { IncomingMessage } from 'node:http';
import { StreamType } from '../YouTube/stream';
import { Timer } from '../YouTube/classes/LiveStream';

View File

@ -1,4 +1,4 @@
import fs from 'fs';
import fs from 'node:fs';
import { StreamType } from '../YouTube/stream';
import { request } from '../Request';
import { SoundCloudPlaylist, SoundCloudTrack, SoundCloudTrackFormat, Stream } from './classes';

View File

@ -1,6 +1,6 @@
import { request } from '../Request';
import { SpotifyAlbum, SpotifyPlaylist, SpotifyTrack } from './classes';
import fs from 'fs';
import fs from 'node:fs';
let spotifyData: SpotifyDataOptions;
if (fs.existsSync('.data/spotify.data')) {

View File

@ -1,5 +1,5 @@
import { Readable } from 'stream';
import { IncomingMessage } from 'http';
import { Readable } from 'node:stream';
import { IncomingMessage } from 'node:http';
import { parseAudioFormats, StreamOptions, StreamType } from '../stream';
import { ProxyOptions as Proxy, request, request_stream } from '../../Request';
import { video_info } from '..';

View File

@ -1,6 +1,6 @@
import { URL } from 'url';
import { URL } from 'node:url';
import { request } from './../../Request';
import querystring from 'querystring';
import querystring from 'node:querystring';
interface formatOptions {
url?: string;

View File

@ -1,4 +1,4 @@
import fs from 'fs';
import fs from 'node:fs';
let youtubeData: youtubeDataOptions;
if (fs.existsSync('.data/youtube.data')) {

View File

@ -29,8 +29,8 @@ interface SearchOptions {
};
}
import readline from 'readline';
import fs from 'fs';
import readline from 'node:readline';
import fs from 'node:fs';
import {
sp_validate,
yt_validate,
@ -46,7 +46,7 @@ import { check_id, so_search, stream as so_stream, stream_from_info as so_stream
import { InfoData, stream as yt_stream, StreamOptions, stream_from_info as yt_stream_info } from './YouTube/stream';
import { SoundCloudTrack } from './SoundCloud/classes';
import { yt_search } from './YouTube/search';
import { EventEmitter } from 'stream';
import { EventEmitter } from 'node:stream';
/**
* Main stream Command for streaming through various sources