narou 1.1.0 → 2.0.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.
Files changed (164) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +78 -35
  3. package/dist/index.browser.cjs +87 -1230
  4. package/dist/index.browser.cjs.map +1 -1
  5. package/dist/index.browser.d.cts +31 -24
  6. package/dist/index.browser.d.mts +47 -0
  7. package/dist/index.browser.mjs +66 -0
  8. package/dist/index.browser.mjs.map +1 -0
  9. package/dist/index.cjs +147 -1281
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.common-8lS2K_1Y.mjs +1166 -0
  12. package/dist/index.common-8lS2K_1Y.mjs.map +1 -0
  13. package/dist/index.common-CYj0n0aU.cjs +1346 -0
  14. package/dist/index.common-CYj0n0aU.cjs.map +1 -0
  15. package/dist/index.d.cts +39 -23
  16. package/dist/index.d.mts +63 -0
  17. package/dist/index.mjs +128 -0
  18. package/dist/index.mjs.map +1 -0
  19. package/dist/user-search-BY6FdEe7.d.cts +1394 -0
  20. package/dist/user-search-Besgk-Hx.d.mts +1394 -0
  21. package/package.json +34 -45
  22. package/pnpm-lock.yaml +2523 -2175
  23. package/src/index.browser.ts +21 -5
  24. package/src/index.ts +16 -3
  25. package/src/narou-fetch.ts +4 -3
  26. package/src/narou-jsonp.ts +4 -2
  27. package/src/narou-search-results.ts +2 -1
  28. package/src/narou.ts +53 -13
  29. package/src/params.ts +2 -2
  30. package/src/ranking-history.ts +13 -4
  31. package/src/ranking.ts +99 -26
  32. package/src/search-builder-r18.ts +23 -6
  33. package/src/search-builder.ts +183 -76
  34. package/src/user-search.ts +9 -2
  35. package/src/util/date.ts +38 -0
  36. package/src/util/jsonp.ts +61 -6
  37. package/src/util/type.ts +23 -0
  38. package/src/util/unzipp.ts +9 -0
  39. package/dist/chunk-4VC3246A.js +0 -83
  40. package/dist/chunk-4VC3246A.js.map +0 -1
  41. package/dist/chunk-4ZP5YNWI.js +0 -1
  42. package/dist/chunk-4ZP5YNWI.js.map +0 -1
  43. package/dist/chunk-AZT2OXBZ.js +0 -26
  44. package/dist/chunk-AZT2OXBZ.js.map +0 -1
  45. package/dist/chunk-CDOBNSCL.js +0 -407
  46. package/dist/chunk-CDOBNSCL.js.map +0 -1
  47. package/dist/chunk-K22KVNAH.js +0 -94
  48. package/dist/chunk-K22KVNAH.js.map +0 -1
  49. package/dist/chunk-NVMUSXA5.js +0 -23
  50. package/dist/chunk-NVMUSXA5.js.map +0 -1
  51. package/dist/chunk-P7QOZBII.js +0 -386
  52. package/dist/chunk-P7QOZBII.js.map +0 -1
  53. package/dist/chunk-RITMMCZE.js +0 -37
  54. package/dist/chunk-RITMMCZE.js.map +0 -1
  55. package/dist/chunk-SNPBEVCY.js +0 -44
  56. package/dist/chunk-SNPBEVCY.js.map +0 -1
  57. package/dist/chunk-UN3W2CT3.js +0 -72
  58. package/dist/chunk-UN3W2CT3.js.map +0 -1
  59. package/dist/chunk-WYSPGQ3S.js +0 -44
  60. package/dist/chunk-WYSPGQ3S.js.map +0 -1
  61. package/dist/chunk-XAUB42TO.js +0 -15
  62. package/dist/chunk-XAUB42TO.js.map +0 -1
  63. package/dist/chunk-XVH2CU2Q.js +0 -39
  64. package/dist/chunk-XVH2CU2Q.js.map +0 -1
  65. package/dist/index.browser.d.ts +0 -40
  66. package/dist/index.browser.js +0 -125
  67. package/dist/index.browser.js.map +0 -1
  68. package/dist/index.common.cjs +0 -1058
  69. package/dist/index.common.cjs.map +0 -1
  70. package/dist/index.common.d.cts +0 -6
  71. package/dist/index.common.d.ts +0 -6
  72. package/dist/index.common.js +0 -75
  73. package/dist/index.common.js.map +0 -1
  74. package/dist/index.d.ts +0 -47
  75. package/dist/index.js +0 -130
  76. package/dist/index.js.map +0 -1
  77. package/dist/narou-CatW_TC9.d.cts +0 -301
  78. package/dist/narou-fH9osIoh.d.ts +0 -301
  79. package/dist/narou-fetch.cjs +0 -161
  80. package/dist/narou-fetch.cjs.map +0 -1
  81. package/dist/narou-fetch.d.cts +0 -20
  82. package/dist/narou-fetch.d.ts +0 -20
  83. package/dist/narou-fetch.js +0 -10
  84. package/dist/narou-fetch.js.map +0 -1
  85. package/dist/narou-jsonp.cjs +0 -159
  86. package/dist/narou-jsonp.cjs.map +0 -1
  87. package/dist/narou-jsonp.d.cts +0 -13
  88. package/dist/narou-jsonp.d.ts +0 -13
  89. package/dist/narou-jsonp.js +0 -10
  90. package/dist/narou-jsonp.js.map +0 -1
  91. package/dist/narou-ranking-results.cjs +0 -19
  92. package/dist/narou-ranking-results.cjs.map +0 -1
  93. package/dist/narou-ranking-results.d.cts +0 -4
  94. package/dist/narou-ranking-results.d.ts +0 -4
  95. package/dist/narou-ranking-results.js +0 -1
  96. package/dist/narou-ranking-results.js.map +0 -1
  97. package/dist/narou-search-results-D5yqPRZ7.d.ts +0 -727
  98. package/dist/narou-search-results-DWCJWTC5.d.cts +0 -727
  99. package/dist/narou-search-results.cjs +0 -62
  100. package/dist/narou-search-results.cjs.map +0 -1
  101. package/dist/narou-search-results.d.cts +0 -2
  102. package/dist/narou-search-results.d.ts +0 -2
  103. package/dist/narou-search-results.js +0 -11
  104. package/dist/narou-search-results.js.map +0 -1
  105. package/dist/narou.cjs +0 -109
  106. package/dist/narou.cjs.map +0 -1
  107. package/dist/narou.d.cts +0 -4
  108. package/dist/narou.d.ts +0 -4
  109. package/dist/narou.js +0 -8
  110. package/dist/narou.js.map +0 -1
  111. package/dist/params.cjs +0 -448
  112. package/dist/params.cjs.map +0 -1
  113. package/dist/params.d.cts +0 -2
  114. package/dist/params.d.ts +0 -2
  115. package/dist/params.js +0 -41
  116. package/dist/params.js.map +0 -1
  117. package/dist/ranking-history.cjs +0 -39
  118. package/dist/ranking-history.cjs.map +0 -1
  119. package/dist/ranking-history.d.cts +0 -17
  120. package/dist/ranking-history.d.ts +0 -17
  121. package/dist/ranking-history.js +0 -7
  122. package/dist/ranking-history.js.map +0 -1
  123. package/dist/ranking.cjs +0 -674
  124. package/dist/ranking.cjs.map +0 -1
  125. package/dist/ranking.d.cts +0 -47
  126. package/dist/ranking.d.ts +0 -47
  127. package/dist/ranking.js +0 -9
  128. package/dist/ranking.js.map +0 -1
  129. package/dist/search-builder-r18.cjs +0 -488
  130. package/dist/search-builder-r18.cjs.map +0 -1
  131. package/dist/search-builder-r18.d.cts +0 -32
  132. package/dist/search-builder-r18.d.ts +0 -32
  133. package/dist/search-builder-r18.js +0 -9
  134. package/dist/search-builder-r18.js.map +0 -1
  135. package/dist/search-builder.cjs +0 -525
  136. package/dist/search-builder.cjs.map +0 -1
  137. package/dist/search-builder.d.cts +0 -4
  138. package/dist/search-builder.d.ts +0 -4
  139. package/dist/search-builder.js +0 -12
  140. package/dist/search-builder.js.map +0 -1
  141. package/dist/user-search.cjs +0 -301
  142. package/dist/user-search.cjs.map +0 -1
  143. package/dist/user-search.d.cts +0 -66
  144. package/dist/user-search.d.ts +0 -66
  145. package/dist/user-search.js +0 -9
  146. package/dist/user-search.js.map +0 -1
  147. package/dist/util/jsonp.cjs +0 -63
  148. package/dist/util/jsonp.cjs.map +0 -1
  149. package/dist/util/jsonp.d.cts +0 -13
  150. package/dist/util/jsonp.d.ts +0 -13
  151. package/dist/util/jsonp.js +0 -7
  152. package/dist/util/jsonp.js.map +0 -1
  153. package/dist/util/type.cjs +0 -19
  154. package/dist/util/type.cjs.map +0 -1
  155. package/dist/util/type.d.cts +0 -4
  156. package/dist/util/type.d.ts +0 -4
  157. package/dist/util/type.js +0 -1
  158. package/dist/util/type.js.map +0 -1
  159. package/dist/util/unzipp.cjs +0 -47
  160. package/dist/util/unzipp.cjs.map +0 -1
  161. package/dist/util/unzipp.d.cts +0 -3
  162. package/dist/util/unzipp.d.ts +0 -3
  163. package/dist/util/unzipp.js +0 -7
  164. package/dist/util/unzipp.js.map +0 -1
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/util/type.ts
17
- var type_exports = {};
18
- module.exports = __toCommonJS(type_exports);
19
- //# sourceMappingURL=type.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/util/type.ts"],"sourcesContent":["type Stringable = string | number | bigint | boolean | null | undefined;\n\nexport type Join<T extends Stringable> = `${T}-${T}` | `${T}`;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1,4 +0,0 @@
1
- type Stringable = string | number | bigint | boolean | null | undefined;
2
- type Join<T extends Stringable> = `${T}-${T}` | `${T}`;
3
-
4
- export type { Join };
@@ -1,4 +0,0 @@
1
- type Stringable = string | number | bigint | boolean | null | undefined;
2
- type Join<T extends Stringable> = `${T}-${T}` | `${T}`;
3
-
4
- export type { Join };
package/dist/util/type.js DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,47 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/util/unzipp.ts
21
- var unzipp_exports = {};
22
- __export(unzipp_exports, {
23
- unzipp: () => unzipp
24
- });
25
- module.exports = __toCommonJS(unzipp_exports);
26
- var import_zlib = require("zlib");
27
- var import_util = require("util");
28
- var gunzipAsync = (0, import_util.promisify)(import_zlib.gunzip);
29
- var decoder = new TextDecoder();
30
- async function unzipp(data) {
31
- try {
32
- const buffer = await gunzipAsync(data);
33
- try {
34
- return JSON.parse(decoder.decode(buffer));
35
- } catch {
36
- throw decoder.decode(buffer);
37
- }
38
- } catch (e) {
39
- if (typeof e === "string") throw e;
40
- throw decoder.decode(data);
41
- }
42
- }
43
- // Annotate the CommonJS export names for ESM import in node:
44
- 0 && (module.exports = {
45
- unzipp
46
- });
47
- //# sourceMappingURL=unzipp.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/util/unzipp.ts"],"sourcesContent":["import { gunzip, InputType } from \"zlib\";\nimport { promisify } from \"util\";\n\nconst gunzipAsync = promisify<InputType, Buffer>(gunzip);\n\nconst decoder = new TextDecoder()\nexport async function unzipp(data: ArrayBuffer) {\n try {\n const buffer = await gunzipAsync(data);\n try {\n return JSON.parse(decoder.decode(buffer));\n } catch {\n throw decoder.decode(buffer);\n }\n } catch (e) {\n if (typeof e === \"string\") throw e;\n throw decoder.decode(data);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAkC;AAClC,kBAA0B;AAE1B,IAAM,kBAAc,uBAA6B,kBAAM;AAEvD,IAAM,UAAU,IAAI,YAAY;AAChC,eAAsB,OAAO,MAAmB;AAC9C,MAAI;AACF,UAAM,SAAS,MAAM,YAAY,IAAI;AACrC,QAAI;AACF,aAAO,KAAK,MAAM,QAAQ,OAAO,MAAM,CAAC;AAAA,IAC1C,QAAQ;AACN,YAAM,QAAQ,OAAO,MAAM;AAAA,IAC7B;AAAA,EACF,SAAS,GAAG;AACV,QAAI,OAAO,MAAM,SAAU,OAAM;AACjC,UAAM,QAAQ,OAAO,IAAI;AAAA,EAC3B;AACF;","names":[]}
@@ -1,3 +0,0 @@
1
- declare function unzipp(data: ArrayBuffer): Promise<any>;
2
-
3
- export { unzipp };
@@ -1,3 +0,0 @@
1
- declare function unzipp(data: ArrayBuffer): Promise<any>;
2
-
3
- export { unzipp };
@@ -1,7 +0,0 @@
1
- import {
2
- unzipp
3
- } from "../chunk-NVMUSXA5.js";
4
- export {
5
- unzipp
6
- };
7
- //# sourceMappingURL=unzipp.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}