From cc05814c244e71ddb0868f3f2c24c5dce032b1d9 Mon Sep 17 00:00:00 2001 From: zizifn <1803942+zizifn@users.noreply.github.com> Date: Tue, 6 Dec 2022 00:00:20 +0800 Subject: [PATCH] add support for http --- .gitignore | 2 + README.md | 2 + apps/deno-bypass/src/bypass.ts | 43 +-------- .../deno-bypass/src/{ => test}/bypass copy.ts | 0 apps/deno-bypass/src/{ => test}/bypass2.ts | 26 +++-- apps/edge-bypass-client/src/main.ts | 80 +++++++--------- apps/edge-bypass-client/src/proxy.js | 88 ----------------- .../src/{ => test}/main copy 2.ts | 2 +- .../src/{ => test}/main copy 3.ts | 0 .../src/{ => test}/main copy 4.ts | 2 +- .../src/{ => test}/test.mjs | 0 apps/edge-bypass-client/tsconfig.json | 3 +- libs/test/.babelrc | 3 + libs/test/.eslintrc.json | 18 ++++ libs/test/README.md | 11 +++ libs/test/jest.config.ts | 16 ++++ libs/test/node.mjs | 95 +++++++++++++++++++ libs/test/project.json | 24 +++++ libs/test/src/index.ts | 1 + libs/test/src/lib/test.spec.ts | 7 ++ libs/test/src/lib/test.ts | 3 + libs/test/tsconfig.json | 13 +++ libs/test/tsconfig.lib.json | 11 +++ libs/test/tsconfig.spec.json | 20 ++++ tsconfig.base.json | 4 +- 25 files changed, 279 insertions(+), 195 deletions(-) rename apps/deno-bypass/src/{ => test}/bypass copy.ts (100%) rename apps/deno-bypass/src/{ => test}/bypass2.ts (68%) delete mode 100644 apps/edge-bypass-client/src/proxy.js rename apps/edge-bypass-client/src/{ => test}/main copy 2.ts (98%) rename apps/edge-bypass-client/src/{ => test}/main copy 3.ts (100%) rename apps/edge-bypass-client/src/{ => test}/main copy 4.ts (98%) rename apps/edge-bypass-client/src/{ => test}/test.mjs (100%) create mode 100644 libs/test/.babelrc create mode 100644 libs/test/.eslintrc.json create mode 100644 libs/test/README.md create mode 100644 libs/test/jest.config.ts create mode 100644 libs/test/node.mjs create mode 100644 libs/test/project.json create mode 100644 libs/test/src/index.ts create mode 100644 libs/test/src/lib/test.spec.ts create mode 100644 libs/test/src/lib/test.ts create mode 100644 libs/test/tsconfig.json create mode 100644 libs/test/tsconfig.lib.json create mode 100644 libs/test/tsconfig.spec.json diff --git a/.gitignore b/.gitignore index 206f98b..82a8368 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,5 @@ Thumbs.db ## **/config-local.json + +**/.env diff --git a/README.md b/README.md index aa1ae0e..42b2790 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ **v2ray-heroku 由于 heroku 取消免费,项目已经死了。 这是新的项目。** > 项目正在开发,基本可用,会有 bug。。 +> **请定期按照 github 的提示,同步 code 到自己的项目**。 +> ![sync](./doc/sync.jpg) > 本项目纯属技术性验证,探索最新的 web standard。不给予任何保证。请大家酌情使用。如果有兴趣想一起进行技术探讨可以联系我。💕 diff --git a/apps/deno-bypass/src/bypass.ts b/apps/deno-bypass/src/bypass.ts index 7975845..22d89bf 100644 --- a/apps/deno-bypass/src/bypass.ts +++ b/apps/deno-bypass/src/bypass.ts @@ -1,5 +1,4 @@ import { serve } from 'https://deno.land/std@0.167.0/http/server.ts'; - const userID = Deno.env.get('UUID'); const handler = async (request: Request): Promise => { @@ -35,47 +34,9 @@ ${userID ? 'has UUID env' : 'no UUID env'} hostname: serverAddress, }); - // connection.write( - // new TextEncoder().encode('GET http://www.baidu.com/ HTTP/1.1\r\n') - // ); - // connection.write(new TextEncoder().encode('Host: www.baidu.com\r\n\r\n')); - // connection.close(); - - // GET / HTTP/1.1 - // Host: www.baidu.com - // User-Agent: curl/7.83.1 - // Accept: */* - // const body2 = new ReadableStream({ - // start(controller) { - // controller.enqueue(new TextEncoder().encode('GET / HTTP/1.1\r\n')); - // controller.enqueue(new TextEncoder().encode('Host: www.baidu.com\r\n')); - // controller.enqueue( - // new TextEncoder().encode('User-Agent: curl/7.83.1\r\n') - // ); - // controller.enqueue(new TextEncoder().encode('Accept: */*\r\n\r\n')); - // // controller.close(); - // }, - // cancel() {}, - // }); - - // for await (const chunk of body2) { - // connection.write(chunk); - // } + // request.body readablestream end casue socket to be end, this will casue socket send FIN package early + // and casue deno can't get TCP pcakge. const proxyResp = request.body?.pipeThrough(connection); - // const proxyResp = request.body - // ?.pipeThrough( - // new TransformStream({ - // async transform(chunk, controller) { - // console.log('transform'); - // controller.enqueue(chunk); - // }, - // async flush(controller) { - // console.log('flush'); - // return new Promise((res) => setTimeout(res, 1000)); - // }, - // }) - // ) - // .pipeThrough(connection); return new Response(proxyResp, { status: 200, headers: {}, diff --git a/apps/deno-bypass/src/bypass copy.ts b/apps/deno-bypass/src/test/bypass copy.ts similarity index 100% rename from apps/deno-bypass/src/bypass copy.ts rename to apps/deno-bypass/src/test/bypass copy.ts diff --git a/apps/deno-bypass/src/bypass2.ts b/apps/deno-bypass/src/test/bypass2.ts similarity index 68% rename from apps/deno-bypass/src/bypass2.ts rename to apps/deno-bypass/src/test/bypass2.ts index 71f16ac..3791756 100644 --- a/apps/deno-bypass/src/bypass2.ts +++ b/apps/deno-bypass/src/test/bypass2.ts @@ -1,15 +1,12 @@ import { serve } from 'https://deno.land/std@0.167.0/http/server.ts'; +console.log('Current Deno version', Deno.version.deno); + const handler = async (request: Request): Promise => { const connection = await Deno.connect({ port: 80, - hostname: 'www.baidcu.com', + hostname: 'www.baidu.com', }); - - // GET / HTTP/1.1 - // Host: www.baidu.com - // User-Agent: curl/7.83.1 - // Accept: */* const body2 = new ReadableStream({ start(controller) { controller.enqueue(new TextEncoder().encode('GET / HTTP/1.1\r\n')); @@ -18,23 +15,24 @@ const handler = async (request: Request): Promise => { new TextEncoder().encode('User-Agent: curl/7.83.1\r\n') ); controller.enqueue(new TextEncoder().encode('Accept: */*\r\n\r\n')); - controller.close(); // 注释这个就好用 + controller.close(); }, cancel() {}, }); - // 或者不用 pipeThrough, 直接write // for await (const chunk of body2) { - // connection.write(chunk); + // console.log('11'); // } - // const proxyResp = connection.readable; - - // ----------- const proxyResp = body2?.pipeThrough(connection); - return new Response(proxyResp, { + for await (const chunk of proxyResp) { + console.log('11'); + } + return new Response('111', { status: 200, - headers: {}, + headers: { + 'x-ray': 'xxxx', + }, }); }; diff --git a/apps/edge-bypass-client/src/main.ts b/apps/edge-bypass-client/src/main.ts index e6688d8..95cb8c7 100644 --- a/apps/edge-bypass-client/src/main.ts +++ b/apps/edge-bypass-client/src/main.ts @@ -19,19 +19,6 @@ const httpProxyServer = createServer(async (req, resp) => { `Client Connected To Proxy, client http version is ${req.httpVersion}, ${clientSocketLoggerInfo}}` ); - const raws = rawHTTPPackage(req); - const readableStream = new Readable({ - async read() { - const { value, done } = await raws.next(); - if (!done) { - this.push(value); - } - }, - destroy() { - this.push(null); - }, - }); - // make call to edge http server // 1. forward all package remote, socket over http body const { body, headers, statusCode, trailers } = await undici.request( @@ -44,39 +31,30 @@ const httpProxyServer = createServer(async (req, resp) => { // "Content-Type": "text/plain", }, method: 'POST', - // body: Readable.from(rawHTTPPackage(req)), - body: readableStream, - - // body: rawHTTPHeader(req), - // body: req, + body: Readable.from(concatStreams([rawHTTPPackage(req), req.socket])), } ); - // for await (const item of rawHTTPPackage(req)) { - // myReadable.push(item); - // } - // console.log(headers, statusCode); - // for await (let chunk of body) { - // console.log(chunk.toString()); - // } + console.log(`${clientSocketLoggerInfo} remote server return ${statusCode}`); // 2. forward remote reponse body to clientSocket - - pipeline(body, resp, (error) => { - console.log( - `${clientSocketLoggerInfo} remote server to clientSocket has error: ` + - error - ); - resp.destroy(); - }); + for await (const chunk of body) { + req.socket.write(chunk); + } body.on('error', (err) => { - console.log('body error', err); - }); - body.on('data', () => { - if (!readableStream.closed) { - readableStream.push(null); - } + console.log(`${clientSocketLoggerInfo} body error`, err); }); + // issue with pipeline + // https://stackoverflow.com/questions/55959479/error-err-stream-premature-close-premature-close-in-node-pipeline-stream + // pipeline(body, req.socket, (error) => { + // console.log( + // `${clientSocketLoggerInfo} remote server to clientSocket has error: ` + + // error + // ); + // req.socket.end(); + // req.socket.destroy(); + // }); } catch (error) { - resp.destroy(); + req.socket.end(); + req.socket.destroy(); console.log('${clientSocketLogger} has error ', error); } }); @@ -96,7 +74,6 @@ httpProxyServer.on('connect', async (req, clientSocket, head) => { `HTTP/${req.httpVersion} 200 Connection Established\r\n\r\n` ); - console.log(config); // make call to edge http server // 1. forward all package remote, socket over http body const { body, headers, statusCode, trailers } = await undici.request( @@ -114,14 +91,21 @@ httpProxyServer.on('connect', async (req, clientSocket, head) => { ); console.log(`${clientSocketLoggerInfo} remote server return ${statusCode}`); // 2. forward remote reponse body to clientSocket - pipeline(body, clientSocket, (error) => { - console.log( - `${clientSocketLoggerInfo} remote server to clientSocket has error: `, - error - ); - body?.destroy(); - clientSocket.destroy(); + // 2. forward remote reponse body to clientSocket + for await (const chunk of body) { + clientSocket.write(chunk); + } + body.on('error', (err) => { + console.log(`${clientSocketLoggerInfo} body error`, err); }); + // pipeline(body, clientSocket, (error) => { + // console.log( + // `${clientSocketLoggerInfo} remote server to clientSocket has error: `, + // error + // ); + // body?.destroy(); + // clientSocket.destroy(); + // }); clientSocket.on('error', (e) => { body?.destroy(); clientSocket.destroy(); diff --git a/apps/edge-bypass-client/src/proxy.js b/apps/edge-bypass-client/src/proxy.js deleted file mode 100644 index 12f6ff3..0000000 --- a/apps/edge-bypass-client/src/proxy.js +++ /dev/null @@ -1,88 +0,0 @@ -var net = require('net'); -var http = require('http'); -var url = require('url'); - -var proxyServer = http.createServer(httpOptions); - -// handle http proxy requests -function httpOptions(clientReq, clientRes) { - var reqUrl = url.parse(clientReq.url); - console.log(reqUrl); - console.log('proxy for http request: ' + reqUrl.href); - - var options = { - hostname: reqUrl.hostname, - port: reqUrl.port, - path: reqUrl.path, - method: clientReq.method, - headers: clientReq.headers, - }; - - // create socket connection on behalf of client, then pipe the response to client response (pass it on) - var serverConnection = http.request(options, function (res) { - clientRes.writeHead(res.statusCode, res.headers); - res.pipe(clientRes); - }); - - clientReq.pipe(serverConnection); - - clientReq.on('error', (e) => { - console.log('client socket error: ' + e); - }); - - serverConnection.on('error', (e) => { - console.log('server connection error: ' + e); - }); -} - -// handle https proxy requests (CONNECT method) -proxyServer.on('connect', (clientReq, clientSocket, head) => { - var reqUrl = url.parse('https://' + clientReq.url); - console.log( - 'proxy for https request: ' + reqUrl.href + '(path encrypted by ssl)' - ); - - var options = { - port: reqUrl.port, - host: reqUrl.hostname, - }; - - // create socket connection for client, then pipe (redirect) it to client socket - var serverSocket = net.connect(options, () => { - clientSocket.write( - 'HTTP/' + - clientReq.httpVersion + - ' 200 Connection Established\r\n' + - 'Proxy-agent: Node.js-Proxy\r\n' + - '\r\n', - 'UTF-8', - () => { - // creating pipes in both ends - serverSocket.write(head); - serverSocket.pipe(clientSocket); - clientSocket.pipe(serverSocket); - } - ); - }); - - clientSocket.on('error', (e) => { - console.log('client socket error: ' + e); - serverSocket.end(); - }); - - serverSocket.on('error', (e) => { - console.log('forward proxy server connection error: ' + e); - clientSocket.end(); - }); -}); - -proxyServer.on('clientError', (err, clientSocket) => { - console.log('client error: ' + err); - clientSocket.end('HTTP/1.1 400 Bad Request\r\n\r\n'); -}); - -proxyServer.listen(2560); - -console.log('forward proxy server started, listening on port 2560'); - -module.exports = proxyServer; diff --git a/apps/edge-bypass-client/src/main copy 2.ts b/apps/edge-bypass-client/src/test/main copy 2.ts similarity index 98% rename from apps/edge-bypass-client/src/main copy 2.ts rename to apps/edge-bypass-client/src/test/main copy 2.ts index 163adcd..805a926 100644 --- a/apps/edge-bypass-client/src/main copy 2.ts +++ b/apps/edge-bypass-client/src/test/main copy 2.ts @@ -7,7 +7,7 @@ import { writeFileSync, existsSync, readFileSync } from 'fs'; import { exit } from 'node:process'; import * as url from 'node:url'; import * as undici from 'undici'; -import { concatStreams } from './lib/helper'; +import { concatStreams } from '../lib/helper'; let config: { port: string; diff --git a/apps/edge-bypass-client/src/main copy 3.ts b/apps/edge-bypass-client/src/test/main copy 3.ts similarity index 100% rename from apps/edge-bypass-client/src/main copy 3.ts rename to apps/edge-bypass-client/src/test/main copy 3.ts diff --git a/apps/edge-bypass-client/src/main copy 4.ts b/apps/edge-bypass-client/src/test/main copy 4.ts similarity index 98% rename from apps/edge-bypass-client/src/main copy 4.ts rename to apps/edge-bypass-client/src/test/main copy 4.ts index d5d82a4..ab7c1f7 100644 --- a/apps/edge-bypass-client/src/main copy 4.ts +++ b/apps/edge-bypass-client/src/test/main copy 4.ts @@ -7,7 +7,7 @@ import { writeFileSync, existsSync, readFileSync } from 'fs'; import { exit } from 'node:process'; import * as url from 'node:url'; import * as undici from 'undici'; -import { concatStreams } from './lib/helper'; + import * as http from 'node:http'; let config: { diff --git a/apps/edge-bypass-client/src/test.mjs b/apps/edge-bypass-client/src/test/test.mjs similarity index 100% rename from apps/edge-bypass-client/src/test.mjs rename to apps/edge-bypass-client/src/test/test.mjs diff --git a/apps/edge-bypass-client/tsconfig.json b/apps/edge-bypass-client/tsconfig.json index d1f57ac..8d6770a 100644 --- a/apps/edge-bypass-client/tsconfig.json +++ b/apps/edge-bypass-client/tsconfig.json @@ -13,5 +13,6 @@ { "path": "./tsconfig.spec.json" } - ] + ], + "exclude": ["**test/*.ts"] } diff --git a/libs/test/.babelrc b/libs/test/.babelrc new file mode 100644 index 0000000..cf7ddd9 --- /dev/null +++ b/libs/test/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]] +} diff --git a/libs/test/.eslintrc.json b/libs/test/.eslintrc.json new file mode 100644 index 0000000..9d9c0db --- /dev/null +++ b/libs/test/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/libs/test/README.md b/libs/test/README.md new file mode 100644 index 0000000..ac7f664 --- /dev/null +++ b/libs/test/README.md @@ -0,0 +1,11 @@ +# test + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test test` to execute the unit tests via [Jest](https://jestjs.io). + +## Running lint + +Run `nx lint test` to execute the lint via [ESLint](https://eslint.org/). diff --git a/libs/test/jest.config.ts b/libs/test/jest.config.ts new file mode 100644 index 0000000..b8170d2 --- /dev/null +++ b/libs/test/jest.config.ts @@ -0,0 +1,16 @@ +/* eslint-disable */ +export default { + displayName: 'test', + preset: '../../jest.preset.js', + globals: { + 'ts-jest': { + tsconfig: '/tsconfig.spec.json', + }, + }, + testEnvironment: 'node', + transform: { + '^.+\\.[tj]sx?$': 'ts-jest', + }, + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], + coverageDirectory: '../../coverage/libs/test', +}; diff --git a/libs/test/node.mjs b/libs/test/node.mjs new file mode 100644 index 0000000..d6f0ed1 --- /dev/null +++ b/libs/test/node.mjs @@ -0,0 +1,95 @@ +import { createServer } from 'node:http'; +import { connect } from 'node:net'; +import { Readable, Duplex, Writable } from 'node:stream'; +import { ReadableStream, WritableStream } from 'node:stream/web'; + +const httpServer = createServer(async (req, resp) => { + // const rawHttp = new ReadableStream({ + // start(controller) { + // controller.enqueue(new TextEncoder().encode('GET / HTTP/1.1\r\n')); + // controller.enqueue(new TextEncoder().encode('Host: www.baidu.com\r\n')); + // controller.enqueue( + // new TextEncoder().encode('User-Agent: curl/7.83.1\r\n') + // ); + // controller.enqueue(new TextEncoder().encode('Accept: */*\r\n\r\n')); + // controller.close(); + // }, + // cancel() {}, + // }); + // async function* resposne() { + // for await (const chunk of [ + // 'GET / HTTP/1.1\r\n', + // 'Host: www.baidu.com\r\n', + // 'User-Agent: curl/7.83.1\r\n', + // 'Accept: */*\r\n\r\n', + // ]) { + // yield chunk; + // } + // } + // const buffer = resposne(); + // const rawHttp = new Readable({ + // async read() { + // console.log('pull----'); + // const { value, done } = await buffer.next(); + // if (!done) { + // this.push(value); + // } + // }, + // }); + const rawHttp = Readable.from([ + 'GET / HTTP/1.1\r\n', + 'Host: www.baidu.com\r\n', + 'User-Agent: curl/7.83.1\r\n\r\n', + ]); + // rawHttp.p; + // rawHttp.push('Accept: */*\r\n\r\n'); + rawHttp.on('end', () => { + console.log('rawHttp--end-----'); + }); + const socket = connect( + { + port: 80, + host: 'www.baidu.com', + }, + () => { + console.log('connected'); + resp.writeHead(200); + rawHttp.pipe(socket).pipe(resp); + } + ); + + // .pipe(resp) + // .on('close', () => { + // console.log('--close-----'); + // }); +}); + +httpServer.listen('8888', () => { + console.log('Server runnig at http://localhost:8888'); +}); + +// const httpServer = createServer(async (req, resp) => { +// const rawHttp = new ReadableStream({ +// start(controller) { +// controller.enqueue(new TextEncoder().encode('GET / HTTP/1.1\r\n')); +// controller.enqueue(new TextEncoder().encode('Host: www.baidu.com\r\n')); +// controller.enqueue( +// new TextEncoder().encode('User-Agent: curl/7.83.1\r\n') +// ); +// controller.enqueue(new TextEncoder().encode('Accept: */*\r\n\r\n')); +// controller.close(); +// }, +// cancel() {}, +// }); +// const socket = connect({ +// port: 80, +// host: 'www.baidu.com', +// }); +// resp.writeHead(200); +// const webStreamSocket = rawHttp.pipeThrough(Duplex.toWeb(socket)); +// Readable.fromWeb(webStreamSocket).pipe(resp); +// }); + +// httpServer.listen('8888', () => { +// console.log('Server runnig at http://localhost:8888'); +// }); diff --git a/libs/test/project.json b/libs/test/project.json new file mode 100644 index 0000000..c4db54a --- /dev/null +++ b/libs/test/project.json @@ -0,0 +1,24 @@ +{ + "name": "test", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/test/src", + "projectType": "library", + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["libs/test/**/*.ts"] + } + }, + "test": { + "executor": "@nrwl/jest:jest", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "jestConfig": "libs/test/jest.config.ts", + "passWithNoTests": true + } + } + }, + "tags": [] +} diff --git a/libs/test/src/index.ts b/libs/test/src/index.ts new file mode 100644 index 0000000..cf8a97c --- /dev/null +++ b/libs/test/src/index.ts @@ -0,0 +1 @@ +export * from './lib/test'; diff --git a/libs/test/src/lib/test.spec.ts b/libs/test/src/lib/test.spec.ts new file mode 100644 index 0000000..2c4f9f0 --- /dev/null +++ b/libs/test/src/lib/test.spec.ts @@ -0,0 +1,7 @@ +import { test } from './test'; + +describe('test', () => { + it('should work', () => { + expect(test()).toEqual('test'); + }); +}); diff --git a/libs/test/src/lib/test.ts b/libs/test/src/lib/test.ts new file mode 100644 index 0000000..16ef145 --- /dev/null +++ b/libs/test/src/lib/test.ts @@ -0,0 +1,3 @@ +export function test(): string { + return 'test'; +} diff --git a/libs/test/tsconfig.json b/libs/test/tsconfig.json new file mode 100644 index 0000000..62ebbd9 --- /dev/null +++ b/libs/test/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/libs/test/tsconfig.lib.json b/libs/test/tsconfig.lib.json new file mode 100644 index 0000000..0e2a172 --- /dev/null +++ b/libs/test/tsconfig.lib.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "../../dist/out-tsc", + "declaration": true, + "types": ["node"] + }, + "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"], + "include": ["**/*.ts"] +} diff --git a/libs/test/tsconfig.spec.json b/libs/test/tsconfig.spec.json new file mode 100644 index 0000000..ff08add --- /dev/null +++ b/libs/test/tsconfig.spec.json @@ -0,0 +1,20 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "**/*.test.ts", + "**/*.spec.ts", + "**/*.test.tsx", + "**/*.spec.tsx", + "**/*.test.js", + "**/*.spec.js", + "**/*.test.jsx", + "**/*.spec.jsx", + "**/*.d.ts" + ] +} diff --git a/tsconfig.base.json b/tsconfig.base.json index 11253ac..3511cdf 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -14,7 +14,9 @@ "skipLibCheck": true, "skipDefaultLibCheck": true, "baseUrl": ".", - "paths": {} + "paths": { + "@edge-bypass/test": ["libs/test/src/index.ts"] + } }, "exclude": ["node_modules", "tmp"] }