zapier-platform-cli
Version:
The CLI for apps in the Zapier Developer Platform.
17 lines (14 loc) • 3.25 kB
JavaScript
;
var utils = require('../utils');
var history = function history(context) {
return utils.listHistory().then(function (data) {
context.line('The history of your app "' + data.app.title + '" listed below.\n');
utils.printData(data.history, [['What', 'action'], ['Message', 'message'], ['Who', 'customuser'], ['Timestamp', 'date']]);
});
};
history.argsSpec = [];
history.argOptsSpec = {};
history.help = 'Prints all edit history for your app.';
history.example = 'zapier history';
history.docs = '\nGet the history of your app, listing all the changes made over the lifetime of your app. This includes everything from creation, updates, migrations, collaborator and invitee changes as well as who made the change and when.\n\n**Arguments**\n\n' + utils.argsFragment(history.argsSpec) + '\n' + utils.argOptsFragment(history.argOptsSpec) + '\n' + utils.defaultArgOptsFragment() + '\n\n' + '```' + 'bash\n$ zapier history\n# The history of your app "Example" listed below.\n#\n# \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n# \u2502 What \u2502 Message \u2502 Who \u2502 Timestamp \u2502\n# \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n# \u2502 collaborator added \u2502 other@example.com \u2502 user@example.com \u2502 2016-01-10T16:12:33 \u2502\n# \u2502 environment variable set \u2502 CLIENT_SECRET \u2502 user@example.com \u2502 2016-01-01T22:51:01 \u2502\n# \u2502 version added \u2502 1.2.52 \u2502 user@example.com \u2502 2016-01-01T22:19:36 \u2502\n# \u2502 app created \u2502 initial creation \u2502 user@example.com \u2502 2016-01-01T22:19:28 \u2502\n# \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n' + '```' + '\n';
module.exports = history;