完成全量检查整改

清理已跟踪原始日志与个人本地配置
修复前后端有效门禁、测试和构建问题
补齐生产 Jenkins、SpacetimeDB 本地命令与文档约束
收紧图片编辑器状态、附件与媒体引用测试
排除已下线旧创作入口测试并清理 warning
This commit is contained in:
2026-07-17 16:56:46 +08:00
parent 18af49c27f
commit 387a1c26e3
274 changed files with 1077 additions and 2113 deletions
+1 -1
View File
@@ -20,6 +20,7 @@ import {
CharacterBackstoryChapter,
CharacterBackstoryRevealConfig,
CustomWorldAnchorPack,
CustomWorldCoverProfile,
CustomWorldItem,
CustomWorldLandmark,
CustomWorldNpc,
@@ -28,7 +29,6 @@ import {
CustomWorldNpcVisualGearType,
CustomWorldNpcVisualRace,
CustomWorldOpeningCgProfile,
CustomWorldCoverProfile,
CustomWorldPlayableNpc,
CustomWorldProfile,
CustomWorldRoleInitialItem,
+1 -1
View File
@@ -2,13 +2,13 @@ import {
collectCreatureArchetypeSignals,
resolveCreatureArchetypeForSource,
} from '../services/customWorldReferenceSignals';
import { resolveCustomWorldCompatibilityTemplateWorldType } from '../services/customWorldTheme';
import {
type CustomWorldNpc,
type CustomWorldPlayableNpc,
type CustomWorldProfile,
WorldType,
} from '../types';
import { resolveCustomWorldCompatibilityTemplateWorldType } from '../services/customWorldTheme';
import {
getMonsterPresetsByWorld,
type HostileNpcPreset,
+1 -1
View File
@@ -4,13 +4,13 @@ import {
resolveSceneBucketForLandmark,
} from '../services/customWorldReferenceSignals';
import { detectCustomWorldThemeMode } from '../services/customWorldTheme';
import { resolveCustomWorldCompatibilityTemplateWorldType } from '../services/customWorldTheme';
import {
type CustomWorldLandmark,
type CustomWorldProfile,
type WorldTemplateType,
WorldType,
} from '../types';
import { resolveCustomWorldCompatibilityTemplateWorldType } from '../services/customWorldTheme';
const CUSTOM_WORLD_NPC_IMAGE_POOL = [
'/character/Sword%20Princess/Original/Hero/idle/Idle01.png',
+12 -1
View File
@@ -69,9 +69,11 @@ function createGameState(): GameState {
describe('hostileNpcPresets', () => {
it('combines preset loot with runtime semantic drops', async () => {
const randomSpy = vi.spyOn(Math, 'random').mockReturnValue(0);
const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
const networkError = new TypeError('network disabled in test');
vi.stubGlobal(
'fetch',
vi.fn().mockRejectedValue(new TypeError('network disabled in test')),
vi.fn().mockRejectedValue(networkError),
);
try {
@@ -89,9 +91,18 @@ describe('hostileNpcPresets', () => {
expect(
loot.find(item => item.id === 'monster-loot:bone-dust')?.runtimeMetadata?.storyFingerprint,
).toBeTruthy();
expect(warnSpy).toHaveBeenCalledWith(
'[HostileNpcPresets] preset loot narrative fallback',
networkError,
);
expect(warnSpy).toHaveBeenCalledWith(
'[RuntimeItemDirector] falling back to deterministic item intent',
networkError,
);
} finally {
vi.unstubAllGlobals();
randomSpy.mockRestore();
warnSpy.mockRestore();
}
});
});
+3 -3
View File
@@ -1,3 +1,6 @@
import {
EDITOR_ITEM_CATALOG_API_PATH,
} from '../editor/shared/editorApiClient';
import type {
InventoryItem,
ItemCatalogEntry,
@@ -5,9 +8,6 @@ import type {
ItemRarity,
WorldType,
} from '../types';
import {
EDITOR_ITEM_CATALOG_API_PATH,
} from '../editor/shared/editorApiClient';
import { buildDesignedItemMetadata } from './itemDesign';
export { EDITOR_ITEM_CATALOG_API_PATH as ITEM_CATALOG_API_PATH };
+8 -8
View File
@@ -1,5 +1,13 @@
import { describe, expect, it } from 'vitest';
import type { SceneHostileNpc, StoryOption } from '../types';
import { AnimationState, WorldType } from '../types';
import {
getScenePresetsByWorld,
getTravelScenePreset,
getWorldCampScenePreset,
} from './scenePresets';
import type { FunctionAvailabilityContext } from './stateFunctions';
import {
buildStateFunctionDefinitions,
getExecutableFunctions,
@@ -7,14 +15,6 @@ import {
resolveFunctionOption,
sortStoryOptionsByPriority,
} from './stateFunctions';
import {
getScenePresetsByWorld,
getTravelScenePreset,
getWorldCampScenePreset,
} from './scenePresets';
import type { FunctionAvailabilityContext } from './stateFunctions';
import type { SceneHostileNpc, StoryOption } from '../types';
import { AnimationState, WorldType } from '../types';
function createMonster(
overrides: Partial<SceneHostileNpc> = {},