@quenty/secrets 7.24.0-canary.559.b31717d.0 → 7.24.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/CHANGELOG.md +1 -1
- package/package.json +14 -14
- package/src/Client/SecretsServiceClient.lua +2 -2
- package/src/Server/Cmdr/SecretsCommandService.lua +47 -47
- package/src/Shared/Cmdr/SecretsCmdrTypeUtils.lua +4 -4
- package/src/Shared/SecretsServiceConstants.lua +3 -3
- package/test/scripts/Client/ClientMain.client.lua +0 -1
- package/test/scripts/Server/ServerMain.server.lua +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
# [7.24.0
|
|
6
|
+
# [7.24.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/secrets@7.23.3...@quenty/secrets@7.24.0) (2025-05-10)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/secrets",
|
|
3
|
-
"version": "7.24.0
|
|
3
|
+
"version": "7.24.0",
|
|
4
4
|
"description": "Secrets storage system and API surface",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/cmdrservice": "13.23.0
|
|
29
|
-
"@quenty/datastore": "13.21.0
|
|
30
|
-
"@quenty/ellipticcurvecryptography": "1.
|
|
31
|
-
"@quenty/loader": "10.
|
|
32
|
-
"@quenty/maid": "3.
|
|
33
|
-
"@quenty/permissionprovider": "14.20.0
|
|
34
|
-
"@quenty/promise": "10.11.0
|
|
35
|
-
"@quenty/remotefunctionutils": "10.11.0
|
|
36
|
-
"@quenty/remoting": "12.19.0
|
|
37
|
-
"@quenty/rx": "13.18.0
|
|
38
|
-
"@quenty/servicebag": "11.12.0
|
|
39
|
-
"@quenty/table": "3.
|
|
28
|
+
"@quenty/cmdrservice": "^13.23.0",
|
|
29
|
+
"@quenty/datastore": "^13.21.0",
|
|
30
|
+
"@quenty/ellipticcurvecryptography": "^1.7.0",
|
|
31
|
+
"@quenty/loader": "^10.9.0",
|
|
32
|
+
"@quenty/maid": "^3.5.0",
|
|
33
|
+
"@quenty/permissionprovider": "^14.20.0",
|
|
34
|
+
"@quenty/promise": "^10.11.0",
|
|
35
|
+
"@quenty/remotefunctionutils": "^10.11.0",
|
|
36
|
+
"@quenty/remoting": "^12.19.0",
|
|
37
|
+
"@quenty/rx": "^13.18.0",
|
|
38
|
+
"@quenty/servicebag": "^11.12.0",
|
|
39
|
+
"@quenty/table": "^3.8.0"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "20cff952c2cf06b959f2f11d2293bdef38acc604"
|
|
45
45
|
}
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
local require = require(script.Parent.loader).load(script)
|
|
6
6
|
|
|
7
7
|
local Maid = require("Maid")
|
|
8
|
+
local Promise = require("Promise")
|
|
8
9
|
local PromiseGetRemoteFunction = require("PromiseGetRemoteFunction")
|
|
10
|
+
local RemoteFunctionUtils = require("RemoteFunctionUtils")
|
|
9
11
|
local SecretsCmdrTypeUtils = require("SecretsCmdrTypeUtils")
|
|
10
12
|
local SecretsServiceConstants = require("SecretsServiceConstants")
|
|
11
|
-
local RemoteFunctionUtils = require("RemoteFunctionUtils")
|
|
12
|
-
local Promise = require("Promise")
|
|
13
13
|
local ServiceBag = require("ServiceBag")
|
|
14
14
|
|
|
15
15
|
local SecretsServiceClient = {}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
local require = require(script.Parent.loader).load(script)
|
|
6
6
|
|
|
7
|
-
local SecretsCmdrTypeUtils = require("SecretsCmdrTypeUtils")
|
|
8
7
|
local Maid = require("Maid")
|
|
8
|
+
local SecretsCmdrTypeUtils = require("SecretsCmdrTypeUtils")
|
|
9
9
|
local ServiceBag = require("ServiceBag")
|
|
10
10
|
|
|
11
11
|
local SecretsCommandService = {}
|
|
@@ -30,11 +30,11 @@ function SecretsCommandService:_registerCommands()
|
|
|
30
30
|
end)
|
|
31
31
|
|
|
32
32
|
self._cmdrService:RegisterCommand({
|
|
33
|
-
Name = "list-all-secret-keys"
|
|
34
|
-
Aliases = {
|
|
35
|
-
Description = "Lists all secret keys available."
|
|
36
|
-
Group = "Secrets"
|
|
37
|
-
Args = {}
|
|
33
|
+
Name = "list-all-secret-keys",
|
|
34
|
+
Aliases = {},
|
|
35
|
+
Description = "Lists all secret keys available.",
|
|
36
|
+
Group = "Secrets",
|
|
37
|
+
Args = {},
|
|
38
38
|
}, function(_context)
|
|
39
39
|
local secrets = self._secretsService:PromiseSecretKeyNamesList():Wait()
|
|
40
40
|
|
|
@@ -47,22 +47,22 @@ function SecretsCommandService:_registerCommands()
|
|
|
47
47
|
end)
|
|
48
48
|
|
|
49
49
|
self._cmdrService:RegisterCommand({
|
|
50
|
-
Name = "store-secret"
|
|
51
|
-
Aliases = {
|
|
52
|
-
Description = "Stores a secret key."
|
|
53
|
-
Group = "Secrets"
|
|
50
|
+
Name = "store-secret",
|
|
51
|
+
Aliases = {},
|
|
52
|
+
Description = "Stores a secret key.",
|
|
53
|
+
Group = "Secrets",
|
|
54
54
|
Args = {
|
|
55
55
|
{
|
|
56
|
-
Name = "SecretKey"
|
|
57
|
-
Type = "secretKey"
|
|
58
|
-
Description = "The key of the secret to store."
|
|
56
|
+
Name = "SecretKey",
|
|
57
|
+
Type = "secretKey",
|
|
58
|
+
Description = "The key of the secret to store.",
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
|
-
Name = "SecretValue"
|
|
62
|
-
Type = "string"
|
|
63
|
-
Description = "The value of the secret to store"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
61
|
+
Name = "SecretValue",
|
|
62
|
+
Type = "string",
|
|
63
|
+
Description = "The value of the secret to store",
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
66
|
}, function(_context, secretKey, secretValue)
|
|
67
67
|
self._secretsService:StoreSecret(secretKey, secretValue)
|
|
68
68
|
|
|
@@ -70,17 +70,17 @@ function SecretsCommandService:_registerCommands()
|
|
|
70
70
|
end)
|
|
71
71
|
|
|
72
72
|
self._cmdrService:RegisterCommand({
|
|
73
|
-
Name = "delete-secret"
|
|
74
|
-
Aliases = {
|
|
75
|
-
Description = "Stores a secret by key."
|
|
76
|
-
Group = "Secrets"
|
|
73
|
+
Name = "delete-secret",
|
|
74
|
+
Aliases = {},
|
|
75
|
+
Description = "Stores a secret by key.",
|
|
76
|
+
Group = "Secrets",
|
|
77
77
|
Args = {
|
|
78
78
|
{
|
|
79
|
-
Name = "SecretKey"
|
|
80
|
-
Type = "requiredSecretKey"
|
|
81
|
-
Description = "The key of the secret to store."
|
|
82
|
-
}
|
|
83
|
-
}
|
|
79
|
+
Name = "SecretKey",
|
|
80
|
+
Type = "requiredSecretKey",
|
|
81
|
+
Description = "The key of the secret to store.",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
84
|
}, function(_context, secretKey)
|
|
85
85
|
self._secretsService:DeleteSecret(secretKey)
|
|
86
86
|
|
|
@@ -88,17 +88,17 @@ function SecretsCommandService:_registerCommands()
|
|
|
88
88
|
end)
|
|
89
89
|
|
|
90
90
|
self._cmdrService:RegisterCommand({
|
|
91
|
-
Name = "read-secret"
|
|
92
|
-
Aliases = {
|
|
93
|
-
Description = "Reads a secret by key."
|
|
94
|
-
Group = "Secrets"
|
|
91
|
+
Name = "read-secret",
|
|
92
|
+
Aliases = {},
|
|
93
|
+
Description = "Reads a secret by key.",
|
|
94
|
+
Group = "Secrets",
|
|
95
95
|
Args = {
|
|
96
96
|
{
|
|
97
|
-
Name = "SecretKey"
|
|
98
|
-
Type = "requiredSecretKey"
|
|
99
|
-
Description = "The key of the secret to read."
|
|
100
|
-
}
|
|
101
|
-
}
|
|
97
|
+
Name = "SecretKey",
|
|
98
|
+
Type = "requiredSecretKey",
|
|
99
|
+
Description = "The key of the secret to read.",
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
102
|
}, function(_context, secretKey)
|
|
103
103
|
local secret = self._secretsService:PromiseSecret(secretKey):Wait()
|
|
104
104
|
|
|
@@ -110,11 +110,11 @@ function SecretsCommandService:_registerCommands()
|
|
|
110
110
|
end)
|
|
111
111
|
|
|
112
112
|
self._cmdrService:RegisterCommand({
|
|
113
|
-
Name = "list-all-secrets"
|
|
114
|
-
Aliases = {
|
|
115
|
-
Description = "Reads all secrets."
|
|
116
|
-
Group = "Secrets"
|
|
117
|
-
Args = {}
|
|
113
|
+
Name = "list-all-secrets",
|
|
114
|
+
Aliases = {},
|
|
115
|
+
Description = "Reads all secrets.",
|
|
116
|
+
Group = "Secrets",
|
|
117
|
+
Args = {},
|
|
118
118
|
}, function(_context)
|
|
119
119
|
local secrets = self._secretsService:PromiseAllSecrets():Wait()
|
|
120
120
|
|
|
@@ -140,11 +140,11 @@ function SecretsCommandService:_registerCommands()
|
|
|
140
140
|
end)
|
|
141
141
|
|
|
142
142
|
self._cmdrService:RegisterCommand({
|
|
143
|
-
Name = "clear-all-secrets"
|
|
144
|
-
Aliases = {
|
|
145
|
-
Description = "Clears all secrets in the store."
|
|
146
|
-
Group = "Secrets"
|
|
147
|
-
Args = {}
|
|
143
|
+
Name = "clear-all-secrets",
|
|
144
|
+
Aliases = {},
|
|
145
|
+
Description = "Clears all secrets in the store.",
|
|
146
|
+
Group = "Secrets",
|
|
147
|
+
Args = {},
|
|
148
148
|
}, function(_context)
|
|
149
149
|
self._secretsService:ClearAllSecrets()
|
|
150
150
|
|
|
@@ -156,4 +156,4 @@ function SecretsCommandService:Destroy()
|
|
|
156
156
|
self._maid:DoCleaning()
|
|
157
157
|
end
|
|
158
158
|
|
|
159
|
-
return SecretsCommandService
|
|
159
|
+
return SecretsCommandService
|
|
@@ -18,7 +18,7 @@ end
|
|
|
18
18
|
function SecretsCmdrTypeUtils.makeSecretKeyType(cmdr, secretsService, isRequired)
|
|
19
19
|
return {
|
|
20
20
|
Transform = function(text)
|
|
21
|
-
|
|
21
|
+
local secretNames = secretsService:PromiseSecretKeyNamesList():Wait()
|
|
22
22
|
local list
|
|
23
23
|
if not isRequired then
|
|
24
24
|
list = table.clone(secretNames)
|
|
@@ -29,7 +29,7 @@ function SecretsCmdrTypeUtils.makeSecretKeyType(cmdr, secretsService, isRequired
|
|
|
29
29
|
|
|
30
30
|
local find = cmdr.Util.MakeFuzzyFinder(list)
|
|
31
31
|
return find(text)
|
|
32
|
-
end
|
|
32
|
+
end,
|
|
33
33
|
Validate = function(keys)
|
|
34
34
|
return #keys > 0, "No secret exists with key."
|
|
35
35
|
end,
|
|
@@ -38,8 +38,8 @@ function SecretsCmdrTypeUtils.makeSecretKeyType(cmdr, secretsService, isRequired
|
|
|
38
38
|
end,
|
|
39
39
|
Parse = function(keys)
|
|
40
40
|
return keys[1]
|
|
41
|
-
end
|
|
41
|
+
end,
|
|
42
42
|
}
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
return SecretsCmdrTypeUtils
|
|
45
|
+
return SecretsCmdrTypeUtils
|
|
@@ -8,6 +8,6 @@ local require = require(script.Parent.loader).load(script)
|
|
|
8
8
|
local Table = require("Table")
|
|
9
9
|
|
|
10
10
|
return Table.readonly({
|
|
11
|
-
REMOTE_FUNCTION_NAME = "SecretsServiceRemoteFunction"
|
|
12
|
-
REQUEST_SECRET_KEY_NAMES_LIST = "requestSecretKeyNamesList"
|
|
13
|
-
})
|
|
11
|
+
REMOTE_FUNCTION_NAME = "SecretsServiceRemoteFunction",
|
|
12
|
+
REQUEST_SECRET_KEY_NAMES_LIST = "requestSecretKeyNamesList",
|
|
13
|
+
})
|
|
@@ -15,7 +15,6 @@ serviceBag:Start()
|
|
|
15
15
|
serviceBag:GetService(require("SecretsService")):SetPublicKeySeed(1523523523)
|
|
16
16
|
serviceBag:GetService(require("SecretsService")):StoreSecret("test", "36dfda27-1ba4-42f3-92ff-79262fc7a6e6")
|
|
17
17
|
|
|
18
|
-
serviceBag:GetService(require("SecretsService")):PromiseSecret("test")
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
end)
|
|
18
|
+
serviceBag:GetService(require("SecretsService")):PromiseSecret("test"):Then(function(value)
|
|
19
|
+
print("Got secret", value)
|
|
20
|
+
end)
|