booru 2.6.8 → 2.7.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/dist/Constants.d.ts +6 -5
- package/dist/Constants.d.ts.map +1 -0
- package/dist/Constants.js +5 -6
- package/dist/Constants.js.map +1 -1
- package/dist/Utils.d.ts +2 -1
- package/dist/Utils.d.ts.map +1 -0
- package/dist/Utils.js +11 -15
- package/dist/Utils.js.map +1 -1
- package/dist/boorus/Booru.d.ts +5 -4
- package/dist/boorus/Booru.d.ts.map +1 -0
- package/dist/boorus/Booru.js +30 -34
- package/dist/boorus/Booru.js.map +1 -1
- package/dist/boorus/Derpibooru.d.ts +4 -10
- package/dist/boorus/Derpibooru.d.ts.map +1 -0
- package/dist/boorus/Derpibooru.js +0 -8
- package/dist/boorus/Derpibooru.js.map +1 -1
- package/dist/boorus/XmlBooru.d.ts +2 -8
- package/dist/boorus/XmlBooru.d.ts.map +1 -0
- package/dist/boorus/XmlBooru.js +0 -8
- package/dist/boorus/XmlBooru.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/sites.json +219 -1
- package/dist/structures/InternalSearchParameters.d.ts +2 -1
- package/dist/structures/InternalSearchParameters.d.ts.map +1 -0
- package/dist/structures/InternalSearchParameters.js.map +1 -1
- package/dist/structures/Post.d.ts +2 -1
- package/dist/structures/Post.d.ts.map +1 -0
- package/dist/structures/Post.js +46 -44
- package/dist/structures/Post.js.map +1 -1
- package/dist/structures/SearchParameters.d.ts +5 -4
- package/dist/structures/SearchParameters.d.ts.map +1 -0
- package/dist/structures/SearchParameters.js.map +1 -1
- package/dist/structures/SearchResults.d.ts +4 -3
- package/dist/structures/SearchResults.d.ts.map +1 -0
- package/dist/structures/SearchResults.js +20 -12
- package/dist/structures/SearchResults.js.map +1 -1
- package/dist/structures/Site.d.ts +3 -2
- package/dist/structures/Site.d.ts.map +1 -0
- package/dist/structures/Site.js.map +1 -1
- package/dist/structures/SiteApi.d.ts +1 -0
- package/dist/structures/SiteApi.d.ts.map +1 -0
- package/dist/structures/SiteApi.js.map +1 -1
- package/dist/structures/SiteInfo.d.ts +2 -1
- package/dist/structures/SiteInfo.d.ts.map +1 -0
- package/dist/structures/SiteInfo.js.map +1 -1
- package/package.json +12 -28
- package/readme.md +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResults.js","sourceRoot":"","sources":["../../src/structures/SearchResults.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"SearchResults.js","sourceRoot":"","sources":["../../src/structures/SearchResults.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAiC;AAKjC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAqB,aAAc,SAAQ,KAAW;IACpD,qCAAqC;IAC9B,KAAK,CAAO;IACnB,8BAA8B;IACvB,IAAI,CAAQ;IACnB,oCAAoC;IACpB,IAAI,CAAU;IAC9B,uCAAuC;IACvB,OAAO,CAAkB;IACzC,wCAAwC;IACxB,KAAK,CAAQ;IAE7B,eAAe;IACf,YACE,KAAa,EACb,IAAc,EACd,OAAyB,EACzB,KAAY;QAEZ,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;QAEnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;QACpB,CAAC;QAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC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C,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;IACtE,CAAC;IAED;;;;OAIG;IACI,SAAS,CAAC,IAAuB;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAA;IAC5C,CAAC;CACF;AA9FD,gCA8FC","sourcesContent":["/**\n * @packageDocumentation\n * @module Structures\n */\n\nimport * as Utils from '../Utils'\nimport type Booru from '../boorus/Booru'\nimport type Post from '../structures/Post'\nimport type SearchParameters from './SearchParameters'\n\n/**\n * Represents a page of search results, works like an array of {@link Post}\n * <p> Usable like an array and allows to easily get the next page\n *\n * @example\n * ```\n * const Booru = require('booru')\n * // Safebooru\n * const sb = new Booru('sb')\n *\n * const imgs = await sb.search('cat')\n *\n * // Log the images from the first page, then from the second\n * imgs.forEach(i => console.log(i.postView))\n * const imgs2 = await imgs.nextPage()\n * imgs2.forEach(i => console.log(i.postView))\n * ```\n */\nexport default class SearchResults extends Array<Post> {\n /** The booru used for this search */\n public booru: Booru\n /** The page of this search */\n public page: number\n /** The tags used for this search */\n public readonly tags: string[]\n /** The options used for this search */\n public readonly options: SearchParameters\n /** The posts from this search result */\n public readonly posts: Post[]\n\n /** @private */\n constructor(\n posts: Post[],\n tags: string[],\n options: SearchParameters,\n booru: Booru,\n ) {\n super(posts.length)\n\n for (let i = 0; i < posts.length; i++) {\n this[i] = posts[i]\n }\n\n this.posts = posts\n this.tags = tags\n this.options = options\n this.booru = booru\n this.page = options ? (options.page ?? 0) : 0\n }\n\n /**\n * Get the first post in this result set\n * @return {Post}\n */\n get first(): Post {\n return this[0]\n }\n\n /**\n * Get the last post in this result set\n * @return {Post}\n */\n get last(): Post {\n return this[this.length - 1]\n }\n\n /**\n * Get the next page\n * <p>Works like <code>sb.search('cat', {page: 1}); sb.search('cat', {page: 2})</code>\n * @return {Promise<SearchResults>}\n */\n public nextPage(): Promise<SearchResults> {\n const opts: SearchParameters = this.options\n opts.page = this.page + 1\n\n return this.booru.search(this.tags, opts)\n }\n\n /**\n * Create a new SearchResults with just images with the matching tags\n *\n * @param {String[]|String} tags The tags (or tag) to search for\n * @param {Object} options The extra options for the search\n * @param {Boolean} [options.invert=false] If the results should be inverted and\n * return images *not* tagged\n * @return {SearchResults}\n */\n public tagged(\n tags: string[] | string,\n { invert = false } = {},\n ): SearchResults {\n const searchTags = Array.isArray(tags) ? tags : [tags]\n const posts: Post[] = []\n\n for (const p of this) {\n const m: number = Utils.compareArrays(searchTags, p.tags).length\n if ((!invert && m > 0) || (invert && m === 0)) {\n posts.push(p)\n }\n }\n\n return new SearchResults(posts, this.tags, this.options, this.booru)\n }\n\n /**\n * Returns a SearchResults with images *not* tagged with any of the specified tags (or tag)\n * @param {String[]|String} tags The tags (or tag) to blacklist\n * @return {SearchResults} The results without any images with the specified tags\n */\n public blacklist(tags: string[] | string): SearchResults {\n return this.tagged(tags, { invert: true })\n }\n}\n"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @packageDocumentation
|
|
3
3
|
* @module Structures
|
|
4
4
|
*/
|
|
5
|
-
import SiteApi from './SiteApi';
|
|
6
|
-
import SiteInfo from './SiteInfo';
|
|
5
|
+
import type SiteApi from './SiteApi';
|
|
6
|
+
import type SiteInfo from './SiteInfo';
|
|
7
7
|
/**
|
|
8
8
|
* Represents a site, mostly used for JSDoc
|
|
9
9
|
*/
|
|
@@ -35,3 +35,4 @@ export default class Site {
|
|
|
35
35
|
defaultTags: string[];
|
|
36
36
|
constructor(data: SiteInfo);
|
|
37
37
|
}
|
|
38
|
+
//# sourceMappingURL=Site.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Site.d.ts","sourceRoot":"","sources":["../../src/structures/Site.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AAEtC;;GAEG;AACH,MAA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,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,MAAM,CAAA;QAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,CAAA;QACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;QACrB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,CAAA;QACzB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAA;QACvC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,KAAK,CAAA;QAClC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAA;QACvC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,GAAG,CAAA;QAClC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAA;QACtC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,EAAE,CAAA;IAC3C,CAAC;CACF;AAxCD,uBAwCC","sourcesContent":["/**\n * @packageDocumentation\n * @module Structures\n */\n\nimport type SiteApi from './SiteApi'\nimport type SiteInfo from './SiteInfo'\n\n/**\n * Represents a site, mostly used for JSDoc\n */\nexport default class Site {\n /** The domain of the Site (the \"google.com\" part of \"https://google.com/foo\") */\n public domain: string\n /** The type of this site (json/xml/derpi) */\n public type: string\n /** The aliases of this site */\n public aliases: string[]\n /** If this site serves NSFW posts or not */\n public nsfw: boolean\n /** An object representing the api of this site */\n public api: SiteApi\n /** The url query param to paginate on the site */\n public paginate: string\n /**\n * If the site supports `order:random`.\n * If a string, this means a custom random system is used :/\n */\n public random: boolean | string\n /** The url query param for tags */\n public tagQuery: string\n /** The character to use to join tags when creating the search url */\n public tagJoin: string\n /** If this site supports only http:// */\n public insecure: boolean\n /** Tags to add to every request, if not included */\n public defaultTags: string[]\n\n constructor(data: SiteInfo) {\n this.domain = data.domain\n this.type = data.type ?? 'json'\n this.aliases = data.aliases ?? []\n this.nsfw = data.nsfw\n this.api = data.api ?? {}\n this.paginate = data.paginate ?? 'page'\n this.random = data.random ?? false\n this.tagQuery = data.tagQuery ?? 'tags'\n this.tagJoin = data.tagJoin ?? '+'\n this.insecure = data.insecure ?? false\n this.defaultTags = data.defaultTags ?? []\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteApi.d.ts","sourceRoot":"","sources":["../../src/structures/SiteApi.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,CAAC,OAAO,WAAW,OAAO;IAC9B,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAA;CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteApi.js","sourceRoot":"","sources":["../../src/structures/SiteApi.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
1
|
+
{"version":3,"file":"SiteApi.js","sourceRoot":"","sources":["../../src/structures/SiteApi.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * @packageDocumentation\n * @module Structures\n */\n\n/**\n * Represents the api of a {@link Site}\n * <p>Each property is a path on the {@link Site}\n */\nexport default interface SiteApi {\n /** The path to search for posts */\n search: string\n /** The path to view a post by ID */\n postView: string\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @packageDocumentation
|
|
3
3
|
* @module Structures
|
|
4
4
|
*/
|
|
5
|
-
import SiteApi from './SiteApi';
|
|
5
|
+
import type SiteApi from './SiteApi';
|
|
6
6
|
/**
|
|
7
7
|
* Represents the info needed to create a new {@link Site}
|
|
8
8
|
* <p>Same properties as {@link Site}, but some optional</p>
|
|
@@ -32,3 +32,4 @@ export default interface SiteInfo {
|
|
|
32
32
|
/** Tags to add to every request, if not included */
|
|
33
33
|
defaultTags?: string[];
|
|
34
34
|
}
|
|
35
|
+
//# sourceMappingURL=SiteInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteInfo.d.ts","sourceRoot":"","sources":["../../src/structures/SiteInfo.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AAEpC;;;;GAIG;AACH,MAAM,CAAC,OAAO,WAAW,QAAQ;IAC/B,iFAAiF;IACjF,MAAM,EAAE,MAAM,CAAA;IACd,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,+BAA+B;IAC/B,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,4CAA4C;IAC5C,IAAI,EAAE,OAAO,CAAA;IACb,kDAAkD;IAClD,GAAG,EAAE,OAAO,CAAA;IACZ,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,0CAA0C;IAC1C,MAAM,EAAE,OAAO,GAAG,MAAM,CAAA;IACxB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteInfo.js","sourceRoot":"","sources":["../../src/structures/SiteInfo.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
1
|
+
{"version":3,"file":"SiteInfo.js","sourceRoot":"","sources":["../../src/structures/SiteInfo.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * @packageDocumentation\n * @module Structures\n */\n\nimport type SiteApi from './SiteApi'\n\n/**\n * Represents the info needed to create a new {@link Site}\n * <p>Same properties as {@link Site}, but some optional</p>\n * <p>Mostly just here to reflect what sites.json should look like\n */\nexport default interface SiteInfo {\n /** The domain of the Site (the \"google.com\" part of \"https://google.com/foo\") */\n domain: string\n /** The type of this site (json/xml/derpi) */\n type: string\n /** The aliases of this site */\n aliases: string[]\n /** If this site serves NSFW posts or not */\n nsfw: boolean\n /** An object representing the api of this site */\n api: SiteApi\n /** The url query param to paginate on the site */\n paginate?: string\n /** If the site supports `order:random` */\n random: boolean | string\n /** The url query param for tags */\n tagQuery?: string\n /** The character to use to join tags when creating the search url */\n tagJoin?: string\n /** If this site supports only http:// */\n insecure?: boolean\n /** Tags to add to every request, if not included */\n defaultTags?: string[]\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "booru",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Search (and do other things) on a bunch of different boorus!",
|
|
5
5
|
"author": "AtoraSuunva (https://github.com/AtoraSuunva/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,13 +15,11 @@
|
|
|
15
15
|
"url": "https://github.com/AtoraSuunva/booru/issues"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"lint": "
|
|
21
|
-
"lint:fix": "eslint --ext .ts src/ && prettier --write 'src/**/*.ts' && tsc --noEmit",
|
|
18
|
+
"test": "tsx --test",
|
|
19
|
+
"lint": "biome check && tsc --noEmit",
|
|
20
|
+
"lint:fix": "biome check --write && tsc --noEmit",
|
|
22
21
|
"prebuild": "npm run lint",
|
|
23
|
-
"build": "tsc",
|
|
24
|
-
"postbuild": "node ./minify.js",
|
|
22
|
+
"build": "tsc --build",
|
|
25
23
|
"prepublishOnly": "npm run build"
|
|
26
24
|
},
|
|
27
25
|
"keywords": [
|
|
@@ -40,31 +38,17 @@
|
|
|
40
38
|
"derpibooru"
|
|
41
39
|
],
|
|
42
40
|
"engines": {
|
|
43
|
-
"node": ">=
|
|
41
|
+
"node": ">=18.17"
|
|
44
42
|
},
|
|
45
43
|
"dependencies": {
|
|
46
|
-
"fast-xml-parser": "^4.
|
|
47
|
-
"undici": "^
|
|
44
|
+
"fast-xml-parser": "^4.5.1",
|
|
45
|
+
"undici": "^7.2.0"
|
|
48
46
|
},
|
|
49
47
|
"devDependencies": {
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"@swc/core": "^1.7.0",
|
|
55
|
-
"@types/jest": "^29.5.12",
|
|
56
|
-
"@types/node": "^20.14.11",
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
|
58
|
-
"@typescript-eslint/parser": "^7.17.0",
|
|
59
|
-
"eslint": "^8.57.0",
|
|
60
|
-
"eslint-config-prettier": "^9.1.0",
|
|
61
|
-
"eslint-plugin-import": "^2.29.1",
|
|
62
|
-
"eslint-plugin-jsdoc": "^48.8.3",
|
|
63
|
-
"jest": "^29.7.0",
|
|
64
|
-
"prettier": "^3.3.3",
|
|
65
|
-
"terser": "^5.31.3",
|
|
66
|
-
"ts-node": "^10.9.2",
|
|
67
|
-
"typescript": "^5.5.4"
|
|
48
|
+
"@biomejs/biome": "^1.9.4",
|
|
49
|
+
"@types/node": "^22.10.2",
|
|
50
|
+
"tsx": "^4.19.2",
|
|
51
|
+
"typescript": "^5.7.2"
|
|
68
52
|
},
|
|
69
53
|
"files": [
|
|
70
54
|
"dist/"
|
package/readme.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://circleci.com/gh/AtoraSuunva/booru)   
|
|
6
6
|
|
|
7
|
+
*Minimum supported Node.js version: >=18.17*
|
|
8
|
+
|
|
7
9
|
## Features
|
|
8
10
|
|
|
9
11
|
- Search 15 different boorus (check [sites.json](./src/sites.json))
|