Fix for polyfill modules
This commit is contained in:
parent
9bbf318a86
commit
a9d6d6ad11
|
@ -1,6 +1,6 @@
|
||||||
import * as https from "https";
|
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 redirectCodes = new Set([301, 302, 307, 308]);
|
||||||
const headersToClone = ["statusCode", "statusMessage", "url", "headers", "method", "aborted", "complete", "rawHeaders", "end"];
|
const headersToClone = ["statusCode", "statusMessage", "url", "headers", "method", "aborted", "complete", "rawHeaders", "end"];
|
||||||
|
|
||||||
|
|
|
@ -179,6 +179,8 @@ export default {
|
||||||
rmSync,
|
rmSync,
|
||||||
rmdir,
|
rmdir,
|
||||||
rmdirSync,
|
rmdirSync,
|
||||||
|
stat,
|
||||||
|
statSync,
|
||||||
unlink,
|
unlink,
|
||||||
unlinkSync,
|
unlinkSync,
|
||||||
watch,
|
watch,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import EventEmitter from "@common/events";
|
import EventEmitter from "@common/events";
|
||||||
|
|
||||||
import Module from "./module";
|
import Module from "./module";
|
||||||
import * as vm from "./vm";
|
import vm from "./vm";
|
||||||
import * as fs from "./fs";
|
import fs from "./fs";
|
||||||
import request from "./request";
|
import request from "./request";
|
||||||
import * as https from "./https";
|
import https from "./https";
|
||||||
import Buffer from "./buffer";
|
import Buffer from "./buffer";
|
||||||
import crypto from "./crypto";
|
import crypto from "./crypto";
|
||||||
import Remote from "./remote";
|
import Remote from "./remote";
|
||||||
|
|
|
@ -7,4 +7,6 @@ export const compileFunction = function(code, params = [], options = {}) {
|
||||||
const syntaxError = new SyntaxError(returned.message);
|
const syntaxError = new SyntaxError(returned.message);
|
||||||
syntaxError.stack = returned.stack;
|
syntaxError.stack = returned.stack;
|
||||||
throw syntaxError;
|
throw syntaxError;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default {compileFunction};
|
Loading…
Reference in New Issue