l7note
Version:
Access your notion notes quick
52 lines (51 loc) • 2.38 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.execFunctions = void 0;
const process_1 = require("process");
const addList_js_1 = require("./main/addList.js");
const displayConfig_js_1 = require("./main/displayConfig.js");
const displayHelp_js_1 = require("./main/displayHelp.js");
const getList_js_1 = require("./main/getList.js");
const removeList_js_1 = require("./main/removeList.js");
const resetConfig_js_1 = require("./main/resetConfig.js");
const setup_js_1 = require("./setup.js");
const execFunctions = () => __awaiter(void 0, void 0, void 0, function* () {
var _a;
switch (setup_js_1.globalConfig.runType) {
case setup_js_1.RunType.ADD:
yield (0, addList_js_1.addList)();
break;
case setup_js_1.RunType.LIST:
yield (0, getList_js_1.getList)();
break;
case setup_js_1.RunType.RESET:
yield (0, resetConfig_js_1.resetConfig)();
break;
case setup_js_1.RunType.REMOVE:
yield (0, removeList_js_1.removeList)();
break;
case setup_js_1.RunType.CONFIG:
yield (0, displayConfig_js_1.displayConfig)();
break;
case setup_js_1.RunType.HELP:
yield (0, displayHelp_js_1.displayHelp)();
break;
default:
setup_js_1.globalConfig.optionalArgs.push({
name: '-h',
value: (_a = process_1.argv[2]) !== null && _a !== void 0 ? _a : '',
});
yield (0, getList_js_1.getList)();
break;
}
});
exports.execFunctions = execFunctions;