From 7c25bc26bef2717bcb53382d55bdadd111d7e79e Mon Sep 17 00:00:00 2001 From: Brian Fitzpatrick Date: Fri, 26 Oct 2018 10:34:07 -0600 Subject: [PATCH] adding wsdl2rest support to camel-project generator #11 -- initial cut with fat jar and running the wsdl2rest tool with inputs -- updating to support full paths and a logging.props file -- Updating version for when we include wsdl2rest functionality -- also updating the travis file to build the wsdl2rest jar -- additional work on test and wsdl2rest call -- additional fixes -- Setting jar to specific version vs asterisk and returning to broken test -- updates to make wsdl2rest run in a promise #11 -- Increasing the mocha timeout in the travis configuration #11 -- addressing some review feedback -- updating tests to run with npm test call -- reset readme.md -- updating console messages to better reflect what's happening to user -- adding --debug flag for wsdl2rest -- fixing log4j issue -- adding appropriate dependencies to pom for wsdl2rest projects -- fixing issue when using URL to non-local WSDL -- adding test for non-local WSDL -- adding validation to avoid java and wsdl2rest combo -- adding function to avoid hardcoding wsdl2rest fat jar version -- addressing more feedback -- fixing test for jar finding function -- increased mocha test timeout to 15000 -- added new test that starts a sample JAX-WS web service and uses the WSDL it serves up to create a project -- updated helloworld wsdl and sample WS -- added jaxws and jaxrs URL property prompts -- fixed helloworld wsdl to generate properly -- added new command line arguments and first test Signed-off-by: Brian Fitzpatrick --- .gitignore | 9 + .travis.yml | 2 +- README.md | 29 +- app/index.js | 235 +++++++- app/templates/blueprint/pom.xml | 158 ++--- app/templates/blueprint/pom.xml.wsdl2rest | 264 +++++++++ app/templates/spring/pom.xml | 8 +- app/templates/spring/pom.xml.wsdl2rest | 194 +++++++ app/util.js | 19 +- app/wsdl2rest/config/logging.properties | 38 ++ app/wsdl2rest/pom.xml | 149 +++++ manual/manualstart.js | 4 + package-lock.json | 678 +++++++++++++++++++++- package.json | 8 +- test/address.wsdl | 219 +++++++ test/app.js | 193 +++++- test/app_soap.js | 45 ++ test/helloworld.wsdl | 50 ++ 18 files changed, 2180 insertions(+), 122 deletions(-) create mode 100644 app/templates/blueprint/pom.xml.wsdl2rest create mode 100644 app/templates/spring/pom.xml.wsdl2rest create mode 100644 app/wsdl2rest/config/logging.properties create mode 100644 app/wsdl2rest/pom.xml create mode 100644 manual/manualstart.js create mode 100644 test/address.wsdl create mode 100644 test/app_soap.js create mode 100644 test/helloworld.wsdl diff --git a/.gitignore b/.gitignore index fc13c92..f88e584 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,13 @@ /node_modules/ /coverage/ /.nyc_output/ +/bin/ +/app/wsdl2rest/target/ log-camel-lsp.out +.classpath +.project +/.settings/ +app/wsdl2rest/.classpath +app/wsdl2rest/.project +/app/wsdl2rest/.settings/ +.DS_Store diff --git a/.travis.yml b/.travis.yml index bedaa33..28550a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ before_install: - 'export PATH=./node_modules/.bin:$PATH' - 'npm install -g typescript' - 'npm install -g mocha' + - 'mvn install -f ./app/wsdl2rest/pom.xml' install: - 'npm install --ignore-scripts' - 'npm install' @@ -13,7 +14,6 @@ install: - 'rm -f ./node_modules/.bin/which' script: - 'npm test --silent' - - 'mocha' after_success: - if [[ $TRAVIS_PULL_REQUEST == "false" && $TRAVIS_BRANCH == "master" ]]; then sonar-scanner; diff --git a/README.md b/README.md index 5b8dcb4..f6716f3 100644 --- a/README.md +++ b/README.md @@ -77,30 +77,31 @@ The generator is located in the npm repository (https://www.npmjs.com/package/ge \____| \__,_| |_| |_| |_| \___| |_| ----------------------------------------------- Camel Project Generator + Version: 0.1.2 ----------------------------------------------- ? Your Camel project name (myproject) -? Your Camel version 2.18.1 -? DSL type (blueprint or spring) blueprint +? Your Camel version 2.18.2 +? Camel DSL type (blueprint, spring, or java) blueprint ? Package name: com.myproject camel project name myproject -camel version 2.18.1 +camel version 2.18.2 camel DSL blueprint package name com.myproject Creating folders Copying files -Copying dot files create pom.xml create README.md create src\main\resources\OSGI-INF\blueprint\blueprint.xml + create src\main\resources\OSGI-INF\log4j2.properties > ``` ### Notes on input fields * 'Camel project name' defaults to the name of the directory in which you start the generator. -* 'Camel version' defaults to 2.18.1 but if you provide a different version, that version then becomes the default for the next time the generator is run. -* 'DSL type' defaults to 'spring' but if you change it to a valid DSL type such as 'blueprint', 'spring', or 'java', that becomes the default for the next time the generator is run. If you enter an invalid value, the generator will present an error ">> Camel DSL must be either 'spring', 'blueprint', or 'java'.". +* 'Camel version' defaults to 2.22.1 but if you provide a different version, that version then becomes the default for the next time the generator is run. +* 'Camel DSL type' defaults to 'spring' but if you change it to a valid DSL type such as 'blueprint', 'spring', or 'java', that becomes the default for the next time the generator is run. If you enter an invalid value, the generator will present an error ">> Camel DSL must be either 'spring', 'blueprint', or 'java'.". * 'Package name' defaults to 'com.' + the name of the directory (i.e. 'com.myproject'). This default does not change if you provide a different value. ## Development Notes @@ -122,6 +123,14 @@ Then create a directory you wish to create a Camel project in and run the genera > yo camel-project ``` +## Running the Generator from the Command Line (*NEW*) +With version 0.1.2 we have added command-line capabilities for providing argument values for the prompted information. Without prompting, this allows us to use the generator as part of a larger script to help prep a new project in a more automated fashion. + +This allows us to do things like the following and avoid having to go through the prompts: +``` +> yo camel-project appname=MyApp camelVersion=2.19.1 camelDSL=spring package=com.myapp +``` + ### Running the Mocha tests First you must install mocha with npm. ``` @@ -132,14 +141,10 @@ Then, in the main generator-camel-project directory: > mocha ``` -## Known issues +## Running the Generated Templates -Generated templates for spring and Java DSLs can be run with: +Generated templates for spring, blueprint, and Java DSLs can be run with: ``` > mvn install > mvn camel:run ``` - -Unfortunately, the blueprint version does not run successfully. Working on finding a solution. -Created https://github.com/camel-tooling/generator-camel-project/issues/1 - diff --git a/app/index.js b/app/index.js index b940b5b..ac388e2 100644 --- a/app/index.js +++ b/app/index.js @@ -19,11 +19,19 @@ var yeoman = require('yeoman-generator'); var glob = require('glob'); var path = require('path'); var mkdirp = require('mkdirp'); +var fileUrl = require('file-url'); +var exec = require('child_process').exec; +var fs = require('fs'); + +const chalk = require('chalk'); const utils = require('./util'); -const defaultCamelVersion = "2.22.1"; +const defaultCamelVersion = "2.22.2"; const defaultCamelDSL = "spring"; const defaultPackagePrefix = "com."; +const defaultOutputDirectory = 'src/main/java'; +const defaultJaxRsUrl = "http://localhost:8081/jaxrs"; +const defaultJaxWsUrl = "http://localhost:8080/somepath"; function consoleHeader() { var pjson = require('../package.json'); @@ -51,10 +59,21 @@ module.exports = class extends yeoman { constructor(args, opts) { super(args, opts); + // base arguments this.argument('appname', { type: String, required: false }); this.argument('camelVersion', { type: String, required: false }); this.argument('camelDSL', { type: String, required: false }); this.argument('package', { type: String, required: false }); + + // wsdl2rest options + this.option('wsdl2rest'); + this.option('debug'); + + // wsdl2rest arguments + this.argument('wsdl', { type: String, required: false }); + this.argument('outdirectory', { type: String, required: false }); + this.argument('jaxrs', { type: String, required: false }); + this.argument('jaxws', { type: String, required: false }); } prompting() { @@ -69,7 +88,14 @@ module.exports = class extends yeoman { showPrompts = false; } - if (showPrompts) { + let showWsdl2Rest = this.options.wsdl2rest; + + var showW2EPrompts = true; + if (!showPrompts && showWsdl2Rest) { + showW2EPrompts = !(utils.isNotNull(this.options.wsdl)); + } + + if (showPrompts || showW2EPrompts) { consoleHeader(); } @@ -98,7 +124,9 @@ module.exports = class extends yeoman { message: 'Camel DSL type (blueprint, spring, or java)', choices: ['blueprint', 'spring', 'java'], default: defaultDSL, - validate: utils.validateCamelDSL, + validate: (value, showWsdl2Rest) => { + return utils.validateCamelDSL(value, showWsdl2Rest); + }, store: true }, prompts); utils.addPrompt({ @@ -109,23 +137,77 @@ module.exports = class extends yeoman { validate : utils.validatePackage }, prompts); - if (showPrompts) { + var defaultOutputDir = utils.setDefault(defaultOutputDirectory, this.options.outdirectory); + var defaultJaxRS = utils.setDefault(defaultJaxRsUrl, this.options.jaxrs); + var defaultJaxWS = utils.setDefault(defaultJaxWsUrl, this.options.jaxws); + var defaultWsdl = utils.setDefault('no wsdl specified', this.options.wsdl); + + if (showWsdl2Rest) { + utils.addPrompt({ + type: 'input', + name: 'wsdl', + message: 'URL to the input WSDL', + store: true + }, prompts); + utils.addPrompt({ + type: 'input', + name: 'outdirectory', + message: 'Name of the output directory for generated artifacts', + default: defaultOutputDir, + store: true + }, prompts); + utils.addPrompt({ + type: 'input', + name: 'jaxrsURL', + message: 'Address of the generated jaxrs endpoint', + default: defaultJaxRS, + store: true + }, prompts); + utils.addPrompt({ + type: 'input', + name: 'jaxwsURL', + message: 'Address of the target jaxws endpoint', + default: defaultJaxWS, + store: true + }, prompts); + } + + console.log('showPrompts = ' + showPrompts); + console.log('showw2eprompts = ' + showW2EPrompts); + + if (showPrompts || showW2EPrompts) { return this.prompt(prompts).then(function (props) { this.appname = props.name; this.camelVersion = props.camelVersion; this.camelDSL = props.camelDSL; this.package = props.package; + if (showWsdl2Rest) { + this.outdirectory = props.outdirectory; + this.wsdl = props.wsdl; + this.jaxwsURL = props.jaxwsURL; + this.jaxrsURL = props.jaxrsURL; + } }.bind(this)); } else { this.appname = defaultProject; this.camelVersion = defaultVersion; this.camelDSL = defaultDSL; this.package = defaultPackage; - } + if (showWsdl2Rest) { + this.outdirectory = defaultOutputDir; + this.wsdl = defaultWsdl; + this.jaxwsURL = defaultJaxWS; + this.jaxrsURL = defaultJaxRS; + console.log('wsdl = ' + this.wsdl); + } + } }; //writing logic here writing() { + let showWsdl2Rest = this.options.wsdl2rest; + let showDebug = this.options.debug; + var packageFolder = this.package.replace(/\./g, '/'); var src = 'src/main/java'; var myTemplatePath = path.join(this.templatePath(), this.camelDSL); @@ -147,11 +229,144 @@ module.exports = class extends yeoman { userProps.package = this.package; for (var i = 0; i < this.files.length; i++) { - this.fs.copyTpl( - this.templatePath(this.files[i]), - this.destinationPath(this.files[i].replace(/src\/main\/java/g, path.join(src, packageFolder))), - { userProps: userProps } - ); + var skipFile = false; + if (showWsdl2Rest) { + skipFile = testFileForWsdl2RestSkip(this.files[i]); //(testFileForWsdl2RestSkip(this.files[i]) == true); + } else { + skipFile = testFileForTemplateSkip(this.files[i]); + } + + if (!skipFile) { + if(this.files[i].localeCompare('pom.xml.wsdl2rest') == 0) { + var tempOutFile = "pom.xml"; + this.fs.copyTpl( + this.templatePath(this.files[i]), + this.destinationPath(tempOutFile.replace(/src\/main\/java/g, path.join(src, packageFolder))), + { userProps: userProps } + ); + } else { + this.fs.copyTpl( + this.templatePath(this.files[i]), + this.destinationPath(this.files[i].replace(/src\/main\/java/g, path.join(src, packageFolder))), + { userProps: userProps } + ); + } + } + } + + if (showWsdl2Rest) { + return wsdl2restGenerate(this.wsdl, this.outdirectory, this.jaxrsURL, this.jaxwsURL, this.camelDSL, showDebug); } } }; + +var skipListForWsdl2RestFiles = [ + 'src/main/resources/META-INF/spring/camel-context.xml', + 'src/main/resources/OSGI-INF/blueprint/blueprint.xml', + 'pom.xml' +]; + +function testFileForWsdl2RestSkip(file) { + for(var i=0; i 0; + if (isBlueprint) { + rawContextPath = "src/main/resources/OSGI-INF/blueprint/blueprint.xml"; + } else { + rawContextPath = "src/main/resources/META-INF/spring/camel-context.xml"; + } + restContextPath = path.join(process.cwd(), rawContextPath); + + // build the java command with classpath, class name, and the passed parameters + var cmdString = 'java ' + + ' -Dlog4j.configuration=' + logUrl + + ' -jar ' + jar + + ' --wsdl ' + wsdlFileUrl + + ' --out ' + outPath; + + if (isBlueprint) { + cmdString = cmdString + ' --blueprint-context ' + restContextPath; + } else { + cmdString = cmdString + ' --camel-context ' + restContextPath; + } + + if (jaxrs) { + cmdString = cmdString + ' --jaxrs ' + jaxrs; + } + if (jaxws) { + cmdString = cmdString + ' --jaxws ' + jaxws; + } + console.log('Calling wsdl2rest'); + if (isDebug) { + console.log(' command used: ' + cmdString); + } + return new Promise((resolve, reject) => { + const wsdl2rest = exec(cmdString); + if (isDebug) { + wsdl2rest.stdout.on('data', function (data) { + console.log(`stdout: ${data}`); + }); + wsdl2rest.stderr.on('data', function (data) { + console.log(`stderr: ${data}`); + }); + } + wsdl2rest.on('close', function (code) { + if (code === 0) { + console.log(' ' + chalk.green('create') + ' CXF artifacts for specified WSDL at ' + outputDirectory); + console.log(' ' + chalk.green('create') + ' ' + rawContextPath); + resolve() + } else { + reject() + console.log(` stderr: ${code}`); + console.log(` wsdl2rest did not generate artifacts successfully - please check the log file for details or re-run with --debug flag`); + } + }); + }) +} diff --git a/app/templates/blueprint/pom.xml b/app/templates/blueprint/pom.xml index e059c29..f05dd10 100644 --- a/app/templates/blueprint/pom.xml +++ b/app/templates/blueprint/pom.xml @@ -1,82 +1,82 @@ - 4.0.0 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + 4.0.0 <%= userProps.package %> <%= userProps.name %> 1.0.0-SNAPSHOT jar - <%= userProps.name %> + <%= userProps.name %> - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.html - repo - - + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.html + repo + + - + <%= userProps.camelVersion %> - UTF-8 - 3.2.0 - UTF-8 - + UTF-8 + 3.2.0 + UTF-8 + - - - - - org.apache.camel - camel-parent - ${camel.version} - import - pom - - - + + + + + org.apache.camel + camel-parent + ${camel.version} + import + pom + + + - - - org.apache.camel - camel-core - - - org.apache.camel - camel-blueprint - + + + org.apache.camel + camel-core + + + org.apache.camel + camel-blueprint + org.apache.camel camel-stream - - org.apache.camel - camel-test-blueprint - test - + + org.apache.camel + camel-test-blueprint + test + - - org.apache.logging.log4j - log4j-api - runtime - - - org.apache.logging.log4j - log4j-core - runtime - - - org.apache.logging.log4j - log4j-slf4j-impl - runtime - - - + + org.apache.logging.log4j + log4j-api + runtime + + + org.apache.logging.log4j + log4j-core + runtime + + + org.apache.logging.log4j + log4j-slf4j-impl + runtime + + + fuse-public-repository @@ -208,28 +208,28 @@ maven-bundle-plugin ${version.maven-bundle-plugin} false - - - bundle-manifest - prepare-package - - manifest - - - + + + bundle-manifest + prepare-package + + manifest + + + - - - org.apache.maven.plugins - maven-jar-plugin - 3.0.2 - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - + + + org.apache.maven.plugins + maven-jar-plugin + 3.0.2 + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + @@ -240,5 +240,5 @@ - Empty Camel Blueprint Example + Empty Camel Blueprint Example diff --git a/app/templates/blueprint/pom.xml.wsdl2rest b/app/templates/blueprint/pom.xml.wsdl2rest new file mode 100644 index 0000000..f0eabf2 --- /dev/null +++ b/app/templates/blueprint/pom.xml.wsdl2rest @@ -0,0 +1,264 @@ + + + 4.0.0 + + <%= userProps.package %> + <%= userProps.name %> + 1.0.0-SNAPSHOT + jar + + <%= userProps.name %> + + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.html + repo + + + + + <%= userProps.camelVersion %> + UTF-8 + 3.2.0 + UTF-8 + + + + + + + org.apache.camel + camel-parent + ${camel.version} + import + pom + + + + + + + org.apache.camel + camel-core + + + org.apache.camel + camel-blueprint + + + org.apache.camel + camel-stream + + + + + org.apache.camel + camel-test-blueprint + test + + + + + org.apache.logging.log4j + log4j-api + runtime + + + org.apache.logging.log4j + log4j-core + runtime + + + org.apache.logging.log4j + log4j-slf4j-impl + runtime + + + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.0_spec + 1.0.0.Final-redhat-1 + + + org.apache.camel + camel-jackson + + + org.apache.camel + camel-cxf + + + org.apache.camel + camel-servlet + + + + + + + fuse-public-repository + FuseSource Community Release Repository + https://repo.fusesource.com/nexus/content/groups/public + + false + + + true + never + + + + red-hat-ga-repository + Red Hat GA Repository + https://maven.repository.redhat.com/ga + + true + never + + + false + + + + + true + never + + + false + + red-hat-ea-repository + Red Hat EA Repository + https://maven.repository.redhat.com/earlyaccess/all + + + + + true + never + + + false + + jboss-ea-repository + Red Hat JBoss Early Access Repository + http://repository.jboss.org/nexus/content/groups/ea + + + + + + fuse-public-repository + FuseSource Community Release Repository + https://repo.fusesource.com/nexus/content/groups/public + + false + + + true + never + + + + red-hat-ga-repository + Red Hat GA Repository + https://maven.repository.redhat.com/ga + + true + never + + + false + + + + + true + never + + + false + + red-hat-ea-repository + Red Hat EA Repository + https://maven.repository.redhat.com/earlyaccess/all + + + + + true + never + + + false + + jboss-ea-repository + Red Hat JBoss Early Access Repository + http://repository.jboss.org/nexus/content/groups/ea + + + + + install + + + org.apache.maven.plugins + maven-compiler-plugin + 3.7.0 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-resources-plugin + 3.0.2 + + UTF-8 + + + + + + org.apache.felix + maven-bundle-plugin + ${version.maven-bundle-plugin} + false + + + bundle-manifest + prepare-package + + manifest + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.0.2 + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + + org.apache.camel + camel-maven-plugin + ${camel.version} + + + + + Empty Camel Blueprint Example + diff --git a/app/templates/spring/pom.xml b/app/templates/spring/pom.xml index 3204e8b..9817252 100644 --- a/app/templates/spring/pom.xml +++ b/app/templates/spring/pom.xml @@ -30,24 +30,24 @@ org.apache.camel camel-core - ${camel.version} + ${camel.version} org.apache.camel camel-spring - ${camel.version} + ${camel.version} org.apache.camel camel-stream - ${camel.version} + ${camel.version} org.apache.camel camel-test-spring - ${camel.version} + ${camel.version} diff --git a/app/templates/spring/pom.xml.wsdl2rest b/app/templates/spring/pom.xml.wsdl2rest new file mode 100644 index 0000000..80ef620 --- /dev/null +++ b/app/templates/spring/pom.xml.wsdl2rest @@ -0,0 +1,194 @@ + + + + 4.0.0 + + <%= userProps.package %> + <%= userProps.name %> + 1.0.0-SNAPSHOT + jar + + <%= userProps.name %> + + + + Apache License, Version 2.0 + repo + http://www.apache.org/licenses/LICENSE-2.0.html + + + + + UTF-8 + UTF-8 + 3.2.0 + <%= userProps.camelVersion %> + + + + + org.apache.camel + camel-core + ${camel.version} + + + org.apache.camel + camel-spring + ${camel.version} + + + org.apache.camel + camel-stream + ${camel.version} + + + + + org.apache.camel + camel-test-spring + ${camel.version} + + + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.0_spec + 1.0.0.Final-redhat-1 + + + org.apache.camel + camel-jackson + ${camel.version} + + + org.apache.camel + camel-cxf + ${camel.version} + + + org.apache.camel + camel-jetty + ${camel.version} + + + + + + fuse-public-repository + FuseSource Community Release Repository + https://repo.fusesource.com/nexus/content/groups/public + + false + + + true + never + + + + red-hat-ga-repository + Red Hat GA Repository + https://maven.repository.redhat.com/ga + + true + never + + + false + + + + + true + never + + + false + + red-hat-ea-repository + Red Hat EA Repository + https://maven.repository.redhat.com/earlyaccess/all + + + + + true + never + + + false + + jboss-ea-repository + Red Hat JBoss Early Access Repository + http://repository.jboss.org/nexus/content/groups/ea + + + + + + fuse-public-repository + FuseSource Community Release Repository + https://repo.fusesource.com/nexus/content/groups/public + + false + + + true + never + + + + red-hat-ga-repository + Red Hat GA Repository + https://maven.repository.redhat.com/ga + + true + never + + + false + + + + + true + never + + + false + + red-hat-ea-repository + Red Hat EA Repository + https://maven.repository.redhat.com/earlyaccess/all + + + + + true + never + + + false + + jboss-ea-repository + Red Hat JBoss Early Access Repository + http://repository.jboss.org/nexus/content/groups/ea + + + + + + + + org.apache.camel + camel-maven-plugin + + META-INF/spring/camel-context.xml + + + + + + Empty Camel Spring Example + diff --git a/app/util.js b/app/util.js index d1402a0..7a9075a 100644 --- a/app/util.js +++ b/app/util.js @@ -16,7 +16,8 @@ */ const chalk = require('chalk'); - +const fs = require('fs'); +const path = require('path'); const utils = {}; // List extracted from: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html @@ -74,13 +75,15 @@ var reservedKeywords = { // would be good to handle a few other validation tasks here as well, // such as validating the Camel version (is 2.18.1 valid vs. 4.0.0 invalid) -utils.validateCamelDSL = function (value) { +utils.validateCamelDSL = function (value, isWsdl2Rest) { const isBlueprint = value.match('blueprint'); const isSpring = value.match('spring'); const isJava = value.match('java'); let returnValue; - if (!isBlueprint && !isSpring && !isJava) { + if (!isWsdl2Rest && !isBlueprint && !isSpring && !isJava) { returnValue = chalk.red('Camel DSL must be either \'spring\', \'blueprint\', or \'java\'.'); + } else if (isWsdl2Rest && !isBlueprint && !isSpring) { + returnValue = chalk.red('When using wsdl2rest, the Camel DSL must be either \'spring\' or \'blueprint\'.'); } else { returnValue = true; } @@ -124,4 +127,14 @@ utils.validatePackage = function(packageName) { return true; } +utils.findWsdl2RestJar = function(testFolder) { + const f = fs.readdirSync(testFolder).find(f => path.extname(f) === '.jar'); + if (typeof f === "undefined") { + return null; + } else { + var fullPath = path.join(testFolder, f); + return fullPath; + } +} + module.exports = utils; \ No newline at end of file diff --git a/app/wsdl2rest/config/logging.properties b/app/wsdl2rest/config/logging.properties new file mode 100644 index 0000000..9e3b759 --- /dev/null +++ b/app/wsdl2rest/config/logging.properties @@ -0,0 +1,38 @@ +### +# #%L +# Fuse wsdl2rest :: Distro :: Standalone +# %% +# Copyright (C) 2015 Private +# %% +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# #L% +### + +# Root logger option +log4j.rootLogger=DEBUG, file, console + +# Direct log messages to a log file +log4j.appender.file=org.apache.log4j.FileAppender +log4j.appender.file.file=wsdl2rest.log +log4j.appender.file.append=true +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p [%c] (%t) - %m%n +log4j.appender.file.threshold=DEBUG + +# Direct log messages to console +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.target=System.err +log4j.appender.console.layout=org.apache.log4j.PatternLayout +log4j.appender.console.layout.ConversionPattern=%m%n +log4j.appender.console.threshold=INFO + diff --git a/app/wsdl2rest/pom.xml b/app/wsdl2rest/pom.xml new file mode 100644 index 0000000..50c58f7 --- /dev/null +++ b/app/wsdl2rest/pom.xml @@ -0,0 +1,149 @@ + + 4.0.0 + + wsdl2rest-impl-fatjar + Wsdl2Rest Fat Jar + 0.1.3-SNAPSHOT + org.github.camel.tooling.wsdl2rest + + + + 0.8.0.fuse-720034 + UTF-8 + + + + + org.jboss.fuse.wsdl2rest + wsdl2rest-impl + ${version.wsdl2rest} + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.1.0.RELEASE + + + + repackage + + + + + org.jboss.fuse.wsdl2rest.impl.Main + + + + + + + + fuse-public-repository + FuseSource Community Release Repository + https://repo.fusesource.com/nexus/content/groups/public + + false + + + true + never + + + + red-hat-ga-repository + Red Hat GA Repository + https://maven.repository.redhat.com/ga + + true + never + + + false + + + + + true + never + + + false + + red-hat-ea-repository + Red Hat EA Repository + https://maven.repository.redhat.com/earlyaccess/all + + + + + true + never + + + false + + jboss-ea-repository + Red Hat JBoss Early Access Repository + http://repository.jboss.org/nexus/content/groups/ea + + + + + + fuse-public-repository + FuseSource Community Release Repository + https://repo.fusesource.com/nexus/content/groups/public + + false + + + true + never + + + + red-hat-ga-repository + Red Hat GA Repository + https://maven.repository.redhat.com/ga + + true + never + + + false + + + + + true + never + + + false + + red-hat-ea-repository + Red Hat EA Repository + https://maven.repository.redhat.com/earlyaccess/all + + + + + true + never + + + false + + jboss-ea-repository + Red Hat JBoss Early Access Repository + http://repository.jboss.org/nexus/content/groups/ea + + + + diff --git a/manual/manualstart.js b/manual/manualstart.js new file mode 100644 index 0000000..abd89f8 --- /dev/null +++ b/manual/manualstart.js @@ -0,0 +1,4 @@ +const app_soap = require('../test/app_soap'); + +console.log('WSDL URL: ' + app_soap.getWSDLURL()); +app_soap.startWebService(); diff --git a/package-lock.json b/package-lock.json index 4d9017a..1ae7655 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "generator-camel-project", - "version": "0.1.1", + "version": "0.1.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -26,6 +26,18 @@ "samsam": "1.3.0" } }, + "ajv": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz", + "integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ansi-escapes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", @@ -87,6 +99,21 @@ "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", @@ -100,11 +127,29 @@ "lodash": "^4.17.10" } }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, "atob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -160,11 +205,26 @@ } } }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, "binaryextensions": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.1.1.tgz", "integrity": "sha512-XBaoWE9RW8pPdPQNibZsW2zh8TW6gcarXp1FZPwT8Uop8ScSNldJEWf2k9l3HeTqdrEwsOsFcq74RiJECW34yA==" }, + "bluebird": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", + "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -226,6 +286,12 @@ "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -252,6 +318,12 @@ "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", @@ -361,6 +433,15 @@ "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" }, + "combined-stream": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, "commander": { "version": "2.15.1", "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", @@ -382,6 +463,18 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", @@ -409,6 +502,15 @@ "resolved": "https://registry.npmjs.org/dargs/-/dargs-5.1.0.tgz", "integrity": "sha1-7H6lDHhWTNNsnV7Bj2Yyn63ieCk=" }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, "dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -477,6 +579,24 @@ } } }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, "detect-conflict": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/detect-conflict/-/detect-conflict-1.0.1.tgz", @@ -501,16 +621,38 @@ "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, "editions": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz", "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==" }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, "ejs": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==" }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, "error": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/error/-/error-7.0.2.tgz", @@ -528,11 +670,23 @@ "is-arrayish": "^0.2.1" } }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -573,6 +727,12 @@ } } }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, "extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", @@ -661,6 +821,18 @@ } } }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, "fast-glob": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", @@ -674,6 +846,12 @@ "micromatch": "^3.1.10" } }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", @@ -682,6 +860,11 @@ "escape-string-regexp": "^1.0.5" } }, + "file-url": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/file-url/-/file-url-2.0.2.tgz", + "integrity": "sha1-6VF4TXkJUSfTcTApqwY/QIGMoq4=" + }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -703,6 +886,32 @@ } } }, + "finalhandler": { + "version": "1.1.1", + "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -724,6 +933,23 @@ "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -732,6 +958,12 @@ "map-cache": "^0.2.2" } }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, "fs-extra": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.0.tgz", @@ -757,6 +989,15 @@ "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, "gh-got": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/gh-got/-/gh-got-6.0.0.tgz", @@ -864,6 +1105,22 @@ "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dev": true, + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -922,6 +1179,45 @@ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" }, + "http-errors": { + "version": "1.6.3", + "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "httpntlm": { + "version": "1.7.6", + "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.7.6.tgz", + "integrity": "sha1-aZHoNSg2AH1nEBuD247Q+RX5BtA=", + "dev": true, + "requires": { + "httpreq": ">=0.4.22", + "underscore": "~1.7.0" + } + }, + "httpreq": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", + "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=", + "dev": true + }, "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", @@ -1127,6 +1423,12 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, "is-utf8": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", @@ -1160,6 +1462,12 @@ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, "istextorbinary": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.2.1.tgz", @@ -1179,11 +1487,35 @@ "is-object": "^1.0.1" } }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -1192,6 +1524,18 @@ "graceful-fs": "^4.1.6" } }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, "just-extend": { "version": "1.1.27", "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.27.tgz", @@ -1351,6 +1695,27 @@ "to-regex": "^3.0.2" } }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "dev": true + }, + "mime-db": { + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", + "dev": true + }, + "mime-types": { + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", + "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "dev": true, + "requires": { + "mime-db": "~1.37.0" + } + }, "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", @@ -1487,6 +1852,12 @@ "validate-npm-package-license": "^3.0.1" } }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", @@ -1531,6 +1902,15 @@ "isobject": "^3.0.1" } }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1600,6 +1980,12 @@ "json-parse-better-errors": "^1.0.1" } }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", + "dev": true + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -1662,6 +2048,12 @@ "pify": "^3.0.0" } }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -1705,6 +2097,30 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, + "psl": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "dev": true + }, "read-chunk": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-2.1.0.tgz", @@ -1784,6 +2200,34 @@ "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, "resolve": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", @@ -1858,6 +2302,12 @@ "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==" }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, "scoped-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/scoped-regex/-/scoped-regex-1.0.0.tgz", @@ -1868,6 +2318,50 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, "set-value": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", @@ -1889,6 +2383,12 @@ } } }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -2041,6 +2541,60 @@ } } }, + "soap": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/soap/-/soap-0.25.0.tgz", + "integrity": "sha512-1fCilERdB28ImnjWUFUr0pYxRlZyZNR1zu2uSuHdGRPnC0XKyWbvSm0m8Pll8xIYwecaKIu5Bqcp2zKtEcQcrA==", + "dev": true, + "requires": { + "bluebird": "^3.5.0", + "concat-stream": "^1.5.1", + "debug": "^2.6.9", + "ejs": "~2.5.5", + "finalhandler": "^1.0.3", + "httpntlm": "^1.5.2", + "lodash": "^4.17.5", + "request": ">=2.9.0", + "sax": ">=0.6", + "serve-static": "^1.11.1", + "strip-bom": "~0.3.1", + "uuid": "^3.1.0", + "xml-crypto": "~0.8.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ejs": { + "version": "2.5.9", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.9.tgz", + "integrity": "sha512-GJCAeDBKfREgkBtgrYSf9hQy9kTb3helv0zGdzqhM7iAkW8FA/ZF97VQDbwFiwIT8MQLLOe5VlPZOEvZAqtUAQ==", + "dev": true + }, + "first-chunk-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-0.1.0.tgz", + "integrity": "sha1-dV0+wU1JqG49L8wIvurVwMornAo=", + "dev": true + }, + "strip-bom": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-0.3.1.tgz", + "integrity": "sha1-noo57/RW/5q8LwWfXyIluw8/fKU=", + "dev": true, + "requires": { + "first-chunk-stream": "^0.1.0", + "is-utf8": "^0.2.0" + } + } + } + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -2099,6 +2653,23 @@ "extend-shallow": "^3.0.0" } }, + "sshpk": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", + "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -2118,6 +2689,12 @@ } } }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "dev": true + }, "string-template": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", @@ -2265,11 +2842,56 @@ "repeat-string": "^1.6.1" } }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, "type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", + "dev": true + }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", @@ -2307,6 +2929,12 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -2348,6 +2976,15 @@ "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.3.tgz", "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==" }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", @@ -2384,6 +3021,12 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -2393,6 +3036,17 @@ "spdx-expression-parse": "^3.0.0" } }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, "vinyl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", @@ -2472,6 +3126,28 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "xml-crypto": { + "version": "0.8.5", + "resolved": "http://registry.npmjs.org/xml-crypto/-/xml-crypto-0.8.5.tgz", + "integrity": "sha1-K7z7PrM/OoKiGLgiv2craxwg5Tg=", + "dev": true, + "requires": { + "xmldom": "=0.1.19", + "xpath.js": ">=0.0.3" + } + }, + "xmldom": { + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.19.tgz", + "integrity": "sha1-Yx/Ad3bv2EEYvyUXGzftTQdaCrw=", + "dev": true + }, + "xpath.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.1.0.tgz", + "integrity": "sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ==", + "dev": true + }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", diff --git a/package.json b/package.json index 9352e4a..a1b0d98 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "author": "Brian Fitzpatrick", "license": "Apache-2.0", "dependencies": { + "file-url": "^2.0.2", "fs-extra": "^7.0.0", "glob": "^7.1.2", "mkdirp": "^0.5.1", @@ -27,6 +28,11 @@ "yeoman-test": "^1.7.2" }, "devDependencies": { - "mocha": "^5.2.0" + "mocha": "^5.2.0", + "soap": "^0.25.0" + }, + "scripts": { + "unit": "mocha --timeout=20000 test/", + "test": "npm run unit" } } diff --git a/test/address.wsdl b/test/address.wsdl new file mode 100644 index 0000000..aad51f5 --- /dev/null +++ b/test/address.wsdl @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/app.js b/test/app.js index 1a8428a..c3c6519 100644 --- a/test/app.js +++ b/test/app.js @@ -22,15 +22,42 @@ var helpers = require('yeoman-test'); var basicProps = {}; var fs = require('fs-extra'); const utils = require('../app/util'); +const app_soap = require('./app_soap'); + + +var defaultCamel = '2.22.2'; describe('generator-camel:app', function () { + describe('Should test the utils class package validation', function () { + it('utilities package validation should work for valid package', function () { + assert.strictEqual(utils.validatePackage('com.valid'), true); + }); + it('utilities package validation should fail for package name with invalid characters', function () { + assert.notStrictEqual(utils.validatePackage('invalid@.pkg.name'), true); + }); + it('utilities package validation should fail for package name with java keyword', function () { + assert.notStrictEqual(utils.validatePackage('a.name.with.package'), true); + }); + + it('utilities findWsdl2RestJar should succeed in finding wsdl2rest jar', function () { + // test runs on its own but fails in the larger test suite - still figuring that out + var targetDir = path.join(__dirname, '../app/wsdl2rest/target'); + var jar = utils.findWsdl2RestJar(targetDir); + assert.notStrictEqual(jar, null); + console.log(`jar: ${jar}`); + assert.strictEqual(jar.includes('wsdl2rest-impl-fatjar-'), true); + assert.strictEqual(jar.endsWith('.jar'), true); + assert.notStrictEqual(jar.endsWith('.original'), true); + }); + }); + describe('Should properly scaffold with default config for Spring', function () { before(function () { basicProps.name = 'MyAppMock'; basicProps.package = 'com.generator.mock'; - basicProps.camelVersion = '2.18.2'; + basicProps.camelVersion = defaultCamel; basicProps.camelDSL = 'spring'; return helpers.run(path.join(__dirname, '../app')) @@ -49,6 +76,7 @@ describe('generator-camel:app', function () { assert.file('pom.xml'); assert.file('README.md'); assert.file('src/main/resources/META-INF/spring/camel-context.xml'); + assert.noFile('pom.xml.wsdl2rest'); }); it('Should create pom.xml with default content', function () { @@ -62,7 +90,7 @@ describe('generator-camel:app', function () { before(function () { basicProps.name = 'MyAppMockBP'; basicProps.package = 'com.generator.mock.bp'; - basicProps.camelVersion = '2.18.2'; + basicProps.camelVersion = defaultCamel; basicProps.camelDSL = 'blueprint'; return helpers.run(path.join(__dirname, '../app')) @@ -81,6 +109,7 @@ describe('generator-camel:app', function () { assert.file('pom.xml'); assert.file('README.md'); assert.file('src/main/resources/OSGI-INF/blueprint/blueprint.xml'); + assert.noFile('pom.xml.wsdl2rest'); }); it('Should create pom.xml with default content', function () { @@ -94,7 +123,7 @@ describe('generator-camel:app', function () { before(function () { basicProps.name = 'MyAppMockJava'; basicProps.package = 'com.generator.mock.javadsl'; - basicProps.camelVersion = '2.18.2'; + basicProps.camelVersion = defaultCamel; basicProps.camelDSL = 'java'; return helpers.run(path.join(__dirname, '../app')) @@ -114,6 +143,7 @@ describe('generator-camel:app', function () { assert.file('README.md'); assert.file('src/main/java/com/generator/mock/javadsl/routes/CamelRoute.java'); assert.file('src/main/java/com/generator/mock/javadsl/routes/Launcher.java'); + assert.noFile('pom.xml.wsdl2rest'); }); it('Should create pom.xml with default content', function () { @@ -127,7 +157,7 @@ describe('generator-camel:app', function () { before(function () { basicProps.name = 'MyAppMock2'; basicProps.package = 'com.generator.mock2'; - basicProps.camelVersion = '2.18.2'; + basicProps.camelVersion = defaultCamel; basicProps.camelDSL = 'spring'; var args = []; @@ -149,6 +179,7 @@ describe('generator-camel:app', function () { assert.file('pom.xml'); assert.file('README.md'); assert.file('src/main/resources/META-INF/spring/camel-context.xml'); + assert.noFile('pom.xml.wsdl2rest'); }); it('Should create pom.xml with default content', function () { @@ -157,15 +188,155 @@ describe('generator-camel:app', function () { }); }); - describe('Should test the utils class package validation', function () { - it('utilities package validation should work for valid package', function () { - assert.strictEqual(utils.validatePackage('com.valid'), true); +}); + +describe('generator-camel:wsdl2rest', function () { + before(function () { + app_soap.startWebService(); + }); + + after(function () { + app_soap.stopWebService(); + }); + + describe('Should properly scaffold with wsdl2rest', function () { + it('Should create the basic structure and CXF files for spring', function () { + basicProps.name = 'MyAppMock'; + basicProps.package = 'com.generator.mock'; + basicProps.camelVersion = defaultCamel; + basicProps.camelDSL = 'spring'; + var wsdlPath = path.join(__dirname, '../test/address.wsdl'); + basicProps.wsdl = wsdlPath; + basicProps.outdirectory = 'src/main/java'; + return helpers.run(path.join(__dirname, '../app')) + .inTmpDir(function (dir) { + var done = this.async(); // `this` is the RunContext object. + fs.copy(path.join(__dirname, '../templates'), dir, done); + basicProps.outdirectory = path.join(dir, 'src/main/java'); + }) + .withOptions({ wsdl2rest: true }) + .withOptions({ debug: true }) + .withPrompts({ name: basicProps.name }) + .withPrompts({ camelVersion: basicProps.camelVersion }) + .withPrompts({ camelDSL: basicProps.camelDSL }) + .withPrompts({ package: basicProps.package }) + .withPrompts({ wsdl: basicProps.wsdl }) + .withPrompts({ outdirectory: basicProps.outdirectory }) + .toPromise() + .then(() => { + assert.file('pom.xml'); + assert.file('README.md'); + assert.file('src/main/resources/META-INF/spring/camel-context.xml'); + assert.file('src/main/java/org/jboss/fuse/wsdl2rest/test/doclit/Address.java'); + assert.noFile('pom.xml.wsdl2rest'); + }); }); - it('utilities package validation should fail for package name with invalid characters', function () { - assert.notStrictEqual(utils.validatePackage('invalid@.pkg.name'), true); + + it('Should create the basic structure and CXF files for blueprint', function () { + basicProps.name = 'MyAppMock'; + basicProps.package = 'com.generator.mock'; + basicProps.camelVersion = defaultCamel; + basicProps.camelDSL = 'blueprint'; + var wsdlPath = path.join(__dirname, '../test/address.wsdl'); + basicProps.wsdl = wsdlPath; + basicProps.outdirectory = 'src/main/java'; + return helpers.run(path.join(__dirname, '../app')) + .inTmpDir(function (dir) { + var done = this.async(); // `this` is the RunContext object. + fs.copy(path.join(__dirname, '../templates'), dir, done); + basicProps.outdirectory = path.join(dir, 'src/main/java'); + }) + .withOptions({ wsdl2rest: true }) + .withOptions({ debug: true }) + .withPrompts({ name: basicProps.name }) + .withPrompts({ camelVersion: basicProps.camelVersion }) + .withPrompts({ camelDSL: basicProps.camelDSL }) + .withPrompts({ package: basicProps.package }) + .withPrompts({ wsdl: basicProps.wsdl }) + .withPrompts({ outdirectory: basicProps.outdirectory }) + .toPromise() + .then(() => { + assert.file('pom.xml'); + assert.file('README.md'); + assert.file('src/main/resources/OSGI-INF/blueprint/blueprint.xml'); + assert.file('src/main/java/org/jboss/fuse/wsdl2rest/test/doclit/Address.java'); + assert.noFile('pom.xml.wsdl2rest'); + }); }); - it('utilities package validation should fail for package name with java keyword', function () { - assert.notStrictEqual(utils.validatePackage('a.name.with.package'), true); + + it('Should create the basic structure and CXF files for spring with an internal running WSDL url', function () { + + basicProps.name = 'HelloWorld'; + basicProps.package = 'com.mock.hello'; + basicProps.camelVersion = defaultCamel; + basicProps.camelDSL = 'spring'; + basicProps.jaxwsURL = 'http://localhost:3000/helloworldservice'; + var wsdlPath = 'http://localhost:3000/helloworldservice?wsdl'; + basicProps.wsdl = wsdlPath; + basicProps.outdirectory = 'src/main/java'; + return helpers.run(path.join(__dirname, '../app')) + .inTmpDir(function (dir) { + var done = this.async(); // `this` is the RunContext object. + fs.copy(path.join(__dirname, '../templates'), dir, done); + basicProps.outdirectory = path.join(dir, 'src/main/java'); + }) + .withOptions({ wsdl2rest: true }) + .withOptions({ debug: true }) + .withPrompts({ name: basicProps.name }) + .withPrompts({ camelVersion: basicProps.camelVersion }) + .withPrompts({ camelDSL: basicProps.camelDSL }) + .withPrompts({ package: basicProps.package }) + .withPrompts({ wsdl: basicProps.wsdl }) + .withPrompts({ outdirectory: basicProps.outdirectory }) + .withPrompts({ jaxwsURL: basicProps.jaxwsURL }) + .toPromise() + .then(() => { + assert.file('pom.xml'); + assert.file('README.md'); + assert.file('src/main/resources/META-INF/spring/camel-context.xml'); + assert.noFile('pom.xml.wsdl2rest'); + }); }); }); }); + +describe('Should properly scaffold with command line options rather than prompts - wsdl2rest', function () { + + before(function () { + basicProps.name = 'Mywsdl2restMock'; + basicProps.package = 'com.generator.mock'; + basicProps.camelVersion = defaultCamel; + basicProps.camelDSL = 'spring'; + var wsdlPath = path.join(__dirname, '../test/address.wsdl'); + basicProps.wsdl = wsdlPath; + + var args = []; + args.push("appname=" + basicProps.name); + args.push("camelVersion=" + basicProps.camelVersion); + args.push("camelDSL=" + basicProps.camelDSL); + args.push("package=" + basicProps.package); + args.push("wsdl=" + basicProps.wsdl); + + return helpers.run(path.join(__dirname, '../app')) + .inTmpDir(function (dir) { + var done = this.async(); // `this` is the RunContext object. + fs.copy(path.join(__dirname, '../templates'), dir, done); + }) + .withArguments(args) + .withOptions({ wsdl2rest: true }) + .withOptions({ debug: true }) + .toPromise(); + }); + + it('Should create the basic structure', function () { + assert.file('pom.xml'); + assert.file('README.md'); + assert.file('src/main/resources/META-INF/spring/camel-context.xml'); + assert.noFile('pom.xml.wsdl2rest'); + }); + + it('Should create pom.xml with default content', function () { + assert.fileContent('pom.xml', new RegExp('' + basicProps.package + '')); + assert.fileContent('pom.xml', new RegExp('' + basicProps.name + '')); + }); +}); diff --git a/test/app_soap.js b/test/app_soap.js new file mode 100644 index 0000000..676cc6b --- /dev/null +++ b/test/app_soap.js @@ -0,0 +1,45 @@ +var http = require('http'); +var soap = require('soap'); +var path = require('path'); +var methods = {}; + +var helloworldservice = { + HelloService: { + HelloPort: { + // This is how to define an asynchronous function. + sayHello: function (args, callback) { + // do some work + console.log('sayHello: ' + JSON.stringify(args)); + callback({'greeting': 'Hello '+ args.firstName}); + } + } + } +}; + +var wsdlFile = path.join(__dirname, '../test/helloworld.wsdl'); + +var wsdlxml = require('fs').readFileSync(wsdlFile, 'utf8'), + server = http.createServer(function (request, response) { + response.end("404: Not Found: " + request.url); + }); + +var PORT = 3000; + +methods.startWebService = function () { + server.listen(PORT); + console.log('server running on port ' + PORT); + + soap.listen(server, '/helloworldservice', helloworldservice, wsdlxml); +} + +methods.stopWebService = function () { + server.close(function() { + server = null; + }); +} + +methods.getWSDLURL = function() { + return 'http://localhost:' + PORT + '/helloworldservice?wsdl'; +} + +module.exports = methods; diff --git a/test/helloworld.wsdl b/test/helloworld.wsdl new file mode 100644 index 0000000..13863eb --- /dev/null +++ b/test/helloworld.wsdl @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WSDL File for HelloService + + + + +