!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/pmb/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/utils/   drwxr-xr-x
Free 13.3 GB of 57.97 GB (22.94%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     makeRefreshRuntimeModule.js (3.23 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
const { getRefreshGlobalScope } = require('../globals');
const getRefreshGlobal = require('./getRefreshGlobal');

/**
 * Makes a runtime module to intercept module execution for React Refresh.
 * @param {import('webpack')} webpack The Webpack exports.
 * @returns {ReactRefreshRuntimeModule} The runtime module class.
 */
function makeRefreshRuntimeModule(webpack) {
  return class ReactRefreshRuntimeModule extends webpack.RuntimeModule {
    constructor() {
      // Second argument is the `stage` for this runtime module -
      // we'll use the same stage as Webpack's HMR runtime module for safety.
      super('react refresh', webpack.RuntimeModule.STAGE_BASIC);
    }

    /**
     * @returns {string} runtime code
     */
    generate() {
      const { runtimeTemplate } = this.compilation;
      const refreshGlobal = getRefreshGlobalScope(webpack.RuntimeGlobals);
      return webpack.Template.asString([
        `${webpack.RuntimeGlobals.interceptModuleExecution}.push(${runtimeTemplate.basicFunction(
          'options',
          [
            `${
              runtimeTemplate.supportsConst() ? 'const' : 'var'
            } originalFactory = options.factory;`,
            `options.factory = function (moduleObject, moduleExports, webpackRequire) {`,
            webpack.Template.indent([
              `${refreshGlobal}.setup(options.id);`,
              'try {',
              webpack.Template.indent(
                'originalFactory.call(this, moduleObject, moduleExports, webpackRequire);'
              ),
              '} finally {',
              webpack.Template.indent([
                `if (typeof Promise !== 'undefined' && moduleObject.exports instanceof Promise) {`,
                webpack.Template.indent([
                  // The exports of the module are re-assigned -
                  // this ensures anything coming after us would wait for `cleanup` to fire.
                  // This is particularly important because `cleanup` restores the refresh global,
                  // maintaining consistency for mutable variables like `moduleId`.
                  // This `.then` clause is a ponyfill of the `Promise.finally` API -
                  // it is only part of the spec after ES2018,
                  // but Webpack's top level await implementation support engines down to ES2015.
                  'options.module.exports = options.module.exports.then(',
                  webpack.Template.indent([
                    `${runtimeTemplate.basicFunction('result', [
                      `${refreshGlobal}.cleanup(options.id);`,
                      'return result;',
                    ])},`,
                    runtimeTemplate.basicFunction('reason', [
                      `${refreshGlobal}.cleanup(options.id);`,
                      'return Promise.reject(reason);',
                    ]),
                  ]),
                  `);`,
                ]),
                '} else {',
                webpack.Template.indent(`${refreshGlobal}.cleanup(options.id)`),
                '}',
              ]),
              '}',
            ]),
            `};`,
          ]
        )})`,
        '',
        getRefreshGlobal(webpack.Template, webpack.RuntimeGlobals, runtimeTemplate),
      ]);
    }
  };
}

module.exports = makeRefreshRuntimeModule;

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0372 ]--