diff --git a/denops/@ddu-sources/dpp.ts b/denops/@ddu-sources/dpp.ts index 040f227..64062b9 100644 --- a/denops/@ddu-sources/dpp.ts +++ b/denops/@ddu-sources/dpp.ts @@ -8,8 +8,8 @@ import { type ActionFlags, BaseSource, type Item, -} from "jsr:@shougo/ddu-vim@5.0.0/types"; -import type { ActionData } from "jsr:@shougo/ddu-kind-file@0.8.0"; +} from "jsr:@shougo/ddu-vim@6.1.0/types"; +import type { ActionData } from "jsr:@shougo/ddu-kind-file@0.9.0"; type Params = { names: string[]; diff --git a/denops/dpp/app.ts b/denops/dpp/app.ts index 606079a..a731e04 100644 --- a/denops/dpp/app.ts +++ b/denops/dpp/app.ts @@ -1,6 +1,13 @@ import { ContextBuilder } from "./context.ts"; import { Dpp } from "./dpp.ts"; -import type { DppOptions } from "./types.ts"; +import type { + BaseParams, + DppOptions, + ExtOptions, + Protocol, + ProtocolName, +} from "./types.ts"; +import type { BaseExt } from "./base/ext.ts"; import { Loader } from "./loader.ts"; import { extAction } from "./ext.ts"; import { isDenoCacheIssueError } from "./utils.ts"; @@ -68,7 +75,6 @@ export const main: Entrypoint = (denops: Denops) => { contextBuilder, denops, basePath, - dpp, name, }); //console.log(`${Date.now() - startTime} ms`); @@ -99,5 +105,31 @@ export const main: Entrypoint = (denops: Denops) => { throw e; } }, + async getExt( + arg1: unknown, + ): Promise< + [ + BaseExt | undefined, + ExtOptions, + BaseParams, + ] + > { + const extName = ensure(arg1, is.String) as string; + const [_, options] = await contextBuilder.get(denops); + + return await dpp.getExt( + denops, + options, + extName, + ); + }, + async getProtocols(): Promise> { + const [_, options] = await contextBuilder.get(denops); + + return await dpp.getProtocols( + denops, + options, + ); + }, }; }; diff --git a/denops/dpp/dpp.ts b/denops/dpp/dpp.ts index 87fe998..1e82f7b 100644 --- a/denops/dpp/dpp.ts +++ b/denops/dpp/dpp.ts @@ -1,6 +1,5 @@ import type { ActionName, - BaseExt, BaseParams, Context, DppOptions, @@ -12,6 +11,7 @@ import type { } from "./types.ts"; import type { Loader } from "./loader.ts"; import type { ConfigReturn } from "./base/config.ts"; +import type { BaseExt } from "./base/ext.ts"; import { extAction, getExt, getProtocols } from "./ext.ts"; import { convert2List, diff --git a/denops/dpp/ext.ts b/denops/dpp/ext.ts index fb392d9..d12bfbf 100644 --- a/denops/dpp/ext.ts +++ b/denops/dpp/ext.ts @@ -1,8 +1,6 @@ import type { ActionName, - BaseExt, BaseParams, - BaseProtocol, Context, DppOptions, ExtName, @@ -20,8 +18,8 @@ import { mergeProtocolParams, } from "./context.ts"; import type { Loader } from "./loader.ts"; -import { defaultExtOptions } from "./base/ext.ts"; -import { defaultProtocolOptions } from "./base/protocol.ts"; +import { type BaseExt, defaultExtOptions } from "./base/ext.ts"; +import { type BaseProtocol, defaultProtocolOptions } from "./base/protocol.ts"; import { printError } from "./utils.ts"; import type { Denops } from "jsr:@denops/std@~7.1.0"; diff --git a/denops/dpp/loader.ts b/denops/dpp/loader.ts index 68af9b4..3aef1df 100644 --- a/denops/dpp/loader.ts +++ b/denops/dpp/loader.ts @@ -1,11 +1,6 @@ -import type { - BaseExt, - BaseParams, - BaseProtocol, - DppExtType, - ExtName, - ProtocolName, -} from "./types.ts"; +import type { BaseParams, DppExtType, ExtName, ProtocolName } from "./types.ts"; +import type { BaseExt } from "./base/ext.ts"; +import type { BaseProtocol } from "./base/protocol.ts"; import { isDenoCacheIssueError } from "./utils.ts"; import type { Denops } from "jsr:@denops/std@~7.1.0"; diff --git a/denops/dpp/types.ts b/denops/dpp/types.ts index a4f3959..733cbdb 100644 --- a/denops/dpp/types.ts +++ b/denops/dpp/types.ts @@ -1,20 +1,6 @@ import type { BaseProtocol } from "./base/protocol.ts"; -import type { Denops } from "jsr:@denops/std@~7.1.0"; - -export { BaseConfig } from "./base/config.ts"; -export type { - ConfigArguments, - ConfigReturn, - MultipleHook, -} from "./base/config.ts"; -export { BaseExt } from "./base/ext.ts"; -export { BaseProtocol } from "./base/protocol.ts"; -export type { Command } from "./base/protocol.ts"; -export { ContextBuilder } from "./context.ts"; - -export { Dpp } from "./dpp.ts"; -export type { Denops } from "jsr:@denops/std@~7.1.0"; +import type { Denops } from "jsr:@denops/std@~7.1.0"; export type DppExtType = "ext" | "protocol";