diff --git a/docs/site/Copyright-generator.md b/docs/site/Copyright-generator.md
new file mode 100644
index 000000000000..73ca2b25fb6f
--- /dev/null
+++ b/docs/site/Copyright-generator.md
@@ -0,0 +1,85 @@
+---
+lang: en
+title: 'Generate copyright/license header for JavaScript/TypeScript files'
+keywords: LoopBack 4.0, LoopBack 4
+sidebar: lb4_sidebar
+permalink: /doc/en/lb4/Copyright-generator.html
+---
+
+### Synopsis
+
+The `lb4 copyright` command runs inside a Node.js project with `package.json` to
+add or update copyright/license header for JavaScript and TypeScript files based
+on `package.json` and git history.
+
+The command also supports [lerna](https://github.com/lerna/lerna) monorepos. It
+traverses all packages within the monorepo and apply copyright/license headers.
+
+```sh
+lb4 copyright [options]
+```
+
+The following is an example of such headers.
+
+```js
+// Copyright IBM Corp. 2020. All Rights Reserved.
+// Node module: @loopback/cli
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+```
+
+The year(s) is built from the git history of the file and `Node module` is read
+from the `name` property in `package.json`.
+
+Please note the command expects `git` is installed.
+
+### Options
+
+`--owner` : _(Optional)_ The owner of the copyright, such as `IBM Corp.`.
+
+`--license` : _(Optional)_ The name of the license, such as `MIT`.
+
+`--gitOnly` : _(Optional)_ A flag to control if only git tracked files are
+updated. Default to `true`.
+
+### Interactive Prompts
+
+The command prompts you for:
+
+1. The copyright owner. The default value is read from `copyright.owner` or
+ `author` in the `package.json`.
+
+2. The license name. The default value is read from `license` in the
+ `package.json`.
+
+The default owner is `IBM Corp.` and license is `MIT` with the following
+`package.json`.
+
+```json
+{
+ "name": "@loopback/boot",
+ "version": "2.0.2",
+ "author": "IBM Corp.",
+ "copyright.owner": "IBM Corp.",
+ "license": "MIT"
+}
+```
+
+### Output
+
+The following output is captured when `lb4 copyright` is run against
+[`loopback4-example-shopping`](https://github.com/strongloop/loopback4-example-shopping).
+
+```
+? Copyright owner: IBM Corp.
+? License name: (Use arrow keys or type to search)
+❯ MIT (MIT License)
+ ISC (ISC License)
+ Artistic-2.0 (Artistic License 2.0)
+ Apache-2.0 (Apache License 2.0)
+ ...
+? Do you want to update package.json and LICENSE? No
+Updating project loopback4-example-recommender (packages/recommender)
+Updating project loopback4-example-shopping (packages/shopping)
+Updating project loopback4-example-shopping-monorepo (.)
+```
diff --git a/docs/site/sidebars/lb4_sidebar.yml b/docs/site/sidebars/lb4_sidebar.yml
index 7507800198f8..dd2826604b9a 100644
--- a/docs/site/sidebars/lb4_sidebar.yml
+++ b/docs/site/sidebars/lb4_sidebar.yml
@@ -559,6 +559,10 @@ children:
url: Update-generator.html
output: 'web, pdf'
+ - title: 'Generate copyright/license headers'
+ url: Copyright-generator.html
+ output: 'web, pdf'
+
- title: 'Connectors reference'
url: Connectors-reference.html
output: 'web'
diff --git a/docs/site/tables/lb4-artifact-commands.html b/docs/site/tables/lb4-artifact-commands.html
index 4ac835692e23..c8a02a383181 100644
--- a/docs/site/tables/lb4-artifact-commands.html
+++ b/docs/site/tables/lb4-artifact-commands.html
@@ -76,12 +76,6 @@
lb4 example
diff --git a/packages/cli/generators/copyright/fs.js b/packages/cli/generators/copyright/fs.js
new file mode 100644
index 000000000000..d9b672c82a83
--- /dev/null
+++ b/packages/cli/generators/copyright/fs.js
@@ -0,0 +1,46 @@
+// Copyright IBM Corp. 2020. All Rights Reserved.
+// Node module: @loopback/cli
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+'use strict';
+
+const fse = require('fs-extra');
+const _ = require('lodash');
+const {promisify} = require('util');
+const glob = promisify(require('glob'));
+
+const defaultFS = {
+ write: fse.writeFile,
+ read: fse.readFile,
+ writeJSON: fse.writeJson,
+ readJSON: fse.readJson,
+ exists: fse.exists,
+};
+
+/**
+ * List all JS/TS files
+ * @param {string[]} paths - Paths to search
+ */
+async function jsOrTsFiles(cwd, paths = []) {
+ paths = [].concat(paths);
+ let globs;
+ if (paths.length === 0) {
+ globs = [glob('**/*.{js,ts}', {nodir: true, follow: false, cwd})];
+ } else {
+ globs = paths.map(p => {
+ if (/\/$/.test(p)) {
+ p += '**/*.{js,ts}';
+ } else if (!/[^*]\.(js|ts)$/.test(p)) {
+ p += '/**/*.{js,ts}';
+ }
+ return glob(p, {nodir: true, follow: false, cwd});
+ });
+ }
+ paths = await Promise.all(globs);
+ paths = _.flatten(paths);
+ return _.filter(paths, /\.(js|ts)$/);
+}
+
+exports.FSE = defaultFS;
+exports.jsOrTsFiles = jsOrTsFiles;
diff --git a/packages/cli/generators/copyright/git.js b/packages/cli/generators/copyright/git.js
new file mode 100644
index 000000000000..d9a0ef2730f9
--- /dev/null
+++ b/packages/cli/generators/copyright/git.js
@@ -0,0 +1,74 @@
+// Copyright IBM Corp. 2020. All Rights Reserved.
+// Node module: @loopback/cli
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+'use strict';
+
+const _ = require('lodash');
+const cp = require('child_process');
+const util = require('util');
+const debug = require('debug')('loopback:cli:copyright:git');
+
+const cache = new Map();
+
+/**
+ * Run a git command
+ * @param {string} cwd - Current directory to run the command
+ * @param {...any} args - Args for the git command
+ */
+async function git(cwd, ...args) {
+ const cmd = 'git ' + util.format(...args);
+ const key = `${cwd}:${cmd}`;
+ debug('Running %s in directory', cmd, cwd);
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ return new Promise((resolve, reject) => {
+ cp.exec(cmd, {maxBuffer: 1024 * 1024, cwd}, (err, stdout) => {
+ stdout = _(stdout || '')
+ .split(/[\r\n]+/g)
+ .map(_.trim)
+ .filter()
+ .value();
+ if (err) {
+ // reject(err);
+ resolve([]);
+ } else {
+ cache.set(key, stdout);
+ debug('Stdout', stdout);
+ resolve(stdout);
+ }
+ });
+ });
+}
+
+/**
+ * Inspect years for a given file based on git history
+ * @param {string} file - JS/TS file
+ */
+async function getYears(file) {
+ file = file || '.';
+ let dates = await git(
+ process.cwd(),
+ '--no-pager log --pretty=%%ai --all -- %s',
+ file,
+ );
+ debug('Dates for %s', file, dates);
+ if (_.isEmpty(dates)) {
+ // if the given path doesn't have any git history, assume it is new
+ dates = [new Date().toJSON()];
+ } else {
+ dates = [_.head(dates), _.last(dates)];
+ }
+ const years = _.map(dates, getYear);
+ return _.uniq(years).sort();
+}
+
+// assumes ISO-8601 (or similar) format
+function getYear(str) {
+ return str.slice(0, 4);
+}
+
+exports.git = git;
+exports.getYears = getYears;
diff --git a/packages/cli/generators/copyright/header.js b/packages/cli/generators/copyright/header.js
new file mode 100644
index 000000000000..99bfd112518a
--- /dev/null
+++ b/packages/cli/generators/copyright/header.js
@@ -0,0 +1,261 @@
+// Copyright IBM Corp. 2020. All Rights Reserved.
+// Node module: @loopback/cli
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+const _ = require('lodash');
+const {git, getYears} = require('./git');
+const path = require('path');
+const {FSE, jsOrTsFiles} = require('./fs');
+const chalk = require('chalk');
+const Project = require('@lerna/project');
+
+const {spdxLicenseList} = require('./license');
+
+const debug = require('debug')('loopback:cli:copyright');
+
+// Components of the copyright header.
+const COPYRIGHT = [
+ 'Copyright <%= owner %> <%= years %>. All Rights Reserved.',
+ 'Node module: <%= name %>',
+];
+const LICENSE = [
+ 'This file is licensed under the <%= license %>.',
+ 'License text available at <%= url %>',
+];
+const CUSTOM_LICENSE = [];
+
+// Compiled templates for generating copyright headers
+const UNLICENSED = _.template(COPYRIGHT.join('\n'));
+const LICENSED = _.template(COPYRIGHT.concat(LICENSE).join('\n'));
+let CUSTOM = UNLICENSED;
+if (CUSTOM_LICENSE.length) {
+ CUSTOM = _.template(COPYRIGHT.concat(CUSTOM_LICENSE).join('\n'));
+}
+
+// Patterns for matching previously generated copyright headers
+const BLANK = /^\s*$/;
+const ANY = COPYRIGHT.concat(LICENSE, CUSTOM_LICENSE).map(
+ l => new RegExp(l.replace(/<%[^>]+%>/g, '.*')),
+);
+
+/**
+ * Build header for a file
+ * @param {string} file - JS/TS file
+ * @param {object} pkg - Package json object
+ * @param {object} options - Options
+ */
+async function buildHeader(file, pkg, options) {
+ const license =
+ options.license || _.get(pkg, 'license') || options.defaultLicense;
+ const years = await getYears(file);
+ const params = expandLicense(license);
+ params.years = years.join(',');
+ const owner = getCopyrightOwner(pkg, options);
+
+ const name =
+ options.copyrightIdentifer ||
+ _.get(pkg, 'copyright.identifier') ||
+ _.get(pkg, 'name') ||
+ options.defaultCopyrightIdentifer;
+
+ debug(owner, name, license);
+
+ _.defaults(params, {
+ owner,
+ name,
+ license,
+ });
+ debug('Params', params);
+ return params.template(params);
+}
+
+function getCopyrightOwner(pkg, options) {
+ return (
+ options.copyrightOwner ||
+ _.get(pkg, 'copyright.owner') ||
+ _.get(pkg, 'author.name') ||
+ options.defaultCopyrightOwner ||
+ 'Owner'
+ );
+}
+
+/**
+ * Build the license template params
+ * @param {string|object} spdxLicense - SPDX license id or object
+ */
+function expandLicense(spdxLicense) {
+ if (typeof spdxLicense === 'string') {
+ spdxLicense = spdxLicenseList[spdxLicense.toLowerCase()];
+ }
+ if (spdxLicense) {
+ return {
+ template: LICENSED,
+ license: spdxLicense.name,
+ url: spdxLicense.url,
+ };
+ }
+ return {
+ template: CUSTOM,
+ license: spdxLicense,
+ };
+}
+
+/**
+ * Format the header for a file
+ * @param {string} file - JS/TS file
+ * @param {string} pkg - Package json object
+ * @param {object} options - Options
+ */
+async function formatHeader(file, pkg, options) {
+ const header = await buildHeader(file, pkg, options);
+ return header.split('\n').map(line => `// ${line}`);
+}
+
+/**
+ * Ensure the file is updated with the correct header
+ * @param {string} file - JS/TS file
+ * @param {object} pkg - Package json object
+ * @param {object} options - Options
+ */
+async function ensureHeader(file, pkg, options = {}) {
+ const fs = options.fs || FSE;
+ const header = await formatHeader(file, pkg, options);
+ debug('Header: %s', header);
+ const current = await fs.read(file, 'utf8');
+ const content = mergeHeaderWithContent(header, current);
+ if (!options.dryRun) {
+ await fs.write(file, content, 'utf8');
+ } else {
+ const log = options.log || console.log;
+ log(file, header);
+ }
+ return content;
+}
+
+/**
+ * Merge header with file content
+ * @param {string} header - Copyright header
+ * @param {string} content - File content
+ */
+function mergeHeaderWithContent(header, content) {
+ const lineEnding = /\r\n/gm.test(content) ? '\r\n' : '\n';
+ const preamble = [];
+ content = content.split(lineEnding);
+ if (/^#!/.test(content[0])) {
+ preamble.push(content.shift());
+ }
+ // replace any existing copyright header lines and collapse blank lines down
+ // to just one.
+ while (headerOrBlankLine(content[0])) {
+ content.shift();
+ }
+ return [].concat(preamble, header, '', content).join(lineEnding);
+}
+
+function headerOrBlankLine(line) {
+ return BLANK.test(line) || ANY.some(pat => pat.test(line));
+}
+
+/**
+ * Update file headers for the given project
+ * @param {string} projectRoot - Root directory of a package or a lerna monorepo
+ * @param {object} options - Options
+ */
+async function updateFileHeaders(projectRoot, options = {}) {
+ debug('Starting project root: %s', projectRoot);
+ options = {
+ dryRun: false,
+ gitOnly: true,
+ ...options,
+ };
+
+ const fs = options.fs || FSE;
+ const isMonorepo = await fs.exists(path.join(projectRoot, 'lerna.json'));
+ if (isMonorepo) {
+ // List all packages for the monorepo
+ const project = new Project(projectRoot);
+ debug('Lerna monorepo', project);
+ const packages = await project.getPackages();
+
+ // Update file headers for each package
+ const visited = [];
+ for (const p of packages) {
+ visited.push(p.location);
+ const pkgOptions = {...options};
+ // Set default copyright owner and id so that package-level settings
+ // take precedence
+ pkgOptions.defaultCopyrightIdentifer = options.copyrightIdentifer;
+ pkgOptions.defaultCopyrightOwner = options.copyrightOwner;
+ pkgOptions.defaultLicense = options.license;
+ delete pkgOptions.copyrightOwner;
+ delete pkgOptions.copyrightIdentifer;
+ delete pkgOptions.license;
+ await updateFileHeaders(p.location, pkgOptions);
+ }
+
+ // Now handle the root level package
+ // Exclude files that have been processed
+ const filter = f => {
+ const included = !visited.some(dir => {
+ dir = path.relative(projectRoot, dir);
+ // glob return files with `/`
+ return f.startsWith(path.join(dir, '/').replace(/\\/g, '/'));
+ });
+ if (included) {
+ debug('File %s is included for monorepo package', f);
+ }
+ return included;
+ };
+ const pkgOptions = {filter, ...options};
+ await updateFileHeadersForSinglePackage(projectRoot, pkgOptions);
+ } else {
+ await updateFileHeadersForSinglePackage(projectRoot, options);
+ }
+}
+
+/**
+ * Update file headers for the given project
+ * @param {string} projectRoot - Root directory of a package
+ * @param {object} options - Options
+ */
+async function updateFileHeadersForSinglePackage(projectRoot, options) {
+ debug('Options', options);
+ debug('Project root: %s', projectRoot);
+ const log = options.log || console.log;
+ const pkgFile = path.join(projectRoot, 'package.json');
+ const fs = options.fs || FSE;
+ const exists = await fs.exists(pkgFile);
+ if (!exists) {
+ log(chalk.red(`No package.json exists at ${projectRoot}`));
+ return;
+ }
+ const pkg = await fs.readJSON(pkgFile);
+
+ log(
+ 'Updating project %s (%s)',
+ pkg.name,
+ path.relative(process.cwd(), projectRoot) || '.',
+ );
+ debug('Package', pkg);
+ let files = options.gitOnly ? await git(projectRoot, 'ls-files') : [];
+ debug('Paths', files);
+ files = await jsOrTsFiles(projectRoot, files);
+ if (typeof options.filter === 'function') {
+ files = files.filter(options.filter);
+ }
+ debug('JS/TS files', files);
+ for (const file of files) {
+ await ensureHeader(path.resolve(projectRoot, file), pkg, options);
+ }
+}
+
+exports.updateFileHeaders = updateFileHeaders;
+exports.getYears = getYears;
+
+if (require.main === module) {
+ updateFileHeaders(process.cwd()).catch(err => {
+ console.error(err);
+ process.exit(1);
+ });
+}
diff --git a/packages/cli/generators/copyright/index.js b/packages/cli/generators/copyright/index.js
new file mode 100644
index 000000000000..7825ad307a8f
--- /dev/null
+++ b/packages/cli/generators/copyright/index.js
@@ -0,0 +1,164 @@
+// Copyright IBM Corp. 2017,2020. All Rights Reserved.
+// Node module: @loopback/cli
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+'use strict';
+const BaseGenerator = require('../../lib/base-generator');
+const {updateFileHeaders} = require('./header');
+const {spdxLicenseList, updateLicense} = require('./license');
+const g = require('../../lib/globalize');
+const _ = require('lodash');
+const autocomplete = require('inquirer-autocomplete-prompt');
+
+module.exports = class CopyrightGenerator extends BaseGenerator {
+ // Note: arguments and options should be defined in the constructor.
+ constructor(args, opts) {
+ super(args, opts);
+ this.licenseList = [];
+ for (const id in spdxLicenseList) {
+ const license = spdxLicenseList[id];
+ if (
+ ['mit', 'apache-2.0', 'isc', 'artistic-2.0'].includes(
+ id.toLocaleLowerCase(),
+ )
+ ) {
+ // Add well-known licenses in front of the list
+ this.licenseList.unshift(license);
+ } else {
+ this.licenseList.push(license);
+ }
+ }
+ this.licenseList = this.licenseList.map(lic => ({
+ value: lic,
+ name: `${lic.id} (${lic.name})`,
+ }));
+ }
+
+ initializing() {
+ // Register `autocomplete` plugin
+ this.env.adapter.promptModule.registerPrompt('autocomplete', autocomplete);
+ }
+
+ setOptions() {
+ this.option('owner', {
+ type: String,
+ required: false,
+ description: g.f('Copyright owner'),
+ });
+ this.option('license', {
+ type: String,
+ required: false,
+ description: g.f('License'),
+ });
+ this.option('updateLicense', {
+ type: Boolean,
+ required: false,
+ description: g.f('Update license in package.json and LICENSE'),
+ });
+ this.option('gitOnly', {
+ type: Boolean,
+ required: false,
+ default: true,
+ description: g.f('Only update git tracked files'),
+ });
+ return super.setOptions();
+ }
+
+ async promptOwnerAndLicense() {
+ const pkgFile = this.destinationPath('package.json');
+ const pkg = this.fs.readJSON(this.destinationPath('package.json'));
+ if (pkg == null) {
+ this.exit(`${pkgFile} does not exist.`);
+ return;
+ }
+ this.packageJson = pkg;
+ let author = _.get(pkg, 'author');
+ if (typeof author === 'object') {
+ author = author.name;
+ }
+ const owner =
+ this.options.copyrightOwner || _.get(pkg, 'copyright.owner', author);
+ const license = this.options.license || _.get(pkg, 'license');
+ const licenses = [...this.licenseList];
+ if (license != null) {
+ // find the matching license by id and move it to the front of the list
+ for (let i = 0; i < licenses.length; i++) {
+ if (licenses[i].value.id.toLowerCase() === license.toLowerCase()) {
+ const lic = licenses.splice(i, 1);
+ licenses.unshift(...lic);
+ break;
+ }
+ }
+ }
+
+ let answers = await this.prompt([
+ {
+ type: 'input',
+ name: 'owner',
+ message: g.f('Copyright owner:'),
+ default: owner,
+ when: this.options.owner == null,
+ },
+ {
+ type: 'autocomplete',
+ name: 'license',
+ // choices: licenseList,
+ source: async (_answers, input) => {
+ if (input == null) return licenses;
+ const matched = licenses.filter(lic => {
+ const a = input.toLowerCase();
+ return (
+ lic.value.id.toLowerCase().startsWith(a) ||
+ lic.value.name.toLowerCase().startsWith(a)
+ );
+ });
+ return matched;
+ },
+ pageSize: 10,
+ message: g.f('License name:'),
+ default: license,
+ when: this.options.license == null,
+ },
+ ]);
+ answers = answers || {};
+ this.headerOptions = {
+ copyrightOwner: answers.owner || this.options.owner,
+ license: answers.license || this.options.license,
+ log: this.log,
+ gitOnly: this.options.gitOnly,
+ fs: this.fs,
+ };
+ }
+
+ async updateLicense() {
+ if (this.shouldExit()) return;
+ const answers = await this.prompt([
+ {
+ type: 'confirm',
+ name: 'updateLicense',
+ message: g.f('Do you want to update package.json and LICENSE?'),
+ default: false,
+ when: this.options.updateLicense == null,
+ },
+ ]);
+ const updateLicenseFile =
+ (answers && answers.updateLicense) || this.options.updateLicense;
+ if (!updateLicenseFile) return;
+ this.headerOptions.updateLicense = updateLicenseFile;
+ await updateLicense(
+ this.destinationRoot(),
+ this.packageJson,
+ this.headerOptions,
+ );
+ }
+
+ async updateHeaders() {
+ if (this.shouldExit()) return;
+ await updateFileHeaders(this.destinationRoot(), this.headerOptions);
+ }
+
+ async end() {
+ await super.end();
+ }
+};
diff --git a/packages/cli/generators/copyright/license.js b/packages/cli/generators/copyright/license.js
new file mode 100644
index 000000000000..fd25872aa0b9
--- /dev/null
+++ b/packages/cli/generators/copyright/license.js
@@ -0,0 +1,99 @@
+// Copyright IBM Corp. 2020. All Rights Reserved.
+// Node module: @loopback/cli
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+const path = require('path');
+const {FSE} = require('./fs');
+const {getYears} = require('./git');
+const spdxLicenses = require('spdx-license-list/full');
+const spdxLicenseList = {};
+for (const id in spdxLicenses) {
+ spdxLicenseList[id.toLowerCase()] = {id, ...spdxLicenses[id]};
+}
+
+/**
+ * Render license text
+ * @param name - Module name
+ * @param owner - Copyright owner
+ * @param years - Years of update
+ * @param license - License object
+ */
+function renderLicense({name, owner, years, license}) {
+ if (typeof license === 'string') {
+ license = spdxLicenseList[license.toLowerCase()];
+ }
+ const text = replaceCopyRight(license.licenseText, {owner, years});
+ return `Copyright (c) ${owner} ${years}. All Rights Reserved.
+Node module: ${name}
+This project is licensed under the ${license.name}, full text below.
+
+--------
+
+${license.name}
+
+${text}
+`;
+ /*
+Copyright (c) IBM Corp. 2018,2019. All Rights Reserved.
+Node module: @loopback/boot
+This project is licensed under the MIT License, full text below.
+
+--------
+
+MIT license
+
+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.
+*/
+}
+
+function replaceCopyRight(text, {owner, years}) {
+ // Copyright (c)
+ return text
+ .replace(
+ /Copyright \(c\) <[^<>]+> <[^<>]+>/gim,
+ `Copyright (c) ${owner} ${years}`,
+ )
+ .replace(/\n\n/gm, '\n');
+}
+
+async function updateLicense(projectRoot, pkg, options) {
+ if (!options.updateLicense) return;
+ const fs = options.fs || FSE;
+ let licenseId = options.license;
+ if (typeof licenseId === 'object') {
+ licenseId = licenseId.id;
+ }
+ pkg.license = licenseId;
+ pkg['copyright.owner'] = options.copyrightOwner;
+ await fs.writeJSON(path.join(projectRoot, 'package.json'), pkg);
+ await fs.write(
+ path.join(projectRoot, 'LICENSE'),
+ renderLicense({
+ name: pkg.name,
+ owner: options.copyrightOwner,
+ license: options.license,
+ years: await getYears(projectRoot),
+ }),
+ );
+}
+
+exports.renderLicense = renderLicense;
+exports.spdxLicenseList = spdxLicenseList;
+exports.updateLicense = updateLicense;
diff --git a/packages/cli/lib/cli.js b/packages/cli/lib/cli.js
index 60879b3e9dd1..0d18f626df6a 100644
--- a/packages/cli/lib/cli.js
+++ b/packages/cli/lib/cli.js
@@ -109,6 +109,10 @@ function setupGenerators() {
path.join(__dirname, '../generators/rest-crud'),
PREFIX + 'rest-crud',
);
+ env.register(
+ path.join(__dirname, '../generators/copyright'),
+ PREFIX + 'copyright',
+ );
return env;
}
diff --git a/packages/cli/package-lock.json b/packages/cli/package-lock.json
index 8f10c7728270..82d6773014cd 100644
--- a/packages/cli/package-lock.json
+++ b/packages/cli/package-lock.json
@@ -153,6 +153,43 @@
"integrity": "sha1-hJAPDu/DcnmPR1G1JigwuCCJIuw=",
"dev": true
},
+ "@lerna/package": {
+ "version": "3.16.0",
+ "resolved": "https://registry.npmjs.org/@lerna/package/-/package-3.16.0.tgz",
+ "integrity": "sha512-2lHBWpaxcBoiNVbtyLtPUuTYEaB/Z+eEqRS9duxpZs6D+mTTZMNy6/5vpEVSCBmzvdYpyqhqaYjjSLvjjr5Riw==",
+ "requires": {
+ "load-json-file": "^5.3.0",
+ "npm-package-arg": "^6.1.0",
+ "write-pkg": "^3.1.0"
+ }
+ },
+ "@lerna/project": {
+ "version": "3.18.0",
+ "resolved": "https://registry.npmjs.org/@lerna/project/-/project-3.18.0.tgz",
+ "integrity": "sha512-+LDwvdAp0BurOAWmeHE3uuticsq9hNxBI0+FMHiIai8jrygpJGahaQrBYWpwbshbQyVLeQgx3+YJdW2TbEdFWA==",
+ "requires": {
+ "@lerna/package": "3.16.0",
+ "@lerna/validation-error": "3.13.0",
+ "cosmiconfig": "^5.1.0",
+ "dedent": "^0.7.0",
+ "dot-prop": "^4.2.0",
+ "glob-parent": "^5.0.0",
+ "globby": "^9.2.0",
+ "load-json-file": "^5.3.0",
+ "npmlog": "^4.1.2",
+ "p-map": "^2.1.0",
+ "resolve-from": "^4.0.0",
+ "write-json-file": "^3.2.0"
+ }
+ },
+ "@lerna/validation-error": {
+ "version": "3.13.0",
+ "resolved": "https://registry.npmjs.org/@lerna/validation-error/-/validation-error-3.13.0.tgz",
+ "integrity": "sha512-SiJP75nwB8GhgwLKQfdkSnDufAaCbkZWJqEDlKOUPUvVOplRGnfL+BPQZH5nvq2BYSRXsksXWZ4UHVnQZI/HYA==",
+ "requires": {
+ "npmlog": "^4.1.2"
+ }
+ },
"@livereach/jsonpath": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@livereach/jsonpath/-/jsonpath-1.2.2.tgz",
@@ -188,12 +225,19 @@
"requires": {
"@nodelib/fs.stat": "2.0.3",
"run-parallel": "^1.1.9"
+ },
+ "dependencies": {
+ "@nodelib/fs.stat": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz",
+ "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA=="
+ }
}
},
"@nodelib/fs.stat": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz",
- "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA=="
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz",
+ "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw=="
},
"@nodelib/fs.walk": {
"version": "1.2.4",
@@ -326,6 +370,40 @@
"typescript": "~3.8.2"
},
"dependencies": {
+ "@nodelib/fs.stat": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz",
+ "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA=="
+ },
+ "braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "requires": {
+ "fill-range": "^7.0.1"
+ }
+ },
+ "fast-glob": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.2.tgz",
+ "integrity": "sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A==",
+ "requires": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.0",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.2",
+ "picomatch": "^2.2.1"
+ }
+ },
+ "fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "requires": {
+ "to-regex-range": "^5.0.1"
+ }
+ },
"fs-extra": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
@@ -336,6 +414,11 @@
"universalify": "^0.1.0"
}
},
+ "is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
+ },
"jsonfile": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
@@ -344,6 +427,23 @@
"graceful-fs": "^4.1.6"
}
},
+ "micromatch": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
+ "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
+ "requires": {
+ "braces": "^3.0.1",
+ "picomatch": "^2.0.5"
+ }
+ },
+ "to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "requires": {
+ "is-number": "^7.0.0"
+ }
+ },
"universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
@@ -418,9 +518,9 @@
},
"dependencies": {
"@types/node": {
- "version": "13.9.5",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.5.tgz",
- "integrity": "sha512-hkzMMD3xu6BrJpGVLeQ3htQQNAcOrJjX7WFmtK8zWQpz2UJf13LCFF2ALA7c9OVdvc2vQJeDdjfR35M0sBCxvw=="
+ "version": "13.9.8",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.8.tgz",
+ "integrity": "sha512-1WgO8hsyHynlx7nhP1kr0OFzsgKz5XDQL+Lfc3b1Q3qIln/n8cKD4m09NJ0+P1Rq7Zgnc7N0+SsMnoD1rEb0kA=="
}
}
},
@@ -578,12 +678,19 @@
"integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==",
"requires": {
"type-fest": "^0.11.0"
+ },
+ "dependencies": {
+ "type-fest": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz",
+ "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ=="
+ }
}
},
"ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"ansi-styles": {
"version": "4.2.1",
@@ -599,6 +706,15 @@
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
},
+ "are-we-there-yet": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
+ "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
+ "requires": {
+ "delegates": "^1.0.0",
+ "readable-stream": "^2.0.6"
+ }
+ },
"argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
@@ -634,9 +750,12 @@
"dev": true
},
"array-union": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
- "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw=="
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
+ "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
+ "requires": {
+ "array-uniq": "^1.0.1"
+ }
},
"array-uniq": {
"version": "1.0.3",
@@ -920,12 +1039,6 @@
"requires": {
"ms": "2.0.0"
}
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
}
}
},
@@ -954,6 +1067,11 @@
"widest-line": "^3.1.0"
},
"dependencies": {
+ "ansi-regex": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
+ },
"chalk": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
@@ -963,6 +1081,29 @@
"supports-color": "^7.1.0"
}
},
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
+ },
+ "string-width": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ },
"type-fest": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
@@ -980,11 +1121,30 @@
}
},
"braces": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
"requires": {
- "fill-range": "^7.0.1"
+ "arr-flatten": "^1.1.0",
+ "array-unique": "^0.3.2",
+ "extend-shallow": "^2.0.1",
+ "fill-range": "^4.0.0",
+ "isobject": "^3.0.1",
+ "repeat-element": "^1.1.2",
+ "snapdragon": "^0.8.1",
+ "snapdragon-node": "^2.0.1",
+ "split-string": "^3.0.2",
+ "to-regex": "^3.0.1"
+ },
+ "dependencies": {
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ }
}
},
"btoa": {
@@ -1038,6 +1198,14 @@
"unique-filename": "^1.1.1"
},
"dependencies": {
+ "p-map": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz",
+ "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==",
+ "requires": {
+ "aggregate-error": "^3.0.0"
+ }
+ },
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@@ -1098,6 +1266,27 @@
"resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
"integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms="
},
+ "caller-callsite": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz",
+ "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=",
+ "requires": {
+ "callsites": "^2.0.0"
+ }
+ },
+ "caller-path": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz",
+ "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=",
+ "requires": {
+ "caller-callsite": "^2.0.0"
+ }
+ },
+ "callsites": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz",
+ "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA="
+ },
"camel-case": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.1.tgz",
@@ -1262,6 +1451,36 @@
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
"wrap-ansi": "^6.2.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
+ },
+ "string-width": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ }
}
},
"clone": {
@@ -1312,6 +1531,11 @@
"resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz",
"integrity": "sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw=="
},
+ "code-point-at": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
+ },
"collection-visit": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
@@ -1379,8 +1603,41 @@
"unique-string": "^2.0.0",
"write-file-atomic": "^3.0.0",
"xdg-basedir": "^4.0.0"
+ },
+ "dependencies": {
+ "dot-prop": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz",
+ "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==",
+ "requires": {
+ "is-obj": "^2.0.0"
+ }
+ },
+ "is-obj": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
+ "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w=="
+ },
+ "make-dir": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz",
+ "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==",
+ "requires": {
+ "semver": "^6.0.0"
+ }
+ },
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
+ }
}
},
+ "console-control-strings": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
+ "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
+ },
"constant-case": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.3.tgz",
@@ -1464,6 +1721,17 @@
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
+ "cosmiconfig": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz",
+ "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==",
+ "requires": {
+ "import-fresh": "^2.0.0",
+ "is-directory": "^0.3.1",
+ "js-yaml": "^3.13.1",
+ "parse-json": "^4.0.0"
+ }
+ },
"create-error-class": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz",
@@ -1544,6 +1812,13 @@
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
+ },
+ "dependencies": {
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ }
}
},
"debuglog": {
@@ -1569,6 +1844,11 @@
"mimic-response": "^1.0.0"
}
},
+ "dedent": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz",
+ "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw="
+ },
"deep-equal": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz",
@@ -1651,6 +1931,11 @@
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"dev": true
},
+ "delegates": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
+ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
+ },
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
@@ -1662,6 +1947,11 @@
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=",
"dev": true
},
+ "detect-indent": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz",
+ "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50="
+ },
"dezalgo": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz",
@@ -1743,18 +2033,11 @@
}
},
"dot-prop": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz",
- "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==",
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
+ "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==",
"requires": {
- "is-obj": "^2.0.0"
- },
- "dependencies": {
- "is-obj": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w=="
- }
+ "is-obj": "^1.0.0"
}
},
"duplex": {
@@ -2059,11 +2342,6 @@
"requires": {
"is-extendable": "^0.1.0"
}
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
@@ -2113,12 +2391,6 @@
"requires": {
"ms": "2.0.0"
}
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
}
}
},
@@ -2234,16 +2506,37 @@
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
},
"fast-glob": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.2.tgz",
- "integrity": "sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A==",
- "requires": {
- "@nodelib/fs.stat": "^2.0.2",
- "@nodelib/fs.walk": "^1.2.3",
- "glob-parent": "^5.1.0",
- "merge2": "^1.3.0",
- "micromatch": "^4.0.2",
- "picomatch": "^2.2.1"
+ "version": "2.2.7",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
+ "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==",
+ "requires": {
+ "@mrmlnc/readdir-enhanced": "^2.2.1",
+ "@nodelib/fs.stat": "^1.1.2",
+ "glob-parent": "^3.1.0",
+ "is-glob": "^4.0.0",
+ "merge2": "^1.2.3",
+ "micromatch": "^3.1.10"
+ },
+ "dependencies": {
+ "glob-parent": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
+ "requires": {
+ "is-glob": "^3.1.0",
+ "path-dirname": "^1.0.0"
+ },
+ "dependencies": {
+ "is-glob": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+ "requires": {
+ "is-extglob": "^2.1.0"
+ }
+ }
+ }
+ }
}
},
"fast-json-patch": {
@@ -2288,11 +2581,24 @@
}
},
"fill-range": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
"requires": {
- "to-regex-range": "^5.0.1"
+ "extend-shallow": "^2.0.1",
+ "is-number": "^3.0.0",
+ "repeat-string": "^1.6.1",
+ "to-regex-range": "^2.1.0"
+ },
+ "dependencies": {
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ }
}
},
"finalhandler": {
@@ -2318,21 +2624,16 @@
"requires": {
"ms": "2.0.0"
}
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
}
}
},
"find-up": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
- "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"requires": {
- "locate-path": "^3.0.0"
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
}
},
"first-chunk-stream": {
@@ -2447,6 +2748,21 @@
"@livereach/jsonpath": "^1.2.2"
}
},
+ "gauge": {
+ "version": "2.7.4",
+ "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
+ "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
+ "requires": {
+ "aproba": "^1.0.3",
+ "console-control-strings": "^1.0.0",
+ "has-unicode": "^2.0.0",
+ "object-assign": "^4.1.0",
+ "signal-exit": "^3.0.0",
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1",
+ "wide-align": "^1.1.0"
+ }
+ },
"get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
@@ -2589,148 +2905,6 @@
"ignore": "^4.0.3",
"pify": "^4.0.1",
"slash": "^2.0.0"
- },
- "dependencies": {
- "@nodelib/fs.stat": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz",
- "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw=="
- },
- "array-union": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
- "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
- "requires": {
- "array-uniq": "^1.0.1"
- }
- },
- "braces": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
- "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
- "requires": {
- "arr-flatten": "^1.1.0",
- "array-unique": "^0.3.2",
- "extend-shallow": "^2.0.1",
- "fill-range": "^4.0.0",
- "isobject": "^3.0.1",
- "repeat-element": "^1.1.2",
- "snapdragon": "^0.8.1",
- "snapdragon-node": "^2.0.1",
- "split-string": "^3.0.2",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "fast-glob": {
- "version": "2.2.7",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
- "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==",
- "requires": {
- "@mrmlnc/readdir-enhanced": "^2.2.1",
- "@nodelib/fs.stat": "^1.1.2",
- "glob-parent": "^3.1.0",
- "is-glob": "^4.0.0",
- "merge2": "^1.2.3",
- "micromatch": "^3.1.10"
- }
- },
- "fill-range": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
- "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
- "requires": {
- "extend-shallow": "^2.0.1",
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1",
- "to-regex-range": "^2.1.0"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "glob-parent": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
- "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
- "requires": {
- "is-glob": "^3.1.0",
- "path-dirname": "^1.0.0"
- },
- "dependencies": {
- "is-glob": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
- "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
- "requires": {
- "is-extglob": "^2.1.0"
- }
- }
- }
- },
- "is-number": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
- "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
- "requires": {
- "kind-of": "^3.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "micromatch": {
- "version": "3.1.10",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
- "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
- "requires": {
- "arr-diff": "^4.0.0",
- "array-unique": "^0.3.2",
- "braces": "^2.3.1",
- "define-property": "^2.0.2",
- "extend-shallow": "^3.0.2",
- "extglob": "^2.0.4",
- "fragment-cache": "^0.2.1",
- "kind-of": "^6.0.2",
- "nanomatch": "^1.2.9",
- "object.pick": "^1.3.0",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.2"
- }
- },
- "to-regex-range": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
- "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
- "requires": {
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1"
- }
- }
}
},
"got": {
@@ -2831,6 +3005,11 @@
"integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
"dev": true
},
+ "has-unicode": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
+ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
+ },
"has-value": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
@@ -2850,24 +3029,6 @@
"kind-of": "^4.0.0"
},
"dependencies": {
- "is-number": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
- "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
- "requires": {
- "kind-of": "^3.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
"kind-of": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
@@ -2893,12 +3054,9 @@
}
},
"hosted-git-info": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.4.tgz",
- "integrity": "sha512-4oT62d2jwSDBbLLFLZE+1vPuQ1h8p9wjrJ8Mqx5TjsyWmBMV5B13eJqn8pvluqubLf3cJPTfiYCIwNwDNmzScQ==",
- "requires": {
- "lru-cache": "^5.1.1"
- }
+ "version": "2.8.8",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
+ "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg=="
},
"htmlparser2": {
"version": "3.10.1",
@@ -3050,6 +3208,22 @@
"minimatch": "^3.0.4"
}
},
+ "import-fresh": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
+ "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=",
+ "requires": {
+ "caller-path": "^2.0.0",
+ "resolve-from": "^3.0.0"
+ },
+ "dependencies": {
+ "resolve-from": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
+ "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g="
+ }
+ }
+ },
"import-lazy": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz",
@@ -3115,6 +3289,11 @@
"through": "^2.3.6"
},
"dependencies": {
+ "ansi-regex": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
+ },
"chalk": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
@@ -3123,6 +3302,99 @@
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
+ },
+ "string-width": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ }
+ }
+ },
+ "inquirer-autocomplete-prompt": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/inquirer-autocomplete-prompt/-/inquirer-autocomplete-prompt-1.0.2.tgz",
+ "integrity": "sha512-vNmAhhrOQwPnUm4B9kz1UB7P98rVF1z8txnjp53r40N0PBCuqoRWqjg3Tl0yz0UkDg7rEUtZ2OZpNc7jnOU9Zw==",
+ "requires": {
+ "ansi-escapes": "^3.0.0",
+ "chalk": "^2.0.0",
+ "figures": "^2.0.0",
+ "run-async": "^2.3.0"
+ },
+ "dependencies": {
+ "ansi-escapes": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz",
+ "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ=="
+ },
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
+ },
+ "figures": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
+ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=",
+ "requires": {
+ "escape-string-regexp": "^1.0.5"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
}
}
},
@@ -3245,6 +3517,11 @@
}
}
},
+ "is-directory": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
+ "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE="
+ },
"is-extendable": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
@@ -3256,9 +3533,12 @@
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
},
"is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+ "requires": {
+ "number-is-nan": "^1.0.0"
+ }
},
"is-glob": {
"version": "4.0.1",
@@ -3293,9 +3573,22 @@
"integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig=="
},
"is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+ "requires": {
+ "kind-of": "^3.0.2"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ }
+ }
},
"is-obj": {
"version": "1.0.1",
@@ -3654,13 +3947,24 @@
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
"integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA="
},
+ "load-json-file": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz",
+ "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==",
+ "requires": {
+ "graceful-fs": "^4.1.15",
+ "parse-json": "^4.0.0",
+ "pify": "^4.0.1",
+ "strip-bom": "^3.0.0",
+ "type-fest": "^0.3.0"
+ }
+ },
"locate-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
- "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"requires": {
- "p-locate": "^3.0.0",
- "path-exists": "^3.0.0"
+ "p-locate": "^4.1.0"
}
},
"lodash": {
@@ -3855,12 +4159,6 @@
"minimist": "^1.2.5"
}
},
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
- },
"os-locale": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
@@ -4004,6 +4302,12 @@
"minimist": "^1.2.5"
}
},
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
"os-locale": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
@@ -4102,6 +4406,12 @@
"requires": {
"ms": "^2.1.1"
}
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
}
}
},
@@ -4160,6 +4470,12 @@
"minimist": "^1.2.5"
}
},
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
"os-locale": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
@@ -4222,17 +4538,17 @@
}
},
"make-dir": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz",
- "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==",
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
+ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
"requires": {
- "semver": "^6.0.0"
+ "pify": "^3.0.0"
},
"dependencies": {
- "semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
}
}
},
@@ -4410,12 +4726,23 @@
"dev": true
},
"micromatch": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
- "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
+ "version": "3.1.10",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
"requires": {
- "braces": "^3.0.1",
- "picomatch": "^2.0.5"
+ "arr-diff": "^4.0.0",
+ "array-unique": "^0.3.2",
+ "braces": "^2.3.1",
+ "define-property": "^2.0.2",
+ "extend-shallow": "^3.0.2",
+ "extglob": "^2.0.4",
+ "fragment-cache": "^0.2.1",
+ "kind-of": "^6.0.2",
+ "nanomatch": "^1.2.9",
+ "object.pick": "^1.3.0",
+ "regex-not": "^1.0.0",
+ "snapdragon": "^0.8.1",
+ "to-regex": "^3.0.2"
}
},
"mime": {
@@ -4625,9 +4952,9 @@
}
},
"ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"msgpack-js": {
"version": "0.3.0",
@@ -4697,6 +5024,13 @@
"array-union": "^2.1.0",
"arrify": "^2.0.1",
"minimatch": "^3.0.4"
+ },
+ "dependencies": {
+ "array-union": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
+ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw=="
+ }
}
},
"mute-stream": {
@@ -4886,11 +5220,6 @@
"validate-npm-package-license": "^3.0.1"
},
"dependencies": {
- "hosted-git-info": {
- "version": "2.8.8",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
- "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg=="
- },
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
@@ -4925,13 +5254,21 @@
"integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA=="
},
"npm-package-arg": {
- "version": "8.0.1",
- "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-8.0.1.tgz",
- "integrity": "sha512-/h5Fm6a/exByzFSTm7jAyHbgOqErl9qSNJDQF32Si/ZzgwT2TERVxRxn3Jurw1wflgyVVAxnFR4fRHPM7y1ClQ==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz",
+ "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==",
"requires": {
- "hosted-git-info": "^3.0.2",
- "semver": "^7.0.0",
+ "hosted-git-info": "^2.7.1",
+ "osenv": "^0.1.5",
+ "semver": "^5.6.0",
"validate-npm-package-name": "^3.0.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
+ }
}
},
"npm-packlist": {
@@ -4953,6 +5290,26 @@
"npm-install-checks": "^4.0.0",
"npm-package-arg": "^8.0.0",
"semver": "^7.0.0"
+ },
+ "dependencies": {
+ "hosted-git-info": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.4.tgz",
+ "integrity": "sha512-4oT62d2jwSDBbLLFLZE+1vPuQ1h8p9wjrJ8Mqx5TjsyWmBMV5B13eJqn8pvluqubLf3cJPTfiYCIwNwDNmzScQ==",
+ "requires": {
+ "lru-cache": "^5.1.1"
+ }
+ },
+ "npm-package-arg": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-8.0.1.tgz",
+ "integrity": "sha512-/h5Fm6a/exByzFSTm7jAyHbgOqErl9qSNJDQF32Si/ZzgwT2TERVxRxn3Jurw1wflgyVVAxnFR4fRHPM7y1ClQ==",
+ "requires": {
+ "hosted-git-info": "^3.0.2",
+ "semver": "^7.0.0",
+ "validate-npm-package-name": "^3.0.0"
+ }
+ }
}
},
"npm-registry-fetch": {
@@ -4968,6 +5325,26 @@
"minipass-json-stream": "^1.0.1",
"minizlib": "^2.0.0",
"npm-package-arg": "^8.0.0"
+ },
+ "dependencies": {
+ "hosted-git-info": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.4.tgz",
+ "integrity": "sha512-4oT62d2jwSDBbLLFLZE+1vPuQ1h8p9wjrJ8Mqx5TjsyWmBMV5B13eJqn8pvluqubLf3cJPTfiYCIwNwDNmzScQ==",
+ "requires": {
+ "lru-cache": "^5.1.1"
+ }
+ },
+ "npm-package-arg": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-8.0.1.tgz",
+ "integrity": "sha512-/h5Fm6a/exByzFSTm7jAyHbgOqErl9qSNJDQF32Si/ZzgwT2TERVxRxn3Jurw1wflgyVVAxnFR4fRHPM7y1ClQ==",
+ "requires": {
+ "hosted-git-info": "^3.0.2",
+ "semver": "^7.0.0",
+ "validate-npm-package-name": "^3.0.0"
+ }
+ }
}
},
"npm-run-path": {
@@ -4978,6 +5355,22 @@
"path-key": "^2.0.0"
}
},
+ "npmlog": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
+ "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
+ "requires": {
+ "are-we-there-yet": "~1.1.2",
+ "console-control-strings": "~1.1.0",
+ "gauge": "~2.7.3",
+ "set-blocking": "~2.0.0"
+ }
+ },
+ "number-is-nan": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
+ },
"oas-kit-common": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz",
@@ -5035,6 +5428,11 @@
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
"dev": true
},
+ "object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
+ },
"object-copy": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
@@ -5187,6 +5585,11 @@
"integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=",
"dev": true
},
+ "os-homedir": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
+ },
"os-locale": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-4.0.0.tgz",
@@ -5202,6 +5605,15 @@
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
},
+ "osenv": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
+ "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
+ "requires": {
+ "os-homedir": "^1.0.0",
+ "os-tmpdir": "^1.0.0"
+ }
+ },
"p-cancelable": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",
@@ -5239,20 +5651,17 @@
}
},
"p-locate": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
- "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"requires": {
- "p-limit": "^2.0.0"
+ "p-limit": "^2.2.0"
}
},
"p-map": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz",
- "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==",
- "requires": {
- "aggregate-error": "^3.0.0"
- }
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz",
+ "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw=="
},
"p-timeout": {
"version": "2.0.1",
@@ -5315,6 +5724,24 @@
"which": "^2.0.2"
},
"dependencies": {
+ "hosted-git-info": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.4.tgz",
+ "integrity": "sha512-4oT62d2jwSDBbLLFLZE+1vPuQ1h8p9wjrJ8Mqx5TjsyWmBMV5B13eJqn8pvluqubLf3cJPTfiYCIwNwDNmzScQ==",
+ "requires": {
+ "lru-cache": "^5.1.1"
+ }
+ },
+ "npm-package-arg": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-8.0.1.tgz",
+ "integrity": "sha512-/h5Fm6a/exByzFSTm7jAyHbgOqErl9qSNJDQF32Si/ZzgwT2TERVxRxn3Jurw1wflgyVVAxnFR4fRHPM7y1ClQ==",
+ "requires": {
+ "hosted-git-info": "^3.0.2",
+ "semver": "^7.0.0",
+ "validate-npm-package-name": "^3.0.0"
+ }
+ },
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@@ -5335,14 +5762,12 @@
}
},
"parse-json": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz",
- "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
+ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
"requires": {
- "@babel/code-frame": "^7.0.0",
"error-ex": "^1.3.1",
- "json-parse-better-errors": "^1.0.1",
- "lines-and-columns": "^1.1.6"
+ "json-parse-better-errors": "^1.0.1"
}
},
"parseurl": {
@@ -5380,9 +5805,9 @@
"integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA="
},
"path-exists": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="
},
"path-is-absolute": {
"version": "1.0.1",
@@ -5614,6 +6039,17 @@
"type-fest": "^0.6.0"
},
"dependencies": {
+ "parse-json": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz",
+ "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==",
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "error-ex": "^1.3.1",
+ "json-parse-better-errors": "^1.0.1",
+ "lines-and-columns": "^1.1.6"
+ }
+ },
"type-fest": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz",
@@ -5628,6 +6064,38 @@
"requires": {
"find-up": "^3.0.0",
"read-pkg": "^5.0.0"
+ },
+ "dependencies": {
+ "find-up": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "requires": {
+ "locate-path": "^3.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+ "requires": {
+ "p-locate": "^3.0.0",
+ "path-exists": "^3.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+ "requires": {
+ "p-limit": "^2.0.0"
+ }
+ },
+ "path-exists": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
+ }
}
},
"readable-stream": {
@@ -5787,6 +6255,11 @@
"path-parse": "^1.0.6"
}
},
+ "resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="
+ },
"resolve-url": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
@@ -6205,11 +6678,6 @@
"requires": {
"is-extendable": "^0.1.0"
}
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
@@ -6296,6 +6764,14 @@
"socks": "^2.3.3"
}
},
+ "sort-keys": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz",
+ "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=",
+ "requires": {
+ "is-plain-obj": "^1.0.0"
+ }
+ },
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
@@ -6346,6 +6822,11 @@
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
"integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q=="
},
+ "spdx-license-list": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/spdx-license-list/-/spdx-license-list-6.1.0.tgz",
+ "integrity": "sha512-xiaE3KtBiylVmZrlux8tHR28HZgZ921HTXbx2fEZaDloRjbBOro79LeKttcQJ5MSDYFKG7in9v2GTAEhcR9/Qg=="
+ },
"split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
@@ -6453,33 +6934,55 @@
"integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0="
},
"string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ }
+ },
+ "string.prototype.trimend": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.0.tgz",
+ "integrity": "sha512-EEJnGqa/xNfIg05SxiPSqRS7S9qwDhYts1TSLR1BQfYUfPe1stofgGKvwERK9+9yf+PpfBMlpBaCHucXGPQfUA==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5"
}
},
"string.prototype.trimleft": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz",
- "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz",
+ "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
- "function-bind": "^1.1.1"
+ "es-abstract": "^1.17.5",
+ "string.prototype.trimstart": "^1.0.0"
}
},
"string.prototype.trimright": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz",
- "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz",
+ "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
- "function-bind": "^1.1.1"
+ "es-abstract": "^1.17.5",
+ "string.prototype.trimend": "^1.0.0"
+ }
+ },
+ "string.prototype.trimstart": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.0.tgz",
+ "integrity": "sha512-iCP8g01NFYiiBOnwG1Xc3WZLyoo+RuBymwIlWncShXDDJYWN6DbnM3odslBJdgCdRlq94B5s63NWAZlcn2CS4w==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5"
}
},
"string_decoder": {
@@ -6501,20 +7004,17 @@
}
},
"strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
- "ansi-regex": "^5.0.0"
+ "ansi-regex": "^2.0.0"
}
},
"strip-bom": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
- "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
- "requires": {
- "is-utf8": "^0.2.0"
- }
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM="
},
"strip-bom-stream": {
"version": "2.0.0",
@@ -6523,6 +7023,16 @@
"requires": {
"first-chunk-stream": "^2.0.0",
"strip-bom": "^2.0.0"
+ },
+ "dependencies": {
+ "strip-bom": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
+ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
+ "requires": {
+ "is-utf8": "^0.2.0"
+ }
+ }
}
},
"strip-eof": {
@@ -6844,11 +7354,12 @@
}
},
"to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
+ "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
"requires": {
- "is-number": "^7.0.0"
+ "is-number": "^3.0.0",
+ "repeat-string": "^1.6.1"
}
},
"to-utf8": {
@@ -6925,9 +7436,9 @@
"dev": true
},
"type-fest": {
- "version": "0.11.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz",
- "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ=="
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz",
+ "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ=="
},
"type-is": {
"version": "1.6.18",
@@ -7307,6 +7818,14 @@
"resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz",
"integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ="
},
+ "strip-bom": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
+ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
+ "requires": {
+ "is-utf8": "^0.2.0"
+ }
+ },
"vinyl": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz",
@@ -7338,12 +7857,50 @@
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
},
+ "wide-align": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
+ "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
+ "requires": {
+ "string-width": "^1.0.2 || 2"
+ }
+ },
"widest-line": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz",
"integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==",
"requires": {
"string-width": "^4.0.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
+ },
+ "string-width": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ }
}
},
"with-open-file": {
@@ -7382,6 +7939,36 @@
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
+ },
+ "string-width": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ }
}
},
"wrappy": {
@@ -7400,6 +7987,84 @@
"typedarray-to-buffer": "^3.1.5"
}
},
+ "write-json-file": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-3.2.0.tgz",
+ "integrity": "sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ==",
+ "requires": {
+ "detect-indent": "^5.0.0",
+ "graceful-fs": "^4.1.15",
+ "make-dir": "^2.1.0",
+ "pify": "^4.0.1",
+ "sort-keys": "^2.0.0",
+ "write-file-atomic": "^2.4.2"
+ },
+ "dependencies": {
+ "make-dir": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
+ "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
+ "requires": {
+ "pify": "^4.0.1",
+ "semver": "^5.6.0"
+ }
+ },
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
+ },
+ "write-file-atomic": {
+ "version": "2.4.3",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz",
+ "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==",
+ "requires": {
+ "graceful-fs": "^4.1.11",
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^3.0.2"
+ }
+ }
+ }
+ },
+ "write-pkg": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.2.0.tgz",
+ "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==",
+ "requires": {
+ "sort-keys": "^2.0.0",
+ "write-json-file": "^2.2.0"
+ },
+ "dependencies": {
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
+ },
+ "write-file-atomic": {
+ "version": "2.4.3",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz",
+ "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==",
+ "requires": {
+ "graceful-fs": "^4.1.11",
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^3.0.2"
+ }
+ },
+ "write-json-file": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-2.3.0.tgz",
+ "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=",
+ "requires": {
+ "detect-indent": "^5.0.0",
+ "graceful-fs": "^4.1.2",
+ "make-dir": "^1.0.0",
+ "pify": "^3.0.0",
+ "sort-keys": "^2.0.0",
+ "write-file-atomic": "^2.0.0"
+ }
+ }
+ }
+ },
"xdg-basedir": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz",
@@ -7477,35 +8142,33 @@
"yargs-parser": "^18.1.1"
},
"dependencies": {
- "find-up": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
- "requires": {
- "locate-path": "^5.0.0",
- "path-exists": "^4.0.0"
- }
- },
- "locate-path": {
+ "ansi-regex": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
+ },
+ "string-width": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
"requires": {
- "p-locate": "^4.1.0"
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.0"
}
},
- "p-locate": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"requires": {
- "p-limit": "^2.2.0"
+ "ansi-regex": "^5.0.0"
}
- },
- "path-exists": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
- "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="
}
}
},
@@ -7546,11 +8209,6 @@
"untildify": "^3.0.3"
},
"dependencies": {
- "@nodelib/fs.stat": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz",
- "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw=="
- },
"ansi-escapes": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz",
@@ -7569,46 +8227,11 @@
"color-convert": "^1.9.0"
}
},
- "array-union": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
- "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
- "requires": {
- "array-uniq": "^1.0.1"
- }
- },
"arrify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0="
},
- "braces": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
- "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
- "requires": {
- "arr-flatten": "^1.1.0",
- "array-unique": "^0.3.2",
- "extend-shallow": "^2.0.1",
- "fill-range": "^4.0.0",
- "isobject": "^3.0.1",
- "repeat-element": "^1.1.2",
- "snapdragon": "^0.8.1",
- "snapdragon-node": "^2.0.1",
- "split-string": "^3.0.2",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
@@ -7662,19 +8285,6 @@
"path-type": "^3.0.0"
}
},
- "fast-glob": {
- "version": "2.2.7",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
- "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==",
- "requires": {
- "@mrmlnc/readdir-enhanced": "^2.2.1",
- "@nodelib/fs.stat": "^1.1.2",
- "glob-parent": "^3.1.0",
- "is-glob": "^4.0.0",
- "merge2": "^1.2.3",
- "micromatch": "^3.1.10"
- }
- },
"figures": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
@@ -7683,46 +8293,6 @@
"escape-string-regexp": "^1.0.5"
}
},
- "fill-range": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
- "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
- "requires": {
- "extend-shallow": "^2.0.1",
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1",
- "to-regex-range": "^2.1.0"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "glob-parent": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
- "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
- "requires": {
- "is-glob": "^3.1.0",
- "path-dirname": "^1.0.0"
- },
- "dependencies": {
- "is-glob": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
- "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
- "requires": {
- "is-extglob": "^2.1.0"
- }
- }
- }
- },
"globby": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz",
@@ -7787,49 +8357,16 @@
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
- "is-number": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
- "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
- "requires": {
- "kind-of": "^3.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "micromatch": {
- "version": "3.1.10",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
- "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
- "requires": {
- "arr-diff": "^4.0.0",
- "array-unique": "^0.3.2",
- "braces": "^2.3.1",
- "define-property": "^2.0.2",
- "extend-shallow": "^3.0.2",
- "extglob": "^2.0.4",
- "fragment-cache": "^0.2.1",
- "kind-of": "^6.0.2",
- "nanomatch": "^1.2.9",
- "object.pick": "^1.3.0",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.2"
- }
- },
"mimic-fn": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="
},
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
"mute-stream": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
@@ -7887,15 +8424,6 @@
"has-flag": "^3.0.0"
}
},
- "to-regex-range": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
- "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
- "requires": {
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1"
- }
- },
"untildify": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.3.tgz",
@@ -7966,11 +8494,49 @@
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
+ "find-up": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "requires": {
+ "locate-path": "^3.0.0"
+ }
+ },
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
+ "locate-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+ "requires": {
+ "p-locate": "^3.0.0",
+ "path-exists": "^3.0.0"
+ }
+ },
+ "make-dir": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz",
+ "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==",
+ "requires": {
+ "semver": "^6.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+ "requires": {
+ "p-limit": "^2.0.0"
+ }
+ },
+ "path-exists": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
+ },
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@@ -7979,6 +8545,11 @@
"glob": "^7.1.3"
}
},
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
+ },
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 975bf4b18dbd..6bc12c0cbed6 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -42,13 +42,16 @@
"yeoman-test": "~2.2.0"
},
"dependencies": {
+ "@lerna/project": "^3.18.0",
"@phenomnomnominal/tsquery": "^4.0.0",
"camelcase-keys": "^6.2.1",
"chalk": "^4.0.0",
"change-case": "^4.1.1",
"debug": "^4.1.1",
"fs-extra": "^9.0.0",
+ "glob": "^7.1.6",
"inquirer": "~7.0.7",
+ "inquirer-autocomplete-prompt": "^1.0.2",
"json5": "^2.1.2",
"latest-version": "^5.1.0",
"lodash": "^4.17.15",
@@ -60,6 +63,7 @@
"pluralize": "^8.0.0",
"regenerate": "^1.4.0",
"semver": "^7.1.3",
+ "spdx-license-list": "^6.1.0",
"stringify-object": "^3.3.0",
"strong-globalize": "^5.0.5",
"swagger-parser": "^9.0.1",
diff --git a/packages/cli/snapshots/integration/cli/cli.integration.snapshots.js b/packages/cli/snapshots/integration/cli/cli.integration.snapshots.js
index ff00cc442e51..98c55ab91318 100644
--- a/packages/cli/snapshots/integration/cli/cli.integration.snapshots.js
+++ b/packages/cli/snapshots/integration/cli/cli.integration.snapshots.js
@@ -25,6 +25,7 @@ Available commands:
lb4 relation
lb4 update
lb4 rest-crud
+ lb4 copyright
`;
@@ -46,4 +47,5 @@ Available commands:
lb4 relation
lb4 update
lb4 rest-crud
+ lb4 copyright
`;
diff --git a/packages/cli/test/fixtures/copyright/index.js b/packages/cli/test/fixtures/copyright/index.js
new file mode 100644
index 000000000000..03fdf017dd41
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/index.js
@@ -0,0 +1,27 @@
+// Copyright IBM Corp. 2020. All Rights Reserved.
+// Node module: @loopback/cli
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+const fs = require('fs');
+const path = require('path');
+const glob = require('glob');
+
+function mapFile(cwd, file) {
+ const dir = path.dirname(file);
+ const name = path.basename(file);
+ return {
+ path: dir,
+ file: name,
+ content: fs.readFileSync(path.join(cwd, file), {
+ encoding: 'utf-8',
+ }),
+ };
+}
+
+module.exports = function discoverFiles(cwd) {
+ return glob
+ .sync('**/*.{js,ts,json}', {nodir: true, cwd})
+ .filter(f => f !== 'index.js')
+ .map(f => mapFile(cwd, f));
+};
diff --git a/packages/cli/test/fixtures/copyright/monorepo/index.js b/packages/cli/test/fixtures/copyright/monorepo/index.js
new file mode 100644
index 000000000000..0e1a3d9cb25d
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/monorepo/index.js
@@ -0,0 +1,7 @@
+// Copyright IBM Corp. 2020. All Rights Reserved.
+// Node module: @loopback/cli
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+// Use the same set of files (except index.js) in this folder
+exports.SANDBOX_FILES = require('../index')(__dirname);
diff --git a/packages/cli/test/fixtures/copyright/monorepo/lerna.json b/packages/cli/test/fixtures/copyright/monorepo/lerna.json
new file mode 100644
index 000000000000..0729dbad2736
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/monorepo/lerna.json
@@ -0,0 +1,7 @@
+{
+ "lerna": "3.3.0",
+ "packages": [
+ "packages/*"
+ ],
+ "version": "independent"
+}
diff --git a/packages/cli/test/fixtures/copyright/monorepo/lib/no-header.js b/packages/cli/test/fixtures/copyright/monorepo/lib/no-header.js
new file mode 100644
index 000000000000..da38b578c9f1
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/monorepo/lib/no-header.js
@@ -0,0 +1,4 @@
+#!/usr/bin/env node
+
+// XYZ
+exports.xyz = {};
diff --git a/packages/cli/test/fixtures/copyright/monorepo/package.json b/packages/cli/test/fixtures/copyright/monorepo/package.json
new file mode 100644
index 000000000000..985d5198c4e7
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/monorepo/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "mymonorepo",
+ "copyright.owner": "ACME Inc.",
+ "license": "MIT"
+}
diff --git a/packages/cli/test/fixtures/copyright/monorepo/packages/pkg1/lib/no-header.js b/packages/cli/test/fixtures/copyright/monorepo/packages/pkg1/lib/no-header.js
new file mode 100644
index 000000000000..da38b578c9f1
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/monorepo/packages/pkg1/lib/no-header.js
@@ -0,0 +1,4 @@
+#!/usr/bin/env node
+
+// XYZ
+exports.xyz = {};
diff --git a/packages/cli/test/fixtures/copyright/monorepo/packages/pkg1/package.json b/packages/cli/test/fixtures/copyright/monorepo/packages/pkg1/package.json
new file mode 100644
index 000000000000..b04f995d23b2
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/monorepo/packages/pkg1/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "pkg1",
+ "copyright.owner": "ACME Inc.",
+ "license": "Apache-2.0"
+}
diff --git a/packages/cli/test/fixtures/copyright/monorepo/packages/pkg1/src/application.ts b/packages/cli/test/fixtures/copyright/monorepo/packages/pkg1/src/application.ts
new file mode 100644
index 000000000000..65c6da999855
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/monorepo/packages/pkg1/src/application.ts
@@ -0,0 +1,6 @@
+// Copyright IBM Corp. 2019. All Rights Reserved.
+// Node module: myapp
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+export class MyApplication {}
diff --git a/packages/cli/test/fixtures/copyright/monorepo/packages/pkg2/lib/no-header.js b/packages/cli/test/fixtures/copyright/monorepo/packages/pkg2/lib/no-header.js
new file mode 100644
index 000000000000..da38b578c9f1
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/monorepo/packages/pkg2/lib/no-header.js
@@ -0,0 +1,4 @@
+#!/usr/bin/env node
+
+// XYZ
+exports.xyz = {};
diff --git a/packages/cli/test/fixtures/copyright/monorepo/packages/pkg2/package.json b/packages/cli/test/fixtures/copyright/monorepo/packages/pkg2/package.json
new file mode 100644
index 000000000000..26114a8bfec4
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/monorepo/packages/pkg2/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "pkg2",
+ "author": "ACME Inc.",
+ "license": "ISC"
+}
diff --git a/packages/cli/test/fixtures/copyright/monorepo/packages/pkg2/src/application.ts b/packages/cli/test/fixtures/copyright/monorepo/packages/pkg2/src/application.ts
new file mode 100644
index 000000000000..65c6da999855
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/monorepo/packages/pkg2/src/application.ts
@@ -0,0 +1,6 @@
+// Copyright IBM Corp. 2019. All Rights Reserved.
+// Node module: myapp
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+export class MyApplication {}
diff --git a/packages/cli/test/fixtures/copyright/single-package/.yo-rc.json b/packages/cli/test/fixtures/copyright/single-package/.yo-rc.json
new file mode 100644
index 000000000000..2c63c0851048
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/single-package/.yo-rc.json
@@ -0,0 +1,2 @@
+{
+}
diff --git a/packages/cli/test/fixtures/copyright/single-package/index.js b/packages/cli/test/fixtures/copyright/single-package/index.js
new file mode 100644
index 000000000000..0e1a3d9cb25d
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/single-package/index.js
@@ -0,0 +1,7 @@
+// Copyright IBM Corp. 2020. All Rights Reserved.
+// Node module: @loopback/cli
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+// Use the same set of files (except index.js) in this folder
+exports.SANDBOX_FILES = require('../index')(__dirname);
diff --git a/packages/cli/test/fixtures/copyright/single-package/lib/no-header.js b/packages/cli/test/fixtures/copyright/single-package/lib/no-header.js
new file mode 100644
index 000000000000..4ed25f524c47
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/single-package/lib/no-header.js
@@ -0,0 +1,2 @@
+// XYZ
+exports.xyz = {};
diff --git a/packages/cli/test/fixtures/copyright/single-package/package.json b/packages/cli/test/fixtures/copyright/single-package/package.json
new file mode 100644
index 000000000000..15f8d1b0e803
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/single-package/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "myapp",
+ "copyright.owner": "ACME Inc.",
+ "license": "MIT"
+}
diff --git a/packages/cli/test/fixtures/copyright/single-package/src/application.ts b/packages/cli/test/fixtures/copyright/single-package/src/application.ts
new file mode 100644
index 000000000000..cd003e7cb1f2
--- /dev/null
+++ b/packages/cli/test/fixtures/copyright/single-package/src/application.ts
@@ -0,0 +1,6 @@
+// Copyright IBM Corp. 2020. All Rights Reserved.
+// Node module: myapp
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+export class MyApplication {}
diff --git a/packages/cli/test/integration/generators/copyright-git.integration.js b/packages/cli/test/integration/generators/copyright-git.integration.js
new file mode 100644
index 000000000000..d01702f9d579
--- /dev/null
+++ b/packages/cli/test/integration/generators/copyright-git.integration.js
@@ -0,0 +1,91 @@
+// Copyright IBM Corp. 2020. All Rights Reserved.
+// Node module: @loopback/cli
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+'use strict';
+
+const path = require('path');
+const fs = require('fs-extra');
+const assert = require('yeoman-assert');
+const {git} = require('../../../generators/copyright/git');
+
+const generator = path.join(__dirname, '../../../generators/copyright');
+const {spdxLicenseList} = require('../../../generators/copyright/license');
+const FIXTURES = path.join(__dirname, '../../fixtures/copyright');
+const LOCATION = 'single-package';
+const PROJECT_ROOT = path.join(FIXTURES, LOCATION);
+const testUtils = require('../../test-utils');
+
+// Establish the year(s)
+let year = new Date().getFullYear();
+if (year !== 2020) year = `2020,${year}`;
+
+describe('lb4 copyright with git', function () {
+ // eslint-disable-next-line no-invalid-this
+ this.timeout(30000);
+
+ before('add files not tracked by git', async () => {
+ await fs.outputFile(
+ path.join(PROJECT_ROOT, '.sandbox/file-not-tracked.js'),
+ `
+// Copyright IBM Corp. 2020. All Rights Reserved.
+// Node module: @loopback/cli
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+function test() {}
+`,
+ );
+ });
+
+ after('reset sandbox', async () => {
+ await fs.remove(path.join(PROJECT_ROOT, '.sandbox'));
+ });
+
+ after('reset local changes ', async () => {
+ // Revert changes made by the test against git-tracked fixtures
+ await git(FIXTURES, `checkout -- ${LOCATION}`);
+ });
+
+ it('updates copyright/license headers with options', async () => {
+ await testUtils.executeGenerator(generator).cd(PROJECT_ROOT).withOptions({
+ owner: 'ACME Inc.',
+ license: 'ISC',
+ gitOnly: true,
+ // Set `localConfigOnly` to skip searching for `.yo-rc.json` to change
+ // the destination root
+ localConfigOnly: true,
+ });
+
+ // git tracked files are changed
+ assertHeader(
+ ['src/application.ts', 'lib/no-header.js'],
+ `// Copyright ACME Inc. ${year}. All Rights Reserved.`,
+ '// Node module: myapp',
+ `// This file is licensed under the ${spdxLicenseList['isc'].name}.`,
+ `// License text available at ${spdxLicenseList['isc'].url}`,
+ );
+
+ // non git-tracked files are not touched
+ assertHeader(
+ ['.sandbox/file-not-tracked.js'],
+ '// Copyright IBM Corp. 2020. All Rights Reserved.',
+ '// Node module: @loopback/cli',
+ '// This file is licensed under the MIT License.',
+ '// License text available at https://opensource.org/licenses/MIT',
+ );
+ });
+});
+
+function assertHeader(fileNames, ...expected) {
+ if (typeof fileNames === 'string') {
+ fileNames = [fileNames];
+ }
+ for (const f of fileNames) {
+ const file = path.join(FIXTURES, LOCATION, f);
+ for (const line of expected) {
+ assert.fileContent(file, line);
+ }
+ }
+}
diff --git a/packages/cli/test/integration/generators/copyright-monorepo.integration.js b/packages/cli/test/integration/generators/copyright-monorepo.integration.js
new file mode 100644
index 000000000000..85900d979c62
--- /dev/null
+++ b/packages/cli/test/integration/generators/copyright-monorepo.integration.js
@@ -0,0 +1,80 @@
+// Copyright IBM Corp. 2020. All Rights Reserved.
+// Node module: @loopback/cli
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+'use strict';
+
+const path = require('path');
+const assert = require('yeoman-assert');
+const testlab = require('@loopback/testlab');
+const TestSandbox = testlab.TestSandbox;
+
+const generator = path.join(__dirname, '../../../generators/copyright');
+const SANDBOX_FILES = require('../../fixtures/copyright/monorepo')
+ .SANDBOX_FILES;
+const testUtils = require('../../test-utils');
+const {spdxLicenseList} = require('../../../generators/copyright/license');
+
+// Test Sandbox
+const SANDBOX_PATH = path.resolve(__dirname, '..', '.sandbox');
+const sandbox = new TestSandbox(SANDBOX_PATH);
+
+const year = new Date().getFullYear();
+
+describe('lb4 copyright for monorepo', function () {
+ // eslint-disable-next-line no-invalid-this
+ this.timeout(30000);
+
+ beforeEach('reset sandbox', async () => {
+ await sandbox.reset();
+ });
+
+ it('updates copyright/license headers', async () => {
+ await testUtils
+ .executeGenerator(generator)
+ .inDir(SANDBOX_PATH, () =>
+ testUtils.givenLBProject(SANDBOX_PATH, {
+ excludePackageJSON: true,
+ additionalFiles: SANDBOX_FILES,
+ }),
+ )
+ .withOptions({gitOnly: false, owner: 'ACME Inc.', license: 'MIT'});
+ assertHeader(
+ ['packages/pkg1/src/application.ts', 'packages/pkg1/lib/no-header.js'],
+ `// Copyright ACME Inc. ${year}. All Rights Reserved.`,
+ `// Node module: pkg1`,
+ `// This file is licensed under the ${spdxLicenseList['apache-2.0'].name}.`,
+ `// License text available at ${spdxLicenseList['apache-2.0'].url}`,
+ );
+
+ assertHeader(
+ ['packages/pkg2/src/application.ts', 'packages/pkg2/lib/no-header.js'],
+ `// Copyright ACME Inc. ${year}. All Rights Reserved.`,
+ `// Node module: pkg2`,
+ `// This file is licensed under the ${spdxLicenseList['isc'].name}.`,
+ `// License text available at ${spdxLicenseList['isc'].url}`,
+ );
+
+ assertHeader(
+ ['lib/no-header.js'],
+ `#!/usr/bin/env node`,
+ `// Copyright ACME Inc. ${year}. All Rights Reserved.`,
+ `// Node module: mymonorepo`,
+ `// This file is licensed under the ${spdxLicenseList['mit'].name}.`,
+ `// License text available at ${spdxLicenseList['mit'].url}`,
+ );
+ });
+});
+
+function assertHeader(fileNames, ...expected) {
+ if (typeof fileNames === 'string') {
+ fileNames = [fileNames];
+ }
+ for (const f of fileNames) {
+ const file = path.join(SANDBOX_PATH, f);
+ for (const line of expected) {
+ assert.fileContent(file, line);
+ }
+ }
+}
diff --git a/packages/cli/test/integration/generators/copyright.integration.js b/packages/cli/test/integration/generators/copyright.integration.js
new file mode 100644
index 000000000000..49d794cf5e4b
--- /dev/null
+++ b/packages/cli/test/integration/generators/copyright.integration.js
@@ -0,0 +1,131 @@
+// Copyright IBM Corp. 2020. All Rights Reserved.
+// Node module: @loopback/cli
+// This file is licensed under the MIT License.
+// License text available at https://opensource.org/licenses/MIT
+
+'use strict';
+
+const path = require('path');
+const assert = require('yeoman-assert');
+const testlab = require('@loopback/testlab');
+const TestSandbox = testlab.TestSandbox;
+
+const generator = path.join(__dirname, '../../../generators/copyright');
+const {spdxLicenseList} = require('../../../generators/copyright/license');
+const SANDBOX_FILES = require('../../fixtures/copyright/single-package')
+ .SANDBOX_FILES;
+const testUtils = require('../../test-utils');
+
+// Test Sandbox
+const SANDBOX_PATH = path.resolve(__dirname, '..', '.sandbox');
+const sandbox = new TestSandbox(SANDBOX_PATH);
+
+const year = new Date().getFullYear();
+
+describe('lb4 copyright', function () {
+ // eslint-disable-next-line no-invalid-this
+ this.timeout(30000);
+
+ beforeEach('reset sandbox', async () => {
+ await sandbox.reset();
+ });
+
+ // FIXME(rfeng): https://www.npmjs.com/package/inquirer-autocomplete-prompt
+ // is not friendly with yeoman-test. The prompt cannot be skipped during tests.
+ it.skip('updates copyright/license headers with prompts', async () => {
+ await testUtils
+ .executeGenerator(generator)
+ .inDir(SANDBOX_PATH, () =>
+ testUtils.givenLBProject(SANDBOX_PATH, {
+ excludePackageJSON: true,
+ additionalFiles: SANDBOX_FILES,
+ }),
+ )
+ .withPrompts({owner: 'ACME Inc.', license: 'ISC'})
+ .withOptions({gitOnly: false});
+
+ assertHeader(
+ ['src/application.ts', 'lib/no-header.js'],
+ `// Copyright ACME Inc. ${year}. All Rights Reserved.`,
+ '// Node module: myapp',
+ `// This file is licensed under the ${spdxLicenseList['isc'].name}.`,
+ `// License text available at ${spdxLicenseList['isc'].url}`,
+ );
+ });
+
+ it('updates copyright/license headers with options', async () => {
+ await testUtils
+ .executeGenerator(generator)
+ .inDir(SANDBOX_PATH, () =>
+ testUtils.givenLBProject(SANDBOX_PATH, {
+ excludePackageJSON: true,
+ additionalFiles: SANDBOX_FILES,
+ }),
+ )
+ .withOptions({owner: 'ACME Inc.', license: 'ISC', gitOnly: false});
+
+ assertHeader(
+ ['src/application.ts', 'lib/no-header.js'],
+ `// Copyright ACME Inc. ${year}. All Rights Reserved.`,
+ '// Node module: myapp',
+ `// This file is licensed under the ${spdxLicenseList['isc'].name}.`,
+ `// License text available at ${spdxLicenseList['isc'].url}`,
+ );
+ });
+
+ it('updates LICENSE and package.json', async () => {
+ await testUtils
+ .executeGenerator(generator)
+ .inDir(SANDBOX_PATH, () =>
+ testUtils.givenLBProject(SANDBOX_PATH, {
+ excludePackageJSON: true,
+ additionalFiles: SANDBOX_FILES,
+ }),
+ )
+ .withOptions({
+ owner: 'ACME Inc.',
+ license: 'ISC',
+ gitOnly: false,
+ updateLicense: true,
+ });
+
+ assert.fileContent(
+ path.join(SANDBOX_PATH, 'package.json'),
+ '"license": "ISC"',
+ );
+ assert.fileContent(
+ path.join(SANDBOX_PATH, 'package.json'),
+ '"copyright.owner": "ACME Inc."',
+ );
+
+ /*
+ Copyright (c) ACME Inc. 2020. All Rights Reserved.
+ Node module: myapp
+
+ */
+ assert.fileContent(
+ path.join(SANDBOX_PATH, 'LICENSE'),
+ 'This project is licensed under the ISC License, full text below.',
+ );
+ assert.fileContent(
+ path.join(SANDBOX_PATH, 'LICENSE'),
+ `Copyright (c) ACME Inc. ${year}. All Rights Reserved.`,
+ );
+ assert.fileContent(
+ path.join(SANDBOX_PATH, 'LICENSE'),
+ 'Node module: myapp',
+ );
+ });
+});
+
+function assertHeader(fileNames, ...expected) {
+ if (typeof fileNames === 'string') {
+ fileNames = [fileNames];
+ }
+ for (const f of fileNames) {
+ const file = path.join(SANDBOX_PATH, f);
+ for (const line of expected) {
+ assert.fileContent(file, line);
+ }
+ }
+}
|