Skip to content

Commit

Permalink
Merge pull request #21 from holidayextras/hapiV17
Browse files Browse the repository at this point in the history
Hapi v17
  • Loading branch information
t1gr0u authored Jan 17, 2018
2 parents bf7fa3a + 14583a7 commit 6ff6149
Show file tree
Hide file tree
Showing 6 changed files with 767 additions and 383 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.9.1
8
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
machine:
node:
version: 8.9.1
version: 8.9.4
dependencies:
pre:
- npm install git+ssh://[email protected]:holidayextras/deployment-helpers.git
Expand Down
15 changes: 10 additions & 5 deletions lib/pluginTransformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ function buildReject (error, context) {
}
}

exports.register = function (server, pluginOptions, next) {
const register = async(server) => {
var transformer = new Transformer()

transformer.startReplication()
await transformer.startReplication()
.then(function () {
// Replication always on, once it's finished successfully allow access to our get() function
server.expose('getConfiguration', getConfiguration)
next()
})

function getConfiguration (options) {
Expand All @@ -53,6 +52,12 @@ exports.register = function (server, pluginOptions, next) {
}
}

exports.register.attributes = {
pkg: require('../package.json')
const pkg = require('../package.json')
const {version, name} = pkg

exports.plugin = {
register,
name,
version,
pkg
}
Loading

0 comments on commit 6ff6149

Please sign in to comment.