@sap/generator-cds
Advanced tools
Comparing version 1.0.0 to 1.0.10
@@ -6,31 +6,32 @@ const generatorMain = require('../lib/main/main'); | ||
options: ['--module-type', '--java-package', '--srv-technology'], | ||
flags: globalGeneratorOptions.flags, | ||
flags: [...globalGeneratorOptions.flags, '--insecure', '--skip-sample-models'], | ||
help:` | ||
# SYNOPSIS | ||
cds *add module* [ <name> ] | ||
cds-gen *add module* [ <name> ] | ||
Add an additional module to a project | ||
Add an additional module to a project. | ||
# OPTIONS | ||
*--module-type [type]* | ||
The type of the new module, valid values are db, srv and app | ||
*--module-type [type]* | ||
The type of the new module. Valid values are *db*, *srv* and *app*. | ||
*--srv-technology [<technology>]* | ||
The technology to use for the srv module (if specified ) | ||
Valid values: *java* and *nodejs* | ||
The technology to use for the srv module (if specified). | ||
Valid values are *java* and *nodejs*. | ||
*--java-package [<java package id>]* | ||
The package id for the java srv module (only needed if srv-technology is java) | ||
defaults to: *sample* | ||
` + globalGeneratorOptions.help + | ||
` | ||
The package ID for the java srv module (only required if srv-technology is java). | ||
Defaults to: *sample*. | ||
*--skip-sample-models* | ||
If present or set to true the generator will not create any sample code. | ||
${globalGeneratorOptions.help} | ||
# EXAMPLES | ||
@@ -41,2 +42,3 @@ | ||
*cds-gen* add module my-project/app | ||
`}) | ||
@@ -43,0 +45,0 @@ |
@@ -10,13 +10,10 @@ const generatorMain = require('../lib/main/main'); | ||
cds *apply* [ <extension_project> ] | ||
cds-gen *apply* [ <extension_project> ] | ||
Apply the extension project for a specific tenant | ||
Apply the extension project for a specific tenant. | ||
# OPTIONS | ||
` + globalGeneratorOptions.help + | ||
${globalGeneratorOptions.help} | ||
` | ||
# EXAMPLES | ||
@@ -26,3 +23,3 @@ | ||
*cds-gen* apply tenant1 | ||
`}) | ||
@@ -29,0 +26,0 @@ |
@@ -19,9 +19,2 @@ #!/usr/bin/env node | ||
let [, , cmd, ...args] = process.argv; cmd = { | ||
b: 'build', | ||
c: 'compile', | ||
d: 'deploy', | ||
s: 'serve', | ||
e: 'eval', | ||
r: 'repl', | ||
i: 'init', | ||
h: 'help', | ||
@@ -32,4 +25,3 @@ v: 'version', | ||
'--version': 'version', | ||
'-?': 'help', | ||
'-e': 'eval' | ||
'-?': 'help' | ||
}[cmd] || cmd | ||
@@ -46,3 +38,3 @@ | ||
let longCommand = cmd | ||
while(args.length >= 0) { | ||
@@ -55,9 +47,9 @@ try { | ||
if(args.length === 0) { | ||
cmd = './compile' | ||
cmd = './help' | ||
break; | ||
} | ||
} | ||
longCommand += '_' + args.shift() | ||
} | ||
} | ||
} | ||
cmd = require (cmd) | ||
@@ -64,0 +56,0 @@ |
@@ -0,1 +1,3 @@ | ||
// compact left for compatibility, but on by default | ||
module.exports.flags = ['--skip-install', '--compact', '--verbose', '--force']; | ||
@@ -5,18 +7,12 @@ | ||
*--skip-install* | ||
Skip dependency installation via npm and mvn | ||
*--compact* | ||
Reduce the output | ||
Skip the dependency installation via npm and mvn. | ||
*--verbose* | ||
Make the output more verbose | ||
Make the output more verbose. | ||
*--force* | ||
Answer all question with yes - overwrite everything | ||
Answer all questions with yes - overwrite everything. | ||
`; |
@@ -10,18 +10,15 @@ const generatorMain = require('../lib/main/main'); | ||
cds *extend* [ <application> ] | ||
cds-gen *extend* [ <application> ] | ||
Create an extension project for the application | ||
Create an extension project for the application. | ||
# OPTIONS | ||
` + globalGeneratorOptions.help + | ||
${globalGeneratorOptions.help} | ||
` | ||
# EXAMPLES | ||
*cds-gen* extend tenant.myapplication.cloud.com | ||
*cds-gen* extend http://tenant.localhost | ||
*cds-gen* extend http://tenant.localhost | ||
`}) | ||
@@ -28,0 +25,0 @@ |
@@ -10,20 +10,17 @@ const generatorMain = require('../lib/main/main'); | ||
cds *generate content* [ <modelPath> ] | ||
cds-gen *generate content* [ <modelPath> ] | ||
Generate initial content for a model | ||
Generate initial content for a model. | ||
# OPTIONS | ||
*--db-technology [technology]* | ||
The db technology for which the content shall be generated, currently supported: | ||
- sqlite: creates csv files and an init.js file for insering the csv values | ||
- hana: creates csv files and hdbtabledata files | ||
` + globalGeneratorOptions.help + | ||
` | ||
*--db-technology [technology]* | ||
The db technology, for which the content shall be generated, currently supports: | ||
- sqlite: Creates csv files and an init.js file for insering the csv values. | ||
- hana: Creates csv files and hdbtabledata files. | ||
${globalGeneratorOptions.help} | ||
# EXAMPLES | ||
@@ -34,2 +31,3 @@ | ||
*cds-gen* generate content db/model.cds --db-technology sqlite | ||
`}) | ||
@@ -36,0 +34,0 @@ |
module.exports = Object.assign (help, {help:` | ||
# USAGE | ||
*cds* <command> [<args>] | ||
*cds-gen* <command> [<args>] | ||
@@ -9,16 +9,12 @@ | ||
*c* | *compile* ...individual models (= the default) | ||
*d* | *deploy* ...data models to a database | ||
*s* | *serve* ...service models to REST clients | ||
*b* | *build* ...whole modules or projects | ||
*n* | *new* ...create a new project | ||
*i* | *init* ...jump-starts a new project | ||
*e* | *eval* ...javascript code from the cmd line | ||
*r* | *repl* cds's REPL (> _http://nodejs.org/api/repl.html_) | ||
*h* | *help* shows usage for cds and individual commands | ||
*v* | *version* prints the version of cds | ||
*new* ...Creates a new project. | ||
*add module* ...Adds a module to an existing project. | ||
*extend* ...Creates a tenant specific extension project. | ||
*apply* ...Applies the extension to an exisiting tenant. | ||
*generate content* ...Generates content for an existing cds model (csv and hdbtabledata). | ||
*help* Shows usage for cds and individual commands. | ||
*version* Prints the version of cds. | ||
*cds help* <command> gives more help about each. | ||
*cds* <file> without <command> defaults to *cds compile*. | ||
*cds* without any arguments shows this help. | ||
*cds-gen help* <command> gives more help about each. | ||
*cds-gen* without any arguments shows this help. | ||
@@ -28,7 +24,4 @@ | ||
*cds* model.cds | ||
*cds* compile model.cds | ||
*cds* compile model.json --to cdl | ||
*cds* serve cat-service | ||
*cds* build --clean | ||
*cds-gen* new project | ||
*cds-gen* add module project/database | ||
@@ -56,2 +49,2 @@ `}) | ||
/* eslint no-console: off */ | ||
if (!module.parent) help (['init']) | ||
if (!module.parent) help (['init']) |
@@ -6,10 +6,10 @@ const generatorMain = require('../lib/main/main'); | ||
module.exports = Object.assign (_new, { | ||
options: ['--modules', '--srv-technology', '--java-package'], | ||
flags: [...globalGeneratorOptions.flags, '--insecure'], | ||
options: ['--modules', '--srv-technology', '--java-package', '--srv-memory'], | ||
flags: [...globalGeneratorOptions.flags, '--insecure', '--skip-sample-models'], | ||
help:` | ||
# SYNOPSIS | ||
*cds new* [<dir>] [<options>] | ||
*cds-gen new* [<dir>] [<options>] | ||
Creates a new project in the given directory | ||
Creates a new project in the given directory. | ||
@@ -20,23 +20,31 @@ | ||
A comma-separated list of the modules to be created | ||
Valid modules are app, srv, db | ||
A comma-separated list of the modules to be created. | ||
Valid modules are *app*, *srv* and *db*. | ||
*--srv-technology [<technology>]* | ||
The technology to use for the srv module (if specified / selected) | ||
Valid values: *java* and *nodejs* | ||
The technology to use for the srv module (if specified / selected). | ||
Valid values are *java* and *nodejs*. | ||
*--java-package [<java package id>]* | ||
The package id for the java srv module (only needed if srv-technology is java) | ||
defaults to: *sample* | ||
` | ||
+ globalGeneratorOptions.help + | ||
` | ||
The package ID for the java srv module (only needed if srv-technology is java). | ||
Defaults to: *sample*. | ||
*--srv-memory* | ||
Memory setting for srv module followed by unit. | ||
Valid values: number > 0 plus unit, e.g. 512M. | ||
*--skip-sample-models* | ||
If present or set to true the generator will not create any sample code. | ||
${globalGeneratorOptions.help} | ||
# EXAMPLES | ||
*cds* new project | ||
*cds* new project --modules app,db | ||
*cds* new project --modules srv --srv-technology java | ||
*cds-gen* new project | ||
*cds-gen* new project --modules app,db | ||
*cds-gen* new project --modules srv --srv-technology java | ||
*cds-gen* new project --modules srv --srv-technology java --srv-memory 1024M | ||
@@ -43,0 +51,0 @@ `}) |
@@ -186,3 +186,15 @@ 'use strict'; | ||
} | ||
}, | ||
srvMemory: { | ||
type: SingleValueParameter, | ||
name: 'srvMemory', | ||
regex: /^[1-9]\d*\w?$/, | ||
prompt: { | ||
type: 'input', | ||
name: 'srvMemory', | ||
message: 'Memory for srv module', | ||
store: false, | ||
default: '512M' | ||
} | ||
} | ||
}; |
@@ -30,27 +30,4 @@ 'use strict'; | ||
writing() { | ||
this.log(`Copying files to ${MODULE_NAME} sub folder (/${this.options.moduleName})`); | ||
this.fs.copyTpl( | ||
this.templatePath('app/**/*'), | ||
this.destinationPath(this.options.moduleName), | ||
{ | ||
name: this.options.projectName | ||
} | ||
); | ||
this.fs.copyTpl(this.templatePath('app/.*'), this.destinationPath(this.options.moduleName)); | ||
ModuleHelper.extendMtaYaml(this, generatedModules.app.value); | ||
} | ||
install() { | ||
if (!this.options.skipInstall) { | ||
this.log(`Npm install in ${MODULE_NAME} sub folder (/${this.options.moduleName})`); | ||
let npmOptions = (this.options.verbose ? { verbose: true } : {}); | ||
this.npmInstall([], npmOptions, { | ||
cwd: this.destinationPath(this.options.moduleName) | ||
}); | ||
} | ||
} | ||
}; |
@@ -34,3 +34,3 @@ 'use strict'; | ||
this.fs.copyTpl( | ||
this.templatePath('db/single_tenant/**/!(package.json)'), | ||
this.templatePath('db/single_tenant/**'), | ||
this.destinationPath(this.options.moduleName), { | ||
@@ -48,12 +48,7 @@ name: this.options.projectName | ||
if(this.options.multitenancy) { | ||
this.fs.copy( | ||
this.templatePath('db/multi_tenant/*'), | ||
this.destinationPath(this.options.moduleName) | ||
); | ||
} else { | ||
this.fs.copy( | ||
this.templatePath('db/single_tenant/package.json'), | ||
this.destinationPath(this.options.moduleName, 'package.json') | ||
); | ||
// copyTpl does not support extended glob (not-pattern) under linux | ||
// so the initial copyTpl call copies everything including | ||
// samples. Delete samples if unwanted. | ||
if (this.options.skipSampleModels) { | ||
this.fs.delete(this.destinationPath(this.options.moduleName, '**/*.cds')); | ||
} | ||
@@ -68,7 +63,12 @@ | ||
let npmOptions = (this.options.verbose ? "--verbose" : ""); | ||
// less output by default | ||
const npmCommandLine = ['npm', 'install', '--quiet']; | ||
if(this.options.verbose ) { | ||
// overrides --quiet | ||
npmCommandLine.push('--verbose'); | ||
} | ||
execSync("npm install " + npmOptions, { cwd: this.destinationPath(this.options.moduleName), stdio: 'inherit'}); | ||
execSync(npmCommandLine.join(' '), { cwd: this.destinationPath(this.options.moduleName), stdio: 'inherit'}); | ||
} | ||
} | ||
}; |
@@ -7,2 +7,3 @@ 'use strict'; | ||
const path = require('path'); | ||
const cp = require('child_process'); | ||
@@ -57,8 +58,2 @@ const generatedModules = require('../config/modules'); | ||
this.option('multitenancy', { | ||
type: Boolean, | ||
required: false, | ||
desc: 'Enable Multitenancy using hdi-dynamicdeploy', | ||
default: false | ||
}); | ||
} | ||
@@ -149,4 +144,10 @@ | ||
const npmOptions = (this.options.verbose ? { verbose: true } : {}); | ||
this.npmInstall("", npmOptions, {cwd: this.destinationPath()}); | ||
// less output by default | ||
const npmCommandLine = ['npm', 'install', '--quiet']; | ||
if (this.options.verbose) { | ||
// overrides --quiet | ||
npmCommandLine.push('--verbose'); | ||
} | ||
cp.execSync(npmCommandLine.join(' '), { cwd: this.destinationPath(), stdio: 'inherit'}); | ||
} | ||
@@ -153,0 +154,0 @@ } |
@@ -14,8 +14,9 @@ 'use strict'; | ||
const mkdirp = require('mkdirp'); | ||
const _ = require('lodash'); | ||
const { execSync } = require('child_process'); | ||
const REQUIRED_PARAMETERS = [Parameters.projectName, Parameters.srvTechnology]; | ||
const REQUIRED_PARAMETERS = [Parameters.projectName, Parameters.srvTechnology, Parameters.srvMemory]; | ||
const MODULE_NAME = generatedModules.srv.value; | ||
const IMPORT_DB_STRING = "using from '../db/data-model';"; | ||
const IMPORT_DB_STRING = "using my.bookshop from '../db/data-model';"; | ||
let mvnExec = "mvn"; | ||
@@ -32,4 +33,15 @@ | ||
}; | ||
const PACKAGE_JSON_TEST_CHANGE = { | ||
"scripts": { | ||
"jest": "jest --config=jest.json", | ||
"test": "npm run jest" | ||
}, | ||
"devDependencies": { | ||
"jest": "^23.4.0", | ||
"jest-junit": "^5.1.0" | ||
} | ||
}; | ||
module.exports = class extends YeomanGenerator { | ||
@@ -55,2 +67,9 @@ | ||
}); | ||
this.option('srvMemory', { | ||
type: String, | ||
required: false, | ||
desc: 'Memory for srv module', | ||
default: '512M' | ||
}); | ||
} | ||
@@ -82,22 +101,34 @@ | ||
const templateOptions = Object.assign({importDb: importDbString}, this.options); | ||
this.fs.copyTpl( | ||
this.templatePath('srv/*'), | ||
this.destinationPath(this.options.moduleName), | ||
templateOptions | ||
); | ||
const context = Object.assign({importDb: importDbString}, this.options); | ||
// copyTpl cannot be called if glob matches no files. | ||
// so once we have more than cds files in templates/srv we need to adapt the glob pattern | ||
if(!this.options.skipSampleModels) { | ||
this.fs.copyTpl( | ||
this.templatePath('srv/*'), | ||
this.destinationPath(this.options.moduleName), | ||
context | ||
); | ||
} | ||
// copyTpl does not support extended glob (not-pattern) under linux | ||
// so the initial copyTpl call copies everything including | ||
// samples. Delete samples if unwanted. | ||
if(this.options.srvTechnology === 'nodejs') { | ||
this.fs.copy(this.templatePath('srv/nodejs/**'), this.destinationPath(this.options.moduleName)); | ||
this.fs.copyTpl(this.templatePath('srv/nodejs/.*'), this.destinationPath(this.options.moduleName)); | ||
ModuleHelper.extendPackageJson(this, PACKAGE_JSON_CHANGE); | ||
if(this.options.skipSampleModels) { | ||
this.fs.delete(this.destinationPath(this.options.moduleName, 'jest.json')); | ||
this.fs.delete(this.destinationPath(this.options.moduleName, '__tests__')); | ||
} else { | ||
this._extendPackageJsonFile(this.destinationPath(this.options.moduleName, 'package.json'), PACKAGE_JSON_TEST_CHANGE); | ||
} | ||
} | ||
ModuleHelper.extendMtaYaml(this, generatedModules.srv.value); | ||
if(this.options.srvTechnology === 'nodejs') { | ||
ModuleHelper.extendPackageJson(this, PACKAGE_JSON_CHANGE); | ||
} | ||
if(this.options.srvTechnology === 'java') { | ||
@@ -114,3 +145,3 @@ this._createJavaProject(); | ||
} | ||
if(this.options.srvTechnology === 'java') { | ||
@@ -124,5 +155,3 @@ this.log(`Running mvn clean install in ${MODULE_NAME} sub folder (/${this.options.moduleName})`); | ||
if (this.options.compact) { | ||
args.push('--quiet'); | ||
} | ||
args.push('--quiet'); | ||
@@ -147,10 +176,15 @@ const result = this.spawnCommandSync(mvnExec, args, { | ||
} | ||
if(this.options.srvTechnology === 'nodejs') { | ||
this.log(`Running npm install in ${MODULE_NAME} sub folder (/${this.options.moduleName})`); | ||
let npmOptions = (this.options.verbose ? "--verbose" : ""); | ||
// less output by default | ||
const npmCommandLine = ['npm', 'install', '--quiet']; | ||
if(this.options.verbose) { | ||
// overrides --quiet | ||
npmCommandLine.push('--verbose'); | ||
} | ||
execSync("npm install " + npmOptions, { cwd: this.destinationPath(this.options.moduleName), stdio: 'inherit'}); | ||
execSync(npmCommandLine.join(' '), { cwd: this.destinationPath(this.options.moduleName), stdio: 'inherit'}); | ||
} | ||
@@ -160,4 +194,11 @@ } | ||
_extendPackageJsonFile(filePath, value) { | ||
const packageJsonStr = this.fs.read(filePath); | ||
let packageJson = JSON.parse(packageJsonStr); | ||
packageJson = _.merge(packageJson, value); | ||
this.fs.writeJSON(filePath, packageJson); | ||
} | ||
_createJavaProject() { | ||
@@ -186,5 +227,3 @@ var done = this.async(); | ||
if (this.options.compact) { | ||
args.push('--quiet'); | ||
} | ||
args.push('--quiet'); | ||
@@ -191,0 +230,0 @@ let tempFolder; |
{ | ||
"name": "deploy", | ||
"dependencies": { | ||
"@sap/hdi-deploy": "3.2.0" | ||
"@sap/hdi-deploy": "^3.7.0" | ||
}, | ||
"scripts": { | ||
"postinstall": "node conditionalBuild.js", | ||
"postinstall": "node .build.js", | ||
"start": "node node_modules/@sap/hdi-deploy/deploy.js" | ||
} | ||
} | ||
} |
@@ -6,11 +6,12 @@ { | ||
"dependencies": { | ||
"@sap/cds": "2.x" | ||
"@sap/cds": "^2.x" | ||
}, | ||
"scripts": { | ||
"build": "cds build --clean" | ||
"build": "cds build --clean", | ||
"watch": "nodemon -w . -i node_modules/**,.git/** -e cds -x npm run build" | ||
}, | ||
"cds": { | ||
}, | ||
"private": true | ||
} |
@@ -5,10 +5,10 @@ { | ||
"@sap/cds": ">=2.8", | ||
"express": "4.16.3", | ||
"@sap/xssec": "2.1.12", | ||
"@sap/xsenv": "1.2.9", | ||
"hdb": "0.16.0" | ||
"express": "^4.16.2", | ||
"@sap/xssec": "^2.1.12", | ||
"@sap/xsenv": "^1.2.9", | ||
"hdb": "^0.16.0" | ||
}, | ||
"scripts": { | ||
"postinstall": "cds build/all --project .. --clean", | ||
"start": "cds serve gen/csn.json" | ||
"postinstall": "node .install.js && cds build/all --project .. --clean", | ||
"start": "node ./node_modules/@sap/cds/bin/cds.js serve gen/csn.json" | ||
}, | ||
@@ -15,0 +15,0 @@ "engines": { |
@@ -11,2 +11,3 @@ 'use strict'; | ||
if(!config.insecure) { | ||
moduleYaml.requires = moduleYaml.requires || []; | ||
moduleYaml.requires.push({ name: config.projectName + '-uaa' }); | ||
@@ -17,9 +18,8 @@ } | ||
static configureResources(descriptorResources, config) { | ||
const requiredResources = [RESOURCES.logging(config)]; | ||
if(!config.insecure) { | ||
const requiredResources = []; | ||
requiredResources.push(RESOURCES.uaa(config)); | ||
ResourcesEditor.addResources(requiredResources, descriptorResources); | ||
} | ||
ResourcesEditor.addResources(requiredResources, descriptorResources); | ||
} | ||
@@ -26,0 +26,0 @@ } |
@@ -10,48 +10,7 @@ 'use strict'; | ||
if(!config.multitenancy) { | ||
if(!moduleYaml.requires) { | ||
moduleYaml.requires = []; | ||
} | ||
moduleYaml.requires.push({ name: config.projectName + '-hdi-container' }); | ||
return; | ||
} | ||
this.configureMultitenancy(moduleYaml, config); | ||
} | ||
static configureMultitenancy(moduleYaml, config) { | ||
moduleYaml.type = 'nodejs'; | ||
if(!moduleYaml.properties) { | ||
moduleYaml.properties = {}; | ||
} | ||
moduleYaml.properties["hdi_dynamic_deploy_user"] = "${generated-user}"; //NOSONAR | ||
moduleYaml.properties["hdi_dynamic_deploy_password"] = "${generated-password}"; //NOSONAR | ||
moduleYaml.properties["T_MODE"] = "multitenant"; | ||
if(!moduleYaml.provides) { | ||
moduleYaml.provides = []; | ||
} | ||
moduleYaml.provides.push({ | ||
"name": "dynamic_db_deployment", | ||
"properties": { | ||
"url": "${default-url}", //NOSONAR | ||
"user": "${generated-user}", //NOSONAR | ||
"password": "${generated-password}" //NOSONAR | ||
} | ||
}); | ||
if(!moduleYaml.requires) { | ||
moduleYaml.requires = []; | ||
} | ||
moduleYaml.requires.push({ name: config.projectName + '-hdi-container' }); | ||
moduleYaml.requires.push( { | ||
"name": config.projectName + "-logging" | ||
}, { | ||
"name": config.projectName + "-managed-hdi-container" | ||
}); | ||
} | ||
@@ -63,10 +22,4 @@ | ||
const hdiContainer = RESOURCES.hdicontainer(config); | ||
const requiredResources = []; | ||
const requiredResources = [hdiContainer]; | ||
if(config.multitenancy) { | ||
requiredResources.push(RESOURCES.logging(config)); | ||
} else { | ||
requiredResources.push(hdiContainer); | ||
} | ||
ResourcesEditor.addResources(requiredResources, descriptorResources); | ||
@@ -76,7 +29,4 @@ } | ||
static configureResourcesMultitenancy(descriptorResources, config) { | ||
ResourcesEditor.addResources([RESOURCES.logging(config), RESOURCES.managedHdicontainer(config)], descriptorResources); | ||
} | ||
} | ||
module.exports = DbEditor; |
@@ -55,2 +55,6 @@ "use strict"; | ||
if(mtaDescriptor.resources.length === 0) { | ||
delete mtaDescriptor.resources; | ||
} | ||
if(this._destinationFromAppToSrvNeeded(existingModules, config.modules) && config.addDefaultRoute) { | ||
@@ -63,13 +67,2 @@ this._addDestinationFromAppToSrv(mtaDescriptor, appModulePosition); | ||
static configureMultitenancyForModule(moduleType, moduleYaml, config, resources = []) { | ||
try { | ||
const ModuleEditor = require('./' + moduleType + '_editor'); | ||
ModuleEditor.configureMultitenancy(moduleYaml, config); | ||
ModuleEditor.configureResourcesMultitenancy(resources, config); | ||
} catch (e) { | ||
// Not implemented, do nothing | ||
} | ||
} | ||
static _addModule(mtaDescriptor, existingModules, folderName, module) { | ||
@@ -76,0 +69,0 @@ |
@@ -12,10 +12,12 @@ 'use strict'; | ||
moduleYaml.requires = moduleYaml.requires || []; | ||
if(!config.insecure) { | ||
moduleYaml.requires.push({ name: config.projectName + '-uaa' }); | ||
moduleYaml.requires.push({ name: config.projectName + '-uaa' }); | ||
} | ||
const requiresHdi = { | ||
name: config.projectName + '-hdi-container' | ||
}; | ||
if(config.srvTechnology === 'java') { | ||
@@ -25,69 +27,23 @@ requiresHdi.properties = { | ||
}; | ||
} | ||
if(!config.multitenancy) { | ||
moduleYaml.requires.push(requiresHdi); | ||
} | ||
if(!config.multitenancy) return; | ||
this.configureMultitenancy(moduleYaml, config); | ||
moduleYaml.requires.push(requiresHdi); | ||
} | ||
static configureResources(descriptorResources, config) { | ||
static configureMultitenancy(moduleYaml, config) { | ||
const managedHdiContainerFound = moduleYaml.requires.find((required) => (/(.*)\-managed\-hdi\-container/.test(required.name))); | ||
if(!managedHdiContainerFound) { | ||
const managedHdiContainer = { | ||
"name": config.projectName + "-managed-hdi-container" | ||
const requiredResources = []; | ||
}; | ||
requiredResources.push(RESOURCES.hdicontainer(config)); | ||
if(config.srvTechnology === 'java') { | ||
managedHdiContainer.properties = { | ||
"JBP_CONFIG_RESOURCE_CONFIGURATION": "[tomcat/webapps/ROOT/META-INF/context.xml: {\"service_name_for_DefaultDB\" : \"~{hdi-container-name}\"}]" | ||
}; | ||
} | ||
moduleYaml.requires.push(managedHdiContainer); | ||
if(!config.insecure) { | ||
requiredResources.push(RESOURCES.uaa(config)); | ||
} | ||
const dynamicDeploymentFound = moduleYaml.requires.find((required) => (required.name === 'dynamic_db_deployment')); | ||
if(!dynamicDeploymentFound) { | ||
moduleYaml.requires.push( { | ||
"name": "dynamic_db_deployment", | ||
"properties": { | ||
"dynamic_db_deployment_url": "~{url}", | ||
"dynamic_db_deployment_user": "~{user}", | ||
"dynamic_db_deployment_password": "~{password}" | ||
} | ||
}); | ||
} | ||
} | ||
static configureResources(descriptorResources, config) { | ||
const requiredResources = [RESOURCES.logging(config)]; | ||
if(config.multitenancy) { | ||
requiredResources.push(RESOURCES.managedHdicontainer(config)); | ||
} else { | ||
requiredResources.push(RESOURCES.hdicontainer(config)); | ||
} | ||
if(!config.insecure) { | ||
requiredResources.push(RESOURCES.uaa(config)); | ||
} | ||
ResourcesEditor.addResources(requiredResources, descriptorResources); | ||
} | ||
static configureResourcesMultitenancy(descriptorResources, config) { | ||
ResourcesEditor.addResources([RESOURCES.managedHdicontainer(config)], descriptorResources); | ||
} | ||
} | ||
module.exports = SrvEditor; |
@@ -15,3 +15,3 @@ 'use strict'; | ||
static managedHdicontainer(config) { | ||
@@ -27,3 +27,3 @@ return { | ||
static uaa(config) { | ||
@@ -56,18 +56,6 @@ return { | ||
} | ||
static logging(config) { | ||
return { | ||
"name": config.projectName + "-logging", | ||
"type": "org.cloudfoundry.managed-service", | ||
"parameters": { | ||
"service": "application-logs", | ||
"service-plan": "lite" | ||
} | ||
} | ||
} | ||
} | ||
module.exports = Resources; | ||
module.exports = Resources; |
@@ -9,4 +9,4 @@ 'use strict'; | ||
.filter(parameter => parameter !== null); | ||
return _this.prompt(prompts).then(answers => { | ||
@@ -19,3 +19,3 @@ for(const answerKey in answers) { | ||
if (!_this.options.compact) { | ||
if (_this.options.verbose) { | ||
this._logSettings(_this, parameters); | ||
@@ -26,6 +26,6 @@ } | ||
} | ||
static _logSettings(_this, parameters) { | ||
_this.log(); | ||
@@ -32,0 +32,0 @@ _this.log('-------------------------------------------------------------'); |
{ | ||
"name": "@sap/generator-cds", | ||
"version": "1.0.0", | ||
"version": "1.0.10", | ||
"lockfileVersion": 1, | ||
@@ -15,6 +15,6 @@ "requires": true, | ||
"@nodelib/fs.stat": { | ||
"version": "1.1.1" | ||
"version": "1.1.2" | ||
}, | ||
"ansi-escapes": { | ||
"version": "3.0.0" | ||
"version": "3.1.0" | ||
}, | ||
@@ -27,3 +27,3 @@ "ansi-regex": { | ||
"requires": { | ||
"color-convert": "1.9.1" | ||
"color-convert": "1.9.3" | ||
} | ||
@@ -35,7 +35,2 @@ }, | ||
"sprintf-js": "1.0.3" | ||
}, | ||
"dependencies": { | ||
"sprintf-js": { | ||
"version": "1.0.3" | ||
} | ||
} | ||
@@ -73,2 +68,8 @@ }, | ||
}, | ||
"async": { | ||
"version": "2.6.1", | ||
"requires": { | ||
"lodash": "4.17.11" | ||
} | ||
}, | ||
"asynckit": { | ||
@@ -120,5 +121,2 @@ "version": "0.4.0" | ||
} | ||
}, | ||
"kind-of": { | ||
"version": "6.0.2" | ||
} | ||
@@ -160,2 +158,15 @@ } | ||
}, | ||
"buffer-alloc": { | ||
"version": "1.2.0", | ||
"requires": { | ||
"buffer-alloc-unsafe": "1.1.0", | ||
"buffer-fill": "1.0.0" | ||
} | ||
}, | ||
"buffer-alloc-unsafe": { | ||
"version": "1.1.0" | ||
}, | ||
"buffer-fill": { | ||
"version": "1.0.0" | ||
}, | ||
"builtin-modules": { | ||
@@ -182,11 +193,11 @@ "version": "1.1.1" | ||
"chalk": { | ||
"version": "2.3.1", | ||
"version": "2.4.1", | ||
"requires": { | ||
"ansi-styles": "3.2.1", | ||
"escape-string-regexp": "1.0.5", | ||
"supports-color": "5.3.0" | ||
"supports-color": "5.5.0" | ||
} | ||
}, | ||
"chardet": { | ||
"version": "0.4.2" | ||
"version": "0.7.0" | ||
}, | ||
@@ -226,3 +237,3 @@ "class-utils": { | ||
"clone": { | ||
"version": "2.1.1" | ||
"version": "2.1.2" | ||
}, | ||
@@ -240,3 +251,3 @@ "clone-buffer": { | ||
"process-nextick-args": "2.0.0", | ||
"readable-stream": "2.3.5" | ||
"readable-stream": "2.3.6" | ||
} | ||
@@ -252,3 +263,3 @@ }, | ||
"color-convert": { | ||
"version": "1.9.1", | ||
"version": "1.9.3", | ||
"requires": { | ||
@@ -279,2 +290,5 @@ "color-name": "1.1.3" | ||
}, | ||
"cookiejar": { | ||
"version": "2.1.2" | ||
}, | ||
"copy-descriptor": { | ||
@@ -287,11 +301,13 @@ "version": "0.1.1" | ||
"cross-spawn": { | ||
"version": "5.1.0", | ||
"version": "6.0.5", | ||
"requires": { | ||
"lru-cache": "4.1.2", | ||
"nice-try": "1.0.5", | ||
"path-key": "2.0.1", | ||
"semver": "5.5.1", | ||
"shebang-command": "1.2.0", | ||
"which": "1.3.0" | ||
"which": "1.3.1" | ||
} | ||
}, | ||
"dargs": { | ||
"version": "5.1.0" | ||
"version": "6.0.0" | ||
}, | ||
@@ -302,5 +318,5 @@ "dateformat": { | ||
"debug": { | ||
"version": "3.1.0", | ||
"version": "3.2.5", | ||
"requires": { | ||
"ms": "2.0.0" | ||
"ms": "2.1.1" | ||
} | ||
@@ -314,7 +330,7 @@ }, | ||
"requires": { | ||
"mimic-response": "1.0.0" | ||
"mimic-response": "1.0.1" | ||
} | ||
}, | ||
"deep-extend": { | ||
"version": "0.4.2" | ||
"version": "0.6.0" | ||
}, | ||
@@ -347,5 +363,2 @@ "define-property": { | ||
} | ||
}, | ||
"kind-of": { | ||
"version": "6.0.2" | ||
} | ||
@@ -377,3 +390,3 @@ } | ||
"ejs": { | ||
"version": "2.5.7" | ||
"version": "2.6.1" | ||
}, | ||
@@ -388,3 +401,3 @@ "error": { | ||
"error-ex": { | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"requires": { | ||
@@ -398,3 +411,3 @@ "is-arrayish": "0.2.1" | ||
"esprima": { | ||
"version": "4.0.0" | ||
"version": "4.0.1" | ||
}, | ||
@@ -430,2 +443,5 @@ "expand-brackets": { | ||
} | ||
}, | ||
"ms": { | ||
"version": "2.0.0" | ||
} | ||
@@ -435,3 +451,3 @@ } | ||
"extend": { | ||
"version": "3.0.1" | ||
"version": "3.0.2" | ||
}, | ||
@@ -454,6 +470,6 @@ "extend-shallow": { | ||
"external-editor": { | ||
"version": "2.1.0", | ||
"version": "3.0.3", | ||
"requires": { | ||
"chardet": "0.4.2", | ||
"iconv-lite": "0.4.19", | ||
"chardet": "0.7.0", | ||
"iconv-lite": "0.4.24", | ||
"tmp": "0.0.33" | ||
@@ -506,5 +522,2 @@ } | ||
} | ||
}, | ||
"kind-of": { | ||
"version": "6.0.2" | ||
} | ||
@@ -517,3 +530,3 @@ } | ||
"@mrmlnc/readdir-enhanced": "2.2.1", | ||
"@nodelib/fs.stat": "1.1.1", | ||
"@nodelib/fs.stat": "1.1.2", | ||
"glob-parent": "3.1.0", | ||
@@ -549,5 +562,5 @@ "is-glob": "4.0.0", | ||
"find-up": { | ||
"version": "2.1.0", | ||
"version": "3.0.0", | ||
"requires": { | ||
"locate-path": "2.0.0" | ||
"locate-path": "3.0.0" | ||
} | ||
@@ -558,3 +571,3 @@ }, | ||
"requires": { | ||
"readable-stream": "2.3.5" | ||
"readable-stream": "2.3.6" | ||
} | ||
@@ -570,5 +583,8 @@ }, | ||
"combined-stream": "1.0.6", | ||
"mime-types": "2.1.18" | ||
"mime-types": "2.1.20" | ||
} | ||
}, | ||
"formidable": { | ||
"version": "1.2.1" | ||
}, | ||
"fragment-cache": { | ||
@@ -602,2 +618,13 @@ "version": "0.2.1", | ||
}, | ||
"glob": { | ||
"version": "7.1.3", | ||
"requires": { | ||
"fs.realpath": "1.0.0", | ||
"inflight": "1.0.6", | ||
"inherits": "2.0.3", | ||
"minimatch": "3.0.4", | ||
"once": "1.4.0", | ||
"path-is-absolute": "1.0.1" | ||
} | ||
}, | ||
"glob-parent": { | ||
@@ -622,25 +649,11 @@ "version": "3.1.0", | ||
"globby": { | ||
"version": "6.1.0", | ||
"version": "8.0.1", | ||
"requires": { | ||
"array-union": "1.0.2", | ||
"glob": "7.1.2", | ||
"object-assign": "4.1.1", | ||
"pify": "2.3.0", | ||
"pinkie-promise": "2.0.1" | ||
}, | ||
"dependencies": { | ||
"glob": { | ||
"version": "7.1.2", | ||
"requires": { | ||
"fs.realpath": "1.0.0", | ||
"inflight": "1.0.6", | ||
"inherits": "2.0.3", | ||
"minimatch": "3.0.4", | ||
"once": "1.4.0", | ||
"path-is-absolute": "1.0.1" | ||
} | ||
}, | ||
"pify": { | ||
"version": "2.3.0" | ||
} | ||
"dir-glob": "2.0.0", | ||
"fast-glob": "2.2.2", | ||
"glob": "7.1.3", | ||
"ignore": "3.3.10", | ||
"pify": "3.0.0", | ||
"slash": "1.0.0" | ||
} | ||
@@ -658,6 +671,6 @@ }, | ||
"isurl": "1.0.0", | ||
"lowercase-keys": "1.0.0", | ||
"lowercase-keys": "1.0.1", | ||
"p-cancelable": "0.3.0", | ||
"p-timeout": "1.2.1", | ||
"safe-buffer": "5.1.1", | ||
"safe-buffer": "5.1.2", | ||
"timed-out": "4.0.1", | ||
@@ -674,3 +687,3 @@ "url-parse-lax": "1.0.0", | ||
"requires": { | ||
"lodash": "4.17.5" | ||
"lodash": "4.17.11" | ||
} | ||
@@ -714,6 +727,9 @@ }, | ||
"hosted-git-info": { | ||
"version": "2.6.0" | ||
"version": "2.7.1" | ||
}, | ||
"iconv-lite": { | ||
"version": "0.4.19" | ||
"version": "0.4.24", | ||
"requires": { | ||
"safer-buffer": "2.1.2" | ||
} | ||
}, | ||
@@ -733,2 +749,20 @@ "ignore": { | ||
}, | ||
"inquirer": { | ||
"version": "6.2.0", | ||
"requires": { | ||
"ansi-escapes": "3.1.0", | ||
"chalk": "2.4.1", | ||
"cli-cursor": "2.1.0", | ||
"cli-width": "2.2.0", | ||
"external-editor": "3.0.3", | ||
"figures": "2.0.0", | ||
"lodash": "4.17.11", | ||
"mute-stream": "0.0.7", | ||
"run-async": "2.3.0", | ||
"rxjs": "6.3.2", | ||
"string-width": "2.1.1", | ||
"strip-ansi": "4.0.0", | ||
"through": "2.3.8" | ||
} | ||
}, | ||
"interpret": { | ||
@@ -741,2 +775,10 @@ "version": "1.1.0" | ||
"kind-of": "3.2.2" | ||
}, | ||
"dependencies": { | ||
"kind-of": { | ||
"version": "3.2.2", | ||
"requires": { | ||
"is-buffer": "1.1.6" | ||
} | ||
} | ||
} | ||
@@ -760,2 +802,10 @@ }, | ||
"kind-of": "3.2.2" | ||
}, | ||
"dependencies": { | ||
"kind-of": { | ||
"version": "3.2.2", | ||
"requires": { | ||
"is-buffer": "1.1.6" | ||
} | ||
} | ||
} | ||
@@ -795,2 +845,10 @@ }, | ||
"kind-of": "3.2.2" | ||
}, | ||
"dependencies": { | ||
"kind-of": { | ||
"version": "3.2.2", | ||
"requires": { | ||
"is-buffer": "1.1.6" | ||
} | ||
} | ||
} | ||
@@ -834,2 +892,8 @@ }, | ||
}, | ||
"isbinaryfile": { | ||
"version": "3.0.3", | ||
"requires": { | ||
"buffer-alloc": "1.2.0" | ||
} | ||
}, | ||
"isexe": { | ||
@@ -857,16 +921,13 @@ "version": "2.0.0" | ||
"js-yaml": { | ||
"version": "3.10.0", | ||
"version": "3.12.0", | ||
"requires": { | ||
"argparse": "1.0.10", | ||
"esprima": "4.0.0" | ||
"esprima": "4.0.1" | ||
} | ||
}, | ||
"json-parse-better-errors": { | ||
"version": "1.0.1" | ||
"version": "1.0.2" | ||
}, | ||
"kind-of": { | ||
"version": "3.2.2", | ||
"requires": { | ||
"is-buffer": "1.1.6" | ||
} | ||
"version": "6.0.2" | ||
}, | ||
@@ -883,5 +944,5 @@ "load-json-file": { | ||
"locate-path": { | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"requires": { | ||
"p-locate": "2.0.0", | ||
"p-locate": "3.0.0", | ||
"path-exists": "3.0.0" | ||
@@ -891,3 +952,3 @@ } | ||
"lodash": { | ||
"version": "4.17.5" | ||
"version": "4.17.11" | ||
}, | ||
@@ -897,17 +958,10 @@ "log-symbols": { | ||
"requires": { | ||
"chalk": "2.3.1" | ||
"chalk": "2.4.1" | ||
} | ||
}, | ||
"lowercase-keys": { | ||
"version": "1.0.0" | ||
"version": "1.0.1" | ||
}, | ||
"lru-cache": { | ||
"version": "4.1.2", | ||
"requires": { | ||
"pseudomap": "1.0.2", | ||
"yallist": "2.1.2" | ||
} | ||
}, | ||
"make-dir": { | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"requires": { | ||
@@ -935,3 +989,3 @@ "pify": "3.0.0" | ||
"clone": { | ||
"version": "1.0.3" | ||
"version": "1.0.4" | ||
}, | ||
@@ -947,3 +1001,3 @@ "clone-stats": { | ||
"requires": { | ||
"clone": "1.0.3", | ||
"clone": "1.0.4", | ||
"clone-stats": "0.0.1", | ||
@@ -956,9 +1010,10 @@ "replace-ext": "0.0.1" | ||
"mem-fs-editor": { | ||
"version": "3.0.2", | ||
"version": "5.1.0", | ||
"requires": { | ||
"commondir": "1.0.1", | ||
"deep-extend": "0.4.2", | ||
"ejs": "2.5.7", | ||
"glob": "7.1.2", | ||
"globby": "6.1.0", | ||
"deep-extend": "0.6.0", | ||
"ejs": "2.6.1", | ||
"glob": "7.1.3", | ||
"globby": "8.0.1", | ||
"isbinaryfile": "3.0.3", | ||
"mkdirp": "0.5.1", | ||
@@ -968,16 +1023,3 @@ "multimatch": "2.1.0", | ||
"through2": "2.0.3", | ||
"vinyl": "2.1.0" | ||
}, | ||
"dependencies": { | ||
"glob": { | ||
"version": "7.1.2", | ||
"requires": { | ||
"fs.realpath": "1.0.0", | ||
"inflight": "1.0.6", | ||
"inherits": "2.0.3", | ||
"minimatch": "3.0.4", | ||
"once": "1.4.0", | ||
"path-is-absolute": "1.0.1" | ||
} | ||
} | ||
"vinyl": "2.2.0" | ||
} | ||
@@ -988,2 +1030,5 @@ }, | ||
}, | ||
"methods": { | ||
"version": "1.1.2" | ||
}, | ||
"micromatch": { | ||
@@ -1005,16 +1050,14 @@ "version": "3.1.10", | ||
"to-regex": "3.0.2" | ||
}, | ||
"dependencies": { | ||
"kind-of": { | ||
"version": "6.0.2" | ||
} | ||
} | ||
}, | ||
"mime": { | ||
"version": "1.6.0" | ||
}, | ||
"mime-db": { | ||
"version": "1.33.0" | ||
"version": "1.36.0" | ||
}, | ||
"mime-types": { | ||
"version": "2.1.18", | ||
"version": "2.1.20", | ||
"requires": { | ||
"mime-db": "1.33.0" | ||
"mime-db": "1.36.0" | ||
} | ||
@@ -1026,3 +1069,3 @@ }, | ||
"mimic-response": { | ||
"version": "1.0.0" | ||
"version": "1.0.1" | ||
}, | ||
@@ -1036,3 +1079,3 @@ "minimatch": { | ||
"minimist": { | ||
"version": "1.2.0" | ||
"version": "0.0.8" | ||
}, | ||
@@ -1058,11 +1101,6 @@ "mixin-deep": { | ||
"minimist": "0.0.8" | ||
}, | ||
"dependencies": { | ||
"minimist": { | ||
"version": "0.0.8" | ||
} | ||
} | ||
}, | ||
"ms": { | ||
"version": "2.0.0" | ||
"version": "2.1.1" | ||
}, | ||
@@ -1095,27 +1133,16 @@ "multimatch": { | ||
"to-regex": "3.0.2" | ||
}, | ||
"dependencies": { | ||
"kind-of": { | ||
"version": "6.0.2" | ||
} | ||
} | ||
}, | ||
"nice-try": { | ||
"version": "1.0.4" | ||
"version": "1.0.5" | ||
}, | ||
"node-version-compare": { | ||
"version": "1.0.1" | ||
}, | ||
"normalize-package-data": { | ||
"version": "2.4.0", | ||
"requires": { | ||
"hosted-git-info": "2.6.0", | ||
"hosted-git-info": "2.7.1", | ||
"is-builtin-module": "1.0.0", | ||
"semver": "5.5.0", | ||
"validate-npm-package-license": "3.0.3" | ||
"semver": "5.5.1", | ||
"validate-npm-package-license": "3.0.4" | ||
} | ||
}, | ||
"object-assign": { | ||
"version": "4.1.1" | ||
}, | ||
"object-copy": { | ||
@@ -1134,2 +1161,8 @@ "version": "0.1.0", | ||
} | ||
}, | ||
"kind-of": { | ||
"version": "3.2.2", | ||
"requires": { | ||
"is-buffer": "1.1.6" | ||
} | ||
} | ||
@@ -1172,11 +1205,11 @@ } | ||
"p-limit": { | ||
"version": "1.2.0", | ||
"version": "2.0.0", | ||
"requires": { | ||
"p-try": "1.0.0" | ||
"p-try": "2.0.0" | ||
} | ||
}, | ||
"p-locate": { | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"requires": { | ||
"p-limit": "1.2.0" | ||
"p-limit": "2.0.0" | ||
} | ||
@@ -1191,3 +1224,3 @@ }, | ||
"p-try": { | ||
"version": "1.0.0" | ||
"version": "2.0.0" | ||
}, | ||
@@ -1197,4 +1230,4 @@ "parse-json": { | ||
"requires": { | ||
"error-ex": "1.3.1", | ||
"json-parse-better-errors": "1.0.1" | ||
"error-ex": "1.3.2", | ||
"json-parse-better-errors": "1.0.2" | ||
} | ||
@@ -1218,3 +1251,3 @@ }, | ||
"path-parse": { | ||
"version": "1.0.5" | ||
"version": "1.0.6" | ||
}, | ||
@@ -1246,3 +1279,3 @@ "path-type": { | ||
"pretty-bytes": { | ||
"version": "4.0.2" | ||
"version": "5.1.0" | ||
}, | ||
@@ -1252,4 +1285,4 @@ "process-nextick-args": { | ||
}, | ||
"pseudomap": { | ||
"version": "1.0.2" | ||
"qs": { | ||
"version": "6.5.2" | ||
}, | ||
@@ -1260,3 +1293,3 @@ "read-chunk": { | ||
"pify": "3.0.0", | ||
"safe-buffer": "5.1.1" | ||
"safe-buffer": "5.1.2" | ||
} | ||
@@ -1273,5 +1306,5 @@ }, | ||
"read-pkg-up": { | ||
"version": "3.0.0", | ||
"version": "4.0.0", | ||
"requires": { | ||
"find-up": "2.1.0", | ||
"find-up": "3.0.0", | ||
"read-pkg": "3.0.0" | ||
@@ -1281,3 +1314,3 @@ } | ||
"readable-stream": { | ||
"version": "2.3.5", | ||
"version": "2.3.6", | ||
"requires": { | ||
@@ -1288,4 +1321,4 @@ "core-util-is": "1.0.2", | ||
"process-nextick-args": "2.0.0", | ||
"safe-buffer": "5.1.1", | ||
"string_decoder": "1.0.3", | ||
"safe-buffer": "5.1.2", | ||
"string_decoder": "1.1.1", | ||
"util-deprecate": "1.0.2" | ||
@@ -1297,3 +1330,3 @@ } | ||
"requires": { | ||
"resolve": "1.5.0" | ||
"resolve": "1.8.1" | ||
} | ||
@@ -1321,5 +1354,5 @@ }, | ||
"resolve": { | ||
"version": "1.5.0", | ||
"version": "1.8.1", | ||
"requires": { | ||
"path-parse": "1.0.5" | ||
"path-parse": "1.0.6" | ||
} | ||
@@ -1343,16 +1376,3 @@ }, | ||
"requires": { | ||
"glob": "7.1.2" | ||
}, | ||
"dependencies": { | ||
"glob": { | ||
"version": "7.1.2", | ||
"requires": { | ||
"fs.realpath": "1.0.0", | ||
"inflight": "1.0.6", | ||
"inherits": "2.0.3", | ||
"minimatch": "3.0.4", | ||
"once": "1.4.0", | ||
"path-is-absolute": "1.0.1" | ||
} | ||
} | ||
"glob": "7.1.3" | ||
} | ||
@@ -1367,9 +1387,9 @@ }, | ||
"rxjs": { | ||
"version": "5.5.11", | ||
"version": "6.3.2", | ||
"requires": { | ||
"symbol-observable": "1.0.1" | ||
"tslib": "1.9.3" | ||
} | ||
}, | ||
"safe-buffer": { | ||
"version": "5.1.1" | ||
"version": "5.1.2" | ||
}, | ||
@@ -1382,2 +1402,5 @@ "safe-regex": { | ||
}, | ||
"safer-buffer": { | ||
"version": "2.1.2" | ||
}, | ||
"sax": { | ||
@@ -1390,3 +1413,3 @@ "version": "1.2.4" | ||
"semver": { | ||
"version": "5.5.0" | ||
"version": "5.5.1" | ||
}, | ||
@@ -1420,20 +1443,7 @@ "set-value": { | ||
"shelljs": { | ||
"version": "0.8.1", | ||
"version": "0.8.2", | ||
"requires": { | ||
"glob": "7.1.2", | ||
"glob": "7.1.3", | ||
"interpret": "1.1.0", | ||
"rechoir": "0.6.2" | ||
}, | ||
"dependencies": { | ||
"glob": { | ||
"version": "7.1.2", | ||
"requires": { | ||
"fs.realpath": "1.0.0", | ||
"inflight": "1.0.6", | ||
"inherits": "2.0.3", | ||
"minimatch": "3.0.4", | ||
"once": "1.4.0", | ||
"path-is-absolute": "1.0.1" | ||
} | ||
} | ||
} | ||
@@ -1478,4 +1488,4 @@ }, | ||
}, | ||
"source-map": { | ||
"version": "0.5.7" | ||
"ms": { | ||
"version": "2.0.0" | ||
} | ||
@@ -1517,5 +1527,2 @@ } | ||
} | ||
}, | ||
"kind-of": { | ||
"version": "6.0.2" | ||
} | ||
@@ -1528,4 +1535,15 @@ } | ||
"kind-of": "3.2.2" | ||
}, | ||
"dependencies": { | ||
"kind-of": { | ||
"version": "3.2.2", | ||
"requires": { | ||
"is-buffer": "1.1.6" | ||
} | ||
} | ||
} | ||
}, | ||
"source-map": { | ||
"version": "0.5.7" | ||
}, | ||
"source-map-resolve": { | ||
@@ -1548,3 +1566,3 @@ "version": "0.5.2", | ||
"spdx-expression-parse": "3.0.0", | ||
"spdx-license-ids": "3.0.0" | ||
"spdx-license-ids": "3.0.1" | ||
} | ||
@@ -1559,7 +1577,7 @@ }, | ||
"spdx-exceptions": "2.1.0", | ||
"spdx-license-ids": "3.0.0" | ||
"spdx-license-ids": "3.0.1" | ||
} | ||
}, | ||
"spdx-license-ids": { | ||
"version": "3.0.0" | ||
"version": "3.0.1" | ||
}, | ||
@@ -1572,2 +1590,5 @@ "split-string": { | ||
}, | ||
"sprintf-js": { | ||
"version": "1.0.3" | ||
}, | ||
"static-extend": { | ||
@@ -1599,5 +1620,5 @@ "version": "0.1.2", | ||
"string_decoder": { | ||
"version": "1.0.3", | ||
"version": "1.1.1", | ||
"requires": { | ||
"safe-buffer": "5.1.1" | ||
"safe-buffer": "5.1.2" | ||
} | ||
@@ -1634,4 +1655,4 @@ }, | ||
"cookiejar": "2.1.2", | ||
"debug": "3.1.0", | ||
"extend": "3.0.1", | ||
"debug": "3.2.5", | ||
"extend": "3.0.2", | ||
"form-data": "2.3.2", | ||
@@ -1642,24 +1663,7 @@ "formidable": "1.2.1", | ||
"qs": "6.5.2", | ||
"readable-stream": "2.3.5" | ||
}, | ||
"dependencies": { | ||
"cookiejar": { | ||
"version": "2.1.2" | ||
}, | ||
"formidable": { | ||
"version": "1.2.1" | ||
}, | ||
"methods": { | ||
"version": "1.1.2" | ||
}, | ||
"mime": { | ||
"version": "1.6.0" | ||
}, | ||
"qs": { | ||
"version": "6.5.2" | ||
} | ||
"readable-stream": "2.3.6" | ||
} | ||
}, | ||
"supports-color": { | ||
"version": "5.3.0", | ||
"version": "5.5.0", | ||
"requires": { | ||
@@ -1669,5 +1673,2 @@ "has-flag": "3.0.0" | ||
}, | ||
"symbol-observable": { | ||
"version": "1.0.1" | ||
}, | ||
"text-table": { | ||
@@ -1685,3 +1686,3 @@ "version": "0.2.0" | ||
"requires": { | ||
"readable-stream": "2.3.5", | ||
"readable-stream": "2.3.6", | ||
"xtend": "4.0.1" | ||
@@ -1703,2 +1704,10 @@ } | ||
"kind-of": "3.2.2" | ||
}, | ||
"dependencies": { | ||
"kind-of": { | ||
"version": "3.2.2", | ||
"requires": { | ||
"is-buffer": "1.1.6" | ||
} | ||
} | ||
} | ||
@@ -1722,2 +1731,5 @@ }, | ||
}, | ||
"tslib": { | ||
"version": "1.9.3" | ||
}, | ||
"union-value": { | ||
@@ -1778,3 +1790,3 @@ "version": "1.0.0", | ||
"untildify": { | ||
"version": "3.0.2" | ||
"version": "3.0.3" | ||
}, | ||
@@ -1800,3 +1812,3 @@ "urix": { | ||
"validate-npm-package-license": { | ||
"version": "3.0.3", | ||
"version": "3.0.4", | ||
"requires": { | ||
@@ -1808,5 +1820,5 @@ "spdx-correct": "3.0.0", | ||
"vinyl": { | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"requires": { | ||
"clone": "2.1.1", | ||
"clone": "2.1.2", | ||
"clone-buffer": "1.0.0", | ||
@@ -1831,3 +1843,3 @@ "clone-stats": "1.0.0", | ||
"clone": { | ||
"version": "1.0.3" | ||
"version": "1.0.4" | ||
}, | ||
@@ -1852,3 +1864,3 @@ "clone-stats": { | ||
"requires": { | ||
"clone": "1.0.3", | ||
"clone": "1.0.4", | ||
"clone-stats": "0.0.1", | ||
@@ -1861,3 +1873,3 @@ "replace-ext": "0.0.1" | ||
"which": { | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"requires": { | ||
@@ -1883,11 +1895,8 @@ "isexe": "2.0.0" | ||
}, | ||
"yallist": { | ||
"version": "2.1.2" | ||
}, | ||
"yeoman-environment": { | ||
"version": "2.3.1", | ||
"version": "2.3.3", | ||
"requires": { | ||
"chalk": "2.3.1", | ||
"chalk": "2.4.1", | ||
"cross-spawn": "6.0.5", | ||
"debug": "3.1.0", | ||
"debug": "3.2.5", | ||
"diff": "3.5.0", | ||
@@ -1897,5 +1906,5 @@ "escape-string-regexp": "1.0.5", | ||
"grouped-queue": "0.3.3", | ||
"inquirer": "5.2.0", | ||
"inquirer": "6.2.0", | ||
"is-scoped": "1.0.0", | ||
"lodash": "4.17.10", | ||
"lodash": "4.17.11", | ||
"log-symbols": "2.2.0", | ||
@@ -1905,96 +1914,37 @@ "mem-fs": "1.1.3", | ||
"text-table": "0.2.0", | ||
"untildify": "3.0.2" | ||
}, | ||
"dependencies": { | ||
"cross-spawn": { | ||
"version": "6.0.5", | ||
"requires": { | ||
"nice-try": "1.0.4", | ||
"path-key": "2.0.1", | ||
"semver": "5.5.0", | ||
"shebang-command": "1.2.0", | ||
"which": "1.3.0" | ||
} | ||
}, | ||
"glob": { | ||
"version": "7.1.2", | ||
"requires": { | ||
"fs.realpath": "1.0.0", | ||
"inflight": "1.0.6", | ||
"inherits": "2.0.3", | ||
"minimatch": "3.0.4", | ||
"once": "1.4.0", | ||
"path-is-absolute": "1.0.1" | ||
} | ||
}, | ||
"globby": { | ||
"version": "8.0.1", | ||
"requires": { | ||
"array-union": "1.0.2", | ||
"dir-glob": "2.0.0", | ||
"fast-glob": "2.2.2", | ||
"glob": "7.1.2", | ||
"ignore": "3.3.10", | ||
"pify": "3.0.0", | ||
"slash": "1.0.0" | ||
} | ||
}, | ||
"inquirer": { | ||
"version": "5.2.0", | ||
"requires": { | ||
"ansi-escapes": "3.0.0", | ||
"chalk": "2.3.1", | ||
"cli-cursor": "2.1.0", | ||
"cli-width": "2.2.0", | ||
"external-editor": "2.1.0", | ||
"figures": "2.0.0", | ||
"lodash": "4.17.10", | ||
"mute-stream": "0.0.7", | ||
"run-async": "2.3.0", | ||
"rxjs": "5.5.11", | ||
"string-width": "2.1.1", | ||
"strip-ansi": "4.0.0", | ||
"through": "2.3.8" | ||
} | ||
}, | ||
"lodash": { | ||
"version": "4.17.10" | ||
} | ||
"untildify": "3.0.3" | ||
} | ||
}, | ||
"yeoman-generator": { | ||
"version": "2.0.3", | ||
"version": "3.1.1", | ||
"requires": { | ||
"async": "2.6.0", | ||
"chalk": "2.3.1", | ||
"async": "2.6.1", | ||
"chalk": "2.4.1", | ||
"cli-table": "0.3.1", | ||
"cross-spawn": "5.1.0", | ||
"dargs": "5.1.0", | ||
"cross-spawn": "6.0.5", | ||
"dargs": "6.0.0", | ||
"dateformat": "3.0.3", | ||
"debug": "3.1.0", | ||
"debug": "3.2.5", | ||
"detect-conflict": "1.0.1", | ||
"error": "7.0.2", | ||
"find-up": "2.1.0", | ||
"find-up": "3.0.0", | ||
"github-username": "4.1.0", | ||
"istextorbinary": "2.2.1", | ||
"lodash": "4.17.5", | ||
"make-dir": "1.2.0", | ||
"mem-fs-editor": "3.0.2", | ||
"lodash": "4.17.11", | ||
"make-dir": "1.3.0", | ||
"mem-fs-editor": "5.1.0", | ||
"minimist": "1.2.0", | ||
"pretty-bytes": "4.0.2", | ||
"pretty-bytes": "5.1.0", | ||
"read-chunk": "2.1.0", | ||
"read-pkg-up": "3.0.0", | ||
"read-pkg-up": "4.0.0", | ||
"rimraf": "2.6.2", | ||
"run-async": "2.3.0", | ||
"shelljs": "0.8.1", | ||
"shelljs": "0.8.2", | ||
"text-table": "0.2.0", | ||
"through2": "2.0.3", | ||
"yeoman-environment": "2.3.1" | ||
"yeoman-environment": "2.3.3" | ||
}, | ||
"dependencies": { | ||
"async": { | ||
"version": "2.6.0", | ||
"requires": { | ||
"lodash": "4.17.5" | ||
} | ||
"minimist": { | ||
"version": "1.2.0" | ||
} | ||
@@ -2001,0 +1951,0 @@ } |
@@ -1,1 +0,1 @@ | ||
{"bin":{"cds-gen":"./bin/cds-gen.js"},"bundleDependencies":false,"dependencies":{"chalk":"2.3.1","ejs":"2.5.7","js-yaml":"3.10.0","lodash":"4.17.5","log-symbols":"2.2.0","mkdirp":"0.5.1","node-version-compare":"1.0.1","rimraf":"2.6.2","superagent":"3.8.2","xml2js":"0.4.19","yeoman-generator":"2.0.3"},"deprecated":false,"description":"Project generator for cds projects","keywords":["cds","cdx"],"license":"SEE LICENSE IN LICENSE.txt","main":"lib/main/main.js","name":"@sap/generator-cds","scripts":{},"version":"1.0.0"} | ||
{"bin":{"cds-gen":"./bin/cds-gen.js"},"bundleDependencies":false,"dependencies":{"chalk":"2.4.1","ejs":"2.6.1","js-yaml":"3.12.0","lodash":"4.17.11","mkdirp":"0.5.1","rimraf":"2.6.2","superagent":"3.8.2","xml2js":"0.4.19","yeoman-generator":"3.1.1"},"deprecated":false,"description":"Project generator for cds projects","keywords":["cds","cdx"],"license":"SEE LICENSE IN LICENSE.txt","main":"lib/main/main.js","name":"@sap/generator-cds","scripts":{},"version":"1.0.10"} |
@@ -53,4 +53,3 @@ # generator-cds | ||
--verbose # Make console output verbose | ||
--compact # Less console output | ||
Commands: | ||
@@ -57,0 +56,0 @@ new <projectName> # Generate a new project with the name <projectName> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
9
3
19
5
994307
66
3712
128
+ Addedbuffer-alloc@1.2.0(transitive)
+ Addedbuffer-alloc-unsafe@1.1.0(transitive)
+ Addedbuffer-fill@1.0.0(transitive)
+ Addedchalk@2.4.1(transitive)
+ Addeddir-glob@2.0.0(transitive)
+ Addedejs@2.6.1(transitive)
+ Addedignore@3.3.10(transitive)
+ Addedisbinaryfile@3.0.3(transitive)
+ Addedjs-yaml@3.12.0(transitive)
+ Addedlodash@4.17.11(transitive)
+ Addedmem-fs-editor@5.1.0(transitive)
+ Addedread-pkg-up@4.0.0(transitive)
+ Addedslash@1.0.0(transitive)
+ Addedyeoman-generator@3.1.1(transitive)
- Removedlog-symbols@2.2.0
- Removednode-version-compare@1.0.1
- Removedchalk@2.3.1(transitive)
- Removedcross-spawn@5.1.0(transitive)
- Removeddargs@5.1.0(transitive)
- Removeddeep-extend@0.4.2(transitive)
- Removedejs@2.5.72.7.4(transitive)
- Removedfind-up@2.1.0(transitive)
- Removedglobby@6.1.0(transitive)
- Removedjs-yaml@3.10.0(transitive)
- Removedlocate-path@2.0.0(transitive)
- Removedlodash@4.17.5(transitive)
- Removedlru-cache@4.1.5(transitive)
- Removedmem-fs-editor@3.0.2(transitive)
- Removednode-version-compare@1.0.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedp-limit@1.3.0(transitive)
- Removedp-locate@2.0.0(transitive)
- Removedp-try@1.0.0(transitive)
- Removedpinkie@2.0.4(transitive)
- Removedpinkie-promise@2.0.1(transitive)
- Removedpretty-bytes@4.0.2(transitive)
- Removedpseudomap@1.0.2(transitive)
- Removedread-pkg-up@3.0.0(transitive)
- Removedyallist@2.1.2(transitive)
- Removedyeoman-generator@2.0.3(transitive)
Updatedchalk@2.4.1
Updatedejs@2.6.1
Updatedjs-yaml@3.12.0
Updatedlodash@4.17.11
Updatedyeoman-generator@3.1.1