@toa.io/extensions.exposition 1.0.0-alpha.190 → 1.0.0-alpha.191

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.
@@ -71,11 +71,27 @@ operations:
71
71
  output: null
72
72
 
73
73
  configuration:
74
- rounds: 10
75
- pepper: ""
76
- principal: string
77
- username+: ^.{1,128}$
78
- password+: ^.{8,32}$
74
+ schema:
75
+ type: object
76
+ properties:
77
+ rounds:
78
+ type: integer
79
+ default: 10
80
+ pepper:
81
+ type: string
82
+ default: ""
83
+ principal:
84
+ type: string
85
+ username:
86
+ type: array
87
+ items:
88
+ type: string
89
+ default: ["^.{1,128}$"]
90
+ password:
91
+ type: array
92
+ items:
93
+ type: string
94
+ default: ["^.{8,32}$"]
79
95
 
80
96
  exposition:
81
97
  isolated: true
@@ -56,9 +56,7 @@ export class Transition implements Operation {
56
56
  }
57
57
  }
58
58
 
59
- function toRx (input: string | string[]): RegExp[] {
60
- const expressions = typeof input === 'string' ? [input] : input
61
-
59
+ function toRx (expressions: string[]): RegExp[] {
62
60
  return expressions.map((expression) => new RegExp(expression))
63
61
  }
64
62
 
@@ -17,8 +17,8 @@ export interface Context {
17
17
  readonly rounds: number
18
18
  readonly pepper: string
19
19
  readonly principal?: string
20
- readonly username: string | string[]
21
- readonly password: string | string[]
20
+ readonly username: string[]
21
+ readonly password: string[]
22
22
  }
23
23
  }
24
24
 
@@ -96,29 +96,32 @@ receivers:
96
96
  identity.bans.updated: revoke
97
97
 
98
98
  configuration:
99
- keys:
99
+ schema:
100
100
  type: object
101
- minProperties: 1
102
- additionalProperties:
103
- type: string
104
- lifetime:
105
- description: Token expiration time in seconds (default 30 days)
106
- type: number
107
- default: 2592000
108
- refresh:
109
- description: Token refresh time in seconds (default 10 minutes)
110
- type: number
111
- default: 600
112
- cache:
113
- description: Custom token keys LRU cache configuration
114
101
  properties:
115
- max:
116
- type: number
117
- default: 1024
118
- ttl:
119
- type: number
120
- default: 600_000
121
- default: {}
102
+ keys:
103
+ type: object
104
+ minProperties: 1
105
+ additionalProperties:
106
+ type: string
107
+ lifetime:
108
+ description: Token expiration time in seconds (default 30 days)
109
+ type: integer
110
+ default: 2592000
111
+ refresh:
112
+ description: Token refresh time in seconds (default 10 minutes)
113
+ type: integer
114
+ default: 600
115
+ cache:
116
+ description: Custom token keys LRU cache configuration
117
+ properties:
118
+ max:
119
+ type: integer
120
+ default: 1024
121
+ ttl:
122
+ type: integer
123
+ default: 600_000
124
+ default: {}
122
125
 
123
126
  exposition:
124
127
  /:identity:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/extensions.exposition",
3
- "version": "1.0.0-alpha.190",
3
+ "version": "1.0.0-alpha.191",
4
4
  "description": "Toa Exposition",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@toa.io/agent": "1.0.0-alpha.175",
54
- "@toa.io/extensions.storages": "1.0.0-alpha.185",
54
+ "@toa.io/extensions.storages": "1.0.0-alpha.191",
55
55
  "@types/bcryptjs": "2.4.3",
56
56
  "@types/cors": "2.8.13",
57
57
  "@types/negotiator": "0.6.1",
@@ -63,5 +63,5 @@
63
63
  },
64
64
  "testEnvironment": "node"
65
65
  },
66
- "gitHead": "494b1c8f05c21f377f1152a9d89df5cbbd1001de"
66
+ "gitHead": "d8d8baf662c1c9b181478cad451f6b8eed9d3cde"
67
67
  }