Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Commit

Permalink
Add short MIT license header to all source files (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMSmithCA committed Jan 22, 2018
1 parent a5a63f4 commit 20922fe
Show file tree
Hide file tree
Showing 24 changed files with 144 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/__tests__/app.node.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import test from 'tape-cup';
import App from '../index';
import {compose} from '../plugin/index.js';
Expand Down
6 changes: 6 additions & 0 deletions src/__tests__/index.browser.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import test from 'tape-cup';
import AppFactory from '../client';

Expand Down
6 changes: 6 additions & 0 deletions src/__tests__/index.node.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import test from 'tape-cup';
import App, {html} from '../index';
import {compose} from '../plugin/index.js';
Expand Down
6 changes: 6 additions & 0 deletions src/__tests__/sanitization.browser.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import test from 'tape-cup';
import {html, unescape} from '../sanitization';

Expand Down
6 changes: 6 additions & 0 deletions src/__tests__/sanitization.node.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import test from 'tape-cup';
import {
html,
Expand Down
6 changes: 6 additions & 0 deletions src/__tests__/simulate.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import test from 'tape-cup';
import ClientAppFactory from '../client';
import ServerAppFactory from '../server';
Expand Down
6 changes: 6 additions & 0 deletions src/__tests__/timing.node.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import tape from 'tape-cup';
import Timing from '../timing';

Expand Down
6 changes: 6 additions & 0 deletions src/__tests__/virtual.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import {
assetUrl,
chunkId,
Expand Down
6 changes: 6 additions & 0 deletions src/client.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/* eslint-env browser */
import {compose} from './plugin/index.js';
import timing from './timing';
Expand Down
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import serverApp from './server';
import clientApp from './client';

Expand Down
6 changes: 6 additions & 0 deletions src/plugin/__tests__/compose.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import test from './test';
import Plugin from '../plugin/plugin';
import compose from '../compose';
Expand Down
6 changes: 6 additions & 0 deletions src/plugin/__tests__/plugin.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import test from './test';
import Plugin from '../plugin/plugin';

Expand Down
6 changes: 6 additions & 0 deletions src/plugin/__tests__/singleton-plugin.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import test from './test';
import SingletonPlugin from '../singleton-plugin/singleton-plugin';

Expand Down
6 changes: 6 additions & 0 deletions src/plugin/__tests__/test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import tape from 'tape-cup';

const env = __BROWSER__ ? 'BROWSER' : 'NODE';
Expand Down
6 changes: 6 additions & 0 deletions src/plugin/compose.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

// inline version of koa-compose to get around Rollup/CUP commonjs-related issue
function composeMiddleware(middleware) {
if (!Array.isArray(middleware)) {
Expand Down
6 changes: 6 additions & 0 deletions src/plugin/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

// @flow
import Plugin from './plugin/plugin';
import SingletonPlugin from './singleton-plugin/singleton-plugin';
Expand Down
6 changes: 6 additions & 0 deletions src/plugin/plugin/plugin-client.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const __global_key__ = {};

export default class Plugin {
Expand Down
6 changes: 6 additions & 0 deletions src/plugin/plugin/plugin-server.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const __global_key__ = {};

export default class Plugin {
Expand Down
6 changes: 6 additions & 0 deletions src/plugin/plugin/plugin.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import client from './plugin-client';
import server from './plugin-server';
export default (__BROWSER__ ? client : server);
6 changes: 6 additions & 0 deletions src/plugin/singleton-plugin/singleton-plugin.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import Plugin from '../plugin/plugin';

export default class SingletonPlugin extends Plugin {
Expand Down
6 changes: 6 additions & 0 deletions src/sanitization.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/*
We never want developers to be able to write `ctx.body.body.push(`<div>${stuff}</div>`)`
because that allows XSS attacks by default (e.g. if stuff === '<script>alert(1)</script>')
Expand Down
6 changes: 6 additions & 0 deletions src/server.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/* eslint-env node */
import path from 'path';
import {compose} from './plugin/index.js';
Expand Down
6 changes: 6 additions & 0 deletions src/timing.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import {Plugin} from './plugin/index.js';
export default new Plugin({
Service: class Timing {
Expand Down
6 changes: 6 additions & 0 deletions src/virtual/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

export function assetUrl(url) {
/**
* PLEASE NOTE: a build step transforms
Expand Down

0 comments on commit 20922fe

Please sign in to comment.