Skip to content

Commit

Permalink
refactor: provicePlugin -> providePlugins
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelstroschein committed Aug 5, 2024
1 parent e264fa9 commit af5254e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lix/packages/sdk/src/open/openLix.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ test("providing plugins should be possible", async () => {
glob: "*",
diff: {},
}
const lix = await openLixInMemory({ blob: await newLixFile(), providePlugin: [mockPlugin] })
const lix = await openLixInMemory({ blob: await newLixFile(), providePlugins: [mockPlugin] })
expect(lix.plugins).toContain(mockPlugin)
})
6 changes: 3 additions & 3 deletions lix/packages/sdk/src/open/openLix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ export async function openLix(args: {
* @example
* const lix = await openLixInMemory({ blob: await newLixFile(), providePlugin: [myPlugin] })
*/
providePlugin?: LixPlugin[]
providePlugins?: LixPlugin[]
}) {
const db = new Kysely<LixDatabase>({
dialect: createDialect({ database: args.database }),
plugins: [new ParseJSONResultsPlugin()],
})

const plugins = await loadPlugins(db)
if (args.providePlugin && args.providePlugin.length > 0) {
plugins.push(...args.providePlugin)
if (args.providePlugins && args.providePlugins.length > 0) {
plugins.push(...args.providePlugins)
}

args.database.createFunction({
Expand Down

0 comments on commit af5254e

Please sign in to comment.