Sha256: 7cfc39a9fd7739a7d652d466b86a6f4c70eccc63a4784b76f980c4b57a3da441

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

(function(program, execJS) { (function() {execJS(program) }).call({}); })(async function(self, global, process, module, exports, require, console, setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, clearImmediate) { #{source}
}, async function(program) {
  // Force BunJS to use sloppy mode see https://github.com/oven-sh/bun/issues/4527#issuecomment-1709520894
  exports.abc = function(){}
  var __process__ = process;
  var printFinal = function(string) {
    Bun.write(Bun.stdout, '' + string).then(function() {
      __process__.exit(0);
    });
  };
  try {
    delete this.process;
    delete this.console;
    result = await program();
    process = __process__;
    if (typeof result == 'undefined' && result !== null) {
      printFinal('["ok"]');
    } else {
      try {
        printFinal(JSON.stringify(['ok', result]));
      } catch (err) {
        printFinal(JSON.stringify(['err', '' + err, err.stack]));
      }
    }
  } catch (err) {
    process = __process__;
    printFinal(JSON.stringify(['err', '' + err, err.stack]));
  }
});

Version data entries

3 entries across 2 versions & 2 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/execjs-2.10.0/lib/execjs/support/bun_runner.js
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/execjs-2.10.0/lib/execjs/support/bun_runner.js
execjs-2.10.0 lib/execjs/support/bun_runner.js