-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
241 changed files
with
1,047 additions
and
654 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,6 +98,7 @@ | |
"**/grunt-legacy-log-utils/lodash": "^4.17.21", | ||
"**/grunt-legacy-util/lodash": "^4.17.21", | ||
"**/grunt/js-yaml": "^3.13.1", | ||
"**/@elastic/eui/highlight.js": "^9.18.5", | ||
"**/isomorphic-fetch/node-fetch": "^2.6.1", | ||
"**/istanbul-instrumenter-loader/schema-utils": "1.0.0", | ||
"**/load-grunt-config/js-yaml": "^3.13.1", | ||
|
@@ -126,20 +127,20 @@ | |
] | ||
}, | ||
"dependencies": { | ||
"@commercial/boom": "^7.4.12", | ||
"@commercial/hapi": "^17.9.4", | ||
"@commercial/hoek": "^6.2.5", | ||
"@commercial/podium": "^3.4.3", | ||
"@elastic/datemath": "5.0.2", | ||
"@elastic/eui": "6.10.9", | ||
"@elastic/filesaver": "1.1.2", | ||
"@elastic/good": "8.1.1-kibana2", | ||
"@elastic/numeral": "2.3.2", | ||
"@elastic/ui-ace": "0.2.3", | ||
"@hapi/boom": "^7.4.11", | ||
"@hapi/good-squeeze": "^6.0.0", | ||
"@hapi/h2o2": "^8.3.2", | ||
"@hapi/hapi": "^17.9.0", | ||
"@hapi/hoek": "^6.2.4", | ||
"@hapi/inert": "^5.2.2", | ||
"@hapi/oppsy": "^2.1.2", | ||
"@hapi/podium": "^3.4.3", | ||
"@hapi/vision": "^5.5.4", | ||
"@hapi/wreck": "^16.0.1", | ||
"@kbn/babel-code-parser": "1.0.0", | ||
|
@@ -300,6 +301,10 @@ | |
"@types/bluebird": "^3.1.1", | ||
"@types/chance": "^1.0.0", | ||
"@types/classnames": "^2.2.3", | ||
"@types/commercial__boom": "npm:@types/hapi__boom@^7.4.1", | ||
"@types/commercial__hapi": "npm:@types/[email protected]", | ||
"@types/commercial__hoek": "npm:@types/hapi__hoek@^6.2.0", | ||
"@types/commercial__podium": "npm:@types/hapi__podium@^3.4.1", | ||
"@types/d3": "^3.5.41", | ||
"@types/dedent": "^0.7.0", | ||
"@types/del": "^3.0.1", | ||
|
@@ -313,10 +318,6 @@ | |
"@types/glob": "^5.0.35", | ||
"@types/globby": "^8.0.0", | ||
"@types/graphql": "^0.13.1", | ||
"@types/hapi__boom": "^7.4.1", | ||
"@types/hapi__hapi": "npm:@types/[email protected]", | ||
"@types/hapi__hoek": "^6.2.0", | ||
"@types/hapi__podium": "^3.4.1", | ||
"@types/has-ansi": "^3.0.0", | ||
"@types/humps": "^1.1.2", | ||
"@types/jest": "^23.3.1", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
import { join } from 'path'; | ||
import { promises as fs } from 'fs'; | ||
import { getInstalledPackages } from '../../../npm'; | ||
|
||
export const UpdateHapiCommercialLicenseTask = { | ||
description: 'Updating packages in the @commercial namespace with custom LICENSE file', | ||
|
||
async run(config, log, build) { | ||
log.info('Finding installed production packages in the @commercial namespace'); | ||
const packages = (await getInstalledPackages({ directory: build.resolvePath() })) | ||
.filter((pkg) => pkg.name.startsWith('@commercial/')); | ||
return Promise.all( | ||
packages.map(async ({ directory }) => await addNewLicense(directory, log)) | ||
); | ||
} | ||
}; | ||
|
||
async function addNewLicense(packageDirectory, log) { | ||
const oldPath = join(packageDirectory, 'LICENSE.md'); | ||
log.info(`Deleting old license at ${oldPath}`); | ||
await fs.unlink(oldPath); | ||
|
||
const templatePath = join(__dirname, 'license_template'); | ||
const newPath = join(packageDirectory, 'LICENSE'); | ||
log.info(`Adding new license at ${newPath}`); | ||
await fs.copyFile(templatePath, newPath); | ||
} |
32 changes: 32 additions & 0 deletions
32
src/dev/build/tasks/hapi_commercial_license/license_template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Sideway Inc. grants Elasticsearch B.V. and its subsidiaries a perpetual, | ||
nonexclusive license to the Covered Software under the 3-Clause BSD License | ||
(https://opensource.org/licenses/BSD-3-Clause) license as follows: | ||
|
||
Copyright 2012-2020 Sideway Inc. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of Sideway Inc. nor the names of its contributors may be | ||
used toendorse or promote products derived from this software without | ||
specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY SIDEWAY INC. "AS IS" AND ANY EXPRESS | ||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SIDEWAY INC. BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE | ||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,40 @@ export const LICENSE_OVERRIDES = { | |
'[email protected]': ['Eclipse Distribution License - v 1.0'], //cf. https://github.com/bjornharrtell/jsts | ||
'@mapbox/[email protected]': ['MIT'], //license in readme https://github.com/tmcw/jsonlint | ||
|
||
// Override for the commercial hapi license | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
'@commercial/[email protected]': ['BSD-3-Clause'], | ||
|
||
// TODO can be removed once we upgrade past [email protected] | ||
'[email protected]': ['Apache-2.0'], | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.