vendor: support native TypeScript source loading

This commit is contained in:
imccyu
2026-07-28 23:03:23 +08:00
parent eb38a365dc
commit 5ea161fa68
23 changed files with 77 additions and 72 deletions

View File

@@ -1,8 +1,8 @@
import { Dict } from 'cosmokit'
import type { Dict } from 'cosmokit'
import { EventsService } from './events.ts'
import { LoggerService } from './logger.ts'
import { ReflectService } from './reflect.ts'
import { InjectKey, RegistryService } from './registry.ts'
import { RegistryService, type InjectKey } from './registry.ts'
import { getTraceable, symbols } from './utils.ts'
import { Fiber } from './fiber.ts'

View File

@@ -1,4 +1,5 @@
import { defineProperty, Promisify } from 'cosmokit'
import { defineProperty } from 'cosmokit'
import type { Promisify } from 'cosmokit'
import { Context } from './context.ts'
import { Fiber, FiberState } from './fiber.ts'
import { DisposableList, symbols } from './utils.ts'

View File

@@ -1,9 +1,10 @@
import { Awaitable, defineProperty, Dict, isNullable } from 'cosmokit'
import { defineProperty, isNullable } from 'cosmokit'
import type { Awaitable, Dict } from 'cosmokit'
import { Context } from './context.ts'
import { Plugin } from './registry.ts'
import type { Plugin } from './registry.ts'
import { buildOuterStack, composeError, DisposableList, getTraceable, isConstructor, isObject, symbols } from './utils.ts'
import { Impl } from './reflect.ts'
import { StandardSchemaV1 } from '@standard-schema/spec'
import type { Impl } from './reflect.ts'
import type { StandardSchemaV1 } from '@standard-schema/spec'
declare module './context.ts' {
export interface Context extends Pick<Fiber, 'effect'> {

View File

@@ -1,7 +1,7 @@
import { defineProperty, hyphenate } from 'cosmokit'
import { Context } from './context.ts'
import { Fiber } from './fiber.ts'
import { createCallable, joinPrototype, symbols, Tracker } from './utils.ts'
import { createCallable, joinPrototype, symbols, type Tracker } from './utils.ts'
declare module './context.ts' {
interface Intercept {

View File

@@ -1,4 +1,5 @@
import { defineProperty, Dict, isNullable } from 'cosmokit'
import { defineProperty, isNullable } from 'cosmokit'
import type { Dict } from 'cosmokit'
import { Context } from './context.ts'
import { getTraceable, symbols, withProps } from './utils.ts'
import { Fiber, FiberState } from './fiber.ts'

View File

@@ -1,5 +1,6 @@
import { defineProperty, Dict } from 'cosmokit'
import { StandardSchemaV1 } from '@standard-schema/spec'
import { defineProperty } from 'cosmokit'
import type { Dict } from 'cosmokit'
import type { StandardSchemaV1 } from '@standard-schema/spec'
import { Context } from './context.ts'
import { Fiber } from './fiber.ts'
import { buildOuterStack, DisposableList, symbols, withProps } from './utils.ts'

View File

@@ -1,6 +1,6 @@
import { defineProperty } from 'cosmokit'
import { Context } from './context.ts'
import { createCallable, joinPrototype, symbols, Tracker } from './utils.ts'
import { createCallable, joinPrototype, symbols, type Tracker } from './utils.ts'
/**
* Base class for services that expose a named API on `ctx`.