@@ -804,7 +804,7 @@ function init(env, done) {
804804
805805 var properties = JSON . parse ( output ) . properties || { } ;
806806
807- var mlVersion = [ '8 ' , '7 ' , '6' , '5' ] . indexOf ( localMlVersion || properties [ 'ml.server-version' ] || '8 ' ) ;
807+ var mlVersion = [ '9 ' , '8 ' , '7' ] . indexOf ( localMlVersion || properties [ 'ml.server-version' ] || '9 ' ) ;
808808 var marklogicHost = properties [ 'ml.' + env + '-server' ] || localMlHost || 'localhost' ;
809809 var marklogicAdminUser = properties [ 'ml.user' ] || localMlAdminUser || 'admin' ;
810810 var appName = properties [ 'ml.app-name' ] || localAppName ;
@@ -817,7 +817,7 @@ function init(env, done) {
817817 type : 'list' ,
818818 name : 'mlVersion' ,
819819 message : 'MarkLogic version?' ,
820- choices : [ '8 ' , '7 ' , '6' , '5 '] ,
820+ choices : [ '9 ' , '8 ' , '7 ' ] ,
821821 default : mlVersion > 0 ? mlVersion : 0
822822 } , {
823823 type : 'input' ,
@@ -1048,9 +1048,9 @@ function isDevMode(env) {
10481048 return env === 'local' ;
10491049}
10501050
1051- function getNodeOptions ( env ) {
1051+ function getNodeOptions ( envName ) {
10521052 var envJson ;
1053- var envFile = './' + env + '.json' ;
1053+ var envFile = './' + envName + '.json' ;
10541054 try {
10551055 envJson = require ( envFile ) ;
10561056 } catch ( e ) {
@@ -1061,27 +1061,27 @@ function getNodeOptions(env) {
10611061 var port = args [ 'app-port' ] || process . env . PORT || envJson [ 'node-port' ] || config . defaultPort ;
10621062
10631063 var env = {
1064- 'PORT' : port ,
1065- 'NODE_ENV' : env ,
1066- 'APP_PORT' : port ,
1067- 'ML_HOST' : args [ 'ml-host' ] || process . env . ML_HOST || envJson [ 'ml-host' ] || config . marklogic . host ,
1068- 'ML_APP_USER' : args [ 'ml-app-user' ] || process . env . ML_APP_USER || envJson [ 'ml-app-user' ] || config . marklogic . user ,
1069- 'ML_APP_PASS' : args [ 'ml-app-pass' ] || process . env . ML_APP_PASS || envJson [ 'ml-app-pass' ] || config . marklogic . password ,
1070- 'ML_PORT' : args [ 'ml-http-port' ] || process . env . ML_PORT || envJson [ 'ml-http-port' ] || config . marklogic . httpPort ,
1071- 'ML_XCC_PORT' : args [ 'ml-xcc-port' ] || process . env . ML_XCC_PORT || envJson [ 'ml-xcc-port' ] || config . marklogic . xccPort ,
1072- 'ML_VERSION' : args [ 'ml-version' ] || process . env . ML_VERSION || envJson [ 'ml-version' ] || config . marklogic . version ,
1073- 'ML_CERTIFICATE' : args [ 'ml-certificate' ] || process . env . ML_CERTIFICATE || envJson [ ' mlCertificate' ] || config . marklogic . mlCertificate ,
1074- 'NODEJS_CERTIFICATE' : args [ ' nodeJsCertificate' ] || process . env . NODEJS_CERTIFICATE || envJson [ ' nodeJsCertificate' ] || config . marklogic . nodeJsCertificate ,
1075- 'NODEJS_PRIVATE_KEY' : args [ ' nodeJsPrivateKey' ] || process . env . NODEJS_PRIVATE_KEY || envJson [ ' nodeJsPrivateKey' ] || config . marklogic . nodeJsPrivateKey ,
1076- 'HTTPS_STRICT' : args [ ' httpsStrict' ] || process . env . HTTPS_STRICT || envJson [ ' httpsStrict' ] === " true" || config . marklogic . httpsStrict || true
1064+ 'PORT' : port ,
1065+ 'NODE_ENV' : envName ,
1066+ 'APP_PORT' : port ,
1067+ 'ML_HOST' : args [ 'ml-host' ] || process . env . ML_HOST || envJson [ 'ml-host' ] || config . marklogic . host ,
1068+ 'ML_APP_USER' : args [ 'ml-app-user' ] || process . env . ML_APP_USER || envJson [ 'ml-app-user' ] || config . marklogic . user ,
1069+ 'ML_APP_PASS' : args [ 'ml-app-pass' ] || process . env . ML_APP_PASS || envJson [ 'ml-app-pass' ] || config . marklogic . password ,
1070+ 'ML_PORT' : args [ 'ml-http-port' ] || process . env . ML_PORT || envJson [ 'ml-http-port' ] || config . marklogic . httpPort ,
1071+ 'ML_XCC_PORT' : args [ 'ml-xcc-port' ] || process . env . ML_XCC_PORT || envJson [ 'ml-xcc-port' ] || config . marklogic . xccPort ,
1072+ 'ML_VERSION' : args [ 'ml-version' ] || process . env . ML_VERSION || envJson [ 'ml-version' ] || config . marklogic . version ,
1073+ 'ML_CERTIFICATE' : args [ 'ml-certificate' ] || process . env . ML_CERTIFICATE || envJson . mlCertificate || config . marklogic . mlCertificate ,
1074+ 'NODEJS_CERTIFICATE' : args . nodeJsCertificate || process . env . NODEJS_CERTIFICATE || envJson . nodeJsCertificate || config . marklogic . nodeJsCertificate ,
1075+ 'NODEJS_PRIVATE_KEY' : args . nodeJsPrivateKey || process . env . NODEJS_PRIVATE_KEY || envJson . nodeJsPrivateKey || config . marklogic . nodeJsPrivateKey ,
1076+ 'HTTPS_STRICT' : args . httpsStrict || process . env . HTTPS_STRICT || ( envJson . httpsStrict === ' true' ) || config . marklogic . httpsStrict || true
10771077 } ;
10781078
10791079 //Temporary fix to remove undefined nodes
10801080 //which becomes environment variables with string "undefined" value
10811081 for ( var key in env ) {
1082- if ( env [ key ] === undefined ) {
1083- delete env [ key ] ;
1084- }
1082+ if ( env [ key ] === undefined ) {
1083+ delete env [ key ] ;
1084+ }
10851085 }
10861086
10871087 return {
@@ -1120,10 +1120,10 @@ function startBrowserSync(env, specRunner) {
11201120 if ( nodeOptions . env . NODEJS_CERTIFICATE ) {
11211121 proxyUrl = 'https://' + proxyUrl ;
11221122 }
1123- console . log ( " BROWSER SYNC PROXY REQUESTS TO : " + proxyUrl ) ;
1123+ console . log ( ' BROWSER SYNC PROXY REQUESTS TO : ' + proxyUrl ) ;
11241124
11251125 if ( ! nodeOptions . env . HTTPS_STRICT ) {
1126- process . env . NODE_TLS_REJECT_UNAUTHORIZED = "0" ;
1126+ process . env . NODE_TLS_REJECT_UNAUTHORIZED = '0' ;
11271127 }
11281128
11291129 var options = {
@@ -1145,7 +1145,7 @@ function startBrowserSync(env, specRunner) {
11451145 logLevel : 'debug' ,
11461146 logPrefix : 'gulp-patterns' ,
11471147 notify : true ,
1148- reloadDelay : 0 , // 1000
1148+ reloadDelay : 1000 ,
11491149 ui : false
11501150 } ;
11511151 if ( specRunner ) {
0 commit comments