mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
fix(ingest): bypass adapter allow-list for public source ingest
This commit is contained in:
parent
50c5f6fb28
commit
9cb0bdbeac
2 changed files with 37 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue