narou 0.9.2 → 1.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 (124) hide show
  1. package/README.md +6 -0
  2. package/dist/chunk-4ZP5YNWI.js +1 -0
  3. package/dist/{chunk-PH7RAXIZ.js → chunk-6RIDVTFQ.js} +1 -1
  4. package/dist/chunk-6RIDVTFQ.js.map +1 -0
  5. package/dist/{chunk-ELL5TDE4.js → chunk-DBCAWGIX.js} +2 -2
  6. package/dist/chunk-DBCAWGIX.js.map +1 -0
  7. package/dist/{chunk-SUVA6EFY.js → chunk-GAEL5UWA.js} +2 -2
  8. package/dist/chunk-GAEL5UWA.js.map +1 -0
  9. package/dist/chunk-NP5NZV5Q.js +41 -0
  10. package/dist/chunk-NP5NZV5Q.js.map +1 -0
  11. package/dist/{chunk-VHXJSFYZ.js → chunk-OJGRUQEQ.js} +2 -2
  12. package/dist/chunk-OJGRUQEQ.js.map +1 -0
  13. package/dist/{chunk-H4TVIA56.js → chunk-QQYQ4GQF.js} +3 -3
  14. package/dist/chunk-QQYQ4GQF.js.map +1 -0
  15. package/dist/{chunk-VHDE4QIZ.js → chunk-RITMMCZE.js} +1 -1
  16. package/dist/chunk-RITMMCZE.js.map +1 -0
  17. package/dist/{chunk-TZ3HVU6L.js → chunk-UN3W2CT3.js} +2 -2
  18. package/dist/chunk-UN3W2CT3.js.map +1 -0
  19. package/dist/{chunk-M2JOQXK7.js → chunk-XAUB42TO.js} +1 -1
  20. package/dist/chunk-XAUB42TO.js.map +1 -0
  21. package/dist/{chunk-SKRVT2TT.js → chunk-YJQXIVFD.js} +2 -2
  22. package/dist/chunk-YJQXIVFD.js.map +1 -0
  23. package/dist/index.browser.cjs.map +1 -1
  24. package/dist/index.browser.d.cts +4 -4
  25. package/dist/index.browser.d.ts +4 -4
  26. package/dist/index.browser.js +10 -12
  27. package/dist/index.browser.js.map +1 -1
  28. package/dist/index.cjs +6 -3038
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.common.cjs.map +1 -1
  31. package/dist/index.common.d.cts +2 -2
  32. package/dist/index.common.d.ts +2 -2
  33. package/dist/index.common.js +9 -11
  34. package/dist/index.d.cts +4 -4
  35. package/dist/index.d.ts +4 -4
  36. package/dist/index.js +11 -13
  37. package/dist/index.js.map +1 -1
  38. package/dist/{narou-98ededc8.d.ts → narou-CosGR0J9.d.cts} +2 -2
  39. package/dist/{narou-61329eea.d.ts → narou-CutsOEgk.d.ts} +2 -2
  40. package/dist/narou-fetch.cjs +6 -3038
  41. package/dist/narou-fetch.cjs.map +1 -1
  42. package/dist/narou-fetch.d.cts +8 -5
  43. package/dist/narou-fetch.d.ts +8 -5
  44. package/dist/narou-fetch.js +3 -4
  45. package/dist/narou-jsonp.cjs.map +1 -1
  46. package/dist/narou-jsonp.d.cts +2 -2
  47. package/dist/narou-jsonp.d.ts +2 -2
  48. package/dist/narou-jsonp.js +3 -4
  49. package/dist/narou-ranking-results.cjs.map +1 -1
  50. package/dist/narou-ranking-results.d.cts +2 -2
  51. package/dist/narou-ranking-results.d.ts +2 -2
  52. package/dist/narou-ranking-results.js +0 -1
  53. package/dist/{narou-search-results-b7c10db0.d.ts → narou-search-results-CvMcnYqe.d.ts} +1 -1
  54. package/dist/{narou-search-results-6727b1ce.d.ts → narou-search-results-D_vbjc_I.d.cts} +1 -1
  55. package/dist/narou-search-results.cjs.map +1 -1
  56. package/dist/narou-search-results.d.cts +1 -1
  57. package/dist/narou-search-results.d.ts +1 -1
  58. package/dist/narou-search-results.js +1 -2
  59. package/dist/narou.cjs.map +1 -1
  60. package/dist/narou.d.cts +2 -2
  61. package/dist/narou.d.ts +2 -2
  62. package/dist/narou.js +2 -3
  63. package/dist/params.cjs.map +1 -1
  64. package/dist/params.d.cts +1 -1
  65. package/dist/params.d.ts +1 -1
  66. package/dist/params.js +1 -2
  67. package/dist/ranking-history.cjs.map +1 -1
  68. package/dist/ranking-history.d.cts +2 -2
  69. package/dist/ranking-history.d.ts +2 -2
  70. package/dist/ranking-history.js +1 -2
  71. package/dist/ranking.cjs.map +1 -1
  72. package/dist/ranking.d.cts +2 -2
  73. package/dist/ranking.d.ts +2 -2
  74. package/dist/ranking.js +3 -4
  75. package/dist/search-builder-r18.cjs.map +1 -1
  76. package/dist/search-builder-r18.d.cts +3 -3
  77. package/dist/search-builder-r18.d.ts +3 -3
  78. package/dist/search-builder-r18.js +3 -4
  79. package/dist/search-builder.cjs.map +1 -1
  80. package/dist/search-builder.d.cts +2 -2
  81. package/dist/search-builder.d.ts +2 -2
  82. package/dist/search-builder.js +2 -3
  83. package/dist/user-search.cjs.map +1 -1
  84. package/dist/user-search.d.cts +2 -2
  85. package/dist/user-search.d.ts +2 -2
  86. package/dist/user-search.js +3 -4
  87. package/dist/util/jsonp.d.cts +1 -1
  88. package/dist/util/jsonp.d.ts +1 -1
  89. package/dist/util/jsonp.js +0 -1
  90. package/dist/util/type.d.cts +1 -1
  91. package/dist/util/type.d.ts +1 -1
  92. package/dist/util/unzipp.js +0 -1
  93. package/package.json +86 -74
  94. package/src/index.browser.ts +8 -8
  95. package/src/index.common.ts +13 -13
  96. package/src/index.ts +9 -9
  97. package/src/narou-fetch.ts +9 -4
  98. package/src/narou-jsonp.ts +3 -2
  99. package/src/narou-ranking-results.ts +3 -3
  100. package/src/narou-search-results.ts +2 -2
  101. package/src/narou.ts +7 -6
  102. package/src/params.ts +2 -2
  103. package/src/ranking-history.ts +1 -1
  104. package/src/ranking.ts +10 -7
  105. package/src/search-builder-r18.ts +6 -5
  106. package/src/search-builder.ts +9 -10
  107. package/src/user-search.ts +5 -4
  108. package/dist/chunk-3L6BVCEQ.js +0 -3065
  109. package/dist/chunk-3L6BVCEQ.js.map +0 -1
  110. package/dist/chunk-5M7JXPW3.js +0 -1
  111. package/dist/chunk-AUZ3RYOM.js +0 -50
  112. package/dist/chunk-AUZ3RYOM.js.map +0 -1
  113. package/dist/chunk-ELL5TDE4.js.map +0 -1
  114. package/dist/chunk-H4TVIA56.js.map +0 -1
  115. package/dist/chunk-M2JOQXK7.js.map +0 -1
  116. package/dist/chunk-M5TG4H6A.js +0 -1
  117. package/dist/chunk-M5TG4H6A.js.map +0 -1
  118. package/dist/chunk-PH7RAXIZ.js.map +0 -1
  119. package/dist/chunk-SKRVT2TT.js.map +0 -1
  120. package/dist/chunk-SUVA6EFY.js.map +0 -1
  121. package/dist/chunk-TZ3HVU6L.js.map +0 -1
  122. package/dist/chunk-VHDE4QIZ.js.map +0 -1
  123. package/dist/chunk-VHXJSFYZ.js.map +0 -1
  124. /package/dist/{chunk-5M7JXPW3.js.map → chunk-4ZP5YNWI.js.map} +0 -0
package/package.json CHANGED
@@ -1,74 +1,86 @@
1
- {
2
- "name": "narou",
3
- "version": "0.9.2",
4
- "description": "Narou API Wrapper",
5
- "type": "module",
6
- "main": "dist/index.cjs",
7
- "types": "dist/index.d.ts",
8
- "module": "dist/index.js",
9
- "exports": {
10
- ".": {
11
- "default": "./dist/index.js",
12
- "require": "./dist/index.cjs",
13
- "import": "./dist/index.js",
14
- "types": "./dist/index.d.ts",
15
- "browser": {
16
- "require": "./dist/index.browser.cjs",
17
- "import": "./dist/index.browser.js",
18
- "types": "./dist/index.browser.d.ts"
19
- }
20
- }
21
- },
22
- "files": [
23
- "dist",
24
- "src",
25
- "package.json",
26
- "package-lock.json",
27
- "README.md"
28
- ],
29
- "engines": {
30
- "node": ">=16.0.0"
31
- },
32
- "author": "deflis <deflis@gmail.com>",
33
- "license": "MIT",
34
- "repository": {
35
- "type": "git",
36
- "url": "https://github.com/deflis/node-narou.git"
37
- },
38
- "dependencies": {
39
- "date-fns": "^2.30.0"
40
- },
41
- "devDependencies": {
42
- "@types/jest": "^29.5.8",
43
- "@types/node": "^20.9.0",
44
- "@types/node-fetch": "^2.6.9",
45
- "@typescript-eslint/eslint-plugin": "^6.10.0",
46
- "@typescript-eslint/parser": "^6.10.0",
47
- "eslint": "^8.53.0",
48
- "eslint-config-prettier": "^9.0.0",
49
- "eslint-plugin-prettier": "^5.0.1",
50
- "jest": "^29.7.0",
51
- "node-fetch": "^2.7.0",
52
- "npm-run-all": "^4.1.5",
53
- "prettier": "^3.0.3",
54
- "ts-jest": "^29.1.1",
55
- "tsup": "^7.2.0",
56
- "typescript": "^5.2.2"
57
- },
58
- "optionalDependencies": {
59
- "node-fetch": "^2.6.7"
60
- },
61
- "scripts": {
62
- "build": "npm-run-all check build:tsc",
63
- "build:tsc": "tsup ./src",
64
- "check": "npm-run-all --parallel check:lint check:build test",
65
- "check:lint": "eslint src/** test/**",
66
- "check:build": "tsc --noEmit",
67
- "prepack": "npm-run-all format build",
68
- "format": "eslint --fix src/** test/**",
69
- "test": "jest",
70
- "docs": "npm-run-all docs:clean docs:typedoc",
71
- "docs:clean": "npx rimraf docs",
72
- "docs:typedoc": "npx typedoc --out ./docs src/index.ts"
73
- }
74
- }
1
+ {
2
+ "name": "narou",
3
+ "version": "1.0.0",
4
+ "description": "Narou API Wrapper",
5
+ "type": "module",
6
+ "main": "dist/index.cjs",
7
+ "types": "dist/index.d.ts",
8
+ "module": "dist/index.js",
9
+ "exports": {
10
+ ".": {
11
+ "default": "./dist/index.js",
12
+ "require": "./dist/index.cjs",
13
+ "import": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "browser": {
16
+ "require": "./dist/index.browser.cjs",
17
+ "import": "./dist/index.browser.js",
18
+ "types": "./dist/index.browser.d.ts"
19
+ }
20
+ },
21
+ "./browser": {
22
+ "default": "./dist/index.browser.js",
23
+ "require": "./dist/index.browser.cjs",
24
+ "import": "./dist/index.browser.js",
25
+ "types": "./dist/index.browser.d.ts"
26
+ },
27
+ "./*": {
28
+ "default": "./dist/*.js",
29
+ "require": "./dist/*.cjs",
30
+ "import": "./dist/*.js",
31
+ "types": "./dist/*.d.ts"
32
+ },
33
+ "./utils": {
34
+ "default": "./dist/utils/*.js",
35
+ "require": "./dist/utils/*.cjs",
36
+ "import": "./dist/utils/*.js",
37
+ "types": "./dist/utils/*.d.ts"
38
+ }
39
+ },
40
+ "files": [
41
+ "dist",
42
+ "src",
43
+ "package.json",
44
+ "package-lock.json",
45
+ "README.md"
46
+ ],
47
+ "engines": {
48
+ "node": ">=16.0.0",
49
+ "pnpm": ">=8"
50
+ },
51
+ "author": "deflis <deflis@gmail.com>",
52
+ "license": "MIT",
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "https://github.com/deflis/node-narou.git"
56
+ },
57
+ "dependencies": {
58
+ "date-fns": "^3.3.1"
59
+ },
60
+ "devDependencies": {
61
+ "@types/node": "^20.11.20",
62
+ "@typescript-eslint/eslint-plugin": "^7.1.0",
63
+ "@typescript-eslint/parser": "^7.1.0",
64
+ "@vitest/coverage-v8": "^1.3.1",
65
+ "eslint": "^8.57.0",
66
+ "eslint-config-prettier": "^9.1.0",
67
+ "eslint-plugin-prettier": "^5.1.3",
68
+ "prettier": "^3.2.5",
69
+ "run-z": "^2.0.0",
70
+ "tsup": "^8.0.2",
71
+ "typescript": "^5.3.3",
72
+ "vitest": "^1.3.1"
73
+ },
74
+ "scripts": {
75
+ "build": "run-z check build:tsc",
76
+ "build:tsc": "tsup ./src",
77
+ "check": "run-z check:lint,check:build,test",
78
+ "check:lint": "eslint src/** test/**",
79
+ "check:build": "tsc --noEmit",
80
+ "format": "eslint --fix src/** test/**",
81
+ "test": "vitest run",
82
+ "docs": "run-z docs:clean docs:typedoc",
83
+ "docs:clean": "pnpm dlx rimraf docs",
84
+ "docs:typedoc": "pnpm dlx typedoc --out ./docs src/index.ts"
85
+ }
86
+ }
@@ -1,12 +1,12 @@
1
- import NarouNovelJsonp from "./narou-jsonp";
2
- import NarouNovel from "./narou";
3
- import SearchBuilder from "./search-builder";
4
- import SearchBuilderR18 from "./search-builder-r18";
5
- import RankingBuilder from "./ranking";
6
- import { formatRankingHistory, RankingHistoryResult } from "./ranking-history";
7
- import UserSearchBuilder from "./user-search";
1
+ import type NarouNovel from "./narou.js";
2
+ import NarouNovelJsonp from "./narou-jsonp.js";
3
+ import SearchBuilder from "./search-builder.js";
4
+ import SearchBuilderR18 from "./search-builder-r18.js";
5
+ import RankingBuilder from "./ranking.js";
6
+ import { formatRankingHistory, RankingHistoryResult } from "./ranking-history.js";
7
+ import UserSearchBuilder from "./user-search.js";
8
8
 
9
- export * from "./index.common";
9
+ export * from "./index.common.js";
10
10
  export { NarouNovelJsonp };
11
11
 
12
12
  const narouNovelJsonp = new NarouNovelJsonp();
@@ -1,8 +1,8 @@
1
- import NarouNovel from "./narou";
2
- import NarouSearchResults from "./narou-search-results";
3
- import SearchBuilder from "./search-builder";
4
- import SearchBuilderR18 from "./search-builder-r18";
5
- import RankingBuilder from "./ranking";
1
+ import NarouNovel from "./narou.js";
2
+ import NarouSearchResults from "./narou-search-results.js";
3
+ import SearchBuilder from "./search-builder.js";
4
+ import SearchBuilderR18 from "./search-builder-r18.js";
5
+ import RankingBuilder from "./ranking.js";
6
6
 
7
7
  export {
8
8
  NarouNovel,
@@ -12,11 +12,11 @@ export {
12
12
  RankingBuilder,
13
13
  };
14
14
 
15
- export * from "./ranking-history";
16
- export * from "./params";
17
- export { NarouParams } from "./narou";
18
- export * from "./narou-search-results";
19
- export * from "./narou-ranking-results";
20
- export * from "./search-builder";
21
- export * from "./search-builder-r18";
22
- export * from "./user-search";
15
+ export * from "./ranking-history.js";
16
+ export * from "./params.js";
17
+ export type { NarouParams } from "./narou.js";
18
+ export * from "./narou-search-results.js";
19
+ export type * from "./narou-ranking-results.js";
20
+ export * from "./search-builder.js";
21
+ export * from "./search-builder-r18.js";
22
+ export * from "./user-search.js";
package/src/index.ts CHANGED
@@ -1,13 +1,13 @@
1
- import NarouNovel from "./narou";
2
- import NarouNovelFetch from "./narou-fetch";
3
- import NarouNovelJsonp from "./narou-jsonp";
4
- import RankingBuilder from "./ranking";
5
- import { formatRankingHistory, RankingHistoryResult } from "./ranking-history";
6
- import SearchBuilder from "./search-builder";
7
- import SearchBuilderR18 from "./search-builder-r18";
8
- import UserSearchBuilder from "./user-search";
1
+ import type NarouNovel from "./narou.js";
2
+ import NarouNovelFetch from "./narou-fetch.js";
3
+ import NarouNovelJsonp from "./narou-jsonp.js";
4
+ import RankingBuilder from "./ranking.js";
5
+ import { formatRankingHistory, RankingHistoryResult } from "./ranking-history.js";
6
+ import SearchBuilder from "./search-builder.js";
7
+ import SearchBuilderR18 from "./search-builder-r18.js";
8
+ import UserSearchBuilder from "./user-search.js";
9
9
 
10
- export * from "./index.common";
10
+ export * from "./index.common.js";
11
11
  export { NarouNovelFetch, NarouNovelJsonp };
12
12
 
13
13
  const narouNovelFetch = new NarouNovelFetch();
@@ -1,5 +1,6 @@
1
- import { unzipp } from "./util/unzipp";
2
- import NarouNovel, { NarouParams } from "./narou";
1
+ import { unzipp } from "./util/unzipp.js";
2
+ import NarouNovel from "./narou.js";
3
+ import type { NarouParams } from "./narou.js";
3
4
 
4
5
  type Fetch = typeof fetch;
5
6
 
@@ -7,7 +8,11 @@ type Fetch = typeof fetch;
7
8
  * なろう小説APIへのリクエストを実行する
8
9
  */
9
10
  export default class NarouNovelFetch extends NarouNovel {
10
- constructor(private fetch: Fetch = require('node-fetch')) {
11
+ /**
12
+ * コンストラクタ
13
+ * @param fetch fetch関数(デフォルトはネイティブのfetch)
14
+ */
15
+ constructor(private fetch?: Fetch) {
11
16
  super();
12
17
  }
13
18
 
@@ -28,7 +33,7 @@ export default class NarouNovelFetch extends NarouNovel {
28
33
  }
29
34
  });
30
35
 
31
- const res = await this.fetch(url);
36
+ const res = await (this.fetch ?? fetch)(url);
32
37
 
33
38
  if (query.gzip === 0) {
34
39
  return (await res.json()) as T;
@@ -1,5 +1,6 @@
1
- import NarouNovel, { NarouParams } from "./narou";
2
- import { jsonp } from "./util/jsonp";
1
+ import NarouNovel from "./narou.js";
2
+ import type { NarouParams } from "./narou.js";
3
+ import { jsonp } from "./util/jsonp.js";
3
4
 
4
5
  /**
5
6
  * なろう小説APIへのリクエストを実行する
@@ -1,6 +1,6 @@
1
- import { PickedNarouSearchResult } from "./narou-search-results";
2
- import { SearchResultFieldNames } from "./params";
3
- import { DefaultSearchResultFields } from "./search-builder";
1
+ import type { PickedNarouSearchResult } from "./narou-search-results.js";
2
+ import type { SearchResultFieldNames } from "./params.js";
3
+ import type { DefaultSearchResultFields } from "./search-builder.js";
4
4
 
5
5
  /**
6
6
  * ランキングAPIの結果
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  BooleanNumber as BooleanNumber,
3
3
  Genre,
4
4
  R18Site,
@@ -8,7 +8,7 @@ import {
8
8
  R18Fields,
9
9
  OptionalFields,
10
10
  UserFields,
11
- } from "./params";
11
+ } from "./params.js";
12
12
 
13
13
  /**
14
14
  * なろう小説API検索結果
package/src/narou.ts CHANGED
@@ -1,15 +1,16 @@
1
- import { NarouRankingResult } from "./narou-ranking-results";
2
- import NarouSearchResults, {
1
+ import type { NarouRankingResult } from "./narou-ranking-results.js";
2
+ import NarouSearchResults from "./narou-search-results.js";
3
+ import type {
3
4
  NarouSearchResult,
4
5
  UserSearchResult,
5
- } from "./narou-search-results";
6
- import {
6
+ } from "./narou-search-results.js";
7
+ import type {
7
8
  RankingHistoryParams,
8
9
  RankingParams,
9
10
  SearchParams,
10
11
  UserSearchParams,
11
- } from "./params";
12
- import { RankingHistoryRawResult } from "./ranking-history";
12
+ } from "./params.js";
13
+ import type { RankingHistoryRawResult } from "./ranking-history.js";
13
14
 
14
15
  /**
15
16
  * なろう小説APIへのリクエストパラメータ
package/src/params.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { NarouSearchResult, UserSearchResult } from "./narou-search-results";
2
- import { Join } from "./util/type";
1
+ import type { NarouSearchResult, UserSearchResult } from "./narou-search-results.js";
2
+ import type { Join } from "./util/type.js";
3
3
 
4
4
  export const RankingType = {
5
5
  Daily: "d",
@@ -1,5 +1,5 @@
1
1
  import { parse } from "date-fns";
2
- import { RankingType } from "./params";
2
+ import type { RankingType } from "./params.js";
3
3
 
4
4
  const dateFormat = "yyyyMMdd";
5
5
 
package/src/ranking.ts CHANGED
@@ -1,15 +1,18 @@
1
- import { NarouRankingResult, RankingResult } from "./narou-ranking-results";
2
- import SearchBuilder, { DefaultSearchResultFields } from "./search-builder";
1
+ import type { NarouRankingResult, RankingResult } from "./narou-ranking-results.js";
2
+ import SearchBuilder from "./search-builder.js";
3
+ import type { DefaultSearchResultFields } from "./search-builder.js";
3
4
  import { addDays, format } from "date-fns";
4
- import {
5
- Fields,
5
+ import type {
6
6
  GzipLevel,
7
7
  OptionalFields,
8
+ } from "./params.js";
9
+ import {
8
10
  RankingParams,
9
11
  RankingType,
10
- } from "./params";
11
- import NarouNovel from "./narou";
12
- import { SearchResultFields } from "./narou-search-results";
12
+ Fields,
13
+ } from "./params.js";
14
+ import type NarouNovel from "./narou.js";
15
+ import type { SearchResultFields } from "./narou-search-results.js";
13
16
 
14
17
  const dateFormat = "yyyyMMdd";
15
18
 
@@ -1,15 +1,16 @@
1
- import { NovelSearchBuilderBase } from "./search-builder";
2
- import NarouSearchResults, {
1
+ import { NovelSearchBuilderBase } from "./search-builder.js";
2
+ import type NarouSearchResults from "./narou-search-results.js";
3
+ import type {
3
4
  NarouSearchResult,
4
5
  SearchResultR18Fields,
5
6
  SearchResultOptionalFields,
6
- } from "./narou-search-results";
7
- import {
7
+ } from "./narou-search-results.js";
8
+ import type {
8
9
  R18Site,
9
10
  SearchResultFieldNames,
10
11
  R18Fields,
11
12
  OptionalFields,
12
- } from "./params";
13
+ } from "./params.js";
13
14
 
14
15
  export type DefaultR18SearchResultFields = keyof Omit<
15
16
  NarouSearchResult,
@@ -1,16 +1,14 @@
1
- import NarouNovel from "./narou";
2
- import {
1
+ import type NarouNovel from "./narou.js";
2
+ import type {
3
3
  NarouSearchResult,
4
4
  SearchResultFields,
5
5
  SearchResultOptionalFields,
6
- } from "./narou-search-results";
7
- import NarouSearchResults from "./narou-search-results";
8
- import {
6
+ } from "./narou-search-results.js";
7
+ import type NarouSearchResults from "./narou-search-results.js";
8
+ import type {
9
9
  BigGenre,
10
- BooleanNumber,
11
10
  SearchResultFieldNames,
12
11
  Genre,
13
- StopParam,
14
12
  SearchParams,
15
13
  Fields,
16
14
  Order,
@@ -19,8 +17,9 @@ import {
19
17
  GzipLevel,
20
18
  OptionalFields,
21
19
  ParamsBaseWithOrder,
22
- } from "./params";
23
- import { Join } from "./util/type";
20
+ } from "./params.js";
21
+ import { BooleanNumber, StopParam } from "./params.js";
22
+ import type { Join } from "./util/type.js";
24
23
 
25
24
  export type DefaultSearchResultFields = keyof Omit<
26
25
  NarouSearchResult,
@@ -38,7 +37,7 @@ export abstract class SearchBuilderBase<
38
37
  constructor(
39
38
  protected params: TParams = {} as TParams,
40
39
  protected api: NarouNovel
41
- ) {}
40
+ ) { }
42
41
 
43
42
  protected static distinct<T>(array: readonly T[]): T[] {
44
43
  return Array.from(new Set(array));
@@ -1,9 +1,10 @@
1
- import NarouSearchResults, {
1
+ import NarouSearchResults from "./narou-search-results.js";
2
+ import type {
2
3
  UserSearchResult,
3
4
  UserSearchResultFields,
4
- } from "./narou-search-results";
5
- import { UserFields, UserOrder, UserSearchParams } from "./params";
6
- import { SearchBuilderBase } from "./search-builder";
5
+ } from "./narou-search-results.js";
6
+ import type { UserFields, UserOrder, UserSearchParams } from "./params.js";
7
+ import { SearchBuilderBase } from "./search-builder.js";
7
8
 
8
9
  /**
9
10
  * なろうユーザ検索API