Export update

This commit is contained in:
Sebastian Seedorf
2020-11-16 16:20:03 +01:00
parent 51c80b7be5
commit f9ee76e42b
5 changed files with 14 additions and 9 deletions

View File

@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>

View File

@@ -1,12 +1,11 @@
export {DefaultConfig} from './config'; export {DefaultConfig} from './config';
export {Redis} from './redis'; export {Redis} from './redis';
export {Logger, HttpLogger} from './logging'; export {Logger, HttpLogger, levels, LogLevels} from './logging';
export {AuthProxy} from './auth-proxy'; export {AuthProxy} from './auth-proxy';
export {Resolvable, WaitForSync} from './helpers/resolvable'; export {Resolvable, WaitForSync} from './helpers/resolvable';
export {urlJoin} from './helpers/urlJoin'; export {urlJoin} from './helpers/urlJoin';
export {AutoReloader} from './auto-reload'; export {AutoReloader} from './auto-reload';
export {Polyfill, PolyfillOptions, PolyfillFeatureList} from './polyfill'; export {Polyfill, PolyfillOptions, PolyfillFeatureList} from './polyfill';
export {Session} from './session'; export {Session} from './session';
export {PermManager} from './permissions'; export {PermManager, PermissionManager, RermRouterOpts, PermQuery} from './permissions';
export {UserInfo} from './helpers/userinfo';
export { UserInfo } from './helpers/userinfo';

View File

@@ -16,8 +16,8 @@ const logger = winston.createLogger({
], ],
}); });
const levels = ["error", "warn", "info", "http", "verbose", "debug", "silly"] as const; export const levels = ["error", "warn", "info", "http", "verbose", "debug", "silly"] as const;
type LogLevels = typeof levels[number]|"log"; export type LogLevels = typeof levels[number]|"log";
const wrapper = (original: LeveledLogMethod) => { const wrapper = (original: LeveledLogMethod) => {
return (...args: unknown[]) => { return (...args: unknown[]) => {
return original(args.map((obj) => typeof obj === "string" ? obj : prune(obj)).join(" ")); return original(args.map((obj) => typeof obj === "string" ? obj : prune(obj)).join(" "));

View File

@@ -3,7 +3,7 @@ import {Query} from 'role-acl/lib/src/core/Query';
import {Request, RequestHandler} from 'express'; import {Request, RequestHandler} from 'express';
// see https://www.npmjs.com/package/role-acl // see https://www.npmjs.com/package/role-acl
class PermissionManager extends AccessControl { export class PermissionManager extends AccessControl {
public can(roleOrRequest: Request|string|string[]|IQueryInfo): PermQuery { public can(roleOrRequest: Request|string|string[]|IQueryInfo): PermQuery {
return new PermQuery(this.getGrants(), roleOrRequest); return new PermQuery(this.getGrants(), roleOrRequest);
} }

View File

@@ -37,8 +37,8 @@ function getRouter(fileToWatch: string, opts?: Partial<PolyfillOptions>): Reques
const options: Partial<PolyfillOptions> = { const options: Partial<PolyfillOptions> = {
minify: DefaultConfig.isProduction, minify: DefaultConfig.isProduction,
unknown: "polyfill", unknown: "polyfill",
...opts ...opts,
} };
return async (req, res) => { return async (req, res) => {
const polyfillBundle = await polyfillLibrary.getPolyfillString({ const polyfillBundle = await polyfillLibrary.getPolyfillString({
...options, ...options,