@live-change/security-service 0.3.41 → 0.4.1
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/ban.js +6 -5
- package/definition.js +3 -2
- package/event.js +8 -7
- package/index.js +7 -6
- package/package.json +4 -3
- package/secured.js +5 -3
- package/utils.js +4 -3
package/ban.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import App from '@live-change/framework'
|
|
2
|
+
const app = App.app()
|
|
3
|
+
import definition from './definition.js'
|
|
4
|
+
import { getClientKeysStrings, multiKeyIndexQuery, fastMultiKeyIndexQuery } from './utils.js'
|
|
5
|
+
import lcp from '@live-change/pattern'
|
|
5
6
|
|
|
6
7
|
const banProperties = {
|
|
7
8
|
actions: {
|
|
@@ -317,4 +318,4 @@ definition.trigger({
|
|
|
317
318
|
}
|
|
318
319
|
})
|
|
319
320
|
|
|
320
|
-
|
|
321
|
+
export { Ban }
|
package/definition.js
CHANGED
package/event.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
1
|
+
import crypto from 'crypto'
|
|
2
|
+
import App from '@live-change/framework'
|
|
3
|
+
const app = App.app()
|
|
4
|
+
import definition from './definition.js'
|
|
5
|
+
import { getClientKeysObject, getClientKeysStrings} from './utils.js'
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import lcp from '@live-change/pattern'
|
|
8
|
+
import lcpDb from '@live-change/pattern-db'
|
|
9
|
+
import { request } from 'http'
|
|
9
10
|
|
|
10
11
|
const securityPatterns = definition.config?.patterns ?? []
|
|
11
12
|
const relationsStore = lcpDb.relationsStore(app.dao, app.databaseName, 'security_relations')
|
package/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import App from '@live-change/framework'
|
|
2
|
+
const app = App.app()
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
import definition from './definition.js'
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import './ban.js'
|
|
7
|
+
import './event.js'
|
|
8
|
+
import './secured.js'
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
export default definition
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/security-service",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,11 +20,12 @@
|
|
|
20
20
|
"name": "Michał Łaszczewski",
|
|
21
21
|
"url": "https://www.viamage.com/"
|
|
22
22
|
},
|
|
23
|
+
"type": "module",
|
|
23
24
|
"dependencies": {
|
|
24
|
-
"@live-change/framework": "0.
|
|
25
|
+
"@live-change/framework": "0.8.0",
|
|
25
26
|
"@live-change/pattern": "0.2.1",
|
|
26
27
|
"@live-change/pattern-db": "0.2.2",
|
|
27
28
|
"nodemailer": "^6.7.2"
|
|
28
29
|
},
|
|
29
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "74215655da2a4bc3ef73c62e5d79d988276165e8"
|
|
30
31
|
}
|
package/secured.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import definition from './definition.js'
|
|
2
|
+
import {
|
|
3
|
+
getClientKeysObject, getClientKeysStrings, multiKeyIndexQuery, fastMultiKeyIndexQuery
|
|
4
|
+
} from './utils.js'
|
|
5
|
+
import { Ban } from './ban.js'
|
|
4
6
|
|
|
5
7
|
async function getBans(client, actions) {
|
|
6
8
|
const keys = []
|
package/utils.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
1
|
+
import App from '@live-change/framework'
|
|
2
|
+
const app = App.app()
|
|
3
|
+
import definition from './definition.js'
|
|
3
4
|
|
|
4
5
|
const clientKeys = definition.config?.clientKeys ?? []
|
|
5
6
|
|
|
@@ -105,4 +106,4 @@ function getClientKeysObject(client, prefix = '') {
|
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
|
|
109
|
+
export { multiKeyIndexQuery, fastMultiKeyIndexQuery, getClientKeysStrings, getClientKeysObject }
|