@kintone/customize-uploader
Version:
A kintone customize uploader
33 lines • 1.53 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.promptForScope = exports.promptForAppId = void 0;
const prompts_1 = require("@inquirer/prompts");
const validateForAppId = (v) => !!v;
const promptForAppId = (m) => __awaiter(void 0, void 0, void 0, function* () {
return (0, prompts_1.input)({
message: m("Q_AppId"),
validate: validateForAppId,
});
});
exports.promptForAppId = promptForAppId;
const promptForScope = (m) => __awaiter(void 0, void 0, void 0, function* () {
return (0, prompts_1.select)({
message: m("Q_Scope"),
choices: [
{ name: "ALL", value: "ALL" },
{ name: "ADMIN", value: "ADMIN" },
{ name: "NONE", value: "NONE" },
],
});
});
exports.promptForScope = promptForScope;
//# sourceMappingURL=init.js.map