qumra-engine 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addFilter.d.ts +1 -0
- package/dist/filters/addFilter.d.ts +1 -0
- package/dist/filters/capitalize.d.ts +1 -0
- package/dist/filters/discountLabel.d.ts +1 -0
- package/dist/filters/formatDate.d.ts +1 -0
- package/dist/filters/formatMoney.d.ts +1 -0
- package/dist/filters/index.d.ts +5 -0
- package/dist/filters/logic/capitalize.d.ts +1 -0
- package/dist/filters/logic/component.d.ts +2 -0
- package/dist/filters/logic/discountLabel.d.ts +1 -0
- package/dist/filters/logic/formatDate.d.ts +1 -0
- package/dist/filters/logic/formatMoney.d.ts +1 -0
- package/dist/filters/registerAllFilters.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/middleware.d.ts +2 -0
- package/dist/middlewares/errorHandler.d.ts +8 -0
- package/dist/middlewares/pathMiddleware.d.ts +2 -0
- package/dist/middlewares/prepareDataMiddleware.d.ts +2 -0
- package/dist/middlewares/themeMiddleware.d.ts +2 -0
- package/dist/nunjucksEnv.d.ts +6 -0
- package/dist/registerAllFilters.d.ts +2 -0
- package/dist/render.d.ts +1 -0
- package/dist/services/getRenderData.d.ts +3 -0
- package/dist/services/prepareData.d.ts +2 -0
- package/dist/services/prepareDataMiddleware.d.ts +2 -0
- package/dist/services/renderHandler.d.ts +2 -0
- package/dist/types/sharedTypes.d.ts +20 -0
- package/dist/utils/logger.d.ts +5 -0
- package/dist/utils/render.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function addFilter(name: string, fn: (...args: any[]) => any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function addFilter(env: any, name: string, fn: (...args: any[]) => any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function capitalize(str: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function discountLabel(value: number): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function formatDate(date: Date | string, locale?: string): string | Date;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function formatMoney(value: number, currency?: string): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as formatMoney } from './logic/formatMoney';
|
|
2
|
+
export { default as formatDate } from './logic/formatDate';
|
|
3
|
+
export { default as capitalize } from './logic/capitalize';
|
|
4
|
+
export { default as discountLabel } from './logic/discountLabel';
|
|
5
|
+
export { default as component } from './logic/component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function capitalize(str: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function discountLabel(value: number): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function formatDate(date: Date | string, locale?: string): string | Date;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function formatMoney(value: number, currency?: string): string;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Request, Response, NextFunction } from 'express';
|
|
2
|
+
export declare class AppError extends Error {
|
|
3
|
+
statusCode: number;
|
|
4
|
+
status: string;
|
|
5
|
+
isOperational: boolean;
|
|
6
|
+
constructor(message: string, statusCode: number);
|
|
7
|
+
}
|
|
8
|
+
export declare const errorHandler: (err: Error | AppError, req: Request, res: Response, next: NextFunction) => Response<any, Record<string, any>>;
|
package/dist/render.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function render(view: string, context?: object): Promise<string>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface Globals {
|
|
2
|
+
app: any;
|
|
3
|
+
Setting: any;
|
|
4
|
+
}
|
|
5
|
+
export interface RenderContext {
|
|
6
|
+
page: Page;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
export interface MainData {
|
|
10
|
+
globals?: Globals;
|
|
11
|
+
context?: RenderContext;
|
|
12
|
+
themePath?: string;
|
|
13
|
+
assetsPath?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface Page {
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
18
|
+
fileName: string;
|
|
19
|
+
path: string;
|
|
20
|
+
}
|