-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EXPTEA-7: Fixes issue of multiple middlewares into boot stages. EXPTEA-5: Adding Pour decorator to get all the plugins. EXPTEA-10: Publish changed to only use js and eliminate the include part from typescript projects. EXPTEA-9: Adding Tooling for publishing project.
- Loading branch information
Showing
19 changed files
with
174 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,3 +74,6 @@ build/* | |
examples/ | ||
|
||
.data | ||
|
||
*.d.ts | ||
*.js.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# source | ||
**/*.ts | ||
*.ts | ||
|
||
# definitions | ||
!**/*.d.ts | ||
!*.d.ts | ||
|
||
# configuration | ||
package-lock.json | ||
tslint.json | ||
tsconfig.json | ||
.prettierrc | ||
.nycrc | ||
__test__ | ||
benchmark | ||
docs | ||
jest.config.js | ||
node_modules | ||
.github | ||
coverage | ||
.nyc_output | ||
.idea | ||
tasks | ||
gulpfile.js | ||
jest.config.js | ||
jsdocs.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export const mockRegister = jest.fn((appSettings, registeredPlugins) => { | ||
registeredPlugins.push({ | ||
name: 'Mocked', | ||
priority: this.priority || 999 | ||
}); | ||
return registeredPlugins; | ||
}); | ||
export const mockGetRegisteredStage = jest.fn(() => []); | ||
|
||
const Plugin = jest.fn().mockImplementation(() => { | ||
return { | ||
getRegisteredStage: mockGetRegisteredStage, | ||
register: mockRegister | ||
}; | ||
}); | ||
|
||
export default Plugin as any; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require('./tasks/clean'); | ||
require('./tasks/pre-publish'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
import ExpressiveTeaPlugin from '../classes/Plugin'; | ||
|
||
export type Resolvable<R> = R | PromiseLike<R>; | ||
export type Resolver<R> = (thenableOrResult?: Resolvable<R>) => void; | ||
export type Rejector= (error?: any) => void; | ||
export type Constructor<T> = new(...args: any[]) => T; | ||
export type PluginConstructor<T extends ExpressiveTeaPlugin> = new (...args: any[]) => T; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
{ | ||
"name": "@zerooneit/expressive-tea", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "A REST API over Express and Typescript", | ||
"main": "classes/Boot.ts", | ||
"main": "classes/Boot.js", | ||
"scripts": { | ||
"doc": "rimraf build && rimraf docs && tsc -p tsconfig.json && jsdoc -c jsdocs.json", | ||
"test": "npm run linter && jest --coverage", | ||
"linter": "tslint -c tslint.json -p tsconfig.json" | ||
"linter": "tslint -c tslint.json -p tsconfig.json", | ||
"clean:build": "gulp clean", | ||
"publish:prepare": "gulp clean build", | ||
"postpublish": "gulp clean", | ||
"prepublishOnly": "npm test && npm run publish:prepare" | ||
}, | ||
"author": "Diego Resendez <[email protected]>", | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
"@types/bluebird": "^3.5.27", | ||
"@types/express": "^4.17.0", | ||
"@types/jest": "^24.0.16", | ||
"@types/lodash": "^4.14.144", | ||
"gulp": "^4.0.2", | ||
"gulp-clean": "^0.4.0", | ||
"gulp-typescript": "^5.0.1", | ||
"jest": "^24.8.0", | ||
"minami": "^1.2.3", | ||
"reflect-metadata": "^0.1.12", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const { task, src } = require('gulp'); | ||
const clean = require('gulp-clean'); | ||
|
||
function cleanOutput() { | ||
return src( | ||
[ | ||
'**/*.js', | ||
'**/*.d.ts', | ||
'**/*.js.map', | ||
'**/*.d.ts.map', | ||
'!node_modules/**/*', | ||
'!docs/**/*', | ||
'!coverage/**/*', | ||
'!gulpfile.js', | ||
'!tasks/*.js', | ||
'!jest.config.js' | ||
], | ||
{ | ||
read: false | ||
} | ||
).pipe(clean()); | ||
} | ||
|
||
task('clean', cleanOutput); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const {task, dest} = require('gulp'); | ||
const {createProject} = require('gulp-typescript'); | ||
|
||
const project = createProject('tsconfig.json'); | ||
|
||
function buildPackage() { | ||
return project | ||
.src() | ||
.pipe(project()) | ||
.pipe(dest('./')); | ||
} | ||
|
||
task('build', () => buildPackage()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters