From 6abf126c2a7a451cded8c6b5e6ddf1b69c84055d Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Tue, 2 Feb 2021 19:05:46 +0800 Subject: chore: remove std directory (#9361) This removes the std folder from the tree. Various parts of the tests are pretty tightly dependent on std (47 direct imports and 75 indirect imports, not counting the cli tests that use them as fixtures) so I've added std as a submodule for now. --- std/http/testdata/% | 0 std/http/testdata/file_server_as_library.ts | 12 ------------ std/http/testdata/hello.html | 0 std/http/testdata/simple_https_server.ts | 18 ------------------ std/http/testdata/simple_server.ts | 9 --------- std/http/testdata/test file.txt | 0 std/http/testdata/tls | 1 - 7 files changed, 40 deletions(-) delete mode 100644 std/http/testdata/% delete mode 100644 std/http/testdata/file_server_as_library.ts delete mode 100644 std/http/testdata/hello.html delete mode 100644 std/http/testdata/simple_https_server.ts delete mode 100644 std/http/testdata/simple_server.ts delete mode 100644 std/http/testdata/test file.txt delete mode 120000 std/http/testdata/tls (limited to 'std/http/testdata') diff --git a/std/http/testdata/% b/std/http/testdata/% deleted file mode 100644 index e69de29bb..000000000 diff --git a/std/http/testdata/file_server_as_library.ts b/std/http/testdata/file_server_as_library.ts deleted file mode 100644 index cd4bf68db..000000000 --- a/std/http/testdata/file_server_as_library.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { serve } from "../server.ts"; -import { serveFile } from "../file_server.ts"; - -const server = serve({ port: 8000 }); - -console.log("Server running..."); - -for await (const req of server) { - serveFile(req, "./testdata/hello.html").then((response) => { - req.respond(response); - }); -} diff --git a/std/http/testdata/hello.html b/std/http/testdata/hello.html deleted file mode 100644 index e69de29bb..000000000 diff --git a/std/http/testdata/simple_https_server.ts b/std/http/testdata/simple_https_server.ts deleted file mode 100644 index 84dfb39ab..000000000 --- a/std/http/testdata/simple_https_server.ts +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// This is an example of a https server -import { serveTLS } from "../server.ts"; - -const tlsOptions = { - hostname: "localhost", - port: 4503, - certFile: "./testdata/tls/localhost.crt", - keyFile: "./testdata/tls/localhost.key", -}; -const s = serveTLS(tlsOptions); -console.log( - `Simple HTTPS server listening on ${tlsOptions.hostname}:${tlsOptions.port}`, -); -const body = new TextEncoder().encode("Hello HTTPS"); -for await (const req of s) { - req.respond({ body }); -} diff --git a/std/http/testdata/simple_server.ts b/std/http/testdata/simple_server.ts deleted file mode 100644 index ff2a0b5ac..000000000 --- a/std/http/testdata/simple_server.ts +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// This is an example of a server that responds with an empty body -import { serve } from "../server.ts"; - -const addr = "0.0.0.0:4502"; -console.log(`Simple server listening on ${addr}`); -for await (const req of serve(addr)) { - req.respond({}); -} diff --git a/std/http/testdata/test file.txt b/std/http/testdata/test file.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/std/http/testdata/tls b/std/http/testdata/tls deleted file mode 120000 index f6fd22ed8..000000000 --- a/std/http/testdata/tls +++ /dev/null @@ -1 +0,0 @@ -../../../cli/tests/tls \ No newline at end of file -- cgit v1.2.3