fix(ingest): bypass adapter allow-list for public source ingest

This commit is contained in:
Andrey Avtomonov 2026-05-13 18:49:28 +02:00
parent 50c5f6fb28
commit 9cb0bdbeac
2 changed files with 37 additions and 0 deletions

View file

@ -485,6 +485,42 @@ describe('runKtxPublicIngest', () => {
);
});
it('bypasses adapter allow-lists for connection-centric source ingest', async () => {
const runIngest = vi.fn(async () => 0);
const io = makeIo();
await expect(
runKtxPublicIngest(
{
command: 'run',
projectDir: '/tmp/ktx',
targetConnectionId: 'docs',
all: false,
json: false,
inputMode: 'disabled',
},
io.io,
{
loadProject: async () =>
projectWithConnections({
docs: { driver: 'notion' },
}),
runIngest,
},
),
).resolves.toBe(0);
expect(runIngest).toHaveBeenCalledWith(
expect.objectContaining({
command: 'run',
connectionId: 'docs',
adapter: 'notion',
allowImplicitAdapter: true,
}),
io.io,
);
});
it('routes public status and watch to the ingest status renderer', async () => {
const runIngest = vi.fn(async () => 0);
const statusIo = makeIo();

View file

@ -477,6 +477,7 @@ export async function executePublicIngestTarget(
...(target.sourceDir ? { sourceDir: target.sourceDir } : {}),
outputMode: sourceIngestOutputMode(args, io),
inputMode: args.inputMode,
allowImplicitAdapter: true,
};
const runIngest = deps.runIngest ?? runKtxIngest;
const exitCode = deps.ingestProgress