Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e853490

Browse filesBrowse files
committed
Run build script
1 parent f4e5d39 commit e853490
Copy full SHA for e853490

File tree

1 file changed

+23
-1
lines changed
Filter options

1 file changed

+23
-1
lines changed

‎dist/index.js

Copy file name to clipboardExpand all lines: dist/index.js
+23-1Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6114,6 +6114,9 @@ var glob = __webpack_require__(90);
61146114
// EXTERNAL MODULE: ./node_modules/@actions/io/lib/io.js
61156115
var io = __webpack_require__(436);
61166116

6117+
// EXTERNAL MODULE: external "path"
6118+
var external_path_ = __webpack_require__(622);
6119+
61176120
// CONCATENATED MODULE: ./src/async-function.ts
61186121
const AsyncFunction = Object.getPrototypeOf(async () => null).constructor;
61196122
function callAsyncFunction(args, source) {
@@ -6127,6 +6130,7 @@ function callAsyncFunction(args, source) {
61276130

61286131

61296132

6133+
61306134
process.on('unhandledRejection', handleError);
61316135
main().catch(handleError);
61326136
async function main() {
@@ -6144,7 +6148,14 @@ async function main() {
61446148
const github = Object(lib_github.getOctokit)(token, opts);
61456149
const script = Object(core.getInput)('script', { required: true });
61466150
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
6147-
const result = await callAsyncFunction({ require: require, github, context: lib_github.context, core: core, glob: glob, io: io }, script);
6151+
const result = await callAsyncFunction({
6152+
require: wrapRequire,
6153+
github,
6154+
context: lib_github.context,
6155+
core: core,
6156+
glob: glob,
6157+
io: io
6158+
}, script);
61486159
let encoding = Object(core.getInput)('result-encoding');
61496160
encoding = encoding ? encoding : 'json';
61506161
let output;
@@ -6160,6 +6171,17 @@ async function main() {
61606171
}
61616172
Object(core.setOutput)('result', output);
61626173
}
6174+
const wrapRequire = new Proxy(require, {
6175+
apply: (target, thisArg, [moduleID]) => {
6176+
if (moduleID.startsWith('.')) {
6177+
moduleID = Object(external_path_.join)(process.cwd(), moduleID);
6178+
}
6179+
return target.apply(thisArg, [moduleID]);
6180+
},
6181+
get: (target, prop, receiver) => {
6182+
Reflect.get(target, prop, receiver);
6183+
}
6184+
});
61636185
// eslint-disable-next-line @typescript-eslint/no-explicit-any
61646186
function handleError(err) {
61656187
console.error(err);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.