|
|
@ -12,7 +12,10 @@ const config = {
|
|
|
|
export function configure(options) {
|
|
|
|
export function configure(options) {
|
|
|
|
for (const [key, value] of options) {
|
|
|
|
for (const [key, value] of options) {
|
|
|
|
if (key === 'tools') {
|
|
|
|
if (key === 'tools') {
|
|
|
|
for (const tool of /** @type {import('./public.d.ts').Tool[]}*/ value) {
|
|
|
|
for (let tool of /** @type {import('./public.d.ts').Config.tools[0][]}*/ value) {
|
|
|
|
|
|
|
|
if(typeof tool === 'function') {
|
|
|
|
|
|
|
|
tool = tool();
|
|
|
|
|
|
|
|
}
|
|
|
|
const existing = config.tools.find((t) => t.name === tool.name);
|
|
|
|
const existing = config.tools.find((t) => t.name === tool.name);
|
|
|
|
if (existing) {
|
|
|
|
if (existing) {
|
|
|
|
for (const [k, v] of tool) {
|
|
|
|
for (const [k, v] of tool) {
|
|
|
|