@apprun/shiqu 0.7.0 → 0.8.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.
- package/NOTICE +2 -2
- package/README.md +71 -163
- package/dist/client/assets/{es-DlNSYSrl.js → es-uh-GOicn.js} +1 -1
- package/dist/client/assets/index-BIsu-Bxs.js +17 -0
- package/dist/client/assets/{index-BOFTbC7e.css → index-DRwygcbT.css} +1 -1
- package/dist/client/assets/{reader-pdf-Dcx6AQ3i.js → reader-pdf-B-dCuB6F.js} +3 -3
- package/dist/client/assets/reader-png-B1iE7LNk.js +1 -0
- package/dist/client/assets/{reader-zip-hDWZbXX9.js → reader-zip-kwzPi4VM.js} +5 -5
- package/dist/client/index.html +2 -2
- package/dist/client/offline.html +3 -1
- package/dist/client/sw.js +1 -1
- package/dist/server/cli.js +1422 -1307
- package/docker/seed.sql +1 -5
- package/drizzle/0018_consolidate_story_storage.sql +13 -0
- package/drizzle/0019_refuse_pre_consolidation_apps.sql +9 -0
- package/package.json +1 -1
- package/dist/client/assets/index-BBpP1F_U.js +0 -17
- package/dist/client/assets/reader-png-B6Cj2Di0.js +0 -1
package/docker/seed.sql
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
-- Initialize book metadata only. New libraries contain no finished stories.
|
|
2
|
-
INSERT INTO books (id,title,author,era,source_url,excerpt,note) VALUES ('liaozhai','聊斋志异','蒲松龄','清','
|
|
3
|
-
|
|
4
|
-
肆中傭保者,見喋聒不堪,遂出錢市一枚,付道士,道士拜謝,謂眾曰:「出家人不解吝惜,我有佳梨,請出供客。」或曰:「既有之,何不自食?」曰:「吾特需此核作種。」於是掬梨大啗,且盡,把核於手,解肩上鑱坎地上深數寸,納之,而覆以土,向市人索湯沃灌。好事者,於臨路店,索得沸瀋,道士接浸坎處。萬目攢視,見有勾萌出,漸大,俄成樹,枝葉扶疏,倏而花,倏而實,碩大芳馥,纍纍滿樹。道人乃即樹頭,摘賜觀者,頃刻而盡,已乃以鑱伐樹,丁丁良久乃斷,帶葉荷肩頭從容徐步而去。
|
|
5
|
-
|
|
6
|
-
初道士作法時,鄉人亦雜眾中,引領注目,竟忘其業。道士既去,始顧車中,則梨已空矣,方悟適所俵散,皆己物也。又細視車上一靶亡,是新鑿斷者,心大憤恨。急跡之,轉過牆隅,則斷靶棄垣下,始知所伐梨本,即是物也。道士不知所在,一市粲然。','已录入《种梨》原文。其他篇目需提供可靠原文后再改编。') ON CONFLICT(id) DO NOTHING;
|
|
2
|
+
INSERT INTO books (id,title,author,era,source_url,excerpt,note) VALUES ('liaozhai','聊斋志异','蒲松龄','清','','','待录入选定篇目的原文与来源。') ON CONFLICT(id) DO NOTHING;
|
|
7
3
|
INSERT INTO books (id,title,author,era,source_url,excerpt,note) VALUES ('shishuo','世说新语','刘义庆 编','南朝宋','','','待录入选定篇目的原文与来源。') ON CONFLICT(id) DO NOTHING;
|
|
8
4
|
INSERT INTO books (id,title,author,era,source_url,excerpt,note) VALUES ('zhuangzi','庄子','庄周等','先秦','','','待录入选定篇目的原文与来源。') ON CONFLICT(id) DO NOTHING;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
-- The coordinator inventories files and verifies recovery before this destructive transaction.
|
|
2
|
+
DELETE FROM book_image_references WHERE story_id NOT IN (SELECT id FROM reader_sessions);
|
|
3
|
+
DELETE FROM events WHERE story_id NOT IN (SELECT id FROM reader_sessions);
|
|
4
|
+
DELETE FROM library_deletions WHERE kind='published';
|
|
5
|
+
-- liaozhai returns to the seed placeholder so upgraded and new libraries hold the same catalog row.
|
|
6
|
+
UPDATE books SET excerpt='',source_url='',note=CASE id WHEN 'liaozhai' THEN '待录入选定篇目的原文与来源。' ELSE '' END WHERE id IN ('liaozhai','zhongshanlang');
|
|
7
|
+
DELETE FROM books WHERE id='zhongshanlang' AND NOT EXISTS (
|
|
8
|
+
SELECT 1 FROM reader_sessions WHERE json_extract(selection,'$.bookId')='zhongshanlang');
|
|
9
|
+
DROP TABLE stories;
|
|
10
|
+
DROP TABLE jobs;
|
|
11
|
+
DROP TABLE progress;
|
|
12
|
+
ALTER TABLE reader_sessions RENAME TO stories;
|
|
13
|
+
PRAGMA user_version=1;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
-- Released 0.2-0.7 apps have no schema-version check, but each one seeds liaozhai first with its
|
|
2
|
+
-- source URL and demo text on every open. Abort that write so they refuse this library with a clear
|
|
3
|
+
-- message instead of opening it and failing every story request. The 0.8+ seed row is empty.
|
|
4
|
+
-- 0.7 CLI receipts show only EXPORT_/BACKUP_/SKILL_ messages, so the code uses the BACKUP_ prefix.
|
|
5
|
+
CREATE TRIGGER books_refuse_pre_consolidation_seed BEFORE INSERT ON books
|
|
6
|
+
WHEN NEW.id='liaozhai' AND (NEW.source_url<>'' OR NEW.excerpt<>'')
|
|
7
|
+
BEGIN
|
|
8
|
+
SELECT RAISE(ABORT,'BACKUP_APP_TOO_OLD: this library requires Shiqu 0.8.0 or later; update the app, or restore the pre-upgrade backup with its matching older app');
|
|
9
|
+
END;
|