Phase 002: rebrand to hermes-ui and consolidate i18n to zh/en
Removes the ekko / hermes-web-ui branding from the whole tree and drops eight locale files, so the project presents one name and one language pair. Data compatibility is deliberate, not accidental: DB filenames, the JWT audience, and skill manifest ownership all still recognise their pre-rename values so existing deployments under ~/.hermes-web-ui keep working without a re-login or a re-injection. scripts/harness-check.mjs now scans for the legacy strings and fails the build on any new occurrence, with an explicit allow-list (and reasons) for the compatibility paths that must keep them.
This commit is contained in:
@@ -18,7 +18,7 @@ vi.mock('../../packages/server/src/services/hermes/hermes-profile', () => ({
|
||||
}))
|
||||
|
||||
vi.mock('../../packages/server/src/services/hermes/upload-paths', () => ({
|
||||
getProfileUploadDir: vi.fn((profile: string) => `/tmp/hermes-web-ui/upload/${profile}`),
|
||||
getProfileUploadDir: vi.fn((profile: string) => `/tmp/hermes-ui/upload/${profile}`),
|
||||
}))
|
||||
|
||||
function multipartBody(
|
||||
@@ -62,10 +62,10 @@ describe('upload controller', () => {
|
||||
|
||||
await handleUpload(ctx)
|
||||
|
||||
expect(mkdirMock).toHaveBeenCalledWith('/tmp/hermes-web-ui/upload/research', { recursive: true })
|
||||
expect(mkdirMock).toHaveBeenCalledWith('/tmp/hermes-ui/upload/research', { recursive: true })
|
||||
expect(writeFileMock).toHaveBeenCalledOnce()
|
||||
const [savedPath, data] = writeFileMock.mock.calls[0]
|
||||
expect(normalizePath(savedPath)).toMatch(/^\/tmp\/hermes-web-ui\/upload\/research\/[a-f0-9]+\.txt$/)
|
||||
expect(normalizePath(savedPath)).toMatch(/^\/tmp\/hermes-ui\/upload\/research\/[a-f0-9]+\.txt$/)
|
||||
expect(data.toString('utf-8')).toBe('hello')
|
||||
expect(ctx.body.files[0]).toMatchObject({ name: 'note.txt', path: savedPath })
|
||||
})
|
||||
@@ -87,7 +87,7 @@ describe('upload controller', () => {
|
||||
|
||||
expect(writeFileMock).toHaveBeenCalledOnce()
|
||||
const [savedPath, data] = writeFileMock.mock.calls[0]
|
||||
expect(normalizePath(savedPath)).toMatch(/^\/tmp\/hermes-web-ui\/upload\/research\/[a-f0-9]+\.txt$/)
|
||||
expect(normalizePath(savedPath)).toMatch(/^\/tmp\/hermes-ui\/upload\/research\/[a-f0-9]+\.txt$/)
|
||||
expect(data.toString('utf-8')).toBe('hello')
|
||||
expect(ctx.body.files[0]).toMatchObject({ name: 'daily report.txt', path: savedPath })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user