Skip to content

Commit

Permalink
Feature/Subscribe API (#872)
Browse files Browse the repository at this point in the history
Rework subscribe adapters to contain only client part and move socket.io/mqtt server implementations to appropriate local/cloud entry points
  • Loading branch information
IhostVlad authored Nov 20, 2018
1 parent d3f49f4 commit aaa52ea
Show file tree
Hide file tree
Showing 40 changed files with 356 additions and 413 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ module.exports = {
'arg',
'args',
'argv',
'arn',
'askstories',
'async',
'auth',
Expand Down Expand Up @@ -171,6 +172,7 @@ module.exports = {
'invoker',
'indexreadpolicy',
'indexwritepolicy',
'iotdevicegateway',
'iterable',
'jpg',
'jsons',
Expand Down Expand Up @@ -229,6 +231,7 @@ module.exports = {
'preloader',
'prefetch',
'prev',
'Presigned',
'println',
'proc',
'proto',
Expand Down Expand Up @@ -262,6 +265,7 @@ module.exports = {
'Roboto',
'sanitizer',
'sdk',
'sts',
'svg',
'serializable',
'sinon',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"engines": {
"node": ">=8.10"
},
"main": "./lib/server/index.js",
"browser": "./lib/client/index.js",
"main": "./lib/index.js",
"module": "./es/index.js",
"bugs": {
"url": "https://github.com/reimagined/resolve/issues"
},
Expand All @@ -25,27 +25,24 @@
],
"dependencies": {
"@babel/runtime": "^7.0.0",
"mqtt": "^2.18.8",
"ws": "^5.2.1",
"websocket-stream": "^5.1.2",
"mqtt-connection": "^4.0.0"
"mqtt": "^2.18.8"
},
"devDependencies": {
"jest": "23.6.0"
},
"homepage": "https://github.com/reimagined/resolve/tree/master/packages/adapters/subscribe-adapters/resolve-subscribe-mqtt#readme",
"babelCompile": [
{
"moduleType": "cjs",
"moduleType": "es",
"moduleTarget": "client",
"inputDir": "./src/client",
"outDir": "./lib/client"
"inputDir": "./src",
"outDir": "./es"
},
{
"moduleType": "cjs",
"moduleTarget": "server",
"inputDir": "./src/server",
"outDir": "./lib/server"
"moduleTarget": "client",
"inputDir": "./src",
"outDir": "./lib"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,6 @@ const createClientAdapter = ({ origin, rootPath, url, appId, onEvent }) => {
}
}

createClientAdapter.adapterName = 'mqtt'

export default createClientAdapter

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import createSubscribeAdapter from '../src/client/index'
import createSubscribeAdapter from '../src/index'
import mqtt from 'mqtt'

const delay = timeout =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"engines": {
"node": ">=8.10"
},
"main": "./lib/server/index.js",
"browser": "./lib/client/index.js",
"main": "./lib/index.js",
"module": "./es/index.js",
"bugs": {
"url": "https://github.com/reimagined/resolve/issues"
},
Expand All @@ -25,7 +25,6 @@
],
"dependencies": {
"@babel/runtime": "^7.0.0",
"socket.io": "^2.1.1",
"socket.io-client": "^2.1.1"
},
"devDependencies": {
Expand All @@ -34,16 +33,16 @@
"homepage": "https://github.com/reimagined/resolve/tree/master/packages/adapters/subscribe-adapters/resolve-subscribe-socket.io#readme",
"babelCompile": [
{
"moduleType": "cjs",
"moduleType": "es",
"moduleTarget": "client",
"inputDir": "./src/client",
"outDir": "./lib/client"
"inputDir": "./src",
"outDir": "./es"
},
{
"moduleType": "cjs",
"moduleTarget": "server",
"inputDir": "./src/server",
"outDir": "./lib/server"
"moduleTarget": "client",
"inputDir": "./src",
"outDir": "./lib"
}
]
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,6 @@ const createClientAdapter = ({ origin, rootPath, url, onEvent }) => {
}
}

createClientAdapter.adapterName = 'socket.io'

export default createClientAdapter

This file was deleted.

This file was deleted.

Loading

0 comments on commit aaa52ea

Please sign in to comment.