@cloud411716/fancy-webnovel 1.0.1 → 1.0.3

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.
@@ -122,7 +122,9 @@ export function apply(ctx) {
122
122
  }
123
123
 
124
124
  // ---------- init (in-process, no subprocess) ----------
125
- notify(session, bootstrap.notify({ type: 'initializing', projectRoot }));
125
+ // Yield to the event loop so DSH's "问卷已答" acknowledgement
126
+ // is flushed to the UI before we append our own messages.
127
+ await Promise.resolve();
126
128
 
127
129
  const result = await initProject(projectRoot);
128
130
 
@@ -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.1",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {