@live-change/peer-connection-service 0.3.40 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/definition.js CHANGED
@@ -1,11 +1,11 @@
1
- const App = require("@live-change/framework")
1
+ import App from '@live-change/framework'
2
2
  const app = App.app()
3
3
 
4
- const relationsPlugin = require('@live-change/relations-plugin')
4
+ import relationsPlugin from '@live-change/relations-plugin'
5
5
 
6
6
  const definition = app.createServiceDefinition({
7
7
  name: "peerConnection",
8
8
  use: [ relationsPlugin ]
9
9
  })
10
10
 
11
- module.exports = definition
11
+ export default definition
package/index.js CHANGED
@@ -1,9 +1,9 @@
1
- const App = require("@live-change/framework")
1
+ import App from '@live-change/framework'
2
2
  const app = App.app()
3
3
 
4
- const definition = require('./definition.js')
4
+ import definition from './definition.js'
5
5
 
6
6
  require('./turn.js')
7
7
  require('./peer.js')
8
8
 
9
- module.exports = definition
9
+ export default definition
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@live-change/peer-connection-service",
3
- "version": "0.3.40",
3
+ "version": "0.4.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
+ "type": "module",
6
7
  "scripts": {
7
8
  "start": "node index.js",
8
9
  "setup": "INSTALL=true node index.js",
@@ -10,5 +11,5 @@
10
11
  },
11
12
  "author": "Michał Łaszczewski <michal@emikse.com>",
12
13
  "license": "BSD-3-Clause",
13
- "gitHead": "d72cc68ee4c46242e5f6a51c303be4177a1c33cf"
14
+ "gitHead": "87010b19907140a326943f22cd538eafdc9c28f1"
14
15
  }
package/peer.js CHANGED
@@ -1,4 +1,4 @@
1
- const definition = require('./definition.js')
1
+ import definition from './definition.js'
2
2
 
3
3
  const { clientHasAccessRole } = require("../access-control-service/access.js")(definition)
4
4
 
package/peerState.js CHANGED
@@ -1,4 +1,4 @@
1
- const definition = require('./definition.js')
1
+ import definition from './definition.js'
2
2
 
3
3
  const { Peer } = require('./peer.js')
4
4
 
package/turn.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const crypto = require('crypto')
2
2
  const ReactiveDao = require('@live-change/dao')
3
- const definition = require('./definition.js')
3
+ import definition from './definition.js'
4
4
  const config = definition.config
5
5
 
6
6
  const urls = config?.turn?.urls || process.env.TURN_URLS?.split(';')
@@ -86,4 +86,4 @@ definition.view({
86
86
  }
87
87
  })
88
88
 
89
- module.exports = { createTurnConfiguration, releaseTurnConfiguration, turnExpireTime }
89
+ export { createTurnConfiguration, releaseTurnConfiguration, turnExpireTime }