@ind-rcg/modeler-sfdx-cli-plugin 246.1042.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +37 -0
- package/README.md +756 -0
- package/lib/commands/modeler/workspace/add.js +1 -0
- package/lib/commands/modeler/workspace/build.js +1 -0
- package/lib/commands/modeler/workspace/cleanup.js +1 -0
- package/lib/commands/modeler/workspace/create.js +1 -0
- package/lib/commands/modeler/workspace/package.js +1 -0
- package/lib/commands/modeler/workspace/refreshLocale.js +1 -0
- package/lib/commands/modeler/workspace/server/start.js +1 -0
- package/lib/commands/modeler/workspace/upgrade.js +1 -0
- package/lib/commands/modeler/workspace/utils/base64encode.js +1 -0
- package/lib/commands/modeler/workspace/utils/generateManifest.js +1 -0
- package/lib/commands/modeler/workspace/utils/migrateContracts.js +1 -0
- package/lib/commands/modeler/workspace/validate.js +1 -0
- package/lib/constants.js +1 -0
- package/lib/hooks/init/updateCheck.js +1 -0
- package/lib/model/buildStatus.js +1 -0
- package/lib/model/workspace.js +1 -0
- package/lib/model/workspaceCommand.js +1 -0
- package/lib/shared/commandBuilder.js +1 -0
- package/lib/shared/commandExecutor.js +1 -0
- package/lib/shared/commandOutput.js +1 -0
- package/lib/types/config.js +1 -0
- package/lib/types/errors.js +1 -0
- package/lib/types/messages.js +1 -0
- package/lib/types/package.js +1 -0
- package/lib/types/results.js +1 -0
- package/lib/utils/componentHelper.js +1 -0
- package/lib/utils/errorHelper.js +1 -0
- package/lib/utils/fsHelper.js +1 -0
- package/lib/utils/generateManifestHelper.js +1 -0
- package/lib/utils/messageHelper.js +1 -0
- package/lib/utils/packageHelper.js +1 -0
- package/lib/utils/serverHelper.js +1 -0
- package/lib/utils/templateEngine.js +1 -0
- package/lib/utils/templateHelper.js +1 -0
- package/lib/utils/updateChecker.js +1 -0
- package/lib/utils/validationHelper.js +1 -0
- package/messages/modeler-workspace-add.md +45 -0
- package/messages/modeler-workspace-build.md +29 -0
- package/messages/modeler-workspace-cleanup.md +17 -0
- package/messages/modeler-workspace-create.md +21 -0
- package/messages/modeler-workspace-package.md +21 -0
- package/messages/modeler-workspace-refresh-locale.md +27 -0
- package/messages/modeler-workspace-server-start.md +37 -0
- package/messages/modeler-workspace-upgrade.md +21 -0
- package/messages/modeler-workspace-utils-base64encode.md +25 -0
- package/messages/modeler-workspace-utils-generateManifest.md +15 -0
- package/messages/modeler-workspace-utils-migrateContracts.md +23 -0
- package/messages/modeler-workspace-validate.md +29 -0
- package/messages/modeler-workspace.md +19 -0
- package/oclif.manifest.json +429 -0
- package/package.json +108 -0
- package/templates/.gitignore.tmp +4 -0
- package/templates/README.md.tmp +77 -0
- package/templates/contractTemplates/#ModuleName#/BO/README.md +1 -0
- package/templates/contractTemplates/#ModuleName#/DS/README.md +1 -0
- package/templates/contractTemplates/#ModuleName#/PL/README.md +1 -0
- package/templates/contractTemplates/#ModuleName#/PR/README.md +1 -0
- package/templates/contractTemplates/#ModuleName#/TB/README.md +1 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/Bo${NAME}/Bo${NAME}.businessobject.xml +22 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/Bo${NAME}/Mv2/CreateAsync/Bo${NAME}.AfterCreateAsync.bl.js +54 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/Bo${NAME}/Mv2/CreateAsync/Bo${NAME}.BeforeCreateAsync.bl.js +56 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/Bo${NAME}/Mv2/DoValidateAsync/Bo${NAME}.AfterDoValidateAsync.bl.js +57 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/Bo${NAME}/Mv2/DoValidateAsync/Bo${NAME}.BeforeDoValidateAsync.bl.js +56 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/Bo${NAME}/Mv2/Initialize/Bo${NAME}.AfterInitialize.bl.js +54 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/Bo${NAME}/Mv2/Initialize/Bo${NAME}.BeforeInitialize.bl.js +54 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/Bo${NAME}/Mv2/LoadAsync/Bo${NAME}.AfterLoadAsync.bl.js +57 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/Bo${NAME}/Mv2/LoadAsync/Bo${NAME}.BeforeLoadAsync.bl.js +56 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/Bo${NAME}/Mv2/SaveAsync/Bo${NAME}.AfterSaveAsync.bl.js +57 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/Bo${NAME}/Mv2/SaveAsync/Bo${NAME}.BeforeSaveAsync.bl.js +56 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/BusinessObject.md +186 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/snippets/BusinessObjectListObjectsListObjectEventsSnipp.xml +3 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/snippets/BusinessObjectListObjectsListObjectSnipp.xml +1 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/snippets/BusinessObjectNestedObjectsNestedObjectSnipp.xml +1 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/snippets/BusinessObjectObjectLookupsObjectLookupEventsSnipp.xml +3 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/snippets/BusinessObjectObjectLookupsObjectLookupSnipp.xml +1 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/snippets/BusinessObjectSimplePropertiesSimplePropertyEventsSnipp.xml +3 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobject/snippets/BusinessObjectSimplePropertiesSimplePropertySnipp.xml +1 -0
- package/templates/contractTemplates/BO_BusinessObject/businessobjecthelper/snippets/BusinessObjectHelperSimplePropertiesSimplePropertySnipp.xml +1 -0
- package/templates/contractTemplates/BO_BusinessObject/validationmessages/ValidationMessage.md +38 -0
- package/templates/contractTemplates/BO_BusinessObject/validationmessages/snippets/ValidationMessagesValidationMessageSnipp.xml +1 -0
- package/templates/contractTemplates/DS_DataSource/DataSource.md +319 -0
- package/templates/contractTemplates/DS_DataSource/Ds${NAME}_sf.datasource.xml +11 -0
- package/templates/contractTemplates/DS_DataSource/snippets/DataSourceAttributesAttributeSnipp.xml +1 -0
- package/templates/contractTemplates/DS_DataSource/snippets/DataSourceAttributesDerivedAttributeSnipp.xml +1 -0
- package/templates/contractTemplates/DS_DataSource/snippets/DataSourceEntitiesEntityJoinSimpleJoinConditionAttributeSnipp.xml +1 -0
- package/templates/contractTemplates/DS_DataSource/snippets/DataSourceEntitiesEntityJoinSimpleJoinConditionLiteralSnipp.xml +1 -0
- package/templates/contractTemplates/DS_DataSource/snippets/DataSourceEntitiesEntitySnipp.xml +1 -0
- package/templates/contractTemplates/ExternalFiles/#Name#.externalfile.xml +6 -0
- package/templates/contractTemplates/LO_ListObject/Lo${NAME}/Li${NAME}.listitem.xml +5 -0
- package/templates/contractTemplates/LO_ListObject/Lo${NAME}/ListItem.md +114 -0
- package/templates/contractTemplates/LO_ListObject/Lo${NAME}/ListObject.md +354 -0
- package/templates/contractTemplates/LO_ListObject/Lo${NAME}/Lo${NAME}.listobject.xml +12 -0
- package/templates/contractTemplates/LO_ListObject/Lo${NAME}/Mv2/DoValidateAsync/Lo${NAME}.AfterDoValidateAsync.bl.js +57 -0
- package/templates/contractTemplates/LO_ListObject/Lo${NAME}/Mv2/DoValidateAsync/Lo${NAME}.BeforeDoValidateAsync.bl.js +56 -0
- package/templates/contractTemplates/LO_ListObject/Lo${NAME}/Mv2/LoadAsync/Lo${NAME}.AfterLoadAsync.bl.js +57 -0
- package/templates/contractTemplates/LO_ListObject/Lo${NAME}/Mv2/LoadAsync/Lo${NAME}.BeforeLoadAsync.bl.js +56 -0
- package/templates/contractTemplates/LO_ListObject/Lo${NAME}/Mv2/SaveAsync/Lo${NAME}.AfterSaveAsync.bl.js +57 -0
- package/templates/contractTemplates/LO_ListObject/Lo${NAME}/Mv2/SaveAsync/Lo${NAME}.BeforeSaveAsync.bl.js +56 -0
- package/templates/contractTemplates/LO_ListObject/snippets/ListItemSimplePropertiesSimplepropertySnipp.xml +1 -0
- package/templates/contractTemplates/LU_LookupObject/Lu${NAME}/LookupObject.md +97 -0
- package/templates/contractTemplates/LU_LookupObject/Lu${NAME}/Lu${NAME}.lookupobject.xml +12 -0
- package/templates/contractTemplates/LU_LookupObject/Lu${NAME}/Mv2/LoadAsync/Lu${NAME}.AfterLoadAsync.bl.js +57 -0
- package/templates/contractTemplates/LU_LookupObject/Lu${NAME}/Mv2/LoadAsync/Lu${NAME}.BeforeLoadAsync.bl.js +56 -0
- package/templates/contractTemplates/LU_LookupObject/snippets/LookupObjectSimplePropertiesSimplePropertySnipp.xml +1 -0
- package/templates/contractTemplates/PL_PrintLayout/#Name#PDF/#Name#PDF.printlayoutv2.xml +4 -0
- package/templates/contractTemplates/PR_Process_&_UI/#ModuleName#_#Name#/#ModuleName#_#Name#.userinterface.xml +4 -0
- package/templates/contractTemplates/PR_Process_&_UI/#ModuleName#_#Name#/#ModuleName#_#Name#Process.processflow.xml +12 -0
- package/templates/contractTemplates/PR_Process_&_UI/Process.md +790 -0
- package/templates/contractTemplates/PR_Process_&_UI/UserInterface.md +1545 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessBodyActionsActionConfirmSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessBodyActionsActionCreateSnipp.xml +7 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessBodyActionsActionDecisionSnipp.xml +5 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessBodyActionsActionEndSnipp.xml +5 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessBodyActionsActionLoadSnipp.xml +7 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessBodyActionsActionLogicSnipp.xml +7 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessBodyActionsActionMasterDetailSnipp.xml +24 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessBodyActionsActionNavigationSnipp.xml +8 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessBodyActionsActionPrintSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessBodyActionsActionPrintV2Snipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessBodyActionsActionProcessSnipp.xml +9 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessBodyActionsActionValidationSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessBodyActionsActionViewSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessEntryEntryActionsActionCreateSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessEntryEntryActionsActionLoadSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/Process/ProcessEntryEntryActionsActionLogicSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Attachment/AttachmentFolderInfoSectionSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Attachment/AttachmentFolderSnipp.xml +24 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Banner/BannerFilterSnipp.xml +19 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Banner/Banner_WithFilterSnipp.xml +25 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Banner/Banner_WithoutFilterSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BindingList/BindingsList_DecisionsSnipp.xml +9 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BindingList/BindingsList_GroupsSnipp.xml +11 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BindingList/BindingsList_ResultsSnipp.xml +13 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlEventsSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlHierarchyBindingsBindingAddItemSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlHierarchyBindingsBindingCategoriesSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlHierarchyBindingsBindingShowCategorySnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlHierarchyDataSourcesSnipp.xml +3 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlItemsBindingsBindingButtonSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlItemsBindingsBindingComboSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlItemsBindingsBindingDateSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlItemsBindingsBindingDecimalSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlItemsBindingsBindingDynamicSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlItemsBindingsBindingImageSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlItemsBindingsBindingStepperSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlItemsBindingsBindingStepper_CorrelationIdSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlItemsBindingsBindingTextSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlItemsBindingsResourceImageSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlItemsBindingsResourceLabelSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlItemsContextMenuSnipp.xml +13 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlSearchAttributesSnipp.xml +3 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/BreadCrumbControlSnipp.xml +22 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/BreadCrumbControl/MultiSelectionBreadCrumbControlSnipp.xml +23 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Calendar/CalendarControlEventsSnipp.xml +11 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Calendar/CalendarControlItemsBindingsBindingDateSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Calendar/CalendarControlItemsBindingsBindingDecimalSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Calendar/CalendarControlItemsBindingsBindingImageSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Calendar/CalendarControlItemsBindingsBindingLabelSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Calendar/CalendarControlItemsBindingsBindingTextSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Calendar/CalendarControlSettingsSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Calendar/CalendarControlSnipp.xml +8 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/CheckBox/CheckBoxEventsSnipp.xml +3 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/CheckBox/CheckBoxSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Cockpit/CockpitSectionsSnipp.xml +7 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/DataImportWizard/DataImportWizardSnipp.xml +12 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/DatePicker/DatePickerFieldSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/EmbededList/EmbeddedListSnipp.xml +8 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/EnhanceDecisionList/EnhancedDecisionListSnipp.xml +52 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/FastEntry/FastDataEntryGridSnipp.xml +69 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/GoogleMaps/GoogleMapDetailsSnipp.xml +20 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/GoogleMaps/GoogleMapSnipp.xml +7 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/GroupElement/GroupElementSnipp.xml +5 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/GroupedButtonList/GroupedButtonListEventsSnipp.xml +5 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/GroupedButtonList/GroupedButtonListFooterSnipp.xml +8 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/GroupedButtonList/GroupedButtonListSnipp.xml +8 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/GroupedList/GroupedListEventsSnipp.xml +7 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/GroupedList/GroupedListSnipp.xml +5 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/GroupedList/MultiSelectionGroupedListEventsSnipp.xml +7 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/GroupedList/MultiSelectionGroupedListSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/ImageButton/ImageButtonSnipp.xml +10 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/ImageSelector/ImageSelectorSnipp.xml +16 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/InputArea/InputAreaMultiLineSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/InputArea/InputAreaSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/ItemListLayout/ItemListLayout_ComplexSnipp.xml +13 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/ItemListLayout/ItemListLayout_GridSnipp.xml +10 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/ItemListLayout/ItemListLayout_TwoRowsSnipp.xml +8 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/LinkBar/LinkBarSnipp.xml +12 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Lookup/LookupEventSnipp.xml +3 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Lookup/LookupSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/MediaControl/MediaControlSnipp.xml +7 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/MediaListControl/MediaListControlBindingsBindingDescriptionSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/MediaListControl/MediaListControlBindingsBindingIsTaggedSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/MediaListControl/MediaListControlBindingsBindingMediaPathSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/MediaListControl/MediaListControlBindingsBindingTypeSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/MediaListControl/MediaListControlEventsSnipp.xml +4 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/MediaListControl/MediaListControlSnipp.xml +8 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Menu/LongPressMenuSnipp.xml +8 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Menu/MenuItemSnipp.xml +9 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Merger/MergerOneInputControlTwoButtonsMaxSnipp.xml +2 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Merger/MergerTwoInputControlsCombinedSnipp.xml +2 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Merger/MergerTwoInputControlsNoneSnipp.xml +2 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Merger/MergerTwoInputControlsOwnSnipp.xml +5 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/NoDataMessageSnipp.xml +9 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Page/MasterDetail/Page_MasterDetail_WithDetailGroupsSnipp.xml +43 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Page/MasterDetail/Page_MasterDetail_WithDetailListSnipp.xml +44 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Page/MasterDetail/Page_MasterDetail_WithDetailTabsSnipp.xml +61 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Page/MasterDetail/Page_MasterDetail_WithExtendedDetailSnipp.xml +44 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Page/SingleSection/Page_SingleSectionScreens_GroupedElementsSnipp.xml +33 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Page/SingleSection/Page_SingleSectionScreens_ListSnipp.xml +41 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Page/SingleSection/Page_SingleSectionScreens_TabSnipp.xml +39 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Page/SingleSection/Page_SingleSectionScreens_WizardSnipp.xml +34 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Page/SplitScreen/Page_SplitScreenSnipp.xml +27 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/SelectionBox/SelectionBoxBindingSnipp.xml +13 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/SelectionBox/SelectionBoxEventsSnipp.xml +4 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/SelectionBox/SelectionBoxToggleSnipp.xml +13 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/SignatureControl/SignatureControlBindingsBindingEditableParametersSnipp.xml +3 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/SignatureControl/SignatureControlBindingsBindingEditableSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/SignatureControl/SignatureControlBindingsBindingVisibleParametersSnipp.xml +3 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/SignatureControl/SignatureControlBindingsBindingVisibleSnipp.xml +1 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/SignatureControl/SignatureControlEditabilityRolesSnipp.xml +3 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/SignatureControl/SignatureControlSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/SignatureControl/SignatureControlVisibilityRolesSnipp.xml +3 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/Stepper/StepperSnipp.xml +7 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/TextBar/TextBarSnipp.xml +7 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/ThemeSelection/ThemeSelectionSnipp.xml +5 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/TimePicker/TimePickerFieldSnipp.xml +6 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/UserWelcomeSnipp.xml +24 -0
- package/templates/contractTemplates/PR_Process_&_UI/snippets/UI/VisitDetailsSnipp.xml +21 -0
- package/templates/contractTemplates/TB_Table/#Name#_T.temptable.xml +11 -0
- package/templates/contractTemplates/TB_Table/snippets/#Name#.dbtable.xml +10 -0
- package/templates/contractTemplates/TB_Table/snippets/dbtable/DBTablecolumnscolumnSnipp.xml +1 -0
- package/templates/contractTemplates/TB_Table/snippets/dbtable/DBTableindexesindexSnipp.xml +3 -0
- package/templates/contractTemplates/TB_Table/snippets/temptable/TempTableColumnsColumnIsDeletedSnipp.xml +1 -0
- package/templates/contractTemplates/TB_Table/snippets/temptable/TempTableColumnsColumnSnipp.xml +1 -0
- package/templates/contractTemplates/TB_Table/snippets/temptable/TempTableindexesindexSnipp.xml +3 -0
- package/templates/contractTemplates/UI_Plugins/#Name#UiPluginV2.uipluginv2.xml +16 -0
- package/templates/templateDefinitions.json +167 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AddWorkspaceCommand=void 0;const os=require("os"),sf_plugins_core_1=require("@salesforce/sf-plugins-core"),core_1=require("@salesforce/core"),workspaceCommand_1=require("../../../model/workspaceCommand"),constants_1=require("../../../constants"),messages_1=require("../../../types/messages"),messageHelper=require("../../../utils/messageHelper"),errors_1=require("../../../types/errors"),errorHelper=require("../../../utils/errorHelper"),templateEngine_1=require("../../../utils/templateEngine");core_1.Messages.importMessagesDirectory(__dirname);const messages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace_Add),sharedMessages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace);class AddWorkspaceCommand extends workspaceCommand_1.WorkspaceCommand{async run(){const{flags:e}=await this.parse(AddWorkspaceCommand);this.workspace=await this.assignWorkspace(e.path);let s=!0,a="";if(this.workspace.exists()){this.checkForWorkspaceUpgrade();try{let r={};e.type&&(r[templateEngine_1.QuestionType.Type]=e.type),e.name&&(r[templateEngine_1.QuestionType.Name]=e.name),e.module&&(r[templateEngine_1.QuestionType.Module]=e.module);let t=this.getTemplateEngine(),o=await t.processRequest(r);if(s=!0,o.State===templateEngine_1.TemplateEngineState.DONE){if(a=messages.getMessage(messages_1.MessagesBundle_Workspace_Add.WorkspaceAddSuccessful,[o.Type,o.Name]),this.log(a),o.Files&&o.Files.length>0)for(let e=0;e<o.Files.length;e++){const s=o.Files[e];this.log(` * ${s}`)}}else o.State===templateEngine_1.TemplateEngineState.ABORTED?(a=messages.getMessage(messages_1.MessagesBundle_Workspace_Add.WorkspaceAddAborted,[o.Type,o.Name]),this.warn(a)):o.State===templateEngine_1.TemplateEngineState.FAILED&&(s=!1,a=messages.getMessage(messages_1.MessagesBundle_Workspace_Add.WorkspaceAddFailed,[o.Type,o.Name,o.Message]),this.error(a,{exit:!1}))}catch(e){throw s=!1,errorHelper.createSfError(errors_1.ErrorTypes.AddWorkspaceError,messages.getMessage(messages_1.MessagesBundle_Workspace_Add.WorkspaceAddError),e)}}else s=!1,a=sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.WorkspaceNotFound,[this.workspace.getBasePath()]),this.warn(a);return{success:s,message:a}}getTemplateEngine(){return new templateEngine_1.TemplateEngine(this.workspace)}checkForWorkspaceUpgrade(){if(this.workspace&&this.workspace.exists()){let e=this.workspace.checkForUpgrade();if(e.upgradeAvailable){let s=messages.getMessage(messages_1.MessagesBundle_Workspace_Add.WorkspaceUpgradeAvailable),a=messageHelper.formatMessage(s,Object.assign({config:this.config},e));this.warn(a)}}}}exports.AddWorkspaceCommand=AddWorkspaceCommand,AddWorkspaceCommand.description=messages.getMessage(messages_1.MessagesBundle_Workspace_Add.CommandDescription),AddWorkspaceCommand.aliases=["mdl:add","mdl:ws:add"],AddWorkspaceCommand.flags=Object.assign({type:sf_plugins_core_1.Flags.string({char:"t",description:messages.getMessage(messages_1.MessagesBundle_Workspace_Add.TypeFlagDescription),required:!1,multiple:!1}),module:sf_plugins_core_1.Flags.string({char:"m",description:messages.getMessage(messages_1.MessagesBundle_Workspace_Add.ModuleFlagDescription),required:!1,multiple:!1}),name:sf_plugins_core_1.Flags.string({char:"n",description:messages.getMessage(messages_1.MessagesBundle_Workspace_Add.NameFlagDescription),required:!1,multiple:!1})},workspaceCommand_1.WorkspaceCommand.flags),AddWorkspaceCommand.examples=messages.getMessage(messages_1.MessagesBundle_Workspace_Add.Examples).split(os.EOL);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BuildWorkspaceCommand=void 0;const os=require("os"),core_1=require("@salesforce/core"),workspaceCommand_1=require("../../../model/workspaceCommand"),config_1=require("../../../types/config"),commandBuilder_1=require("../../../shared/commandBuilder"),commandExecutor_1=require("../../../shared/commandExecutor"),commandOutput_1=require("../../../shared/commandOutput"),constants_1=require("../../../constants"),messages_1=require("../../../types/messages"),errors_1=require("../../../types/errors"),errorHelper=require("../../../utils/errorHelper"),componentHelper_1=require("../../../utils/componentHelper");core_1.Messages.importMessagesDirectory(__dirname);const messages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace_Build),sharedMessages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace);class BuildWorkspaceCommand extends workspaceCommand_1.WorkspaceCommand{async run(){const{flags:e}=await this.parse(BuildWorkspaceCommand);this.workspace=await this.assignWorkspace(e.path);let s=!1,a="";if(this.workspace.exists()){const e=this.workspace.getSourcePath(),r=this.workspace.getApplicationBuildPath();let o=this.workspace.getApplicationConfig().generator.logLevel;o in config_1.LogLevel||(o=config_1.LogLevel.ERROR);let t=new commandBuilder_1.NodeCommandBuilder;t.withArg((new componentHelper_1.GeneratorComponentHelper).getGeneratorScriptFilePath()).withFlag("--from",e).withFlag("--to",r).withFlag("--sfDS","1").withFlag("--logs",o);let i=t.build();try{a=messages.getMessage(messages_1.MessagesBundle_Workspace_Build.BuildProgress,[this.workspace.getBasePath()]),this.spinner.start(a,sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.InProgress)),this.workspace.cleanupBuild(),await this.runCommand(i),this.workspace.getLastBuildStatus().ensureSuccess(),s=!0}catch(e){throw this.workspace.cleanupBuild(!0),errorHelper.createSfError(errors_1.ErrorTypes.BuildWorkspaceError,messages.getMessage(messages_1.MessagesBundle_Workspace_Build.GenerationFailed),e)}finally{this.spinner.stop(s?sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.Done):sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.Failed)),s&&(a=messages.getMessage(messages_1.MessagesBundle_Workspace_Build.GenerationSuccessful),this.log(a))}}else a=sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.WorkspaceNotFound,[this.workspace.getBasePath()]),this.warn(a);return{success:s,message:a}}async runCommand(e){let s=new commandExecutor_1.CliCommandExecutor(e,{cwd:__dirname}).execute();return await(new commandOutput_1.CommandOutput).getCmdResult(s)}}exports.BuildWorkspaceCommand=BuildWorkspaceCommand,BuildWorkspaceCommand.aliases=["mdl:ws:build","mdl:build"],BuildWorkspaceCommand.description=messages.getMessage("commandDescription"),BuildWorkspaceCommand.examples=messages.getMessage("examples").split(os.EOL);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CleanupWorkspaceCommand=void 0;const os=require("os"),core_1=require("@salesforce/core"),workspaceCommand_1=require("../../../model/workspaceCommand"),errors_1=require("../../../types/errors"),errorHelper=require("../../../utils/errorHelper"),constants_1=require("../../../constants"),messages_1=require("../../../types/messages");core_1.Messages.importMessagesDirectory(__dirname);const messages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace_Cleanup),sharedMessages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace);class CleanupWorkspaceCommand extends workspaceCommand_1.WorkspaceCommand{async run(){const{flags:e}=await this.parse(CleanupWorkspaceCommand);this.workspace=await this.assignWorkspace(e.path);let s=!0,a="";if(this.workspace.exists())try{this.workspace.cleanup(),a=messages.getMessage(messages_1.MessagesBundle_Workspace_Cleanup.WorkspaceCleanupSuccessful,[this.workspace.getBasePath()]),this.log(a)}catch(e){throw errorHelper.createSfError(errors_1.ErrorTypes.CleanupWorkspaceError,messages.getMessage(messages_1.MessagesBundle_Workspace_Cleanup.WorkspaceCleanupFailed,[this.workspace.getBasePath()]),e)}else s=!1,a=sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.WorkspaceNotFound,[this.workspace.getBasePath()]),this.warn(a);return{success:s,message:a}}}exports.CleanupWorkspaceCommand=CleanupWorkspaceCommand,CleanupWorkspaceCommand.aliases=["mdl:ws:cleanup","mdl:ws:clean","mdl:cleanup","mdl:clean"],CleanupWorkspaceCommand.description=messages.getMessage(messages_1.MessagesBundle_Workspace_Cleanup.CommandDescription),CleanupWorkspaceCommand.examples=messages.getMessage(messages_1.MessagesBundle_Workspace_Cleanup.Examples).split(os.EOL);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CreateWorkspaceCommand=void 0;const os=require("os"),core_1=require("@salesforce/core"),workspaceCommand_1=require("../../../model/workspaceCommand"),errors_1=require("../../../types/errors"),errorHelper=require("../../../utils/errorHelper"),constants_1=require("../../../constants"),messages_1=require("../../../types/messages");core_1.Messages.importMessagesDirectory(__dirname);const messages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace_Create);class CreateWorkspaceCommand extends workspaceCommand_1.WorkspaceCommand{async run(){const{flags:e}=await this.parse(CreateWorkspaceCommand);this.workspace=await this.assignWorkspace(e.path);let s=!0,a="";if(this.workspace.exists())a=messages.getMessage(messages_1.MessagesBundle_Workspace_Create.WorkspaceAlreadyExists,[this.workspace.getBasePath()]),this.warn(a);else try{this.workspace.create(),a=messages.getMessage(messages_1.MessagesBundle_Workspace_Create.WorkspaceCreationSuccessful,[this.workspace.getBasePath()]),this.log(a)}catch(e){throw s=!1,errorHelper.createSfError(errors_1.ErrorTypes.CreateWorkspaceError,messages.getMessage(messages_1.MessagesBundle_Workspace_Create.WorkspaceCreationFailed,[this.workspace.getBasePath()]),e)}return{success:s,message:a}}}exports.CreateWorkspaceCommand=CreateWorkspaceCommand,CreateWorkspaceCommand.description=messages.getMessage(messages_1.MessagesBundle_Workspace_Create.CommandDescription),CreateWorkspaceCommand.examples=messages.getMessage(messages_1.MessagesBundle_Workspace_Create.Examples).split(os.EOL);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PackageWorkspaceCommand=void 0;const os=require("os"),core_1=require("@salesforce/core"),workspaceCommand_1=require("../../../model/workspaceCommand"),errors_1=require("../../../types/errors"),errorHelper=require("../../../utils/errorHelper"),packageHelper=require("../../../utils/packageHelper"),componentHelper_1=require("../../../utils/componentHelper"),constants_1=require("../../../constants"),messages_1=require("../../../types/messages");core_1.Messages.importMessagesDirectory(__dirname);const messages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace_Package),sharedMessages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace);class PackageWorkspaceCommand extends workspaceCommand_1.WorkspaceCommand{async run(){const{flags:e}=await this.parse(PackageWorkspaceCommand);this.workspace=await this.assignWorkspace(e.path);let s=!0,a="";if(this.workspace.exists())try{a=messages.getMessage(messages_1.MessagesBundle_Workspace_Package.WorkspacePackageProgress,[this.workspace.getApplicationBuildPath()]),this.spinner.start(a,sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.InProgress)),this.workspace.getLastBuildStatus().ensureSuccess();let e=(0,componentHelper_1.getComponentInformationForPackage)();await packageHelper.createDeploymentPackage(this.workspace,new Date,e)}catch(e){throw s=!1,errorHelper.createSfError(errors_1.ErrorTypes.PackageWorkspaceError,messages.getMessage(messages_1.MessagesBundle_Workspace_Package.WorkspacePackageFailed,[this.workspace.getApplicationBuildPath()]),e)}finally{this.spinner.stop(s?sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.Done):sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.Failed)),s&&(a=messages.getMessage(messages_1.MessagesBundle_Workspace_Package.WorkspacePackageSuccessful,[this.workspace.getApplicationBuildPath()]),this.log(a))}else s=!1,a=sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.WorkspaceNotFound,[this.workspace.getBasePath()]),this.warn(a);return{success:s,message:a}}}exports.PackageWorkspaceCommand=PackageWorkspaceCommand,PackageWorkspaceCommand.aliases=["mdl:ws:package","mdl:package"],PackageWorkspaceCommand.description=messages.getMessage(messages_1.MessagesBundle_Workspace_Package.CommandDescription),PackageWorkspaceCommand.examples=messages.getMessage(messages_1.MessagesBundle_Workspace_Package.Examples).split(os.EOL);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RefreshLocaleCommand=void 0;const core_1=require("@salesforce/core"),workspaceCommand_1=require("../../../model/workspaceCommand"),config_1=require("../../../types/config"),commandBuilder_1=require("../../../shared/commandBuilder"),constants_1=require("../../../constants"),sf_plugins_core_1=require("@salesforce/sf-plugins-core"),messages_1=require("../../../types/messages"),errors_1=require("../../../types/errors"),errorHelper=require("../../../utils/errorHelper"),fsHelper_1=require("../../../utils/fsHelper"),commandExecutor_1=require("../../../shared/commandExecutor"),commandOutput_1=require("../../../shared/commandOutput"),componentHelper_1=require("../../../utils/componentHelper");core_1.Messages.importMessagesDirectory(__dirname);const messages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace_RefreshLocale),sharedMessages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace);class RefreshLocaleCommand extends workspaceCommand_1.WorkspaceCommand{constructor(e,s){super(e,s)}async run(){const{flags:e}=await this.parse(RefreshLocaleCommand);this.workspace=await this.assignWorkspace(e.path);let s=!1,r="";if(this.workspace.exists()){if(!this.workspace.getLastBuildStatus().wasSuccess())throw errorHelper.createSfError(errors_1.ErrorTypes.BuildStatusError,messages_1.MessagesBundle_Workspace_RefreshLocale.BuildNotFound);let a=(0,fsHelper_1.joinPaths)(this.workspace.getApplicationBuildPath(),constants_1.WorkspaceConstants.WORKSPACE_APPLICATION_LOCALE_SNIPPETS_FOLDER);if(!(0,fsHelper_1.existsFolder)(a))throw r=messages.getMessage(messages_1.MessagesBundle_Workspace_RefreshLocale.MissingLocaleSnippets),errorHelper.createSfError(errors_1.ErrorTypes.ValidateWorkspaceError,r);let o=this.workspace.getApplicationConfig().generator.logLevel;o in config_1.LogLevel||(o=config_1.LogLevel.ERROR);let t=new commandBuilder_1.NodeCommandBuilder,c=(0,fsHelper_1.joinPaths)(this.workspace.getSourcePath(),"Locale"),n=[];e.contract?e.contract.split(",").forEach((e=>{n.push((0,fsHelper_1.joinPaths)(c,e.trim()))})):n.push(...(0,fsHelper_1.listFiles)(c).filter((e=>e.endsWith(".locale.xml")))),t.withArg((new componentHelper_1.GeneratorComponentHelper).getGeneratorScriptFilePath()).withFlag("--from",this.workspace.getSourcePath()).withFlag("--to",this.workspace.getApplicationBuildPath()).withFlag("--refreshLocale","1").withFlag("--frameworkXmlPath",(new componentHelper_1.FrameworkComponentHelper).getFrameworkXMLPath()).withFlag("--logs",o).withFlag("--localeFiles",n.join(","));let l=t.build();try{r=messages.getMessage(messages_1.MessagesBundle_Workspace_RefreshLocale.RefreshInProgress,[this.workspace.getBasePath()]),this.spinner.start(r,sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.InProgress)),await this.runCommand(l).then((e=>{s=!0}),(e=>{throw e}))}catch(e){throw errorHelper.createSfError(errors_1.ErrorTypes.RefreshLocaleError,messages.getMessage(messages_1.MessagesBundle_Workspace_RefreshLocale.RefreshFailed),e)}finally{this.spinner.stop(s?sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.Done):sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.Failed)),s&&(r=messages.getMessage(messages_1.MessagesBundle_Workspace_RefreshLocale.RefreshSuccessful),this.log(r))}}else r=sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.WorkspaceNotFound,[this.workspace.getBasePath()]),this.warn(r);return{success:s,message:r}}async runCommand(e){let s=new commandExecutor_1.CliCommandExecutor(e,{cwd:__dirname}).execute();return await(new commandOutput_1.CommandOutput).getCmdResult(s)}}exports.RefreshLocaleCommand=RefreshLocaleCommand,RefreshLocaleCommand.description=messages.getMessage("commandDescription"),RefreshLocaleCommand.flags=Object.assign({contract:sf_plugins_core_1.Flags.string({char:"c",summary:messages.getMessage(messages_1.MessagesBundle_Workspace.PathFlagDescription),required:!1,multiple:!1})},workspaceCommand_1.WorkspaceCommand.flags);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.StartServerCommand=void 0;const core_1=require("@salesforce/core"),constants_1=require("../../../../constants"),messages_1=require("../../../../types/messages"),workspaceCommand_1=require("../../../../model/workspaceCommand"),os=require("os"),serverHelper=require("../../../../utils/serverHelper"),commandBuilder_1=require("../../../../shared/commandBuilder"),componentHelper_1=require("../../../../utils/componentHelper"),errorHelper=require("../../../../utils/errorHelper"),errors_1=require("../../../../types/errors"),commandExecutor_1=require("../../../../shared/commandExecutor"),commandOutput_1=require("../../../../shared/commandOutput");core_1.Messages.importMessagesDirectory(__dirname);const messages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace_Server_Start),sharedMessages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace);class StartServerCommand extends workspaceCommand_1.WorkspaceCommand{async run(){const{flags:e}=await this.parse(StartServerCommand);this.workspace=await this.assignWorkspace(e.path);let s={success:!0,message:""};try{if(this.workspace.exists()){serverHelper.validateConfiguration(this.workspace),serverHelper.createBackendConfiguration(this.workspace),serverHelper.createAppConfiguration(this.workspace);const e=new commandBuilder_1.NodeCommandBuilder;e.withArg((new componentHelper_1.ServerComponentHelper).getServerPath()).withFlag("--loggingConfig",constants_1.WorkspaceConstants.BACKEND_LOGGING_CONFIG).withFlag("--webServerConfig",constants_1.WorkspaceConstants.BACKEND_SERVER_CONFIG);const s=e.build();await this.runCommand(s)}else s.message=sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.WorkspaceNotFound,[this.workspace.getBasePath()]),s.success=!1,this.warn(s.message)}catch(e){throw errorHelper.createSfError(errors_1.ErrorTypes.ServerStartError,messages.getMessage(messages_1.MessagesBundle_Workspace_Server_Start.ServerStartFailed),e,1)}return s}async runCommand(e){this.warn(messages.getMessage(messages_1.MessagesBundle_Workspace_Server_Start.EncryptionWarning));let s=new commandExecutor_1.CliCommandExecutor(e,{cwd:this.workspace.getApplicationDataPath()}).execute();return s.stdoutSubject.subscribe((e=>{process.stdout.write(e)})),s.stderrSubject.subscribe((e=>{process.stderr.write(e)})),process.on("SIGINT",(async()=>{this.log(os.EOL+messages.getMessage(messages_1.MessagesBundle_Workspace_Server_Start.ServerStopRequest)),await s.killExecution("SIGINT")})),await(new commandOutput_1.CommandOutput).getCmdResult(s)}}exports.StartServerCommand=StartServerCommand,StartServerCommand.aliases=["mdl:ws:server:start","mdl:ws:simulate","mdl:simulate"],StartServerCommand.description=messages.getMessage("commandDescription"),StartServerCommand.examples=messages.getMessage("examples").split(os.EOL);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UpgradeWorkspaceCommand=void 0;const fsHelper=require("../../../utils/fsHelper"),constants_1=require("../../../constants"),os=require("os"),core_1=require("@salesforce/core"),errors_1=require("../../../types/errors"),errorHelper=require("../../../utils/errorHelper"),workspaceCommand_1=require("../../../model/workspaceCommand"),constants_2=require("../../../constants"),messages_1=require("../../../types/messages");core_1.Messages.importMessagesDirectory(__dirname);const messages=core_1.Messages.loadMessages(constants_2.PACKAGE_NAME,messages_1.MessagesBundle.Workspace_Upgrade);class UpgradeWorkspaceCommand extends workspaceCommand_1.WorkspaceCommand{getBasePath(){return this.basePath}getSnippetsPath(){return fsHelper.joinPaths(this.basePath,constants_1.WorkspaceConstants.WORKSPACE_SNIPPETS_FOLDER)}async run(){const{flags:e}=await this.parse(UpgradeWorkspaceCommand);this.workspace=await this.assignWorkspace(e.path);let s=!1,a="";if(!this.workspace.exists())return a=messages.getMessage(messages_1.MessagesBundle_Workspace_Upgrade.WorkspaceDoesNotExist,[this.workspace.getBasePath()]),this.warn(a),{success:s,message:a};try{this.workspace.upgrade(),s=!0,a=messages.getMessage(messages_1.MessagesBundle_Workspace_Upgrade.WorkspaceUpgradationSuccessful,[this.workspace.getBasePath()]),this.log(a)}catch(e){throw s=!1,errorHelper.createSfError(errors_1.ErrorTypes.UpgradeWorkspaceError,messages.getMessage(messages_1.MessagesBundle_Workspace_Upgrade.WorkspaceUpgradationFailed,[this.workspace.getBasePath()]),e)}return{success:s,message:a}}}exports.UpgradeWorkspaceCommand=UpgradeWorkspaceCommand,UpgradeWorkspaceCommand.description=messages.getMessage(messages_1.MessagesBundle_Workspace_Upgrade.CommandDescription),UpgradeWorkspaceCommand.examples=messages.getMessage(messages_1.MessagesBundle_Workspace_Upgrade.Examples).split(os.EOL);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Base64EncodeCommand=void 0;const os=require("os"),core_1=require("@salesforce/core"),workspaceCommand_1=require("../../../../model/workspaceCommand"),errors_1=require("../../../../types/errors"),errorHelper=require("../../../../utils/errorHelper"),fsHelper=require("../../../../utils/fsHelper"),constants_1=require("../../../../constants"),messages_1=require("../../../../types/messages"),sf_plugins_core_1=require("@salesforce/sf-plugins-core");core_1.Messages.importMessagesDirectory(__dirname);const messages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace_Utils_Base64Encode);class Base64EncodeCommand extends workspaceCommand_1.WorkspaceCommand{async run(){const{flags:e}=await this.parse(Base64EncodeCommand);this.workspace=await this.assignWorkspace(e.path);let s=!0,r="",a=e.input;if(fsHelper.existsFile(a)){const e=10,o=1048576*e;if(fsHelper.getFileSize(a)<=o)try{r=fsHelper.base64EncodeFile(a),this.log(r)}catch(e){throw s=!1,errorHelper.createSfError(errors_1.ErrorTypes.Base64EncodeError,messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_Base64Encode.Base64EncodeError,[a]),e)}else s=!1,r=messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_Base64Encode.InputFileSizeLimit,[a,e]),this.error(r,{exit:!1})}else s=!1,r=messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_Base64Encode.InputFileNotFound,[a,a]),this.error(r,{exit:!1});return{success:s,message:r}}}exports.Base64EncodeCommand=Base64EncodeCommand,Base64EncodeCommand.description=messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_Base64Encode.CommandDescription),Base64EncodeCommand.examples=messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_Base64Encode.Examples).split(os.EOL),Base64EncodeCommand.flags={...workspaceCommand_1.WorkspaceCommand.flags,input:sf_plugins_core_1.Flags.string({summary:messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_Base64Encode.InputFlagDescription),char:"i",required:!0})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GenerateManifestCommand=void 0;const workspaceCommand_1=require("../../../../model/workspaceCommand"),messages_1=require("../../../../types/messages"),core_1=require("@salesforce/core"),constants_1=require("../../../../constants"),fs=require("fs-extra"),errorHelper=require("../../../../utils/errorHelper"),errors_1=require("../../../../types/errors"),generateManifestHelper_1=require("../../../../utils/generateManifestHelper");core_1.Messages.importMessagesDirectory(__dirname);const messages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace_Utils_GenerateManifest),sharedMessages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace);class GenerateManifestCommand extends workspaceCommand_1.WorkspaceCommand{async run(){const{flags:e}=await this.parse(GenerateManifestCommand);this.workspace=await this.assignWorkspace(e.path);let s=!1,a="";if(!this.workspace.exists())return a=sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.WorkspaceNotFound,[this.workspace.getBasePath()]),this.warn(a),{success:s,message:a};try{a=messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_GenerateManifest.inProgress),this.spinner.start(a,sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.InProgress));const e=this.workspace.getManifestFilePath(),r={};r[GenerateManifestCommand.FINGERPRINT_KEY]=(0,generateManifestHelper_1.getFingerprints)(this.workspace.getSourcePath()),fs.writeJSONSync(e,r),s=!0,a=messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_GenerateManifest.successful),this.log(a)}catch(e){throw errorHelper.createSfError(errors_1.ErrorTypes.GenerateManifestError,messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_GenerateManifest.failed),e)}finally{this.spinner.stop(s?sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.Done):sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.Failed))}return{success:s,message:a}}}exports.GenerateManifestCommand=GenerateManifestCommand,GenerateManifestCommand.hidden=!0,GenerateManifestCommand.description=messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_GenerateManifest.commandDescription),GenerateManifestCommand.FINGERPRINT_KEY="fingerprints";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MigrateContracts=void 0;const core_1=require("@salesforce/core"),constants_1=require("../../../../constants"),messages_1=require("../../../../types/messages"),workspaceCommand_1=require("../../../../model/workspaceCommand"),fsHelper_1=require("../../../../utils/fsHelper"),errorHelper=require("../../../../utils/errorHelper"),errors_1=require("../../../../types/errors"),config_1=require("../../../../types/config"),commandBuilder_1=require("../../../../shared/commandBuilder"),componentHelper_1=require("../../../../utils/componentHelper"),commandExecutor_1=require("../../../../shared/commandExecutor"),commandOutput_1=require("../../../../shared/commandOutput");core_1.Messages.importMessagesDirectory(__dirname);const messages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace_Utils_MigrateContracts),sharedMessages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace);class MigrateContracts extends workspaceCommand_1.WorkspaceCommand{async run(){const{flags:e}=await this.parse(MigrateContracts);this.workspace=await this.assignWorkspace(e.path);let s=!0,r="";if(!this.workspace.exists())throw r=messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_MigrateContracts.WorkspaceNotFound,[this.workspace.getBasePath()]),errorHelper.createSfError(errors_1.ErrorTypes.ValidateWorkspaceError,r);let a=this.workspace.getSourcePath();if(!(0,fsHelper_1.existsFolder)(a))throw r=messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_MigrateContracts.MissingSrcDirectory),errorHelper.createSfError(errors_1.ErrorTypes.ValidateWorkspaceError,r);let t=this.workspace.getApplicationConfig().generator.logLevel;t in config_1.LogLevel||(t=config_1.LogLevel.ERROR);let o=new commandBuilder_1.NodeCommandBuilder;o.withArg((new componentHelper_1.GeneratorComponentHelper).getMigratorScriptFilePath()).withFlag("--from",a).withFlag("--logs",t);let i=o.build();try{r=messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_MigrateContracts.MigrationInProgress),this.spinner.start(r,sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.InProgress)),await this.runCommand(i).then((e=>{this.log(e),s=!0}),(e=>{throw s=!1,e}))}catch(e){throw s=!1,errorHelper.createSfError(errors_1.ErrorTypes.MigrateContractError,messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_MigrateContracts.MigrationFailed),e)}finally{this.spinner.stop(s?sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.Done):sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.Failed)),s&&(r=messages.getMessage(messages_1.MessagesBundle_Workspace_Utils_MigrateContracts.MigrationComplete),this.log(r))}return{success:s,message:r}}async runCommand(e){let s=new commandExecutor_1.CliCommandExecutor(e,{cwd:__dirname}).execute();return await(new commandOutput_1.CommandOutput).getCmdResult(s)}}exports.MigrateContracts=MigrateContracts,MigrateContracts.description=messages.getMessage("CommandDescription");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ValidateWorkspaceCommand=void 0;const os=require("os"),core_1=require("@salesforce/core"),workspaceCommand_1=require("../../../model/workspaceCommand"),config_1=require("../../../types/config"),commandBuilder_1=require("../../../shared/commandBuilder"),commandExecutor_1=require("../../../shared/commandExecutor"),commandOutput_1=require("../../../shared/commandOutput"),constants_1=require("../../../constants"),messages_1=require("../../../types/messages"),errors_1=require("../../../types/errors"),errorHelper=require("../../../utils/errorHelper"),componentHelper_1=require("../../../utils/componentHelper"),fsHelper=require("../../../utils/fsHelper");core_1.Messages.importMessagesDirectory(__dirname);const messages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace_Validate),sharedMessages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace);class ValidateWorkspaceCommand extends workspaceCommand_1.WorkspaceCommand{async run(){const{flags:e}=await this.parse(ValidateWorkspaceCommand);this.workspace=await this.assignWorkspace(e.path);let s=!1,a="";if(this.workspace.exists()){const e=this.workspace.getSourcePath(),r=fsHelper.joinPaths(this.workspace.getApplicationBuildPath(),"app","clockwork");fsHelper.ensureFolderExists(r);let o=this.workspace.getApplicationConfig().generator.logLevel;o in config_1.LogLevel||(o=config_1.LogLevel.ERROR);let t=new commandBuilder_1.NodeCommandBuilder;t.withArg((new componentHelper_1.GeneratorComponentHelper).getValidatorScriptFilePath()).withFlag("--from",e).withFlag("--to",r).withFlag("--sfDS","1").withFlag("--logs",o).withFlag("--modelerMode","designer");let i=t.build();try{a=messages.getMessage(messages_1.MessagesBundle_Workspace_Validate.ValidationProgress,[this.workspace.getBasePath()]),this.spinner.start(a,sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.InProgress)),await this.runCommand(i),this.workspace.getLastBuildStatus().validationStatus.ensureSuccess(),s=!0}catch(e){throw errorHelper.createSfError(errors_1.ErrorTypes.ValidateWorkspaceError,messages.getMessage(messages_1.MessagesBundle_Workspace_Validate.ValidationFailed),e)}finally{this.spinner.stop(s?sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.Done):sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.Failed)),s&&(a=messages.getMessage(messages_1.MessagesBundle_Workspace_Validate.ValidationSuccessful),this.log(a))}}else a=sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.WorkspaceNotFound,[this.workspace.getBasePath()]),this.warn(a);return{success:s,message:a}}async runCommand(e){let s=new commandExecutor_1.CliCommandExecutor(e,{cwd:__dirname}).execute();return await(new commandOutput_1.CommandOutput).getCmdResult(s)}}exports.ValidateWorkspaceCommand=ValidateWorkspaceCommand,ValidateWorkspaceCommand.aliases=["mdl:ws:validate","mdl:validate"],ValidateWorkspaceCommand.description=messages.getMessage("commandDescription"),ValidateWorkspaceCommand.examples=messages.getMessage("examples").split(os.EOL);
|
package/lib/constants.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WorkspaceConstants=exports.PACKAGE_NAME=void 0,exports.PACKAGE_NAME="@ind-rcg/modeler-sfdx-cli-plugin";class WorkspaceConstants{}exports.WorkspaceConstants=WorkspaceConstants,WorkspaceConstants.WORKSPACE_APPLICATION_FOLDER="appl",WorkspaceConstants.WORKSPACE_APPLICATION_BUILD_FOLDER="build",WorkspaceConstants.WORKSPACE_APPLICATION_CONFIG_FOLDER="config",WorkspaceConstants.WORKSPACE_APPLICATION_DATA_FOLDER="data",WorkspaceConstants.WORKSPACE_APPLICATION_LOCALE_SNIPPETS_FOLDER="localeSnippets",WorkspaceConstants.WORKSPACE_SNIPPETS_FOLDER="contractSnippets",WorkspaceConstants.WORKSPACE_SOURCE_FOLDER="src",WorkspaceConstants.WORKSPACE_TEST_FOLDER="test",WorkspaceConstants.WORKSPACE_IDE_SETTINGS_FOLDER=".vscode",WorkspaceConstants.WORKSPACE_IDENTIFIER_FILE=".modeler-workspace",WorkspaceConstants.WORKSPACE_GITIGNORE_FILE=".gitignore",WorkspaceConstants.WORKSPACE_README_FILE="README.md",WorkspaceConstants.WORKSPACE_APPLICATION_CONFIG_FILE="config.json",WorkspaceConstants.WORKSPACE_IDE_SETTINGS_FILE="settings.json",WorkspaceConstants.XML_XSD_MAPPING_FILE="xmlXsdMapping.json",WorkspaceConstants.WORKSPACE_APPLICATION_BUILD_STATUS_FILE="status.json",WorkspaceConstants.WORKSPACE_APPLICATION_VALIDATION_RESULT_FILE="generatorValidationResult.json",WorkspaceConstants.WORKSPACE_APPLICATION_GENERATOR_HANDOVER_FILE="generatorHandoverFile.json",WorkspaceConstants.MANIFEST_FILE="manifest.json",WorkspaceConstants.APP_DB="app.db3",WorkspaceConstants.APP_CONFIG="appConfig.json",WorkspaceConstants.BACKEND_SERVER_CONFIG="serverConfig.json",WorkspaceConstants.BACKEND_LOGGING_CONFIG="serverLogConfig.json",WorkspaceConstants.WORKSPACE_APPLICATION_TMP_FOLDER="tmp";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const updateChecker_1=require("../../utils/updateChecker"),constants_1=require("../../constants"),messages_1=require("../../types/messages"),messageHelper=require("../../utils/messageHelper"),hook=async function({config:e}){let s=new updateChecker_1.UpdateChecker(constants_1.PACKAGE_NAME,e.cacheDir),t=await s.checkForUpdate();if(t&&t.updateAvailable){let e=messageHelper.formatMessage(messages_1.UpdateNotificationMessage,Object.assign({config:this.config},t));this.warn(e)}};exports.default=hook;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ValidationSeverity=exports.GenerationLogLevel=exports.ValidatorStatus=exports.BuildStatus=void 0;const _=require("lodash"),constants_1=require("../constants"),fsHelper=require("../utils/fsHelper"),messageHelper=require("../utils/messageHelper"),validationHelper=require("../utils/validationHelper"),messages_1=require("../types/messages"),errors_1=require("../types/errors"),errorHelper=require("../utils/errorHelper"),packageHelper_1=require("../utils/packageHelper");class BuildStatus{constructor(e,s,t){this.generationStatus=e,this.validationStatus=s,this.applicationBuildPath=t}static getGenerationStatusFilePath(e){return fsHelper.joinPaths(e,constants_1.WorkspaceConstants.WORKSPACE_APPLICATION_BUILD_STATUS_FILE)}static fromWorkspace(e){let s,t;if(!validationHelper.isDefined(e))throw new errors_1.ArgumentError("workspace");if(e&&e.exists()){s=ValidatorStatus.fromWorkspace(e);let a=e.getApplicationBuildPath(),r=BuildStatus.getGenerationStatusFilePath(a);return t=fsHelper.existsFile(r)?fsHelper.readJsonFile(r):{},new BuildStatus(t,s,a)}throw new Error(messageHelper.getMessage(messages_1.MessagesBundle.Workspace,messages_1.MessagesBundle_Workspace.WorkspaceNotFound,[e.getBasePath()]))}hasGenerationErrors(){return _.some(this.generationStatus.messages,(e=>e.level===GenerationLogLevel.ERROR))}hasValidationErrors(){return this.validationStatus.hasValidationErrors()}hasContent(){return!this.__GenerationIsEmpty()&&this.validationStatus.hasContent()}__GenerationIsEmpty(){return _.isEmpty(this.generationStatus.messages)&&!(this.generationStatus.status in GenerationLogLevel)}wasSuccess(){return this.hasContent()&&!(this.hasGenerationErrors()||this.hasValidationErrors())}ensureSuccess(){if(!this.wasSuccess()){let e;throw e=this.hasGenerationErrors()?this.getBuildErrors():this.hasValidationErrors()?messageHelper.getMessage(messages_1.MessagesBundle.Workspace_Build,messages_1.MessagesBundle_Workspace_Build.ValidationErrors,[ValidatorStatus.getValidationStatusFilePath(this.applicationBuildPath)]):messageHelper.getMessage(messages_1.MessagesBundle.Workspace_Build,messages_1.MessagesBundle_Workspace_Build.NoOutput),errorHelper.createSfError(errors_1.ErrorTypes.BuildStatusError,e)}}getBuildErrors(){let e="";return this.generationStatus.messages.forEach((s=>{s.level===GenerationLogLevel.ERROR&&(e+=s.message)})),e}}exports.BuildStatus=BuildStatus;class ValidatorStatus{constructor(e,s){this.validationStatus=e,this.applicationBuildPath=s}static getValidationStatusFilePath(e){return fsHelper.joinPaths(this.getApplicationClockworkPath(e),constants_1.WorkspaceConstants.WORKSPACE_APPLICATION_VALIDATION_RESULT_FILE)}static getGeneratorHandoverFilePath(e){return fsHelper.joinPaths(e,packageHelper_1.PackageConstants.PACKAGE_APP_FOLDER_NAME,packageHelper_1.PackageConstants.PACKAGE_APP_CLOCKWORK_FOLDER_NAME,constants_1.WorkspaceConstants.WORKSPACE_APPLICATION_GENERATOR_HANDOVER_FILE)}static fromWorkspace(e){let s;if(!validationHelper.isDefined(e))throw new errors_1.ArgumentError("workspace");if(e&&e.exists()){let t=e.getApplicationBuildPath(),a=ValidatorStatus.getValidationStatusFilePath(t);return s=fsHelper.existsFile(a)?fsHelper.readJsonFile(a):[],new ValidatorStatus(s,t)}throw new Error(messageHelper.getMessage(messages_1.MessagesBundle.Workspace,messages_1.MessagesBundle_Workspace.WorkspaceNotFound,[e.getBasePath()]))}hasValidationErrors(){return _.some(this.validationStatus,(e=>_.some(e.result,(e=>e.severity===ValidationSeverity.ERROR||e.severity===ValidationSeverity.FATAL))))}hasContent(){return!this.__ValidationIsEmpty()}__ValidationIsEmpty(){return _.isEmpty(this.validationStatus)}wasSuccess(){return this.hasContent()&&!this.hasValidationErrors()}ensureSuccess(){if(!this.wasSuccess()){let e;throw e=this.hasValidationErrors()?messageHelper.getMessage(messages_1.MessagesBundle.Workspace_Validate,messages_1.MessagesBundle_Workspace_Validate.ValidationErrors,[ValidatorStatus.getValidationStatusFilePath(this.applicationBuildPath)]):messageHelper.getMessage(messages_1.MessagesBundle.Workspace_Validate,messages_1.MessagesBundle_Workspace_Validate.NoOutput),errorHelper.createSfError(errors_1.ErrorTypes.ValidateWorkspaceError,e)}}static getApplicationClockworkPath(e){return fsHelper.joinPaths(e,packageHelper_1.PackageConstants.PACKAGE_APP_FOLDER_NAME,packageHelper_1.PackageConstants.PACKAGE_APP_CLOCKWORK_FOLDER_NAME)}}var GenerationLogLevel,ValidationSeverity;exports.ValidatorStatus=ValidatorStatus,function(e){e.TRACE="TRACE",e.DEBUG="DEBUG",e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"}(GenerationLogLevel=exports.GenerationLogLevel||(exports.GenerationLogLevel={})),function(e){e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR",e.FATAL="FATAL"}(ValidationSeverity=exports.ValidationSeverity||(exports.ValidationSeverity={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Workspace=void 0;const constants_1=require("../constants"),buildStatus_1=require("./buildStatus"),fsHelper=require("../utils/fsHelper"),templateHelper=require("../utils/templateHelper"),validationHelper=require("../utils/validationHelper"),path=require("path"),messageHelper=require("../utils/messageHelper"),messages_1=require("../types/messages"),errors_1=require("../types/errors"),componentHelper_1=require("../utils/componentHelper"),crypto_1=require("crypto");class Workspace{constructor(e){if(validationHelper.isNullOrEmpty(e))throw new errors_1.ArgumentError("basePath");path.isAbsolute(e)||(e=path.resolve(e)),this.basePath=e}getBasePath(){return this.basePath}getApplicationPath(){return fsHelper.joinPaths(this.basePath,constants_1.WorkspaceConstants.WORKSPACE_APPLICATION_FOLDER)}getApplicationBuildPath(){return fsHelper.joinPaths(this.getApplicationPath(),constants_1.WorkspaceConstants.WORKSPACE_APPLICATION_BUILD_FOLDER)}getApplicationConfigPath(){return fsHelper.joinPaths(this.getApplicationPath(),constants_1.WorkspaceConstants.WORKSPACE_APPLICATION_CONFIG_FOLDER)}getApplicationDataPath(){return fsHelper.joinPaths(this.getApplicationPath(),constants_1.WorkspaceConstants.WORKSPACE_APPLICATION_DATA_FOLDER)}getSourcePath(){return fsHelper.joinPaths(this.basePath,constants_1.WorkspaceConstants.WORKSPACE_SOURCE_FOLDER)}getTestPath(){return fsHelper.joinPaths(this.basePath,constants_1.WorkspaceConstants.WORKSPACE_TEST_FOLDER)}getSnippetsPath(){return fsHelper.joinPaths(this.basePath,constants_1.WorkspaceConstants.WORKSPACE_SNIPPETS_FOLDER)}getIDESettingsPath(){return fsHelper.joinPaths(this.basePath,constants_1.WorkspaceConstants.WORKSPACE_IDE_SETTINGS_FOLDER)}getApplicationConfigFilePath(){return fsHelper.joinPaths(this.getApplicationConfigPath(),constants_1.WorkspaceConstants.WORKSPACE_APPLICATION_CONFIG_FILE)}getIdentifierFilePath(){return fsHelper.joinPaths(this.basePath,constants_1.WorkspaceConstants.WORKSPACE_IDENTIFIER_FILE)}getGitIgnoreFilePath(){return fsHelper.joinPaths(this.basePath,constants_1.WorkspaceConstants.WORKSPACE_GITIGNORE_FILE)}getReadmeFilePath(){return fsHelper.joinPaths(this.basePath,constants_1.WorkspaceConstants.WORKSPACE_README_FILE)}getIDESettingsFilePath(){return fsHelper.joinPaths(this.getIDESettingsPath(),constants_1.WorkspaceConstants.WORKSPACE_IDE_SETTINGS_FILE)}getManifestFilePath(){return fsHelper.joinPaths(this.getSourcePath(),constants_1.WorkspaceConstants.MANIFEST_FILE)}isProjectWorkspace(){return fsHelper.existsFile(this.getManifestFilePath())}isCoreWorkspace(){return!this.isProjectWorkspace()}exists(){return fsHelper.existsFile(this.getIdentifierFilePath())}checkForUpgrade(){let e=!1,t=this.getWorkspaceVersion(),s=this.getPluginVersion();return t!==s&&(e=!0),{upgradeAvailable:e,current:t,latest:s}}getWorkspaceVersion(){let e="246.1000.0";if(this.exists()){let t=fsHelper.readTextFile(this.getIdentifierFilePath());""!==t&&(e=t)}return e}getPluginVersion(){return(new componentHelper_1.ModelerComponentHelper).getComponentInfo().version}create(){if(this.exists())throw new Error(messageHelper.getMessage(messages_1.MessagesBundle.Workspace_Create,messages_1.MessagesBundle_Workspace_Create.WorkspaceAlreadyExists,[this.getBasePath()]));[this.getApplicationPath(),this.getApplicationBuildPath(),this.getApplicationConfigPath(),this.getApplicationDataPath(),this.getSourcePath(),this.getTestPath(),this.getIDESettingsPath(),this.getSnippetsPath()].forEach((e=>{fsHelper.ensureFolderExists(e)})),[{path:this.getApplicationConfigFilePath(),data:JSON.stringify(templateHelper.getTemplateApplicationConfig(),null,4)},{path:this.getReadmeFilePath(),data:templateHelper.getTemplateReadmeFileData()},{path:this.getGitIgnoreFilePath(),data:templateHelper.getTemplateGitIgnoreFileData()},{path:this.getIdentifierFilePath(),data:this.getPluginVersion()},{path:this.getIDESettingsFilePath(),data:this.getIDESettings()}].forEach((e=>{fsHelper.ensureFileExists(e.path,e.data)})),fsHelper.cpdir(templateHelper.getContractTemplatesPath(),this.getSnippetsPath());const e=this.getApplicationConfig();e.application.uniqueID=(0,crypto_1.randomUUID)(),fsHelper.writeFile(this.getApplicationConfigFilePath(),JSON.stringify(e,null,4)||"")}upgrade(){fsHelper.deleteFolder(this.getSnippetsPath()),fsHelper.cpdir(templateHelper.getContractTemplatesPath(),this.getSnippetsPath()),fsHelper.writeFile(this.getIdentifierFilePath(),this.getPluginVersion()),fsHelper.ensureFileExists(this.getGitIgnoreFilePath(),templateHelper.getTemplateGitIgnoreFileData()),fsHelper.mergeFiles(templateHelper.getTemplateFilePath(templateHelper.TemplateFile.GIT_IGNORE),this.getGitIgnoreFilePath()),this.updateSettings()}updateSettings(){if(fsHelper.existsFolder(this.getIDESettingsPath())||fsHelper.ensureFolderExists(this.getIDESettingsPath()),!fsHelper.existsFile(this.getIDESettingsFilePath()))return void fsHelper.ensureFileExists(this.getIDESettingsFilePath(),this.getIDESettings());const e=fsHelper.readJsonFile(this.getIDESettingsFilePath());e["xml.fileAssociations"]=this.getFileAssociationsData();const t=JSON.stringify(e,null,4);fsHelper.writeFile(this.getIDESettingsFilePath(),t)}cleanup(){if(!this.exists())throw new Error(messageHelper.getMessage(messages_1.MessagesBundle.Workspace,messages_1.MessagesBundle_Workspace.WorkspaceNotFound,[this.getBasePath()]));[this.getApplicationBuildPath(),this.getApplicationDataPath()].forEach((e=>{fsHelper.emptyFolder(e)}))}getApplicationConfig(){return this.exists()&&fsHelper.existsFile(this.getApplicationConfigFilePath())?fsHelper.readJsonFile(this.getApplicationConfigFilePath()):null}getLastBuildStatus(){return buildStatus_1.BuildStatus.fromWorkspace(this)}cleanupBuild(e=!1){if(!this.exists())throw new Error(messageHelper.getMessage(messages_1.MessagesBundle.Workspace,messages_1.MessagesBundle_Workspace.WorkspaceNotFound,[this.getBasePath()]));let t=this.getApplicationBuildPath(),s=fsHelper.joinPaths(this.getApplicationPath(),constants_1.WorkspaceConstants.WORKSPACE_APPLICATION_TMP_FOLDER);e&&(fsHelper.createFolder(buildStatus_1.ValidatorStatus.getApplicationClockworkPath(s)),fsHelper.move(buildStatus_1.BuildStatus.getGenerationStatusFilePath(t),buildStatus_1.BuildStatus.getGenerationStatusFilePath(s)),fsHelper.move(buildStatus_1.ValidatorStatus.getValidationStatusFilePath(t),buildStatus_1.ValidatorStatus.getValidationStatusFilePath(s)),fsHelper.move(buildStatus_1.ValidatorStatus.getGeneratorHandoverFilePath(t),buildStatus_1.ValidatorStatus.getGeneratorHandoverFilePath(s))),fsHelper.emptyFolder(this.getApplicationBuildPath()),e&&fsHelper.move(s,t)}getIDESettings(){let e=this.getFileAssociationsData();return JSON.stringify({"xml.fileAssociations":e},null,4)}getFileAssociationsData(){let e=[],t=new componentHelper_1.GeneratorComponentHelper,s=fsHelper.readJsonFile(t.getXmlXsdMappingFilePath());for(let a in s){let i=fsHelper.joinPaths(t.getXmlSchemaPath(),s[a]);fsHelper.existsFile(i)&&e.push({pattern:a,systemId:i})}return e}}exports.Workspace=Workspace;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WorkspaceCommand=void 0;const core_1=require("@salesforce/core"),workspace_1=require("./workspace"),constants_1=require("../constants"),messages_1=require("../types/messages"),sf_plugins_core_1=require("@salesforce/sf-plugins-core");core_1.Messages.importMessagesDirectory(__dirname);const messages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace);class WorkspaceCommand extends sf_plugins_core_1.SfCommand{constructor(s,e){super(s,e)}async assignWorkspace(s){let e=s||process.cwd();return new workspace_1.Workspace(e)}}exports.WorkspaceCommand=WorkspaceCommand,WorkspaceCommand.flags={path:sf_plugins_core_1.Flags.string({char:"p",description:messages.getMessage(messages_1.MessagesBundle_Workspace.PathFlagDescription),required:!1,multiple:!1})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NodeCommandBuilder=exports.SfCommandBuilder=exports.CommandBuilder=exports.Command=void 0;class Command{constructor(t){this.command=t.command,this.description=t.description,this.args=t.args,this.flags=t.flags,this.logName=t.logName,this.argsSeparator=t.argsSeparator,this.flagsSeparator=t.flagsSeparator}toString(){return this.description?this.description:this.toCommand()}getCommandArgs(){let t=[];t=t.concat(this.args);let s=[];return this.flags.forEach(((t,r)=>{s.push([r,t].join(this.flagsSeparator))})),t=t.concat(s),t}toCommand(){return`${this.command} ${this.getCommandArgs().join(this.argsSeparator)}`}}exports.Command=Command;class CommandBuilder{constructor(t,s,r){this.args=[],this.flags=new Map,this.command=t,this.argsSeparator=s,this.flagsSeparator=r}withDescription(t){return this.description=t,this}withArg(t){return"--json"===t?this.withJson():this.args.push(t),this}withFlag(t,s){return this.flags.set(t,s),this}withJson(){return this.args.push("--json"),this.withFlag("--loglevel","fatal"),this}withLogName(t){return this.logName=t,this}build(){return new Command(this)}}exports.CommandBuilder=CommandBuilder;class SfCommandBuilder extends CommandBuilder{constructor(){super("sf"," "," ")}}exports.SfCommandBuilder=SfCommandBuilder;class NodeCommandBuilder extends CommandBuilder{constructor(){super("node"," ","=")}}exports.NodeCommandBuilder=NodeCommandBuilder;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CliCommandExecution=exports.CliCommandExecutor=exports.GlobalCliEnvironment=void 0;const cross_spawn=require("cross-spawn");require("rxjs/add/observable/fromEvent"),require("rxjs/add/observable/interval");const Observable_1=require("rxjs/Observable"),kill=require("tree-kill");class GlobalCliEnvironment{}exports.GlobalCliEnvironment=GlobalCliEnvironment,GlobalCliEnvironment.environmentVariables=new Map;class CliCommandExecutor{constructor(e,s,r=!0){this.command=e,this.options=r?CliCommandExecutor.patchEnv(s,GlobalCliEnvironment.environmentVariables):s}static patchEnv(e,s){const r=Object.create(null);return Object.assign(r,process.env),s.forEach(((e,s)=>{r[s]=e})),r.SFDX_TOOL="salesforce-vscode-extensions",void 0!==e.env&&Object.assign(r,e.env),e.env=r,e}execute(e){const s=cross_spawn(this.command.command,this.command.getCommandArgs(),this.options);return new CliCommandExecution(this.command,s,e)}}exports.CliCommandExecutor=CliCommandExecutor;class CliCommandExecution{constructor(e,s,r){let t;if(this.command=e,this.cancellationToken=r,this.childProcessPid=s.pid,this.processExitSubject=Observable_1.Observable.fromEvent(s,"exit"),this.processExitSubject.subscribe((e=>{t&&t.unsubscribe()})),this.processErrorSubject=Observable_1.Observable.fromEvent(s,"error"),this.processErrorSubject.subscribe((e=>{t&&t.unsubscribe()})),this.stdoutSubject=Observable_1.Observable.fromEvent(s.stdout,"data"),this.stderrSubject=Observable_1.Observable.fromEvent(s.stderr,"data"),r){const e=Observable_1.Observable.interval(100);t=e.subscribe((async e=>{if(r.isCancellationRequested)try{await this.killExecution()}catch(e){console.log(e)}}))}}async killExecution(e="SIGKILL"){if(this.childProcessPid)return killPromise(this.childProcessPid,e)}}async function killPromise(e,s){return new Promise(((r,t)=>{kill(e,s,(e=>{e?t(e):r()}))}))}exports.CliCommandExecution=CliCommandExecution;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CommandOutput=void 0;class CommandOutput{constructor(){this.stdoutBuffer="",this.stderrBuffer=""}async getCmdResult(t){return t.stdoutSubject.subscribe((t=>{this.stdoutBuffer+=t.toString()})),t.stderrSubject.subscribe((t=>{this.stderrBuffer+=t.toString()})),new Promise(((r,e)=>{t.processExitSubject.subscribe((t=>void 0!==t&&"0"===String(t)?r(this.stdoutBuffer):e(new Error(this.stderrBuffer||this.stdoutBuffer)))),t.processErrorSubject.subscribe((t=>e(t||new Error("undefined error"))))}))}}exports.CommandOutput=CommandOutput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var LogLevel;Object.defineProperty(exports,"__esModule",{value:!0}),exports.LogLevel=void 0,function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"}(LogLevel=exports.LogLevel||(exports.LogLevel={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ErrorTypes=exports.ArgumentError=exports.ARGUMENT_ERROR_UNKNOWN_PARAMETER_NAME=exports.DETAIL_MESSAGE_SEPERATOR=exports.DEFAULT_ERROR_TYPE=void 0;const core_1=require("@salesforce/core"),validationHelper=require("../utils/validationHelper");exports.DEFAULT_ERROR_TYPE="Error",exports.DETAIL_MESSAGE_SEPERATOR=" -> ",exports.ARGUMENT_ERROR_UNKNOWN_PARAMETER_NAME="<unknown>";class ArgumentError extends core_1.SfError{constructor(r,e){let o=exports.ARGUMENT_ERROR_UNKNOWN_PARAMETER_NAME;validationHelper.isNullOrEmpty(r)||(o=r);let E="",t="";validationHelper.isNullOrEmpty(e)||(E=e,t=exports.DETAIL_MESSAGE_SEPERATOR),super(`invalid parameter: ${o}${t}${E}`,ErrorTypes.ArgumentError)}}var ErrorTypes;exports.ArgumentError=ArgumentError,function(r){r.ArgumentError="ArgumentError",r.CreateWorkspaceError="CreateWorkspaceError",r.UpgradeWorkspaceError="UpgradeWorkspaceError",r.CleanupWorkspaceError="CleanupWorkspaceError",r.BuildWorkspaceError="BuildWorkspaceError",r.RefreshLocaleError="RefreshLocaleError",r.PackageWorkspaceError="PackageWorkspaceError",r.ValidateWorkspaceError="ValidateWorkspaceError",r.ServerStartError="ServerStartError",r.Base64EncodeError="Base64EncodeError",r.GenerateManifestError="GenerateManifestError",r.AddWorkspaceError="AddWorkspaceError",r.BuildStatusError="BuildStatusError",r.MigrateContractError="MigrateContractError"}(ErrorTypes=exports.ErrorTypes||(exports.ErrorTypes={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var MessagesBundle,MessagesBundle_World,MessagesBundle_Workspace,MessagesBundle_Workspace_Create,MessagesBundle_Workspace_Upgrade,MessagesBundle_Workspace_Cleanup,MessagesBundle_Workspace_Build,MessagesBundle_Workspace_Package,MessagesBundle_Workspace_Validate,MessagesBundle_Workspace_Server_Start,MessagesBundle_Workspace_Utils_Base64Encode,MessagesBundle_Workspace_RefreshLocale,MessagesBundle_Workspace_Utils_MigrateContracts,MessagesBundle_Workspace_Utils_GenerateManifest,MessagesBundle_Workspace_Add;Object.defineProperty(exports,"__esModule",{value:!0}),exports.MessagesBundle_Workspace_Add=exports.MessagesBundle_Workspace_Utils_GenerateManifest=exports.MessagesBundle_Workspace_Utils_MigrateContracts=exports.MessagesBundle_Workspace_RefreshLocale=exports.MessagesBundle_Workspace_Utils_Base64Encode=exports.MessagesBundle_Workspace_Server_Start=exports.MessagesBundle_Workspace_Validate=exports.MessagesBundle_Workspace_Package=exports.MessagesBundle_Workspace_Build=exports.MessagesBundle_Workspace_Cleanup=exports.MessagesBundle_Workspace_Upgrade=exports.MessagesBundle_Workspace_Create=exports.MessagesBundle_Workspace=exports.MessagesBundle_World=exports.MessagesBundle=exports.UpdateNotificationMessage=void 0,exports.UpdateNotificationMessage="A new update of <%= name %> is available.\nTo update your Modeler CLI plugin from <%= chalk.green(current) %> to <%= chalk.green(latest) %>, run: <%= chalk.blue(config.bin, 'plugins update') %>",function(e){e.World="world",e.Workspace="modeler-workspace",e.Workspace_Create="modeler-workspace-create",e.Workspace_Cleanup="modeler-workspace-cleanup",e.Workspace_Build="modeler-workspace-build",e.Workspace_Package="modeler-workspace-package",e.Workspace_Validate="modeler-workspace-validate",e.Workspace_Server_Start="modeler-workspace-server-start",e.Workspace_Utils_Base64Encode="modeler-workspace-utils-base64encode",e.Workspace_RefreshLocale="modeler-workspace-refresh-locale",e.Workspace_Upgrade="modeler-workspace-upgrade",e.Workspace_Utils_MigrateContracts="modeler-workspace-utils-migrateContracts",e.Workspace_Utils_GenerateManifest="modeler-workspace-utils-generateManifest",e.Workspace_Add="modeler-workspace-add"}(MessagesBundle=exports.MessagesBundle||(exports.MessagesBundle={})),function(e){e.CommandDescription="commandDescription",e.NameFlagDescription="nameFlagDescription",e.Examples="examples"}(MessagesBundle_World=exports.MessagesBundle_World||(exports.MessagesBundle_World={})),function(e){e.PathFlagDescription="pathFlagDescription",e.WorkspaceNotFound="workspaceNotFound",e.InProgress="inProgress",e.Done="done",e.Failed="failed"}(MessagesBundle_Workspace=exports.MessagesBundle_Workspace||(exports.MessagesBundle_Workspace={})),function(e){e.CommandDescription="commandDescription",e.Examples="examples",e.WorkspaceAlreadyExists="workspaceAlreadyExists",e.WorkspaceCreationSuccessful="workspaceCreationSuccessful",e.WorkspaceCreationFailed="workspaceCreationFailed"}(MessagesBundle_Workspace_Create=exports.MessagesBundle_Workspace_Create||(exports.MessagesBundle_Workspace_Create={})),function(e){e.CommandDescription="commandDescription",e.Examples="examples",e.WorkspaceDoesNotExist="workspaceDoesNotExist",e.WorkspaceUpgradationSuccessful="workspaceUpgradationSuccessful",e.WorkspaceUpgradationFailed="workspaceUpgradationFailed"}(MessagesBundle_Workspace_Upgrade=exports.MessagesBundle_Workspace_Upgrade||(exports.MessagesBundle_Workspace_Upgrade={})),function(e){e.CommandDescription="commandDescription",e.Examples="examples",e.WorkspaceCleanupSuccessful="workspaceCleanupSuccessful",e.WorkspaceCleanupFailed="workspaceCleanupFailed"}(MessagesBundle_Workspace_Cleanup=exports.MessagesBundle_Workspace_Cleanup||(exports.MessagesBundle_Workspace_Cleanup={})),function(e){e.CommandDescription="commandDescription",e.Examples="examples",e.ValidationErrors="ValidationErrors",e.GenerationSuccessful="GenerationSuccessful",e.GenerationFailed="GenerationFailed",e.NoOutput="NoOutput",e.BuildProgress="BuildProgress"}(MessagesBundle_Workspace_Build=exports.MessagesBundle_Workspace_Build||(exports.MessagesBundle_Workspace_Build={})),function(e){e.CommandDescription="commandDescription",e.Examples="examples",e.WorkspacePackageProgress="workspacePackageProgress",e.WorkspacePackageSuccessful="workspacePackageSuccessful",e.WorkspacePackageFailed="workspacePackageFailed"}(MessagesBundle_Workspace_Package=exports.MessagesBundle_Workspace_Package||(exports.MessagesBundle_Workspace_Package={})),function(e){e.CommandDescription="commandDescription",e.Examples="examples",e.ValidationErrors="ValidationErrors",e.ValidationSuccessful="ValidationSuccessful",e.ValidationFailed="ValidationFailed",e.NoOutput="NoOutput",e.ValidationProgress="ValidationProgress"}(MessagesBundle_Workspace_Validate=exports.MessagesBundle_Workspace_Validate||(exports.MessagesBundle_Workspace_Validate={})),function(e){e.CommandDescription="commandDescription",e.Examples="examples",e.SFConsumerKeyNotDefined="SFConsumerKeyNotDefined",e.PortNotDefined="PortNotDefined",e.SimulatorConfigNotFound="SimulatorConfigNotFound",e.ApplicationConfigNotFound="ApplicationConfigNotFound",e.ServerStartFailed="ServerStartFailed",e.ServerStopRequest="ServerStopRequest",e.EncryptionWarning="EncryptionWarning"}(MessagesBundle_Workspace_Server_Start=exports.MessagesBundle_Workspace_Server_Start||(exports.MessagesBundle_Workspace_Server_Start={})),function(e){e.CommandDescription="commandDescription",e.Examples="examples",e.InputFlagDescription="inputFlagDescription",e.InputFileNotFound="inputFileNotFound",e.InputFileSizeLimit="inputFileSizeLimit",e.Base64EncodeError="base64EncodeError"}(MessagesBundle_Workspace_Utils_Base64Encode=exports.MessagesBundle_Workspace_Utils_Base64Encode||(exports.MessagesBundle_Workspace_Utils_Base64Encode={})),function(e){e.commandDescription="commandDescription",e.ValidationErrors="ValidationErrors",e.RefreshInProgress="RefreshInProgress",e.RefreshSuccessful="RefreshSuccessful",e.RefreshFailed="RefreshFailed",e.MissingLocaleSnippets="MissingLocaleSnippets",e.BuildNotFound="BuildNotFound"}(MessagesBundle_Workspace_RefreshLocale=exports.MessagesBundle_Workspace_RefreshLocale||(exports.MessagesBundle_Workspace_RefreshLocale={})),function(e){e.CommandDescription="CommandDescription",e.MigrationInProgress="MigrationInProgress",e.MissingSrcDirectory="MissingSrcDirectory",e.WorkspaceNotFound="WorkspaceNotFound",e.MigrationFailed="MigrationFailed",e.MigrationComplete="MigrationComplete"}(MessagesBundle_Workspace_Utils_MigrateContracts=exports.MessagesBundle_Workspace_Utils_MigrateContracts||(exports.MessagesBundle_Workspace_Utils_MigrateContracts={})),function(e){e.commandDescription="commandDescription",e.inProgress="inProgress",e.failed="failed",e.successful="successful"}(MessagesBundle_Workspace_Utils_GenerateManifest=exports.MessagesBundle_Workspace_Utils_GenerateManifest||(exports.MessagesBundle_Workspace_Utils_GenerateManifest={})),function(e){e.CommandDescription="commandDescription",e.Examples="examples",e.TypeFlagDescription="typeFlagDescription",e.ModuleFlagDescription="moduleFlagDescription",e.NameFlagDescription="nameFlagDescription",e.WorkspaceAddSuccessful="workspaceAddSuccessful",e.WorkspaceAddAborted="workspaceAddAborted",e.WorkspaceAddFailed="workspaceAddFailed",e.WorkspaceAddError="workspaceAddError",e.WorkspaceUpgradeAvailable="workspaceUpgradeAvailable"}(MessagesBundle_Workspace_Add=exports.MessagesBundle_Workspace_Add||(exports.MessagesBundle_Workspace_Add={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getComponentInformationForPackage=exports.FrameworkComponentHelper=exports.ServerComponentHelper=exports.GeneratorComponentHelper=exports.ModelerComponentHelper=exports.ComponentHelper=void 0;const _=require("lodash"),constants_1=require("../constants"),path=require("path"),fsHelper=require("../utils/fsHelper"),validationHelper=require("../utils/validationHelper");class ComponentHelper{constructor(e){validationHelper.isNullOrEmpty(e)?(this.componentName=constants_1.PACKAGE_NAME,this.external=!1):(this.componentName=e,this.external=!0)}getPath(){return this.external?path.dirname(require.resolve(`${this.componentName}/package.json`)):fsHelper.joinPaths(__dirname,"../../")}getComponentInfo(){let e=fsHelper.joinPaths(this.getPath(),"package.json");if(fsHelper.existsFile(e)){let t=fsHelper.readJsonFile(e);return{name:t.name||this.componentName,title:t.displayName||t.name||this.componentName,version:t.version||""}}return null}}exports.ComponentHelper=ComponentHelper;class ModelerComponentHelper extends ComponentHelper{constructor(){super()}}exports.ModelerComponentHelper=ModelerComponentHelper;class GeneratorComponentHelper extends ComponentHelper{constructor(){super(GeneratorComponentHelper.PACKAGE_NAME)}getGeneratorScriptFilePath(){return fsHelper.joinPaths(this.getPath(),"generator.js")}getValidatorScriptFilePath(){return fsHelper.joinPaths(this.getPath(),"validatorIntegrationIntoGenerator.js")}getValidatorPath(){return fsHelper.joinPaths(this.getPath(),"validator")}getXmlSchemaPath(){return fsHelper.joinPaths(this.getValidatorPath(),"xmlSchema")}getXmlXsdMappingFilePath(){return fsHelper.joinPaths(this.getValidatorPath(),constants_1.WorkspaceConstants.XML_XSD_MAPPING_FILE)}getMigratorScriptFilePath(){return fsHelper.joinPaths(this.getPath(),"migrator.js")}}exports.GeneratorComponentHelper=GeneratorComponentHelper,GeneratorComponentHelper.PACKAGE_NAME="@ind-rcg/generator";class ServerComponentHelper extends ComponentHelper{constructor(){super(ServerComponentHelper.PACKAGE_NAME)}getServerPath(){return fsHelper.joinPaths(this.getPath(),"src/server.js")}getConfigurationTemplatePath(){return fsHelper.joinPaths(this.getPath(),"configuration.template.json")}getLoggingConfigurationPath(){return fsHelper.joinPaths(this.getPath(),"log4js.json")}}exports.ServerComponentHelper=ServerComponentHelper,ServerComponentHelper.PACKAGE_NAME="@ind-rcg/backend";class FrameworkComponentHelper extends ComponentHelper{constructor(){super(FrameworkComponentHelper.PACKAGE_NAME)}getConfigurationTemplatePath(){return fsHelper.joinPaths(this.getPath(),"configuration.template.json")}getFrameworkXMLPath(){return fsHelper.joinPaths(this.getPath(),"Framework.xml")}}function getComponentInformationForPackage(){let e=[],t=[new ModelerComponentHelper,new GeneratorComponentHelper,new ServerComponentHelper,new FrameworkComponentHelper];return _.forEach(t,(t=>{let r=t.getComponentInfo();validationHelper.isDefined(r)&&e.push(r)})),e}exports.FrameworkComponentHelper=FrameworkComponentHelper,FrameworkComponentHelper.PACKAGE_NAME="@ind-rcg/framework",exports.getComponentInformationForPackage=getComponentInformationForPackage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getErrorMessage=exports.createSfError=void 0;const _=require("lodash"),os=require("os"),core_1=require("@salesforce/core"),errors_1=require("../types/errors"),validationHelper=require("../utils/validationHelper");function createSfError(r,e,o,t,s){if(validationHelper.isNullOrEmpty(r)||!Object.values(errors_1.ErrorTypes).includes(r))throw new errors_1.ArgumentError("errorType");if(validationHelper.isNullOrEmpty(e))throw new errors_1.ArgumentError("message");let i,n=e;validationHelper.isDefined(o)&&(_.isError(o)?i=o:_.isString(o)&&!validationHelper.isNullOrEmpty(o)&&(i=new Error(o)),_.isUndefined(i)||(n=getErrorMessage([e,i.message])));let a,l=1;return validationHelper.isDefined(t)&&_.isNumber(t)?l=t:!_.isUndefined(i)&&i instanceof core_1.SfError&&(l=i.exitCode),validationHelper.isDefined(s)&&_.isArray(s)?a=s:!_.isUndefined(i)&&i instanceof core_1.SfError&&(a=i.actions),new core_1.SfError(n,r,a,l,i)}function makeErrorMessage(r){return _.isString(r)?{type:errors_1.DEFAULT_ERROR_TYPE,text:r}:r}function getErrorMessage(r,e=!1){let o="";for(let t=0;t<r.length;t++){const s=makeErrorMessage(r[t]);0===t&&e?o+=`${s.type}${_.isEmpty(s.text)?"":": "}`:t>0&&t<=r.length-1&&(o+=os.EOL+errors_1.DETAIL_MESSAGE_SEPERATOR),o+=`${s.text}`}return o}exports.createSfError=createSfError,exports.getErrorMessage=getErrorMessage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.cpdir=exports.getFileDate=exports.getFileSize=exports.base64EncodeFile=exports.move=exports.listDirs=exports.listFiles=exports.listContents=exports.readFile=exports.readTextFile=exports.readJsonFile=exports.emptyFolder=exports.createFolder=exports.createFile=exports.baseName=exports.parentPath=exports.relativePath=exports.joinPaths=exports.ensureFileExists=exports.writeFile=exports.deleteFolder=exports.mergeFiles=exports.ensureFolderExists=exports.existsFolder=exports.existsFile=void 0;const path=require("path"),fs=require("fs-extra"),_=require("lodash"),validationHelper=require("../utils/validationHelper"),errors_1=require("../types/errors");function existsFile(e){if(validationHelper.isNullOrEmpty(e))throw new errors_1.ArgumentError("filePath");return fs.existsSync(e)&&fs.statSync(e).isFile()}function existsFolder(e){if(validationHelper.isNullOrEmpty(e))throw new errors_1.ArgumentError("folderPath");return fs.existsSync(e)&&fs.statSync(e).isDirectory()}function ensureFolderExists(e){existsFolder(e)||createFolder(e)}function mergeFiles(e,t){const r=fs.readFileSync(e,"utf8"),s=fs.readFileSync(t,"utf8"),i=r.split("\n"),o=s.split("\n"),l=_.union(i,o);fs.writeFileSync(t,[...l].join("\n"))}function deleteFolder(e){existsFolder(e)&&fs.rmSync(e,{recursive:!0})}function ensureFileExists(e,t){existsFile(e)||createFile(e,t)}function joinPaths(...e){if(!validationHelper.isDefined(e)||!_.isArrayLike(e)||_.isEmpty(e))throw new errors_1.ArgumentError("paths");return path.join(...e)}function createFile(e,t){if(validationHelper.isNullOrEmpty(e))throw new errors_1.ArgumentError("filePath");existsFile(e)||fs.writeFileSync(e,t||"")}function createFolder(e){if(validationHelper.isNullOrEmpty(e))throw new errors_1.ArgumentError("folderPath");existsFolder(e)||fs.mkdirSync(e,{recursive:!0})}function emptyFolder(e){existsFolder(e)&&fs.emptyDirSync(e)}function readJsonFile(e){return existsFile(e)?fs.readJsonSync(e):null}function readTextFile(e){return existsFile(e)?fs.readFileSync(e,"utf8"):null}function readFile(e){return existsFile(e)?fs.readFileSync(e):null}function listContents(e){return fs.readdirSync(e).map((t=>path.join(e,t)))}function listFiles(e){return listContents(e).filter((e=>fs.statSync(e).isFile()))}function listDirs(e){return listContents(e).filter((e=>fs.statSync(e).isDirectory()))}function move(e,t){(existsFile(e)||existsFolder(e))&&fs.moveSync(e,t,{overwrite:!0})}function base64EncodeFile(e){return existsFile(e)?readFile(e).toString("base64"):null}function getFileSize(e){return existsFile(e)?fs.statSync(e).size:-1}function getFileDate(e){return existsFile(e)?fs.statSync(e).mtimeMs:-1}function cpdir(e,t){if(existsFolder(e)){ensureFolderExists(t),listFiles(e).forEach((e=>{createFile(joinPaths(t,path.basename(e)),readTextFile(e))})),listDirs(e).forEach((e=>{cpdir(e,joinPaths(t,path.basename(e)))}))}}exports.existsFile=existsFile,exports.existsFolder=existsFolder,exports.ensureFolderExists=ensureFolderExists,exports.mergeFiles=mergeFiles,exports.deleteFolder=deleteFolder,exports.writeFile=fs.writeFileSync,exports.ensureFileExists=ensureFileExists,exports.joinPaths=joinPaths,exports.relativePath=path.relative,exports.parentPath=path.dirname,exports.baseName=path.basename,exports.createFile=createFile,exports.createFolder=createFolder,exports.emptyFolder=emptyFolder,exports.readJsonFile=readJsonFile,exports.readTextFile=readTextFile,exports.readFile=readFile,exports.listContents=listContents,exports.listFiles=listFiles,exports.listDirs=listDirs,exports.move=move,exports.base64EncodeFile=base64EncodeFile,exports.getFileSize=getFileSize,exports.getFileDate=getFileDate,exports.cpdir=cpdir;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFingerprints=void 0;const fsHelper_1=require("./fsHelper"),constants_1=require("../constants"),sha256=require("crypto-js/sha256"),encHex=require("crypto-js/enc-hex"),path=require("path"),walkSync=require("klaw-sync");function getFingerprints(e){const t={};return walkSync(e,{nodir:!0}).forEach((r=>{const s=path.relative(e,r.path).split(path.sep).join(path.posix.sep);if(s===constants_1.WorkspaceConstants.MANIFEST_FILE)return;const n=(0,fsHelper_1.readTextFile)(r.path);t[s]=sha256(n).toString(encHex)})),t}exports.getFingerprints=getFingerprints;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatMessage=exports.getMessage=void 0;const _=require("lodash"),chalk=require("chalk"),core_1=require("@salesforce/core"),constants_1=require("../constants");core_1.Messages.importMessagesDirectory(__dirname);const messagesMap=new Map;function getMessage(e,s,a){return messagesMap.has(e)||messagesMap.set(e,core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,e)),messagesMap.get(e).getMessage(s,a)}function formatMessage(e,s){return _.template(e)(Object.assign({chalk:chalk},s))}exports.getMessage=getMessage,exports.formatMessage=formatMessage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createDeploymentPackage=exports.PackageConstants=void 0;const JSZip=require("jszip"),walkSync=require("klaw-sync"),fs=require("fs-extra"),path=require("path"),_=require("lodash"),fsHelper=require("./fsHelper"),validationHelper=require("./validationHelper"),messageHelper=require("./messageHelper"),errors_1=require("../types/errors"),messages_1=require("../types/messages");class PackageConstants{static getSupportedAppFolders(){return[fsHelper.joinPaths(this.PACKAGE_APP_FOLDER_NAME,this.PACKAGE_APP_CLOCKWORK_FOLDER_NAME),fsHelper.joinPaths(this.PACKAGE_APP_FOLDER_NAME,this.PACKAGE_APP_EXTERNAL_FILES_FOLDER_NAME),fsHelper.joinPaths(this.PACKAGE_APP_FOLDER_NAME,this.PACKAGE_APP_REPLICATION_FILES_FOLDER_NAME)]}static getUnsupportedFiles(){return[this.PACKAGE_GENERATOR_HANDOVER_FILE,this.PACKAGE_GENERATOR_VALIDATION_RESULT_FILE,this.PACKAGE_DS_STORE_FILE]}static formatVersion(e){return`${e.getUTCFullYear()}${e.getUTCMonth().toString().padStart(2,"0")}${e.getUTCDate().toString().padStart(2,"0")}${e.getUTCHours().toString().padStart(2,"0")}${e.getUTCMinutes().toString().padStart(2,"0")}${e.getUTCSeconds().toString().padStart(2,"0")}${e.getUTCMilliseconds().toString().padStart(3,"0")}`}}async function createDeploymentPackage(e,t,s){if(!validationHelper.isDefined(e))throw new errors_1.ArgumentError("workspace");if(!validationHelper.isDefined(t)||!_.isDate(t))throw new errors_1.ArgumentError("versionDate");if(!validationHelper.isDefined(s)||!_.isArray(s))throw new errors_1.ArgumentError("components");if(!e.exists())throw new Error(messageHelper.getMessage(messages_1.MessagesBundle.Workspace,messages_1.MessagesBundle_Workspace.WorkspaceNotFound,[e.getBasePath()]));e.getLastBuildStatus().ensureSuccess();let a=new JSZip,r=t,n=PackageConstants.formatVersion(t);const o=PackageConstants.getSupportedAppFolders(),i=PackageConstants.getUnsupportedFiles();let A=e.getApplicationBuildPath(),E=path.resolve(A),P=fsHelper.joinPaths(A,PackageConstants.PACKAGE_APP_FOLDER_NAME),p=[];walkSync(P,{nodir:!0,filter:e=>{let t=e.path.substring(E.length+1),s=_.toLower(t);if(_.some(o,(e=>_.startsWith(s,e)))){return!_.some(i,(e=>_.endsWith(s,e)))}return!1}}).forEach((e=>{let t=e.path.substring(E.length+1);a.file(t,fs.readFileSync(e.path)),p.push({path:t})}));let l={deploymentVersion:n,files:p},g={deploymentVersion:n,creationDate:r.toUTCString(),components:s,automatedTest:!1,inputValidationActive:!1};a.file(PackageConstants.PACKAGE_MANIFEST_FILE_NAME,JSON.stringify(l)),a.file(PackageConstants.PACKAGE_INFO_FILE_NAME,JSON.stringify(g));let c=fsHelper.joinPaths(e.getApplicationBuildPath(),PackageConstants.PACKAGE_FILE_NAME);await a.generateAsync({type:"nodebuffer",compression:"DEFLATE"}).then((e=>{fs.writeFileSync(c,e)}))}exports.PackageConstants=PackageConstants,PackageConstants.PACKAGE_INFO_FILE_NAME="info.json",PackageConstants.PACKAGE_MANIFEST_FILE_NAME="manifest.json",PackageConstants.PACKAGE_FILE_NAME="deployment.zip",PackageConstants.PACKAGE_APP_FOLDER_NAME="app",PackageConstants.PACKAGE_APP_CLOCKWORK_FOLDER_NAME="clockwork",PackageConstants.PACKAGE_APP_EXTERNAL_FILES_FOLDER_NAME="externalfiles",PackageConstants.PACKAGE_APP_REPLICATION_FILES_FOLDER_NAME="replicationfiles",PackageConstants.PACKAGE_GENERATOR_HANDOVER_FILE="generatorhandoverfile.json",PackageConstants.PACKAGE_GENERATOR_VALIDATION_RESULT_FILE="generatorvalidationresult.json",PackageConstants.PACKAGE_DS_STORE_FILE=".ds_store",exports.createDeploymentPackage=createDeploymentPackage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createAppConfiguration=exports.createBackendConfiguration=exports.validateConfiguration=void 0;const componentHelper_1=require("./componentHelper"),fsHelper_1=require("./fsHelper"),validationHelper_1=require("./validationHelper"),messages_1=require("../types/messages"),fs=require("fs-extra"),constants_1=require("../constants"),path=require("path"),config_1=require("../types/config"),messageHelper=require("./messageHelper"),_=require("lodash");function getImageConfigs(e,t){return(0,validationHelper_1.isNullOrEmpty)(e)?{referenceImage:"",referenceImagePath:""}:(path.isAbsolute(e)||(e=path.resolve(path.join(t,e))),{referenceImage:path.basename(e),referenceImagePath:path.dirname(e)})}function validateConfiguration(e){const t=e.getApplicationConfig();if(!(0,validationHelper_1.isDefined)(t.server))throw new Error(messageHelper.getMessage(messages_1.MessagesBundle.Workspace_Server_Start,messages_1.MessagesBundle_Workspace_Server_Start.SimulatorConfigNotFound,[e.getApplicationConfigFilePath()]));if(!(0,validationHelper_1.isDefined)(t.server.port)||!_.isNumber(t.server.port))throw new Error(messageHelper.getMessage(messages_1.MessagesBundle.Workspace_Server_Start,messages_1.MessagesBundle_Workspace_Server_Start.PortNotDefined,[e.getApplicationConfigFilePath()]));if(!(0,validationHelper_1.isDefined)(t.application))throw new Error(messageHelper.getMessage(messages_1.MessagesBundle.Workspace_Server_Start,messages_1.MessagesBundle_Workspace_Server_Start.ApplicationConfigNotFound,[e.getApplicationConfigFilePath()]));if((0,validationHelper_1.isNullOrEmpty)(t.application.sfConsumerKey))throw new Error(messageHelper.getMessage(messages_1.MessagesBundle.Workspace_Server_Start,messages_1.MessagesBundle_Workspace_Server_Start.SFConsumerKeyNotDefined,[e.getApplicationConfigFilePath()]))}function createBackendConfiguration(e){const t=e.getApplicationConfig(),r=e.getApplicationDataPath(),a=new componentHelper_1.ServerComponentHelper,n=(0,fsHelper_1.joinPaths)(r,constants_1.WorkspaceConstants.BACKEND_SERVER_CONFIG);let s=(0,fsHelper_1.readJsonFile)(a.getConfigurationTemplatePath());s.port=t.server.port,s.database=constants_1.WorkspaceConstants.APP_DB;const o=getImageConfigs(t.server.referenceImagePath,e.getApplicationConfigPath());s.referenceImage=o.referenceImage,s.referenceImagePath=o.referenceImagePath,s.mountpoints.forEach((e=>{(0,validationHelper_1.isDefined)(e.path)&&"/framework"==e.path&&(e.location=(new componentHelper_1.FrameworkComponentHelper).getPath())})),s.mountpoints.push({path:"/framework/app",location:(0,fsHelper_1.joinPaths)(e.getApplicationBuildPath(),"app")}),s.mountpoints.push({path:"/framework/configuration.json",location:(0,fsHelper_1.joinPaths)(r,constants_1.WorkspaceConstants.APP_CONFIG)}),fs.writeFileSync(n,JSON.stringify(s,null,4)||"");const i=(0,fsHelper_1.joinPaths)(r,constants_1.WorkspaceConstants.APP_DB);(0,fsHelper_1.existsFile)(i)||fs.writeFileSync(i,"");const p=a.getLoggingConfigurationPath(),l=(0,fsHelper_1.joinPaths)(r,constants_1.WorkspaceConstants.BACKEND_LOGGING_CONFIG);let c=t.server.logLevel;c in config_1.LogLevel||(c=config_1.LogLevel.ERROR);let g=(0,fsHelper_1.readJsonFile)(p);g.appenders.console={type:"logLevelFilter",level:c,appender:"consoleAppender"},g.appenders.consoleAppender={type:"console"},fs.writeFileSync(l,JSON.stringify(g,null,4)||"")}function createAppConfiguration(e){const t=e.getApplicationConfig(),r=e.getApplicationDataPath(),a=(new componentHelper_1.FrameworkComponentHelper).getConfigurationTemplatePath(),n=(0,fsHelper_1.joinPaths)(r,constants_1.WorkspaceConstants.APP_CONFIG);let s=(0,fsHelper_1.readJsonFile)(a);s.sfConsumerKey=t.application.sfConsumerKey,s.uniqueWorkspaceID=t.application.uniqueID,s.backend=`http://localhost:${t.server.port}/`,s.sfCallbackURL=`http://localhost:${t.server.port}/fake/services/oauth/success`,s.verbose=!0,fs.writeFileSync(n,JSON.stringify(s,null,4)||"")}exports.validateConfiguration=validateConfiguration,exports.createBackendConfiguration=createBackendConfiguration,exports.createAppConfiguration=createAppConfiguration;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TemplateEngine=exports.Utils=exports.TemplateEngineContext=exports.ValidationSet=exports.NON_MODULES=exports.TemplateEngineState=exports.ResourceType=exports.ContractType=exports.QuestionType=exports.Namespace=exports.NameIdentifier=void 0;const _=require("lodash"),inquirer=require("inquirer"),path=require("path"),walkSync=require("klaw-sync"),fsHelper_1=require("./fsHelper"),templateHelper_1=require("./templateHelper");var NameIdentifier,Namespace,QuestionType,ContractType;!function(e){e.Core="",e.Custom="My"}(NameIdentifier=exports.NameIdentifier||(exports.NameIdentifier={})),function(e){e.Core="CORE",e.Custom="CUSTOM"}(Namespace=exports.Namespace||(exports.Namespace={})),function(e){e.Type="TYPE",e.Name="NAME",e.Module="MODULE",e.FullName="FULL_NAME",e.Option="OPTION",e.Confirmation="CONFIRMATION"}(QuestionType=exports.QuestionType||(exports.QuestionType={})),function(e){e.Module="module",e.BusinessObject="businessobject",e.ListObject="listobject",e.LookupObject="lookupobject",e.DataSource="datasource"}(ContractType=exports.ContractType||(exports.ContractType={}));const ContractTypes=[ContractType.Module,ContractType.BusinessObject,ContractType.ListObject,ContractType.LookupObject,ContractType.DataSource];var ResourceType,TemplateEngineState;!function(e){e.File="file",e.Folder="folder",e.Tree="tree"}(ResourceType=exports.ResourceType||(exports.ResourceType={})),function(e){e[e.NEW=0]="NEW",e[e.DONE=1]="DONE",e[e.FAILED=2]="FAILED",e[e.ABORTED=3]="ABORTED"}(TemplateEngineState=exports.TemplateEngineState||(exports.TemplateEngineState={})),exports.NON_MODULES=["Application","BusinessObjectHelpers","ExternalFiles","Images","Locale","Plugins","SharedWebData","UI Plugins"];class ValidationSet{constructor(e){this.validations=e}validate(e){let t=!0;return _.forEach(this.validations,(r=>{let s=r(e);_.isBoolean(s)||!s||(t=s)})),t}}exports.ValidationSet=ValidationSet;class TemplateEngineContext{constructor(e){this.resourceTemplateDefinition=this.__loadResourceTemplateDefinition(),this.resourceOptions=this.__createResourceOptionsMap(),this.workspace=e}__loadResourceTemplateDefinition(){return(0,fsHelper_1.readJsonFile)((0,templateHelper_1.getTemplateDefinitionsFilePath)())}__createResourceOptionsMap(){let e=new Map;return _.forIn(this.resourceTemplateDefinition,(t=>{let r=t;_.forEach(r.options,(t=>{let r=t;e.set(r.name,r)}))})),e}getResourceTemplateTypes(){return ContractTypes}getResourceTemplateTypeData(e){return this.resourceTemplateDefinition[e]}getResourceTemplateOption(e){return this.resourceOptions.get(e)}getWorkspace(){return this.workspace}getModules(){let e=this.workspace.getSourcePath(),t=walkSync(e,{depthLimit:0,nofile:!0}),r=_.map(t,(t=>path.relative(e,t.path)));return _.without(r,...exports.NON_MODULES)}getWorkspaceParameters(){return{CUSTOM:this.workspace.isProjectWorkspace()?NameIdentifier.Custom:NameIdentifier.Core,NAMESPACE:this.workspace.isProjectWorkspace()?Namespace.Custom:Namespace.Core}}getResourceName(e,t,r){let s;switch(e){case ContractType.BusinessObject:case ContractType.ListObject:case ContractType.LookupObject:s=`${r}${t}`;break;case ContractType.DataSource:s=r===NameIdentifier.Custom&&t.indexOf(r)>=0?t:`${r}${t}`;break;default:s=`${t}`}return s}}exports.TemplateEngineContext=TemplateEngineContext;class Utils{static parseStringEnumValue(e,t){let r=Object.keys(t).find((r=>t[r]===e));return t[r]}}exports.Utils=Utils;class TemplateEngine{constructor(e){this.context=new TemplateEngineContext(e)}getResourceTypeOptions(e){return _.map(e,(e=>e.name))}convertAnswersToParameters(e){let t={};return _.forIn(e,((e,r)=>{t[r.toUpperCase()]=e})),t}evaluateFunctionSpec(e,t){let r=e.fn,s=e.args;s=_.map(s,(e=>this.replaceTemplateParameters(e,t)));let a=this.context[r].apply(this.context,s);return e.allowNone&&_.isArrayLike(a)&&a.push({name:"(none)",value:""}),a}resolveParameter(e,t){let r;return r="string"==typeof e?this.replaceTemplateParameters(e,t):this.evaluateFunctionSpec(e,t),r}resolveOptionParameters(e,t){_.isNil(e)||_.forIn(e,((e,r)=>{let s=this.resolveParameter(e,t);t[r]=s}))}resolveReturnParameters(e,t){if(!_.isNil(e)){let r=this.setupParameters(e,t);_.merge(e,r)}}setupParameters(e,t){let r={};return _.isNil(e)||_.forIn(e,((e,s)=>{let a=this.resolveParameter(e,t);r[s]=a})),r}replaceTemplateParameters(e,t){let r=e;return _.forIn(t,((e,t)=>{if("string"==typeof e){let s=new RegExp(_.join(["\\${",t,"}"],""),"gm"),a=e;r=_.replace(r,s,a)}})),r}expandResources(e){let t=[];return _.forEach(e,(e=>{switch(e.type){case ResourceType.File:this.expandFileResource(e,t);break;case ResourceType.Folder:this.expandFolderResource(e,t);break;case ResourceType.Tree:this.expandTreeResource(e,t)}})),t}resolveResources(e,t){let r=[];return _.forEach(e,(e=>{let s=_.clone(e);s.target=this.replaceTemplateParameters(s.target,t),s.type===ResourceType.File&&this.loadResourceFileData(s,t),r.push(s)})),r}getResourceSourcePath(e){return e&&e.source?(0,fsHelper_1.joinPaths)((0,templateHelper_1.getContractTemplatesPath)(),e.source):null}getResourceTargetPath(e){return(0,fsHelper_1.joinPaths)(this.context.getWorkspace().getSourcePath(),e.target)}loadResourceFileData(e,t){if(e.type===ResourceType.File){let r=(0,fsHelper_1.readTextFile)(e.source);r=this.replaceTemplateParameters(r,t),e.data=r}}createResource(e,t,r){return{type:e,source:t,target:r}}expandFileResource(e,t){let r=this.createResource(ResourceType.File,this.getResourceSourcePath(e),this.getResourceTargetPath(e));t.push(r)}expandFolderResource(e,t){let r=this.createResource(ResourceType.Folder,this.getResourceSourcePath(e),this.getResourceTargetPath(e));t.push(r)}expandTreeResource(e,t){let r=this.getResourceSourcePath(e),s=this.getResourceTargetPath(e);this.expandFolderResource(e,t);let a=walkSync(r,{filter:e=>!e.stats.isFile()||!e.path.endsWith(".md")});_.forEach(a,(e=>{let a;e.stats.isFile()?a=ResourceType.File:e.stats.isDirectory()&&(a=ResourceType.Folder);let o=e.path,i=(0,fsHelper_1.joinPaths)(s,path.relative(r,e.path)),n=this.createResource(a,o,i);t.push(n)}))}createResources(e){_.forEach(e,(e=>{e.type===ResourceType.File?(0,fsHelper_1.ensureFileExists)(e.target,e.data):(0,fsHelper_1.ensureFolderExists)(e.target)}))}canCreateResources(e,t){let r=!0,s=null,a=_.filter(e,(e=>e.type===ResourceType.File));return _.forEach(a,(e=>{if(r&&(0,fsHelper_1.existsFile)(e.target)){r=!1,s=_.first(a).target;let e=(0,fsHelper_1.parentPath)(this.context.getWorkspace().getBasePath());switch(t){case ContractType.BusinessObject:case ContractType.ListObject:case ContractType.LookupObject:s=(0,fsHelper_1.parentPath)(s);case ContractType.DataSource:}s=(0,fsHelper_1.relativePath)(e,s)}})),{success:r,path:s}}async processResourceOption(e,t,r,s){let a=!1;_.isNil(r)&&(a=!0,r=[]);let o={option:e,main:a,parameters:null,resources:null},i=_.clone(t);_.isNil(s)||(i=_.merge(i,s));let n=this.convertAnswersToParameters(i);n=_.merge(n,this.context.getWorkspaceParameters()),this.resolveOptionParameters(e.parameters,n),this.resolveReturnParameters(e.returnParameters,n);let p=this.expandResources(e.resources);if(o.parameters=n,o.resources=p,r.push(o),e?.includes)for(let t=0;t<e.includes.length;t++){const s=e.includes[t];let a=s.name,p=this.context.getResourceTemplateOption(a),c=this.setupParameters(s?.parameters,n);await this.processResourceOption(p,i,r,c),p?.returnParameters&&(o.parameters=_.merge(o.parameters,p.returnParameters))}if(o.main){let e=[];_.forEach(r,(t=>{const r=this.resolveResources(t.resources,t.parameters);e=e.concat(r)})),p=e}return{resources:p,parameters:n}}validateName(e){let t=[];t.push((e=>!(e.length<3||e.length>26)||"Use a minimum of 3 and a maximum of 26 characters containing alphanumeric and the underscore symbol.")),t.push((e=>!!new RegExp("^[a-zA-Z0-9_]+$","g").test(e)||"Use alphanumeric characters and the underscore symbol.")),t.push((e=>!new RegExp(NameIdentifier.Custom,"gi").test(e)||`Avoid using '${NameIdentifier.Custom}' in name value.`));let r=new ValidationSet(t);return r.validate.bind(r)}async askForResourceType(e,t){return inquirer.prompt([{name:QuestionType.Type,message:"Select the resource you want to add.",type:"list",choices:e}],t)}async askForResourceName(e){let t=_.get(e,QuestionType.Type);return inquirer.prompt([{name:QuestionType.Name,message:`Specify a name for the ${t}:`,type:"input",validate:this.validateName(t)}],e)}async askForModule(e,t){let r=_.get(t,QuestionType.Name),s=_.get(t,QuestionType.Type);return inquirer.prompt([{name:QuestionType.Module,message:`Select the module to which ${s} '${r}' should be added.`,type:"list",choices:e}],t)}async askForOption(e,t){let r=_.get(t,QuestionType.Name),s=_.get(t,QuestionType.Type);return inquirer.prompt([{name:QuestionType.Option,message:`Select a suitable option for ${s} '${r}'.`,type:"list",choices:e}],t)}async askForConfirmation(e){let t=_.get(e,QuestionType.Name),r=_.get(e,QuestionType.Type);return inquirer.prompt([{name:QuestionType.Confirmation,message:`Do you really want to create the ${r} '${t}'?`,type:"confirm"}],e)}async processRequest(e){let t={State:TemplateEngineState.NEW,Message:"",Type:"",Name:"",Files:[]};try{let r=await this.askForResourceType(this.context.getResourceTemplateTypes(),e);r=await this.askForResourceName(r);let s=_.get(r,QuestionType.Type),a=Utils.parseStringEnumValue(s,ContractType),o=this.context.getResourceTemplateTypeData(a);if(o){!0===o.moduleRequired&&(r=await this.askForModule(this.context.getModules(),r));let e,s=o.options;if(1===s.length){let e={};e[QuestionType.Option]=s[0].name,r=_.merge(r,e)}r=await this.askForOption(this.getResourceTypeOptions(s),r);let a=_.get(r,QuestionType.Option);e=this.context.getResourceTemplateOption(a);let i=await this.processResourceOption(e,r),n=_.get(i.parameters,QuestionType.FullName,"");_.isEmpty(n)&&(n=_.get(i.parameters,QuestionType.Name));let p=_.get(i.parameters,QuestionType.Type);t.Name=n,t.Type=p;let c=this.canCreateResources(i.resources,p);if(c.success){r=await this.askForConfirmation(r),!0===_.get(r,QuestionType.Confirmation)?(this.createResources(i.resources),t.State=TemplateEngineState.DONE,t.Files=_.compact(_.map(i.resources,(e=>{if(e.type===ResourceType.File)return e.target})))):t.State=TemplateEngineState.ABORTED}else t.State=TemplateEngineState.FAILED,t.Message=`The ${p} '${n}' already exists at ${c.path}. To create a new ${p}, re-run the command and specify a unique name.`}}catch(e){t.State=TemplateEngineState.FAILED,t.Message=e.toString()}return t}}exports.TemplateEngine=TemplateEngine;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getTemplateReadmeFileData=exports.getTemplateGitIgnoreFileData=exports.getTemplateApplicationConfig=exports.getTemplateDefinitionsFilePath=exports.getContractTemplatesPath=exports.getTemplateFilePath=exports.TemplateFile=void 0;const config_1=require("../types/config"),fsHelper_1=require("./fsHelper");var TemplateFile;function getTemplateFilePath(e){return(0,fsHelper_1.joinPaths)(__dirname,"../../templates",e)}function getContractTemplatesPath(){return(0,fsHelper_1.joinPaths)(__dirname,"../../templates","contractTemplates")}function getTemplateDefinitionsFilePath(){return(0,fsHelper_1.joinPaths)(__dirname,"../../templates","templateDefinitions.json")}function getTemplateApplicationConfig(){return{application:{sfConsumerKey:"",uniqueID:""},server:{port:3e3,referenceImagePath:"",logLevel:config_1.LogLevel.INFO},generator:{logLevel:config_1.LogLevel.ERROR}}}function getTemplateGitIgnoreFileData(){let e=getTemplateFilePath(TemplateFile.GIT_IGNORE);return(0,fsHelper_1.readTextFile)(e)}function getTemplateReadmeFileData(){let e=getTemplateFilePath(TemplateFile.README);return(0,fsHelper_1.readTextFile)(e)}!function(e){e.GIT_IGNORE=".gitignore.tmp",e.README="README.md.tmp"}(TemplateFile=exports.TemplateFile||(exports.TemplateFile={})),exports.getTemplateFilePath=getTemplateFilePath,exports.getContractTemplatesPath=getContractTemplatesPath,exports.getTemplateDefinitionsFilePath=getTemplateDefinitionsFilePath,exports.getTemplateApplicationConfig=getTemplateApplicationConfig,exports.getTemplateGitIgnoreFileData=getTemplateGitIgnoreFileData,exports.getTemplateReadmeFileData=getTemplateReadmeFileData;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UpdateChecker=void 0;const componentHelper_1=require("./componentHelper"),fsHelper=require("./fsHelper"),DEFAULT_UPDATE_CHECKER_INTERVAL=864e5,DEFAULT_UPDATE_CHECKER_FILENAME="modeler-sfdx-cli-plugin-updatecheck";class UpdateChecker{constructor(e,t){this.name=e,this.interval=864e5,this.directory=t,this.fileName=DEFAULT_UPDATE_CHECKER_FILENAME,this.filePath=fsHelper.joinPaths(this.directory,this.fileName)}getCurrentVersion(){return(new componentHelper_1.ModelerComponentHelper).getComponentInfo()}async getLatestVersion(){const e=await import("latest-version");let t=await e.default(this.name);return{name:this.name,version:t}}checkRequired(){return fsHelper.existsFile(this.filePath)&&fsHelper.getFileDate(this.filePath)+this.interval<Date.now()}async checkForUpdate(){let e={updateAvailable:!1};if(!fsHelper.existsFile(this.filePath)){let t=this.getCurrentVersion();e=Object.assign(e,{name:t.name,current:t.version,updateAvailable:!1}),fsHelper.writeFile(this.filePath,JSON.stringify(e))}if(this.checkRequired()){let t=this.getCurrentVersion(),i=await this.getLatestVersion();e=Object.assign(e,{name:t.name,current:t.version,latest:i.version,updateAvailable:t.version!==i.version}),fsHelper.writeFile(this.filePath,JSON.stringify(e))}return e}}exports.UpdateChecker=UpdateChecker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isDefined=exports.isNullOrEmpty=void 0;const _=require("lodash");function isNullOrEmpty(e){return _.isUndefined(e)||_.isNull(e)||_.isEmpty(e)}function isDefined(e){return!_.isUndefined(e)&&!_.isNull(e)}exports.isNullOrEmpty=isNullOrEmpty,exports.isDefined=isDefined;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# commandDescription
|
|
2
|
+
|
|
3
|
+
Adds a new resource to a Modeler workspace.
|
|
4
|
+
|
|
5
|
+
# examples
|
|
6
|
+
|
|
7
|
+
- <%= config.bin %> <%= command.id %>
|
|
8
|
+
|
|
9
|
+
- <%= config.bin %> <%= command.id %> --type businessobject --module Visit --name VisitKpi
|
|
10
|
+
|
|
11
|
+
- <%= config.bin %> <%= command.id %> --path ./workspacePath --type businessobject --module Visit --name VisitKpi
|
|
12
|
+
|
|
13
|
+
# workspaceAddSuccessful
|
|
14
|
+
|
|
15
|
+
Successfully created %s '%s'.
|
|
16
|
+
|
|
17
|
+
# workspaceAddAborted
|
|
18
|
+
|
|
19
|
+
Creation of %s '%s' aborted.
|
|
20
|
+
|
|
21
|
+
# workspaceAddFailed
|
|
22
|
+
|
|
23
|
+
Creation of %s '%s' failed. For details, see:
|
|
24
|
+
%s
|
|
25
|
+
|
|
26
|
+
# workspaceAddError
|
|
27
|
+
|
|
28
|
+
Creation of resources failed.
|
|
29
|
+
|
|
30
|
+
# typeFlagDescription
|
|
31
|
+
|
|
32
|
+
Type of the resource to add.
|
|
33
|
+
|
|
34
|
+
# nameFlagDescription
|
|
35
|
+
|
|
36
|
+
Name of the resource to add.
|
|
37
|
+
|
|
38
|
+
# moduleFlagDescription
|
|
39
|
+
|
|
40
|
+
Name of the module to which the resource should be added.
|
|
41
|
+
|
|
42
|
+
# workspaceUpgradeAvailable
|
|
43
|
+
|
|
44
|
+
A new update for your Modeler workspace is available.
|
|
45
|
+
To upgrade your Modeler workspace from <%= chalk.green(current) %> to <%= chalk.green(latest) %>, run: <%= chalk.blue(config.bin, 'modeler workspace upgrade') %>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# commandDescription
|
|
2
|
+
|
|
3
|
+
Build a Modeler workspace.
|
|
4
|
+
|
|
5
|
+
# ValidationErrors
|
|
6
|
+
|
|
7
|
+
Review '%s' for validation errors.
|
|
8
|
+
|
|
9
|
+
# GenerationSuccessful
|
|
10
|
+
|
|
11
|
+
Build successful
|
|
12
|
+
|
|
13
|
+
# GenerationFailed
|
|
14
|
+
|
|
15
|
+
Build failed
|
|
16
|
+
|
|
17
|
+
# NoOutput
|
|
18
|
+
|
|
19
|
+
No output was created. Make sure contracts exist in the workspace.
|
|
20
|
+
|
|
21
|
+
# BuildProgress
|
|
22
|
+
|
|
23
|
+
Build status for Modeler workspace at path '%s':
|
|
24
|
+
|
|
25
|
+
# examples
|
|
26
|
+
|
|
27
|
+
- <%= config.bin %> <%= command.id %>
|
|
28
|
+
|
|
29
|
+
- <%= config.bin %> <%= command.id %> --path ./testWorkspace
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# commandDescription
|
|
2
|
+
|
|
3
|
+
Clean up an existing Modeler workspace.
|
|
4
|
+
|
|
5
|
+
# examples
|
|
6
|
+
|
|
7
|
+
- <%= config.bin %> <%= command.id %>
|
|
8
|
+
|
|
9
|
+
- <%= config.bin %> <%= command.id %> --path ./workspacePath
|
|
10
|
+
|
|
11
|
+
# workspaceCleanupSuccessful
|
|
12
|
+
|
|
13
|
+
Modeler workspace at path '%s' cleaned up successfully.
|
|
14
|
+
|
|
15
|
+
# workspaceCleanupFailed
|
|
16
|
+
|
|
17
|
+
Failed to clean up Modeler workspace at path '%s'.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# commandDescription
|
|
2
|
+
|
|
3
|
+
Create a Modeler workspace.
|
|
4
|
+
|
|
5
|
+
# examples
|
|
6
|
+
|
|
7
|
+
- <%= config.bin %> <%= command.id %>
|
|
8
|
+
|
|
9
|
+
- <%= config.bin %> <%= command.id %> --path ./workspacePath
|
|
10
|
+
|
|
11
|
+
# workspaceAlreadyExists
|
|
12
|
+
|
|
13
|
+
Modeler workspace at path '%s' already exists.
|
|
14
|
+
|
|
15
|
+
# workspaceCreationSuccessful
|
|
16
|
+
|
|
17
|
+
Modeler workspace at path '%s' created successfully.
|
|
18
|
+
|
|
19
|
+
# workspaceCreationFailed
|
|
20
|
+
|
|
21
|
+
Failed to create Modeler workspace at path '%s'.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# commandDescription
|
|
2
|
+
|
|
3
|
+
Create a deployment package of a Modeler workspace.
|
|
4
|
+
|
|
5
|
+
# examples
|
|
6
|
+
|
|
7
|
+
- <%= config.bin %> <%= command.id %>
|
|
8
|
+
|
|
9
|
+
- <%= config.bin %> <%= command.id %> --path ./workspacePath
|
|
10
|
+
|
|
11
|
+
# workspacePackageProgress
|
|
12
|
+
|
|
13
|
+
Status of creating a deployment package for the Modeler workspace at path '%s':
|
|
14
|
+
|
|
15
|
+
# workspacePackageSuccessful
|
|
16
|
+
|
|
17
|
+
Created a deployment package successfully for the Modeler workspace at path '%s'.
|
|
18
|
+
|
|
19
|
+
# workspacePackageFailed
|
|
20
|
+
|
|
21
|
+
Failed to create a deployment package for the Modeler workspace at path '%s'. Review the error details and try again.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# pathFlagDescription
|
|
2
|
+
|
|
3
|
+
Name of the locale contracts to be refreshed. To specify multiple values, use a comma (,) separator.
|
|
4
|
+
|
|
5
|
+
# commandDescription
|
|
6
|
+
|
|
7
|
+
Refresh locale translation in workspace.
|
|
8
|
+
|
|
9
|
+
# MissingLocaleSnippets
|
|
10
|
+
|
|
11
|
+
Failed to execute the command as the LocaleSnippets directory at the specified location couldn't be found. Verify that the LocaleSnippets directory exists at the expected location.
|
|
12
|
+
|
|
13
|
+
# RefreshInProgress
|
|
14
|
+
|
|
15
|
+
Locale Refresh In Progress
|
|
16
|
+
|
|
17
|
+
# RefreshSuccessful
|
|
18
|
+
|
|
19
|
+
Locale Refresh successful.
|
|
20
|
+
|
|
21
|
+
# RefreshFailed
|
|
22
|
+
|
|
23
|
+
Locale Refresh failed.
|
|
24
|
+
|
|
25
|
+
# BuildNotFound
|
|
26
|
+
|
|
27
|
+
Failed to execute the command because no successful build was found. Generate a successful build, and try again.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# commandDescription
|
|
2
|
+
|
|
3
|
+
Start the server
|
|
4
|
+
|
|
5
|
+
# SFConsumerKeyNotDefined
|
|
6
|
+
|
|
7
|
+
SF consumer key is either invalid or missing in the file '%s'. Enter a valid key and try again.
|
|
8
|
+
|
|
9
|
+
# PortNotDefined
|
|
10
|
+
|
|
11
|
+
The port setting is either invalid or blank in the file '%s'. Verify the port settings and try again.
|
|
12
|
+
|
|
13
|
+
# SimulatorConfigNotFound
|
|
14
|
+
|
|
15
|
+
Server configuration is missing in the file '%s'. Add the required server configurations to the file and try again.
|
|
16
|
+
|
|
17
|
+
# ApplicationConfigNotFound
|
|
18
|
+
|
|
19
|
+
Application configuration is missing in the file '%s'. Add the required application configurations to the file and try again.
|
|
20
|
+
|
|
21
|
+
# ServerStartFailed
|
|
22
|
+
|
|
23
|
+
Failed to start the server. Review the error details for more information.
|
|
24
|
+
|
|
25
|
+
# ServerStopRequest
|
|
26
|
+
|
|
27
|
+
Received a request to stop the backend server.
|
|
28
|
+
|
|
29
|
+
# examples
|
|
30
|
+
|
|
31
|
+
- <%= config.bin %> <%= command.id %>
|
|
32
|
+
|
|
33
|
+
- <%= config.bin %> <%= command.id %> --path ./testWorkspace
|
|
34
|
+
|
|
35
|
+
# EncryptionWarning
|
|
36
|
+
|
|
37
|
+
IMPORTANT: The SQLite database and attachments that are created during the testing of the offline application may contain sensitive data from the Salesforce org that is synced with your device. Be aware that this data is not encrypted locally. We strongly recommend that for testing purposes, use only test data in a Salesforce org.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# commandDescription
|
|
2
|
+
|
|
3
|
+
Upgrades a Modeler workspace.
|
|
4
|
+
|
|
5
|
+
# examples
|
|
6
|
+
|
|
7
|
+
- <%= config.bin %> <%= command.id %>
|
|
8
|
+
|
|
9
|
+
- <%= config.bin %> <%= command.id %> --path ./workspacePath
|
|
10
|
+
|
|
11
|
+
# workspaceUpgradationSuccessful
|
|
12
|
+
|
|
13
|
+
Modeler workspace at path '%s' upgraded successfully.
|
|
14
|
+
|
|
15
|
+
# workspaceUpgradationFailed
|
|
16
|
+
|
|
17
|
+
Failed to upgrade Modeler workspace at path '%s'.
|
|
18
|
+
|
|
19
|
+
# workspaceDoesNotExist
|
|
20
|
+
|
|
21
|
+
Failed to upgrade Modeler workspace at path '%s' as it does not exist
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# commandDescription
|
|
2
|
+
|
|
3
|
+
Returns a Base64-encoded string from a given input file.
|
|
4
|
+
|
|
5
|
+
# examples
|
|
6
|
+
|
|
7
|
+
- <%= config.bin %> <%= command.id %> --input ./image.svg
|
|
8
|
+
|
|
9
|
+
- <%= config.bin %> <%= command.id %> --input ./c3js.zip
|
|
10
|
+
|
|
11
|
+
# inputFlagDescription
|
|
12
|
+
|
|
13
|
+
path to the input file for Base64 encoding
|
|
14
|
+
|
|
15
|
+
# inputFileNotFound
|
|
16
|
+
|
|
17
|
+
Couldn't find the input file at path '%s'. Verify that the file is valid and exists at '%s'.
|
|
18
|
+
|
|
19
|
+
# inputFileSizeLimit
|
|
20
|
+
|
|
21
|
+
Unable to process the input file at path '%s' as it exceeds the %s MB limit.
|
|
22
|
+
|
|
23
|
+
# base64EncodeError
|
|
24
|
+
|
|
25
|
+
Error encountered during Base64 encoding of the file at path '%s'.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# commandDescription
|
|
2
|
+
|
|
3
|
+
Generates a manifest.json file in the src folder of the workspace. The manifest.json file contains the fingerprints of all contracts.
|
|
4
|
+
|
|
5
|
+
# inProgress
|
|
6
|
+
|
|
7
|
+
Manifest file generation is in progress.
|
|
8
|
+
|
|
9
|
+
# failed
|
|
10
|
+
|
|
11
|
+
Manifest file generation failed. Review error details and resolve.
|
|
12
|
+
|
|
13
|
+
# successful
|
|
14
|
+
|
|
15
|
+
Manifest file generated successfully.
|