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
package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/dataProvider/index.js
CHANGED
|
@@ -1,17 +1,97 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.uiDataProviderTmpl = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
4
|
+
const cases_1 = require("../../../../../../../utils/cases");
|
|
5
|
+
const types_1 = require("../../../../../../types");
|
|
6
|
+
const utils_1 = require("../../../../../../utils");
|
|
7
|
+
const metaUtils_1 = require("../../../../../../metaUtils");
|
|
8
|
+
const uiDataProviderTmpl = (entities, options = types_1.defaultBootstrapEntityOptions) => `import buildGraphQLProvider, {buildQuery as buildQueryFactory} from 'ra-data-graphql-simple';
|
|
9
|
+
import {IntrospectionResult} from 'ra-data-graphql';
|
|
10
|
+
import {DELETE} from 'ra-core';
|
|
11
|
+
import gql from 'graphql-tag';
|
|
12
|
+
import {IntrospectionType, IntrospectionSchema} from 'graphql';
|
|
13
|
+
import {mapping} from '../adm/entityMapping';
|
|
14
|
+
import sch from '../generated/graphql.schema.json';
|
|
15
|
+
import {ApolloClient} from '@apollo/client';
|
|
16
|
+
import getCustomMethods from './getCustomMethods';
|
|
17
|
+
import getAdditionalMethods from './getAdditionalMethods';
|
|
18
|
+
import {DataProvider} from './types';
|
|
19
|
+
${options.skipWarningThisIsGenerated
|
|
20
|
+
? ''
|
|
21
|
+
: `
|
|
22
|
+
// ${utils_1.generatedWarning}
|
|
23
|
+
`}
|
|
24
|
+
const schema = sch.__schema;
|
|
25
|
+
|
|
26
|
+
const getGqlResource = (resource: string) => {
|
|
27
|
+
if (resource in mapping) {
|
|
28
|
+
return mapping[resource as keyof typeof mapping];
|
|
29
|
+
} else {
|
|
30
|
+
throw new Error(\`Unknown resource \${resource}\`);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const numberIdResources: string[] = [
|
|
35
|
+
${entities
|
|
36
|
+
.filter((m) => (0, metaUtils_1.getKeyField)(m).type === 'bigint' || (0, metaUtils_1.getKeyField)(m).type === 'int')
|
|
37
|
+
.map((m) => `'${(0, cases_1.camel)(m.name)}',`).join(`
|
|
38
|
+
`)}
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
const customBuildQuery = (introspection: IntrospectionResult) =>
|
|
42
|
+
(fetchType: string, originalResource: string, params: any) => {
|
|
43
|
+
const resource = getGqlResource(originalResource);
|
|
44
|
+
|
|
45
|
+
const builtQuery = buildQueryFactory(introspection)(fetchType, resource, params);
|
|
46
|
+
|
|
47
|
+
if (numberIdResources.includes(resource) && fetchType === 'GET_ONE' && 'id' in params) {
|
|
48
|
+
params.id = Number.parseInt(params.id, 10);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (resource === 'Command' && fetchType === 'GET_ONE') {
|
|
52
|
+
return {
|
|
53
|
+
// Use the default query variables and parseResponse
|
|
54
|
+
...builtQuery,
|
|
55
|
+
|
|
56
|
+
// Override the query
|
|
57
|
+
query: gql\`
|
|
58
|
+
query Command($id: ID!) {
|
|
59
|
+
data: Command(id: $id) {
|
|
60
|
+
id
|
|
61
|
+
reference
|
|
62
|
+
customer {
|
|
63
|
+
id
|
|
64
|
+
firstName
|
|
65
|
+
lastName
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
\`,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return builtQuery;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export default async (client: ApolloClient<unknown>): Promise<DataProvider> => {
|
|
77
|
+
const baseDataProvider = await buildGraphQLProvider({
|
|
78
|
+
buildQuery: customBuildQuery,
|
|
79
|
+
client: client as any,
|
|
80
|
+
introspection: {
|
|
81
|
+
schema: schema as unknown as IntrospectionSchema,
|
|
82
|
+
operationNames: {
|
|
83
|
+
[DELETE]: (resource: IntrospectionType) =>
|
|
84
|
+
\`remove\${resource.name}\`,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
...baseDataProvider,
|
|
91
|
+
...getCustomMethods(client, baseDataProvider),
|
|
92
|
+
...getAdditionalMethods(client),
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
`;
|
|
16
96
|
exports.uiDataProviderTmpl = uiDataProviderTmpl;
|
|
17
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
97
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2dlbmVyYXRvcnMvZmlsZVRlbXBsYXRlcy91aS9lbnZpcm9ubWVudC9zcmMvZGF0YVByb3ZpZGVyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDREQUF3RDtBQUN4RCxtREFHZ0M7QUFFaEMsbURBQTBEO0FBQzFELDJEQUF5RDtBQUVsRCxNQUFNLGtCQUFrQixHQUFHLENBQ2hDLFFBQWtCLEVBQ2xCLFVBQWtDLHFDQUE2QixFQUMvRCxFQUFFLENBQUM7Ozs7Ozs7Ozs7O0VBWUgsT0FBTyxDQUFDLDBCQUEwQjtJQUNoQyxDQUFDLENBQUMsRUFBRTtJQUNKLENBQUMsQ0FBQztLQUNELHdCQUFnQjtDQUVyQjs7Ozs7Ozs7Ozs7O0lBWUksUUFBUTtLQUNQLE1BQU0sQ0FDTCxDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsSUFBQSx1QkFBVyxFQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksS0FBSyxRQUFRLElBQUksSUFBQSx1QkFBVyxFQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksS0FBSyxLQUFLLENBQ3pFO0tBQ0EsR0FBRyxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxJQUFJLElBQUEsYUFBSyxFQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsSUFBSSxDQUFDO0dBQ3pDLENBQUM7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztDQXlESCxDQUFBO0FBOUZZLFFBQUEsa0JBQWtCLHNCQThGOUIifQ==
|
package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/i18nProvider/index.js
CHANGED
|
@@ -1,23 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.uiI18nProviderTmpl = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
4
|
+
const types_1 = require("../../../../../../types");
|
|
5
|
+
const utils_1 = require("../../../../../../utils");
|
|
6
|
+
const uiI18nProviderTmpl = ({ system: { defaultLanguage, languages } }, options = types_1.defaultBootstrapEntityOptions) => `import polyglotI18nProvider from 'ra-i18n-polyglot';
|
|
7
|
+
import {Locale} from 'ra-core';
|
|
8
|
+
import defaultMessages from '../i18n/${defaultLanguage}';
|
|
9
|
+
import log from '../utils/log';
|
|
10
|
+
import {ValidationMessages} from '../i18n/types';
|
|
11
|
+
import initYupLocale from './initYupLocale';
|
|
12
|
+
import {I18nProvider} from './types';
|
|
13
|
+
${options.skipWarningThisIsGenerated
|
|
14
|
+
? ''
|
|
15
|
+
: `
|
|
16
|
+
// ${utils_1.generatedWarning}
|
|
17
|
+
`}
|
|
18
|
+
const locales: Locale[] = [${languages.map(({ id, title }) => `
|
|
19
|
+
{locale: '${id}', name: '${title}'},`).join('')}
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const i18nProvider: I18nProvider = ({
|
|
23
|
+
...polyglotI18nProvider(
|
|
24
|
+
locale => {
|
|
25
|
+
switch (locale) {${languages.filter(({ id }) => id !== defaultLanguage).map(({ id }) => `
|
|
26
|
+
case '${id}':
|
|
27
|
+
return import('../i18n/${id}')
|
|
28
|
+
.then(messages => {
|
|
29
|
+
initYupLocale(messages.default.validation as ValidationMessages);
|
|
30
|
+
|
|
31
|
+
return messages.default;
|
|
32
|
+
});`).join('')}
|
|
33
|
+
case '${defaultLanguage}':
|
|
34
|
+
initYupLocale(defaultMessages.validation as ValidationMessages);
|
|
35
|
+
|
|
36
|
+
return defaultMessages;
|
|
37
|
+
default:
|
|
38
|
+
log.error(\`Unknown locale: "\${locale}"\`);
|
|
39
|
+
|
|
40
|
+
initYupLocale(defaultMessages.validation as ValidationMessages);
|
|
41
|
+
|
|
42
|
+
return defaultMessages;
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
'${defaultLanguage}',
|
|
46
|
+
locales,
|
|
47
|
+
{allowMissing: true}, // turned off notifications about missing keys
|
|
48
|
+
),
|
|
49
|
+
locales,
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export default i18nProvider;
|
|
53
|
+
`;
|
|
22
54
|
exports.uiI18nProviderTmpl = uiI18nProviderTmpl;
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
55
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2dlbmVyYXRvcnMvZmlsZVRlbXBsYXRlcy91aS9lbnZpcm9ubWVudC9zcmMvaTE4blByb3ZpZGVyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLG1EQUdnQztBQUNoQyxtREFBMEQ7QUFFbkQsTUFBTSxrQkFBa0IsR0FBRyxDQUNoQyxFQUFFLE1BQU0sRUFBRSxFQUFFLGVBQWUsRUFBRSxTQUFTLEVBQUUsRUFBNkIsRUFDckUsVUFBa0MscUNBQTZCLEVBQy9ELEVBQUUsQ0FBQzs7dUNBRWtDLGVBQWU7Ozs7O0VBTXBELE9BQU8sQ0FBQywwQkFBMEI7SUFDaEMsQ0FBQyxDQUFDLEVBQUU7SUFDSixDQUFDLENBQUM7S0FDRCx3QkFBZ0I7Q0FFckI7NkJBQzZCLFNBQVMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxFQUFDLEVBQUUsRUFBRSxLQUFLLEVBQUMsRUFBRSxFQUFFLENBQUM7Y0FDOUMsRUFBRSxhQUFhLEtBQUssS0FBSyxDQUFDLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQzs7Ozs7O3lCQU14QixTQUFTLENBQUMsTUFBTSxDQUFDLENBQUMsRUFBQyxFQUFFLEVBQUMsRUFBRSxFQUFFLENBQUMsRUFBRSxLQUFLLGVBQWUsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLEVBQUMsRUFBRSxFQUFDLEVBQUUsRUFBRSxDQUFDO2dCQUMxRSxFQUFFO21DQUNpQixFQUFFOzs7OztnQkFLckIsQ0FBQyxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUM7Z0JBQ1YsZUFBZTs7Ozs7Ozs7Ozs7O09BWXhCLGVBQWU7Ozs7Ozs7O0NBUXJCLENBQUE7QUFwRFksUUFBQSxrQkFBa0Isc0JBb0Q5QiJ9
|
package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/layout/AppBar.js
CHANGED
|
@@ -1,13 +1,64 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.uiLayoutAppBarTmpl = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
const types_1 = require("../../../../../../types");
|
|
5
|
+
const utils_1 = require("../../../../../../utils");
|
|
6
|
+
const uiLayoutAppBarTmpl = (options = types_1.defaultBootstrapEntityOptions) => `import * as React from 'react';
|
|
7
|
+
import {AppBar as RaAppBar} from 'react-admin';
|
|
8
|
+
import {Box, Typography} from '@mui/material';
|
|
9
|
+
import {Link} from 'react-router-dom';
|
|
10
|
+
import UserMenu from './UserMenu/UserMenu';
|
|
11
|
+
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
12
|
+
import {Theme} from '@mui/system';
|
|
13
|
+
${options.skipWarningThisIsGenerated
|
|
14
|
+
? ''
|
|
15
|
+
: `
|
|
16
|
+
// ${utils_1.generatedWarning}
|
|
17
|
+
`}
|
|
18
|
+
const AppBar = (props: any) => {
|
|
19
|
+
const wide = useMediaQuery((theme: Theme) => theme.breakpoints.up('sm'));
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<RaAppBar
|
|
23
|
+
sx={{
|
|
24
|
+
'& .RaAppBar-title': {
|
|
25
|
+
flex: 1,
|
|
26
|
+
textOverflow: 'ellipsis',
|
|
27
|
+
whiteSpace: 'nowrap',
|
|
28
|
+
overflow: 'hidden',
|
|
29
|
+
},
|
|
30
|
+
}}
|
|
31
|
+
{...props}
|
|
32
|
+
elevation={1}
|
|
33
|
+
color='secondary'
|
|
34
|
+
userMenu={<UserMenu />}
|
|
35
|
+
>
|
|
36
|
+
<Typography
|
|
37
|
+
variant='h6'
|
|
38
|
+
color='inherit'
|
|
39
|
+
id='react-admin-title'
|
|
40
|
+
/>
|
|
41
|
+
<Box flex={1} />
|
|
42
|
+
{wide && (
|
|
43
|
+
<Typography
|
|
44
|
+
sx={{color: ${options.mainColorOfAppTitile ? `'primary.main'` : `'text.main'`}}}
|
|
45
|
+
color='inherit'
|
|
46
|
+
variant='h6'
|
|
47
|
+
>
|
|
48
|
+
<Link
|
|
49
|
+
to='/'
|
|
50
|
+
style={{textDecoration: 'none', color: 'inherit'}}
|
|
51
|
+
>
|
|
52
|
+
${options.projectName}
|
|
53
|
+
</Link>
|
|
54
|
+
</Typography>
|
|
55
|
+
)}
|
|
56
|
+
<Box flex={1} />
|
|
57
|
+
</RaAppBar>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export default AppBar;
|
|
62
|
+
`;
|
|
12
63
|
exports.uiLayoutAppBarTmpl = uiLayoutAppBarTmpl;
|
|
13
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
64
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXBwQmFyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3Byb2plY3RzR2VuZXJhdGlvbi9nZW5lcmF0b3JzL2ZpbGVUZW1wbGF0ZXMvdWkvZW52aXJvbm1lbnQvc3JjL2xheW91dC9BcHBCYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsbURBR2dDO0FBQ2hDLG1EQUEwRDtBQUVuRCxNQUFNLGtCQUFrQixHQUFHLENBQ2hDLFVBQWtDLHFDQUE2QixFQUMvRCxFQUFFLENBQUM7Ozs7Ozs7RUFRSCxPQUFPLENBQUMsMEJBQTBCO0lBQ2hDLENBQUMsQ0FBQyxFQUFFO0lBQ0osQ0FBQyxDQUFDO0tBQ0Qsd0JBQWdCO0NBRXJCOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7d0JBMkJ3QixPQUFPLENBQUMsb0JBQW9CLENBQUMsQ0FBQyxDQUFDLGdCQUFnQixDQUFDLENBQUMsQ0FBQyxhQUFhOzs7Ozs7OztjQVF6RSxPQUFPLENBQUMsV0FBVzs7Ozs7Ozs7OztDQVVoQyxDQUFBO0FBNURZLFFBQUEsa0JBQWtCLHNCQTREOUIifQ==
|
|
@@ -1,13 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.uiLayoutMenuTmpl = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
const types_1 = require("../../../../../../types");
|
|
5
|
+
const utils_1 = require("../../../../../../utils");
|
|
6
|
+
const uiLayoutMenuTmpl = (options = types_1.defaultBootstrapEntityOptions) => `import * as React from 'react';
|
|
7
|
+
import Box from '@mui/material/Box';
|
|
8
|
+
import {hasPermission} from '../utils/permissions';
|
|
9
|
+
import {
|
|
10
|
+
DashboardMenuItem,
|
|
11
|
+
useSidebarState,
|
|
12
|
+
usePermissions,
|
|
13
|
+
} from 'react-admin';
|
|
14
|
+
import getAdditionalMenu from '../adm/getAdditionalMenu';
|
|
15
|
+
import defaultMenu from '../adm/getDefaultMenu';
|
|
16
|
+
import MenuItem from '../uiLib/menu/MenuItem';
|
|
17
|
+
${options.skipWarningThisIsGenerated
|
|
18
|
+
? ''
|
|
19
|
+
: `
|
|
20
|
+
// ${utils_1.generatedWarning}
|
|
21
|
+
`}
|
|
22
|
+
const Menu = () => {
|
|
23
|
+
const [open] = useSidebarState();
|
|
24
|
+
const {permissions} = usePermissions<string[]>();
|
|
25
|
+
|
|
26
|
+
const menuData = [
|
|
27
|
+
...getAdditionalMenu(),
|
|
28
|
+
...defaultMenu(),
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<Box
|
|
33
|
+
sx={{
|
|
34
|
+
width: open ? undefined : 50,
|
|
35
|
+
marginTop: 1,
|
|
36
|
+
marginBottom: 1,
|
|
37
|
+
transition: theme =>
|
|
38
|
+
theme.transitions.create('width', {
|
|
39
|
+
easing: theme.transitions.easing.sharp,
|
|
40
|
+
duration: theme.transitions.duration.leavingScreen,
|
|
41
|
+
}),
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
44
|
+
{hasPermission(permissions, 'dashboards.main') && <DashboardMenuItem />}
|
|
45
|
+
{menuData.map((d, i) => (<MenuItem
|
|
46
|
+
key={i}
|
|
47
|
+
{...d}
|
|
48
|
+
/>))}
|
|
49
|
+
</Box>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default Menu;
|
|
54
|
+
`;
|
|
12
55
|
exports.uiLayoutMenuTmpl = uiLayoutMenuTmpl;
|
|
13
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWVudS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9wcm9qZWN0c0dlbmVyYXRpb24vZ2VuZXJhdG9ycy9maWxlVGVtcGxhdGVzL3VpL2Vudmlyb25tZW50L3NyYy9sYXlvdXQvTWVudS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxtREFHZ0M7QUFDaEMsbURBQTBEO0FBRW5ELE1BQU0sZ0JBQWdCLEdBQUcsQ0FDOUIsVUFBa0MscUNBQTZCLEVBQy9ELEVBQUUsQ0FBQzs7Ozs7Ozs7Ozs7RUFZSCxPQUFPLENBQUMsMEJBQTBCO0lBQ2hDLENBQUMsQ0FBQyxFQUFFO0lBQ0osQ0FBQyxDQUFDO0tBQ0Qsd0JBQWdCO0NBRXJCOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Q0FpQ0MsQ0FBQTtBQXBEWSxRQUFBLGdCQUFnQixvQkFvRDVCIn0=
|
|
@@ -1,12 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
const change_case_1 = require("change-case");
|
|
4
|
+
const utils_1 = require("../../../../../utils");
|
|
5
|
+
const uiRoutesTmpl = ({ system, options, }) => `import * as React from 'react';
|
|
6
|
+
import {
|
|
7
|
+
Route,
|
|
8
|
+
} from 'react-router-dom';
|
|
9
|
+
import Loadable from '../shared/Loadable';
|
|
10
|
+
import Guard from '../raUiLib/Guard';
|
|
11
|
+
import additionalRoutes from './additionalRoutes';
|
|
12
|
+
${options.skipWarningThisIsGenerated
|
|
13
|
+
? ''
|
|
14
|
+
: `
|
|
15
|
+
// ${utils_1.generatedWarning}
|
|
16
|
+
`}
|
|
17
|
+
const LoadableDashboard = Loadable(() => import('./Dashboard'));
|
|
18
|
+
const LoadableFunctions = Loadable(() => import('./functions/Functions'));
|
|
19
|
+
// const LoadableResourcesPage = Loadable(() => import('./ResourcesPage'));
|
|
20
|
+
const LoadableMetaPage = Loadable(() => import('./MetaPage'));
|
|
21
|
+
const LoadableDebugPage = Loadable(() => import('./utility/DebugPage'));
|
|
22
|
+
const LoadableErrorMessage = Loadable(() => import('./utility/ErrorMessage'));${system.pages.length ? `
|
|
23
|
+
${system.pages.map(p => `const Loadable${(0, change_case_1.pascalCase)(p.name)} = Loadable(() => import('./standalonePages/${(0, change_case_1.pascalCase)(p.name)}/${(0, change_case_1.pascalCase)(p.name)}'));`).join('\n')}` : ''}
|
|
24
|
+
|
|
25
|
+
export const routes = [
|
|
26
|
+
<Route element={<Guard shouldHave='dashboard'><LoadableDashboard /></Guard>} key='dashboard' path='/dashboard' />,
|
|
27
|
+
<Route element={<Guard shouldHave='functions'><LoadableFunctions /></Guard>} key='functions' path='/functions' />,
|
|
28
|
+
// <Route element={<Guard shouldHave='resources'><LoadableResourcesPage /></Guard>} key='resources' path='/resources' />,
|
|
29
|
+
<Route element={<Guard shouldHave='meta'><LoadableMetaPage /></Guard>} key='meta' path='/meta' />,
|
|
30
|
+
<Route element={<Guard shouldHave='debug'><LoadableDebugPage /></Guard>} key='debug' path='/debug' />,
|
|
31
|
+
<Route
|
|
32
|
+
element={<LoadableErrorMessage />}
|
|
33
|
+
key='errorMessage'
|
|
34
|
+
path='/errorMessage'
|
|
35
|
+
/>,
|
|
36
|
+
${system.pages.map(p => ` <Route element={<Loadable${(0, change_case_1.pascalCase)(p.name)} />} key='${p.name}' path='${p.link}' />,`).join('\n')}
|
|
37
|
+
...additionalRoutes,
|
|
38
|
+
];
|
|
39
|
+
`;
|
|
11
40
|
exports.default = uiRoutesTmpl;
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3Byb2plY3RzR2VuZXJhdGlvbi9nZW5lcmF0b3JzL2ZpbGVUZW1wbGF0ZXMvdWkvZW52aXJvbm1lbnQvc3JjL3JvdXRlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDZDQUF3QztBQUV4QyxnREFBdUQ7QUFFdkQsTUFBTSxZQUFZLEdBQUcsQ0FBQyxFQUNwQixNQUFNLEVBQ04sT0FBTyxHQUNtQixFQUFFLEVBQUUsQ0FBQzs7Ozs7OztFQVEvQixPQUFPLENBQUMsMEJBQTBCO0lBQ2hDLENBQUMsQ0FBQyxFQUFFO0lBQ0osQ0FBQyxDQUFDO0tBQ0Qsd0JBQWdCO0NBRXJCOzs7Ozs7Z0ZBTWdGLE1BQU0sQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztFQUNwRyxNQUFNLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLGlCQUFpQixJQUFBLHdCQUFVLEVBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQywrQ0FBK0MsSUFBQSx3QkFBVSxFQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxJQUFBLHdCQUFVLEVBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsRUFBRTs7Ozs7Ozs7Ozs7OztFQWF6SyxNQUFNLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLDhCQUE4QixJQUFBLHdCQUFVLEVBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQyxJQUFJLFdBQVcsQ0FBQyxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQzs7O0NBRzlILENBQUE7QUFFRCxrQkFBZSxZQUFZLENBQUEifQ==
|
|
@@ -1,13 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.uiFunctionsTmpl = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
const types_1 = require("../../../../types");
|
|
5
|
+
const utils_1 = require("../../../../utils");
|
|
6
|
+
const uiFunctionsTmpl = (options = types_1.defaultBootstrapEntityOptions) => {
|
|
7
|
+
return `import React, {
|
|
8
|
+
useCallback,
|
|
9
|
+
useState,
|
|
10
|
+
ChangeEvent,
|
|
11
|
+
} from 'react';
|
|
12
|
+
import {Typography, TextField, IconButton} from '@mui/material';
|
|
13
|
+
import SendIcon from '@mui/icons-material/SendOutlined';
|
|
14
|
+
import {
|
|
15
|
+
gql, useLazyQuery,
|
|
16
|
+
} from '@apollo/client';
|
|
17
|
+
${options.skipWarningThisIsGenerated
|
|
9
18
|
? ''
|
|
10
|
-
:
|
|
19
|
+
: `
|
|
20
|
+
// ${utils_1.generatedWarning}
|
|
21
|
+
`}
|
|
22
|
+
const HELLO = gql\`
|
|
23
|
+
query testHello($name: String!) {
|
|
24
|
+
testHello(name: $name)
|
|
25
|
+
}
|
|
26
|
+
\`;
|
|
27
|
+
|
|
28
|
+
export default () => {
|
|
29
|
+
const [name, setName] = useState('');
|
|
30
|
+
|
|
31
|
+
const onNameChange = useCallback(
|
|
32
|
+
(e: ChangeEvent<HTMLInputElement>) => {
|
|
33
|
+
setName(e.target.value);
|
|
34
|
+
},
|
|
35
|
+
[setName],
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
const [hello, {data}] = useLazyQuery(HELLO);
|
|
39
|
+
|
|
40
|
+
const onClick = useCallback(() => hello({variables: {name}}), [hello, name]);
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<div>
|
|
44
|
+
<div style={{height: '7em'}}>
|
|
45
|
+
<Typography >
|
|
46
|
+
Hello
|
|
47
|
+
</Typography>
|
|
48
|
+
<TextField
|
|
49
|
+
label='Name'
|
|
50
|
+
onChange={onNameChange}
|
|
51
|
+
value={name}
|
|
52
|
+
/>
|
|
53
|
+
<IconButton
|
|
54
|
+
onClick={onClick}
|
|
55
|
+
>
|
|
56
|
+
<SendIcon />
|
|
57
|
+
</IconButton>
|
|
58
|
+
data: {JSON.stringify(data, undefined, ' ')}
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
`;
|
|
11
64
|
};
|
|
12
65
|
exports.uiFunctionsTmpl = uiFunctionsTmpl;
|
|
13
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
66
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRnVuY3Rpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3Byb2plY3RzR2VuZXJhdGlvbi9nZW5lcmF0b3JzL2ZpbGVUZW1wbGF0ZXMvdWkvZnVuY3Rpb25zL0Z1bmN0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2Q0FHMEI7QUFDMUIsNkNBQW9EO0FBRTdDLE1BQU0sZUFBZSxHQUFHLENBQzdCLFVBQWtDLHFDQUE2QixFQUMvRCxFQUFFO0lBQ0YsT0FBTzs7Ozs7Ozs7OztFQVdQLE9BQU8sQ0FBQywwQkFBMEI7UUFDaEMsQ0FBQyxDQUFDLEVBQUU7UUFDSixDQUFDLENBQUM7S0FDRCx3QkFBZ0I7Q0FFckI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztDQTBDQyxDQUFBO0FBQ0QsQ0FBQyxDQUFBO0FBOURZLFFBQUEsZUFBZSxtQkE4RDNCIn0=
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.uiGetAdditionalMenuTmpl = void 0;
|
|
4
|
-
|
|
4
|
+
const uiGetAdditionalMenuTmpl = () => `import {MenuElement} from '../uiLib/menu/MenuItem';
|
|
5
|
+
|
|
6
|
+
const getAdditionalMenu = () => {
|
|
7
|
+
const menuData: MenuElement[] = [];
|
|
8
|
+
|
|
9
|
+
return menuData;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default getAdditionalMenu;
|
|
13
|
+
`;
|
|
5
14
|
exports.uiGetAdditionalMenuTmpl = uiGetAdditionalMenuTmpl;
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0QWRkaXRpb25hbE1lbnUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2dlbmVyYXRvcnMvZmlsZVRlbXBsYXRlcy91aS9nZXRBZGRpdGlvbmFsTWVudS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBTyxNQUFNLHVCQUF1QixHQUNsQyxHQUFHLEVBQUUsQ0FBQzs7Ozs7Ozs7O0NBU1AsQ0FBQTtBQVZZLFFBQUEsdUJBQXVCLDJCQVVuQyJ9
|