@feathersjs/express
Advanced tools
Comparing version 5.0.0-pre.2 to 5.0.0-pre.3
@@ -6,2 +6,18 @@ # Change Log | ||
# [5.0.0-pre.3](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.2...v5.0.0-pre.3) (2021-04-21) | ||
### Bug Fixes | ||
* **typescript:** Improve TypeScript backwards compatibility ([#2310](https://github.com/feathersjs/feathers/issues/2310)) ([f33be73](https://github.com/feathersjs/feathers/commit/f33be73fc46a533efb15df9aab0658e3240d3897)) | ||
### Features | ||
* **dependencies:** Remove direct debug dependency ([#2296](https://github.com/feathersjs/feathers/issues/2296)) ([501d416](https://github.com/feathersjs/feathers/commit/501d4164d30c6a126906dc640cdfdc82207ba34a)) | ||
# [5.0.0-pre.2](https://github.com/feathersjs/feathers/compare/v5.0.0-beta.1...v5.0.0-pre.2) (2021-04-06) | ||
@@ -8,0 +24,0 @@ |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.authenticate = exports.parseAuthentication = void 0; | ||
const debug_1 = __importDefault(require("debug")); | ||
const commons_1 = require("@feathersjs/commons"); | ||
const lodash_1 = require("lodash"); | ||
const debug = debug_1.default('@feathersjs/express/authentication'); | ||
const debug = commons_1.createDebug('@feathersjs/express/authentication'); | ||
const normalizeStrategy = (_settings, ..._strategies) => typeof _settings === 'string' | ||
@@ -11,0 +8,0 @@ ? { strategies: lodash_1.flatten([_settings, ..._strategies]) } |
@@ -7,3 +7,3 @@ /// <reference types="node" /> | ||
<L extends keyof ServiceTypes & string>(path: L, ...middlewareOrService: (Express | express.RequestHandler | (keyof any extends keyof ServiceTypes ? ServiceInterface<any> : ServiceTypes[L]))[]): T; | ||
(path: RegExp, ...expressHandlers: express.RequestHandler[]): T; | ||
(path: string | RegExp, ...expressHandlers: express.RequestHandler[]): T; | ||
(...expressHandlers: express.RequestHandler[]): T; | ||
@@ -10,0 +10,0 @@ (handler: Express | express.ErrorRequestHandler): T; |
@@ -33,8 +33,4 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseAuthentication = exports.authenticate = exports.original = exports.notFound = exports.errorHandler = exports.query = exports.urlencoded = exports.text = exports.raw = exports.json = exports.static = void 0; | ||
const debug_1 = __importDefault(require("debug")); | ||
const express_1 = __importStar(require("express")); | ||
@@ -49,2 +45,3 @@ exports.original = express_1.default; | ||
const feathers_1 = require("@feathersjs/feathers"); | ||
const commons_1 = require("@feathersjs/commons"); | ||
const handlers_1 = require("./handlers"); | ||
@@ -58,3 +55,3 @@ Object.defineProperty(exports, "errorHandler", { enumerable: true, get: function () { return handlers_1.errorHandler; } }); | ||
__exportStar(require("./declarations"), exports); | ||
const debug = debug_1.default('@feathersjs/express'); | ||
const debug = commons_1.createDebug('@feathersjs/express'); | ||
function feathersExpress(feathersApp, expressApp = express_1.default()) { | ||
@@ -61,0 +58,0 @@ if (!feathersApp) { |
@@ -22,14 +22,11 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.rest = exports.serviceMethodHandler = exports.serviceMiddleware = exports.formatter = exports.feathersParams = exports.statusCodes = exports.METHOD_HEADER = void 0; | ||
const debug_1 = __importDefault(require("debug")); | ||
const errors_1 = require("@feathersjs/errors"); | ||
const hooks_1 = require("@feathersjs/hooks"); | ||
const commons_1 = require("@feathersjs/commons"); | ||
const feathers_1 = require("@feathersjs/feathers"); | ||
const express_1 = require("express"); | ||
const authentication_1 = require("./authentication"); | ||
const debug = debug_1.default('@feathersjs/express/rest'); | ||
const debug = commons_1.createDebug('@feathersjs/express/rest'); | ||
exports.METHOD_HEADER = 'x-service-method'; | ||
@@ -59,3 +56,3 @@ exports.statusCodes = { | ||
const getData = (context) => { | ||
if (!(context instanceof hooks_1.HookContext)) { | ||
if (!(context instanceof hooks_1.BaseHookContext)) { | ||
return context; | ||
@@ -68,3 +65,3 @@ } | ||
const getStatusCode = (context, res) => { | ||
if (context instanceof hooks_1.HookContext) { | ||
if (context instanceof hooks_1.BaseHookContext) { | ||
if (context.statusCode) { | ||
@@ -71,0 +68,0 @@ return context.statusCode; |
{ | ||
"name": "@feathersjs/express", | ||
"description": "Feathers Express framework bindings and REST provider", | ||
"version": "5.0.0-pre.2", | ||
"version": "5.0.0-pre.3", | ||
"homepage": "https://feathersjs.com", | ||
@@ -52,6 +52,5 @@ "main": "lib/", | ||
"dependencies": { | ||
"@feathersjs/commons": "^5.0.0-pre.2", | ||
"@feathersjs/errors": "^5.0.0-pre.2", | ||
"@feathersjs/commons": "^5.0.0-pre.3", | ||
"@feathersjs/errors": "^5.0.0-pre.3", | ||
"@types/express": "^4.17.11", | ||
"debug": "^4.3.1", | ||
"express": "^4.17.1", | ||
@@ -61,8 +60,8 @@ "lodash": "^4.17.21" | ||
"devDependencies": { | ||
"@feathersjs/authentication": "^5.0.0-pre.2", | ||
"@feathersjs/authentication-local": "^5.0.0-pre.2", | ||
"@feathersjs/feathers": "^5.0.0-pre.2", | ||
"@feathersjs/tests": "^5.0.0-pre.2", | ||
"@feathersjs/authentication": "^5.0.0-pre.3", | ||
"@feathersjs/authentication-local": "^5.0.0-pre.3", | ||
"@feathersjs/feathers": "^5.0.0-pre.3", | ||
"@feathersjs/tests": "^5.0.0-pre.3", | ||
"@types/mocha": "^8.2.2", | ||
"@types/node": "^14.14.37", | ||
"@types/node": "^14.14.41", | ||
"axios": "^0.21.1", | ||
@@ -73,5 +72,5 @@ "lodash": "^4.17.21", | ||
"ts-node": "^9.1.1", | ||
"typescript": "^4.2.3" | ||
"typescript": "^4.2.4" | ||
}, | ||
"gitHead": "6e1f888dc5b612d2d77653177622e3f66245a0fb" | ||
"gitHead": "d332eaca9945aab0c222413a7e46cec1c0601648" | ||
} |
@@ -1,6 +0,6 @@ | ||
import Debug from 'debug'; | ||
import { createDebug } from '@feathersjs/commons'; | ||
import { merge, flatten } from 'lodash'; | ||
import { NextFunction, RequestHandler } from 'express'; | ||
const debug = Debug('@feathersjs/express/authentication'); | ||
const debug = createDebug('@feathersjs/express/authentication'); | ||
@@ -7,0 +7,0 @@ type StrategyOptions = { |
@@ -16,3 +16,3 @@ import http from 'http'; | ||
): T; | ||
(path: RegExp, ...expressHandlers: express.RequestHandler[]): T; | ||
(path: string|RegExp, ...expressHandlers: express.RequestHandler[]): T; | ||
(...expressHandlers: express.RequestHandler[]): T; | ||
@@ -19,0 +19,0 @@ (handler: Express|express.ErrorRequestHandler): T; |
@@ -1,2 +0,1 @@ | ||
import Debug from 'debug'; | ||
import express, { | ||
@@ -8,2 +7,3 @@ Express, static as _static, json, raw, text, urlencoded, query | ||
} from '@feathersjs/feathers'; | ||
import { createDebug } from '@feathersjs/commons'; | ||
@@ -23,3 +23,3 @@ import { Application } from './declarations'; | ||
const debug = Debug('@feathersjs/express'); | ||
const debug = createDebug('@feathersjs/express'); | ||
@@ -26,0 +26,0 @@ export default function feathersExpress<S = any, C = any> (feathersApp?: FeathersApplication<S, C>, expressApp: Express = express()): Application<S, C> { |
@@ -1,4 +0,4 @@ | ||
import Debug from 'debug'; | ||
import { MethodNotAllowed } from '@feathersjs/errors'; | ||
import { HookContext } from '@feathersjs/hooks'; | ||
import { BaseHookContext, HookContext } from '@feathersjs/hooks'; | ||
import { createDebug } from '@feathersjs/commons'; | ||
import { createContext, defaultServiceMethods, getServiceOptions, NullableId, Params } from '@feathersjs/feathers'; | ||
@@ -9,3 +9,3 @@ import { Request, Response, NextFunction, RequestHandler, Router } from 'express'; | ||
const debug = Debug('@feathersjs/express/rest'); | ||
const debug = createDebug('@feathersjs/express/rest'); | ||
@@ -51,3 +51,3 @@ export const METHOD_HEADER = 'x-service-method'; | ||
const getData = (context: HookContext) => { | ||
if (!(context instanceof HookContext)) { | ||
if (!(context instanceof BaseHookContext)) { | ||
return context; | ||
@@ -62,3 +62,3 @@ } | ||
const getStatusCode = (context: HookContext, res: Response) => { | ||
if (context instanceof HookContext) { | ||
if (context instanceof BaseHookContext) { | ||
if (context.statusCode) { | ||
@@ -65,0 +65,0 @@ return context.statusCode; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
115835
5
0
960
- Removeddebug@^4.3.1
- Removeddebug@4.4.0(transitive)