Skip to content

Commit 17d93e7

Browse files
committed
chore: update import
1 parent 5e4ac4d commit 17d93e7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/electron-service/src/service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,14 +340,14 @@ export const waitUntilWindowAvailable = async (browser: WebdriverIO.Browser) =>
340340
const copyOriginalApi = async (browser: WebdriverIO.Browser) => {
341341
await browser.electron.execute<void, [ExecuteOpts]>(
342342
async (electron) => {
343-
const { default: copy } = await import('fast-copy');
343+
const { copy: fastCopy } = await import('fast-copy');
344344
globalThis.originalApi = {} as unknown as Record<ElectronInterface, ElectronType[ElectronInterface]>;
345345
for (const api in electron) {
346346
const apiName = api as keyof ElectronType;
347347
globalThis.originalApi[apiName] = {} as ElectronType[ElectronInterface];
348348
for (const apiElement in electron[apiName]) {
349349
const apiElementName = apiElement as keyof ElectronType[ElectronInterface];
350-
globalThis.originalApi[apiName][apiElementName] = copy(electron[apiName][apiElementName]);
350+
globalThis.originalApi[apiName][apiElementName] = fastCopy(electron[apiName][apiElementName]);
351351
}
352352
}
353353
},

packages/electron-service/wdio-bundler.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const config: BundlerConfig = {
1818
packageName: 'fast-copy',
1919
targetFile: 'src/service.ts',
2020
bundleRegExp: /export.*$/m,
21-
importName: '{ default: copy }',
21+
importName: '{ copy: fastCopy }',
2222
bundleReplace: (importName) => `const ${importName} = { default: index };`,
2323
},
2424
},

0 commit comments

Comments
 (0)