book-index-ui 0.48.0 → 0.48.2
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.
- package/dist/index.cjs +70 -70
- package/dist/index.d.ts +12 -9
- package/dist/index.js +2574 -2553
- package/dist/storage-entry-BFVAZmvt.cjs +2 -0
- package/dist/{storage-entry-B-e0v_B2.js → storage-entry-DQ9kOLVb.js} +463 -441
- package/dist/storage.cjs +1 -1
- package/dist/storage.d.ts +12 -9
- package/dist/storage.js +1 -1
- package/package.json +1 -1
- package/dist/storage-entry-BDcJjAiW.cjs +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -572,9 +572,13 @@ export declare class BundleStorage implements IndexStorage {
|
|
|
572
572
|
private tiyaoLoading;
|
|
573
573
|
private metaCache;
|
|
574
574
|
private metaLoading;
|
|
575
|
-
/** draft_id → production_id
|
|
575
|
+
/** draft_id → production_id 重定向表(整档,从 /data/promotions.json 加载;只在分片取不到时才用) */
|
|
576
576
|
private promotions;
|
|
577
577
|
private promotionsLoading;
|
|
578
|
+
/** 整档加载失败时 `promotions` 是个空表占位;此时它不是权威,后续查询仍要先试分片 */
|
|
579
|
+
private promotionsLoadFailed;
|
|
580
|
+
/** 草稿 id 末 2 位 → 该片的 draft→production 表;null=这一片取不到(旧站点包没有 promotions/ 目录等),退回整档 */
|
|
581
|
+
private promotionShards;
|
|
578
582
|
/** 数据版本(commitId 前 12 位)。null=已尝试加载但失败;undefined=未加载 */
|
|
579
583
|
private version;
|
|
580
584
|
private versionPromise;
|
|
@@ -589,6 +593,13 @@ export declare class BundleStorage implements IndexStorage {
|
|
|
589
593
|
private ensureVersion;
|
|
590
594
|
private fetchJson;
|
|
591
595
|
private ensurePromotions;
|
|
596
|
+
/** 取草稿 id 所在的一片 `promotions/<末2位>.json`(几 KB);取不到返回 null,调用方退回整档 */
|
|
597
|
+
private promotionShard;
|
|
598
|
+
/**
|
|
599
|
+
* 草稿 id → 正式 id(不是草稿就原样)。整档已在内存就直接查;否则先只取 id 所在那一片,
|
|
600
|
+
* 取不到才下整档 promotions.json(整档保留一个客户端发版周期,之后可停)。
|
|
601
|
+
*/
|
|
602
|
+
private canonicalIdFor;
|
|
592
603
|
/** Load manifest listing all chunk prefixes */
|
|
593
604
|
private loadManifest;
|
|
594
605
|
/** Find the chunk prefix for a given ID using the manifest */
|
|
@@ -4767,14 +4778,6 @@ export declare function pickReaderVersion(versions: readonly ReaderVersion[] | u
|
|
|
4767
4778
|
/** 当前版本:key 有效就用它,否则 default(versions[0]) */
|
|
4768
4779
|
export declare function pickTextVersion(manifest: TextManifest | null | undefined, key?: string | null): TextVersion | undefined;
|
|
4769
4780
|
|
|
4770
|
-
/**
|
|
4771
|
-
* Draft → Production 升级映射的客户端读取。
|
|
4772
|
-
*
|
|
4773
|
-
* 文件格式由 book_index_manager/promotion.py 写出,参考:
|
|
4774
|
-
* d:/workspace/overview/项目进展/古籍索引网站/整体设计/2026-05-Draft到Production升级流程.md
|
|
4775
|
-
*
|
|
4776
|
-
* 这里只关心客户端如何拉取并用作 redirect 查表 —— 不涉及生成逻辑。
|
|
4777
|
-
*/
|
|
4778
4781
|
export declare interface PromotionRecord {
|
|
4779
4782
|
production_id: string;
|
|
4780
4783
|
type: string;
|