UNPKG

@optro/create-trello-powerup

Version:

Easily create Trello Power-Ups from the Command Line

92 lines (91 loc) 5.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.INPUT_ARGUMENTS = exports.CAPABILITY_MODULES = exports.ALL_HTML_BACKED_CAPABILITIES = exports.ALL_CAPABILITIES = exports.CARD_BUTTON_STATUS_REPLACEMENT_STRING = exports.CARD_BUTTON_CONDITIONAL_END_REPLACEMENT_STRING = exports.CARD_BUTTON_CONDITIONAL_START_REPLACEMENT_STRING = exports.CARD_BUTTON_CONDITIONAL_IMPORT_REPLACEMENT_STRING = exports.REACT_ROUTER_CLIENT_PROVIDER_CLOSE_REPLACEMENT_STRING = exports.REACT_ROUTER_CLIENT_PROVIDER_REPLACEMENT_STRING = exports.REACT_ROUTER_CLIENT_REPLACEMENT_STRING = exports.REACT_ROUTER_IMPORT_REPLACEMENT_STRING = exports.CAPABILITIES_IMPORT_REPLACEMENT_STRING = exports.CAPABILITIES_REPLACEMENT_STRING = exports.REACT_ROUTER_LOADER_REPLACEMENT_STRING = exports.REACT_ROUTER_MODULE_REPLACEMENT_STRING = exports.WEBPACK_REPLACEMENT_STRING = exports.TEMPLATE_REPO = void 0; exports.TEMPLATE_REPO = 'https://github.com/optro-cloud/trello-powerup-full-sample.git'; exports.WEBPACK_REPLACEMENT_STRING = 'new MiniCssExtractPlugin(),'; exports.REACT_ROUTER_MODULE_REPLACEMENT_STRING = '<Router basename={process.env.CONTEXT_PATH || undefined}>'; exports.REACT_ROUTER_LOADER_REPLACEMENT_STRING = '// Lazy Loaders'; exports.CAPABILITIES_REPLACEMENT_STRING = 'window.TrelloPowerUp.initialize({'; exports.CAPABILITIES_IMPORT_REPLACEMENT_STRING = '// Capability Imports Here'; exports.REACT_ROUTER_IMPORT_REPLACEMENT_STRING = 'import {TrelloProvider} from \'@optro/ui-react\';'; exports.REACT_ROUTER_CLIENT_REPLACEMENT_STRING = 'const t = window.TrelloPowerUp.iframe();'; exports.REACT_ROUTER_CLIENT_PROVIDER_REPLACEMENT_STRING = '<TrelloProvider t={t}>'; exports.REACT_ROUTER_CLIENT_PROVIDER_CLOSE_REPLACEMENT_STRING = '</Suspense>'; exports.CARD_BUTTON_CONDITIONAL_IMPORT_REPLACEMENT_STRING = 'import {useProvidedTrello} from \'@optro/ui-react\';'; exports.CARD_BUTTON_CONDITIONAL_START_REPLACEMENT_STRING = '<div className="color-picker-container">'; exports.CARD_BUTTON_CONDITIONAL_END_REPLACEMENT_STRING = '<label htmlFor="note">'; exports.CARD_BUTTON_STATUS_REPLACEMENT_STRING = '<div id="container">'; exports.ALL_CAPABILITIES = [ 'attachment-sections', 'attachment-thumbnail', 'authorization-status', 'board-buttons', 'card-buttons', 'card-back-section', 'card-badges', 'card-detail-badges', 'card-from-url', 'format-url', 'list-sorters', 'list-actions', 'remove-data', 'save-attachment', 'show-authorization', 'show-settings', 'on-enable', 'on-disable', ]; exports.ALL_HTML_BACKED_CAPABILITIES = [ 'attachment-sections', 'board-buttons', 'card-buttons', 'card-back-section', 'show-settings', ]; exports.CAPABILITY_MODULES = { 'attachment-sections': '(t: Trello.PowerUp.IFrame, options: {entries: Trello.PowerUp.Attachment[]}) => getAttachmentSection(t, options, CAPABILITY_PROPS)', 'attachment-thumbnail': '(t: Trello.PowerUp.IFrame, options: Trello.PowerUp.AttachmentThumbnailOptions) => getAttachmentThumbnail(t, options, CAPABILITY_PROPS)', 'authorization-status': '(t: Trello.PowerUp.IFrame, options: any) => getAuthorizationStatus(t, options, CAPABILITY_PROPS)', 'board-buttons': '(t: Trello.PowerUp.IFrame) => getBoardButton(t, CAPABILITY_PROPS)', 'card-buttons': '(t: Trello.PowerUp.IFrame) => getCardButton(t, CAPABILITY_PROPS)', 'card-back-section': '(t: Trello.PowerUp.IFrame) => getCardBackSection(t, CAPABILITY_PROPS)', 'card-badges': '(t: Trello.PowerUp.IFrame) => getCardBadge(t, CAPABILITY_PROPS)', 'card-detail-badges': '(t: Trello.PowerUp.IFrame) => getCardDetailBadge(t, CAPABILITY_PROPS)', 'card-from-url': '(t: Trello.PowerUp.IFrame, options: Trello.PowerUp.CardFromUrlOptions) => getCardFromUrl(t, options, CAPABILITY_PROPS)', 'format-url': '(t: Trello.PowerUp.IFrame, options: Trello.PowerUp.FormatUrlOptions) => getFormatUrl(t, options, CAPABILITY_PROPS)', 'list-sorters': '(t: Trello.PowerUp.IFrame) => getListSorter(t, CAPABILITY_PROPS)', 'list-actions': '(t: Trello.PowerUp.IFrame) => getListAction(t, CAPABILITY_PROPS)', 'remove-data': '(t: Trello.PowerUp.IFrame) => getRemoveData(t, CAPABILITY_PROPS)', 'save-attachment': '(t: Trello.PowerUp.IFrame, options: any) => getSaveAttachment(t, options, CAPABILITY_PROPS)', 'show-authorization': '(t: Trello.PowerUp.IFrame) => getShowAuthorization(t, CAPABILITY_PROPS)', 'show-settings': '(t: Trello.PowerUp.IFrame) => getShowSettings(t, CAPABILITY_PROPS)', 'on-enable': '(t: Trello.PowerUp.IFrame) => getOnEnable(t, CAPABILITY_PROPS)', 'on-disable': '(t: Trello.PowerUp.IFrame) => getOnDisable(t, CAPABILITY_PROPS)', }; exports.INPUT_ARGUMENTS = [ { name: 'powerupName', required: false, description: 'Name of your Trello Power-Up', default: undefined, }, { name: 'powerupId', required: false, description: 'Trello Power-Up ID', default: undefined, }, { name: 'apiKey', required: false, description: 'Optro API key', default: undefined, }, { name: 'licenseType', required: false, description: 'Licensing type for your Power-Up', default: 'board', options: ['board', 'user'], }, ];