From 5adae14c1ce59fc8a2c349932ecb937aa378e104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E7=91=BE?= <74231782+sj817@users.noreply.github.com> Date: Fri, 27 Dec 2024 09:04:36 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E7=BB=93=E6=9E=84=EF=BC=8C=E4=BC=98=E5=8C=96=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=AF=BC=E5=85=A5=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 7 ++++--- src/puppeteer/index.ts | 2 +- src/puppeteer/init.ts | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 7fb53a0..4dccc36 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ -import { Puppeteer } from './puppeteer/index' - -export default Puppeteer +export * from './common/common' +export * from './puppeteer/init' +export * from './puppeteer/core' export * from './puppeteer/index' +export { Puppeteer as default } from './puppeteer/index' diff --git a/src/puppeteer/index.ts b/src/puppeteer/index.ts index f90f372..f4853a8 100644 --- a/src/puppeteer/index.ts +++ b/src/puppeteer/index.ts @@ -1,5 +1,5 @@ import crypto from 'crypto' -import InitChrome from './init' +import { InitChrome } from './init' import { common } from '@Common' import { Render, RenderResult, screenshot } from './core' import { LaunchOptions } from 'puppeteer-core' diff --git a/src/puppeteer/init.ts b/src/puppeteer/init.ts index 11adf65..de0ccca 100644 --- a/src/puppeteer/init.ts +++ b/src/puppeteer/init.ts @@ -32,7 +32,7 @@ export const enum ChromeUrl { Google = 'https://storage.googleapis.com/chrome-for-testing-public', } -export default class InitChrome { +export class InitChrome { /** 版本 */ version: string /** 操作系统标识符 */