@kravc/dos 1.8.5 → 1.8.7
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.
|
@@ -7,6 +7,14 @@ const { publicKey } = require('../src/test/keys')
|
|
|
7
7
|
const JwtAuthorization = require('../src/security/JwtAuthorization')
|
|
8
8
|
|
|
9
9
|
class CreateProfile extends Create(Profile) {
|
|
10
|
+
static get tags() {
|
|
11
|
+
return [
|
|
12
|
+
'Profiles',
|
|
13
|
+
'profiles-write',
|
|
14
|
+
'System'
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
|
|
10
18
|
static get security() {
|
|
11
19
|
const algorithm = 'RS256'
|
|
12
20
|
|
|
@@ -7,6 +7,13 @@ const JwtAuthorization = require('../src/security/JwtAuthorization')
|
|
|
7
7
|
const SystemAuthorization = require('../src/security/SystemAuthorization')
|
|
8
8
|
|
|
9
9
|
class UpdateProfile extends Update(Profile) {
|
|
10
|
+
static get tags() {
|
|
11
|
+
return [
|
|
12
|
+
'profiles-write',
|
|
13
|
+
'Profiles',
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
|
|
10
17
|
static get security() {
|
|
11
18
|
return [
|
|
12
19
|
SystemAuthorization.createRequirement(),
|
package/package.json
CHANGED
|
@@ -158,7 +158,16 @@ const createSpec = (operations, schemasMap, url) => {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
serviceTags = uniq(serviceTags)
|
|
161
|
-
serviceTags.sort((a, b) =>
|
|
161
|
+
serviceTags.sort((a, b) => {
|
|
162
|
+
const aStartsWithUpper = /^[A-Z]/.test(a)
|
|
163
|
+
const bStartsWithUpper = /^[A-Z]/.test(b)
|
|
164
|
+
|
|
165
|
+
if (aStartsWithUpper && !bStartsWithUpper) { return -1 }
|
|
166
|
+
|
|
167
|
+
if (!aStartsWithUpper && bStartsWithUpper) { return 1 }
|
|
168
|
+
|
|
169
|
+
return a.localeCompare(b)
|
|
170
|
+
})
|
|
162
171
|
spec.tags = serviceTags.map(name => ({ name }))
|
|
163
172
|
|
|
164
173
|
const json = JSON
|