Skip to content

Commit

Permalink
chore(phase): update package name refs
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondfeng committed Dec 8, 2018
1 parent 5f8f552 commit 4c91a4e
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 28 deletions.
2 changes: 1 addition & 1 deletion packages/phase/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

export * from './dist8';
export * from './dist';
2 changes: 1 addition & 1 deletion packages/phase/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

module.exports = require('@loopback/dist-util').loadDist(__dirname);
module.exports = require('./dist');
20 changes: 8 additions & 12 deletions packages/phase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,25 @@
"node": ">=8.9"
},
"scripts": {
"build:all-dist": "npm run build:dist8 && npm run build:dist10",
"build:apidocs": "lb-apidocs",
"build": "lb-tsc",
"build:dist8": "lb-tsc es2017",
"build:dist10": "lb-tsc es2018",
"build": "lb-tsc es2017 --outDir dist",
"clean": "lb-clean loopback-phase*.tgz dist* package api-docs",
"pretest": "npm run build",
"integration": "lb-mocha \"DIST/test/integration/**/*.js\"",
"test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/integration/**/*.js\"",
"unit": "lb-mocha \"DIST/test/unit/**/*.js\"",
"integration": "lb-mocha \"dist/test/integration/**/*.js\"",
"test": "lb-mocha \"dist/test/unit/**/*.js\" \"dist/test/integration/**/*.js\"",
"unit": "lb-mocha \"dist/test/unit/**/*.js\"",
"verify": "npm pack && tar xf loopback-phase*.tgz && tree package && npm run clean"
},
"author": "IBM",
"copyright.owner": "IBM Corp.",
"license": "MIT",
"dependencies": {
"debug": "^3.1.0"
"debug": "^4.1.0"
},
"devDependencies": {
"@loopback/build": "^0.7.1",
"@loopback/dist-util": "^0.3.6",
"@loopback/testlab": "^0.11.5",
"@types/debug": "0.0.30",
"@loopback/build": "^1.0.0",
"@loopback/testlab": "^1.0.0",
"@types/debug": "0.0.31",
"@types/node": "^10.9.4"
},
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions packages/phase/src/handler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2014. All Rights Reserved.
// Node module: loopback-phase
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/phase
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
2 changes: 1 addition & 1 deletion packages/phase/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: loopback-phase
// Node module: @loopback/phase
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
2 changes: 1 addition & 1 deletion packages/phase/src/merge-name-lists.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: loopback-phase
// Node module: @loopback/phase
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
2 changes: 1 addition & 1 deletion packages/phase/src/phase-list.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: loopback-phase
// Node module: @loopback/phase
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
2 changes: 1 addition & 1 deletion packages/phase/src/phase.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: loopback-phase
// Node module: @loopback/phase
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
2 changes: 1 addition & 1 deletion packages/phase/test/unit/handler.unit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: loopback-phase
// Node module: @loopback/phase
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
2 changes: 1 addition & 1 deletion packages/phase/test/unit/merge-name-lists.unit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2014. All Rights Reserved.
// Node module: loopback-phase
// Node module: @loopback/phase
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
2 changes: 1 addition & 1 deletion packages/phase/test/unit/phase-list.unit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2014,2016. All Rights Reserved.
// Node module: loopback-phase
// Node module: @loopback/phase
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
2 changes: 1 addition & 1 deletion packages/phase/test/unit/phase.unit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2014. All Rights Reserved.
// Node module: loopback-phase
// Node module: @loopback/phase
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
27 changes: 23 additions & 4 deletions packages/rest/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
// License text available at https://opensource.org/licenses/MIT

import {Binding, BoundValue} from '@loopback/context';
import {ResolvedRoute, RouteEntry} from './router';
import {Request, Response} from 'express';
import {
Options,
OptionsJson,
OptionsUrlencoded,
OptionsText,
Options,
OptionsUrlencoded,
} from 'body-parser';
import {Request, RequestHandler, Response} from 'express';
import {PathParams} from 'express-serve-static-core';
import {ResolvedRoute, RouteEntry} from './router';

export {Request, Response};

Expand Down Expand Up @@ -109,3 +110,21 @@ export type OperationRetval = any;

export type GetFromContext = (key: string) => Promise<BoundValue>;
export type BindElement = (key: string) => Binding;

/**
* Middleware registration entry
*/
export interface Middleware {
method?:
| 'all'
| 'get'
| 'post'
| 'put'
| 'delete'
| 'patch'
| 'options'
| 'head';
path?: PathParams;
phase?: string;
handler: RequestHandler;
}

0 comments on commit 4c91a4e

Please sign in to comment.