( + path: PathParams, + ...handlers: (RequestHandler
| FeathersService | Application)[] + ): T; + } +} diff --git a/packages/express/lib/authentication.js b/packages/express/lib/authentication.js index 2728f2bf90..a937bb53f2 100644 --- a/packages/express/lib/authentication.js +++ b/packages/express/lib/authentication.js @@ -1,43 +1,38 @@ -const { flatten, merge } = require('lodash'); +const flatten = require('lodash/flatten'); +const merge = require('lodash/merge'); const debug = require('debug')('@feathersjs/express/authentication'); const normalizeStrategy = (_settings = [], ..._strategies) => typeof _settings === 'string' ? { strategies: flatten([ _settings, ..._strategies ]) } : _settings; -const getService = (settings, app) => { - const path = settings.service || app.get('defaultAuthentication'); - - if (typeof path !== 'string') { - return null; - } - - return app.service(path) || null; -}; exports.parseAuthentication = (settings = {}) => { return function (req, res, next) { const { app } = req; - const service = getService(settings, app); + const service = app.defaultAuthentication ? app.defaultAuthentication(settings.service) : null; if (service === null) { return next(); } - const { authStrategies = [] } = service.configuration; + const config = service.configuration; + const authStrategies = config.parseStrategies || config.authStrategies || []; if (authStrategies.length === 0) { - debug('No `authStrategies` found in authentication configuration'); + debug('No `authStrategies` or `parseStrategies` found in authentication configuration'); return next(); } service.parse(req, res, ...authStrategies) .then(authentication => { - debug('Parsed authentication from HTTP header', authentication); - merge(req, { - authentication, - feathers: { authentication } - }); + if (authentication) { + debug('Parsed authentication from HTTP header', authentication); + merge(req, { + authentication, + feathers: { authentication } + }); + } next(); }).catch(next); @@ -53,7 +48,7 @@ exports.authenticate = (...strategies) => { return function (req, res, next) { const { app, authentication } = req; - const service = getService(settings, app); + const service = app.defaultAuthentication(settings.service); debug('Authenticating with Express middleware and strategies', settings.strategies); diff --git a/packages/express/lib/index.js b/packages/express/lib/index.js index b6ae0c55c9..ee38524335 100644 --- a/packages/express/lib/index.js +++ b/packages/express/lib/index.js @@ -7,9 +7,9 @@ const authentication = require('./authentication'); const notFound = require('./not-found-handler'); const rest = require('./rest'); -function feathersExpress (feathersApp) { +function feathersExpress (feathersApp, expressApp = express()) { if (!feathersApp) { - return express(); + return expressApp; } if (typeof feathersApp.setup !== 'function') { @@ -20,7 +20,6 @@ function feathersExpress (feathersApp) { throw new Error(`@feathersjs/express requires an instance of a Feathers application version 3.x or later (got ${feathersApp.version || 'unknown'})`); } - const expressApp = express(); // An Uberproto mixin that provides the extended functionality const mixin = { use (location) { @@ -28,7 +27,7 @@ function feathersExpress (feathersApp) { let middleware = Array.from(arguments) .slice(1) .reduce(function (middleware, arg) { - if (typeof arg === 'function') { + if (typeof arg === 'function' || Array.isArray(arg)) { middleware[service ? 'after' : 'before'].push(arg); } else if (!service) { service = arg; @@ -42,7 +41,7 @@ function feathersExpress (feathersApp) { }); const hasMethod = methods => methods.some(name => - (service && !Array.isArray(service) && typeof service[name] === 'function') + (service && typeof service[name] === 'function') ); // Check for service (any object with at least one service method) @@ -52,7 +51,7 @@ function feathersExpress (feathersApp) { } debug('Registering service with middleware', middleware); - // Since this is a serivce, call Feathers `.use` + // Since this is a service, call Feathers `.use` feathersApp.use.call(this, location, service, { middleware }); return this; diff --git a/packages/express/lib/rest/getHandler.js b/packages/express/lib/rest/getHandler.js index 4805b5a1fa..42954e4b21 100644 --- a/packages/express/lib/rest/getHandler.js +++ b/packages/express/lib/rest/getHandler.js @@ -32,16 +32,16 @@ function getAllowedMethods (service, routes) { } function makeArgsGetter (argsOrder) { - return (req, params) => argsOrder.reduce((result, argName) => { + return (req, params) => argsOrder.map((argName) => { switch (argName) { case 'id': - return [ ...result, req.params.__feathersId || null ]; + return req.params.__feathersId || null; case 'data': - return [ ...result, req.body ]; + return req.body; case 'params': - return [ ...result, params ]; + return params; } - }, []); + }); } // A function that returns the middleware for a given method and service diff --git a/packages/express/package.json b/packages/express/package.json index 59289b8463..91c4ec6508 100644 --- a/packages/express/package.json +++ b/packages/express/package.json @@ -1,7 +1,7 @@ { "name": "@feathersjs/express", "description": "Feathers Express framework bindings and REST provider", - "version": "4.0.0-pre.3", + "version": "4.5.4", "homepage": "https://feathersjs.com", "main": "lib/", "types": "index.d.ts", @@ -10,6 +10,10 @@ "feathers-plugin" ], "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/feathers" + }, "repository": { "type": "git", "url": "git://github.com/feathersjs/feathers.git" @@ -24,10 +28,10 @@ "url": "https://github.com/feathersjs/feathers/issues" }, "engines": { - "node": ">= 6" + "node": ">= 10" }, "scripts": { - "test": "mocha --opts ../../mocha.opts" + "test": "mocha --config ../../.mocharc.json" }, "directories": { "lib": "lib" @@ -36,22 +40,22 @@ "access": "public" }, "dependencies": { - "@feathersjs/commons": "^4.0.0-pre.3", - "@feathersjs/errors": "^4.0.0-pre.3", - "@types/express": "^4.16.1", + "@feathersjs/commons": "^4.5.3", + "@feathersjs/errors": "^4.5.3", + "@types/express": "^4.17.7", "debug": "^4.1.1", "express": "^4.17.1", - "uberproto": "^2.0.4" + "lodash": "^4.17.19", + "uberproto": "^2.0.6" }, "devDependencies": { - "@feathersjs/authentication": "^4.0.0-pre.3", - "@feathersjs/authentication-local": "^4.0.0-pre.3", - "@feathersjs/feathers": "^4.0.0-pre.3", - "@feathersjs/tests": "^4.0.0-pre.3", - "axios": "^0.19.0", - "chai": "^4.2.0", - "lodash": "^4.17.11", - "mocha": "^6.1.4" - }, - "gitHead": "19eb75737659e3e4b57765c1653d23c86fd2e1c3" + "@feathersjs/authentication": "^4.5.3", + "@feathersjs/authentication-local": "^4.5.4", + "@feathersjs/feathers": "^4.5.3", + "@feathersjs/tests": "^4.5.3", + "axios": "^0.19.2", + "lodash": "^4.17.19", + "mocha": "^8.0.1" + }, + "gitHead": "9b9f0f13387341bdd320f1e66feda828fca2c9f2" } diff --git a/packages/express/test/authentication.test.js b/packages/express/test/authentication.test.js index 6121413e1d..a96ba63d83 100644 --- a/packages/express/test/authentication.test.js +++ b/packages/express/test/authentication.test.js @@ -116,9 +116,10 @@ describe('@feathersjs/express/authentication', () => { }); }); - it('errors when there are no authStrategies', () => { + it('errors when there are no authStrategies and parseStrategies', () => { const { accessToken } = authResult; app.get('authentication').authStrategies = []; + delete app.get('authentication').parseStrategies; return axios.get('/dummy/dave', { headers: { diff --git a/packages/express/test/error-handler.test.js b/packages/express/test/error-handler.test.js index 20216545ef..ba649feee9 100644 --- a/packages/express/test/error-handler.test.js +++ b/packages/express/test/error-handler.test.js @@ -1,37 +1,31 @@ /* tsline:disable:handle-callback-err */ /* tslint:disable:no-unused-expression */ +const { strict: assert } = require('assert'); const express = require('express'); - const errors = require('@feathersjs/errors'); -const chai = require('chai'); -const sinon = require('sinon'); -const sinonChai = require('sinon-chai'); const request = require('request'); const fs = require('fs'); const { join } = require('path'); const handler = require('../lib/error-handler'); -chai.use(sinonChai); - -const { expect } = chai; const content = '
Error'; -let htmlHandler = sinon.spy(function (error, req, res, next) { +let htmlHandler = function (error, req, res, next) { res.send(content); -}); +}; -const jsonHandler = sinon.spy(function (error, req, res, next) { +const jsonHandler = function (error, req, res, next) { res.json(error); -}); +}; describe('error-handler', () => { it('is CommonJS compatible', () => { - expect(typeof require('../lib/error-handler')).to.equal('function'); + assert.equal(typeof require('../lib/error-handler'), 'function'); }); it('is import compatible', () => { - expect(typeof handler).to.equal('function'); + assert.equal(typeof handler, 'function'); }); describe('supports catch-all custom handlers', function () { @@ -66,23 +60,16 @@ describe('error-handler', () => { } }; - it('is called', done => { - request(options, (error, res, body) => { - expect(htmlHandler).to.be.called; // eslint-disable-line - done(); - }); - }); - it('logs the error', done => { request(options, (error, res, body) => { - expect(currentError.message).to.equal('Something went wrong'); + assert.equal(currentError.message, 'Something went wrong'); done(); }); }); it('can send a custom response', done => { request(options, (error, res, body) => { - expect(body).to.equal(content); + assert.equal(body, content); done(); }); }); @@ -97,13 +84,6 @@ describe('error-handler', () => { } }; - it('is called', done => { - request(options, (error, res, body) => { - expect(jsonHandler).to.be.called; - done(); - }); - }); - it('can send a custom response', done => { const expected = JSON.stringify({ name: 'GeneralError', @@ -114,7 +94,7 @@ describe('error-handler', () => { errors: {} }); request(options, (error, res, body) => { - expect(body).to.deep.equal(expected); + assert.deepEqual(body, expected); done(); }); }); @@ -130,7 +110,7 @@ describe('error-handler', () => { return Object.assign({ set () {}, status (code) { - expect(code).to.equal(errCode); + assert.equal(code, errCode); } }, props); }; @@ -143,7 +123,7 @@ describe('error-handler', () => { }); const res = makeRes(401, { sendFile (f) { - expect(f).to.equal('path/to/401.html'); + assert.equal(f, 'path/to/401.html'); done(); } }); @@ -156,9 +136,9 @@ describe('error-handler', () => { const middleware = handler({ logger: null, html: { 402: (_err, _req, _res) => { - expect(_err).to.equal(err); - expect(_req).to.equal(req); - expect(_res).to.equal(res); + assert.equal(_err, err); + assert.equal(_req, req); + assert.equal(_res, res); done(); } } }); @@ -171,9 +151,9 @@ describe('error-handler', () => { const middleware = handler({ logger: null, html: { default: (_err, _req, _res) => { - expect(_err).to.equal(err); - expect(_req).to.equal(req); - expect(_res).to.equal(res); + assert.equal(_err, err); + assert.equal(_req, req); + assert.equal(_res, res); done(); } } }); @@ -189,7 +169,7 @@ describe('error-handler', () => { return Object.assign({ set () {}, status (code) { - expect(code).to.equal(errCode); + assert.equal(code, errCode); } }, props); }; @@ -202,7 +182,7 @@ describe('error-handler', () => { }); const res = makeRes(401, { json (obj) { - expect(obj).to.deep.equal(err.toJSON()); + assert.deepEqual(obj, err.toJSON()); done(); } }); @@ -215,9 +195,9 @@ describe('error-handler', () => { const middleware = handler({ logger: null, json: { 402: (_err, _req, _res) => { - expect(_err).to.equal(err); - expect(_req).to.equal(req); - expect(_res).to.equal(res); + assert.equal(_err, err); + assert.equal(_req, req); + assert.equal(_res, res); done(); } } }); @@ -230,9 +210,9 @@ describe('error-handler', () => { const middleware = handler({ logger: null, json: { default: (_err, _req, _res) => { - expect(_err).to.equal(err); - expect(_req).to.equal(req); - expect(_res).to.equal(res); + assert.equal(_err, err); + assert.equal(_req, req); + assert.equal(_res, res); done(); } } }); @@ -283,8 +263,8 @@ describe('error-handler', () => { url: 'http://localhost:5050/error', json: true }, (error, res, body) => { - expect(res.statusCode).to.equal(500); - expect(body).to.deep.equal({ + assert.equal(res.statusCode, 500); + assert.deepEqual(body, { name: 'GeneralError', message: 'Something went wrong', code: 500, @@ -295,10 +275,6 @@ describe('error-handler', () => { done(); }); }); - - it.skip('still has a stack trace', () => { - expect(handler).to.equal('function'); - }); }); describe('text/html format', () => { @@ -311,8 +287,8 @@ describe('error-handler', () => { 'Accept': 'text/html' } }, (error, res, body) => { - expect(res.statusCode).to.equal(404); - expect(html.toString()).to.equal(body); + assert.equal(res.statusCode, 404); + assert.equal(html.toString(), body); done(); }); }); @@ -327,8 +303,8 @@ describe('error-handler', () => { 'Accept': 'text/html' } }, (error, res, body) => { - expect(res.statusCode).to.equal(500); - expect(html.toString()).to.equal(body); + assert.equal(res.statusCode, 500); + assert.equal(html.toString(), body); done(); }); }); @@ -342,8 +318,8 @@ describe('error-handler', () => { 'Content-Type': 'text/html' } }, (error, res, body) => { - expect(res.statusCode).to.equal(404); - expect(html.toString()).to.equal(body); + assert.equal(res.statusCode, 404); + assert.equal(html.toString(), body); done(); }); }); @@ -357,8 +333,8 @@ describe('error-handler', () => { 'Accept': 'text/html' } }, (error, res, body) => { - expect(res.statusCode).to.equal(404); - expect(html.toString()).to.equal(body); + assert.equal(res.statusCode, 404); + assert.equal(html.toString(), body); done(); }); }); @@ -375,8 +351,8 @@ describe('error-handler', () => { }, json: true }, (error, res, body) => { - expect(res.statusCode).to.equal(500); - expect(body).to.deep.equal({ + assert.equal(res.statusCode, 500); + assert.deepEqual(body, { name: 'GeneralError', message: 'Something went wrong', code: 500, @@ -397,8 +373,8 @@ describe('error-handler', () => { }, json: true }, (error, res, body) => { - expect(res.statusCode).to.equal(404); - expect(body).to.deep.equal({ name: 'NotFound', + assert.equal(res.statusCode, 404); + assert.deepEqual(body, { name: 'NotFound', message: 'File not found', code: 404, className: 'not-found', @@ -417,8 +393,8 @@ describe('error-handler', () => { }, json: true }, (error, res, body) => { - expect(res.statusCode).to.equal(400); - expect(body).to.deep.equal({ name: 'BadRequest', + assert.equal(res.statusCode, 400); + assert.deepEqual(body, { name: 'BadRequest', message: 'Invalid Password', code: 400, className: 'bad-request', @@ -443,8 +419,8 @@ describe('error-handler', () => { }, json: true }, (error, res, body) => { - expect(res.statusCode).to.equal(400); - expect(body).to.deep.equal({ name: 'BadRequest', + assert.equal(res.statusCode, 400); + assert.deepEqual(body, { name: 'BadRequest', message: 'Invalid Password', code: 400, className: 'bad-request', @@ -469,8 +445,8 @@ describe('error-handler', () => { }, json: true }, (error, res, body) => { - expect(res.statusCode).to.equal(400); - expect(body).to.deep.equal({ name: 'BadRequest', + assert.equal(res.statusCode, 400); + assert.deepEqual(body, { name: 'BadRequest', message: 'Invalid Password', code: 400, className: 'bad-request', @@ -505,8 +481,8 @@ describe('error-handler', () => { }] }); - expect(res.statusCode).to.equal(400); - expect(body).to.deep.equal(expected); + assert.equal(res.statusCode, 400); + assert.deepEqual(body, expected); done(); }); }); diff --git a/packages/express/test/index.test.js b/packages/express/test/index.test.js index f0f1cb244e..9a32d617ed 100644 --- a/packages/express/test/index.test.js +++ b/packages/express/test/index.test.js @@ -29,6 +29,13 @@ describe('@feathersjs/express', () => { assert.strictEqual(typeof app, 'function'); }); + it('allows to use an existing Express instance', () => { + const expressApp = express(); + const app = expressify(feathers(), expressApp); + + assert.strictEqual(app, expressApp); + }); + it('exports `express.rest`', () => { assert.ok(typeof expressify.rest === 'function'); }); diff --git a/packages/express/test/not-found-handler.test.js b/packages/express/test/not-found-handler.test.js index fbfb805327..0e2524e2d3 100644 --- a/packages/express/test/not-found-handler.test.js +++ b/packages/express/test/not-found-handler.test.js @@ -1,20 +1,15 @@ -const chai = require('chai'); -const sinonChai = require('sinon-chai'); +const { strict: assert } = require('assert'); const errors = require('@feathersjs/errors'); const handler = require('../lib/not-found-handler'); -const { expect } = chai; - -chai.use(sinonChai); - describe('not-found-handler', () => { it('is CommonJS compatible', () => { - expect(typeof require('../lib/not-found-handler')).to.equal('function'); + assert.equal(typeof require('../lib/not-found-handler'), 'function'); }); it('is import compatible', () => { - expect(typeof handler).to.equal('function'); + assert.equal(typeof handler, 'function'); }); it('returns NotFound error', done => { @@ -22,9 +17,9 @@ describe('not-found-handler', () => { url: 'some/where', headers: {} }, {}, function (error) { - expect(error instanceof errors.NotFound).to.equal(true); - expect(error.message).to.equal('Page not found'); - expect(error.data).to.deep.equal({ + assert.ok(error instanceof errors.NotFound); + assert.equal(error.message, 'Page not found'); + assert.deepEqual(error.data, { url: 'some/where' }); done(); @@ -36,9 +31,9 @@ describe('not-found-handler', () => { url: 'some/where', headers: {} }, {}, function (error) { - expect(error instanceof errors.NotFound).to.equal(true); - expect(error.message).to.equal('Page not found: some/where'); - expect(error.data).to.deep.equal({ + assert.ok(error instanceof errors.NotFound); + assert.equal(error.message, 'Page not found: some/where'); + assert.deepEqual(error.data, { url: 'some/where' }); done(); diff --git a/packages/express/test/rest.test.js b/packages/express/test/rest.test.js index 702b5f37d3..5e1cd9fcb6 100644 --- a/packages/express/test/rest.test.js +++ b/packages/express/test/rest.test.js @@ -249,7 +249,8 @@ describe('@feathersjs/express/rest provider', () => { arguments: ['dishes', paramsWithHeaders ], type: 'error', method: 'get', - path: 'hook-error' + path: 'hook-error', + original: data.hook.original }, error: { message: 'I blew up' } }); @@ -367,6 +368,42 @@ describe('@feathersjs/express/rest provider', () => { .then(() => server.close()); }); + it('allows middleware arrays before and after a service', () => { + const app = expressify(feathers()); + + app.configure(rest()) + .use(expressify.json()) + .use('/todo', [function (req, res, next) { + req.body.before = ['before first']; + next(); + }, function (req, res, next) { + req.body.before.push('before second'); + next(); + }], { + create (data) { + return Promise.resolve(data); + } + }, [function (req, res, next) { + res.data.after = ['after first']; + next(); + }], function (req, res, next) { + res.data.after.push('after second'); + next(); + }); + + const server = app.listen(4776); + + return axios.post('http://localhost:4776/todo', { text: 'Do dishes' }) + .then(res => { + assert.deepStrictEqual(res.data, { + text: 'Do dishes', + before: ['before first', 'before second'], + after: ['after first', 'after second'] + }); + }) + .then(() => server.close()); + }); + it('allows an array of middleware without a service', () => { const app = expressify(feathers()); const middlewareArray = [ diff --git a/packages/feathers/.npmignore b/packages/feathers/.npmignore index b59f7e3a95..3a777790fc 100644 --- a/packages/feathers/.npmignore +++ b/packages/feathers/.npmignore @@ -1 +1 @@ -test/ \ No newline at end of file +test/coverage/ diff --git a/packages/feathers/CHANGELOG.md b/packages/feathers/CHANGELOG.md index df210b94e4..0a3c5dccf9 100644 --- a/packages/feathers/CHANGELOG.md +++ b/packages/feathers/CHANGELOG.md @@ -3,6 +3,215 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.5.3](https://github.com/feathersjs/feathers/compare/v4.5.2...v4.5.3) (2020-04-17) + + +### Bug Fixes + +* **typescript:** Use stricter type for HookContext 'method' prop ([#1896](https://github.com/feathersjs/feathers/issues/1896)) ([24a41b7](https://github.com/feathersjs/feathers/commit/24a41b74486ddadccad18f3ae63afdac5bd373c7)) + + + + + +## [4.5.2](https://github.com/feathersjs/feathers/compare/v4.5.1...v4.5.2) (2020-03-04) + + +### Bug Fixes + +* **typescript:** Make HookMap and HookObject generics. ([#1815](https://github.com/feathersjs/feathers/issues/1815)) ([d10145d](https://github.com/feathersjs/feathers/commit/d10145d91a09aef7bce5af80805a3c0fa9d94f26)) + + + + + +## [4.5.1](https://github.com/feathersjs/feathers/compare/v4.5.0...v4.5.1) (2020-01-24) + +**Note:** Version bump only for package @feathersjs/feathers + + + + + +# [4.5.0](https://github.com/feathersjs/feathers/compare/v4.4.3...v4.5.0) (2020-01-18) + + +### Bug Fixes + +* Add `params.authentication` type, remove `hook.connection` type ([#1732](https://github.com/feathersjs/feathers/issues/1732)) ([d46b7b2](https://github.com/feathersjs/feathers/commit/d46b7b2abac8862c0e4dbfce20d71b8b8a96692f)) + + + + + +## [4.4.3](https://github.com/feathersjs/feathers/compare/v4.4.1...v4.4.3) (2019-12-06) + +**Note:** Version bump only for package @feathersjs/feathers + + + + + +## [4.4.1](https://github.com/feathersjs/feathers/compare/v4.4.0...v4.4.1) (2019-11-27) + +**Note:** Version bump only for package @feathersjs/feathers + + + + + +# [4.4.0](https://github.com/feathersjs/feathers/compare/v4.3.11...v4.4.0) (2019-11-27) + + +### Bug Fixes + +* **core:** Improve hook missing parameter message by adding the service name ([#1703](https://github.com/feathersjs/feathers/issues/1703)) ([2331c2a](https://github.com/feathersjs/feathers/commit/2331c2a3dd70d432db7d62a76ed805d359cbbba5)) +* **typescript:** Allow specific service typings for `Hook` and `HookContext` ([#1688](https://github.com/feathersjs/feathers/issues/1688)) ([f5d0ddd](https://github.com/feathersjs/feathers/commit/f5d0ddd9724bf5778355535d2103d59daaad6294)) + + + + + +## [4.3.11](https://github.com/feathersjs/feathers/compare/v4.3.10...v4.3.11) (2019-11-11) + +**Note:** Version bump only for package @feathersjs/feathers + + + + + +## [4.3.10](https://github.com/feathersjs/feathers/compare/v4.3.9...v4.3.10) (2019-10-26) + +**Note:** Version bump only for package @feathersjs/feathers + + + + + +## [4.3.9](https://github.com/feathersjs/feathers/compare/v4.3.8...v4.3.9) (2019-10-26) + + +### Bug Fixes + +* Small type improvements ([#1624](https://github.com/feathersjs/feathers/issues/1624)) ([50162c6](https://github.com/feathersjs/feathers/commit/50162c6e562f0a47c6a280c4f01fff7c3afee293)) + + + + + +## [4.3.7](https://github.com/feathersjs/feathers/compare/v4.3.6...v4.3.7) (2019-10-14) + + +### Bug Fixes + +* improve Service and AdapterService types ([#1567](https://github.com/feathersjs/feathers/issues/1567)) ([baad6a2](https://github.com/feathersjs/feathers/commit/baad6a26f0f543b712ccb40359b3933ad3a21392)) + + + + + +## [4.3.4](https://github.com/feathersjs/feathers/compare/v4.3.3...v4.3.4) (2019-10-03) + + +### Bug Fixes + +* Reset version number after every publish ([#1596](https://github.com/feathersjs/feathers/issues/1596)) ([f24f82f](https://github.com/feathersjs/feathers/commit/f24f82f)) + + + + + +## [4.3.3](https://github.com/feathersjs/feathers/compare/v4.3.2...v4.3.3) (2019-09-21) + + +### Bug Fixes + +* Small improvements in dependencies and code sturcture ([#1562](https://github.com/feathersjs/feathers/issues/1562)) ([42c13e2](https://github.com/feathersjs/feathers/commit/42c13e2)) + + + + + +## [4.3.2](https://github.com/feathersjs/feathers/compare/v4.3.1...v4.3.2) (2019-09-16) + +**Note:** Version bump only for package @feathersjs/feathers + + + + + +## [4.3.1](https://github.com/feathersjs/feathers/compare/v4.3.0...v4.3.1) (2019-09-09) + +**Note:** Version bump only for package @feathersjs/feathers + + + + + +# [4.3.0](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.4...v4.3.0) (2019-08-27) + +**Note:** Version bump only for package @feathersjs/feathers + + + + + +# [4.3.0-pre.4](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.3...v4.3.0-pre.4) (2019-08-22) + +**Note:** Version bump only for package @feathersjs/feathers + + + + + +# [4.3.0-pre.3](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.2...v4.3.0-pre.3) (2019-08-19) + +**Note:** Version bump only for package @feathersjs/feathers + + + + + +# [4.3.0-pre.2](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.1...v4.3.0-pre.2) (2019-08-02) + + +### Bug Fixes + +* Improve Params typing ([#1474](https://github.com/feathersjs/feathers/issues/1474)) ([54a3aa7](https://github.com/feathersjs/feathers/commit/54a3aa7)) + + + + + +# [4.3.0-pre.1](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.5...v4.3.0-pre.1) (2019-07-11) + +**Note:** Version bump only for package @feathersjs/feathers + + + + + +# [4.0.0-pre.5](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.4...v4.0.0-pre.5) (2019-07-10) + +**Note:** Version bump only for package @feathersjs/feathers + + + + + +# [4.0.0-pre.4](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.3...v4.0.0-pre.4) (2019-07-05) + + +### Bug Fixes + +* Clean up hooks code ([#1407](https://github.com/feathersjs/feathers/issues/1407)) ([f25c88b](https://github.com/feathersjs/feathers/commit/f25c88b)) +* Fix @feathersjs/feathers typings http import ([abbc07b](https://github.com/feathersjs/feathers/commit/abbc07b)) +* Updated typings for ServiceMethods ([#1409](https://github.com/feathersjs/feathers/issues/1409)) ([b5ee7e2](https://github.com/feathersjs/feathers/commit/b5ee7e2)) + + + + + # [4.0.0-pre.3](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.2...v4.0.0-pre.3) (2019-06-01) diff --git a/packages/feathers/LICENSE b/packages/feathers/LICENSE index 6bfc0adefc..7139cac0dd 100644 --- a/packages/feathers/LICENSE +++ b/packages/feathers/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Feathers +Copyright (c) 2020 Feathers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/feathers/index.d.ts b/packages/feathers/index.d.ts index 676b94521d..4676a291a8 100644 --- a/packages/feathers/index.d.ts +++ b/packages/feathers/index.d.ts @@ -1,7 +1,7 @@ ///
-## A REST and realtime API layer for modern applications.
+## A framework for real-time applications and REST APIs with JavaScript and TypeScript
[](https://greenkeeper.io/)
-
-[](https://travis-ci.org/feathersjs/feathers)
-[](https://david-dm.org/feathersjs/feathers?path=packages/feathers)
+[](https://github.com/feathersjs/feathers/actions?query=workflow%3A%22Node.js+CI%22)
[](https://codeclimate.com/github/feathersjs/feathers/maintainability)
[](https://codeclimate.com/github/feathersjs/feathers/test_coverage)
[](https://www.npmjs.com/package/@feathersjs/feathers)
@@ -13,7 +11,23 @@
[](http://slack.feathersjs.com)
[](https://t.me/featherjs)
-Feathers is a real-time, micro-service web framework for NodeJS that gives you control over your data via RESTful resources, sockets and flexible plug-ins.
+Feathers is a lightweight web-framework for creating real-time applications and REST APIs using JavaScript or TypeScript.
+
+Feathers can interact with any backend technology, supports over a dozen databases and works with any frontend technology like React, VueJS, Angular, React Native, Android or iOS.
+
+## Getting started
+
+You can build your first real-time and REST API in just 4 commands:
+
+```bash
+$ npm install -g @feathersjs/cli
+$ mkdir my-new-app
+$ cd my-new-app/
+$ feathers generate app
+$ npm start
+```
+
+To learn more about Feathers visit the website at [feathersjs.com](http://feathersjs.com) or jump right into [the Feathers guides](http://docs.feathersjs.com/guides).
## Support
@@ -87,80 +101,10 @@ Support us with a monthly donation and help us continue our activities. [[Become
-## A REST and realtime API layer for modern applications.
+## A framework for real-time applications and REST APIs with JavaScript and TypeScript
-[](https://greenkeeper.io/)
-[](https://travis-ci.org/feathersjs/feathers)
+[](https://github.com/feathersjs/feathers/actions?query=workflow%3A%22Node.js+CI%22)
[](https://codeclimate.com/github/feathersjs/feathers/maintainability)
[](https://codeclimate.com/github/feathersjs/feathers/test_coverage)
[](https://www.npmjs.com/package/@feathersjs/feathers)
@@ -11,9 +10,23 @@
[](http://slack.feathersjs.com)
[](https://t.me/featherjs)
-[](https://saucelabs.com/u/feathersjs)
+Feathers is a lightweight web-framework for creating real-time applications and REST APIs using JavaScript or TypeScript.
-Feathers is a real-time, micro-service web framework for NodeJS that gives you control over your data via RESTful resources, sockets and flexible plug-ins.
+Feathers can interact with any backend technology, supports over a dozen databases and works with any frontend technology like React, VueJS, Angular, React Native, Android or iOS.
+
+## Getting started
+
+You can build your first real-time and REST API in just 4 commands:
+
+```bash
+$ npm install -g @feathersjs/cli
+$ mkdir my-new-app
+$ cd my-new-app/
+$ feathers generate app
+$ npm start
+```
+
+To learn more about Feathers visit the website at [feathersjs.com](http://feathersjs.com) or jump right into [the Feathers guides](http://docs.feathersjs.com/guides).
## Support
@@ -87,82 +100,12 @@ Support us with a monthly donation and help us continue our activities. [[Become