Skip to content

Commit bb8e97f

Browse files
committed
chore: bump dependencies
1 parent 70d4f52 commit bb8e97f

File tree

5 files changed

+1341
-986
lines changed

5 files changed

+1341
-986
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"root": true,
33
"extends": [
4-
"nodecraft"
4+
"@nodecraft"
55
],
66
"plugins": [
77
"json",

dist/index.js

Lines changed: 53 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,14 @@ const require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
1212

1313
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
1414

15-
function createCommonjsModule(fn, basedir, module) {
16-
return module = {
17-
path: basedir,
18-
exports: {},
19-
require: function (path, base) {
20-
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
21-
}
22-
}, fn(module, module.exports), module.exports;
23-
}
24-
25-
function commonjsRequire () {
26-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
15+
function createCommonjsModule(fn) {
16+
var module = { exports: {} };
17+
return fn(module, module.exports), module.exports;
2718
}
2819

29-
var utils = createCommonjsModule(function (module, exports) {
3020
// We use any as a valid input type
3121
/* eslint-disable @typescript-eslint/no-explicit-any */
32-
Object.defineProperty(exports, "__esModule", { value: true });
22+
3323
/**
3424
* Sanitizes an input into a string so it can be passed into issueCommand safely
3525
* @param input input to sanitize into a string
@@ -43,20 +33,22 @@ function toCommandValue(input) {
4333
}
4434
return JSON.stringify(input);
4535
}
46-
exports.toCommandValue = toCommandValue;
36+
var toCommandValue_1 = toCommandValue;
4737

48-
});
4938

50-
var command = createCommonjsModule(function (module, exports) {
51-
var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
39+
var utils = /*#__PURE__*/Object.defineProperty({
40+
toCommandValue: toCommandValue_1
41+
}, '__esModule', {value: true});
42+
43+
var __importStar$1 = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
5244
if (mod && mod.__esModule) return mod;
5345
var result = {};
5446
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
5547
result["default"] = mod;
5648
return result;
5749
};
58-
Object.defineProperty(exports, "__esModule", { value: true });
59-
const os = __importStar(require$$0__default['default']);
50+
51+
const os$1 = __importStar$1(require$$0__default['default']);
6052

6153
/**
6254
* Commands
@@ -68,15 +60,15 @@ const os = __importStar(require$$0__default['default']);
6860
* ::warning::This is the message
6961
* ::set-env name=MY_VAR::some value
7062
*/
71-
function issueCommand(command, properties, message) {
63+
function issueCommand$2(command, properties, message) {
7264
const cmd = new Command(command, properties, message);
73-
process.stdout.write(cmd.toString() + os.EOL);
65+
process.stdout.write(cmd.toString() + os$1.EOL);
7466
}
75-
exports.issueCommand = issueCommand;
67+
var issueCommand_1$1 = issueCommand$2;
7668
function issue(name, message = '') {
77-
issueCommand(name, {}, message);
69+
issueCommand$2(name, {}, message);
7870
}
79-
exports.issue = issue;
71+
var issue_1 = issue;
8072
const CMD_STRING = '::';
8173
class Command {
8274
constructor(command, properties, message) {
@@ -126,9 +118,12 @@ function escapeProperty(s) {
126118
.replace(/,/g, '%2C');
127119
}
128120

129-
});
130121

131-
var fileCommand = createCommonjsModule(function (module, exports) {
122+
var command = /*#__PURE__*/Object.defineProperty({
123+
issueCommand: issueCommand_1$1,
124+
issue: issue_1
125+
}, '__esModule', {value: true});
126+
132127
// For internal use, subject to change.
133128
var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
134129
if (mod && mod.__esModule) return mod;
@@ -137,27 +132,30 @@ var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (
137132
result["default"] = mod;
138133
return result;
139134
};
140-
Object.defineProperty(exports, "__esModule", { value: true });
135+
141136
// We use any as a valid input type
142137
/* eslint-disable @typescript-eslint/no-explicit-any */
143-
const fs = __importStar(require$$0__default$1['default']);
138+
const fs$1 = __importStar(require$$0__default$1['default']);
144139
const os = __importStar(require$$0__default['default']);
145140

146-
function issueCommand(command, message) {
141+
function issueCommand$1(command, message) {
147142
const filePath = process.env[`GITHUB_${command}`];
148143
if (!filePath) {
149144
throw new Error(`Unable to find environment variable for file command ${command}`);
150145
}
151-
if (!fs.existsSync(filePath)) {
146+
if (!fs$1.existsSync(filePath)) {
152147
throw new Error(`Missing file at path: ${filePath}`);
153148
}
154-
fs.appendFileSync(filePath, `${utils.toCommandValue(message)}${os.EOL}`, {
149+
fs$1.appendFileSync(filePath, `${utils.toCommandValue(message)}${os.EOL}`, {
155150
encoding: 'utf8'
156151
});
157152
}
158-
exports.issueCommand = issueCommand;
153+
var issueCommand_1 = issueCommand$1;
159154

160-
});
155+
156+
var fileCommand = /*#__PURE__*/Object.defineProperty({
157+
issueCommand: issueCommand_1
158+
}, '__esModule', {value: true});
161159

162160
var core = createCommonjsModule(function (module, exports) {
163161
var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
@@ -396,7 +394,7 @@ function getState(name) {
396394
return process.env[`STATE_${name}`] || '';
397395
}
398396
exports.getState = getState;
399-
397+
//# sourceMappingURL=core.js.map
400398
});
401399

402400
const fs = require$$0__default$1['default'].promises;
@@ -405,30 +403,28 @@ const {getInput, setFailed} = core;
405403
const {issueCommand} = command;
406404

407405
async function run(){
408-
try{
409-
const action = getInput("action");
410-
const matcherFile = require$$1__default['default'].join(__dirname, "../", ".github", "problem-matcher.json");
411-
switch(action){
412-
case "add":
413-
issueCommand("add-matcher", {}, matcherFile);
414-
break;
415-
case "remove":{
416-
const fileContents = await fs.readFile(matcherFile, {encoding: "utf8"});
417-
const problemMatcherDocument = JSON.parse(fileContents);
418-
const problemMatcher = problemMatcherDocument.problemMatcher[0];
419-
issueCommand("remove-matcher", {
420-
owner: problemMatcher.owner
421-
}, "");
422-
}
423-
break;
424-
default:
425-
throw Error(`Unsupported action "${action}"`);
406+
const action = getInput("action");
407+
const matcherFile = require$$1__default['default'].join(__dirname, "../", ".github", "problem-matcher.json");
408+
switch(action){
409+
case "add":
410+
issueCommand("add-matcher", {}, matcherFile);
411+
break;
412+
case "remove":{
413+
const fileContents = await fs.readFile(matcherFile, {encoding: "utf8"});
414+
const problemMatcherDocument = JSON.parse(fileContents);
415+
const problemMatcher = problemMatcherDocument.problemMatcher[0];
416+
issueCommand("remove-matcher", {
417+
owner: problemMatcher.owner
418+
}, "");
426419
}
427-
}catch(error){
428-
setFailed(error.message);
429-
throw error;
420+
break;
421+
default:
422+
throw new Error(`Unsupported action "${action}"`);
430423
}
431424
}
432-
run();
425+
run().catch((error) => {
426+
console.error(error);
427+
setFailed(error.message);
428+
});
433429

434430
module.exports = run;

0 commit comments

Comments
 (0)