@dsh-workbench/adapter-supply 0.0.0-stage → 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +26 -2
- package/dist/bundle-manager.d.ts +11 -0
- package/dist/bundle-manager.js +181 -0
- package/dist/dsh-plugins.d.ts +5 -0
- package/dist/dsh-plugins.js +51 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +12 -0
- package/dist/installed-module.d.ts +49 -0
- package/dist/installed-module.js +210 -0
- package/dist/package-content.d.ts +6 -0
- package/dist/package-content.js +64 -0
- package/dist/package-kind.d.ts +21 -0
- package/dist/package-kind.js +73 -0
- package/dist/package-route.d.ts +23 -0
- package/dist/package-route.js +74 -0
- package/dist/plugin-catalog.d.ts +65 -0
- package/dist/plugin-catalog.js +192 -0
- package/dist/plugin-login-hint.d.ts +2 -0
- package/dist/plugin-login-hint.js +33 -0
- package/dist/plugin-source.d.ts +2 -0
- package/dist/plugin-source.js +1 -0
- package/dist/plugin-tools.d.ts +15 -0
- package/dist/plugin-tools.js +134 -0
- package/dist/plugin-units.d.ts +48 -0
- package/dist/plugin-units.js +245 -0
- package/dist/registry-declaration.d.ts +23 -0
- package/dist/registry-declaration.js +56 -0
- package/dist/unit-registry-types.d.ts +12 -0
- package/dist/unit-registry-types.js +1 -0
- package/package.json +37 -3
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Opencli } from '@dsh-workbench/adapter-runtime';
|
|
2
|
+
import type { PluginCatalog } from './plugin-catalog.js';
|
|
3
|
+
import type { UnitRegistry } from './unit-registry-types.js';
|
|
4
|
+
export interface PluginRowRef {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly pkg: string;
|
|
7
|
+
readonly name?: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface PluginRowsSource {
|
|
10
|
+
listPlugins(workspace: string | null): readonly PluginRowRef[];
|
|
11
|
+
subscribe?(listener: () => void): () => void;
|
|
12
|
+
}
|
|
13
|
+
export interface PluginUnitRow {
|
|
14
|
+
readonly plugin: string;
|
|
15
|
+
readonly pkg: string;
|
|
16
|
+
readonly version: string;
|
|
17
|
+
readonly commands: number;
|
|
18
|
+
readonly synthesized: number;
|
|
19
|
+
readonly chars: number;
|
|
20
|
+
readonly tools: readonly string[];
|
|
21
|
+
}
|
|
22
|
+
export interface PluginUnitReport {
|
|
23
|
+
readonly ok: boolean;
|
|
24
|
+
readonly at: number;
|
|
25
|
+
readonly plugins: readonly PluginUnitRow[];
|
|
26
|
+
readonly problems: readonly string[];
|
|
27
|
+
}
|
|
28
|
+
export interface PluginUnits {
|
|
29
|
+
refresh(options?: {
|
|
30
|
+
readonly force?: boolean;
|
|
31
|
+
}): Promise<PluginUnitReport>;
|
|
32
|
+
touch(): void;
|
|
33
|
+
report(): PluginUnitReport;
|
|
34
|
+
dispose(): void;
|
|
35
|
+
}
|
|
36
|
+
export interface PluginUnitsOptions {
|
|
37
|
+
readonly registry: UnitRegistry;
|
|
38
|
+
readonly catalog: PluginCatalog;
|
|
39
|
+
readonly rows: () => readonly PluginRowRef[];
|
|
40
|
+
readonly declared: (plugin: string) => ReadonlySet<string>;
|
|
41
|
+
readonly opencliFor: (plugin: string) => Opencli;
|
|
42
|
+
readonly toolNames?: () => ReadonlySet<string>;
|
|
43
|
+
readonly logger?: {
|
|
44
|
+
info?(message: string): void;
|
|
45
|
+
warn?(message: string): void;
|
|
46
|
+
} | undefined;
|
|
47
|
+
}
|
|
48
|
+
export declare function createPluginUnits(options: PluginUnitsOptions): PluginUnits;
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { PROBE_TTL_MS, TEXT_OUTPUT, jsonText, sessionWorkspace } from '@dsh-workbench/shared/host';
|
|
2
|
+
import { pluginLoginHint } from './plugin-login-hint.js';
|
|
3
|
+
import { PLUGIN_PROMPT_BUDGET, RUN_CODE_TOOL, pluginApprovalFor, pluginPromptChars, pluginToolArgv, pluginToolDescription, pluginToolName, pluginToolParameters, pluginToolSession, pluginToolWrites, } from './plugin-tools.js';
|
|
4
|
+
function signatureOf(version, commands) {
|
|
5
|
+
return [
|
|
6
|
+
version,
|
|
7
|
+
...commands.map((command) => `${command.name}:${command.access}:${command.args
|
|
8
|
+
.map((arg) => `${arg.name}${arg.required ? '!' : ''}`)
|
|
9
|
+
.join('+')}`),
|
|
10
|
+
].join('|');
|
|
11
|
+
}
|
|
12
|
+
function toolsOf(plugin, commands, taken) {
|
|
13
|
+
const tools = [];
|
|
14
|
+
const problems = [];
|
|
15
|
+
const claimed = new Set();
|
|
16
|
+
for (const command of commands) {
|
|
17
|
+
const name = pluginToolName(plugin, command.name);
|
|
18
|
+
if (name === RUN_CODE_TOOL) {
|
|
19
|
+
problems.push(`工具名 ${RUN_CODE_TOOL}(${plugin} ${command.name})是 dsh 的保留名(PTC 的传送工具)—— 这条命令这次不合成`);
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
if (taken.has(name) || claimed.has(name)) {
|
|
23
|
+
problems.push(`工具名 ${name}(${plugin} ${command.name})已经被占着 —— 这条命令这次不合成(先来的那份说了算)`);
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
claimed.add(name);
|
|
27
|
+
tools.push({ name, command });
|
|
28
|
+
}
|
|
29
|
+
return { tools, problems };
|
|
30
|
+
}
|
|
31
|
+
function planOf(options, registered) {
|
|
32
|
+
const sets = new Map(options.catalog.snapshot().sets.map((set) => [set.plugin, set]));
|
|
33
|
+
const mine = new Set([...registered.values()].flatMap((item) => item.tools));
|
|
34
|
+
const taken = new Set([...(options.toolNames?.() ?? [])].filter((name) => !mine.has(name)));
|
|
35
|
+
const units = [];
|
|
36
|
+
const rows = [];
|
|
37
|
+
const problems = [];
|
|
38
|
+
for (const row of options.rows()) {
|
|
39
|
+
const plugin = row.name?.trim() ?? '';
|
|
40
|
+
if (plugin === '') {
|
|
41
|
+
problems.push(`面板上的插件行 ${row.id}(${row.pkg})没有 opencli 插件名 —— 认不出它,这次不给它合成工具`);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
const set = sets.get(plugin);
|
|
45
|
+
if (set === undefined) {
|
|
46
|
+
problems.push(`已装插件「${plugin}」在 opencli 的插件清单 / 命令面里找不到 —— 归属不了,这次不给它合成工具`);
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
sets.delete(plugin);
|
|
50
|
+
const declared = options.declared(plugin);
|
|
51
|
+
const overlapped = set.commands.filter((command) => declared.has(command.name));
|
|
52
|
+
if (overlapped.length > 0) {
|
|
53
|
+
problems.push(`「${plugin}」有 ${overlapped.length} 条命令由已装模块自己提供(${overlapped
|
|
54
|
+
.map((command) => command.name)
|
|
55
|
+
.join('、')})—— 通用桥不重复合成`);
|
|
56
|
+
}
|
|
57
|
+
const commands = set.commands.filter((command) => !declared.has(command.name));
|
|
58
|
+
const built = toolsOf(plugin, commands, taken);
|
|
59
|
+
problems.push(...built.problems);
|
|
60
|
+
for (const tool of built.tools)
|
|
61
|
+
taken.add(tool.name);
|
|
62
|
+
if (built.tools.length === 0 && commands.length === set.commands.length) {
|
|
63
|
+
problems.push(`「${plugin}」的命令一条都没能合成工具`);
|
|
64
|
+
}
|
|
65
|
+
const chars = built.tools.reduce((sum, tool) => sum + pluginPromptChars(tool.command), 0);
|
|
66
|
+
if (chars > PLUGIN_PROMPT_BUDGET) {
|
|
67
|
+
problems.push(`「${plugin}」合成出来的 ${String(built.tools.length)} 把工具,描述与参数说明合起来 ${String(chars)} 字,超过 ${String(PLUGIN_PROMPT_BUDGET)} 字的合成面预算 —— 这些字每一步请求都跟着走,插件该精简或按工作区少开一点`);
|
|
68
|
+
}
|
|
69
|
+
rows.push({
|
|
70
|
+
plugin,
|
|
71
|
+
pkg: row.pkg,
|
|
72
|
+
version: set.version,
|
|
73
|
+
commands: set.commands.length,
|
|
74
|
+
synthesized: built.tools.length,
|
|
75
|
+
chars,
|
|
76
|
+
tools: built.tools.map((tool) => tool.name),
|
|
77
|
+
});
|
|
78
|
+
if (built.tools.length === 0)
|
|
79
|
+
continue;
|
|
80
|
+
units.push({
|
|
81
|
+
id: row.id,
|
|
82
|
+
plugin,
|
|
83
|
+
pkg: row.pkg,
|
|
84
|
+
version: set.version,
|
|
85
|
+
signature: signatureOf(set.version, commands),
|
|
86
|
+
commands,
|
|
87
|
+
tools: built.tools,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
for (const set of sets.values()) {
|
|
91
|
+
problems.push(`opencli 里装着「${set.plugin}」(${String(set.commands.length)} 条命令),但它不在插件台账里(不是从市场装的)—— 面板上没有它的开关,它的命令这次不进工具面`);
|
|
92
|
+
}
|
|
93
|
+
return { units, rows, problems };
|
|
94
|
+
}
|
|
95
|
+
function faceOf(unit, opencliFor, note) {
|
|
96
|
+
const byTool = new Map(unit.tools.map((tool) => [tool.name, tool.command]));
|
|
97
|
+
const manifest = {
|
|
98
|
+
id: unit.id,
|
|
99
|
+
card: null,
|
|
100
|
+
tools: unit.tools.map((tool) => ({ name: tool.name, writes: pluginToolWrites(tool.command) })),
|
|
101
|
+
host: { inject: [] },
|
|
102
|
+
};
|
|
103
|
+
return {
|
|
104
|
+
unit: unit.id,
|
|
105
|
+
manifest,
|
|
106
|
+
mount(deps) {
|
|
107
|
+
const tools = deps.ctx.get('tools');
|
|
108
|
+
if (tools === undefined) {
|
|
109
|
+
deps.logger?.info?.(`[dsh-workbench] 没有 tools 服务,跳过 ${unit.plugin} 的命令工具注册`);
|
|
110
|
+
return { routes: {}, registerTools: () => [] };
|
|
111
|
+
}
|
|
112
|
+
const opencli = opencliFor(unit.plugin);
|
|
113
|
+
const definitions = unit.tools.map((tool) => ({
|
|
114
|
+
name: tool.name,
|
|
115
|
+
description: pluginToolDescription(tool.command),
|
|
116
|
+
parameters: pluginToolParameters(tool.command),
|
|
117
|
+
output: TEXT_OUTPUT,
|
|
118
|
+
async execute(raw, exec) {
|
|
119
|
+
const workspace = sessionWorkspace(exec);
|
|
120
|
+
try {
|
|
121
|
+
const result = await opencli.json([tool.command.name, ...pluginToolArgv(tool.command, raw)], {
|
|
122
|
+
session: pluginToolSession(tool.command),
|
|
123
|
+
...(workspace === null ? {} : { workdir: workspace }),
|
|
124
|
+
});
|
|
125
|
+
return { text: jsonText(result.value) };
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
throw new Error(pluginLoginHint(error, tool.command.domain), { cause: error });
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
}));
|
|
132
|
+
return {
|
|
133
|
+
routes: {},
|
|
134
|
+
factsOf: () => [],
|
|
135
|
+
registerTools: () => {
|
|
136
|
+
const disposers = [];
|
|
137
|
+
for (const definition of definitions) {
|
|
138
|
+
try {
|
|
139
|
+
disposers.push(tools.register(definition));
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
note(`「${unit.plugin}」的 ${definition.name} 这把工具没注册上(${error instanceof Error ? error.message : String(error)})—— 只废这一把,同插件其余命令照常`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return disposers;
|
|
146
|
+
},
|
|
147
|
+
needsApproval: (call) => {
|
|
148
|
+
const command = call.name === undefined ? undefined : byTool.get(call.name);
|
|
149
|
+
return command === undefined ? undefined : pluginApprovalFor(command)(call);
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function reconcile(registered, units, options, note) {
|
|
156
|
+
const wanted = new Map(units.map((unit) => [unit.id, unit]));
|
|
157
|
+
for (const [id, item] of [...registered]) {
|
|
158
|
+
const next = wanted.get(id);
|
|
159
|
+
if (next !== undefined && next.signature === item.signature)
|
|
160
|
+
continue;
|
|
161
|
+
item.drop();
|
|
162
|
+
registered.delete(id);
|
|
163
|
+
}
|
|
164
|
+
for (const unit of units) {
|
|
165
|
+
if (registered.has(unit.id))
|
|
166
|
+
continue;
|
|
167
|
+
registered.set(unit.id, {
|
|
168
|
+
signature: unit.signature,
|
|
169
|
+
tools: unit.tools.map((tool) => tool.name),
|
|
170
|
+
drop: options.registry.registerPlugin(faceOf(unit, options.opencliFor, note)),
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
export function createPluginUnits(options) {
|
|
175
|
+
const registered = new Map();
|
|
176
|
+
const mountProblems = new Set();
|
|
177
|
+
let report = { ok: false, at: 0, plugins: [], problems: ['还没探过 opencli 的插件命令面'] };
|
|
178
|
+
let inflight;
|
|
179
|
+
let lastTouch = 0;
|
|
180
|
+
let warned = '';
|
|
181
|
+
function note(problem) {
|
|
182
|
+
if (mountProblems.has(problem))
|
|
183
|
+
return;
|
|
184
|
+
mountProblems.add(problem);
|
|
185
|
+
options.logger?.warn?.(`[dsh-workbench] ${problem}`);
|
|
186
|
+
}
|
|
187
|
+
function snapshot() {
|
|
188
|
+
const extra = [...mountProblems];
|
|
189
|
+
return extra.length === 0 ? report : { ...report, problems: [...report.problems, ...extra] };
|
|
190
|
+
}
|
|
191
|
+
function warn(problems) {
|
|
192
|
+
const text = [...problems].sort().join('\n');
|
|
193
|
+
if (text === '' || text === warned)
|
|
194
|
+
return;
|
|
195
|
+
warned = text;
|
|
196
|
+
options.logger?.warn?.(`[dsh-workbench] opencli 插件命令面:\n${text}`);
|
|
197
|
+
}
|
|
198
|
+
async function run(force) {
|
|
199
|
+
mountProblems.clear();
|
|
200
|
+
const probed = await options.catalog.refresh(force ? { force: true } : {});
|
|
201
|
+
if (!probed.ok) {
|
|
202
|
+
const problems = [
|
|
203
|
+
...probed.problems,
|
|
204
|
+
'这次探测没成功:上面这些插件行的工具面维持在上一份(不是"这些插件没有命令")',
|
|
205
|
+
];
|
|
206
|
+
report = { ok: false, at: Date.now(), plugins: report.plugins, problems };
|
|
207
|
+
warn(problems);
|
|
208
|
+
return snapshot();
|
|
209
|
+
}
|
|
210
|
+
const plan = planOf(options, registered);
|
|
211
|
+
reconcile(registered, plan.units, options, note);
|
|
212
|
+
report = { ok: true, at: Date.now(), plugins: plan.rows, problems: plan.problems };
|
|
213
|
+
warn(plan.problems);
|
|
214
|
+
return snapshot();
|
|
215
|
+
}
|
|
216
|
+
function refresh(callOptions = {}) {
|
|
217
|
+
if (inflight !== undefined)
|
|
218
|
+
return inflight;
|
|
219
|
+
const task = run(callOptions.force === true).finally(() => {
|
|
220
|
+
inflight = undefined;
|
|
221
|
+
});
|
|
222
|
+
inflight = task;
|
|
223
|
+
return task;
|
|
224
|
+
}
|
|
225
|
+
return {
|
|
226
|
+
refresh,
|
|
227
|
+
touch() {
|
|
228
|
+
const now = Date.now();
|
|
229
|
+
if (inflight !== undefined)
|
|
230
|
+
return;
|
|
231
|
+
if (now - lastTouch < PROBE_TTL_MS)
|
|
232
|
+
return;
|
|
233
|
+
lastTouch = now;
|
|
234
|
+
void refresh().catch((error) => {
|
|
235
|
+
options.logger?.warn?.(`[dsh-workbench] 探 opencli 插件命令面时抛了错:${String(error)}`);
|
|
236
|
+
});
|
|
237
|
+
},
|
|
238
|
+
report: () => snapshot(),
|
|
239
|
+
dispose() {
|
|
240
|
+
for (const item of registered.values())
|
|
241
|
+
item.drop();
|
|
242
|
+
registered.clear();
|
|
243
|
+
},
|
|
244
|
+
};
|
|
245
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
|
+
export declare function localDirOf(spec: string): string | undefined;
|
|
3
|
+
export declare function packageManifestOf(dir: string): Readonly<Record<string, unknown>> | undefined;
|
|
4
|
+
export declare function dshRecordOf(dir: string): unknown | undefined;
|
|
5
|
+
export declare function packageNameOf(dir: string): string | undefined;
|
|
6
|
+
export declare function pathDeclarationOf(spec: string): unknown | undefined;
|
|
7
|
+
export interface RegistryDshLookup {
|
|
8
|
+
readonly readable: boolean;
|
|
9
|
+
readonly raw: unknown;
|
|
10
|
+
}
|
|
11
|
+
export declare function registryDshOf(options: {
|
|
12
|
+
shell: DshShell;
|
|
13
|
+
name: string;
|
|
14
|
+
registry?: string | undefined;
|
|
15
|
+
force?: boolean;
|
|
16
|
+
}): Promise<RegistryDshLookup>;
|
|
17
|
+
export declare function registryDeclarationOf(options: {
|
|
18
|
+
shell: DshShell;
|
|
19
|
+
name: string;
|
|
20
|
+
registry: string;
|
|
21
|
+
force?: boolean;
|
|
22
|
+
}): Promise<unknown | undefined>;
|
|
23
|
+
export declare function declarationRefusalOf(name: string, raw: unknown): readonly string[];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import { npmCacheDir } from '@dsh-workbench/adapter-runtime';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { declarationProblemsOf, parseJsonLoose, quoteShellArg, runShell, VERSION_CHECK_TIMEOUT_MS, VERSION_CHECK_TTL_MS, } from '@dsh-workbench/shared/host';
|
|
5
|
+
const cache = new Map();
|
|
6
|
+
function asRecord(value) {
|
|
7
|
+
return typeof value === 'object' && value !== null ? value : undefined;
|
|
8
|
+
}
|
|
9
|
+
export function localDirOf(spec) {
|
|
10
|
+
const dir = spec.trim().replace(/^(?:file|link):/, '');
|
|
11
|
+
return path.isAbsolute(dir) ? dir : undefined;
|
|
12
|
+
}
|
|
13
|
+
export function packageManifestOf(dir) {
|
|
14
|
+
try {
|
|
15
|
+
const parsed = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf8'));
|
|
16
|
+
return asRecord(parsed);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export function dshRecordOf(dir) {
|
|
23
|
+
return packageManifestOf(dir)?.dsh;
|
|
24
|
+
}
|
|
25
|
+
export function packageNameOf(dir) {
|
|
26
|
+
const name = packageManifestOf(dir)?.name;
|
|
27
|
+
return typeof name === 'string' && name.trim() !== '' ? name.trim() : undefined;
|
|
28
|
+
}
|
|
29
|
+
export function pathDeclarationOf(spec) {
|
|
30
|
+
const dir = localDirOf(spec);
|
|
31
|
+
return dir === undefined ? undefined : asRecord(dshRecordOf(dir))?.workbench;
|
|
32
|
+
}
|
|
33
|
+
export async function registryDshOf(options) {
|
|
34
|
+
const { shell, name, registry, force = false } = options;
|
|
35
|
+
const key = `${registry ?? ''}|${name}`;
|
|
36
|
+
const hit = cache.get(key);
|
|
37
|
+
if (!force && hit !== undefined && Date.now() - hit.at < VERSION_CHECK_TTL_MS) {
|
|
38
|
+
return { readable: true, raw: hit.raw };
|
|
39
|
+
}
|
|
40
|
+
const at = registry === undefined ? '' : ` --registry ${quoteShellArg(registry)}`;
|
|
41
|
+
const result = await runShell(shell, `npm view ${quoteShellArg(name)} dsh --json${at} --cache ${quoteShellArg(npmCacheDir())}`, { timeoutMs: VERSION_CHECK_TIMEOUT_MS }).catch(() => undefined);
|
|
42
|
+
const parsed = result?.exitCode === 0 ? parseJsonLoose(result.stdout) : undefined;
|
|
43
|
+
if (parsed === undefined)
|
|
44
|
+
return { readable: false, raw: undefined };
|
|
45
|
+
cache.set(key, { at: Date.now(), raw: parsed });
|
|
46
|
+
return { readable: true, raw: parsed };
|
|
47
|
+
}
|
|
48
|
+
export async function registryDeclarationOf(options) {
|
|
49
|
+
const found = await registryDshOf(options);
|
|
50
|
+
return found.readable ? asRecord(found.raw)?.workbench : undefined;
|
|
51
|
+
}
|
|
52
|
+
export function declarationRefusalOf(name, raw) {
|
|
53
|
+
if (raw === undefined)
|
|
54
|
+
return [];
|
|
55
|
+
return declarationProblemsOf(name, raw);
|
|
56
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface UnitRefusal {
|
|
2
|
+
readonly unit: string;
|
|
3
|
+
readonly reason: string;
|
|
4
|
+
}
|
|
5
|
+
export interface UnitRegistry {
|
|
6
|
+
all(): readonly unknown[];
|
|
7
|
+
declarationOf?(unit: string): {
|
|
8
|
+
readonly pkg: string;
|
|
9
|
+
readonly declaration: unknown;
|
|
10
|
+
} | undefined;
|
|
11
|
+
registerPlugin(face: unknown): () => void;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-workbench/adapter-supply",
|
|
3
|
-
"version": "0.0.0
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0-beta.0",
|
|
4
|
+
"description": "Workbench supply adapter package.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"default": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/novaeth/dsh-workbench.git",
|
|
22
|
+
"directory": "packages/adapter-supply"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@dsh-workbench/adapter-runtime": "1.0.0-beta.0",
|
|
26
|
+
"@dsh-workbench/shared": "1.0.0-beta.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^24.19.0",
|
|
30
|
+
"vitest": "^5.0.2",
|
|
31
|
+
"@vitest/coverage-v8": "^5.0.2"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsc -p tsconfig.json",
|
|
35
|
+
"test": "vitest run",
|
|
36
|
+
"arch": "arch-guard",
|
|
37
|
+
"check:runtimes": "node ../../scripts/check-adapter-package.mjs --runtime",
|
|
38
|
+
"coverage": "vitest run --coverage --coverage.reporter=text-summary --testTimeout=20000"
|
|
39
|
+
}
|
|
6
40
|
}
|