Comparing version 2.2.26 to 2.2.27
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TextCodes = exports.APiError = exports.APiSuccess = exports.APiResponse = exports.APiType = exports.RequestMethod = exports.HttpStatusCode = void 0; | ||
var HttpStatusCode; | ||
@@ -4,0 +5,0 @@ (function (HttpStatusCode) { |
@@ -12,3 +12,3 @@ /** | ||
import Router from "./Router"; | ||
import { MiddleWareInterface, CorsInterface, MiddleWareOptions } from './interfaces/index'; | ||
import { MiddleWareInterface, CorsInterface, MiddleWareOptions } from './interfaces'; | ||
declare const GET: (options?: { | ||
@@ -15,0 +15,0 @@ url: string; |
@@ -13,2 +13,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Use = exports.RouteMiddleWare = exports.DELETE = exports.PATCH = exports.POST = exports.PUT = exports.GET = exports.MiddleWare = void 0; | ||
// GET Decorator | ||
@@ -15,0 +16,0 @@ const decorator = (options, routersType, methodType) => { |
@@ -5,3 +5,3 @@ declare class FileUploadClass { | ||
setUploadPath(uploadPath: string): void; | ||
makeDirectory(folder: string): Promise<unknown>; | ||
makeDirectory(folder: string): Promise<void>; | ||
deleteFile(filename: string, folder: string): Promise<unknown>; | ||
@@ -8,0 +8,0 @@ saveImageBase64(data: any, uploadPath?: string): Promise<unknown>; |
@@ -15,3 +15,4 @@ /** | ||
import Response from "./Response"; | ||
import { OptionalObject } from "./interfaces/index"; | ||
import qs from "qs"; | ||
import { OptionalObject } from "./interfaces"; | ||
declare const helpers: { | ||
@@ -35,3 +36,3 @@ Cipher: { | ||
compileQueryParser: (val: any) => any; | ||
parseExtendedQueryString: (str: string) => any; | ||
parseExtendedQueryString: (str: string) => qs.ParsedQs; | ||
newObject: () => {}; | ||
@@ -38,0 +39,0 @@ compileTrust: (val: any) => any; |
@@ -11,3 +11,3 @@ /** | ||
*/ | ||
import { Server } from "./Server"; | ||
import { Server, BaseServer } from "./Server"; | ||
import Router from "./Router"; | ||
@@ -20,3 +20,3 @@ import { View } from "./View"; | ||
import { IResponse, APiError, APiSuccess, APiResponse, APiResponseInterface, HttpStatusCode, APiType, TextCodes, RequestMethod } from "./common"; | ||
import { Constructable, MiddleWareOptions } from "interfaces"; | ||
import { Constructable, MiddleWareOptions, ServerInterface, RepositoryPromiseResponseInterface } from "./interfaces"; | ||
declare const validation: { | ||
@@ -37,2 +37,2 @@ strip_html_tags: (str: string) => string | false; | ||
}; | ||
export { Server, Router, View, Request, Response, validation, Cipher, FileUpload, GET, POST, PUT, PATCH, DELETE, MiddleWare, RouteMiddleWare, IResponse, APiError, APiSuccess, APiResponse, APiResponseInterface, HttpStatusCode, APiType, Constructable, TextCodes, RequestMethod, MiddleWareOptions, Use }; | ||
export { Server, Router, View, Request, Response, validation, Cipher, FileUpload, GET, POST, PUT, PATCH, DELETE, MiddleWare, RouteMiddleWare, IResponse, APiError, APiSuccess, APiResponse, APiResponseInterface, HttpStatusCode, APiType, Constructable, TextCodes, RequestMethod, MiddleWareOptions, Use, ServerInterface, BaseServer, RepositoryPromiseResponseInterface }; |
@@ -6,2 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BaseServer = exports.Use = exports.RequestMethod = exports.TextCodes = exports.APiType = exports.HttpStatusCode = exports.APiResponse = exports.APiSuccess = exports.APiError = exports.RouteMiddleWare = exports.MiddleWare = exports.DELETE = exports.PATCH = exports.PUT = exports.POST = exports.GET = exports.FileUpload = exports.Cipher = exports.validation = exports.Response = exports.Request = exports.View = exports.Router = exports.Server = void 0; | ||
/** | ||
@@ -18,7 +19,8 @@ * @package @Grandjs | ||
const Server_1 = require("./Server"); | ||
exports.Server = Server_1.Server; | ||
Object.defineProperty(exports, "Server", { enumerable: true, get: function () { return Server_1.Server; } }); | ||
Object.defineProperty(exports, "BaseServer", { enumerable: true, get: function () { return Server_1.BaseServer; } }); | ||
const Router_1 = __importDefault(require("./Router")); | ||
exports.Router = Router_1.default; | ||
const View_1 = require("./View"); | ||
exports.View = View_1.View; | ||
Object.defineProperty(exports, "View", { enumerable: true, get: function () { return View_1.View; } }); | ||
const Request_1 = __importDefault(require("./Request")); | ||
@@ -32,18 +34,18 @@ exports.Request = Request_1.default; | ||
const decorators_1 = require("./decorators"); | ||
exports.GET = decorators_1.GET; | ||
exports.POST = decorators_1.POST; | ||
exports.PUT = decorators_1.PUT; | ||
exports.PATCH = decorators_1.PATCH; | ||
exports.DELETE = decorators_1.DELETE; | ||
exports.MiddleWare = decorators_1.MiddleWare; | ||
exports.RouteMiddleWare = decorators_1.RouteMiddleWare; | ||
exports.Use = decorators_1.Use; | ||
Object.defineProperty(exports, "GET", { enumerable: true, get: function () { return decorators_1.GET; } }); | ||
Object.defineProperty(exports, "POST", { enumerable: true, get: function () { return decorators_1.POST; } }); | ||
Object.defineProperty(exports, "PUT", { enumerable: true, get: function () { return decorators_1.PUT; } }); | ||
Object.defineProperty(exports, "PATCH", { enumerable: true, get: function () { return decorators_1.PATCH; } }); | ||
Object.defineProperty(exports, "DELETE", { enumerable: true, get: function () { return decorators_1.DELETE; } }); | ||
Object.defineProperty(exports, "MiddleWare", { enumerable: true, get: function () { return decorators_1.MiddleWare; } }); | ||
Object.defineProperty(exports, "RouteMiddleWare", { enumerable: true, get: function () { return decorators_1.RouteMiddleWare; } }); | ||
Object.defineProperty(exports, "Use", { enumerable: true, get: function () { return decorators_1.Use; } }); | ||
const common_1 = require("./common"); | ||
exports.APiError = common_1.APiError; | ||
exports.APiSuccess = common_1.APiSuccess; | ||
exports.APiResponse = common_1.APiResponse; | ||
exports.HttpStatusCode = common_1.HttpStatusCode; | ||
exports.APiType = common_1.APiType; | ||
exports.TextCodes = common_1.TextCodes; | ||
exports.RequestMethod = common_1.RequestMethod; | ||
Object.defineProperty(exports, "APiError", { enumerable: true, get: function () { return common_1.APiError; } }); | ||
Object.defineProperty(exports, "APiSuccess", { enumerable: true, get: function () { return common_1.APiSuccess; } }); | ||
Object.defineProperty(exports, "APiResponse", { enumerable: true, get: function () { return common_1.APiResponse; } }); | ||
Object.defineProperty(exports, "HttpStatusCode", { enumerable: true, get: function () { return common_1.HttpStatusCode; } }); | ||
Object.defineProperty(exports, "APiType", { enumerable: true, get: function () { return common_1.APiType; } }); | ||
Object.defineProperty(exports, "TextCodes", { enumerable: true, get: function () { return common_1.TextCodes; } }); | ||
Object.defineProperty(exports, "RequestMethod", { enumerable: true, get: function () { return common_1.RequestMethod; } }); | ||
const validation = helpers_1.default.validation; | ||
@@ -50,0 +52,0 @@ exports.validation = validation; |
@@ -15,3 +15,3 @@ /** | ||
import Route from "./Route"; | ||
import { MiddleWareInterface } from './interfaces/index'; | ||
import { MiddleWareInterface } from './interfaces'; | ||
declare class MiddleWare { | ||
@@ -18,0 +18,0 @@ next(matchedRoute: Route, req: Request, res: Response): any; |
@@ -12,3 +12,3 @@ /// <reference types="node" /> | ||
*/ | ||
import { RequestInterface, OptionalObject } from './interfaces/index'; | ||
import { RequestInterface, OptionalObject } from './interfaces'; | ||
import http from 'http'; | ||
@@ -15,0 +15,0 @@ import { Socket } from 'net'; |
@@ -13,3 +13,3 @@ /// <reference types="node" /> | ||
import http from "http"; | ||
import { ResponseInterface, OptionalObject } from './interfaces/index'; | ||
import { ResponseInterface, OptionalObject } from './interfaces'; | ||
import Request from "./Request"; | ||
@@ -16,0 +16,0 @@ declare class Response extends http.ServerResponse implements ResponseInterface { |
@@ -11,3 +11,3 @@ /** | ||
*/ | ||
import { RouteInterface, HandlerInterface, MiddleWareInterface, CorsInterface } from "./interfaces/index"; | ||
import { RouteInterface, HandlerInterface, MiddleWareInterface, CorsInterface } from "./interfaces"; | ||
import Request from "./Request"; | ||
@@ -14,0 +14,0 @@ import Response from "./Response"; |
@@ -11,3 +11,3 @@ /** | ||
*/ | ||
import { RouterInterface, CorsInterface, MiddleWareInterface, StaticFolderInterface, ServerConfigurations, TempMiddleWares } from './interfaces/index'; | ||
import { RouterInterface, CorsInterface, MiddleWareInterface, StaticFolderInterface, ServerConfigurations, TempMiddleWares } from './interfaces'; | ||
import Request from "./Request"; | ||
@@ -60,3 +60,3 @@ import Response from "./Response"; | ||
resolveRoutesWithBase: () => void; | ||
corsMiddleWare(req: any, res: any, next: any): any; | ||
corsMiddleWare(req: any, res: any, next: any): void; | ||
serveAssets(req: Request, res: Response, next: Function): Promise<any>; | ||
@@ -63,0 +63,0 @@ static(options: { |
@@ -13,3 +13,3 @@ /// <reference types="node" /> | ||
import http from "http"; | ||
import { ServerInterface, MiddleWareInterface, ServerConfigurations, RouterInterface, OptionalObject } from './interfaces/index'; | ||
import { ServerInterface, MiddleWareInterface, ServerConfigurations, RouterInterface, OptionalObject } from './interfaces'; | ||
import Request from "./Request"; | ||
@@ -16,0 +16,0 @@ import Response from "./Response"; |
@@ -6,2 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BaseServer = exports.Server = void 0; | ||
/** | ||
@@ -8,0 +9,0 @@ * @package @Grandjs |
@@ -1,2 +0,2 @@ | ||
import { OptionalObject, NodeInterface } from "./interfaces/index"; | ||
import { OptionalObject, NodeInterface } from "./interfaces"; | ||
import Response from "./Response"; | ||
@@ -3,0 +3,0 @@ declare class ViewClass { |
@@ -6,2 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.View = void 0; | ||
/** | ||
@@ -8,0 +9,0 @@ * @package @Grandjs |
{ | ||
"name": "grandjs", | ||
"version": "2.2.26", | ||
"version": "2.2.27", | ||
"description": "A backend framework for solid web apps based on node.js", | ||
@@ -58,2 +58,3 @@ "main": "lib/index.js", | ||
"@types/proxy-addr": "^2.0.0", | ||
"@types/qs": "^6.9.6", | ||
"@types/range-parser": "^1.2.3", | ||
@@ -60,0 +61,0 @@ "@types/send": "^0.14.5", |
@@ -163,2 +163,2 @@ export enum HttpStatusCode { | ||
ENTITY_ALREADY_EXIST = "ENTITY_ALREADY_EXIST", | ||
} | ||
} |
@@ -14,3 +14,3 @@ /** | ||
import Router from "./Router"; | ||
import { MiddleWareInterface, CorsInterface, TempMiddleWares, MiddleWareOptions } from './interfaces/index'; | ||
import { MiddleWareInterface, CorsInterface, TempMiddleWares, MiddleWareOptions } from './interfaces'; | ||
import { RequestMethod } from './common'; | ||
@@ -17,0 +17,0 @@ // GET Decorator |
@@ -10,3 +10,3 @@ /* | ||
import path from "path"; | ||
import { OptionalObject } from './interfaces/index'; | ||
import { OptionalObject } from './interfaces'; | ||
// define uploader file class | ||
@@ -24,3 +24,3 @@ class FileUploadClass { | ||
// return promise | ||
return new Promise((resolve, reject) => { | ||
return new Promise<void>((resolve, reject) => { | ||
folder = path.join(process.cwd(), folder); | ||
@@ -27,0 +27,0 @@ fs.exists(folder, (exist:boolean) => { |
@@ -24,3 +24,3 @@ /** | ||
import contentType from "content-type"; | ||
import { OptionalObject, NodeInterface } from "./interfaces/index"; | ||
import { OptionalObject, NodeInterface } from "./interfaces"; | ||
import util from "util"; | ||
@@ -27,0 +27,0 @@ // end dependencies |
@@ -11,3 +11,3 @@ /** | ||
*/ | ||
import {Server} from "./Server"; | ||
import {Server, BaseServer} from "./Server"; | ||
import Router from "./Router"; | ||
@@ -21,6 +21,6 @@ import {View} from "./View"; | ||
import {IResponse, APiError, APiSuccess, APiResponse, APiResponseInterface, HttpStatusCode, APiType, TextCodes, RequestMethod} from "./common" | ||
import {Constructable, MiddleWareOptions} from "interfaces" | ||
import {Constructable, MiddleWareOptions, ServerInterface, RepositoryPromiseResponseInterface} from "./interfaces" | ||
const validation = helpers.validation; | ||
const Cipher = helpers.Cipher; | ||
export {Server, Router, View, Request, Response, validation, Cipher, FileUpload, GET, POST, PUT, PATCH, DELETE, MiddleWare, RouteMiddleWare, IResponse, APiError, APiSuccess, APiResponse, APiResponseInterface, HttpStatusCode, APiType, Constructable, TextCodes, RequestMethod, MiddleWareOptions, Use}; | ||
export {Server, Router, View, Request, Response, validation, Cipher, FileUpload, GET, POST, PUT, PATCH, DELETE, MiddleWare, RouteMiddleWare, IResponse, APiError, APiSuccess, APiResponse, APiResponseInterface, HttpStatusCode, APiType, Constructable, TextCodes, RequestMethod, MiddleWareOptions, Use, ServerInterface, BaseServer, RepositoryPromiseResponseInterface}; |
@@ -15,3 +15,3 @@ /** | ||
import Route from "./Route"; | ||
import { ServerInterface, MiddleWareInterface, CorsInterface, RequestInterface, ResponseInterface, ServerConfigurations, RouteInterface, RouterInterface } from './interfaces/index'; | ||
import { ServerInterface, MiddleWareInterface, CorsInterface, RequestInterface, ResponseInterface, ServerConfigurations, RouteInterface, RouterInterface } from './interfaces'; | ||
// import Server from "./Server"; | ||
@@ -18,0 +18,0 @@ |
@@ -11,3 +11,3 @@ /** | ||
*/ | ||
import { RequestInterface, ServerInterface, OptionalObject } from './interfaces/index'; | ||
import { RequestInterface, ServerInterface, OptionalObject } from './interfaces'; | ||
import http from 'http' | ||
@@ -14,0 +14,0 @@ import { Socket } from 'net' |
@@ -20,3 +20,3 @@ /** | ||
import Route from "./Route"; | ||
import {OptionalObject} from "./interfaces/index"; | ||
import {OptionalObject} from "./interfaces"; | ||
import querystring from "querystring"; | ||
@@ -23,0 +23,0 @@ config.reverseMimeTypes(); |
@@ -12,3 +12,3 @@ /** | ||
import http from "http"; | ||
import { ResponseInterface, OptionalObject } from './interfaces/index'; | ||
import { ResponseInterface, OptionalObject } from './interfaces'; | ||
import helpers from './helpers'; | ||
@@ -15,0 +15,0 @@ import Request from "./Request"; |
@@ -11,3 +11,3 @@ /** | ||
*/ | ||
import { RouteInterface, RouterInterface, HandlerInterface, MiddleWareInterface, CorsInterface } from "./interfaces/index"; | ||
import { RouteInterface, RouterInterface, HandlerInterface, MiddleWareInterface, CorsInterface } from "./interfaces"; | ||
import RouteParser from "url-pattern"; | ||
@@ -14,0 +14,0 @@ import Request from "./Request"; |
@@ -11,3 +11,3 @@ /** | ||
*/ | ||
import { RouterInterface, CorsInterface, MiddleWareInterface, RequestInterface, ResponseInterface, RouteInterface, StaticFolderInterface, ServerConfigurations, TempMiddleWares } from './interfaces/index'; | ||
import { RouterInterface, CorsInterface, MiddleWareInterface, RequestInterface, ResponseInterface, RouteInterface, StaticFolderInterface, ServerConfigurations, TempMiddleWares } from './interfaces'; | ||
import path from "path"; | ||
@@ -14,0 +14,0 @@ import cors from "cors"; |
@@ -21,3 +21,3 @@ /** | ||
import config from "./config"; | ||
import { ServerInterface, MiddleWareInterface, AssetsHandlerInterface, CorsInterface, RequestInterface, ResponseInterface, ServerConfigurations, RouteInterface, RouterInterface, OptionalObject } from './interfaces/index'; | ||
import { ServerInterface, MiddleWareInterface, AssetsHandlerInterface, CorsInterface, RequestInterface, ResponseInterface, ServerConfigurations, RouteInterface, RouterInterface, OptionalObject } from './interfaces'; | ||
import Request from "./Request"; | ||
@@ -24,0 +24,0 @@ import Response from "./Response"; |
@@ -12,3 +12,3 @@ /** | ||
const importJsx = require("import-jsx"); | ||
import { OptionalObject, NodeInterface } from "./interfaces/index"; | ||
import { OptionalObject, NodeInterface } from "./interfaces"; | ||
import helpers from "./helpers"; | ||
@@ -15,0 +15,0 @@ import Path from "path"; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
263491
15
56
5699