Compare commits
5 Commits
568e5abbc3
...
v1.1.3
Author | SHA1 | Date | |
---|---|---|---|
dcaa4a7365
|
|||
3e48f9c97c
|
|||
8402546cf8
|
|||
423f014219
|
|||
e57810d9d3
|
10
action.yml
10
action.yml
@@ -15,7 +15,15 @@ inputs:
|
||||
description: The Minecraft version to use. If not specified or set to 'auto', will try to use the version indicated in `pack.mcmeta`
|
||||
required: false
|
||||
default: 'auto'
|
||||
reportAllErrors:
|
||||
description: Whether to report all errors or only the first one
|
||||
required: false
|
||||
default: 'false'
|
||||
verbose:
|
||||
description: Whether to provide details on errors or just the number of errors
|
||||
required: false
|
||||
default: 'false'
|
||||
|
||||
runs:
|
||||
using: 'node24'
|
||||
using: 'node20'
|
||||
main: 'dist/index.js'
|
||||
|
17
dist/143.index.js
vendored
Normal file
17
dist/143.index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
17
dist/379.index.js
vendored
Normal file
17
dist/379.index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
17
dist/576.index.js
vendored
Normal file
17
dist/576.index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
17
dist/611.index.js
vendored
Normal file
17
dist/611.index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
17
dist/694.index.js
vendored
Normal file
17
dist/694.index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
17
dist/699.index.js
vendored
Normal file
17
dist/699.index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
17
dist/766.index.js
vendored
Normal file
17
dist/766.index.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
export const id = 766;
|
||||
export const ids = [766];
|
||||
export const modules = {
|
||||
|
||||
/***/ 1766:
|
||||
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"boolean":"un booleano","code-action.block-state-sort-keys":"Ordina stato blocco","code-action.fix-file":"Aggiusta tutti i problemi auto-aggiustabili in questo file","code-action.fix-workspace":"Aggiusta tutti i problemi auto-aggiustabili nel spazio di lavoro","code-action.id-attribute-datafix":"Aggiorna il nome di questo attributo a 1.16","code-action.id-complete-default-namespace":"Completa il namespace predefinito","code-action.id-omit-default-namespace":"Ommetti il namespace predefinito","code-action.id-zombified-piglin-datafix":"Cambia questo ID a quello di un Piglin Zombificato","code-action.nbt-compound-sort-keys":"Ordina i tag NBT composti","code-action.nbt-type-to-byte":"Converti in un tag NBT di byte","code-action.nbt-type-to-double":"Converti in un tag NBT double","code-action.nbt-type-to-float":"Converti in un tag NBT float","code-action.nbt-type-to-int":"Converti in un tag NBT int","code-action.nbt-type-to-long":"Converti in un tag NBT long","code-action.nbt-type-to-short":"Converti in un tag NBT short","code-action.nbt-uuid-datafix":"Aggiorna questo UUID a 1.16","code-action.selector-sort-keys":"Ordina gli argomenti di selettore","code-action.string-double-quote":"Quota questa stringa con doppie virgolette","code-action.string-single-quote":"Quota questa stringa con singole virgolette","code-action.string-unquote":"De-quota questa stringa","code-action.vector-align-0.0":"Allinea questo vettore all'origine del blocco","code-action.vector-align-0.5":"Allinea questo vettore al centro del blocco","conjunction.and_2":"e ","conjunction.and_3+_1":",","conjunction.and_3+_2":", e","conjunction.or_2":"o","conjunction.or_3+_1":",","conjunction.or_3+_2":", o","duplicate-key":"Chiave duplicate %0%","ending-quote":"quotazione finale %0%","entity":"un'entità","expected":"Previsto %0%","expected-got":"Aspettato %0% ma ricevuto %1%","integer":"un numero intero","integer.between":"un numero intero da %0% a %1%","key-not-following-convention":"Chiave invalida %0% che non segue il convegno %1%","long":"un long","mcfunction.parser.leading-slash.unexpected":"Barra '/' inaspettata","not-matching-any-child":"Fallito a combaciare con qualsiasi figli nell'albero del sintassi del commando","nothing":"niente","number":"un numero","number-range":"un intervallo di numeri","number-range.missing-min-and-max":"Aspettato un valore minimo o massimo","number.<=":"un numero meno o uguale a %0%","number.>=":"un numero maggiore o uguale a %0%","number.between":"un numero da %0% a %1%","objective":"un oggettivo","punc.period":".","punc.quote":"'%0%'","quote":"una quotazione ('\"o\"')","score-holder":"un contenitore di punteggio","server.new-version":"Il Server di Linguaggio Datapack é stato aggiornato a una nuova versione: %0%","server.remove-cache-file":"Il file del cache di DHP è stato spostato in un luogo in memoria da VSCose. Ora puoi tranquillamente cancellare il brutto file '.datapack' nel tuo spazio di lavoro.","server.show-release-notes":"Mostra appunti di pubblicazione","string":"uno string","tag":"un tag","team":"una squadra","time-unit":"un unità di tempo","too-many-block-affected":"Troppi blocchi nell'area (massimo: %0%, specificati: %1%)","unexpected-character":"Trovati caratteri che non sono da a-z, da 0-9 o [/._-]","unexpected-datapack-tag":"I tag non sono permessi qui","unexpected-default-namespace":"Namespace predefinito dovrebbe essere ommesso qui","unexpected-local-coordinate":"La coordinata locale %0% non è permessa","unexpected-nbt":"Questo tag non esiste qui","unexpected-nbt-array-type":"Tipo di array invalido %0%. Deve essere un tipo 'B', 'I' o 'L'","unexpected-nbt-path-filter":"Filtri composti sono esclusivamente usati per i tag composti","unexpected-nbt-path-index":"Gli indici sono solo usati per le liste, gli tag e gli array","unexpected-nbt-path-key":"Le chiavi sono solo usati per i tag composti","unexpected-nbt-path-sub":"Il tag corrente non ha elementi extra","unexpected-omitted-default-namespace":"Il namespace predefinito non può essere omesso qui","unexpected-relative-coordinate":"Coordinata %0% non è permessa","unexpected-scoreboard-sub-slot":"Solo il 'sidebar' ha sub-posti","unknown-command":"Commando sconosciuto","unknown-key":"Chiave sconisciuta","unquoted-string":"una stringa non quotata","unsorted-keys":"Chiavi non ordinati","uuid":"un UUID","vector":"Un vettore"});
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
17
dist/944.index.js
vendored
Normal file
17
dist/944.index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
26
dist/check_datapack.d.ts
vendored
26
dist/check_datapack.d.ts
vendored
@@ -1 +1,25 @@
|
||||
export declare function checkDatapack(rootDir: String, version: String): Promise<void>;
|
||||
import * as core from '@spyglassmc/core';
|
||||
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;
|
||||
}
|
||||
export declare class CustomService extends core.Service {
|
||||
rootDir: string;
|
||||
options: ActionOptions;
|
||||
constructor(rootDir: string, version: string, options: ActionOptions);
|
||||
shutdown(): Promise<void>;
|
||||
private listFilesByExtension;
|
||||
private makeFileUrl;
|
||||
private getFileContent;
|
||||
private getLineAndColumn;
|
||||
private getErrorProperties;
|
||||
checkFile(path: string, lang: string): Promise<boolean>;
|
||||
checkAllFiles(): Promise<boolean>;
|
||||
}
|
||||
export declare function checkDatapack(rootDir: string, version: string, reportAll: boolean, verbose: boolean): Promise<void>;
|
||||
|
2
dist/check_datapack.d.ts.map
vendored
2
dist/check_datapack.d.ts.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/louis/Documents/spyglassmc-action/src/check_datapack.ts"],"names":[],"mappings":"AAAA,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnF"}
|
||||
{"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"}
|
60241
dist/index.js
vendored
60241
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "spyglassmc-action",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.0",
|
||||
"description": "Check your Minecraft datapack for syntax or schema errors using SpyglassMC",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@@ -166,7 +166,7 @@ export class CustomService extends core.Service {
|
||||
)
|
||||
let success = true
|
||||
for (const jsonFile of jsonFiles) {
|
||||
if (!this.checkFile(jsonFile, "json")) {
|
||||
if (!(await this.checkFile(jsonFile, "json"))) {
|
||||
success = false
|
||||
if (!this.options.reportAllErrors) {
|
||||
return false
|
||||
@@ -174,7 +174,7 @@ export class CustomService extends core.Service {
|
||||
}
|
||||
}
|
||||
for (const funcFile of funcFiles) {
|
||||
if (!this.checkFile(funcFile, "mcfunction")) {
|
||||
if (!(await this.checkFile(funcFile, "mcfunction"))) {
|
||||
success = false
|
||||
if (!this.options.reportAllErrors) {
|
||||
return false
|
||||
|
Reference in New Issue
Block a user