refactor: apply repository naming contract

Apply the accepted pre-release package, service, type, directory, and role renames as one repository-wide change.
This commit is contained in:
Tianyi Cui
2026-08-13 00:36:22 +08:00
parent 101df7cf58
commit a2d0f7f411
3281 changed files with 21730 additions and 21592 deletions

View File

@@ -9,13 +9,13 @@
* through ui-layout and ui-theme. Export discipline: packages/client/AGENTS.md.
*/
import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client'
import { SettingsScopeService } from './settings-scope.ts'
import { SettingsScopeBinder } from './settings-scope.ts'
export type {
SettingsGeneralItemOwnerProps, SettingsHeaderOwnerProps, SettingsOnboardingOwnerProps,
SettingsPluginsTabOwnerProps, SettingsSectionOwnerProps, SettingsTriggerOwnerProps,
} from './contract/slots.ts'
export { SettingsScopeController, SettingsScopeService } from './settings-scope.ts'
export { SettingsScopeController, SettingsScopeBinder } from './settings-scope.ts'
/**
* Required services: none. The transport is resolved per caller through
@@ -31,5 +31,5 @@ export const inject = []
* @param ctx - client root context.
*/
export function apply(ctx: ClientContext): void {
new SettingsScopeService(ctx)
new SettingsScopeBinder(ctx)
}

View File

@@ -213,7 +213,7 @@ export class SettingsScopeController<T> implements SettingsScope<T> {
declare module '@deepseek-ai/cordis' {
interface Context {
settingsScope: SettingsScopeService
settingsScope: SettingsScopeBinder
}
}
@@ -224,7 +224,7 @@ declare module '@deepseek-ai/cordis' {
* cross-plugin collaboration through cordis services
* (`packages/client/tsdown.client.ts`).
*/
export class SettingsScopeService extends Service {
export class SettingsScopeBinder extends Service {
/**
* @param ctx - the providing plugin's context.
*/

View File

@@ -1,12 +1,12 @@
import { describe, expect, it } from 'vitest'
import { Context } from '@deepseek-ai/cordis'
import * as SettingsInvariant from '@deepseek-ai/dsh-client-ui-settings/invariant'
import InvariantService from '@deepseek-ai/dsh-invariants'
import InvariantRegistry from '@deepseek-ai/dsh-invariants'
describe('invariant companion', () => {
it('registers under the package name with an empty installer', async () => {
const ctx = new Context()
await ctx.plugin(InvariantService, { enabled: true })
await ctx.plugin(InvariantRegistry, { enabled: true })
await expect(ctx.plugin(SettingsInvariant).await()).resolves.toBeDefined()
})

View File

@@ -5,7 +5,7 @@
*/
import { Context } from '@deepseek-ai/cordis'
import { describe, expect, it } from 'vitest'
import { apply, inject, SettingsScopeService } from '../src/client/index.ts'
import { apply, inject, SettingsScopeBinder } from '../src/client/index.ts'
/** Boot the browser half over a bare root context; it injects nothing. */
function bench() {
@@ -17,7 +17,7 @@ describe('settings domain base plugin', () => {
it('mounts the scope service under settingsScope', async () => {
const { ctx, fiber } = bench()
await fiber.await()
expect(ctx.get('settingsScope')).toBeInstanceOf(SettingsScopeService)
expect(ctx.get('settingsScope')).toBeInstanceOf(SettingsScopeBinder)
})
it('fiber disposal retires the service', async () => {

View File

@@ -4,7 +4,7 @@ import { describe, expect, it, vi } from 'vitest'
import type { RpcResponse, SettingsNamespaceView } from '@deepseek-ai/dsh-api-remotes/client'
import { TestRemote } from '@deepseek-ai/dsh-client-test-runtime'
import type { SettingsScope } from '@deepseek-ai/dsh-client-runtime/client'
import { SettingsScopeController, SettingsScopeService } from '../src/client/settings-scope.ts'
import { SettingsScopeController, SettingsScopeBinder } from '../src/client/settings-scope.ts'
interface UiTestSettings {
preference: 'light' | 'dark' | 'system'
@@ -365,7 +365,7 @@ describe('SettingsScopeController', () => {
expect(scope.getSnapshot()).toMatchObject({ value: { preference: 'light' }, revision: 5 })
})
})
describe('SettingsScopeService.bind', () => {
describe('SettingsScopeBinder.bind', () => {
it('subscribes before the initial read and converges to the latest queued invalidation', async () => {
const initial = deferred<ReturnType<typeof described>>()
const describeCall = vi.fn()
@@ -379,7 +379,7 @@ describe('SettingsScopeService.bind', () => {
} as never)
let scope!: SettingsScope<UiTestSettings>
new TestRemote(ctx)
await ctx.plugin(SettingsScopeService).await()
await ctx.plugin(SettingsScopeBinder).await()
const fiber = ctx.plugin({
inject: ['connection', 'remote', 'settingsScope'],
apply: (plugin: Context) => {
@@ -411,7 +411,7 @@ describe('SettingsScopeService.bind', () => {
} as never)
let scope!: SettingsScope<UiTestSettings>
new TestRemote(ctx)
await ctx.plugin(SettingsScopeService).await()
await ctx.plugin(SettingsScopeBinder).await()
const fiber = ctx.plugin({
inject: ['connection', 'remote', 'settingsScope'],
apply: (plugin: Context) => {

View File

@@ -27,7 +27,7 @@
"path": "../../settings/settings"
},
{
"path": "../../support/invariants"
"path": "../../runtime-diagnostics/invariants"
}
]
}