@live-change/session-service 0.1.12 → 0.2.3
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/authenticator.js +1 -1
- package/index.js +1 -1
- package/model.js +1 -1
- package/package.json +6 -5
- package/sessionItem.js +1 -1
- package/sessionProperty.js +1 -10
package/authenticator.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const App = require('@live-change/framework')
|
|
2
2
|
const app = App.app()
|
|
3
3
|
const definition = require('./definition.js')
|
|
4
|
-
const Session = require('./model.js')
|
|
4
|
+
const { Session } = require('./model.js')
|
|
5
5
|
const { createHmac } = require('crypto')
|
|
6
6
|
const config = definition.config
|
|
7
7
|
|
package/index.js
CHANGED
package/model.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/session-service",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/live-change/
|
|
11
|
+
"url": "git+https://github.com/live-change/live-change-services.git"
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"bugs": {
|
|
15
|
-
"url": "https://github.com/live-change/
|
|
15
|
+
"url": "https://github.com/live-change/live-change-services/issues"
|
|
16
16
|
},
|
|
17
|
-
"homepage": "https://github.com/live-change/
|
|
17
|
+
"homepage": "https://github.com/live-change/live-change-services",
|
|
18
18
|
"author": {
|
|
19
19
|
"email": "michal@laszczewski.pl",
|
|
20
20
|
"name": "Michał Łaszczewski",
|
|
@@ -23,5 +23,6 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@live-change/framework": "^0.5.7",
|
|
25
25
|
"@live-change/relations-plugin": "^0.1.10"
|
|
26
|
-
}
|
|
26
|
+
},
|
|
27
|
+
"gitHead": "8a862142bf20ec41e48e1f6e7c8cc4312d22c04e"
|
|
27
28
|
}
|
package/sessionItem.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const definition = require("./definition.js")
|
|
2
2
|
const App = require("@live-change/framework")
|
|
3
3
|
const { PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition } = App
|
|
4
|
-
const Session = require("./model.js")
|
|
4
|
+
const { Session } = require("./model.js")
|
|
5
5
|
|
|
6
6
|
definition.processor(function(service, app) {
|
|
7
7
|
|
package/sessionProperty.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
const definition = require("./definition.js")
|
|
2
2
|
const App = require("@live-change/framework")
|
|
3
3
|
const { PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition } = App
|
|
4
|
-
const Session = require("./model.js")
|
|
4
|
+
const { Session } = require("./model.js")
|
|
5
5
|
|
|
6
6
|
definition.processor(function(service, app) {
|
|
7
7
|
|
|
8
8
|
for(let modelName in service.models) {
|
|
9
9
|
const model = service.models[modelName]
|
|
10
|
-
console.log("SP", modelName)
|
|
11
10
|
|
|
12
11
|
if(model.sessionProperty) {
|
|
13
12
|
console.log("MODEL " + modelName + " IS SESSION PROPERTY, CONFIG:", model.sessionProperty)
|
|
@@ -29,14 +28,6 @@ definition.processor(function(service, app) {
|
|
|
29
28
|
...config
|
|
30
29
|
}
|
|
31
30
|
|
|
32
|
-
model.properties.session = new PropertyDefinition({
|
|
33
|
-
type: Session,
|
|
34
|
-
validation: ['nonEmpty']
|
|
35
|
-
})
|
|
36
|
-
if(!model.indexes) model.indexes = {}
|
|
37
|
-
model.indexes.bySession = new IndexDefinition({
|
|
38
|
-
property: 'session'
|
|
39
|
-
})
|
|
40
31
|
if(config.sessionReadAccess) {
|
|
41
32
|
const viewName = 'mySession' + modelName
|
|
42
33
|
service.views[viewName] = new ViewDefinition({
|