inital #3
This commit is contained in:
@@ -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} from './polyfill';
|
||||
export {Polyfill, PolyfillOptions} from './polyfill';
|
||||
export {Session} from './session';
|
||||
export {Permissions} from './permissions';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import {expose} from "threads/worker";
|
||||
import * as fs from "fs";
|
||||
import {analyze} from '@10xjs/polyfill-analyzer';
|
||||
import allPolyfills from '@10xjs/polyfill-analyzer/dist/polyfills';
|
||||
import {PolyfillFeatureList} from "polyfill-library";
|
||||
import {PolyfillFeatureList} from 'polyfill-library';
|
||||
|
||||
expose(() => {
|
||||
const exclude = [
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
import {RequestHandler} from 'express';
|
||||
import * as polyfillLibrary from 'polyfill-library';
|
||||
import {PolyfillFeatureList, PolyfillOptions} 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 PolyfillOptions = {
|
||||
minify: boolean,
|
||||
unknown: 'polyfill'|'ignore',
|
||||
features: PolyfillFeatureList,
|
||||
excludes: string[],
|
||||
uaString: string,
|
||||
rum: boolean,
|
||||
}
|
||||
|
||||
const features = new WaitForSync<PolyfillFeatureList>();
|
||||
|
||||
(async () => {
|
||||
|
||||
9
src/types/auth-proxy.d.ts
vendored
9
src/types/auth-proxy.d.ts
vendored
@@ -1,9 +0,0 @@
|
||||
declare namespace Express {
|
||||
interface Request {
|
||||
getUserInfo(): Promise<import('../helpers/userinfo').UserInfo|undefined>;
|
||||
}
|
||||
|
||||
interface Response {
|
||||
initLogout(): boolean;
|
||||
}
|
||||
}
|
||||
28
src/types/extend-request.d.ts
vendored
Normal file
28
src/types/extend-request.d.ts
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// extend-request.d.ts
|
||||
|
||||
declare global {
|
||||
namespace Express {
|
||||
interface UserInfo {
|
||||
email: string,
|
||||
email_verified: boolean,
|
||||
family_name: string,
|
||||
given_name: string,
|
||||
groups: string[],
|
||||
name: string,
|
||||
preferred_username: string,
|
||||
sub: string,
|
||||
}
|
||||
|
||||
interface Request {
|
||||
getUserInfo(): Promise<UserInfo|undefined>;
|
||||
noLogging: boolean|undefined;
|
||||
permissionDetails?: import('role-acl').Permission;
|
||||
}
|
||||
|
||||
interface Response {
|
||||
initLogout(): boolean;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
5
src/types/logging.d.ts
vendored
5
src/types/logging.d.ts
vendored
@@ -1,5 +0,0 @@
|
||||
declare namespace Express {
|
||||
interface Request {
|
||||
noLogging: boolean|undefined;
|
||||
}
|
||||
}
|
||||
5
src/types/permissions.d.ts
vendored
5
src/types/permissions.d.ts
vendored
@@ -1,5 +0,0 @@
|
||||
declare namespace Express {
|
||||
interface Request {
|
||||
permissionDetails?: import('role-acl').Permission;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user