itemscore-helper 1.2.1 → 1.2.2

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.
Files changed (2) hide show
  1. package/lib/manifest.js +13 -0
  2. package/package.json +1 -1
package/lib/manifest.js CHANGED
@@ -190,8 +190,21 @@ function describeProduced(produced) {
190
190
  return "value"
191
191
  }
192
192
 
193
+ function isVarargsMethod(method) {
194
+ if (!method.params || method.params.length === 0) return false
195
+ const last = method.params[method.params.length - 1]
196
+ const t = (last.type || last.jvmType || "")
197
+ return t.includes("[]") || t.endsWith("[")
198
+ }
199
+
193
200
  function validateArgs(idx, method, args, p, errors) {
194
201
  if (!method || !Array.isArray(method.params) || !Array.isArray(args)) return
202
+ if (!isVarargsMethod(method) && args.length !== method.params.length) {
203
+ errors.push(
204
+ p + " calls " + method.signature + " with " + args.length + " argument(s) but it takes " + method.params.length + "."
205
+ )
206
+ return
207
+ }
195
208
  for (let i = 0; i < args.length && i < method.params.length; i++) {
196
209
  const param = method.params[i]
197
210
  const expected = param.type || param.jvmType
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemscore-helper",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "One command sets up any AI (Claude, Codex, Cursor, Gemini, and others) to build and edit custom Minecraft items for the ItemsCore plugin. Auto-detects your AI tools and connects a local MCP server that runs entirely on your machine.",
5
5
  "bin": {
6
6
  "itemscore-helper": "bin/cli.js",