@quenty/cmdrservice 13.23.0-canary.ae8d76d.0 → 13.23.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 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
- # [13.23.0-canary.ae8d76d.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/cmdrservice@13.22.3...@quenty/cmdrservice@13.23.0-canary.ae8d76d.0) (2025-05-10)
6
+ # [13.23.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/cmdrservice@13.22.3...@quenty/cmdrservice@13.23.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/cmdrservice",
3
- "version": "13.23.0-canary.ae8d76d.0",
3
+ "version": "13.23.0",
4
4
  "description": "Bridge between cmdr and Nevermore services using servicebag",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -25,18 +25,18 @@
25
25
  "Quenty"
26
26
  ],
27
27
  "dependencies": {
28
- "@quenty/loader": "10.8.3",
29
- "@quenty/maid": "3.4.3",
30
- "@quenty/permissionprovider": "14.20.0-canary.ae8d76d.0",
31
- "@quenty/promise": "10.11.0-canary.ae8d76d.0",
32
- "@quenty/remoting": "12.19.0-canary.ae8d76d.0",
33
- "@quenty/servicebag": "11.12.0-canary.ae8d76d.0",
34
- "@quenty/string": "3.3.3",
35
- "@quenty/templateprovider": "11.19.0-canary.ae8d76d.0",
28
+ "@quenty/loader": "^10.9.0",
29
+ "@quenty/maid": "^3.5.0",
30
+ "@quenty/permissionprovider": "^14.20.0",
31
+ "@quenty/promise": "^10.11.0",
32
+ "@quenty/remoting": "^12.19.0",
33
+ "@quenty/servicebag": "^11.12.0",
34
+ "@quenty/string": "^3.3.3",
35
+ "@quenty/templateprovider": "^11.19.0",
36
36
  "@quentystudios/cmdr": "^1.12.0-quenty.0"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "ae8d76d996594e017ac4bfa19f3c064ebe307cd8"
41
+ "gitHead": "20cff952c2cf06b959f2f11d2293bdef38acc604"
42
42
  }
@@ -7,17 +7,17 @@
7
7
 
8
8
  local require = require(script.Parent.loader).load(script)
9
9
 
10
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
11
10
  local Players = game:GetService("Players")
11
+ local ReplicatedStorage = game:GetService("ReplicatedStorage")
12
12
  local RunService = game:GetService("RunService")
13
13
 
14
14
  local Maid = require("Maid")
15
15
  local PermissionServiceClient = require("PermissionServiceClient")
16
16
  local Promise = require("Promise")
17
- local promiseChild = require("promiseChild")
18
17
  local PromiseUtils = require("PromiseUtils")
19
- local String = require("String")
20
18
  local ServiceBag = require("ServiceBag")
19
+ local String = require("String")
20
+ local promiseChild = require("promiseChild")
21
21
 
22
22
  local CmdrServiceClient = {}
23
23
  CmdrServiceClient.ServiceName = "CmdrServiceClient"
@@ -80,20 +80,20 @@ end
80
80
  function CmdrServiceClient:Start()
81
81
  assert(self._serviceBag, "Not initialized")
82
82
 
83
- self._maid:GivePromise(PromiseUtils.all({
84
- self:PromiseCmdr(),
85
- self._maid:GivePromise(self._permissionServiceClient:PromisePermissionProvider())
86
- :Then(function(provider)
83
+ self._maid
84
+ :GivePromise(PromiseUtils.all({
85
+ self:PromiseCmdr(),
86
+ self._maid:GivePromise(self._permissionServiceClient:PromisePermissionProvider()):Then(function(provider)
87
87
  return provider:PromiseIsAdmin()
88
- end)
89
- }))
90
- :Then(function(cmdr, isAdmin)
91
- if isAdmin then
92
- self:_setBindings(cmdr)
93
- else
94
- cmdr:SetActivationKeys({})
95
- end
96
- end)
88
+ end),
89
+ }))
90
+ :Then(function(cmdr, isAdmin)
91
+ if isAdmin then
92
+ self:_setBindings(cmdr)
93
+ else
94
+ cmdr:SetActivationKeys({})
95
+ end
96
+ end)
97
97
  end
98
98
 
99
99
  function CmdrServiceClient:_setBindings(cmdr)
@@ -107,7 +107,6 @@ function CmdrServiceClient:_setBindings(cmdr)
107
107
  end
108
108
  end))
109
109
 
110
-
111
110
  -- Race condition
112
111
  task.defer(function()
113
112
  -- Default blink for debugging purposes
@@ -132,7 +131,8 @@ function CmdrServiceClient:PromiseCmdr()
132
131
  timeout = 1e10
133
132
  end
134
133
 
135
- self._cmdrPromise = self._maid:GivePromise(promiseChild(ReplicatedStorage, "CmdrClient", timeout))
134
+ self._cmdrPromise = self._maid
135
+ :GivePromise(promiseChild(ReplicatedStorage, "CmdrClient", timeout))
136
136
  :Then(function(cmdClient)
137
137
  return Promise.spawn(function(resolve, _reject)
138
138
  -- Requiring cmdr can yield
@@ -148,4 +148,4 @@ function CmdrServiceClient:Destroy()
148
148
  self._maid:DoCleaning()
149
149
  end
150
150
 
151
- return CmdrServiceClient
151
+ return CmdrServiceClient
@@ -206,4 +206,4 @@ function CmdrService.Destroy(self: CmdrService)
206
206
  self._maid:DoCleaning()
207
207
  end
208
208
 
209
- return CmdrService
209
+ return CmdrService
@@ -6,4 +6,4 @@
6
6
  local HttpService = game:GetService("HttpService")
7
7
 
8
8
  local value = script:WaitForChild("CmdrJsonCommandData")
9
- return HttpService:JSONDecode(value.Value)
9
+ return HttpService:JSONDecode(value.Value)
@@ -19,4 +19,4 @@ local cmdrService = commandServiceDefinition:__getServiceFromId(cmdrServiceId)
19
19
 
20
20
  return function(...)
21
21
  return cmdrService:__executeCommand(cmdrCommandId, ...)
22
- end
22
+ end
@@ -7,4 +7,4 @@ local require = require(script.Parent.loader).load(script)
7
7
 
8
8
  local TemplateProvider = require("TemplateProvider")
9
9
 
10
- return TemplateProvider.new(script.Name, script)
10
+ return TemplateProvider.new(script.Name, script)
@@ -1,46 +1,46 @@
1
1
  --!strict
2
2
 
3
3
  export type NamedObject = {
4
- Name: string
4
+ Name: string,
5
5
  }
6
6
 
7
7
  export type TypeDefinition<T> = {
8
- DisplayName: string?,
9
- Prefixes: string?,
10
- Transform: ((string, Player) -> T)?,
11
- Validate: ((T) -> (boolean, string?) | boolean)?,
12
- ValidateOnce: ((T) -> (boolean, string?) | boolean)?,
13
- Autocomplete: ((T) -> ({ string }, { IsPartial: boolean? }?) | { string })?,
14
- Parse: (T) -> any,
15
- Default: ((Player) -> string)?,
16
- Listable: boolean?,
8
+ DisplayName: string?,
9
+ Prefixes: string?,
10
+ Transform: ((string, Player) -> T)?,
11
+ Validate: ((T) -> (boolean, string?) | boolean)?,
12
+ ValidateOnce: ((T) -> (boolean, string?) | boolean)?,
13
+ Autocomplete: ((T) -> ({ string }, { IsPartial: boolean? }?) | { string })?,
14
+ Parse: (T) -> any,
15
+ Default: ((Player) -> string)?,
16
+ Listable: boolean?,
17
17
  }
18
18
 
19
19
  export type CommandArgument = {
20
- Type: string | TypeDefinition<any>,
21
- Name: string,
22
- Description: string,
23
- Optional: boolean?,
24
- Default: any?,
20
+ Type: string | TypeDefinition<any>,
21
+ Name: string,
22
+ Description: string,
23
+ Optional: boolean?,
24
+ Default: any?,
25
25
  }
26
26
 
27
27
  export type CommandContext = {
28
- GetData: (self: CommandContext) -> any,
29
- GetPlayer: (self: CommandContext) -> Player,
30
- GetArgs: (self: CommandContext) -> { any },
31
- GetCommandName: (self: CommandContext) -> string,
32
- GetCommandId: (self: CommandContext) -> string,
28
+ GetData: (self: CommandContext) -> any,
29
+ GetPlayer: (self: CommandContext) -> Player,
30
+ GetArgs: (self: CommandContext) -> { any },
31
+ GetCommandName: (self: CommandContext) -> string,
32
+ GetCommandId: (self: CommandContext) -> string,
33
33
  }
34
34
 
35
35
  export type CommandDefinition = {
36
- Name: string,
37
- Aliases: { string }?,
38
- Description: string,
39
- Group: any?,
40
- Args: { CommandArgument | (CommandContext) -> CommandArgument },
41
- Data: ((CommandContext) -> any)?,
42
- ClientRun: ((CommandContext, ...any) -> string?)?,
43
- AutoExec: { string }?,
36
+ Name: string,
37
+ Aliases: { string }?,
38
+ Description: string,
39
+ Group: any?,
40
+ Args: { CommandArgument | (CommandContext) -> CommandArgument },
41
+ Data: ((CommandContext) -> any)?,
42
+ ClientRun: ((CommandContext, ...any) -> string?)?,
43
+ AutoExec: { string }?,
44
44
  }
45
45
 
46
- return {}
46
+ return {}
@@ -9,4 +9,4 @@ local serviceBag = require("ServiceBag").new()
9
9
  serviceBag:GetService(require("CmdrServiceClient"))
10
10
 
11
11
  serviceBag:Init()
12
- serviceBag:Start()
12
+ serviceBag:Start()
@@ -13,17 +13,17 @@ serviceBag:Init()
13
13
  serviceBag:Start()
14
14
 
15
15
  serviceBag:GetService(require("CmdrService")):RegisterCommand({
16
- Name = "explode";
17
- Aliases = { "boom" };
18
- Description = "Makes players explode";
19
- Group = "Admin";
16
+ Name = "explode",
17
+ Aliases = { "boom" },
18
+ Description = "Makes players explode",
19
+ Group = "Admin",
20
20
  Args = {
21
21
  {
22
- Name = "Players";
23
- Type = "players";
24
- Description = "Victims";
22
+ Name = "Players",
23
+ Type = "players",
24
+ Description = "Victims",
25
25
  },
26
- };
26
+ },
27
27
  }, function(_context, players)
28
28
  for _, player in players do
29
29
  local humanoid = player.Character and player.Character:FindFirstChildWhichIsA("Humanoid")
@@ -36,4 +36,4 @@ serviceBag:GetService(require("CmdrService")):RegisterCommand({
36
36
  end
37
37
 
38
38
  return "Exploded!"
39
- end)
39
+ end)