diff --git a/action.yml b/action.yml index f979eb7..673cb1f 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ name: "AHK Neptun check" description: "Checks if neptun.txt exists and contains a Neptun code string" runs: - using: "node12" + using: "node16" main: "dist/index.js" diff --git a/dist/index.js b/dist/index.js index 24d3d96..5b10076 100644 --- a/dist/index.js +++ b/dist/index.js @@ -147,22 +147,22 @@ function run() { } function getNeptunCode() { if (!fs.existsSync("neptun.txt")) { - throw new Error("Hiba: neptun.txt nem talalhato. Error: neptun.txt does not exist"); + throw new Error("Hiba: neptun.txt nem talalhato. Error: neptun.txt does not exist."); } const neptunLines = fs .readFileSync("neptun.txt", "utf-8") .split("\n") .filter(Boolean); if (neptunLines.length == 0) { - throw new Error("Hiba: neptun.txt ures. Error: neptun.txt is empty"); + throw new Error("Hiba: neptun.txt ures. Error: neptun.txt is empty."); } const neptun = neptunLines[0].trim(); if (neptun.length == 0) { - throw new Error("Hiba: neptun.txt ures. Error: neptun.txt is empty"); + throw new Error("Hiba: neptun.txt ures. Error: neptun.txt is empty."); } const regex = /^[a-zA-Z0-9]{6}$/g; if (!regex.test(neptun)) { - throw new Error("Hiba: neptun.txt ervenytelen neptun kodot tartalmaz. Error: neptun.txt contains an invalid neptun code"); + throw new Error("Hiba: neptun.txt ervenytelen neptun kodot tartalmaz. Error: neptun.txt contains an invalid neptun code."); } return neptun.toUpperCase(); } diff --git a/package.json b/package.json index 7a8e500..2d04ec2 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/akosdudas/ahk-action-neptun-check.git" + "url": "git+https://github.com/bmeaut/ahk-action-neptuncheck.git" }, "keywords": [ "actions" diff --git a/src/main.ts b/src/main.ts index e07cc25..9206161 100644 --- a/src/main.ts +++ b/src/main.ts @@ -12,7 +12,7 @@ async function run() { function getNeptunCode(): string { if (!fs.existsSync("neptun.txt")) { throw new Error( - "Hiba: neptun.txt nem talalhato. Error: neptun.txt does not exist" + "Hiba: neptun.txt nem talalhato. Error: neptun.txt does not exist." ); } @@ -22,18 +22,18 @@ async function run() { .filter(Boolean); if (neptunLines.length == 0) { - throw new Error("Hiba: neptun.txt ures. Error: neptun.txt is empty"); + throw new Error("Hiba: neptun.txt ures. Error: neptun.txt is empty."); } const neptun = neptunLines[0].trim(); if (neptun.length == 0) { - throw new Error("Hiba: neptun.txt ures. Error: neptun.txt is empty"); + throw new Error("Hiba: neptun.txt ures. Error: neptun.txt is empty."); } const regex = /^[a-zA-Z0-9]{6}$/g; if (!regex.test(neptun)) { throw new Error( - "Hiba: neptun.txt ervenytelen neptun kodot tartalmaz. Error: neptun.txt contains an invalid neptun code" + "Hiba: neptun.txt ervenytelen neptun kodot tartalmaz. Error: neptun.txt contains an invalid neptun code." ); }