tokwatchr 0.6.0 → 0.6.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/dist/index.mjs +4 -4
- package/package.json +1 -1
- package/src/TikTokLiveDownloader.ts +2 -2
- package/src/errors.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -31,7 +31,7 @@ var TikTokLiveError = class extends Error {
|
|
|
31
31
|
var UserOfflineError = class extends TikTokLiveError {
|
|
32
32
|
name = "UserOfflineError";
|
|
33
33
|
constructor(username) {
|
|
34
|
-
super(`User "${username}" is not currently live`);
|
|
34
|
+
super(`User "${username}" is not currently live (or does not exist)`);
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
var UserNotFoundError = class extends TikTokLiveError {
|
|
@@ -43,7 +43,7 @@ var UserNotFoundError = class extends TikTokLiveError {
|
|
|
43
43
|
var RoomResolveError = class extends TikTokLiveError {
|
|
44
44
|
name = "RoomResolveError";
|
|
45
45
|
constructor(username, cause) {
|
|
46
|
-
super(`Failed to resolve room ID for "${username}"${cause ? `: ${cause}` : ""}`);
|
|
46
|
+
super(`Failed to resolve room ID for "${username}" — may not exist or be offline${cause ? `: ${cause}` : ""}`);
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
var StreamFetchError = class extends TikTokLiveError {
|
|
@@ -658,7 +658,7 @@ var TikTokLiveDownloader = class {
|
|
|
658
658
|
this.impIt = createClient({
|
|
659
659
|
browser: this.options.browser,
|
|
660
660
|
proxyUrl: this.options.proxyUrl,
|
|
661
|
-
timeout: this.options.timeout,
|
|
661
|
+
timeout: this.options.timeout * 1e3,
|
|
662
662
|
headers: this.options.headers,
|
|
663
663
|
cookieJar: this.options.cookieJar
|
|
664
664
|
});
|
|
@@ -930,7 +930,7 @@ var TikTokLiveDownloader = class {
|
|
|
930
930
|
signal: this.abortController.signal,
|
|
931
931
|
onProgress,
|
|
932
932
|
maxDuration: segmentMaxDuration < Infinity ? segmentMaxDuration : void 0,
|
|
933
|
-
timeout: this.options.timeout
|
|
933
|
+
timeout: this.options.timeout * 1e3
|
|
934
934
|
});
|
|
935
935
|
return {
|
|
936
936
|
filePath: tsPath,
|
package/package.json
CHANGED
|
@@ -77,7 +77,7 @@ export class TikTokLiveDownloader {
|
|
|
77
77
|
this.impIt = createClient({
|
|
78
78
|
browser: this.options.browser,
|
|
79
79
|
proxyUrl: this.options.proxyUrl,
|
|
80
|
-
timeout: this.options.timeout,
|
|
80
|
+
timeout: this.options.timeout * 1_000,
|
|
81
81
|
headers: this.options.headers,
|
|
82
82
|
cookieJar: this.options.cookieJar,
|
|
83
83
|
});
|
|
@@ -500,7 +500,7 @@ export class TikTokLiveDownloader {
|
|
|
500
500
|
onProgress,
|
|
501
501
|
maxDuration:
|
|
502
502
|
segmentMaxDuration < Infinity ? segmentMaxDuration : undefined,
|
|
503
|
-
timeout: this.options.timeout,
|
|
503
|
+
timeout: this.options.timeout * 1_000,
|
|
504
504
|
});
|
|
505
505
|
|
|
506
506
|
return {
|
package/src/errors.ts
CHANGED
|
@@ -5,7 +5,7 @@ export class TikTokLiveError extends Error {
|
|
|
5
5
|
export class UserOfflineError extends TikTokLiveError {
|
|
6
6
|
override name = "UserOfflineError";
|
|
7
7
|
constructor(username: string) {
|
|
8
|
-
super(`User "${username}" is not currently live`);
|
|
8
|
+
super(`User "${username}" is not currently live (or does not exist)`);
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -20,7 +20,7 @@ export class RoomResolveError extends TikTokLiveError {
|
|
|
20
20
|
override name = "RoomResolveError";
|
|
21
21
|
constructor(username: string, cause?: unknown) {
|
|
22
22
|
super(
|
|
23
|
-
`Failed to resolve room ID for "${username}"${cause ? `: ${cause}` : ""}`,
|
|
23
|
+
`Failed to resolve room ID for "${username}" — may not exist or be offline${cause ? `: ${cause}` : ""}`,
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
26
|
}
|