Compare commits
	
		
			2 Commits
		
	
	
		
			48515b0fc0
			...
			568e5abbc3
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 568e5abbc3 | |||
| 14f7b74d0f | 
							
								
								
									
										437
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										437
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -13,7 +13,8 @@ | ||||
|         "@actions/github": "^6.0.1", | ||||
|         "@spyglassmc/core": "^0.4.34", | ||||
|         "@spyglassmc/java-edition": "^0.3.45", | ||||
|         "@spyglassmc/mcdoc": "^0.3.38" | ||||
|         "@spyglassmc/mcdoc": "^0.3.38", | ||||
|         "glob": "^11.0.3" | ||||
|       }, | ||||
|       "devDependencies": { | ||||
|         "@types/node": "^24.3.1", | ||||
| @@ -74,6 +75,41 @@ | ||||
|         "node": ">=14" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/@isaacs/balanced-match": { | ||||
|       "version": "4.0.1", | ||||
|       "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", | ||||
|       "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", | ||||
|       "engines": { | ||||
|         "node": "20 || >=22" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/@isaacs/brace-expansion": { | ||||
|       "version": "5.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", | ||||
|       "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", | ||||
|       "dependencies": { | ||||
|         "@isaacs/balanced-match": "^4.0.1" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": "20 || >=22" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/@isaacs/cliui": { | ||||
|       "version": "8.0.2", | ||||
|       "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", | ||||
|       "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", | ||||
|       "dependencies": { | ||||
|         "string-width": "^5.1.2", | ||||
|         "string-width-cjs": "npm:string-width@^4.2.0", | ||||
|         "strip-ansi": "^7.0.1", | ||||
|         "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", | ||||
|         "wrap-ansi": "^8.1.0", | ||||
|         "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=12" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/@octokit/auth-token": { | ||||
|       "version": "4.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", | ||||
| @@ -310,6 +346,28 @@ | ||||
|         "ncc": "dist/ncc/cli.js" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/ansi-regex": { | ||||
|       "version": "6.2.2", | ||||
|       "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", | ||||
|       "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", | ||||
|       "engines": { | ||||
|         "node": ">=12" | ||||
|       }, | ||||
|       "funding": { | ||||
|         "url": "https://github.com/chalk/ansi-regex?sponsor=1" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/ansi-styles": { | ||||
|       "version": "6.2.3", | ||||
|       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", | ||||
|       "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", | ||||
|       "engines": { | ||||
|         "node": ">=12" | ||||
|       }, | ||||
|       "funding": { | ||||
|         "url": "https://github.com/chalk/ansi-styles?sponsor=1" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/anymatch": { | ||||
|       "version": "3.1.3", | ||||
|       "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", | ||||
| @@ -532,6 +590,22 @@ | ||||
|         "fsevents": "~2.3.2" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/color-convert": { | ||||
|       "version": "2.0.1", | ||||
|       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", | ||||
|       "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", | ||||
|       "dependencies": { | ||||
|         "color-name": "~1.1.4" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=7.0.0" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/color-name": { | ||||
|       "version": "1.1.4", | ||||
|       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", | ||||
|       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" | ||||
|     }, | ||||
|     "node_modules/commander": { | ||||
|       "version": "2.20.3", | ||||
|       "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", | ||||
| @@ -542,6 +616,19 @@ | ||||
|       "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", | ||||
|       "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" | ||||
|     }, | ||||
|     "node_modules/cross-spawn": { | ||||
|       "version": "7.0.6", | ||||
|       "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", | ||||
|       "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", | ||||
|       "dependencies": { | ||||
|         "path-key": "^3.1.0", | ||||
|         "shebang-command": "^2.0.0", | ||||
|         "which": "^2.0.1" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">= 8" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/decompress": { | ||||
|       "version": "4.2.1", | ||||
|       "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", | ||||
| @@ -665,6 +752,16 @@ | ||||
|         "node": ">= 0.4" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/eastasianwidth": { | ||||
|       "version": "0.2.0", | ||||
|       "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", | ||||
|       "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" | ||||
|     }, | ||||
|     "node_modules/emoji-regex": { | ||||
|       "version": "9.2.2", | ||||
|       "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", | ||||
|       "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" | ||||
|     }, | ||||
|     "node_modules/end-of-stream": { | ||||
|       "version": "1.4.5", | ||||
|       "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", | ||||
| @@ -760,6 +857,21 @@ | ||||
|         "url": "https://github.com/sponsors/ljharb" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/foreground-child": { | ||||
|       "version": "3.3.1", | ||||
|       "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", | ||||
|       "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", | ||||
|       "dependencies": { | ||||
|         "cross-spawn": "^7.0.6", | ||||
|         "signal-exit": "^4.0.1" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=14" | ||||
|       }, | ||||
|       "funding": { | ||||
|         "url": "https://github.com/sponsors/isaacs" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/fs-constants": { | ||||
|       "version": "1.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", | ||||
| @@ -833,6 +945,28 @@ | ||||
|         "node": ">=0.10.0" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/glob": { | ||||
|       "version": "11.0.3", | ||||
|       "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", | ||||
|       "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", | ||||
|       "dependencies": { | ||||
|         "foreground-child": "^3.3.1", | ||||
|         "jackspeak": "^4.1.1", | ||||
|         "minimatch": "^10.0.3", | ||||
|         "minipass": "^7.1.2", | ||||
|         "package-json-from-dist": "^1.0.0", | ||||
|         "path-scurry": "^2.0.0" | ||||
|       }, | ||||
|       "bin": { | ||||
|         "glob": "dist/esm/bin.mjs" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": "20 || >=22" | ||||
|       }, | ||||
|       "funding": { | ||||
|         "url": "https://github.com/sponsors/isaacs" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/glob-parent": { | ||||
|       "version": "5.1.2", | ||||
|       "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", | ||||
| @@ -961,6 +1095,14 @@ | ||||
|         "node": ">=0.10.0" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/is-fullwidth-code-point": { | ||||
|       "version": "3.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", | ||||
|       "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", | ||||
|       "engines": { | ||||
|         "node": ">=8" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/is-glob": { | ||||
|       "version": "4.0.3", | ||||
|       "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", | ||||
| @@ -1012,6 +1154,33 @@ | ||||
|       "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", | ||||
|       "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" | ||||
|     }, | ||||
|     "node_modules/isexe": { | ||||
|       "version": "2.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", | ||||
|       "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" | ||||
|     }, | ||||
|     "node_modules/jackspeak": { | ||||
|       "version": "4.1.1", | ||||
|       "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", | ||||
|       "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", | ||||
|       "dependencies": { | ||||
|         "@isaacs/cliui": "^8.0.2" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": "20 || >=22" | ||||
|       }, | ||||
|       "funding": { | ||||
|         "url": "https://github.com/sponsors/isaacs" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/lru-cache": { | ||||
|       "version": "11.2.1", | ||||
|       "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.1.tgz", | ||||
|       "integrity": "sha512-r8LA6i4LP4EeWOhqBaZZjDWwehd1xUJPCJd9Sv300H0ZmcUER4+JPh7bqqZeqs1o5pgtgvXm+d9UGrB5zZGDiQ==", | ||||
|       "engines": { | ||||
|         "node": "20 || >=22" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/make-dir": { | ||||
|       "version": "1.3.0", | ||||
|       "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", | ||||
| @@ -1039,6 +1208,28 @@ | ||||
|         "node": ">= 0.4" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/minimatch": { | ||||
|       "version": "10.0.3", | ||||
|       "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", | ||||
|       "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", | ||||
|       "dependencies": { | ||||
|         "@isaacs/brace-expansion": "^5.0.0" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": "20 || >=22" | ||||
|       }, | ||||
|       "funding": { | ||||
|         "url": "https://github.com/sponsors/isaacs" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/minipass": { | ||||
|       "version": "7.1.2", | ||||
|       "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", | ||||
|       "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", | ||||
|       "engines": { | ||||
|         "node": ">=16 || 14 >=14.17" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/normalize-path": { | ||||
|       "version": "3.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", | ||||
| @@ -1063,11 +1254,39 @@ | ||||
|         "wrappy": "1" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/package-json-from-dist": { | ||||
|       "version": "1.0.1", | ||||
|       "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", | ||||
|       "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==" | ||||
|     }, | ||||
|     "node_modules/pako": { | ||||
|       "version": "2.1.0", | ||||
|       "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", | ||||
|       "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" | ||||
|     }, | ||||
|     "node_modules/path-key": { | ||||
|       "version": "3.1.1", | ||||
|       "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", | ||||
|       "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", | ||||
|       "engines": { | ||||
|         "node": ">=8" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/path-scurry": { | ||||
|       "version": "2.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", | ||||
|       "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", | ||||
|       "dependencies": { | ||||
|         "lru-cache": "^11.0.0", | ||||
|         "minipass": "^7.1.2" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": "20 || >=22" | ||||
|       }, | ||||
|       "funding": { | ||||
|         "url": "https://github.com/sponsors/isaacs" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/pend": { | ||||
|       "version": "1.2.0", | ||||
|       "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", | ||||
| @@ -1225,6 +1444,36 @@ | ||||
|         "node": ">= 0.4" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/shebang-command": { | ||||
|       "version": "2.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", | ||||
|       "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", | ||||
|       "dependencies": { | ||||
|         "shebang-regex": "^3.0.0" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=8" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/shebang-regex": { | ||||
|       "version": "3.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", | ||||
|       "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", | ||||
|       "engines": { | ||||
|         "node": ">=8" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/signal-exit": { | ||||
|       "version": "4.1.0", | ||||
|       "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", | ||||
|       "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", | ||||
|       "engines": { | ||||
|         "node": ">=14" | ||||
|       }, | ||||
|       "funding": { | ||||
|         "url": "https://github.com/sponsors/isaacs" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/string_decoder": { | ||||
|       "version": "1.1.1", | ||||
|       "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", | ||||
| @@ -1238,6 +1487,94 @@ | ||||
|       "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", | ||||
|       "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" | ||||
|     }, | ||||
|     "node_modules/string-width": { | ||||
|       "version": "5.1.2", | ||||
|       "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", | ||||
|       "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", | ||||
|       "dependencies": { | ||||
|         "eastasianwidth": "^0.2.0", | ||||
|         "emoji-regex": "^9.2.2", | ||||
|         "strip-ansi": "^7.0.1" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=12" | ||||
|       }, | ||||
|       "funding": { | ||||
|         "url": "https://github.com/sponsors/sindresorhus" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/string-width-cjs": { | ||||
|       "name": "string-width", | ||||
|       "version": "4.2.3", | ||||
|       "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", | ||||
|       "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", | ||||
|       "dependencies": { | ||||
|         "emoji-regex": "^8.0.0", | ||||
|         "is-fullwidth-code-point": "^3.0.0", | ||||
|         "strip-ansi": "^6.0.1" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=8" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/string-width-cjs/node_modules/ansi-regex": { | ||||
|       "version": "5.0.1", | ||||
|       "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", | ||||
|       "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", | ||||
|       "engines": { | ||||
|         "node": ">=8" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/string-width-cjs/node_modules/emoji-regex": { | ||||
|       "version": "8.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", | ||||
|       "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" | ||||
|     }, | ||||
|     "node_modules/string-width-cjs/node_modules/strip-ansi": { | ||||
|       "version": "6.0.1", | ||||
|       "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", | ||||
|       "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", | ||||
|       "dependencies": { | ||||
|         "ansi-regex": "^5.0.1" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=8" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/strip-ansi": { | ||||
|       "version": "7.1.2", | ||||
|       "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", | ||||
|       "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", | ||||
|       "dependencies": { | ||||
|         "ansi-regex": "^6.0.1" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=12" | ||||
|       }, | ||||
|       "funding": { | ||||
|         "url": "https://github.com/chalk/strip-ansi?sponsor=1" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/strip-ansi-cjs": { | ||||
|       "name": "strip-ansi", | ||||
|       "version": "6.0.1", | ||||
|       "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", | ||||
|       "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", | ||||
|       "dependencies": { | ||||
|         "ansi-regex": "^5.0.1" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=8" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { | ||||
|       "version": "5.0.1", | ||||
|       "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", | ||||
|       "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", | ||||
|       "engines": { | ||||
|         "node": ">=8" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/strip-dirs": { | ||||
|       "version": "2.1.0", | ||||
|       "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", | ||||
| @@ -1403,6 +1740,20 @@ | ||||
|         "node": ">=18" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/which": { | ||||
|       "version": "2.0.2", | ||||
|       "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", | ||||
|       "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", | ||||
|       "dependencies": { | ||||
|         "isexe": "^2.0.0" | ||||
|       }, | ||||
|       "bin": { | ||||
|         "node-which": "bin/node-which" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">= 8" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/which-typed-array": { | ||||
|       "version": "1.1.19", | ||||
|       "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", | ||||
| @@ -1423,6 +1774,90 @@ | ||||
|         "url": "https://github.com/sponsors/ljharb" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/wrap-ansi": { | ||||
|       "version": "8.1.0", | ||||
|       "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", | ||||
|       "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", | ||||
|       "dependencies": { | ||||
|         "ansi-styles": "^6.1.0", | ||||
|         "string-width": "^5.0.1", | ||||
|         "strip-ansi": "^7.0.1" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=12" | ||||
|       }, | ||||
|       "funding": { | ||||
|         "url": "https://github.com/chalk/wrap-ansi?sponsor=1" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/wrap-ansi-cjs": { | ||||
|       "name": "wrap-ansi", | ||||
|       "version": "7.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", | ||||
|       "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", | ||||
|       "dependencies": { | ||||
|         "ansi-styles": "^4.0.0", | ||||
|         "string-width": "^4.1.0", | ||||
|         "strip-ansi": "^6.0.0" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=10" | ||||
|       }, | ||||
|       "funding": { | ||||
|         "url": "https://github.com/chalk/wrap-ansi?sponsor=1" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { | ||||
|       "version": "5.0.1", | ||||
|       "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", | ||||
|       "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", | ||||
|       "engines": { | ||||
|         "node": ">=8" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { | ||||
|       "version": "4.3.0", | ||||
|       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", | ||||
|       "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", | ||||
|       "dependencies": { | ||||
|         "color-convert": "^2.0.1" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=8" | ||||
|       }, | ||||
|       "funding": { | ||||
|         "url": "https://github.com/chalk/ansi-styles?sponsor=1" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { | ||||
|       "version": "8.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", | ||||
|       "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" | ||||
|     }, | ||||
|     "node_modules/wrap-ansi-cjs/node_modules/string-width": { | ||||
|       "version": "4.2.3", | ||||
|       "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", | ||||
|       "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", | ||||
|       "dependencies": { | ||||
|         "emoji-regex": "^8.0.0", | ||||
|         "is-fullwidth-code-point": "^3.0.0", | ||||
|         "strip-ansi": "^6.0.1" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=8" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { | ||||
|       "version": "6.0.1", | ||||
|       "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", | ||||
|       "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", | ||||
|       "dependencies": { | ||||
|         "ansi-regex": "^5.0.1" | ||||
|       }, | ||||
|       "engines": { | ||||
|         "node": ">=8" | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/wrappy": { | ||||
|       "version": "1.0.2", | ||||
|       "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", | ||||
|   | ||||
| @@ -22,6 +22,7 @@ | ||||
|     "@actions/github": "^6.0.1", | ||||
|     "@spyglassmc/core": "^0.4.34", | ||||
|     "@spyglassmc/java-edition": "^0.3.45", | ||||
|     "@spyglassmc/mcdoc": "^0.3.38" | ||||
|     "@spyglassmc/mcdoc": "^0.3.38", | ||||
|     "glob": "^11.0.3" | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -1,3 +1,204 @@ | ||||
| export async function checkDatapack(rootDir: String, version: String): Promise<void> { | ||||
|     console.log(`Checking datapack in directory ${rootDir} for Minecraft version ${version}`) | ||||
| import * as action from '@actions/core' | ||||
| import * as core from '@spyglassmc/core' | ||||
| import * as je from '@spyglassmc/java-edition' | ||||
| import * as mcdoc from '@spyglassmc/mcdoc' | ||||
| import { NodeJsExternals } from '@spyglassmc/core/lib/nodejs.js' | ||||
| import path from "path" | ||||
| import { glob } from "glob" | ||||
| import fs from "fs" | ||||
|  | ||||
| export interface ActionOptions { | ||||
|     /** | ||||
|      * If set to true, all errors are reported. If set to false, only the first error is reported | ||||
|      */ | ||||
|     reportAllErrors: boolean | ||||
|  | ||||
|     /** | ||||
|      * If set to true, each error is described, indicating the exact issue. If set to false, only the number of errors in each file is reported | ||||
|      */ | ||||
|     verbose: boolean | ||||
| } | ||||
|  | ||||
| class ActionLogger implements core.Logger { | ||||
|     error(data: any, ...args: any[]): void { | ||||
|         action.error(data) | ||||
|     } | ||||
|     info(data: any, ...args: any[]): void { | ||||
|         action.info(data) | ||||
|     } | ||||
|     log(data: any, ...args: any[]): void { | ||||
|         action.debug(data) | ||||
|     } | ||||
|     warn(data: any, ...args: any[]): void { | ||||
|         action.warning(data) | ||||
|     } | ||||
|  | ||||
| } | ||||
|  | ||||
| export class CustomService extends core.Service { | ||||
|     rootDir: string | ||||
|     options: ActionOptions | ||||
|  | ||||
|     constructor(rootDir: string, version: string, options: ActionOptions) { | ||||
|         rootDir = path.resolve(rootDir) | ||||
|         action.info(`rootDir = ${rootDir}`) | ||||
|         action.info(`version = ${version}`) | ||||
|         const fullRootDir = core.fileUtil.ensureEndingSlash("file://" + rootDir) | ||||
|         const config = { | ||||
|             env: { | ||||
|                 gameVersion: version, | ||||
|                 feature: { | ||||
|                     codeActions: false, | ||||
|                     colors: false, | ||||
|                     completions: false, | ||||
|                     documentHighlighting: false, | ||||
|                     documentLinks: false, | ||||
|                     foldingRanges: false, | ||||
|                     formatting: false, | ||||
|                     hover: false, | ||||
|                     inlayHint: { | ||||
|                         enabledNodes: [] | ||||
|                     }, | ||||
|                     semanticColoring: false, | ||||
|                     selectionRanges: false, | ||||
|                     signatures: false | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         super({ | ||||
|             logger: new ActionLogger(), | ||||
|             profilers: new core.ProfilerFactory(console, [ | ||||
|                 'cache#load', | ||||
|                 'cache#save', | ||||
|                 'project#init', | ||||
|                 'project#ready', | ||||
|             ]), | ||||
|             project: { | ||||
|                 cacheRoot: 'file:///tmp/.cache/', | ||||
|                 defaultConfig: core.ConfigService.merge( | ||||
|                     core.VanillaConfig, | ||||
|                     config | ||||
|                 ), | ||||
|                 externals: NodeJsExternals, | ||||
|                 initializers: [mcdoc.initialize, je.initialize], | ||||
|                 projectRoots: [fullRootDir], | ||||
|             }, | ||||
|         }) | ||||
|         this.rootDir = rootDir | ||||
|         this.options = options | ||||
|     } | ||||
|  | ||||
|     async shutdown() { | ||||
|         action.startGroup("Shutdown") | ||||
|         await this.project.close() | ||||
|         action.endGroup() | ||||
|     } | ||||
|  | ||||
|     private listFilesByExtension(extension: string) { | ||||
|         return glob(path.join(this.rootDir, `**/*.${extension}`)) | ||||
|     } | ||||
|  | ||||
|     private makeFileUrl(path: string) { | ||||
|         return "file://" + path | ||||
|     } | ||||
|  | ||||
|     private getFileContent(path: string) { | ||||
|         return fs.readFileSync(path, { | ||||
|             encoding: "utf-8" | ||||
|         }) | ||||
|     } | ||||
|  | ||||
|     private getLineAndColumn(pos: number, content: string) { | ||||
|         const before = content.slice(0, pos) | ||||
|         const line = before.split("\n").length | ||||
|         const col = pos - before.lastIndexOf("\n") | ||||
|         return { line, col } | ||||
|     } | ||||
|  | ||||
|     private getErrorProperties(error: core.LanguageError, path: string, content: string): action.AnnotationProperties { | ||||
|         const {line: startLine, col: startColumn} = this.getLineAndColumn(error.range.start, content) | ||||
|         const {line: endLine, col: endColumn} = this.getLineAndColumn(error.range.end, content) | ||||
|         return { | ||||
|             file: path, | ||||
|             startLine, startColumn, | ||||
|             endLine, endColumn | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     async checkFile(path: string, lang: string): Promise<boolean> { | ||||
|         const url = this.makeFileUrl(path) | ||||
|         const content = this.getFileContent(path) | ||||
|         this.project.onDidOpen(url, lang, 0, content) | ||||
|         const docAndNode = this.project.getClientManaged(url) | ||||
|         if (!docAndNode) { | ||||
|             action.error(`File ${path} is not loaded`) | ||||
|             return false | ||||
|         } | ||||
|         const { node } = docAndNode | ||||
|         const errors = core.FileNode.getErrors(node) | ||||
|         if (errors.length !== 0) { | ||||
|             const msg = `${errors.length} error${errors.length > 1 ? "s" : ""} in ${path}` | ||||
|              | ||||
|             if (this.options.verbose) { | ||||
|                 action.startGroup(msg) | ||||
|                 for (const err of errors) { | ||||
|                     action.error( | ||||
|                         err.message, | ||||
|                         this.getErrorProperties(err, path, content) | ||||
|                     ) | ||||
|                 } | ||||
|                 action.endGroup() | ||||
|             } else { | ||||
|                 action.error(msg) | ||||
|             } | ||||
|             return false | ||||
|         } | ||||
|         return true | ||||
|     } | ||||
|  | ||||
|     async checkAllFiles(): Promise<boolean> { | ||||
|         const jsonFiles = await this.listFilesByExtension("json") | ||||
|         const funcFiles = await this.listFilesByExtension("mcfunction") | ||||
|         action.info( | ||||
|             "Files to check:" + "\n" + | ||||
|             `- JSON: ${jsonFiles.length}` + "\n" + | ||||
|             `- Function: ${funcFiles.length}` | ||||
|         ) | ||||
|         let success = true | ||||
|         for (const jsonFile of jsonFiles) { | ||||
|             if (!this.checkFile(jsonFile, "json")) { | ||||
|                 success = false | ||||
|                 if (!this.options.reportAllErrors) { | ||||
|                     return false | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         for (const funcFile of funcFiles) { | ||||
|             if (!this.checkFile(funcFile, "mcfunction")) { | ||||
|                 success = false | ||||
|                 if (!this.options.reportAllErrors) { | ||||
|                     return false | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         return success | ||||
|     } | ||||
| } | ||||
|  | ||||
| export async function checkDatapack(rootDir: string, version: string, reportAll: boolean, verbose: boolean): Promise<void> { | ||||
|     action.startGroup("Initialization") | ||||
|     const service = new CustomService(rootDir, version, { | ||||
|         reportAllErrors: reportAll, | ||||
|         verbose: verbose | ||||
|     }) | ||||
|  | ||||
|     await service.project.ready() | ||||
|     action.endGroup() | ||||
|  | ||||
|     const success = await service.checkAllFiles() | ||||
|     if (!success) { | ||||
|         action.setFailed("Some files contain errors") | ||||
|     } | ||||
|      | ||||
|     await service.shutdown() | ||||
| } | ||||
							
								
								
									
										11
									
								
								src/index.ts
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								src/index.ts
									
									
									
									
									
								
							| @@ -3,12 +3,11 @@ import { checkDatapack } from "./check_datapack.js" | ||||
|  | ||||
| async function run(): Promise<void> { | ||||
|     try { | ||||
|         const rootDir = core.getInput("dir") | ||||
|         let version = core.getInput("version") | ||||
|         if (version === "") { | ||||
|             version = "auto" | ||||
|         } | ||||
|         await checkDatapack(rootDir, version) | ||||
|         const rootDir = core.getInput("rootDir") | ||||
|         const version = core.getInput("version") | ||||
|         const reportAll = core.getBooleanInput("reportAllErrors") | ||||
|         const verbose = core.getBooleanInput("verbose") | ||||
|         await checkDatapack(rootDir, version, reportAll, verbose) | ||||
|  | ||||
|     } catch (error) { | ||||
|         if (error instanceof Error) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user