Skip to content

Commit 5d879b6

Browse files
committed
Revert changes to tsc/ncc
1 parent 9a58186 commit 5d879b6

File tree

4 files changed

+91
-95
lines changed

4 files changed

+91
-95
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
.DS_Store
2-
node_modules/
3-
lib/
1+
node_modules

dist/index.js

Lines changed: 89 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module.exports =
3434
/******/ // the startup function
3535
/******/ function startup() {
3636
/******/ // Load entry module and return exports
37-
/******/ return __webpack_require__(605);
37+
/******/ return __webpack_require__(833);
3838
/******/ };
3939
/******/ // initialize runtime
4040
/******/ runtime(__webpack_require__);
@@ -1453,7 +1453,7 @@ module.exports = require("child_process");
14531453

14541454
var net = __webpack_require__(631);
14551455
var tls = __webpack_require__(16);
1456-
var http = __webpack_require__(876);
1456+
var http = __webpack_require__(605);
14571457
var https = __webpack_require__(211);
14581458
var events = __webpack_require__(614);
14591459
var assert = __webpack_require__(357);
@@ -1866,25 +1866,6 @@ module.exports = opts => {
18661866
};
18671867

18681868

1869-
/***/ }),
1870-
1871-
/***/ 169:
1872-
/***/ (function(module) {
1873-
1874-
function webpackEmptyContext(req) {
1875-
if (typeof req === 'number' && __webpack_require__.m[req])
1876-
return __webpack_require__(req);
1877-
try { return require(req) }
1878-
catch (e) { if (e.code !== 'MODULE_NOT_FOUND') throw e }
1879-
var e = new Error("Cannot find module '" + req + "'");
1880-
e.code = 'MODULE_NOT_FOUND';
1881-
throw e;
1882-
}
1883-
webpackEmptyContext.keys = function() { return []; };
1884-
webpackEmptyContext.resolve = webpackEmptyContext;
1885-
module.exports = webpackEmptyContext;
1886-
webpackEmptyContext.id = 169;
1887-
18881869
/***/ }),
18891870

18901871
/***/ 190:
@@ -5187,7 +5168,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
51875168
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
51885169

51895170
var Stream = _interopDefault(__webpack_require__(413));
5190-
var http = _interopDefault(__webpack_require__(876));
5171+
var http = _interopDefault(__webpack_require__(605));
51915172
var Url = _interopDefault(__webpack_require__(835));
51925173
var https = _interopDefault(__webpack_require__(211));
51935174
var zlib = _interopDefault(__webpack_require__(761));
@@ -7604,7 +7585,7 @@ function hasFirstPage (link) {
76047585

76057586
Object.defineProperty(exports, "__esModule", { value: true });
76067587
const url = __webpack_require__(835);
7607-
const http = __webpack_require__(876);
7588+
const http = __webpack_require__(605);
76087589
const https = __webpack_require__(211);
76097590
const pm = __webpack_require__(950);
76107591
let tunnel;
@@ -8336,71 +8317,9 @@ function getPageLinks (link) {
83368317
/***/ }),
83378318

83388319
/***/ 605:
8339-
/***/ (function(__unusedmodule, __webpack_exports__, __webpack_require__) {
8340-
8341-
"use strict";
8342-
__webpack_require__.r(__webpack_exports__);
8343-
8344-
// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js
8345-
var core = __webpack_require__(470);
8346-
8347-
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
8348-
var lib_github = __webpack_require__(469);
8349-
8350-
// CONCATENATED MODULE: ./lib/async-function.js
8351-
const AsyncFunction = Object.getPrototypeOf(async () => { }).constructor;
8352-
function callAsyncFunction(args, source) {
8353-
const fn = new AsyncFunction(...Object.keys(args), source);
8354-
return fn(...Object.values(args));
8355-
}
8356-
8357-
// CONCATENATED MODULE: ./lib/main.js
8358-
8359-
8360-
8361-
process.on('unhandledRejection', handleError);
8362-
main().catch(handleError);
8363-
async function main() {
8364-
const token = Object(core.getInput)('github-token', { required: true });
8365-
const debug = Object(core.getInput)('debug');
8366-
const userAgent = Object(core.getInput)('user-agent');
8367-
const previews = Object(core.getInput)('previews');
8368-
const opts = {};
8369-
if (debug === 'true')
8370-
opts.log = console;
8371-
if (userAgent != null)
8372-
opts.userAgent = userAgent;
8373-
if (previews != null)
8374-
opts.previews = previews.split(',');
8375-
const github = new lib_github.GitHub(token, opts);
8376-
const script = Object(core.getInput)('script', { required: true });
8377-
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilatin errors.
8378-
const result = await callAsyncFunction({ require: __webpack_require__(169), github, context: lib_github.context, core: core }, script);
8379-
let encoding = Object(core.getInput)('result-encoding');
8380-
encoding = encoding ? encoding : 'json';
8381-
let output;
8382-
switch (encoding) {
8383-
case 'json':
8384-
output = JSON.stringify(result);
8385-
break;
8386-
case 'string':
8387-
output = String(result);
8388-
break;
8389-
default:
8390-
throw new Error('"result-encoding" must be either "string" or "json"');
8391-
}
8392-
Object(core.setOutput)('result', output);
8393-
}
8394-
function handleError(err) {
8395-
console.error(err);
8396-
if (err && err.message) {
8397-
Object(core.setFailed)(err.message);
8398-
}
8399-
else {
8400-
Object(core.setFailed)(`Unhandled error: ${err}`);
8401-
}
8402-
}
8320+
/***/ (function(module) {
84038321

8322+
module.exports = require("http");
84048323

84058324
/***/ }),
84068325

@@ -9340,6 +9259,75 @@ function sync (path, options) {
93409259
}
93419260

93429261

9262+
/***/ }),
9263+
9264+
/***/ 833:
9265+
/***/ (function(__unusedmodule, __webpack_exports__, __webpack_require__) {
9266+
9267+
"use strict";
9268+
__webpack_require__.r(__webpack_exports__);
9269+
9270+
// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js
9271+
var core = __webpack_require__(470);
9272+
9273+
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
9274+
var lib_github = __webpack_require__(469);
9275+
9276+
// CONCATENATED MODULE: ./src/async-function.ts
9277+
const AsyncFunction = Object.getPrototypeOf(async () => { }).constructor;
9278+
function callAsyncFunction(args, source) {
9279+
const fn = new AsyncFunction(...Object.keys(args), source);
9280+
return fn(...Object.values(args));
9281+
}
9282+
9283+
// CONCATENATED MODULE: ./src/main.ts
9284+
9285+
9286+
9287+
process.on('unhandledRejection', handleError);
9288+
main().catch(handleError);
9289+
async function main() {
9290+
const token = Object(core.getInput)('github-token', { required: true });
9291+
const debug = Object(core.getInput)('debug');
9292+
const userAgent = Object(core.getInput)('user-agent');
9293+
const previews = Object(core.getInput)('previews');
9294+
const opts = {};
9295+
if (debug === 'true')
9296+
opts.log = console;
9297+
if (userAgent != null)
9298+
opts.userAgent = userAgent;
9299+
if (previews != null)
9300+
opts.previews = previews.split(',');
9301+
const github = new lib_github.GitHub(token, opts);
9302+
const script = Object(core.getInput)('script', { required: true });
9303+
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilatin errors.
9304+
const result = await callAsyncFunction({ require: __webpack_require__(875), github, context: lib_github.context, core: core }, script);
9305+
let encoding = Object(core.getInput)('result-encoding');
9306+
encoding = encoding ? encoding : 'json';
9307+
let output;
9308+
switch (encoding) {
9309+
case 'json':
9310+
output = JSON.stringify(result);
9311+
break;
9312+
case 'string':
9313+
output = String(result);
9314+
break;
9315+
default:
9316+
throw new Error('"result-encoding" must be either "string" or "json"');
9317+
}
9318+
Object(core.setOutput)('result', output);
9319+
}
9320+
function handleError(err) {
9321+
console.error(err);
9322+
if (err && err.message) {
9323+
Object(core.setFailed)(err.message);
9324+
}
9325+
else {
9326+
Object(core.setFailed)(`Unhandled error: ${err}`);
9327+
}
9328+
}
9329+
9330+
93439331
/***/ }),
93449332

93459333
/***/ 835:
@@ -23621,10 +23609,22 @@ module.exports = function (str) {
2362123609

2362223610
/***/ }),
2362323611

23624-
/***/ 876:
23612+
/***/ 875:
2362523613
/***/ (function(module) {
2362623614

23627-
module.exports = require("http");
23615+
function webpackEmptyContext(req) {
23616+
if (typeof req === 'number' && __webpack_require__.m[req])
23617+
return __webpack_require__(req);
23618+
try { return require(req) }
23619+
catch (e) { if (e.code !== 'MODULE_NOT_FOUND') throw e }
23620+
var e = new Error("Cannot find module '" + req + "'");
23621+
e.code = 'MODULE_NOT_FOUND';
23622+
throw e;
23623+
}
23624+
webpackEmptyContext.keys = function() { return []; };
23625+
webpackEmptyContext.resolve = webpackEmptyContext;
23626+
module.exports = webpackEmptyContext;
23627+
webpackEmptyContext.id = 875;
2362823628

2362923629
/***/ }),
2363023630

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"main": "dist/index.js",
3838
"private": true,
3939
"scripts": {
40-
"build": "tsc && ncc build lib/main.js",
40+
"build": "ncc build src/main.ts",
4141
"test": "jest"
4242
}
4343
}

tsconfig.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
"compilerOptions": {
33
"target": "es2018",
44
"moduleResolution": "node",
5-
"outDir": "./lib", /* Redirect output structure to the directory. */
6-
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
75
"strict": true,
86
"forceConsistentCasingInFileNames": true
97
},

0 commit comments

Comments
 (0)