From 79d46bdad1ea8afb79716c119a003a9a86583839 Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Fri, 12 Sep 2025 02:11:03 +0200 Subject: [PATCH] chore: bump version --- README.md | 2 +- dist/check_datapack.d.ts | 2 +- dist/check_datapack.d.ts.map | 2 +- dist/index.js | 13 +++++++------ package.json | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 0beaa2d..a6e7f0f 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ jobs: uses: actions/checkout@v4 - name: Check syntax and schemas - uses: https://git.kb28.ch/HEL/spyglassmc-action@v1.1.3 + uses: https://git.kb28.ch/HEL/spyglassmc-action@v1.1.4 ``` ## Input parameters diff --git a/dist/check_datapack.d.ts b/dist/check_datapack.d.ts index 7a4df42..d5a34da 100644 --- a/dist/check_datapack.d.ts +++ b/dist/check_datapack.d.ts @@ -19,7 +19,7 @@ export declare class CustomService extends core.Service { private getFileContent; private getLineAndColumn; private getErrorProperties; - checkFile(path: string, lang: string): Promise; + checkFile(filePath: string, lang: string): Promise; checkAllFiles(): Promise; } export declare function checkDatapack(rootDir: string, version: string, reportAll: boolean, verbose: boolean): Promise; diff --git a/dist/check_datapack.d.ts.map b/dist/check_datapack.d.ts.map index 6afd80e..7c179c3 100644 --- a/dist/check_datapack.d.ts.map +++ b/dist/check_datapack.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"","sourceRoot":"","sources":["file:///home/louis/Documents/spyglassmc-action/src/check_datapack.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAA;AAQxC,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,eAAe,EAAE,OAAO,CAAA;IAExB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAA;CACnB;AAkBD,qBAAa,aAAc,SAAQ,IAAI,CAAC,OAAO;IAC3C,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,aAAa,CAAA;gBAEV,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAiD9D,QAAQ;IAMd,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,kBAAkB;IAUpB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IA+BvD,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;CA2B1C;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBzH"} \ No newline at end of file +{"version":3,"file":"","sourceRoot":"","sources":["file:///home/louis/Documents/spyglassmc-action/src/check_datapack.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAA;AAQxC,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,eAAe,EAAE,OAAO,CAAA;IAExB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAA;CACnB;AAkBD,qBAAa,aAAc,SAAQ,IAAI,CAAC,OAAO;IAC3C,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,aAAa,CAAA;gBAEV,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAiD9D,QAAQ;IAMd,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,kBAAkB;IAUpB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAgC3D,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;CA2B1C;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBzH"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index d31e066..f443051 100644 --- a/dist/index.js +++ b/dist/index.js @@ -87590,23 +87590,24 @@ class CustomService extends Service { endLine, endColumn }; } - async checkFile(path, lang) { - const url = this.makeFileUrl(path); - const content = this.getFileContent(path); + async checkFile(filePath, lang) { + const url = this.makeFileUrl(filePath); + const content = this.getFileContent(filePath); this.project.onDidOpen(url, lang, 0, content); const docAndNode = this.project.getClientManaged(url); if (!docAndNode) { - core.error(`File ${path} is not loaded`); + core.error(`File ${filePath} is not loaded`); return false; } const { node } = docAndNode; const errors = FileNode.getErrors(node); if (errors.length !== 0) { - const msg = `${errors.length} error${errors.length > 1 ? "s" : ""} in ${path}`; + const relPath = external_path_default().relative(this.rootDir, filePath); + const msg = `${errors.length} error${errors.length > 1 ? "s" : ""} in ${relPath}`; if (this.options.verbose) { core.startGroup(msg); for (const err of errors) { - core.error(err.message, this.getErrorProperties(err, path, content)); + core.error(err.message, this.getErrorProperties(err, filePath, content)); } core.endGroup(); } diff --git a/package.json b/package.json index c3473a7..3df3f62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spyglassmc-action", - "version": "1.1.0", + "version": "1.1.4", "description": "Check your Minecraft datapack for syntax or schema errors using SpyglassMC", "main": "index.js", "scripts": {