Export update
This commit is contained in:
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal 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>
|
||||||
@@ -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';
|
|
||||||
|
|||||||
@@ -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(" "));
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user