Clean up licensing (#460)
This commit is contained in:
Родитель
85cd3cfad8
Коммит
e7fc8676ca
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": [
|
||||
"@typescript-eslint"
|
||||
"@typescript-eslint",
|
||||
"header"
|
||||
],
|
||||
"parserOptions": {
|
||||
"project": "tsconfig.json",
|
||||
|
@ -14,6 +15,15 @@
|
|||
"plugin:prettier/recommended"
|
||||
],
|
||||
"rules": {
|
||||
"header/header": [
|
||||
2,
|
||||
"line",
|
||||
[
|
||||
" Copyright (c) .NET Foundation. All rights reserved.",
|
||||
" Licensed under the MIT License."
|
||||
],
|
||||
2
|
||||
],
|
||||
"@typescript-eslint/ban-ts-comment": "off",
|
||||
"@typescript-eslint/ban-types": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
"chalk": "^4.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-header": "^3.1.1",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"husky": "^7.0.2",
|
||||
"jsdoc": "^3.6.3",
|
||||
|
@ -1593,6 +1594,15 @@
|
|||
"eslint": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-header": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-header/-/eslint-plugin-header-3.1.1.tgz",
|
||||
"integrity": "sha512-9vlKxuJ4qf793CmeeSrZUvVClw6amtpghq3CuWcB5cUNnWHQhgcqy5eF8oVKFk1G3Y/CbchGfEaw3wiIJaNmVg==",
|
||||
"dev": true,
|
||||
"peerDependencies": {
|
||||
"eslint": ">=7.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-prettier": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz",
|
||||
|
@ -5930,6 +5940,13 @@
|
|||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"eslint-plugin-header": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-header/-/eslint-plugin-header-3.1.1.tgz",
|
||||
"integrity": "sha512-9vlKxuJ4qf793CmeeSrZUvVClw6amtpghq3CuWcB5cUNnWHQhgcqy5eF8oVKFk1G3Y/CbchGfEaw3wiIJaNmVg==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"eslint-plugin-prettier": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz",
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
"chai": "^4.2.0",
|
||||
"chai-as-promised": "^7.1.1",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-header": "^3.1.1",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"husky": "^7.0.2",
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {
|
||||
BindingDefinition,
|
||||
Context,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { AzureFunctionsRpcMessages as rpc } from '../azure-functions-language-worker-protobuf/src/rpc';
|
||||
import { toRpcHttp, toTypedData } from './converters';
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import * as url from 'url';
|
||||
import { isFunction, isObject } from 'util';
|
||||
import { AzureFunctionsRpcMessages as rpc } from '../azure-functions-language-worker-protobuf/src/rpc';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import * as grpc from '@grpc/grpc-js';
|
||||
import { ServiceClientConstructor } from '@grpc/grpc-js/build/src/make-client';
|
||||
import * as grpcloader from '@grpc/proto-loader';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import * as parseArgs from 'minimist';
|
||||
import { AzureFunctionsRpcMessages as rpc } from '../azure-functions-language-worker-protobuf/src/rpc';
|
||||
import { FunctionLoader } from './FunctionLoader';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { Context } from '@azure/functions';
|
||||
import { format, isFunction } from 'util';
|
||||
import { AzureFunctionsRpcMessages as rpc } from '../azure-functions-language-worker-protobuf/src/rpc';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { BindingDefinition, ContextBindingData } from '@azure/functions';
|
||||
import { AzureFunctionsRpcMessages as rpc } from '../../azure-functions-language-worker-protobuf/src/rpc';
|
||||
import { FunctionInfo } from '../FunctionInfo';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { TraceContext } from '@azure/functions';
|
||||
import { isLong } from 'long';
|
||||
import {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { Cookie, HttpMethod } from '@azure/functions';
|
||||
import {
|
||||
AzureFunctionsRpcMessages as rpc,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
export * from './BindingConverters';
|
||||
export * from './RpcConverters';
|
||||
export * from './RpcHttpConverters';
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { HttpMethod, HttpRequest } from '@azure/functions';
|
||||
|
||||
export class RequestProperties implements HttpRequest {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { Cookie } from '@azure/functions';
|
||||
|
||||
// Copyright (c) .NET Foundation. All rights thiserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
interface IResponse {
|
||||
statusCode?: string | number;
|
||||
headers: {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
const logPrefix = 'LanguageWorkerConsoleLog';
|
||||
const errorPrefix = logPrefix + '[error] ';
|
||||
const warnPrefix = logPrefix + '[warn] ';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
export class InternalException extends Error {
|
||||
public isAzureFunctionsInternalException = true;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
/**
|
||||
* Use these methods only if you want to guarantee the messages reach the host despite potential performance impact.
|
||||
Otherwise, please stick to utilizing the gRPC channel to propagate these messages with category: RpcLogCategory.System
|
||||
* Use these methods only if you want to guarantee the messages reach the host despite potential performance impact.
|
||||
* Otherwise, please stick to utilizing the gRPC channel to propagate these messages with category: RpcLogCategory.System
|
||||
**/
|
||||
|
||||
const logPrefix = 'LanguageWorkerConsoleLog';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { expect } from 'chai';
|
||||
import { fromString } from 'long';
|
||||
import 'mocha';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { Context } from '@azure/functions';
|
||||
import { expect } from 'chai';
|
||||
import 'mocha';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { expect } from 'chai';
|
||||
import 'mocha';
|
||||
import { AzureFunctionsRpcMessages as rpc } from '../azure-functions-language-worker-protobuf/src/rpc';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import 'mocha';
|
||||
import { AzureFunctionsRpcMessages as rpc } from '../azure-functions-language-worker-protobuf/src/rpc';
|
||||
import { FunctionLoader } from '../src/FunctionLoader';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { expect } from 'chai';
|
||||
import 'mocha';
|
||||
import { AzureFunctionsRpcMessages as rpc } from '../azure-functions-language-worker-protobuf/src/rpc';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { Cookie } from '@azure/functions';
|
||||
import { expect } from 'chai';
|
||||
import 'mocha';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { EventEmitter } from 'events';
|
||||
import * as sinon from 'sinon';
|
||||
import { AzureFunctionsRpcMessages as rpc } from '../azure-functions-language-worker-protobuf/src/rpc';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { expect } from 'chai';
|
||||
import * as cp from 'child_process';
|
||||
import 'mocha';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { expect } from 'chai';
|
||||
import 'mocha';
|
||||
import * as sinon from 'sinon';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { expect } from 'chai';
|
||||
import 'mocha';
|
||||
import { startNodeWorker } from '../src/Worker';
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) .NET Foundation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
declare module '@azure/functions' {
|
||||
/**
|
||||
* Interface for your Azure Function code. This function must be exported (via module.exports or exports)
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
// This file will be compiled by multiple versions of TypeScript as decribed in ./test/TypesTests.ts to verify there are no errors
|
||||
|
||||
import { AzureFunction, Context, Cookie, HttpMethod, HttpRequest } from '@azure/functions';
|
||||
|
|
Загрузка…
Ссылка в новой задаче