@pisell/pisellos 2.2.191 → 2.2.192

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.
@@ -3,36 +3,6 @@ import { BaseModule } from '../../../modules/BaseModule';
3
3
  import { ProductData } from '../../../modules/Product/types';
4
4
  import type { RouteDefinition } from '../../types';
5
5
  import { ProductIdScope, ProductFormatter, ProductFormatterContext } from './types';
6
- /** 商品模块流程调试日志条目 */
7
- interface ProductFlowLogEntry {
8
- ts: string;
9
- step: string;
10
- metadata?: Record<string, unknown>;
11
- }
12
- /** 单个商品 IndexDB 写入记录 */
13
- interface ProductWriteStatEntry {
14
- ts: string;
15
- writeSeq: number;
16
- source: string;
17
- writeMethod: string;
18
- productId: number;
19
- mergeAction?: 'insert' | 'update' | 'snapshot' | 'delete';
20
- }
21
- declare global {
22
- interface Window {
23
- __productModuleFlowLogs?: ProductFlowLogEntry[];
24
- __productModuleWriteStats?: Record<string, ProductWriteStatEntry[]>;
25
- clearProductModuleFlowLogs?: () => void;
26
- exportProductModuleFlowLogs?: () => string;
27
- exportProductModuleWriteStats?: () => string;
28
- summarizeProductModuleWrites?: (topN?: number) => Array<{
29
- productId: number;
30
- writeCount: number;
31
- sources: string[];
32
- lastWriteAt: string;
33
- }>;
34
- }
35
- }
36
6
  /**
37
7
  * Products 模块 - 用于获取和管理完整的商品详细数据
38
8
  * 相比 ProductList 模块,Products 会获取所有详细信息并缓存
@@ -57,8 +27,6 @@ export declare class ProductsModule extends BaseModule implements Module {
57
27
  private productDataSource;
58
28
  private pendingSyncMessages;
59
29
  private syncTimer?;
60
- /** IndexDB 写入序号,便于日志关联 */
61
- private productFlowWriteSeq;
62
30
  /** 最近一次 SSE 全量拉取完成时间 */
63
31
  private lastServerFullFetchAtMs;
64
32
  /** 最近一次 preload 完成时间(含 IndexDB 命中) */
@@ -85,30 +53,6 @@ export declare class ProductsModule extends BaseModule implements Module {
85
53
  * @param metadata 日志元数据
86
54
  */
87
55
  private logError;
88
- /**
89
- * 初始化 window 上的商品流程调试日志。
90
- *
91
- * @example
92
- * window.clearProductModuleFlowLogs()
93
- * copy(window.exportProductModuleFlowLogs?.() || '[]')
94
- */
95
- private initProductFlowLogs;
96
- /**
97
- * 写入 window 商品流程调试日志。
98
- *
99
- * @example
100
- * this.pushProductFlowLog('mergeProductsToStore.start', { count: 3 })
101
- */
102
- private pushProductFlowLog;
103
- /** 当前内存 store 快照,供流程日志使用 */
104
- private getProductStoreSnapshot;
105
- /**
106
- * 记录 IndexDB 写入统计(按 productId 聚合)。
107
- *
108
- * @example
109
- * this.trackProductWrite('pubsub.mergeProductsToStore', 'clear+bulkUpdate', products, { 1: 'update' })
110
- */
111
- private trackProductWrite;
112
56
  /**
113
57
  * 加载商品价格(原始方法,不带缓存)
114
58
  * @private
@@ -371,4 +315,3 @@ export declare class ProductsModule extends BaseModule implements Module {
371
315
  */
372
316
  getRoutes(): RouteDefinition[];
373
317
  }
374
- export {};