Comparing version 0.4.9 to 0.5.0
@@ -60,28 +60,9 @@ 'use strict'; | ||
projectName, projectToken, localProjectPath, client.Options.OVERWRITE_ALWAYS, true, false, Config.getIgnoreList() | ||
).then(function(){ | ||
).finally(function(){ | ||
console.log(('Watching ' + localProjectPath + '...').grey); | ||
}).catch(Config.handleAPIError); | ||
}); | ||
}); | ||
return deferred.promise; | ||
/* | ||
watch.watchTree(localProjectPath, options, function(f, curr, prev){ | ||
if (typeof f == 'object' && prev === null && curr === null) { | ||
// Finished walking the tree | ||
} else if (prev === null) { | ||
console.log(f); | ||
} else if (curr.nlink === 0) { | ||
console.log('Remove ' + f); | ||
} else { | ||
console.log(f); | ||
//var query = f.substring(localProjectPath.length); | ||
//console.log(('Uploading ' + query).grey); | ||
//vfs.writeRemoteQuery(query).then(function(){ | ||
// console.log((query + ' uploaded').green); | ||
//}); | ||
} | ||
}); | ||
*/ | ||
}) | ||
.progress(function(event){ | ||
var query; | ||
var file = event.file; | ||
@@ -92,6 +73,6 @@ var ext = file.substring(file.length - 3); | ||
} | ||
var query = file.substring(event.localProjectPath.length + 1); | ||
if(event.name === 'upload') { | ||
query = file.substring(event.localProjectPath.length + 1); | ||
console.log(('Uploading ' + query).grey); | ||
event.vfs.writeRemoteQuery(query).then(function(result){ | ||
event.vfs.writeRemoteQuery(query, true).then(function(result){ | ||
if(result && result.message) { | ||
@@ -105,3 +86,2 @@ console.error(result.message.red); | ||
} else if(event.name === 'remove') { | ||
query = file.substring(event.localProjectPath.length); | ||
console.log(('Removing ' + query).grey); | ||
@@ -122,12 +102,1 @@ event.vfs.deleteRemoteQuery(query).then(function(){ | ||
}); | ||
/* | ||
$28.truncate( | ||
projectName, projectToken, | ||
truncateCmd.simulate ? true : false, | ||
Config.getIgnoreList() | ||
).then(function(){ | ||
console.log('All done.'.grey); | ||
}).catch(Config.handleAPIError); | ||
*/ |
@@ -119,3 +119,3 @@ 'use strict'; | ||
this.writeRemoteQuery = function(query){ | ||
this.writeRemoteQuery = function(query, reportErrors){ | ||
var defered = Q.defer(); | ||
@@ -132,4 +132,4 @@ ffs.readFile(localProjectPath + query, { encoding: 'utf-8' }).then(function(source){ | ||
}) | ||
.then(function(){ | ||
defered.resolve(); | ||
.then(function(result){ | ||
defered.resolve(reportErrors === true ? result.body.compilationError : undefined); | ||
}) | ||
@@ -136,0 +136,0 @@ .catch(function(error){ defered.reject(error); }); |
@@ -9,3 +9,3 @@ { | ||
"description": "Command line utility to download and upload 28.io queries.", | ||
"version": "0.4.9", | ||
"version": "0.5.0", | ||
"keywords": [ | ||
@@ -12,0 +12,0 @@ "jsoniq", |
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
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
164447
1100