Fix for polyfill modules

This commit is contained in:
Zack Rauen 2023-05-19 19:38:26 -04:00
parent 9bbf318a86
commit a9d6d6ad11
4 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import * as https from "https";
const methods = ["get", "put", "post", "delete"];
const methods = ["get", "put", "post", "delete", "head"];
const redirectCodes = new Set([301, 302, 307, 308]);
const headersToClone = ["statusCode", "statusMessage", "url", "headers", "method", "aborted", "complete", "rawHeaders", "end"];

View File

@ -179,6 +179,8 @@ export default {
rmSync,
rmdir,
rmdirSync,
stat,
statSync,
unlink,
unlinkSync,
watch,

View File

@ -1,10 +1,10 @@
import EventEmitter from "@common/events";
import Module from "./module";
import * as vm from "./vm";
import * as fs from "./fs";
import vm from "./vm";
import fs from "./fs";
import request from "./request";
import * as https from "./https";
import https from "./https";
import Buffer from "./buffer";
import crypto from "./crypto";
import Remote from "./remote";

View File

@ -7,4 +7,6 @@ export const compileFunction = function(code, params = [], options = {}) {
const syntaxError = new SyntaxError(returned.message);
syntaxError.stack = returned.stack;
throw syntaxError;
};
};
export default {compileFunction};