@@ -6114,6 +6114,9 @@ var glob = __webpack_require__(90);
6114
6114
// EXTERNAL MODULE: ./node_modules/@actions /io/lib/io.js
6115
6115
var io = __webpack_require__ ( 436 ) ;
6116
6116
6117
+ // EXTERNAL MODULE: external "path"
6118
+ var external_path_ = __webpack_require__ ( 622 ) ;
6119
+
6117
6120
// CONCATENATED MODULE: ./src/async-function.ts
6118
6121
const AsyncFunction = Object . getPrototypeOf ( async ( ) => null ) . constructor ;
6119
6122
function callAsyncFunction ( args , source ) {
@@ -6127,6 +6130,7 @@ function callAsyncFunction(args, source) {
6127
6130
6128
6131
6129
6132
6133
+
6130
6134
process . on ( 'unhandledRejection' , handleError ) ;
6131
6135
main ( ) . catch ( handleError ) ;
6132
6136
async function main ( ) {
@@ -6144,7 +6148,14 @@ async function main() {
6144
6148
const github = Object ( lib_github . getOctokit ) ( token , opts ) ;
6145
6149
const script = Object ( core . getInput ) ( 'script' , { required : true } ) ;
6146
6150
// 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 ) ;
6148
6159
let encoding = Object ( core . getInput ) ( 'result-encoding' ) ;
6149
6160
encoding = encoding ? encoding : 'json' ;
6150
6161
let output ;
@@ -6160,6 +6171,17 @@ async function main() {
6160
6171
}
6161
6172
Object ( core . setOutput ) ( 'result' , output ) ;
6162
6173
}
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
+ } ) ;
6163
6185
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6164
6186
function handleError ( err ) {
6165
6187
console . error ( err ) ;
0 commit comments