fix(wechat): deliver failure notices and hot-swappable wechat-mp bundle
Notify users when HTML publish guards reject stub pages instead of silently failing, send real page links when non-stub files exist, and split wechat-mp into wechat-mp.bundle.mjs for fast production updates without full portal rebuilds. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+4
-4
@@ -2084,7 +2084,7 @@ test('wechat mp service recreates poisoned dedicated session after bare completi
|
||||
assert.match(payload.text.content, /页面生成未完成|hello\.html/);
|
||||
});
|
||||
|
||||
test('wechat mp service recreates dedicated session when html was written before loading static-page-publish skill', async () => {
|
||||
test('wechat mp service forwards html link when write_file created a real page without static-page-publish skill', async () => {
|
||||
const token = 'token';
|
||||
const timestamp = '1710000000';
|
||||
const nonce = 'nonce';
|
||||
@@ -2249,11 +2249,11 @@ test('wechat mp service recreates dedicated session when html was written before
|
||||
crypto.randomUUID = originalRandomUuid;
|
||||
}
|
||||
|
||||
assert.equal(routeCleared, true);
|
||||
assert.equal(started, true);
|
||||
assert.equal(routeCleared, false);
|
||||
assert.equal(started, false);
|
||||
const sendCall = wechatCalls.find(([url]) => String(url).includes('/cgi-bin/message/custom/send'));
|
||||
const payload = JSON.parse(sendCall[2]);
|
||||
assert.match(payload.text.content, /Hello World/);
|
||||
assert.match(payload.text.content, /hello-world\.html/);
|
||||
assert.match(payload.text.content, /https:\/\/m\.tkmind\.cn\/MindSpace\/.+\/public\/hello-world\.html/);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user