-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
442 additions
and
378 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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/client/ | ||
/coverage/ | ||
/node_modules/ | ||
server/dropdb.js | ||
/lib/expression-language/expression-syntax-parser.js | ||
/test/ | ||
build/ | ||
client/ | ||
coverage/ | ||
node_modules/ | ||
test/ | ||
drop.js | ||
Gruntfile.js |
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 |
---|---|---|
|
@@ -41,3 +41,4 @@ out/ | |
*.zip | ||
/common/models/test | ||
package-lock.json | ||
oracle-user.sh |
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
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,20 +1,20 @@ | ||
{ | ||
"name": "oe-component-passport", | ||
"version": "2.1.0", | ||
"description": "oe-cloud modularization project", | ||
"version": "2.2.0", | ||
"description": "oe-cloud module to initialize passport component supporting regular strategies and JWT as access token", | ||
"engines": { | ||
"node": ">=6" | ||
}, | ||
"main": "index.js", | ||
"scripts": { | ||
"pretest": "npm install --no-optional", | ||
"test": "mocha --no-timeouts test/test.js", | ||
"test": "mocha --no-timeouts test/*.spec.js", | ||
"lint": "eslint .", | ||
"fix-lint": "eslint --fix .", | ||
"grunt-cover": "grunt test-with-coverage" | ||
}, | ||
"dependencies": { | ||
"body-parser": "1.9.0", | ||
"body-parser": "1.19.0", | ||
"cookie-parser": "1.4.3", | ||
"jsonwebtoken": "8.4.0", | ||
"loopback-component-passport": "3.10.0", | ||
|
@@ -31,25 +31,21 @@ | |
"async": "2.6.1", | ||
"babel-eslint": "7.2.3", | ||
"chai": "3.4.1", | ||
"chai-datetime": "1.4.0", | ||
"chai-things": "0.2.0", | ||
"chalk": "1.1.1", | ||
"eslint": "4.10.0", | ||
"grunt": "1.0.4", | ||
"grunt-banner": "0.6.0", | ||
"grunt-cli": "1.3.2", | ||
"grunt-contrib-clean": "2.0.0", | ||
"grunt-contrib-copy": "1.0.0", | ||
"grunt-jsbeautifier": "0.2.13", | ||
"grunt-mkdir": "1.0.0", | ||
"grunt-mocha-istanbul": "5.0.2", | ||
"grunt-mocha-test": "0.13.3", | ||
"istanbul": "0.4.5", | ||
"mocha": "5.2.0", | ||
"oe-cloud": "^2.0.0", | ||
"oe-connector-mongodb": "^2.0.0", | ||
"oe-connector-oracle": "^2.0.0", | ||
"oe-connector-postgresql": "^2.0.0", | ||
"superagent-defaults": "0.1.14", | ||
"supertest": "3.4.2", | ||
"loopback-connector-mongodb": "3.9.2", | ||
"oe-cloud": "^2.0.0" | ||
"supertest": "3.4.2" | ||
}, | ||
"author": "Dipayan Aich <[email protected]>", | ||
"repository": { | ||
|
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,46 @@ | ||
var oecloud = require('oe-cloud'); | ||
var logger = require('oe-logger'); | ||
var log = logger('test-bootstrapper'); | ||
|
||
// var loopback = require('loopback'); | ||
// oecloud.attachMixinsToBaseEntity("SkeletonMixin"); | ||
process.env.userfieldname = 'username'; | ||
process.env.PASSWORD_FIELD_NAME = 'password'; | ||
process.env.JWT_SECRET_KEY = 'secret'; | ||
process.env.JWT_FOR_ACCESS_TOKEN = true; | ||
|
||
oecloud.observe('loaded', function (ctx, next) { | ||
console.log('oe-cloud modules loaded'); | ||
return next(); | ||
}); | ||
|
||
var testContext = { | ||
ctx: { | ||
tenantId: 'test-tenant' | ||
} | ||
}; | ||
|
||
oecloud.get('/info', function (req, res) { | ||
return res.end(JSON.stringify({'status': 'logged in', 'access-token': res.accessToken})); | ||
}); | ||
|
||
oecloud.get('/failed', function (req, res) { | ||
return res.end(JSON.stringify({'status': 'failed'})); | ||
}); | ||
|
||
oecloud.boot(__dirname, function (err) { | ||
if (err) { | ||
log.error(testContext, err); | ||
// console.log('Error:', err) | ||
process.exit(1); | ||
} | ||
oecloud.start(); | ||
oecloud.emit('test-start'); | ||
}); | ||
|
||
module.exports = new Promise(booted => | ||
oecloud.on('test-start', () => { | ||
// debugger; | ||
// console.log('booted'); | ||
booted(); | ||
} ) ); |
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
Oops, something went wrong.