Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: license headers #123

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .eslintrc.json → .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// `npx eslint --print-config index.js` to print calculated config.
{
module.exports = {
"root": true,
"parserOptions": {
"ecmaVersion": 2022, // Top-level await, etc.
Expand All @@ -17,11 +17,14 @@
],
"plugins": [
"import",
"license-header",
"prettier",
"promise",
"n"
],
"rules": {
"license-header/header": ["error", "./scripts/license-header.js"],

// Restoring some config from standardjs that we want to maintain at least
// for now -- to assist with transition to prettier.
"no-unused-vars": [ // See taav for possible better 'no-unused-vars' rule.
Expand Down Expand Up @@ -82,9 +85,11 @@
"import/no-webpack-loader-syntax": "error"
},
"ignorePatterns": [
"/.eslintrc.js",
"/.nyc_output",
"node_modules",
"tmp",
"*.min.js"
"*.min.js",
"lib/luggite.js"
]
}
34 changes: 34 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"private": true,
"scripts": {
"lint": "eslint --ext=js,mjs,cjs scripts && npm run --if-present --workspaces lint",
"lint:fix": "eslint --ext=js,mjs,cjs scripts && npm run --if-present --workspaces lint:fix",
"lint:fix": "eslint --ext=js,mjs,cjs scripts --fix && npm run --if-present --workspaces lint:fix",
"test": "npm run --if-present --workspaces test",
"maint:update-otel-deps": "node scripts/update-otel-deps.js"
},
Expand All @@ -21,6 +21,7 @@
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-license-header": "^0.6.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
Expand Down
4 changes: 4 additions & 0 deletions packages/mockotlpserver/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const config = require('../../.eslintrc.js');
config.rules["license-header/header"] = ["error", "../../scripts/license-header.js"];

module.exports = config;
19 changes: 19 additions & 0 deletions packages/mockotlpserver/lib/cli.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/**
* mockotlpserver CLI. Try `mockotlpserver --htlp`.
*/
Expand Down
19 changes: 19 additions & 0 deletions packages/mockotlpserver/lib/diagch.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

// This file defines the diagnostic channels used by mockotlpserver and
// some utilities for using them.

Expand Down
19 changes: 19 additions & 0 deletions packages/mockotlpserver/lib/grpc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

const {resolve} = require('path');

const grpc = require('@grpc/grpc-js');
Expand Down
19 changes: 19 additions & 0 deletions packages/mockotlpserver/lib/http.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

const http = require('http');

const {
Expand Down
19 changes: 19 additions & 0 deletions packages/mockotlpserver/lib/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

const {MockOtlpServer} = require('./mockotlpserver');
const {
normalizeLogs,
Expand Down
19 changes: 19 additions & 0 deletions packages/mockotlpserver/lib/logs-summary.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/**
* A "Printer" of logs data that attempts a reasonable short summary.
*/
Expand Down
19 changes: 19 additions & 0 deletions packages/mockotlpserver/lib/metrics-summary.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/**
* A "Printer" of metrics data that attempts a reasonable short summary.
*
Expand Down
19 changes: 19 additions & 0 deletions packages/mockotlpserver/lib/mockotlpserver.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

const luggite = require('./luggite');
const {HttpService} = require('./http');
const {GrpcService} = require('./grpc');
Expand Down
19 changes: 19 additions & 0 deletions packages/mockotlpserver/lib/normalize.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/**
* Utilities for normalizing OTLP proto/json objects to a form that is common
* between the flavours and somewhat more convenient to use for
Expand Down
19 changes: 19 additions & 0 deletions packages/mockotlpserver/lib/printers.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/**
* Various "Printers" that subscribe to `otlp.*` diagnostic channels and print
* the results in various formats.
Expand Down
19 changes: 19 additions & 0 deletions packages/mockotlpserver/lib/proto.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/**
* Some utilities for working with the OpenTelemetry proto files.
*/
Expand Down
Loading