patreon-dl 3.3.0 → 3.4.0
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/README.md +39 -3
- package/dist/browse/api/CampaignAPIMixin.d.ts +1 -1
- package/dist/browse/api/ContentAPIMixin.d.ts +1 -1
- package/dist/browse/api/FilterAPIMixin.d.ts +1 -1
- package/dist/browse/api/index.d.ts +6 -7
- package/dist/browse/api/index.js +1 -5
- package/dist/browse/api/index.js.map +1 -1
- package/dist/browse/db/CampaignDBMixin.d.ts +4 -3
- package/dist/browse/db/ContentDBMixin.d.ts +12 -11
- package/dist/browse/db/EnvDBMixin.d.ts +1 -0
- package/dist/browse/db/MediaDBMixin.d.ts +1 -0
- package/dist/browse/db/UserDBMixin.d.ts +1 -0
- package/dist/browse/db/index.d.ts +29 -250
- package/dist/browse/db/index.js +44 -7
- package/dist/browse/db/index.js.map +1 -1
- package/dist/browse/server/WebServer.js +15 -4
- package/dist/browse/server/WebServer.js.map +1 -1
- package/dist/cli/CLIOptions.js +2 -0
- package/dist/cli/CLIOptions.js.map +1 -1
- package/dist/cli/CommandLineParser.js +9 -0
- package/dist/cli/CommandLineParser.js.map +1 -1
- package/dist/cli/ConfigFileParser.js +4 -0
- package/dist/cli/ConfigFileParser.js.map +1 -1
- package/dist/cli/index.js +11 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/downloaders/Downloader.d.ts +3 -1
- package/dist/downloaders/Downloader.js +28 -0
- package/dist/downloaders/Downloader.js.map +1 -1
- package/dist/downloaders/DownloaderOptions.d.ts +4 -1
- package/dist/downloaders/DownloaderOptions.js +5 -0
- package/dist/downloaders/DownloaderOptions.js.map +1 -1
- package/dist/downloaders/PostDownloader.d.ts +1 -1
- package/dist/downloaders/PostDownloader.js +2 -1
- package/dist/downloaders/PostDownloader.js.map +1 -1
- package/dist/downloaders/PostsFetcher.js +17 -2
- package/dist/downloaders/PostsFetcher.js.map +1 -1
- package/dist/downloaders/ProductDownloader.d.ts +1 -1
- package/dist/downloaders/ProductDownloader.js +2 -1
- package/dist/downloaders/ProductDownloader.js.map +1 -1
- package/dist/downloaders/task/FetcherDownloadTask.js +1 -0
- package/dist/downloaders/task/FetcherDownloadTask.js.map +1 -1
- package/dist/downloaders/task/M3U8DownloadTask.d.ts +10 -2
- package/dist/downloaders/task/M3U8DownloadTask.js +87 -12
- package/dist/downloaders/task/M3U8DownloadTask.js.map +1 -1
- package/dist/downloaders/task/YouTubeDownloadTask.js +40 -9
- package/dist/downloaders/task/YouTubeDownloadTask.js.map +1 -1
- package/dist/parsers/PageParser.d.ts +1 -0
- package/dist/parsers/PageParser.js +54 -8
- package/dist/parsers/PageParser.js.map +1 -1
- package/dist/utils/FSHelper.d.ts +5 -0
- package/dist/utils/FSHelper.js +16 -1
- package/dist/utils/FSHelper.js.map +1 -1
- package/dist/utils/Misc.d.ts +8 -0
- package/dist/utils/Misc.js +30 -0
- package/dist/utils/Misc.js.map +1 -1
- package/dist/utils/URLHelper.d.ts +1 -0
- package/dist/utils/URLHelper.js +10 -0
- package/dist/utils/URLHelper.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/yt/InnertubeLoader.d.ts +2 -0
- package/dist/utils/yt/InnertubeLoader.js +90 -2
- package/dist/utils/yt/InnertubeLoader.js.map +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ This repo contains the `patreon-dl` library and its command-line tool. For GUI a
|
|
|
16
16
|
- audio
|
|
17
17
|
- attachments
|
|
18
18
|
- embedded videos
|
|
19
|
-
- YouTube downloader built-in
|
|
19
|
+
- YouTube downloader built-in with configurable max resolution
|
|
20
20
|
- Supports [external downloader](#embedded-videos--links---external-downloader)
|
|
21
21
|
- Save campaign and content info
|
|
22
22
|
- Extensively configurable
|
|
@@ -40,9 +40,29 @@ For information on external downloaders, see the [Embedded videos / links - exte
|
|
|
40
40
|
|
|
41
41
|
Not all video downloads require FFmpeg, but you should have it installed on your system anyway.
|
|
42
42
|
|
|
43
|
-
### Embedded YouTube videos / links
|
|
43
|
+
### Embedded YouTube videos / links
|
|
44
44
|
|
|
45
|
-
`patreon-dl` supports downloading embedded YouTube videos or from embedded YouTube video links.
|
|
45
|
+
`patreon-dl` supports downloading embedded YouTube videos or from embedded YouTube video links.
|
|
46
|
+
|
|
47
|
+
#### Deno dependency
|
|
48
|
+
|
|
49
|
+
The built-in YouTube downloader runs code retrieved from YouTube or Google servers. If [Deno](https://deno.com/) is installed on your system, it will be used to execute this code within a secure, sandboxed environment. Without Deno, the code runs without isolation, increasing the risk of security vulnerabilities such as unauthorized access, data corruption, or malicious behavior. For this reason, installing Deno is strongly recommended.
|
|
50
|
+
|
|
51
|
+
When needed, the downloader will attempt to invoke the `deno` command. If it’s not found, it will default to unsafe execution. If Deno is installed but the `deno` executable isn’t available in your system’s PATH, you can manually specify its location using the `--deno` CLI option or `path.to.deno` config file option:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
// CLI
|
|
55
|
+
$ patreon-dl --deno path/to/deno ...
|
|
56
|
+
|
|
57
|
+
// Config file
|
|
58
|
+
[downloader]
|
|
59
|
+
path.to.deno = "path/to/deno"
|
|
60
|
+
...
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
#### Premium access
|
|
64
|
+
|
|
65
|
+
If you have a YouTube Premium subscription, you can connect `patreon-dl` to your account and download videos at qualities available only to Premium accounts (e.g. '1080p Premium'). For CLI users, you would configure `patreon-dl` as follows:
|
|
46
66
|
|
|
47
67
|
```
|
|
48
68
|
$ patreon-dl --configure-youtube
|
|
@@ -82,6 +102,7 @@ $ patreon-dl [OPTION]... URL
|
|
|
82
102
|
| <code><nobr>--config-file <path></nobr></code> | `-C` | Load [configuration file](#configuration-file) at `<path>` for setting full options |
|
|
83
103
|
| `--cookie <string>` | `-c` | Cookie for accessing patron-only content; [how to obtain cookie](https://github.com/patrickkfkan/patreon-dl/wiki/How-to-obtain-Cookie). |
|
|
84
104
|
| `--ffmpeg <path>` | `-f` | Path to FFmpeg executable |
|
|
105
|
+
| `--deno <path>` | `-d` | Path to Deno executable |
|
|
85
106
|
| `--out-dir <path>` |`-o` | Directory to save content |
|
|
86
107
|
| `--log-level <level>` | `-l` | Log level of the console logger: `info`, `debug`, `warn` or `error`; set to `none` to disable the logger. |
|
|
87
108
|
| `--no-prompt` | `-y` | Do not prompt for confirmation to proceed |
|
|
@@ -267,6 +288,21 @@ Note the URL shown in the output. Open this URL in a web browser to begin viewin
|
|
|
267
288
|
|
|
268
289
|
## Changelog
|
|
269
290
|
|
|
291
|
+
v3.4.0
|
|
292
|
+
- Fix "no posts found" on "cw" pages ([patreon-dl-gui#30](https://github.com/patrickkfkan/patreon-dl-gui/issues/30))
|
|
293
|
+
- Fix YouTube streams returning 403 error ([patreon-dl-gui#31](https://github.com/patrickkfkan/patreon-dl-gui/issues/31))
|
|
294
|
+
- Add `pathToDeno` / `--deno` / `path.to.deno` option (used by built-in YouTube downloader)
|
|
295
|
+
- Merged PRs:
|
|
296
|
+
- Allow directory to be a symlink ([@piperswe](https://github.com/piperswe) - [#101](https://github.com/patrickkfkan/patreon-dl/pull/101))
|
|
297
|
+
- Add Github actions ([@piperswe](https://github.com/piperswe) - [#102](https://github.com/patrickkfkan/patreon-dl/pull/102))
|
|
298
|
+
- Add `maxVideoResolution` / `max.video.resolution` option to limit video downloads to a maximum resolution (see [example.conf](./example.conf)) ([@eisenbruch](https://github.com/eisenbruch) - [#105](https://github.com/patrickkfkan/patreon-dl/pull/105)) - extended to include site-hosted videos
|
|
299
|
+
|
|
300
|
+
v3.3.1
|
|
301
|
+
- Fix bugs affecting library usage:
|
|
302
|
+
- `DB.getInstance()` returning same instance despite different DB path
|
|
303
|
+
- `API.getInstance()` returning same instance despite different DB instance
|
|
304
|
+
- DB not closed when downloader ends or web server stops
|
|
305
|
+
|
|
270
306
|
v3.3.0
|
|
271
307
|
- Fix:
|
|
272
308
|
- YouTube stream fetching error ([patreon-dl-gui#28](https://github.com/patrickkfkan/patreon-dl-gui/issues/28))
|
|
@@ -11,7 +11,7 @@ export declare function CampaignAPIMixin<TBase extends APIConstructor>(Base: TBa
|
|
|
11
11
|
withCounts?: false;
|
|
12
12
|
}): Campaign | null;
|
|
13
13
|
getCampaign(params: GetCampaignParams): Campaign | CampaignWithCounts | null;
|
|
14
|
-
"__#
|
|
14
|
+
"__#129@#sanitizeCampaign"(campaign: Campaign): void;
|
|
15
15
|
name: string;
|
|
16
16
|
db: import("../db").DBInstance;
|
|
17
17
|
logger?: import("../..").Logger | null;
|
|
@@ -7,7 +7,7 @@ export declare function ContentAPIMixin<TBase extends APIConstructor>(Base: TBas
|
|
|
7
7
|
getPost(id: string): import("../types/Content.js").PostWithComments | null;
|
|
8
8
|
getProduct(id: string): Product | null;
|
|
9
9
|
getPreviousNextContent<T extends ContentType>(content: Post | Product, context: GetContentContext<T>): import("../types/Content.js").GetPreviousNextContentResult<T>;
|
|
10
|
-
"__#
|
|
10
|
+
"__#130@#processPostContentInlineMedia"(post: Post): void;
|
|
11
11
|
name: string;
|
|
12
12
|
db: import("../db").DBInstance;
|
|
13
13
|
logger?: import("../..").Logger | null;
|
|
@@ -3,7 +3,7 @@ import { type FilterData, type MediaFilterSearchParams, type PostFilterSearchPar
|
|
|
3
3
|
export declare function FilterAPIMixin<TBase extends APIConstructor>(Base: TBase): {
|
|
4
4
|
new (...args: any[]): {
|
|
5
5
|
getPostFilterData(campaignId: string): FilterData<PostFilterSearchParams>;
|
|
6
|
-
"__#
|
|
6
|
+
"__#131@#getPostTypeTitle"(postType: string): "Link" | "Audio" | "Image" | "Video" | "Other" | "Text" | "Podcast" | "Poll";
|
|
7
7
|
getProductFilterData(campaignId: string): FilterData<ProductFilterSearchParams>;
|
|
8
8
|
getMediaFilterData(campaignId: string): FilterData<MediaFilterSearchParams>;
|
|
9
9
|
name: string;
|
|
@@ -5,13 +5,12 @@ export type APIConstructor = new (...args: any[]) => APIBase;
|
|
|
5
5
|
export type APIInstance = InstanceType<typeof API>;
|
|
6
6
|
export declare class APIBase {
|
|
7
7
|
name: string;
|
|
8
|
-
protected static instance: APIInstance | null;
|
|
9
8
|
db: DBInstance;
|
|
10
9
|
logger?: Logger | null;
|
|
11
10
|
constructor(db: DBInstance, logger?: Logger | null);
|
|
12
11
|
static getInstance(db: DBInstance, logger?: Logger | null): {
|
|
13
12
|
getPostFilterData(campaignId: string): import("../types/Filter.js").FilterData<import("../types/Filter.js").PostFilterSearchParams>;
|
|
14
|
-
"__#
|
|
13
|
+
"__#131@#getPostTypeTitle"(postType: string): "Link" | "Audio" | "Image" | "Video" | "Other" | "Text" | "Podcast" | "Poll";
|
|
15
14
|
getProductFilterData(campaignId: string): import("../types/Filter.js").FilterData<import("../types/Filter.js").ProductFilterSearchParams>;
|
|
16
15
|
getMediaFilterData(campaignId: string): import("../types/Filter.js").FilterData<import("../types/Filter.js").MediaFilterSearchParams>;
|
|
17
16
|
name: string;
|
|
@@ -44,7 +43,7 @@ export declare class APIBase {
|
|
|
44
43
|
getPost(id: string): import("../types/Content.js").PostWithComments | null;
|
|
45
44
|
getProduct(id: string): import("../../index.js").Product | null;
|
|
46
45
|
getPreviousNextContent<T extends import("../types/Content.js").ContentType>(content: import("../../index.js").Post | import("../../index.js").Product, context: import("../types/Content.js").GetContentContext<T>): import("../types/Content.js").GetPreviousNextContentResult<T>;
|
|
47
|
-
"__#
|
|
46
|
+
"__#130@#processPostContentInlineMedia"(post: import("../../index.js").Post): void;
|
|
48
47
|
name: string;
|
|
49
48
|
db: DBInstance;
|
|
50
49
|
logger?: Logger | null;
|
|
@@ -59,7 +58,7 @@ export declare class APIBase {
|
|
|
59
58
|
withCounts?: false;
|
|
60
59
|
}): import("../../index.js").Campaign | null;
|
|
61
60
|
getCampaign(params: import("../types/Campaign.js").GetCampaignParams): import("../../index.js").Campaign | import("../types/Campaign.js").CampaignWithCounts | null;
|
|
62
|
-
"__#
|
|
61
|
+
"__#129@#sanitizeCampaign"(campaign: import("../../index.js").Campaign): void;
|
|
63
62
|
name: string;
|
|
64
63
|
db: DBInstance;
|
|
65
64
|
logger?: Logger | null;
|
|
@@ -72,7 +71,7 @@ export declare class APIBase {
|
|
|
72
71
|
declare const API: {
|
|
73
72
|
new (...args: any[]): {
|
|
74
73
|
getPostFilterData(campaignId: string): import("../types/Filter.js").FilterData<import("../types/Filter.js").PostFilterSearchParams>;
|
|
75
|
-
"__#
|
|
74
|
+
"__#131@#getPostTypeTitle"(postType: string): "Link" | "Audio" | "Image" | "Video" | "Other" | "Text" | "Podcast" | "Poll";
|
|
76
75
|
getProductFilterData(campaignId: string): import("../types/Filter.js").FilterData<import("../types/Filter.js").ProductFilterSearchParams>;
|
|
77
76
|
getMediaFilterData(campaignId: string): import("../types/Filter.js").FilterData<import("../types/Filter.js").MediaFilterSearchParams>;
|
|
78
77
|
name: string;
|
|
@@ -111,7 +110,7 @@ declare const API: {
|
|
|
111
110
|
getPost(id: string): import("../types/Content.js").PostWithComments | null;
|
|
112
111
|
getProduct(id: string): import("../../index.js").Product | null;
|
|
113
112
|
getPreviousNextContent<T extends import("../types/Content.js").ContentType>(content: import("../../index.js").Post | import("../../index.js").Product, context: import("../types/Content.js").GetContentContext<T>): import("../types/Content.js").GetPreviousNextContentResult<T>;
|
|
114
|
-
"__#
|
|
113
|
+
"__#130@#processPostContentInlineMedia"(post: import("../../index.js").Post): void;
|
|
115
114
|
name: string;
|
|
116
115
|
db: DBInstance;
|
|
117
116
|
logger?: Logger | null;
|
|
@@ -128,7 +127,7 @@ declare const API: {
|
|
|
128
127
|
withCounts?: false;
|
|
129
128
|
}): import("../../index.js").Campaign | null;
|
|
130
129
|
getCampaign(params: import("../types/Campaign.js").GetCampaignParams): import("../../index.js").Campaign | import("../types/Campaign.js").CampaignWithCounts | null;
|
|
131
|
-
"__#
|
|
130
|
+
"__#129@#sanitizeCampaign"(campaign: import("../../index.js").Campaign): void;
|
|
132
131
|
name: string;
|
|
133
132
|
db: DBInstance;
|
|
134
133
|
logger?: Logger | null;
|
package/dist/browse/api/index.js
CHANGED
|
@@ -19,10 +19,7 @@ export class APIBase {
|
|
|
19
19
|
this.logger = logger;
|
|
20
20
|
}
|
|
21
21
|
static getInstance(db, logger) {
|
|
22
|
-
|
|
23
|
-
this.instance = new API(db, logger);
|
|
24
|
-
}
|
|
25
|
-
return this.instance;
|
|
22
|
+
return new API(db, logger);
|
|
26
23
|
}
|
|
27
24
|
sanitizeHTML(html) {
|
|
28
25
|
return _sanitizeHTML(html, SANITIZE_HTML_OPTIONS);
|
|
@@ -35,7 +32,6 @@ export class APIBase {
|
|
|
35
32
|
commonLog(this.logger, level, this.name, ...msg);
|
|
36
33
|
}
|
|
37
34
|
}
|
|
38
|
-
APIBase.instance = null;
|
|
39
35
|
const API = FilterAPIMixin(MediaAPIMixin(SettingsAPIMixin(ContentAPIMixin(CampaignAPIMixin(APIBase)))));
|
|
40
36
|
export default API;
|
|
41
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browse/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAiB,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKrD,MAAM,qBAAqB,GAAG;IAC5B,WAAW,EAAE,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;IAC/D,iBAAiB,EAAE;QACjB,GAAG,aAAa,CAAC,QAAQ,CAAC,iBAAiB;QAC3C,GAAG,EAAE,CAAC,OAAO,CAAC;KACf;CACF,CAAC;AAEF,MAAM,OAAO,OAAO;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browse/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAiB,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKrD,MAAM,qBAAqB,GAAG;IAC5B,WAAW,EAAE,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;IAC/D,iBAAiB,EAAE;QACjB,GAAG,aAAa,CAAC,QAAQ,CAAC,iBAAiB;QAC3C,GAAG,EAAE,CAAC,OAAO,CAAC;KACf;CACF,CAAC;AAEF,MAAM,OAAO,OAAO;IAMlB,YAAY,EAAc,EAAE,MAAsB;QALlD,SAAI,GAAG,KAAK,CAAC;QAMX,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,EAAc,EAAE,MAAsB;QACvD,OAAO,IAAI,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC7B,CAAC;IAED,YAAY,CAAC,IAAY;QACvB,OAAO,aAAa,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;IACpD,CAAC;IAED,GAAG,CAAC,KAAe,EAAE,GAAG,GAAU;QAChC,MAAM,kBAAkB,GAAG,GAAG,CAAC,IAAI,CACjC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,KAAK,IAAI,CAAC,CAAC,OAAO,KAAK,oBAAoB,CAChE,CAAC;QACF,IAAI,kBAAkB,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;QACD,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,GAAG,CAAC,CAAC;IACnD,CAAC;CACF;AAED,MAAM,GAAG,GAAG,cAAc,CAAC,aAAa,CAAC,gBAAgB,CAAC,eAAe,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAExG,eAAe,GAAG,CAAC","sourcesContent":["import _sanitizeHTML from 'sanitize-html';\nimport type Logger from '../../utils/logging/Logger.js';\nimport { commonLog, type LogLevel } from '../../utils/logging/Logger.js';\nimport { CampaignAPIMixin } from './CampaignAPIMixin.js';\nimport { type DBInstance } from '../db';\nimport { ContentAPIMixin } from './ContentAPIMixin.js';\nimport { SettingsAPIMixin } from './SettingsAPIMixin.js';\nimport { MediaAPIMixin } from './MediaAPIMixin.js';\nimport { FilterAPIMixin } from './FilterAPIMixin.js';\n\nexport type APIConstructor = new (...args: any[]) => APIBase;\nexport type APIInstance = InstanceType<typeof API>;\n\nconst SANITIZE_HTML_OPTIONS = {\n allowedTags: _sanitizeHTML.defaults.allowedTags.concat(['img']),\n allowedAttributes: {\n ..._sanitizeHTML.defaults.allowedAttributes,\n '*': ['class']\n }\n};\n\nexport class APIBase {\n name = 'API';\n\n db: DBInstance;\n logger?: Logger | null;\n\n constructor(db: DBInstance, logger?: Logger | null) {\n this.db = db;\n this.logger = logger;\n }\n\n static getInstance(db: DBInstance, logger?: Logger | null) {\n return new API(db, logger);\n }\n\n sanitizeHTML(html: string) {\n return _sanitizeHTML(html, SANITIZE_HTML_OPTIONS);\n }\n\n log(level: LogLevel, ...msg: any[]) {\n const limiterStopOnError = msg.find(\n (m) => m instanceof Error && m.message === 'LimiterStopOnError'\n );\n if (limiterStopOnError) {\n return;\n }\n commonLog(this.logger, level, this.name, ...msg);\n }\n}\n\nconst API = FilterAPIMixin(MediaAPIMixin(SettingsAPIMixin(ContentAPIMixin(CampaignAPIMixin(APIBase)))));\n\nexport default API;\n"]}
|
|
@@ -7,10 +7,10 @@ export declare function CampaignDBMixin<TBase extends UserDBConstructor>(Base: T
|
|
|
7
7
|
new (...args: any[]): {
|
|
8
8
|
saveCampaign(campaign: Campaign | null, downloadDate: Date, overwriteIfExists?: boolean): void;
|
|
9
9
|
getCampaign(params: GetCampaignParams): Campaign | null;
|
|
10
|
-
"__#
|
|
11
|
-
"__#
|
|
10
|
+
"__#115@#saveRewards"(campaign: Campaign): void;
|
|
11
|
+
"__#115@#doSaveReward"(campaign: Campaign, reward: Reward): void;
|
|
12
12
|
getCampaignList(params: GetCampaignListParams): CampaignList;
|
|
13
|
-
"__#
|
|
13
|
+
"__#115@#getCampaignWithCounts"(params: GetCampaignParams): CampaignWithCounts | null;
|
|
14
14
|
checkCampaignExists(id: string): boolean;
|
|
15
15
|
saveUser(user: import("../../index.js").User | null): void;
|
|
16
16
|
getUserByID(id: string): import("../../index.js").User | null;
|
|
@@ -45,6 +45,7 @@ export declare function CampaignDBMixin<TBase extends UserDBConstructor>(Base: T
|
|
|
45
45
|
limitOffset?: string;
|
|
46
46
|
}): string;
|
|
47
47
|
name: string;
|
|
48
|
+
dbPath: string | null;
|
|
48
49
|
db: import("better-sqlite3").Database;
|
|
49
50
|
logger?: import("../../index.js").Logger | null;
|
|
50
51
|
exec(sql: string): void;
|
|
@@ -4,13 +4,13 @@ import { type CampaignDBConstructor } from './CampaignDBMixin.js';
|
|
|
4
4
|
export declare function ContentDBMixin<TBase extends CampaignDBConstructor>(Base: TBase): {
|
|
5
5
|
new (...args: any[]): {
|
|
6
6
|
saveContent(content: Post | Product): void;
|
|
7
|
-
"__#
|
|
8
|
-
"__#
|
|
9
|
-
"__#
|
|
10
|
-
"__#
|
|
11
|
-
"__#
|
|
12
|
-
"__#
|
|
13
|
-
"__#
|
|
7
|
+
"__#116@#saveContentMedia"(content: Post | Product): void;
|
|
8
|
+
"__#116@#savepostMedia"(post: Post): void;
|
|
9
|
+
"__#116@#saveProductMedia"(product: Product): void;
|
|
10
|
+
"__#116@#doSaveContentMedia"(content: Post | Product, media: Downloadable, mediaIndex: number, isPreview: boolean): void;
|
|
11
|
+
"__#116@#publishedAtToTime"(publishedAt: string | null): number | null;
|
|
12
|
+
"__#116@#savePostTiers"(post: Post): void;
|
|
13
|
+
"__#116@#doSaveTier"(post: Post, tier: Tier): void;
|
|
14
14
|
savePostComments(post: Post, comments: Comment[]): void;
|
|
15
15
|
checkPostCommentsExist(post: Post): boolean;
|
|
16
16
|
getContent(id: string, contentType: "post"): PostWithComments | null;
|
|
@@ -25,7 +25,7 @@ export declare function ContentDBMixin<TBase extends CampaignDBConstructor>(Base
|
|
|
25
25
|
* @param row Must have `details`, `comment_count` and `comments`
|
|
26
26
|
* @returns
|
|
27
27
|
*/
|
|
28
|
-
"__#
|
|
28
|
+
"__#116@#parseContentRowJoinedComments"(row: any): any;
|
|
29
29
|
getContentCountByDate(contentType: ContentType, groupBy: "year" | "month", filter?: {
|
|
30
30
|
campaign?: Campaign | string | null;
|
|
31
31
|
date?: Date | null;
|
|
@@ -46,10 +46,10 @@ export declare function ContentDBMixin<TBase extends CampaignDBConstructor>(Base
|
|
|
46
46
|
getPostComments(post: Post | string): Comment[] | null;
|
|
47
47
|
saveCampaign(campaign: Campaign | null, downloadDate: Date, overwriteIfExists?: boolean): void;
|
|
48
48
|
getCampaign(params: import("../types/Campaign").GetCampaignParams): Campaign | null;
|
|
49
|
-
"__#
|
|
50
|
-
"__#
|
|
49
|
+
"__#115@#saveRewards"(campaign: Campaign): void;
|
|
50
|
+
"__#115@#doSaveReward"(campaign: Campaign, reward: import("../../entities").Reward): void;
|
|
51
51
|
getCampaignList(params: import("../types/Campaign").GetCampaignListParams): import("../types/Campaign").CampaignList;
|
|
52
|
-
"__#
|
|
52
|
+
"__#115@#getCampaignWithCounts"(params: import("../types/Campaign").GetCampaignParams): import("../types/Campaign").CampaignWithCounts | null;
|
|
53
53
|
checkCampaignExists(id: string): boolean;
|
|
54
54
|
saveUser(user: import("../../entities").User | null): void;
|
|
55
55
|
getUserByID(id: string): import("../../entities").User | null;
|
|
@@ -84,6 +84,7 @@ export declare function ContentDBMixin<TBase extends CampaignDBConstructor>(Base
|
|
|
84
84
|
limitOffset?: string;
|
|
85
85
|
}): string;
|
|
86
86
|
name: string;
|
|
87
|
+
dbPath: string | null;
|
|
87
88
|
db: import("better-sqlite3").Database;
|
|
88
89
|
logger?: import("../..").Logger | null;
|
|
89
90
|
exec(sql: string): void;
|
|
@@ -6,6 +6,7 @@ export declare function EnvDBMixin<TBase extends DBConstructor>(Base: TBase): {
|
|
|
6
6
|
getEnvValue<T = any>(key: string): T | null;
|
|
7
7
|
checkEnvExists(key: string): boolean;
|
|
8
8
|
name: string;
|
|
9
|
+
dbPath: string | null;
|
|
9
10
|
db: import("better-sqlite3").Database;
|
|
10
11
|
logger?: import("../..").Logger | null;
|
|
11
12
|
exec(sql: string): void;
|
|
@@ -35,6 +35,7 @@ export declare function MediaDBMixin<TBase extends DBConstructor>(Base: TBase):
|
|
|
35
35
|
limitOffset?: string;
|
|
36
36
|
}): string;
|
|
37
37
|
name: string;
|
|
38
|
+
dbPath: string | null;
|
|
38
39
|
db: import("better-sqlite3").Database;
|
|
39
40
|
logger?: import("../..").Logger | null;
|
|
40
41
|
exec(sql: string): void;
|
|
@@ -36,6 +36,7 @@ export declare function UserDBMixin<TBase extends MediaDBConstructor>(Base: TBas
|
|
|
36
36
|
limitOffset?: string;
|
|
37
37
|
}): string;
|
|
38
38
|
name: string;
|
|
39
|
+
dbPath: string | null;
|
|
39
40
|
db: import("better-sqlite3").Database;
|
|
40
41
|
logger?: import("../..").Logger | null;
|
|
41
42
|
exec(sql: string): void;
|