From 110e6f74e8f7917e267996d5351bdfa0afeb50ba Mon Sep 17 00:00:00 2001 From: Sebastian Seedorf Date: Mon, 16 Nov 2020 13:02:45 +0100 Subject: [PATCH] inital #6 --- out/index.d.ts | 2 +- out/polyfill.d.ts | 6 +++++- src/index.ts | 2 +- src/polyfill.ts | 7 ++++++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/out/index.d.ts b/out/index.d.ts index 4f8aa89..629e06c 100644 --- a/out/index.d.ts +++ b/out/index.d.ts @@ -5,7 +5,7 @@ export { AuthProxy } from './auth-proxy'; export { Resolvable, WaitForSync } from './helpers/resolvable'; export { urlJoin } from './helpers/urlJoin'; export { AutoReloader } from './auto-reload'; -export { Polyfill, PolyfillOptions } from './polyfill'; +export { Polyfill, PolyfillOptions, PolyfillFeatureList } from './polyfill'; export { Session } from './session'; export { Permissions } from './permissions'; export { UserInfo } from './helpers/userinfo'; diff --git a/out/polyfill.d.ts b/out/polyfill.d.ts index 1aaf546..cb107c7 100644 --- a/out/polyfill.d.ts +++ b/out/polyfill.d.ts @@ -1,5 +1,9 @@ import { RequestHandler } from 'express'; -import { PolyfillFeatureList } from 'polyfill-library'; +export declare type PolyfillFeatureList = { + [featureName: string]: { + flags?: string[]; + }; +}; export declare type PolyfillOptions = { minify: boolean; unknown: 'polyfill' | 'ignore'; diff --git a/src/index.ts b/src/index.ts index a1ee247..77bb066 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,7 +5,7 @@ export {AuthProxy} from './auth-proxy'; export {Resolvable, WaitForSync} from './helpers/resolvable'; export {urlJoin} from './helpers/urlJoin'; export {AutoReloader} from './auto-reload'; -export {Polyfill, PolyfillOptions} from './polyfill'; +export {Polyfill, PolyfillOptions, PolyfillFeatureList} from './polyfill'; export {Session} from './session'; export {Permissions} from './permissions'; diff --git a/src/polyfill.ts b/src/polyfill.ts index 4ff15df..a157bc7 100644 --- a/src/polyfill.ts +++ b/src/polyfill.ts @@ -1,10 +1,15 @@ import {RequestHandler} from 'express'; import * as polyfillLibrary from 'polyfill-library'; -import {PolyfillFeatureList} from 'polyfill-library'; import {DefaultConfig, Logger, WaitForSync} from '.'; import {spawn, Thread, Worker} from 'threads'; import {WorkerFunction} from 'threads/dist/types/worker'; +export type PolyfillFeatureList = { + [featureName: string]: { + flags?: string[] + } +}; + export type PolyfillOptions = { minify: boolean, unknown: 'polyfill'|'ignore',