feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment
Some checks failed
CI Pipeline / Code Quality & Typecheck (push) Waiting to run
CI Pipeline / Test Suite (macos-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (ubuntu-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (windows-latest) (push) Blocked by required conditions
CI Pipeline / Build Validation (admin) (push) Blocked by required conditions
CI Pipeline / Build Validation (desktop) (push) Blocked by required conditions
Deploy Landing Page / deploy (push) Blocked by required conditions
Deploy Landing Page / build (push) Waiting to run
Release & Packaging Pipeline / Build & Publish Admin Docker Image (push) Failing after 8s
Release & Code Signing CA Pipeline / build-and-sign-windows (push) Failing after 1m51s
Build macOS / Build & Package (macOS) (push) Failing after 4s
Build macOS / Build & Package (macOS)-1 (push) Failing after 5s
Release & Code Signing CA Pipeline / build-and-sign-macos (push) Failing after 3s
Release & Packaging Pipeline / Package macOS Desktop App (push) Failing after 4s
Release & Packaging Pipeline / Package Windows Desktop App (push) Failing after 2m28s
Release & Packaging Pipeline / Publish Official GitHub Release (push) Has been skipped
Some checks failed
CI Pipeline / Code Quality & Typecheck (push) Waiting to run
CI Pipeline / Test Suite (macos-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (ubuntu-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (windows-latest) (push) Blocked by required conditions
CI Pipeline / Build Validation (admin) (push) Blocked by required conditions
CI Pipeline / Build Validation (desktop) (push) Blocked by required conditions
Deploy Landing Page / deploy (push) Blocked by required conditions
Deploy Landing Page / build (push) Waiting to run
Release & Packaging Pipeline / Build & Publish Admin Docker Image (push) Failing after 8s
Release & Code Signing CA Pipeline / build-and-sign-windows (push) Failing after 1m51s
Build macOS / Build & Package (macOS) (push) Failing after 4s
Build macOS / Build & Package (macOS)-1 (push) Failing after 5s
Release & Code Signing CA Pipeline / build-and-sign-macos (push) Failing after 3s
Release & Packaging Pipeline / Package macOS Desktop App (push) Failing after 4s
Release & Packaging Pipeline / Package Windows Desktop App (push) Failing after 2m28s
Release & Packaging Pipeline / Publish Official GitHub Release (push) Has been skipped
This commit is contained in:
parent
5cd1de6859
commit
708e20f747
406 changed files with 42464 additions and 6199 deletions
|
|
@ -7,6 +7,7 @@ import { dictionary } from '../db/schema'
|
|||
import type { Dictionary, NewDictionary } from '../db/schema'
|
||||
import { getLogger } from './LoggerService'
|
||||
import { getCloudSyncService } from './CloudSyncService'
|
||||
import { D3ROError, ErrorCode } from '@d3ro/core/errors'
|
||||
import type {
|
||||
DictionaryEntry,
|
||||
DictionaryQueryParams,
|
||||
|
|
@ -20,13 +21,18 @@ const logger = getLogger('DictionaryService')
|
|||
|
||||
class DictionaryService {
|
||||
add(params: DictionaryAddParams): DictionaryEntry {
|
||||
const word = params.word.trim()
|
||||
if (!word) {
|
||||
throw new D3ROError(ErrorCode.DictionaryImportInvalidFormat, 'Dictionary word is empty')
|
||||
}
|
||||
|
||||
const db = getDatabase()
|
||||
const now = Date.now()
|
||||
const id = crypto.randomUUID()
|
||||
|
||||
const entry: NewDictionary = {
|
||||
id,
|
||||
word: params.word,
|
||||
word,
|
||||
pronunciation: params.pronunciation ?? null,
|
||||
category: params.category ?? 'user',
|
||||
usageCount: 0,
|
||||
|
|
@ -35,8 +41,16 @@ class DictionaryService {
|
|||
updatedAt: now
|
||||
}
|
||||
|
||||
db.insert(dictionary).values(entry).run()
|
||||
logger.info(`Dictionary entry added: "${params.word}"`)
|
||||
try {
|
||||
db.insert(dictionary).values(entry).run()
|
||||
} catch (err) {
|
||||
const message = err instanceof Error ? err.message : String(err)
|
||||
if (message.includes('UNIQUE') || message.includes('unique')) {
|
||||
throw new D3ROError(ErrorCode.DictionaryDuplicate, `Duplicate word: ${word}`)
|
||||
}
|
||||
throw err
|
||||
}
|
||||
logger.info(`Dictionary entry added: "${word}"`)
|
||||
// Phase 3.3: 자동 push (fire-and-forget)
|
||||
void getCloudSyncService().pushOne('dictionary', id)
|
||||
return this._toEntry(entry as Dictionary)
|
||||
|
|
@ -172,3 +186,7 @@ export function getDictionaryService(): DictionaryService {
|
|||
}
|
||||
return instance
|
||||
}
|
||||
|
||||
export function resetDictionaryServiceForTests(): void {
|
||||
instance = null
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue