dominus-cli 0.5.4 → 0.5.5
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/dist/index.js +228 -46
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +228 -45
- package/dist/mcp.js.map +1 -1
- package/package.json +1 -1
- package/plugin/Dominus.rbxm +0 -0
- package/plugin/src/Properties.lua +9 -2
- package/plugin/src/init.server.lua +5 -1
|
@@ -101,7 +101,7 @@ local function getPropertyTypeMap(className)
|
|
|
101
101
|
return typeMap
|
|
102
102
|
end
|
|
103
103
|
|
|
104
|
-
function Properties.get(path)
|
|
104
|
+
function Properties.get(path, compact)
|
|
105
105
|
local instance = Explorer.resolveInstance(path)
|
|
106
106
|
if not instance then
|
|
107
107
|
return { success = false, error = "Instance not found: " .. path }
|
|
@@ -114,13 +114,20 @@ function Properties.get(path)
|
|
|
114
114
|
local propData = ReflectionService:GetPropertiesOfClass(instance.ClassName)
|
|
115
115
|
for _, prop in propData do
|
|
116
116
|
if not IGNORED_PROPERTIES[prop.Name] then
|
|
117
|
+
if compact and COMPACT_SKIP[prop.Name] then
|
|
118
|
+
continue
|
|
119
|
+
end
|
|
117
120
|
local valueOk, value = pcall(function()
|
|
118
121
|
return instance[prop.Name]
|
|
119
122
|
end)
|
|
120
123
|
if valueOk then
|
|
124
|
+
local valueStr = tostring(value)
|
|
125
|
+
if compact and valueStr == "nil" then
|
|
126
|
+
continue
|
|
127
|
+
end
|
|
121
128
|
table.insert(info, {
|
|
122
129
|
name = prop.Name,
|
|
123
|
-
value =
|
|
130
|
+
value = valueStr,
|
|
124
131
|
type = prop.ValueType and tostring(prop.ValueType) or typeof(value),
|
|
125
132
|
category = prop.Category or "Other",
|
|
126
133
|
})
|
|
@@ -74,7 +74,11 @@ local function handleMessage(rawMessage)
|
|
|
74
74
|
ts = os.clock(),
|
|
75
75
|
}))
|
|
76
76
|
elseif msgType == "cli:get:properties" then
|
|
77
|
-
local
|
|
77
|
+
local compact = payload.compact
|
|
78
|
+
if compact == nil then
|
|
79
|
+
compact = true
|
|
80
|
+
end
|
|
81
|
+
local result = Properties.get(payload.path, compact)
|
|
78
82
|
WsClient.send(Protocol.encode({
|
|
79
83
|
id = msgId,
|
|
80
84
|
type = "studio:response",
|