runlify 0.0.714 → 0.0.715
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/build/cli.js +20 -52
- package/build/commands/availableEnvironments.js +16 -51
- package/build/commands/generate.js +10 -46
- package/build/commands/init.js +73 -140
- package/build/commands/login.js +6 -42
- package/build/commands/logout.js +5 -41
- package/build/commands/pullEnvs.js +23 -70
- package/build/commands/readEnv.js +16 -45
- package/build/commands/regen.js +17 -48
- package/build/commands/runlify.js +6 -37
- package/build/commands/showToken.js +14 -45
- package/build/commands/start.js +57 -84
- package/build/commands/tryGetMeta.js +7 -43
- package/build/documentation/algoritmToDoc.js +4 -4
- package/build/documentation/algoritmToDoc.spec.js +5 -5
- package/build/documentation/curlExampleToText.js +15 -16
- package/build/documentation/curlExampleToText.spec.js +32 -16
- package/build/documentation/doc.js +1 -2
- package/build/documentation/docToFlatDoc.js +13 -17
- package/build/documentation/docToFlatDoc.spec.js +9 -9
- package/build/documentation/flatDoc.js +1 -2
- package/build/documentation/flatDocToText.js +4 -6
- package/build/documentation/flatDocToText.spec.js +20 -8
- package/build/documentation/templateDoc.js +1 -2
- package/build/documentation/templateDocToDoc.js +2 -2
- package/build/extensions/auth.js +64 -124
- package/build/extensions/cli-extension.js +3 -3
- package/build/extensions/cloudEnv.js +76 -120
- package/build/extensions/cloudMeta.js +35 -73
- package/build/extensions/globalConfig.js +37 -80
- package/build/extensions/localConfig.js +15 -46
- package/build/extensions/preventRunningIfUpdateAvailable.js +18 -52
- package/build/log.js +6 -6
- package/build/projectsGeneration/args.js +33 -53
- package/build/projectsGeneration/builders/AdditionalServiceBuilder.js +62 -96
- package/build/projectsGeneration/builders/BaseBuilder.js +30 -34
- package/build/projectsGeneration/builders/BaseSavableEntityBuilder.js +272 -312
- package/build/projectsGeneration/builders/CatalogBuilder.js +17 -46
- package/build/projectsGeneration/builders/ConfigVarBuilder.js +25 -36
- package/build/projectsGeneration/builders/DeploymentBuilder.js +18 -47
- package/build/projectsGeneration/builders/DocumentBuilder.js +26 -56
- package/build/projectsGeneration/builders/InfoRegistryBuilder.js +106 -140
- package/build/projectsGeneration/builders/PageBuilder.js +22 -51
- package/build/projectsGeneration/builders/PermissionBuilder.js +12 -41
- package/build/projectsGeneration/builders/ReportBuilder.js +23 -52
- package/build/projectsGeneration/builders/RestApiBuilder.js +20 -50
- package/build/projectsGeneration/builders/RestApiMethodBuilder.js +25 -54
- package/build/projectsGeneration/builders/RoleBuilder.js +12 -41
- package/build/projectsGeneration/builders/SumRegistryBuilder.js +100 -133
- package/build/projectsGeneration/builders/SystemMetaBuilder.js +281 -324
- package/build/projectsGeneration/builders/TelegramBotBuilder.js +18 -47
- package/build/projectsGeneration/builders/docs/DocumentationOfDocumentBuilder.js +8 -9
- package/build/projectsGeneration/builders/fields/BaseFieldBuilder.js +89 -105
- package/build/projectsGeneration/builders/fields/IdFieldBuilder.js +24 -54
- package/build/projectsGeneration/builders/fields/LinkFieldBuilder.js +33 -62
- package/build/projectsGeneration/builders/fields/ModelFieldBuilder.js +18 -47
- package/build/projectsGeneration/builders/fields/ScalarFieldBuilder.js +11 -42
- package/build/projectsGeneration/builders/fields/ViewLinkFieldBuilder.js +26 -55
- package/build/projectsGeneration/builders/integrationClients/IntegrationClientArgsModelBuilder.js +6 -23
- package/build/projectsGeneration/builders/integrationClients/IntegrationClientBaseModelBuilder.js +28 -57
- package/build/projectsGeneration/builders/integrationClients/IntegrationClientBuilder.js +25 -54
- package/build/projectsGeneration/builders/integrationClients/IntegrationClientQueryMethodsBuilder.js +18 -47
- package/build/projectsGeneration/builders/integrationClients/IntegrationClientReturnModelBuilder.js +12 -41
- package/build/projectsGeneration/builders/materialUiIcons.js +2 -2
- package/build/projectsGeneration/builders/mehods/ArgsModelBuilder.js +6 -23
- package/build/projectsGeneration/builders/mehods/BaseModelBuilder.js +30 -59
- package/build/projectsGeneration/builders/mehods/MethodBuilder.js +36 -66
- package/build/projectsGeneration/builders/mehods/ReturnModelBuilder.js +12 -41
- package/build/projectsGeneration/builders/menu/BaseMenuItemBuilder.js +24 -54
- package/build/projectsGeneration/builders/menu/ExternalEnvMenuItemBuilder.js +11 -40
- package/build/projectsGeneration/builders/menu/ExternalMenuItemBuilder.js +11 -40
- package/build/projectsGeneration/builders/menu/GroupMenuItemBuilder.js +31 -66
- package/build/projectsGeneration/builders/menu/InternalMenuItemBuilder.js +16 -45
- package/build/projectsGeneration/builders/tsFilterFields.js +11 -12
- package/build/projectsGeneration/builders/tsFilterFields.spec.js +29 -11
- package/build/projectsGeneration/builders/ui/FormsBuilder.js +9 -10
- package/build/projectsGeneration/builders/ui/ListFormBuilder.js +9 -10
- package/build/projectsGeneration/builders/ui/ListFormFilterBuilder.js +14 -16
- package/build/projectsGeneration/builders/ui/ListFormFilterFieldBuilder.js +8 -9
- package/build/projectsGeneration/builders/utils/accessFunctions.js +4 -4
- package/build/projectsGeneration/builders/validation/baseValudationToYupAssertions.js +4 -4
- package/build/projectsGeneration/builders/validation/bigintValudationToYupAssertions.js +5 -5
- package/build/projectsGeneration/builders/validation/bigintValudationToYupAssertions.spec.js +7 -7
- package/build/projectsGeneration/builders/validation/floatValudationToYupAssertions.js +4 -4
- package/build/projectsGeneration/builders/validation/floatValudationToYupAssertions.spec.js +6 -6
- package/build/projectsGeneration/builders/validation/intValudationToYupAssertions.js +9 -9
- package/build/projectsGeneration/builders/validation/intValudationToYupAssertions.spec.js +9 -9
- package/build/projectsGeneration/builders/validation/numberValudationToYupAssertions.js +10 -10
- package/build/projectsGeneration/builders/validation/stringValudationToYupAssertions.js +6 -6
- package/build/projectsGeneration/builders/validation/stringValudationToYupAssertions.spec.js +6 -6
- package/build/projectsGeneration/commonEntities/addAggregateTrackings.js +3 -3
- package/build/projectsGeneration/commonEntities/addAuditLogs.js +6 -6
- package/build/projectsGeneration/commonEntities/addAutogeneration.js +4 -4
- package/build/projectsGeneration/commonEntities/addCommonCommands.js +2 -2
- package/build/projectsGeneration/commonEntities/addCommonEntities.js +14 -14
- package/build/projectsGeneration/commonEntities/addConfigurationVariables.js +4 -4
- package/build/projectsGeneration/commonEntities/addLanguages.js +3 -3
- package/build/projectsGeneration/commonEntities/addManagers.js +6 -6
- package/build/projectsGeneration/commonEntities/addRefreshTokens.js +4 -4
- package/build/projectsGeneration/commonEntities/addRoles.js +8 -8
- package/build/projectsGeneration/commonEntities/addTenants.js +3 -3
- package/build/projectsGeneration/commonEntities/addUserSettings.js +7 -7
- package/build/projectsGeneration/commonEntities/addUsers.js +4 -4
- package/build/projectsGeneration/defaultCatalogs/addElasticSearch.js +12 -13
- package/build/projectsGeneration/defaultCatalogs/files.js +6 -6
- package/build/projectsGeneration/fileCleaners/back/graphServices/cleanGraphServices.js +24 -59
- package/build/projectsGeneration/fileCleaners/back/services/cleanServices.js +32 -67
- package/build/projectsGeneration/fileCleaners/cleanFiles.js +7 -38
- package/build/projectsGeneration/fileCleaners/ui/cleanUi.js +7 -39
- package/build/projectsGeneration/fileCleaners/ui/pages/cleanPages.js +24 -59
- package/build/projectsGeneration/fileCleaners/ui/widgets/cleanWidgets.js +10 -40
- package/build/projectsGeneration/fileCleaners/ui/widgets/cleanWidgetsByType.js +29 -62
- package/build/projectsGeneration/genGraphSchemesByLocalGenerator.js +26 -68
- package/build/projectsGeneration/generateAdditionalService.js +41 -98
- package/build/projectsGeneration/generateEntity.js +215 -346
- package/build/projectsGeneration/generateEnvironment.js +157 -265
- package/build/projectsGeneration/generateProject.js +422 -724
- package/build/projectsGeneration/generators/fieldTypeToTsType.js +4 -4
- package/build/projectsGeneration/generators/fileTemplates/back/Entities.js +16 -14
- package/build/projectsGeneration/generators/fileTemplates/back/devEnum.js +17 -13
- package/build/projectsGeneration/generators/fileTemplates/back/elastic/elastic.js +8 -44
- package/build/projectsGeneration/generators/fileTemplates/back/elastic/jobs.js +36 -26
- package/build/projectsGeneration/generators/fileTemplates/back/enum.js +17 -13
- package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/Chart.js +12 -8
- package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/back.js +128 -12
- package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/ingress.js +54 -8
- package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/values.js +149 -13
- package/build/projectsGeneration/generators/fileTemplates/back/environment/ciNotify.js +19 -8
- package/build/projectsGeneration/generators/fileTemplates/back/environment/defaultEnv.js +5 -9
- package/build/projectsGeneration/generators/fileTemplates/back/environment/dockerfileTmplBack.js +38 -8
- package/build/projectsGeneration/generators/fileTemplates/back/environment/dockerfileTmplUI.js +42 -8
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocSpec.js +3 -6
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsConfiguration.js +27 -19
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsEntity.js +7 -5
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsIntegrationClient.js +44 -29
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsRestApi.js +45 -18
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/spec/findLinksToEntities.js +2 -4
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/spec/getAllSavableEntities.js +7 -11
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/spec/getProjectSpec.js +206 -216
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/spec/titleMd.js +5 -5
- package/build/projectsGeneration/generators/fileTemplates/back/environment/gitlabCi.js +272 -37
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/clients/getPrisma.js +78 -9
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/clients/queue/getQueue.js +42 -9
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/index.js +36 -9
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/IntegrationClient.js +56 -5
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/IntegrationClients.js +12 -9
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/fieldsToTsTypeFields.js +4 -6
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/integrationClientConstrictors.js +13 -9
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/tsModelTmpl.js +6 -4
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/types.js +15 -7
- package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalResolvers.js +9 -2
- package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalService/permissionToGraphql.js +16 -9
- package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalService/resolvers.js +32 -12
- package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalService/typeDefs.js +18 -11
- package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalTypes.js +7 -2
- package/build/projectsGeneration/generators/fileTemplates/back/graph/entityAdditionalPermissionToGraphqlTmpl.js +20 -9
- package/build/projectsGeneration/generators/fileTemplates/back/graph/entityBasePermissionToGraphql.js +22 -10
- package/build/projectsGeneration/generators/fileTemplates/back/graph/entityPermissionToGraphqlTmpl.js +18 -9
- package/build/projectsGeneration/generators/fileTemplates/back/graph/help/baseResolvers.js +17 -2
- package/build/projectsGeneration/generators/fileTemplates/back/graph/help/baseTypeDefs.js +15 -5
- package/build/projectsGeneration/generators/fileTemplates/back/graph/help/permissionsToGraphql.js +11 -2
- package/build/projectsGeneration/generators/fileTemplates/back/graph/meta/resolvers.js +26 -2
- package/build/projectsGeneration/generators/fileTemplates/back/graph/meta/typeDefs.js +17 -2
- package/build/projectsGeneration/generators/fileTemplates/back/graph/permissionsToGraphql.js +52 -13
- package/build/projectsGeneration/generators/fileTemplates/back/graph/resolvers.js +52 -13
- package/build/projectsGeneration/generators/fileTemplates/back/graph/types.js +18 -11
- package/build/projectsGeneration/generators/fileTemplates/back/initCommon.js +30 -16
- package/build/projectsGeneration/generators/fileTemplates/back/initDev.js +27 -15
- package/build/projectsGeneration/generators/fileTemplates/back/initEntities.js +24 -10
- package/build/projectsGeneration/generators/fileTemplates/back/root/config/config.js +30 -16
- package/build/projectsGeneration/generators/fileTemplates/back/root/restRouter.js +21 -2
- package/build/projectsGeneration/generators/fileTemplates/back/services/AdditionalServices.js +7 -2
- package/build/projectsGeneration/generators/fileTemplates/back/services/BaseServices.js +18 -22
- package/build/projectsGeneration/generators/fileTemplates/back/services/HelpService/HelpService.js +30 -7
- package/build/projectsGeneration/generators/fileTemplates/back/services/additionalService/types.js +18 -13
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/additionalClass.js +7 -5
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/class.js +126 -49
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/config.js +59 -40
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnCreate.js +13 -5
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnDelete.js +14 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnUpdate.js +14 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterCreate.js +15 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterDelete.js +15 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterUpdate.js +15 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeCreate.js +15 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeDelete.js +15 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeUpdate.js +14 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeUpsert.js +30 -7
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/changeListFilter.js +14 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/tenantIdRequiredHooks.js +81 -8
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/initBuiltInHooks.js +22 -10
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/initUserHooks.js +31 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/serviceConstrictors.js +26 -14
- package/build/projectsGeneration/generators/fileTemplates/ui/Dashboard.js +14 -2
- package/build/projectsGeneration/generators/fileTemplates/ui/MetaPage.js +120 -3
- package/build/projectsGeneration/generators/fileTemplates/ui/ResourcesPage.js +45 -10
- package/build/projectsGeneration/generators/fileTemplates/ui/additionalRoutes.js +5 -2
- package/build/projectsGeneration/generators/fileTemplates/ui/entityMapping.js +14 -12
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/Chart.js +12 -8
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/front.js +118 -13
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/ingress.js +51 -8
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/values.js +79 -8
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/ciNotify.js +19 -8
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/docs/adminAppDocsConfiguration.js +27 -21
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/gitlabCi.js +179 -26
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/App.js +107 -10
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/contexts/SpacesContext.js +67 -9
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/dataProvider/getAdditionalMethods.js +55 -18
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/dataProvider/index.js +93 -13
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/i18nProvider/index.js +51 -19
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/layout/AppBar.js +60 -9
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/layout/Menu.js +52 -9
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/routes.js +38 -9
- package/build/projectsGeneration/generators/fileTemplates/ui/functions/Functions.js +60 -7
- package/build/projectsGeneration/generators/fileTemplates/ui/getAdditionalMenu.js +11 -2
- package/build/projectsGeneration/generators/fileTemplates/ui/getDefaultMenu.js +136 -23
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangCatalogsTmpl.js +3 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangDocsTmpl.js +3 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangInfoRegistriesTmpl.js +3 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangReportsTmpl.js +3 -3
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangSumRegistriesTmpl.js +3 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiTranslationsForServicesOfSavablesTmpl.js +33 -21
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiTranslationsLangTmpl.js +23 -15
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityCreate/DefaultEntityCreate.js +101 -62
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityCreate/index.js +15 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityEdit/DefaultEntityEdit.js +176 -77
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityEdit/index.js +15 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/DefaultEntityFilter.js +68 -50
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/DefaultEntityList.js +83 -47
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/EntityFilter.js +12 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/index.js +15 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultActions.js +54 -19
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultEntityShow.js +53 -30
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultMainTab.js +45 -32
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DependencyTab.js +57 -41
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/MainTab.js +3 -2
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/additionalTabs.js +7 -3
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/index.js +15 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/Icon.js +8 -8
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/getEntityValidation.js +45 -30
- package/build/projectsGeneration/generators/fileTemplates/ui/resources.js +46 -12
- package/build/projectsGeneration/generators/fileTemplates/ui/widgets/count/CountWidget.js +50 -9
- package/build/projectsGeneration/generators/fileTemplates/ui/widgets/list/ListWidget.js +109 -14
- package/build/projectsGeneration/generators/graph/fieldTypeToGraphScalar.js +8 -9
- package/build/projectsGeneration/generators/graph/fieldTypeToGraphScalarStringified.js +4 -6
- package/build/projectsGeneration/generators/graph/fields/genGraphField.js +8 -9
- package/build/projectsGeneration/generators/graph/fields/genGraphIdField.js +7 -8
- package/build/projectsGeneration/generators/graph/fields/genGraphIdFieldType.js +6 -6
- package/build/projectsGeneration/generators/graph/fields/genGraphLinkField.js +10 -11
- package/build/projectsGeneration/generators/graph/fields/genGraphModelField.js +10 -11
- package/build/projectsGeneration/generators/graph/fields/genGraphScalarField.js +10 -11
- package/build/projectsGeneration/generators/graph/filters/genGraphField.js +7 -7
- package/build/projectsGeneration/generators/graph/filters/genGraphIdFilter.js +12 -14
- package/build/projectsGeneration/generators/graph/filters/genGraphLinkFilter.js +12 -24
- package/build/projectsGeneration/generators/graph/filters/genGraphScalarFilter.js +25 -37
- package/build/projectsGeneration/generators/graph/genGraphAdditionalServiceSchema.js +35 -35
- package/build/projectsGeneration/generators/graph/genGraphAdditionalServiceSchema.spec.js +148 -65
- package/build/projectsGeneration/generators/graph/genGraphCrudSchema.js +38 -50
- package/build/projectsGeneration/generators/graph/genGraphCrudSchema.spec.js +393 -34
- package/build/projectsGeneration/generators/graph/genGraphFilterType.js +11 -22
- package/build/projectsGeneration/generators/graph/genGraphFilterType.spec.js +75 -13
- package/build/projectsGeneration/generators/graph/genGraphModelType.js +15 -27
- package/build/projectsGeneration/generators/graph/genGraphType.js +7 -18
- package/build/projectsGeneration/generators/graph/genGraphType.spec.js +27 -12
- package/build/projectsGeneration/generators/graph/printGraphType.js +5 -7
- package/build/projectsGeneration/generators/graph/printGraphType.spec.js +11 -6
- package/build/projectsGeneration/generators/graph/utils/mapUtils.js +11 -30
- package/build/projectsGeneration/generators/graph/utils/models/getModelInitOrder.js +14 -28
- package/build/projectsGeneration/generators/graph/utils/models/getModelInitOrder.spec.js +18 -18
- package/build/projectsGeneration/generators/graph/utils/models/getUniqModels.js +3 -3
- package/build/projectsGeneration/generators/graph/utils/models/getUniqModels.spec.js +17 -28
- package/build/projectsGeneration/generators/graph/utils/models/getUsedModels.js +14 -19
- package/build/projectsGeneration/generators/graph/utils/models/getUsedModels.spec.js +40 -51
- package/build/projectsGeneration/generators/graph/utils/serviceModels/augmentInputModelsByUsedAsInputGeneralModelsAndPostfixThemByInput.js +17 -26
- package/build/projectsGeneration/generators/graph/utils/serviceModels/augmentInputModelsByUsedAsInputGeneralModelsAndPostfixThemByInput.spec.js +68 -68
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getGraphTypesFromInputOutputModels.js +21 -42
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getGraphTypesFromInputOutputModels.spec.js +85 -62
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getPreparedModelsForGraph.js +20 -31
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getPreparedModelsForGraph.spec.js +48 -49
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getServiceModels.js +7 -7
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getUsedGraphModelsForService.js +6 -6
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getUsedGraphModelsForService.spec.js +13 -13
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getUsedModelsForService.js +18 -21
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getUsedModelsForService.spec.js +153 -153
- package/build/projectsGeneration/generators/graph/utils/serviceModels/prefixServiceModelsWithServiceName.js +25 -26
- package/build/projectsGeneration/generators/graph/utils/serviceModels/prefixServiceModelsWithServiceName.spec.js +69 -69
- package/build/projectsGeneration/generators/graph/utils/serviceModels/removeDublicatesFromServiceModels.js +4 -4
- package/build/projectsGeneration/generators/graph/utils/serviceModels/removeUnusedInOutputGeneralModels.js +6 -17
- package/build/projectsGeneration/generators/graph/utils/serviceModels/removeVoidsInServiceModels.js +5 -5
- package/build/projectsGeneration/generators/prisma/fieldIdTypeToPrismaType.js +3 -3
- package/build/projectsGeneration/generators/prisma/fieldTypeToPrismaType.js +3 -3
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaDefault.js +3 -3
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaDefault.spec.js +20 -20
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaField.js +7 -8
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaFieldFromExternalEntity.js +6 -7
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaFieldFromExternalEntity.spec.js +7 -19
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaIdField.js +10 -11
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaIdField.spec.js +13 -13
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaLinkFields.js +15 -18
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaLinkFields.spec.js +27 -28
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaScalarField.js +12 -14
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaScalarField.spec.js +29 -30
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaEntity.js +23 -32
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaEntity.spec.js +104 -47
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntities.js +5 -7
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntitiesWithClientAdnDb.js +19 -10
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNameToEditScalar.js +3 -3
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditField.js +7 -7
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditIdField.js +3 -3
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditLinkField.js +5 -5
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditLinkField.spec.js +10 -10
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditScalarField.js +3 -3
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNameToShowScalar.js +3 -3
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowField.js +7 -7
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowIdField.js +3 -3
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowLinkField.js +2 -14
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowLinkField.spec.js +17 -17
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowScalarField.js +3 -3
- package/build/projectsGeneration/generators/ui/getLinkShowComponent.spec.js +18 -18
- package/build/projectsGeneration/generators/ui/getScalarShowComponent.spec.js +11 -11
- package/build/projectsGeneration/generators/ui/getShowComponent.js +19 -20
- package/build/projectsGeneration/links/getLinksFromExternalEntities.js +2 -4
- package/build/projectsGeneration/links/getLinksFromExternalEntities.spec.js +11 -22
- package/build/projectsGeneration/links/getLinksOfEntities.js +6 -8
- package/build/projectsGeneration/links/getLinksOfEntities.spec.js +20 -31
- package/build/projectsGeneration/links/getLinksToExternalEntities.js +2 -4
- package/build/projectsGeneration/links/getLinksToExternalEntities.spec.js +11 -22
- package/build/projectsGeneration/metaUtils.js +17 -23
- package/build/projectsGeneration/modelsGeneration.serialization.spec.js +8 -8
- package/build/projectsGeneration/modules/addEmailModuleEntities.js +11 -11
- package/build/projectsGeneration/types.js +6 -6
- package/build/projectsGeneration/utils.js +24 -61
- package/build/refs/yup.spec.js +7 -7
- package/build/types/projectsGeneration/builders/InfoRegistryBuilder.d.ts +0 -4
- package/build/types/projectsGeneration/builders/SumRegistryBuilder.d.ts +0 -3
- package/build/types/projectsGeneration/fileCleaners/cleanFiles.d.ts +1 -1
- package/build/types/projectsGeneration/generateProject.d.ts +0 -5
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/back.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/ingress.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/dockerfileTmplBack.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/dockerfileTmplUI.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/IntegrationClient.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/config.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/front.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/ingress.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/src/App.d.ts +1 -1
- package/build/utils/TermSignals.js +35 -43
- package/build/utils/cases.js +12 -18
- package/build/utils/getPkgManager.js +4 -4
- package/package.json +12 -24
- package/build/projectsGeneration/fileCleaners/back/cleanBack.js +0 -50
- package/build/types/projectsGeneration/fileCleaners/back/cleanBack.d.ts +0 -3
|
@@ -1,127 +1,93 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
29
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
|
-
if (ar || !(i in from)) {
|
|
31
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
32
|
-
ar[i] = from[i];
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
|
-
};
|
|
37
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
4
|
};
|
|
40
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
_this.outputModels = []; // models that may be used only as output
|
|
52
|
-
return _this;
|
|
6
|
+
const BaseBuilder_1 = __importDefault(require("./BaseBuilder"));
|
|
7
|
+
const MethodBuilder_1 = __importDefault(require("./mehods/MethodBuilder"));
|
|
8
|
+
const BaseModelBuilder_1 = __importDefault(require("./mehods/BaseModelBuilder"));
|
|
9
|
+
class AdditionalServiceBuilder extends BaseBuilder_1.default {
|
|
10
|
+
constructor(name, defaultLanguage, title) {
|
|
11
|
+
super(name, defaultLanguage, { singular: title });
|
|
12
|
+
this.methods = [];
|
|
13
|
+
this.generalModels = []; // models that may be used as input or output
|
|
14
|
+
this.inputModels = []; // models that may be used only as input
|
|
15
|
+
this.outputModels = []; // models that may be used only as output
|
|
53
16
|
}
|
|
54
|
-
|
|
55
|
-
if (this.methods.some(
|
|
56
|
-
throw new Error(
|
|
17
|
+
addMethod(name, methodType, title) {
|
|
18
|
+
if (this.methods.some((f) => f.name === name)) {
|
|
19
|
+
throw new Error(`There is already method with "${name}" name`);
|
|
57
20
|
}
|
|
58
|
-
|
|
21
|
+
const method = new MethodBuilder_1.default(this, name, methodType, this.defaultLanguage, title);
|
|
59
22
|
this.methods.push(method);
|
|
60
23
|
this.addCreatedInputModel(method.getArgsModel());
|
|
61
24
|
this.addCreatedOutputModel(method.getReturnModel());
|
|
62
25
|
return method;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
26
|
+
}
|
|
27
|
+
getAllModels() {
|
|
28
|
+
return [
|
|
29
|
+
...this.inputModels,
|
|
30
|
+
...this.outputModels,
|
|
31
|
+
...this.generalModels,
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
addGeneralModel(name, title) {
|
|
35
|
+
if (this.getAllModels().some((f) => f.name === name)) {
|
|
36
|
+
throw new Error(`There is already field with name "${name}" in args model`);
|
|
70
37
|
}
|
|
71
|
-
|
|
38
|
+
const model = new BaseModelBuilder_1.default(this, name, title !== null && title !== void 0 ? title : name, this.defaultLanguage);
|
|
72
39
|
this.generalModels.push(model);
|
|
73
40
|
return model;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (this.getAllModels().some(
|
|
77
|
-
throw new Error(
|
|
41
|
+
}
|
|
42
|
+
addInputModel(name, title) {
|
|
43
|
+
if (this.getAllModels().some((f) => f.name === name)) {
|
|
44
|
+
throw new Error(`There is already field with name "${name}" in args model`);
|
|
78
45
|
}
|
|
79
|
-
|
|
46
|
+
const model = new BaseModelBuilder_1.default(this, name, title !== null && title !== void 0 ? title : name, this.defaultLanguage);
|
|
80
47
|
this.inputModels.push(model);
|
|
81
48
|
return model;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (this.getAllModels().some(
|
|
85
|
-
throw new Error(
|
|
49
|
+
}
|
|
50
|
+
addOutputModel(name, title) {
|
|
51
|
+
if (this.getAllModels().some((f) => f.name === name)) {
|
|
52
|
+
throw new Error(`There is already field with name "${name}" in args model`);
|
|
86
53
|
}
|
|
87
|
-
|
|
54
|
+
const model = new BaseModelBuilder_1.default(this, name, title !== null && title !== void 0 ? title : name, this.defaultLanguage);
|
|
88
55
|
this.outputModels.push(model);
|
|
89
56
|
return model;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (this.getAllModels().some(
|
|
93
|
-
throw new Error(
|
|
57
|
+
}
|
|
58
|
+
addCreatedGeneralModel(model) {
|
|
59
|
+
if (this.getAllModels().some((f) => f.name === model.name)) {
|
|
60
|
+
throw new Error(`There is already field with name "${model.name}" in args model`);
|
|
94
61
|
}
|
|
95
62
|
this.generalModels.push(model);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (this.getAllModels().some(
|
|
99
|
-
throw new Error(
|
|
63
|
+
}
|
|
64
|
+
addCreatedInputModel(model) {
|
|
65
|
+
if (this.getAllModels().some((f) => f.name === model.name)) {
|
|
66
|
+
throw new Error(`There is already field with name "${model.name}" in args model`);
|
|
100
67
|
}
|
|
101
68
|
this.inputModels.push(model);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
if (this.getAllModels().some(
|
|
105
|
-
throw new Error(
|
|
69
|
+
}
|
|
70
|
+
addCreatedOutputModel(model) {
|
|
71
|
+
if (this.getAllModels().some((f) => f.name === model.name)) {
|
|
72
|
+
throw new Error(`There is already field with name "${model.name}" in args model`);
|
|
106
73
|
}
|
|
107
74
|
this.outputModels.push(model);
|
|
108
|
-
}
|
|
109
|
-
|
|
75
|
+
}
|
|
76
|
+
getMethods() {
|
|
110
77
|
return this.methods;
|
|
111
|
-
}
|
|
112
|
-
|
|
78
|
+
}
|
|
79
|
+
getGeneralModels() {
|
|
113
80
|
return this.generalModels;
|
|
114
|
-
}
|
|
115
|
-
|
|
81
|
+
}
|
|
82
|
+
getInputModels() {
|
|
116
83
|
return this.inputModels;
|
|
117
|
-
}
|
|
118
|
-
|
|
84
|
+
}
|
|
85
|
+
getOutputModels() {
|
|
119
86
|
return this.outputModels;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
return
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
}(BaseBuilder_1.default));
|
|
87
|
+
}
|
|
88
|
+
build() {
|
|
89
|
+
return Object.assign(Object.assign({}, super.build()), { type: 'additionalService', methods: this.methods.map(m => m.build()), generalModels: this.generalModels.map(m => m.build()), inputModels: this.inputModels.map(m => m.build()), outputModels: this.outputModels.map(m => m.build()) });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
126
92
|
exports.default = AdditionalServiceBuilder;
|
|
127
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
93
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWRkaXRpb25hbFNlcnZpY2VCdWlsZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3Byb2plY3RzR2VuZXJhdGlvbi9idWlsZGVycy9BZGRpdGlvbmFsU2VydmljZUJ1aWxkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW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UFJLENBQUMsWUFBWSxDQUFDO0lBQzNCLENBQUM7SUFFRCxLQUFLO1FBQ0gsdUNBQ0ssS0FBSyxDQUFDLEtBQUssRUFBRSxLQUNoQixJQUFJLEVBQUUsbUJBQW1CLEVBQ3pCLE9BQU8sRUFBRSxJQUFJLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQyxFQUN6QyxhQUFhLEVBQUUsSUFBSSxDQUFDLGFBQWEsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUMsRUFDckQsV0FBVyxFQUFFLElBQUksQ0FBQyxXQUFXLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLEtBQUssRUFBRSxDQUFDLEVBQ2pELFlBQVksRUFBRSxJQUFJLENBQUMsWUFBWSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQyxJQUNwRDtJQUNILENBQUM7Q0FDRjtBQUVELGtCQUFlLHdCQUF3QixDQUFBIn0=
|
|
@@ -26,8 +26,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const R = __importStar(require("ramda"));
|
|
30
|
+
const materialUiIcons_1 = __importDefault(require("./materialUiIcons"));
|
|
31
31
|
// * у каких ролей есть полный доступ к сущности
|
|
32
32
|
// * Какие есть воркеры, какие у них есть джобы, с какой периодичностью запускаются, какие методы используют
|
|
33
33
|
// * Какие методы можно запускать через очередь, какие воркеры за это отвечают
|
|
@@ -36,8 +36,8 @@ var materialUiIcons_1 = __importDefault(require("./materialUiIcons"));
|
|
|
36
36
|
// * Отображение карточки, списка, фильтров
|
|
37
37
|
// * Какие есть интеграционные клиенты
|
|
38
38
|
// * Какие есть рест апи
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
class BaseBuilder {
|
|
40
|
+
constructor(name, defaultLanguage, title) {
|
|
41
41
|
var _a;
|
|
42
42
|
this.title = {};
|
|
43
43
|
this.needFor = {};
|
|
@@ -48,48 +48,44 @@ var BaseBuilder = /** @class */ (function () {
|
|
|
48
48
|
this.setName(name);
|
|
49
49
|
this.setTitle({ singular: (_a = title === null || title === void 0 ? void 0 : title.singular) !== null && _a !== void 0 ? _a : name });
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
build() {
|
|
52
52
|
return R.pick(['name', 'title', 'needFor', 'materialUiIcon', 'previewFeatures'], this);
|
|
53
|
-
}
|
|
54
|
-
|
|
53
|
+
}
|
|
54
|
+
setName(name) {
|
|
55
55
|
this.name = name;
|
|
56
56
|
return this;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
}
|
|
58
|
+
setNeedFor(needFor, language) {
|
|
59
|
+
const resultedLangiage = language ? language : this.defaultLanguage;
|
|
60
60
|
this.needFor[resultedLangiage] = needFor;
|
|
61
61
|
return this;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
}
|
|
63
|
+
setTitle(title, language) {
|
|
64
|
+
const resultedLangiage = language ? language : this.defaultLanguage;
|
|
65
65
|
this.title[resultedLangiage] = title;
|
|
66
66
|
return this;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
this.title = R.fromPairs(R.toPairs(title).map(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
];
|
|
78
|
-
}));
|
|
67
|
+
}
|
|
68
|
+
setTitles(title) {
|
|
69
|
+
this.title = R.fromPairs(R.toPairs(title).map(([key, value]) => [
|
|
70
|
+
key,
|
|
71
|
+
{
|
|
72
|
+
singular: value.singular.replaceAll("'", "\\'"),
|
|
73
|
+
plural: value.plural.replaceAll("'", "\\'"),
|
|
74
|
+
},
|
|
75
|
+
]));
|
|
79
76
|
return this;
|
|
80
|
-
}
|
|
81
|
-
|
|
77
|
+
}
|
|
78
|
+
setMaterialUiIcon(materialUiIcon) {
|
|
82
79
|
if (!materialUiIcons_1.default.includes(materialUiIcon)) {
|
|
83
|
-
throw new Error(
|
|
80
|
+
throw new Error(`THere is no "${materialUiIcon}" material ui icon`);
|
|
84
81
|
}
|
|
85
82
|
this.materialUiIcon = materialUiIcon;
|
|
86
83
|
return this;
|
|
87
|
-
}
|
|
88
|
-
|
|
84
|
+
}
|
|
85
|
+
setPreviewFeature(previewFeatures) {
|
|
89
86
|
this.previewFeatures.push(previewFeatures);
|
|
90
87
|
return this;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
}());
|
|
88
|
+
}
|
|
89
|
+
}
|
|
94
90
|
exports.default = BaseBuilder;
|
|
95
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
91
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQmFzZUJ1aWxkZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2J1aWxkZXJzL0Jhc2VCdWlsZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSx5Q0FBMEI7QUFDMUIsd0VBQStDO0FBRy9DLGdEQUFnRDtBQUNoRCw0R0FBNEc7QUFDNUcsOEVBQThFO0FBQzlFLDJDQUEyQztBQUMzQyxpRUFBaUU7QUFDakUsMkNBQTJDO0FBRTNDLHNDQUFzQztBQUN0Qyx3QkFBd0I7QUFFeEIsTU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