1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

chore: add copyright (#7593)

This commit is contained in:
tokiedokie 2020-09-21 21:26:41 +09:00 committed by GitHub
parent dc6571909b
commit c4ed3fb7e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
117 changed files with 130 additions and 13 deletions

View file

@ -1,3 +1,5 @@
# Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
[workspace]
members = [
"cli",

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// Used for benchmarking Deno's networking.
// TODO Replace this with a real HTTP server once
// https://github.com/denoland/deno/issues/726 is completed.

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// Used for benchmarking Deno's tcp proxy performance.
const addr = Deno.args[0] || "127.0.0.1:4500";
const originAddr = Deno.args[1] || "127.0.0.1:4501";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
const net = require("net");
process.on("uncaughtException", function (error) {

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
pub fn gen(v: &[&[u8]]) -> String {
let mut ctx = ring::digest::Context::new(&ring::digest::SHA256);
for src in v {

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use crate::fs as deno_fs;
use crate::http_cache::url_to_filename;
use deno_core::url::{Host, Url};

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use crate::colors;
use deno_core::error::AnyError;
use futures::stream::StreamExt;

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use deno_core::url::Url;
use std::net::IpAddr;
use std::str::FromStr;

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use deno_core::error::AnyError;
use deno_core::url::Url;
use deno_core::ModuleSpecifier;

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use crate::colors;
use crate::global_state::GlobalState;
use crate::module_graph::{ModuleGraph, ModuleGraphFile, ModuleGraphLoader};

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use serde_json::json;
use std::collections::BTreeMap;
use std::io::Result;

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use super::dispatch_minimal::minimal_op;
use super::dispatch_minimal::MinimalOp;
use crate::http_util::HttpBody;

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use crate::ops::io::StreamResource;
use crate::ops::io::StreamResourceHolder;
use crate::ops::net::AcceptArgs;

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// Removes the `__proto__` for security reasons. This intentionally makes
// Deno non compliant with ECMA-262 Annex B.2.2.1
//

View file

@ -1,4 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use crate::global_state::GlobalState;
use crate::js;
use crate::ops;

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// This is not a real HTTP server. We read blindly one time into 'requestBuf',
// then write this fixed 'responseBuf'. The point of this benchmark is to
// exercise the event loop in a simple yet semi-realistic way.

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
#[macro_use]
extern crate log;

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// This is not a real HTTP server. We read blindly one time into 'requestBuf',
// then write this fixed 'responseBuf'. The point of this benchmark is to
// exercise the event loop in a simple yet semi-realistic way.

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
#[macro_use]
extern crate log;

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// Forked from Gotham:
// https://github.com/gotham-rs/gotham/blob/bcbbf8923789e341b7a0e62c59909428ca4e22e2/gotham/src/state/mod.rs
// Copyright 2017 Gotham Project Developers. MIT license.

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use crate::normalize_path;
use std::env::current_dir;
use std::error::Error;

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use std::path::Component;
use std::path::Path;
use std::path::PathBuf;

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use crate::bindings;
use rusty_v8 as v8;
use smallvec::SmallVec;

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assert, DenoStdInternalError } from "./assert.ts";
import { assertThrows } from "../testing/asserts.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
/**
* Tar test
*

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { pooledMap } from "./pool.ts";
import { assert } from "../testing/asserts.ts";

View file

@ -1 +1,2 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import "./mod.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import {
CallbackResult,
Rule,

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
export type Token = {
type: string;
value: string | number;

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
/** A default TextEncoder instance */
export const encoder = new TextEncoder();

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { listenAndServe } from "../../http/server.ts";
import {
acceptWebSocket,

View file

@ -1 +1,2 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
console.log("Welcome to Deno 🦕");

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { parse } from "../flags/mod.ts";
import { readStringDelim } from "../io/bufio.ts";

View file

@ -1 +1,2 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import "./mod.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import * as path from "../path/mod.ts";
/**

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import {
GlobOptions,
SEP_PATTERN,

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { decode } from "../encoding/utf8.ts";
import {
assert,

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { walk, walkSync, WalkOptions, WalkEntry } from "./walk.ts";
import { assert, assertEquals, assertThrowsAsync } from "../testing/asserts.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
/*
* [js-sha1]{@link https://github.com/emn178/js-sha1}
*

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
/*
* Adapted to deno from:
*

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
/*
* [js-sha512]{@link https://github.com/emn178/js-sha512}
*

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { BufReader, BufWriter } from "../io/bufio.ts";
import { TextProtoReader } from "../textproto/mod.ts";
import { assert } from "../_util/assert.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import {
assertThrowsAsync,
assertEquals,

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
/** Create dummy Deno.Conn object with given base properties */
export function mockConn(base: Partial<Deno.Conn> = {}): Deno.Conn {
return {

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
export * from "./cookie.ts";
export * from "./http_status.ts";
export * from "./server.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assert, assertEquals } from "../testing/asserts.ts";
import { BufReader, BufWriter } from "../io/bufio.ts";
import { TextProtoReader } from "../textproto/mod.ts";

View file

@ -1 +1,2 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import "./mod.ts";

View file

@ -1,4 +1,4 @@
// Ported to Deno from
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.// Ported to Deno from
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// Based on https://github.com/golang/go/blob/891682/src/bufio/bufio.go
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// Based on https://github.com/golang/go/blob/891682/src/bufio/bufio_test.go
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
export * from "./bufio.ts";
export * from "./ioutil.ts";
export * from "./readers.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assertEquals } from "../testing/asserts.ts";
import { LimitedReader, MultiReader, StringReader } from "./readers.ts";
import { StringWriter } from "./writers.ts";

View file

@ -1 +1,2 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import "./mod.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assertEquals } from "../testing/asserts.ts";
import { StringWriter } from "./writers.ts";
import { StringReader } from "./readers.ts";

View file

@ -1 +1,2 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
export * from "./multipart.ts";

View file

@ -1 +1,2 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import "./mod.ts";

View file

@ -1,5 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import type { CallbackWithError } from "./_fs_common.ts";
import { notImplemented } from "../_utils.ts";

View file

@ -1,5 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import type { CallbackWithError } from "./_fs_common.ts";
import { fromFileUrl } from "../path.ts";

View file

@ -1,5 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import type { CallbackWithError } from "./_fs_common.ts";
import { fromFileUrl } from "../path.ts";

View file

@ -1,5 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import type { CallbackWithError } from "./_fs_common.ts";
export function close(fd: number, callback: CallbackWithError): void {

View file

@ -1,5 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { notImplemented } from "../_utils.ts";
export type CallbackWithError = (err?: Error | null) => void;

View file

@ -1,5 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import type { CallbackWithError } from "./_fs_common.ts";
import { fromFileUrl } from "../path.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import Dirent from "./_fs_dirent.ts";
import { assert } from "../../_util/assert.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assert, assertEquals, fail } from "../../testing/asserts.ts";
import Dir from "./_fs_dir.ts";
import type Dirent from "./_fs_dirent.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { notImplemented } from "../_utils.ts";
export default class Dirent {

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assert, assertEquals, assertThrows } from "../../testing/asserts.ts";
import Dirent from "./_fs_dirent.ts";

View file

@ -1,5 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import type { CallbackWithError } from "./_fs_common.ts";
import { fromFileUrl } from "../path.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { readFile, readFileSync } from "./_fs_readFile.ts";
import * as path from "../../path/mod.ts";
import { assertEquals, assert } from "../../testing/asserts.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { readlink, readlinkSync } from "./_fs_readlink.ts";
import { assertEquals, assert } from "../../testing/asserts.ts";
import * as path from "../path.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { readFile } from "./_fs_readFile.ts";
import * as path from "../../../path/mod.ts";
import { assertEquals, assert } from "../../../testing/asserts.ts";

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
export function notImplemented(msg?: string): never {
const message = msg ? `Not implemented: ${msg}` : "Not implemented";
throw new Error(message);

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import {
assertEquals,
assertNotEquals,

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import {
assert as denoAssert,
assertEquals,

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { stripColor } from "../fmt/colors.ts";
import {
assert,

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import * as hex from "../encoding/hex.ts";
import * as base64 from "../encoding/base64.ts";
import { notImplemented, normalizeEncoding } from "./_utils.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assert, assertEquals, assertThrows } from "../testing/asserts.ts";
import Buffer from "./buffer.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import {
assert,
assertEquals,

View file

@ -1,5 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { access, accessSync } from "./_fs/_fs_access.ts";
import { appendFile, appendFileSync } from "./_fs/_fs_appendFile.ts";
import { chmod, chmodSync } from "./_fs/_fs_chmod.ts";

View file

@ -1,3 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
Object.defineProperty(globalThis, Symbol.toStringTag, {
value: "global",
writable: false,

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
/* eslint-disable @typescript-eslint/no-var-requires */
import {
assertEquals,

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assert, assertThrows, assertEquals } from "../testing/asserts.ts";
import * as os from "./os.ts";

View file

@ -1 +1,2 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
export * from "../path/mod.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { notImplemented } from "./_utils.ts";
/** https://nodejs.org/api/process.html#process_process_arch */

View file

@ -1,4 +1,5 @@
// deno-lint-ignore-file no-undef
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assert, assertThrows, assertEquals } from "../testing/asserts.ts";
import * as path from "../path/mod.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assertEquals } from "../testing/asserts.ts";
import { stringify, parse } from "./querystring.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assertEquals } from "../testing/asserts.ts";
import Buffer from "./buffer.ts";
import { StringDecoder } from "./string_decoder.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// TODO: implement the 'NodeJS.Timeout' and 'NodeJS.Immediate' versions of the timers.
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/1163ead296d84e7a3c80d71e7c81ecbd1a130e9a/types/node/v12/globals.d.ts#L1120-L1131
export const setTimeout = window.setTimeout;

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assertEquals } from "../testing/asserts.ts";
import * as url from "./url.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
export { promisify } from "./_util/_util_promisify.ts";
export { callbackify } from "./_util/_util_callbackify.ts";
import * as types from "./_util/_util_types.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assert, assertEquals } from "../testing/asserts.ts";
import { stripColor } from "../fmt/colors.ts";
import * as util from "./util.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
/** This module is browser compatible. */
/**

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assert, assertEquals } from "../testing/asserts.ts";
import {
GlobToRegExpOptions,

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assertEquals } from "../testing/asserts.ts";
import * as path from "./mod.ts";

View file

@ -1 +1,2 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import "./mod.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { MuxAsyncIterator } from "../async/mux_async_iterator.ts";
export type Disposable = { dispose: () => void };

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assertEquals, assertThrows } from "../testing/asserts.ts";
import { delay } from "../async/delay.ts";
import { signal, onSignal } from "./mod.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// https://deno.land/std/testing/bench.ts
import { BenchmarkTimer, bench, runBenchmarks } from "./bench.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import {
bench,
runBenchmarks,

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import diff from "./diff.ts";
import { assertEquals } from "../testing/asserts.ts";

View file

@ -1,3 +1,4 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// Based on https://github.com/golang/go/tree/master/src/net/textproto
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style

Some files were not shown because too many files have changed in this diff Show more