From 47a6b397d9dab822b2b1252cbd135ab85fcf6a87 Mon Sep 17 00:00:00 2001 From: olemorud Date: Tue, 14 Mar 2023 14:48:49 +0100 Subject: [PATCH] npm init --- .gitignore | 1 + package-lock.json | 77 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 25 +++++++++++++++ src/index.js | 5 ++- 4 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..40b878d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..c37c2bb --- /dev/null +++ b/package-lock.json @@ -0,0 +1,77 @@ +{ + "name": "gcc-problem-matcher", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "gcc-problem-matcher", + "version": "1.0.0", + "dependencies": { + "@actions/core": "^1.10.0" + } + }, + "node_modules/@actions/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", + "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@actions/http-client": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz", + "integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==", + "dependencies": { + "tunnel": "^0.0.6" + } + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + } + }, + "dependencies": { + "@actions/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", + "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", + "requires": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "@actions/http-client": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz", + "integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==", + "requires": { + "tunnel": "^0.0.6" + } + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..41aa07e --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "gcc-problem-matcher", + "version": "1.0.0", + "description": "Creates annotations for warnings and errors in gcc builds.", + "main": "index.js", + "directories": { + "test": "test" + }, + "scripts": { + "test": "node --test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/olemorud/gcc-problem-matcher.git" + }, + "keywords": [], + "author": "", + "bugs": { + "url": "https://github.com/olemorud/gcc-problem-matcher/issues" + }, + "homepage": "https://github.com/olemorud/gcc-problem-matcher#readme", + "dependencies": { + "@actions/core": "^1.10.0" + } +} diff --git a/src/index.js b/src/index.js index 6045738..590e694 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,6 @@ const path = require('path'); const fs = require('node:fs'); -//const core = require('@actions/core'); +const core = require('@actions/core'); // C:\Users\ => C\:\\Users\\ const escapeRegExp = (s) => @@ -13,8 +13,7 @@ const variable = (key) => // default value set in /action.yml -// const root = core.getInput('root', { required: false }); -root = '/tmp/workspace'; +const root = core.getInput('root', { required: false }); const templatePath = path.join(__dirname, "gcc_matcher.jsontemplate");