Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
hex: disabledColor || normalColor
}, `${isActive ? '⌛ ' : emoji ? `${emoji} ` : ''}${title}`), _react.default.createElement(_ink.Color, {
bold: false,
hex: _palette.hexMuted,
dim: isDisabled(config, id)
}, description ? `: ${description}` : ''));
},
// Remove the indicator
indicatorComponent: _ => ''
};
const showOptions = !isFlaggedStart && !removeOptions;
return _react.default.createElement(_ink.Box, {
flexDirection: "column"
}, showOptions ? _react.default.createElement(_ink.Box, {
marginBottom: 1
}, _react.default.createElement(_ink.Color, {
dim: isTaskRunning(messages)
}, _react.default.createElement(_templates.OptionsTemplate, {
selectProps: OptionsSelectProps
}))) : null, !(0, _utils.isEmpty)(messages) && _react.default.createElement(_templates.MessageTemplate, {
messages: messages,
isFlaggedStart: isFlaggedStart
}));
}
itemComponent: ({
emoji,
id,
title,
description,
isSelected
}) => {
const isActive = currentTask && currentTask.title === title && isTaskRunning(messages);
const disabledColor = isDisabled(config, id) && (isSelected ? '#CCC' : _palette.hexMuted);
const normalColor = !isDisabled(config, id) && (isSelected ? _palette.hexHighlight : _palette.hexDefault);
return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_ink.Color, {
bold: true,
dim: isDisabled(config, id),
hex: disabledColor || normalColor
}, `${isActive ? '⌛ ' : emoji ? `${emoji} ` : ''}${title}`), _react.default.createElement(_ink.Color, {
bold: false,
hex: _palette.hexMuted,
dim: isDisabled(config, id)
}, description ? `: ${description}` : ''));
},
// Remove the indicator
if (!content) return this.setState({
message: "You must add something to log."
});
try {
const res = await (0, _phin.default)({
url: "https://api.getmakerlog.com/tasks/",
method: "POST",
data: {
content,
done: true
}
});
if (res.statusCode === 200 || res.statusCode === 201) {
const message = _react.default.createElement(_react.Fragment, null, _react.default.createElement(_ink.Color, {
bgHex: "#009056"
}, " DONE "), " " + res.body.content);
return this.setState({
message: message
});
}
} catch (e) {
console.log(e);
}
}
module.exports = () => _react.default.createElement(_react.Fragment, null, _react.default.createElement(_ink.Color, {
green: true
}, _react.default.createElement(_inkSpinner.default, {
type: "dots"
})), " Loading");
},{}],"todo.js":[function(require,module,exports) {
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var React = require('react');
var _require = require('ink'),
Color = _require.Color,
Box = _require.Box;
var TextInput = require('ink-text-input')["default"];
var _require2 = require("../utils"),
getDesc = _require2.getDesc;
var Required = require('import-jsx')("./Required");
var Input =
/*#__PURE__*/
function (_React$Component) {
_inherits(Input, _React$Component);
function Input() {
var _this;
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
var React = require('react');
var _require = require('ink'),
render = _require.render,
Color = _require.Color,
Box = _require.Box;
var Welcome = require('import-jsx')("./Components/Welcome");
var Rules = require('import-jsx')("./Components/Rules");
var utils = require("./utils");
var commit = utils.commit,
getConfig = utils.getConfig,
isValidCommit = utils.isValidCommit;
var _getConfig = getConfig(),
title = _getConfig.title,
rules = _getConfig.rules;
module.exports = () => _react.default.createElement(_react.Fragment, null, _react.default.createElement(_ink.Color, {
green: true
}, _react.default.createElement(_inkSpinner.default, {
type: "dots"
})), " Loading");
},{}],"login.js":[function(require,module,exports) {
}, !(0, _utils.isEmpty)(messages) && messages.map(({
text,
type
}, i) => _react.default.createElement(_ink.Box, {
key: `msg${i}`
}, type === 'heading' && !isFlaggedStart && _react.default.createElement(_ink.Box, {
marginBottom: 1
}, _react.default.createElement(_ink.Text, {
bold: true
}, `—— ${text} ——`)), type === 'heading' && isFlaggedStart && _react.default.createElement(_ink.Text, {
bold: true
}, `${text}\n`), _react.default.createElement(_ink.Color, {
dim: messages.length - 1 !== i
}, type === 'error' && `💩 ${text}`, type === 'success' && `👌 ${text}`, type === 'message' && `💁 ${text}`, type === 'working' && (messages.length - 1 === i ? _react.default.createElement(_inkSpinner.default, {
type: "runner"
}) : `🏃 `), type === 'working' && ` ${text}`))));