refactor: Use node protocol when importing builtins

This commit is contained in:
Joachim Van Herwegen
2023-10-30 15:53:29 +01:00
parent def0b5c732
commit 990184dbb5
127 changed files with 170 additions and 172 deletions

View File

@@ -1,8 +1,8 @@
import { readFileSync } from 'fs';
import type { Server } from 'http';
import { createServer as createHttpServer } from 'http';
import type { ServerOptions } from 'https';
import { createServer as createHttpsServer } from 'https';
import { readFileSync } from 'node:fs';
import type { Server } from 'node:http';
import { createServer as createHttpServer } from 'node:http';
import type { ServerOptions } from 'node:https';
import { createServer as createHttpsServer } from 'node:https';
import { getLoggerFor } from '../logging/LogUtil';
import type { HttpServerFactory } from './HttpServerFactory';
import type { ServerConfigurator } from './ServerConfigurator';

View File

@@ -1,4 +1,4 @@
import type { IncomingMessage, Server, ServerResponse } from 'http';
import type { IncomingMessage, Server, ServerResponse } from 'node:http';
import { getLoggerFor } from '../logging/LogUtil';
import { isError } from '../util/errors/ErrorUtil';
import { guardStream } from '../util/GuardedStream';

View File

@@ -1,4 +1,4 @@
import type { IncomingMessage } from 'http';
import type { IncomingMessage } from 'node:http';
import type { Guarded } from '../util/GuardedStream';
/**

View File

@@ -1,4 +1,4 @@
import type { ServerResponse } from 'http';
import type { ServerResponse } from 'node:http';
/**
* An outgoing HTTP response;

View File

@@ -1,5 +1,5 @@
import type { Server } from 'http';
import { Server as HttpsServer } from 'https';
import type { Server } from 'node:http';
import { Server as HttpsServer } from 'node:https';
/**
* Returns `true` if the server is an HTTPS server.

View File

@@ -1,4 +1,4 @@
import type { Server } from 'http';
import type { Server } from 'node:http';
import { AsyncHandler } from '../util/handlers/AsyncHandler';
/**

View File

@@ -1,5 +1,5 @@
import type { IncomingMessage, Server } from 'http';
import type { Socket } from 'net';
import type { IncomingMessage, Server } from 'node:http';
import type { Socket } from 'node:net';
import type { WebSocket } from 'ws';
import { WebSocketServer } from 'ws';
import { getLoggerFor } from '../logging/LogUtil';

View File

@@ -1,4 +1,4 @@
import { createReadStream } from 'fs';
import { createReadStream } from 'node:fs';
import escapeStringRegexp from 'escape-string-regexp';
import * as mime from 'mime-types';
import { getLoggerFor } from '../../logging/LogUtil';

View File

@@ -1,4 +1,4 @@
import { Readable } from 'stream';
import { Readable } from 'node:stream';
import { KeysRdfParseJsonLd } from '@comunica/context-entries';
import { parse, toSeconds } from 'iso8601-duration';
import { DataFactory } from 'n3';

View File

@@ -1,4 +1,4 @@
import type { IncomingMessage } from 'http';
import type { IncomingMessage } from 'node:http';
import { BadRequestHttpError } from '../../../util/errors/BadRequestHttpError';
/**