@cloud411716/fancy-webnovel 1.0.2 → 1.0.4

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.
@@ -10,7 +10,7 @@ import { join } from 'path';
10
10
  import { notify } from '../../infra.js';
11
11
  import { initProject } from './init-project.js';
12
12
 
13
- export const inject = ['commands', 'userQuestions'];
13
+ export const inject = ['commands', 'userQuestions', 'timer'];
14
14
 
15
15
  function isValidPath(p) {
16
16
  return (
@@ -14,7 +14,7 @@ import * as fanqie from './platforms/fanqie.js';
14
14
  import * as jinjiang from './platforms/jinjiang.js';
15
15
  import * as qimao from './platforms/qimao.js';
16
16
 
17
- export const inject = ['commands', 'userQuestions'];
17
+ export const inject = ['commands', 'userQuestions', 'timer'];
18
18
 
19
19
  const PLATFORM_TABLE = [
20
20
  ['1', 'qidian', '起点'],
@@ -170,14 +170,17 @@ export function apply(ctx) {
170
170
  ? platformRanks.filter(r => r.id !== '__all__').map(r => r.id)
171
171
  : rawChoices;
172
172
 
173
- // Resolve id → full rank entry, dedup
173
+ // Resolve id → full rank entry, dedup; attach platform name for scraper routing
174
174
  const rankEntries = [];
175
175
  const seen = new Set();
176
176
  for (const id of rankIds) {
177
177
  const entry = platformRanks.find(r => r.id === id || r.label === id);
178
178
  if (entry) {
179
179
  const key = `${entry.channel}__${entry.type}`;
180
- if (!seen.has(key)) { seen.add(key); rankEntries.push(entry); }
180
+ if (!seen.has(key)) {
181
+ seen.add(key);
182
+ rankEntries.push({ ...entry, platform });
183
+ }
181
184
  }
182
185
  }
183
186
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud411716/fancy-webnovel",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {