Skip to content

Commit

Permalink
Removing Flowa
Browse files Browse the repository at this point in the history
  • Loading branch information
faressoft committed Jul 8, 2023
1 parent 55ab4c1 commit 6f10cf3
Show file tree
Hide file tree
Showing 4 changed files with 3,915 additions and 24 deletions.
1 change: 0 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ di.require('uuid');
di.require('is_js', 'is');
di.require('lodash', '_');
di.require('fs-extra', 'fs');
di.require('flowa', 'Flowa');
di.require('js-yaml', 'yaml');
di.require('performance-now', 'now');
di.require('async-promises', 'asyncPromises');
Expand Down
39 changes: 19 additions & 20 deletions commands/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ function isSet(input) {
* - Yes: use the token
* - No: Generate a new one and ask the user to register it
*
* @param {Object} context
* @return {Promise}
*/
function getToken(context) {
Expand Down Expand Up @@ -161,7 +160,7 @@ function shareRecording(context) {
var token = context.getToken;
var meta = context.getMeta;
var recordingFile = context.recordingFile;

var options = {
method: 'POST',
url: BASEURL + '/v1/recording',
Expand Down Expand Up @@ -228,29 +227,29 @@ function shareRecording(context) {
* @param {Object} argv
*/
function command(argv) {

// No global config
if (!di.utility.isGlobalDirectoryCreated()) {
require('./init.js').handler();
}

di.Flowa.run({

// Get a token for uploading recordings
getToken: getToken,

// Ask the user to enter meta data about the recording
getMeta: getMeta,

// Upload the recording
shareRecording: shareRecording

}, argv).then(function(context) {

done(context.shareRecording);

}).catch(di.errorHandler);

var context = {...argv};

// Get a token for uploading recordings
getToken(context)
.then(function(token) {
context.getToken = token;
// Ask the user to enter meta data about the recording
return getMeta(context);
})
.then(function(meta) {
context.getMeta = meta;
// Upload the recording
return shareRecording(context);
})
.then(function(url) {
done(url);
})
.catch(di.errorHandler);
}

////////////////////////////////////////////////////
Expand Down
Loading

0 comments on commit 6f10cf3

Please sign in to comment.