|
|
@@ -244,6 +244,8 @@ try {
|
|
|
if (searchNavigationSchema.creatable !== false || ['id','type','state','time','adminId','orderId','linkType','linkState','sourceKey'].some((name) => searchNavigationFieldMap[name]?.writable !== false)) throw new Error('快捷入口结构字段未从新增或通用编辑中隔离');
|
|
|
const searchNavigationPage = await callFunction('xiaoshu/admin/gateway', login.sessionToken, { operation: 'searchNavigations', className: 'Search', type: 1, state: -100, elite: -100, page: 1, pageSize: 20 });
|
|
|
if (!Array.isArray(searchNavigationPage.results) || !searchNavigationPage.results.length || searchNavigationPage.results.some((entry) => Number(entry.type) !== 1)) throw new Error('后台快捷入口筛选列表返回异常');
|
|
|
+ const apiCatalog = await callFunction('xiaoshu/admin/gateway', login.sessionToken, { operation: 'apiCatalog' });
|
|
|
+ if (!Array.isArray(apiCatalog.results) || apiCatalog.results.length < 9 || apiCatalog.results.some((entry) => !String(entry.path || '').startsWith('xiaoshu/') || Object.prototype.hasOwnProperty.call(entry, 'code'))) throw new Error('云函数接口目录缺失或泄露了源码');
|
|
|
await callFunctionError('xiaoshu/admin/gateway', login.sessionToken, { operation: 'save', className: 'Node', fields: { nodeName: '禁止通用新增' } }, 400);
|
|
|
const nodeSuffix = Date.now().toString(36);
|
|
|
const rootNode = await callFunction('xiaoshu/admin/gateway', login.sessionToken, { operation: 'saveNode', className: 'Node', parentId: 0, fields: { nodeName: `云函数冒烟栏目-${nodeSuffix}`, nodeDir: `smoke-${nodeSuffix}`, nodeType: 1, contentModel: '54' } });
|
|
|
@@ -440,6 +442,10 @@ try {
|
|
|
if (!String(searchNavigationCreateBlocked.message).includes('保留 id')) throw new Error('快捷入口新增未返回明确旧 ID 阻塞原因');
|
|
|
const searchNavigationStartBlocked = await callFunctionError('xiaoshu/admin/gateway', login.sessionToken, { operation: 'searchNavigationBatch', className: 'Search', action: 'starturl', objectIds: ['not-used'] }, 501);
|
|
|
if (!String(searchNavigationStartBlocked.message).includes('SiteConfig')) throw new Error('快捷入口全局起始页未返回明确阻塞原因');
|
|
|
+ for (const action of ['APIInfo_Submit','APIInfo_SwaggerClose','APIInfo_SwaggerOpen','LicenceFile_API','close_system','Hotkey','HotkeyAdd','HotkeyAdd_Submit','Hotkey_API','Prize','Prize_Submit']) {
|
|
|
+ const configBlocked = await callFunctionError('xiaoshu/admin/gateway', login.sessionToken, { operation: 'legacyConfigBlocker', action }, 501);
|
|
|
+ if (!String(configBlocked.message).startsWith('migration_blocked:')) throw new Error(`旧配置动作 ${action} 未返回明确阻塞原因`);
|
|
|
+ }
|
|
|
if (dictionaryCategory.company?.__type !== 'Pointer' || JSON.stringify(dictionaryCategory).match(/accessToken|mch_key|"ak"|"sk"/i)) throw new Error('后台响应展开了帐套敏感配置');
|
|
|
const examPointSuffix = Date.now().toString(36);
|
|
|
const rootExamPoint = await callFunction('xiaoshu/admin/gateway', login.sessionToken, { operation: 'saveExamPoint', className: 'ExamPoint', parentId: 0, orderId: 0, fields: { testPoint: `冒烟考点-${examPointSuffix}` } });
|
|
|
@@ -675,7 +681,7 @@ try {
|
|
|
const productBlocked = await callLegacyFunction('', { action: 'product_list' }, 501);
|
|
|
if (!String(productBlocked.retmsg).includes('ZL_Commodities')) throw new Error('缺商品主表的读取接口未明确阻塞');
|
|
|
|
|
|
- console.log('Cloud smoke passed: admin auth/tenant/account lifecycle/group sync/node/special/guest-category/bar/exam-class/exam-point/knowledge/exam-teacher/dictionary/grade-dictionary/currency/holiday/search-navigation/model/guestbook lifecycle/content workflow/CRUD reads, CMS projections, normalized learning joins, app action coverage, public content, session scope, explicit blocked APIs.');
|
|
|
+ console.log('Cloud smoke passed: admin auth/tenant/account lifecycle/group sync/node/special/guest-category/bar/exam-class/exam-point/knowledge/exam-teacher/dictionary/grade-dictionary/currency/holiday/search-navigation/api-catalog/config-blockers/model/guestbook lifecycle/content workflow/CRUD reads, CMS projections, normalized learning joins, app action coverage, public content, session scope, explicit blocked APIs.');
|
|
|
} finally {
|
|
|
if (contentHitObjectId) await jsonRequest(`${PARSE_URL}/classes/CommonModel/${contentHitObjectId}`, { method: 'PUT', body: JSON.stringify({ hits: contentHitOriginal }) }, true).catch((error) => {
|
|
|
console.error(`公开内容浏览量恢复失败:${error.message}`);
|