runlify 0.0.71 → 0.0.76
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/commands/start.js +7 -11
- package/build/documentation/algorithm.js +3 -0
- package/build/documentation/algoritmToDoc.js +24 -0
- package/build/documentation/algoritmToDoc.spec.js +56 -0
- package/build/documentation/curlExampleToText.js +36 -0
- package/build/documentation/curlExampleToText.spec.js +59 -0
- package/build/documentation/doc.js +4 -0
- package/build/documentation/docToFlatDoc.js +54 -0
- package/build/documentation/docToFlatDoc.spec.js +219 -0
- package/build/documentation/flatDoc.js +4 -0
- package/build/documentation/flatDocToText.js +17 -0
- package/build/documentation/flatDocToText.spec.js +69 -0
- package/build/documentation/templateDoc.js +4 -0
- package/build/documentation/templateDocToDoc.js +9 -0
- package/build/extensions/localConfig.js +2 -2
- package/build/log.js +15 -0
- package/build/projectsGeneration/args.js +79 -0
- package/build/projectsGeneration/builders/BaseBuilder.js +49 -0
- package/build/projectsGeneration/builders/BaseSavableEntityBuilder.js +251 -0
- package/build/projectsGeneration/builders/CatalogBuilder.js +88 -0
- package/build/projectsGeneration/builders/DocumentBuilder.js +108 -0
- package/build/projectsGeneration/builders/InfoRegistryBuilder.js +226 -0
- package/build/projectsGeneration/builders/ReportBuilder.js +40 -0
- package/build/projectsGeneration/builders/RestApiBuilder.js +53 -0
- package/build/projectsGeneration/builders/RestApiMethodBuilder.js +70 -0
- package/build/projectsGeneration/builders/RoleBuilder.js +38 -0
- package/build/projectsGeneration/builders/SumRegistryBuilder.js +216 -0
- package/build/projectsGeneration/builders/SystemMetaBuilder.js +338 -0
- package/build/projectsGeneration/builders/TelegramBotBuilder.js +36 -0
- package/build/projectsGeneration/builders/WorkerBuilder.js +60 -0
- package/build/projectsGeneration/builders/buildedTypes.js +12 -0
- package/build/projectsGeneration/builders/curlTypes.js +3 -0
- package/build/projectsGeneration/builders/docs/DocumentationOfDocument.js +3 -0
- package/build/projectsGeneration/builders/docs/DocumentationOfDocumentBuilder.js +20 -0
- package/build/projectsGeneration/builders/fields/BaseFieldBuilder.js +179 -0
- package/build/projectsGeneration/builders/fields/IdFieldBuilder.js +96 -0
- package/build/projectsGeneration/builders/fields/LinkFieldBuilder.js +92 -0
- package/build/projectsGeneration/builders/fields/ScalarFieldBuilder.js +65 -0
- package/build/projectsGeneration/builders/fields/ViewLinkFieldBuilder.js +91 -0
- package/build/projectsGeneration/builders/materialUiIcons.js +8882 -0
- package/build/projectsGeneration/builders/postponed/AccumulationRegisterMetaBuilder.js +34 -0
- package/build/projectsGeneration/builders/postponed/DictionaryMetaBuilder.js +28 -0
- package/build/projectsGeneration/builders/postponed/DocumentMetaBuilder.js +28 -0
- package/build/projectsGeneration/builders/postponed/EntityFormMetaBuilder.js +28 -0
- package/build/projectsGeneration/builders/postponed/InformationRegisterMetaBuilder.js +33 -0
- package/build/projectsGeneration/builders/postponed/ListFormMetaBuilder.js +28 -0
- package/build/projectsGeneration/builders/postponed/PeriodicInformationRegisterMetaBuilder.js +37 -0
- package/build/projectsGeneration/builders/postponed/ReportMetaBuilder.js +28 -0
- package/build/projectsGeneration/builders/postponed/RoleMetaBuilder.js +28 -0
- package/build/projectsGeneration/builders/tsFilterFields.js +39 -0
- package/build/projectsGeneration/builders/tsFilterFields.spec.js +26 -0
- package/build/projectsGeneration/builders/types.js +3 -0
- package/build/projectsGeneration/builders/ui/Forms.js +3 -0
- package/build/projectsGeneration/builders/ui/FormsBuilder.js +21 -0
- package/build/projectsGeneration/builders/ui/ListFormBuilder.js +21 -0
- package/build/projectsGeneration/builders/ui/ListFormFilterBuilder.js +28 -0
- package/build/projectsGeneration/builders/ui/ListFormFilterFieldBuilder.js +24 -0
- package/build/projectsGeneration/builders/utils/accessFunctions.js +12 -0
- package/build/projectsGeneration/defaultCatalogs/files.js +24 -0
- package/build/projectsGeneration/genGraphSchemesByLocalGenerator.js +78 -0
- package/build/projectsGeneration/generateEntity.js +342 -0
- package/build/projectsGeneration/generateEnvironment.js +238 -0
- package/build/projectsGeneration/generateProject.js +787 -0
- package/build/projectsGeneration/generators/fieldTypeToTsType.js +26 -0
- package/build/projectsGeneration/generators/fileTemplates/back/Entities.js +18 -0
- package/build/projectsGeneration/generators/fileTemplates/back/devEnum.js +17 -0
- package/build/projectsGeneration/generators/fileTemplates/back/enum.js +17 -0
- package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/Chart.js +12 -0
- package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/back.js +16 -0
- package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/ingress.js +12 -0
- package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/values.js +20 -0
- package/build/projectsGeneration/generators/fileTemplates/back/environment/defaultEnv.js +13 -0
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsConfiguration.js +24 -0
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsEntity.js +9 -0
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsRestApi.js +33 -0
- package/build/projectsGeneration/generators/fileTemplates/back/environment/gitlabCi.js +46 -0
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/clients/getPrisma.js +13 -0
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/clients/knex.js +13 -0
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/clients/queue/getQueue.js +13 -0
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/index.js +13 -0
- package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalResolvers.js +6 -0
- package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalTypes.js +6 -0
- package/build/projectsGeneration/generators/fileTemplates/back/graph/entityAdditionalPermissionToGraphqlTmpl.js +13 -0
- package/build/projectsGeneration/generators/fileTemplates/back/graph/entityBasePermissionToGraphql.js +14 -0
- package/build/projectsGeneration/generators/fileTemplates/back/graph/entityPermissionToGraphqlTmpl.js +13 -0
- package/build/projectsGeneration/generators/fileTemplates/back/graph/help/baseResolvers.js +5 -0
- package/build/projectsGeneration/generators/fileTemplates/back/graph/help/baseTypeDefs.js +8 -0
- package/build/projectsGeneration/generators/fileTemplates/back/graph/help/permissionsToGraphql.js +5 -0
- package/build/projectsGeneration/generators/fileTemplates/back/graph/meta/resolvers.js +6 -0
- package/build/projectsGeneration/generators/fileTemplates/back/graph/meta/typeDefs.js +6 -0
- package/build/projectsGeneration/generators/fileTemplates/back/graph/permissionsToGraphql.js +17 -0
- package/build/projectsGeneration/generators/fileTemplates/back/graph/resolvers.js +17 -0
- package/build/projectsGeneration/generators/fileTemplates/back/graph/types.js +13 -0
- package/build/projectsGeneration/generators/fileTemplates/back/initCommon.js +31 -0
- package/build/projectsGeneration/generators/fileTemplates/back/initDev.js +23 -0
- package/build/projectsGeneration/generators/fileTemplates/back/initEntities.js +17 -0
- package/build/projectsGeneration/generators/fileTemplates/back/root/config.js +15 -0
- package/build/projectsGeneration/generators/fileTemplates/back/root/restRouter.js +6 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/AdditionalServices.js +6 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/BaseServices.js +15 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/HelpService/HelpService.js +10 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/additionalMethods.js +10 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnCreate.js +10 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnDelete.js +11 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnUpdate.js +11 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterCreate.js +11 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterDelete.js +11 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterUpdate.js +11 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeCreate.js +11 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeDelete.js +11 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeUpdate.js +11 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeUpsert.js +12 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/changeListFilter.js +11 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/getPostOperations.js +51 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/getRegistryEntries.js +11 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/getUnPostOperations.js +17 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/tenantIdRequiredHooks.js +18 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/initBuiltInHooks.js +17 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/initUserHooks.js +10 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/service.js +144 -0
- package/build/projectsGeneration/generators/fileTemplates/back/services/serviceConstrictors.js +15 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/Dashboard.js +5 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/MetaPage.js +8 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/ResourcesPage.js +17 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/additionalRoutes.js +6 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/entityMapping.js +16 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/Chart.js +12 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/front.js +17 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/ingress.js +12 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/values.js +12 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/docs/adminAppDocsConfiguration.js +26 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/gitlabCi.js +33 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/App.js +14 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/contexts/SpacesContext.js +13 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/dataProvider/index.js +17 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/layout/AppBar.js +13 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/layout/Menu.js +13 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/routes.js +11 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/functions/Functions.js +13 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/getAdditionalMenu.js +6 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/getDefaultMenu.js +23 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangCatalogsTmpl.js +9 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangDocsTmpl.js +9 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangInfoRegistriesTmpl.js +9 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangReportsTmpl.js +7 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangSumRegistriesTmpl.js +9 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiTranslationsForServicesOfSavablesTmpl.js +23 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiTranslationsLangTmpl.js +17 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityCreate/DefaultEntityCreate.js +80 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityCreate/index.js +10 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityEdit/DefaultEntityEdit.js +141 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityEdit/index.js +10 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/DefaultEntityFilter.js +52 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/DefaultEntityList.js +63 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/EntityFilter.js +10 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/index.js +10 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultActions.js +23 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultEntityShow.js +39 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultMainTab.js +39 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DependencyTab.js +55 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/MainTab.js +6 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/additionalTabs.js +8 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/index.js +10 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/Icon.js +12 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/getEntityValidation.js +57 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/resources.js +11 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/widgets/count/CountWidget.js +13 -0
- package/build/projectsGeneration/generators/fileTemplates/ui/widgets/list/ListWidget.js +18 -0
- package/build/projectsGeneration/generators/graph/fieldTypeToGraphScalar.js +27 -0
- package/build/projectsGeneration/generators/graph/fields/genGraphField.js +21 -0
- package/build/projectsGeneration/generators/graph/fields/genGraphIdField.js +16 -0
- package/build/projectsGeneration/generators/graph/fields/genGraphIdFieldType.js +20 -0
- package/build/projectsGeneration/generators/graph/fields/genGraphLinkField.js +35 -0
- package/build/projectsGeneration/generators/graph/fields/genGraphScalarField.js +28 -0
- package/build/projectsGeneration/generators/graph/filters/genGraphField.js +21 -0
- package/build/projectsGeneration/generators/graph/filters/genGraphIdFilter.js +25 -0
- package/build/projectsGeneration/generators/graph/filters/genGraphLinkFilter.js +18 -0
- package/build/projectsGeneration/generators/graph/filters/genGraphScalarFilter.js +42 -0
- package/build/projectsGeneration/generators/graph/genGraphCrudSchema.js +103 -0
- package/build/projectsGeneration/generators/graph/genGraphCrudSchema.spec.js +84 -0
- package/build/projectsGeneration/generators/graph/genGraphFilterType.js +29 -0
- package/build/projectsGeneration/generators/graph/genGraphFilterType.spec.js +32 -0
- package/build/projectsGeneration/generators/graph/genGraphType.js +27 -0
- package/build/projectsGeneration/generators/graph/genGraphType.spec.js +25 -0
- package/build/projectsGeneration/generators/graph/printGraphType.js +11 -0
- package/build/projectsGeneration/generators/graph/printGraphType.spec.js +18 -0
- package/build/projectsGeneration/generators/prisma/fieldIdTypeToPrismaType.js +17 -0
- package/build/projectsGeneration/generators/prisma/fieldTypeToPrismaType.js +25 -0
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaDefault.js +11 -0
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaDefault.spec.js +57 -0
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaField.js +21 -0
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaFieldFromExternalEntity.js +12 -0
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaFieldFromExternalEntity.spec.js +34 -0
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaIdField.js +19 -0
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaIdField.spec.js +45 -0
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaLinkFields.js +32 -0
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaLinkFields.spec.js +83 -0
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaScalarField.js +24 -0
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaScalarField.spec.js +117 -0
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaEntity.js +32 -0
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaEntity.spec.js +93 -0
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntities.js +14 -0
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntitiesWithClientAdnDb.js +11 -0
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNameToEditScalar.js +25 -0
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditField.js +21 -0
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditIdField.js +9 -0
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditLinkField.js +15 -0
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditLinkField.spec.js +21 -0
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditScalarField.js +9 -0
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNameToShowScalar.js +25 -0
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowField.js +21 -0
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowIdField.js +9 -0
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowLinkField.js +17 -0
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowLinkField.spec.js +152 -0
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowScalarField.js +9 -0
- package/build/projectsGeneration/generators/ui/componentNames/types.js +3 -0
- package/build/projectsGeneration/generators/ui/getLinkShowComponent.spec.js +39 -0
- package/build/projectsGeneration/generators/ui/getScalarShowComponent.spec.js +24 -0
- package/build/projectsGeneration/generators/ui/getShowComponent.js +45 -0
- package/build/projectsGeneration/links/getLinksFromExternalEntities.js +8 -0
- package/build/projectsGeneration/links/getLinksFromExternalEntities.spec.js +83 -0
- package/build/projectsGeneration/links/getLinksOfEntities.js +22 -0
- package/build/projectsGeneration/links/getLinksOfEntities.spec.js +188 -0
- package/build/projectsGeneration/links/getLinksToExternalEntities.js +8 -0
- package/build/projectsGeneration/links/getLinksToExternalEntities.spec.js +83 -0
- package/build/projectsGeneration/metaUtils.js +36 -0
- package/build/projectsGeneration/modelsGeneration.serialization.spec.js +93 -0
- package/build/projectsGeneration/types.js +80 -0
- package/build/projectsGeneration/utils.js +85 -0
- package/build/types/documentation/algorithm.d.ts +8 -0
- package/build/types/documentation/algoritmToDoc.d.ts +4 -0
- package/build/types/documentation/algoritmToDoc.spec.d.ts +1 -0
- package/build/types/documentation/curlExampleToText.d.ts +3 -0
- package/build/types/documentation/curlExampleToText.spec.d.ts +1 -0
- package/build/types/documentation/doc.d.ts +21 -0
- package/build/types/documentation/docToFlatDoc.d.ts +4 -0
- package/build/types/documentation/docToFlatDoc.spec.d.ts +1 -0
- package/build/types/documentation/flatDoc.d.ts +20 -0
- package/build/types/documentation/flatDocToText.d.ts +3 -0
- package/build/types/documentation/flatDocToText.spec.d.ts +1 -0
- package/build/types/documentation/templateDoc.d.ts +9 -0
- package/build/types/documentation/templateDocToDoc.d.ts +4 -0
- package/build/types/log.d.ts +3 -0
- package/build/types/projectsGeneration/args.d.ts +20 -0
- package/build/types/projectsGeneration/builders/BaseBuilder.d.ts +14 -0
- package/build/types/projectsGeneration/builders/BaseSavableEntityBuilder.d.ts +58 -0
- package/build/types/projectsGeneration/builders/CatalogBuilder.d.ts +8 -0
- package/build/types/projectsGeneration/builders/DocumentBuilder.d.ts +12 -0
- package/build/types/projectsGeneration/builders/InfoRegistryBuilder.d.ts +34 -0
- package/build/types/projectsGeneration/builders/ReportBuilder.d.ts +8 -0
- package/build/types/projectsGeneration/builders/RestApiBuilder.d.ts +12 -0
- package/build/types/projectsGeneration/builders/RestApiMethodBuilder.d.ts +20 -0
- package/build/types/projectsGeneration/builders/RoleBuilder.d.ts +8 -0
- package/build/types/projectsGeneration/builders/SumRegistryBuilder.d.ts +32 -0
- package/build/types/projectsGeneration/builders/SystemMetaBuilder.d.ts +64 -0
- package/build/types/projectsGeneration/builders/TelegramBotBuilder.d.ts +7 -0
- package/build/types/projectsGeneration/builders/WorkerBuilder.d.ts +11 -0
- package/build/types/projectsGeneration/builders/buildedTypes.d.ts +255 -0
- package/build/types/projectsGeneration/builders/curlTypes.d.ts +24 -0
- package/build/types/projectsGeneration/builders/docs/DocumentationOfDocument.d.ts +10 -0
- package/build/types/projectsGeneration/builders/docs/DocumentationOfDocumentBuilder.d.ts +9 -0
- package/build/types/projectsGeneration/builders/fields/BaseFieldBuilder.d.ts +48 -0
- package/build/types/projectsGeneration/builders/fields/IdFieldBuilder.d.ts +12 -0
- package/build/types/projectsGeneration/builders/fields/LinkFieldBuilder.d.ts +13 -0
- package/build/types/projectsGeneration/builders/fields/ScalarFieldBuilder.d.ts +5 -0
- package/build/types/projectsGeneration/builders/fields/ViewLinkFieldBuilder.d.ts +13 -0
- package/build/types/projectsGeneration/builders/materialUiIcons.d.ts +2 -0
- package/build/types/projectsGeneration/builders/postponed/AccumulationRegisterMetaBuilder.d.ts +3 -0
- package/build/types/projectsGeneration/builders/postponed/DictionaryMetaBuilder.d.ts +3 -0
- package/build/types/projectsGeneration/builders/postponed/DocumentMetaBuilder.d.ts +3 -0
- package/build/types/projectsGeneration/builders/postponed/EntityFormMetaBuilder.d.ts +3 -0
- package/build/types/projectsGeneration/builders/postponed/InformationRegisterMetaBuilder.d.ts +3 -0
- package/build/types/projectsGeneration/builders/postponed/ListFormMetaBuilder.d.ts +3 -0
- package/build/types/projectsGeneration/builders/postponed/PeriodicInformationRegisterMetaBuilder.d.ts +3 -0
- package/build/types/projectsGeneration/builders/postponed/ReportMetaBuilder.d.ts +3 -0
- package/build/types/projectsGeneration/builders/postponed/RoleMetaBuilder.d.ts +3 -0
- package/build/types/projectsGeneration/builders/tsFilterFields.d.ts +2 -0
- package/build/types/projectsGeneration/builders/tsFilterFields.spec.d.ts +1 -0
- package/build/types/projectsGeneration/builders/types.d.ts +5 -0
- package/build/types/projectsGeneration/builders/ui/Forms.d.ts +14 -0
- package/build/types/projectsGeneration/builders/ui/FormsBuilder.d.ts +10 -0
- package/build/types/projectsGeneration/builders/ui/ListFormBuilder.d.ts +10 -0
- package/build/types/projectsGeneration/builders/ui/ListFormFilterBuilder.d.ts +10 -0
- package/build/types/projectsGeneration/builders/ui/ListFormFilterFieldBuilder.d.ts +11 -0
- package/build/types/projectsGeneration/builders/utils/accessFunctions.d.ts +2 -0
- package/build/types/projectsGeneration/defaultCatalogs/files.d.ts +4 -0
- package/build/types/projectsGeneration/genGraphSchemesByLocalGenerator.d.ts +2 -0
- package/build/types/projectsGeneration/generateEntity.d.ts +2 -0
- package/build/types/projectsGeneration/generateEnvironment.d.ts +2 -0
- package/build/types/projectsGeneration/generateProject.d.ts +33 -0
- package/build/types/projectsGeneration/generators/fieldTypeToTsType.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/Entities.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/devEnum.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/enum.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/chart/Chart.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/back.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/ingress.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/chart/values.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/defaultEnv.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsConfiguration.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsEntity.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsRestApi.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/gitlabCi.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/src/clients/getPrisma.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/src/clients/knex.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/src/clients/queue/getQueue.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/src/index.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/graph/additionalResolvers.d.ts +1 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/graph/additionalTypes.d.ts +1 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/graph/entityAdditionalPermissionToGraphqlTmpl.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/graph/entityBasePermissionToGraphql.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/graph/entityPermissionToGraphqlTmpl.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/graph/help/baseResolvers.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/graph/help/baseTypeDefs.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/graph/help/permissionsToGraphql.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/graph/meta/resolvers.d.ts +1 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/graph/meta/typeDefs.d.ts +1 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/graph/permissionsToGraphql.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/graph/resolvers.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/graph/types.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/initCommon.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/initDev.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/initEntities.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/root/config.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/root/restRouter.d.ts +1 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/AdditionalServices.d.ts +1 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/BaseServices.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/HelpService/HelpService.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/additionalMethods.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnCreate.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnDelete.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnUpdate.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterCreate.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterDelete.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterUpdate.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeCreate.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeDelete.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeUpdate.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeUpsert.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/changeListFilter.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/getPostOperations.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/getRegistryEntries.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/getUnPostOperations.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/tenantIdRequiredHooks.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/initBuiltInHooks.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/initUserHooks.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/service.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/serviceConstrictors.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/Dashboard.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/MetaPage.d.ts +1 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/ResourcesPage.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/additionalRoutes.d.ts +1 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/entityMapping.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/chart/Chart.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/front.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/ingress.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/chart/values.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/docs/adminAppDocsConfiguration.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/gitlabCi.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/src/App.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/src/contexts/SpacesContext.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/src/dataProvider/index.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/src/layout/AppBar.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/src/layout/Menu.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/src/routes.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/functions/Functions.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/getAdditionalMenu.d.ts +1 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/getDefaultMenu.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangCatalogsTmpl.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangDocsTmpl.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangInfoRegistriesTmpl.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangReportsTmpl.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangSumRegistriesTmpl.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiTranslationsForServicesOfSavablesTmpl.d.ts +4 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiTranslationsLangTmpl.d.ts +6 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityCreate/DefaultEntityCreate.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityCreate/index.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityEdit/DefaultEntityEdit.d.ts +6 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityEdit/index.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/DefaultEntityFilter.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/DefaultEntityList.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/EntityFilter.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/index.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultActions.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultEntityShow.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultMainTab.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DependencyTab.d.ts +3 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/MainTab.d.ts +1 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/additionalTabs.d.ts +1 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/index.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/Icon.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/pages/getEntityValidation.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/resources.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/widgets/count/CountWidget.d.ts +2 -0
- package/build/types/projectsGeneration/generators/fileTemplates/ui/widgets/list/ListWidget.d.ts +2 -0
- package/build/types/projectsGeneration/generators/graph/fieldTypeToGraphScalar.d.ts +2 -0
- package/build/types/projectsGeneration/generators/graph/fields/genGraphField.d.ts +7 -0
- package/build/types/projectsGeneration/generators/graph/fields/genGraphIdField.d.ts +8 -0
- package/build/types/projectsGeneration/generators/graph/fields/genGraphIdFieldType.d.ts +2 -0
- package/build/types/projectsGeneration/generators/graph/fields/genGraphLinkField.d.ts +8 -0
- package/build/types/projectsGeneration/generators/graph/fields/genGraphScalarField.d.ts +8 -0
- package/build/types/projectsGeneration/generators/graph/filters/genGraphField.d.ts +4 -0
- package/build/types/projectsGeneration/generators/graph/filters/genGraphIdFilter.d.ts +8 -0
- package/build/types/projectsGeneration/generators/graph/filters/genGraphLinkFilter.d.ts +5 -0
- package/build/types/projectsGeneration/generators/graph/filters/genGraphScalarFilter.d.ts +5 -0
- package/build/types/projectsGeneration/generators/graph/genGraphCrudSchema.d.ts +3 -0
- package/build/types/projectsGeneration/generators/graph/genGraphCrudSchema.spec.d.ts +1 -0
- package/build/types/projectsGeneration/generators/graph/genGraphFilterType.d.ts +3 -0
- package/build/types/projectsGeneration/generators/graph/genGraphFilterType.spec.d.ts +1 -0
- package/build/types/projectsGeneration/generators/graph/genGraphType.d.ts +3 -0
- package/build/types/projectsGeneration/generators/graph/genGraphType.spec.d.ts +1 -0
- package/build/types/projectsGeneration/generators/graph/printGraphType.d.ts +2 -0
- package/build/types/projectsGeneration/generators/graph/printGraphType.spec.d.ts +1 -0
- package/build/types/projectsGeneration/generators/prisma/fieldIdTypeToPrismaType.d.ts +2 -0
- package/build/types/projectsGeneration/generators/prisma/fieldTypeToPrismaType.d.ts +2 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/fields/genPrismaDefault.d.ts +2 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/fields/genPrismaDefault.spec.d.ts +1 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/fields/genPrismaField.d.ts +2 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/fields/genPrismaFieldFromExternalEntity.d.ts +2 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/fields/genPrismaFieldFromExternalEntity.spec.d.ts +1 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/fields/genPrismaIdField.d.ts +2 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/fields/genPrismaIdField.spec.d.ts +1 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/fields/genPrismaLinkFields.d.ts +2 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/fields/genPrismaLinkFields.spec.d.ts +1 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/fields/genPrismaScalarField.d.ts +3 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/fields/genPrismaScalarField.spec.d.ts +1 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/genPrismaEntity.d.ts +3 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/genPrismaEntity.spec.d.ts +1 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntities.d.ts +3 -0
- package/build/types/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntitiesWithClientAdnDb.d.ts +2 -0
- package/build/types/projectsGeneration/generators/ui/componentNames/edit/getCompNameToEditScalar.d.ts +3 -0
- package/build/types/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditField.d.ts +3 -0
- package/build/types/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditIdField.d.ts +3 -0
- package/build/types/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditLinkField.d.ts +3 -0
- package/build/types/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditLinkField.spec.d.ts +1 -0
- package/build/types/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditScalarField.d.ts +3 -0
- package/build/types/projectsGeneration/generators/ui/componentNames/show/getCompNameToShowScalar.d.ts +3 -0
- package/build/types/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowField.d.ts +3 -0
- package/build/types/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowIdField.d.ts +3 -0
- package/build/types/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowLinkField.d.ts +3 -0
- package/build/types/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowLinkField.spec.d.ts +1 -0
- package/build/types/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowScalarField.d.ts +3 -0
- package/build/types/projectsGeneration/generators/ui/componentNames/types.d.ts +4 -0
- package/build/types/projectsGeneration/generators/ui/getLinkShowComponent.spec.d.ts +1 -0
- package/build/types/projectsGeneration/generators/ui/getScalarShowComponent.spec.d.ts +1 -0
- package/build/types/projectsGeneration/generators/ui/getShowComponent.d.ts +6 -0
- package/build/types/projectsGeneration/links/getLinksFromExternalEntities.d.ts +3 -0
- package/build/types/projectsGeneration/links/getLinksFromExternalEntities.spec.d.ts +1 -0
- package/build/types/projectsGeneration/links/getLinksOfEntities.d.ts +3 -0
- package/build/types/projectsGeneration/links/getLinksOfEntities.spec.d.ts +1 -0
- package/build/types/projectsGeneration/links/getLinksToExternalEntities.d.ts +3 -0
- package/build/types/projectsGeneration/links/getLinksToExternalEntities.spec.d.ts +1 -0
- package/build/types/projectsGeneration/metaUtils.d.ts +6 -0
- package/build/types/projectsGeneration/modelsGeneration.serialization.spec.d.ts +1 -0
- package/build/types/projectsGeneration/types.d.ts +92 -0
- package/build/types/projectsGeneration/utils.d.ts +14 -0
- package/build/types/types.d.ts +4 -0
- package/build/types/utils/TermSignals.d.ts +1 -0
- package/build/types/utils/cases.d.ts +9 -0
- package/build/types.js +3 -2
- package/build/utils/cases.js +30 -0
- package/package.json +11 -3
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prismaServiceTmpl = void 0;
|
|
4
|
+
/* eslint-disable max-len */
|
|
5
|
+
var fieldTypeToTsType_1 = require("../../../../fieldTypeToTsType");
|
|
6
|
+
var cases_1 = require("../../../../../../utils/cases");
|
|
7
|
+
var utils_1 = require("../../../../../utils");
|
|
8
|
+
var metaUtils_1 = require("../../../../../metaUtils");
|
|
9
|
+
var change_case_1 = require("change-case");
|
|
10
|
+
var autogeneratedStringId = function (entity) {
|
|
11
|
+
return (0, metaUtils_1.getKeyField)(entity).autoGenerated && (0, metaUtils_1.getKeyField)(entity).type === 'string';
|
|
12
|
+
};
|
|
13
|
+
var prismaServiceTmpl = function (_a) {
|
|
14
|
+
var entity = _a.entity, options = _a.options;
|
|
15
|
+
var contextName = 'Context';
|
|
16
|
+
var forbiddenForUserFields = entity.fields.filter(function (f) { return !f.updatableByUser && f.name !== 'search'; });
|
|
17
|
+
var requiredForDbButNotForUserFields = entity.fields.filter(function (f) { return f.required && !f.requiredOnInput && f.name !== 'id'; });
|
|
18
|
+
// const notRequiredOnInputFields: ScalarField[] = entity.fields.filter(f => ['scalar', 'link'].includes(f.category) && !f.requiredOnInput && f.name !== 'search') as ScalarField[];
|
|
19
|
+
// const notRequiredOnInputFields: ScalarField[] = entity.fields.filter(f => f.category === 'scalar' && !f.updatableByUser) as ScalarField[];
|
|
20
|
+
var getDefaultableFields = function () {
|
|
21
|
+
return entity.fields
|
|
22
|
+
.filter(function (f) { return f.defaultBackendValueExpression; })
|
|
23
|
+
.filter(function (f) { return !f.hidden; });
|
|
24
|
+
};
|
|
25
|
+
var getDefaultValues = function () {
|
|
26
|
+
return getDefaultableFields().map(function (f) { return "".concat(f.name, ": ").concat(f.defaultBackendValueExpression); });
|
|
27
|
+
};
|
|
28
|
+
var searchableFields = entity.fields.filter(function (f) { return f.searchable; });
|
|
29
|
+
var dateFields = searchableFields.filter(function (f) {
|
|
30
|
+
return ['date', 'datetime'].includes(f.type);
|
|
31
|
+
});
|
|
32
|
+
var notDateFields = searchableFields.filter(function (f) { return !['date', 'datetime'].includes(f.type); });
|
|
33
|
+
var getDefaultValuesWithSearchJoined = function (initialObjectName) {
|
|
34
|
+
var defaultValues = getDefaultValues();
|
|
35
|
+
if (['catalog', 'document'].includes(entity.type)) {
|
|
36
|
+
defaultValues.push("search: getSearchString(".concat(initialObjectName, ")"));
|
|
37
|
+
}
|
|
38
|
+
return defaultValues.map(utils_1.addComma).join('\n');
|
|
39
|
+
};
|
|
40
|
+
return "import {\n ListMetadata,\n MutationCreate".concat((0, cases_1.pascalSingular)(entity.name), "Args,\n MutationUpdate").concat((0, cases_1.pascalSingular)(entity.name), "Args,\n MutationRemove").concat((0, cases_1.pascalSingular)(entity.name), "Args,\n QueryAll").concat((0, cases_1.pascalPlural)(entity.name), "Args,\n Query_All").concat((0, cases_1.pascalPlural)(entity.name), "MetaArgs,\n ").concat((0, cases_1.pascalSingular)(entity.name), ",\n ").concat((0, cases_1.pascalSingular)(entity.name), "Filter,\n} from '../../../generated/graphql';\nimport {toPrismaRequest} from '../../../utils/prisma/toPrismaRequest';\nimport {").concat(contextName, "} from '../types';").concat(entity.type === 'document'
|
|
41
|
+
? "\nimport {Prisma, PrismaPromise} from '@prisma/client';"
|
|
42
|
+
: "\nimport {Prisma} from '@prisma/client';", "\nimport {Additional").concat((0, cases_1.pascalPlural)(entity.name), "Methods, getAdditionalMethods} from './additionalMethods';\nimport initUserHooks from './initUserHooks';\nimport initBuiltInHooks from './initBuiltInHooks';\nimport {getHooksUtils, HooksAddType} from '../getHooksUtils';\nimport * as R from 'ramda';").concat(autogeneratedStringId(entity)
|
|
43
|
+
? "\nimport {v4 as uuidv4} from 'uuid';"
|
|
44
|
+
: '').concat(entity.type === 'document'
|
|
45
|
+
? "\nimport {getUnPostOperations} from './hooks/getUnPostOperations';\nimport {".concat((0, cases_1.pascalSingular)(entity.name), "RegistryEntries, getPostOperations} from './hooks/getPostOperations';\nimport {getRegistryEntries} from './hooks/getRegistryEntries';")
|
|
46
|
+
: '').concat(entity.auditable
|
|
47
|
+
? "\nimport Entity from '../../../types/Entity';"
|
|
48
|
+
: '').concat(entity.externalSearch
|
|
49
|
+
? "\nimport {toElasticRequest} from '../../../utils/toElasticRequest';"
|
|
50
|
+
: "\nimport {toPrismaTotalRequest} from '../../../utils/prisma/toPrismaTotalRequest';", "\nimport {DefinedFieldsInRecord, DefinedRecord, PartialFieldsInRecord} from '../../../types/utils';\nimport getSearchStringCreator from '../utils/getSearchStringCreator';\n").concat(options.skipWarningThisIsGenerated
|
|
51
|
+
? ''
|
|
52
|
+
: "\n// ".concat(utils_1.generatedWarning, "\n"), "\nconst forbiddenForUserFields: string[] = ").concat(forbiddenForUserFields.length > 0
|
|
53
|
+
? "[\n".concat((0, utils_1.pad1)(forbiddenForUserFields.map(function (f) { return "'".concat(f.name, "',"); }).join('\n')), "\n];")
|
|
54
|
+
: '[];', "\n").concat(entity.type === 'infoRegistry' && entity.period !== 'notPeriodic'
|
|
55
|
+
? "\nexport type Slice".concat((0, cases_1.pascalPlural)(entity.name), "Filter = QueryAll").concat((0, cases_1.pascalPlural)(entity.name), "Args['filter'];\n")
|
|
56
|
+
: '', "\nexport type Autodefinable").concat((0, cases_1.pascalSingular)(entity.name), "Keys = ").concat(getDefaultableFields().length > 0
|
|
57
|
+
? "".concat(getDefaultableFields()
|
|
58
|
+
.map(function (f) { return "'".concat(f.name, "'"); })
|
|
59
|
+
.join(' | '))
|
|
60
|
+
: 'never', ";\nexport type ForbidenForUser").concat((0, cases_1.pascalSingular)(entity.name), "Keys = ").concat(forbiddenForUserFields.length > 0
|
|
61
|
+
? "".concat(forbiddenForUserFields.map(function (f) { return "'".concat(f.name, "'"); }).join(' | '))
|
|
62
|
+
: 'never', ";\nexport type RequiredDbNotUser").concat((0, cases_1.pascalSingular)(entity.name), "Keys = ").concat(requiredForDbButNotForUserFields.length > 0
|
|
63
|
+
? "".concat(requiredForDbButNotForUserFields
|
|
64
|
+
.map(function (f) { return "'".concat(f.name, "'"); })
|
|
65
|
+
.join(' | '))
|
|
66
|
+
: 'never', ";\n\nexport type Autodefinable").concat((0, cases_1.pascalSingular)(entity.name), "Part = DefinedRecord<Pick<MutationCreate").concat((0, cases_1.pascalSingular)(entity.name), "Args, Autodefinable").concat((0, cases_1.pascalSingular)(entity.name), "Keys>>;\n\nexport type Reliable").concat((0, cases_1.pascalSingular)(entity.name), "CreateUserInput =\n Omit<MutationCreate").concat((0, cases_1.pascalSingular)(entity.name), "Args, ForbidenForUser").concat((0, cases_1.pascalSingular)(entity.name), "Keys>\n & Autodefinable").concat((0, cases_1.pascalSingular)(entity.name), "Part;\n\nexport type Allowed").concat((0, cases_1.pascalSingular)(entity.name), "ForUserCreateInput = Omit<MutationCreate").concat((0, cases_1.pascalSingular)(entity.name), "Args, ForbidenForUser").concat((0, cases_1.pascalSingular)(entity.name), "Keys>;\n\nexport type StrictCreate").concat((0, cases_1.pascalSingular)(entity.name), "Args = DefinedFieldsInRecord<MutationCreate").concat((0, cases_1.pascalSingular)(entity.name), "Args, RequiredDbNotUser").concat((0, cases_1.pascalSingular)(entity.name), "Keys> & Autodefinable").concat((0, cases_1.pascalSingular)(entity.name), "Part;\nexport type StrictUpdate").concat((0, cases_1.pascalSingular)(entity.name), "Args = DefinedFieldsInRecord<MutationUpdate").concat((0, cases_1.pascalSingular)(entity.name), "Args, RequiredDbNotUser").concat((0, cases_1.pascalSingular)(entity.name), "Keys> & Autodefinable").concat((0, cases_1.pascalSingular)(entity.name), "Part;\n\nexport type StrictCreate").concat((0, cases_1.pascalSingular)(entity.name), "ArgsWithoutAutodefinable = PartialFieldsInRecord<StrictCreate").concat((0, cases_1.pascalSingular)(entity.name), "Args, Autodefinable").concat((0, cases_1.pascalSingular)(entity.name), "Keys>;\nexport type MutationCreate").concat((0, cases_1.pascalSingular)(entity.name), "ArgsWithoutAutodefinable = PartialFieldsInRecord<MutationCreate").concat((0, cases_1.pascalSingular)(entity.name), "Args, Autodefinable").concat((0, cases_1.pascalSingular)(entity.name), "Keys>;\nexport type MutationUpdate").concat((0, cases_1.pascalSingular)(entity.name), "ArgsWithoutAutodefinable = PartialFieldsInRecord<MutationUpdate").concat((0, cases_1.pascalSingular)(entity.name), "Args, Autodefinable").concat((0, cases_1.pascalSingular)(entity.name), "Keys>;\n\nexport interface Base").concat((0, cases_1.pascalPlural)(entity.name), "Methods {\n get: (id: ").concat((0, fieldTypeToTsType_1.fieldTypeToTsType)((0, metaUtils_1.getKeyField)(entity).type), ") =>\n Promise<").concat((0, cases_1.pascalSingular)(entity.name), " | null>;\n getRequired: (id: ").concat((0, fieldTypeToTsType_1.fieldTypeToTsType)((0, metaUtils_1.getKeyField)(entity).type), ") =>\n Promise<").concat((0, cases_1.pascalSingular)(entity.name), ">;\n all: (params?: QueryAll").concat((0, cases_1.pascalPlural)(entity.name), "Args) =>\n Promise<").concat((0, cases_1.pascalSingular)(entity.name), "[]>;\n findOne: (params?: QueryAll").concat((0, cases_1.pascalPlural)(entity.name), "Args) =>\n Promise<").concat((0, cases_1.pascalSingular)(entity.name), " | null>;\n findOneRequired: (params?: QueryAll").concat((0, cases_1.pascalPlural)(entity.name), "Args) =>\n Promise<").concat((0, cases_1.pascalSingular)(entity.name), ">;").concat(entity.type === 'infoRegistry' && entity.period !== 'notPeriodic'
|
|
67
|
+
? "\n sliceOfTheLast: (date?: Date, filter?: Slice".concat((0, cases_1.pascalPlural)(entity.name), "Filter) =>\n Promise<").concat((0, cases_1.pascalSingular)(entity.name), " | null>;\n sliceOfTheFirst: (date?: Date, filter?: Slice").concat((0, cases_1.pascalPlural)(entity.name), "Filter) =>\n Promise<").concat((0, cases_1.pascalSingular)(entity.name), " | null>;")
|
|
68
|
+
: '', "\n count: (params?: Query_All").concat((0, cases_1.pascalPlural)(entity.name), "MetaArgs) =>\n Promise<number>;\n meta: (params?: Query_All").concat((0, cases_1.pascalPlural)(entity.name), "MetaArgs) =>\n Promise<ListMetadata>;\n create: (data: MutationCreate").concat((0, cases_1.pascalSingular)(entity.name), "ArgsWithoutAutodefinable, byUser?: boolean) =>\n Promise<").concat((0, cases_1.pascalSingular)(entity.name), ">;\n createMany: (data: StrictCreate").concat((0, cases_1.pascalSingular)(entity.name), "ArgsWithoutAutodefinable[], byUser?: boolean) =>\n Promise<Prisma.BatchPayload>;\n update: ({id, ...rest}: MutationUpdate").concat((0, cases_1.pascalSingular)(entity.name), "ArgsWithoutAutodefinable, byUser?: boolean) =>\n Promise<").concat((0, cases_1.pascalSingular)(entity.name), ">;\n upsert: (data: MutationUpdate").concat((0, cases_1.pascalSingular)(entity.name), "ArgsWithoutAutodefinable, byUser?: boolean) =>\n Promise<").concat((0, cases_1.pascalSingular)(entity.name), ">;\n upsertAdvanced: (\n filter: ").concat((0, cases_1.pascalSingular)(entity.name), "Filter,\n data: MutationCreate").concat((0, cases_1.pascalSingular)(entity.name), "ArgsWithoutAutodefinable,\n byUser?: boolean,\n ) =>\n Promise<").concat((0, cases_1.pascalSingular)(entity.name), ">;\n delete: (params: MutationRemove").concat((0, cases_1.pascalSingular)(entity.name), "Args) =>\n Promise<").concat((0, cases_1.pascalSingular)(entity.name), ">;").concat(entity.type === 'document'
|
|
69
|
+
? "\n\n rePost: (id: number) =>\n Promise<void>;\n getRegistryEntries: (data: ".concat((0, cases_1.pascalSingular)(entity.name), ") =>\n Promise<").concat((0, cases_1.pascalSingular)(entity.name), "RegistryEntries>;\n getPostOperations: (data: ").concat((0, cases_1.pascalSingular)(entity.name), ") =>\n Promise<PrismaPromise<any>[]>;\n getUnPostOperations: (id: number) =>\n Promise<PrismaPromise<any>[]>;")
|
|
70
|
+
: '', "\n}\n\nexport type ").concat((0, cases_1.pascalPlural)(entity.name), "Service = Base").concat((0, cases_1.pascalPlural)(entity.name), "Methods\n & Additional").concat((0, cases_1.pascalPlural)(entity.name), "Methods\n & HooksAddType<\n ").concat((0, cases_1.pascalSingular)(entity.name), ",\n QueryAll").concat((0, cases_1.pascalPlural)(entity.name), "Args,\n Reliable").concat((0, cases_1.pascalSingular)(entity.name), "CreateUserInput,\n MutationUpdate").concat((0, cases_1.pascalSingular)(entity.name), "Args,\n MutationRemove").concat((0, cases_1.pascalSingular)(entity.name), "Args,\n StrictCreate").concat((0, cases_1.pascalSingular)(entity.name), "Args,\n StrictUpdate").concat((0, cases_1.pascalSingular)(entity.name), "Args\n >;\n\nconst dateFieldsForSearch: string[] = ").concat(dateFields.length
|
|
71
|
+
? "[\n".concat(dateFields
|
|
72
|
+
.map(function (f) { return "'".concat(f.name, "',"); })
|
|
73
|
+
.map(utils_1.pad1)
|
|
74
|
+
.join('\n'), "\n];")
|
|
75
|
+
: '[];', "\n\nconst otherFieldsForSearch: string[] = ").concat(notDateFields.length
|
|
76
|
+
? "[\n".concat(notDateFields
|
|
77
|
+
.map(function (f) { return "'".concat(f.name, "',"); })
|
|
78
|
+
.map(utils_1.pad1)
|
|
79
|
+
.join('\n'), "\n];")
|
|
80
|
+
: '[];', "\n\nexport const get").concat((0, cases_1.pascalPlural)(entity.name), "Service = (ctx: ").concat(contextName, ") => {\n const {hooksAdd, runHooks} = getHooksUtils<\n ").concat((0, cases_1.pascalSingular)(entity.name), ",\n QueryAll").concat((0, cases_1.pascalPlural)(entity.name), "Args,\n Reliable").concat((0, cases_1.pascalSingular)(entity.name), "CreateUserInput,\n MutationUpdate").concat((0, cases_1.pascalSingular)(entity.name), "Args,\n MutationRemove").concat((0, cases_1.pascalSingular)(entity.name), "Args,\n StrictCreate").concat((0, cases_1.pascalSingular)(entity.name), "Args,\n StrictUpdate").concat((0, cases_1.pascalSingular)(entity.name), "Args\n >();\n\n const getSearchString = getSearchStringCreator(dateFieldsForSearch, otherFieldsForSearch);\n\n const augmentByDefault = async <T>(\n currentData: Record<string, any>,\n ): Promise<T & Autodefinable").concat((0, cases_1.pascalSingular)(entity.name), "Part> => ").concat(getDefaultableFields().length
|
|
81
|
+
? "{\n const defaultFieldConstructors = {\n".concat((0, utils_1.pad3)(getDefaultableFields()
|
|
82
|
+
.map(function (f) { return "".concat(f.name, ": async () => ").concat(f.defaultBackendValueExpression); })
|
|
83
|
+
.map(utils_1.addComma)
|
|
84
|
+
.join('\n')), "\n };\n\n const pairedConstructors = R.toPairs(defaultFieldConstructors);\n\n const resultedPairs: R.KeyValuePair<string, any>[] = [];\n for (const [key, constructor] of pairedConstructors) {\n resultedPairs.push([key, key in currentData && currentData[key] ? currentData[key] : await constructor()]);\n }\n\n return R.mergeLeft(currentData, R.fromPairs(resultedPairs)) as T & Autodefinable").concat((0, cases_1.pascalSingular)(entity.name), "Part;\n }")
|
|
85
|
+
: 'currentData as T', ";\n\n const all = async (\n params: QueryAll").concat((0, cases_1.pascalPlural)(entity.name), "Args = {},\n ): Promise<").concat((0, cases_1.pascalSingular)(entity.name), "[]> => {").concat(entity.externalSearch
|
|
86
|
+
? "\n const elasticSearch = ctx.elastic.createSearcher('".concat((0, change_case_1.pathCase)(entity.name), "');\n\n const search = await elasticSearch(toElasticRequest(await runHooks.changeListFilter(ctx, params)));\n\n const ids = search.hits.hits.map(el => BigInt((el._source as ").concat((0, cases_1.pascalSingular)(entity.name), ").id));\n const prismaReq = toPrismaRequest(params, {noId: false});\n\n return ctx.prisma.").concat((0, cases_1.camelSingular)(entity.name), ".findMany(\n {\n where: {id: {in: ids}},\n orderBy: prismaReq.orderBy,\n },")
|
|
87
|
+
: "\n return ctx.prisma.".concat((0, cases_1.camelSingular)(entity.name), ".findMany(\n toPrismaRequest(await runHooks.changeListFilter(ctx, params), {noId: false}),"), "\n ) as unknown as Promise<").concat((0, cases_1.pascalSingular)(entity.name), "[]>;\n };\n\n const findOne = async (\n params: QueryAll").concat((0, cases_1.pascalPlural)(entity.name), "Args = {},\n ): Promise<").concat((0, cases_1.pascalSingular)(entity.name), " | null> => {\n return ctx.prisma.").concat((0, cases_1.camelSingular)(entity.name), ".findFirst(toPrismaRequest(\n await runHooks.changeListFilter(ctx, params),\n {noId: false},\n ));\n };\n\n const findOneRequired = async (\n params: QueryAll").concat((0, cases_1.pascalPlural)(entity.name), "Args = {},\n ): Promise<").concat((0, cases_1.pascalSingular)(entity.name), "> => {\n const found = await findOne(params);\n\n if (!found) {\n throw new Error(`There is no entry with \"${JSON.stringify(params)}\" filter`);\n }\n\n return found;\n };\n\n const get = async (\n id: ").concat((0, fieldTypeToTsType_1.fieldTypeToTsType)((0, metaUtils_1.getKeyField)(entity).type), ",\n ): Promise<").concat((0, cases_1.pascalSingular)(entity.name), " | null> => {\n return findOne({filter: {id}});\n };\n\n const getRequired = async (\n id: ").concat((0, fieldTypeToTsType_1.fieldTypeToTsType)((0, metaUtils_1.getKeyField)(entity).type), ",\n ): Promise<").concat((0, cases_1.pascalSingular)(entity.name), "> => {\n const found = await get(id);\n\n if (!found) {\n throw new Error(`There is no entry with \"${id}\" id`);\n }\n\n return found;\n };\n").concat(entity.type === 'infoRegistry' && entity.period !== 'notPeriodic'
|
|
88
|
+
? "\n const sliceOfTheLast = async (\n date?: Date,\n filter?: Slice".concat((0, cases_1.pascalPlural)(entity.name), "Filter,\n ): Promise<").concat((0, cases_1.pascalSingular)(entity.name), " | null> => {\n return ctx.prisma.").concat((0, cases_1.camelSingular)(entity.name), ".findFirst(toPrismaRequest({\n sortField: 'date',\n sortOrder: 'desc',\n filter: {\n ...filter,\n date_lte: date ?? new Date(),\n },\n }, {noId: false}));\n };\n\n const sliceOfTheFirst = async (\n date?: Date,\n filter?: Slice").concat((0, cases_1.pascalPlural)(entity.name), "Filter,\n ): Promise<").concat((0, cases_1.pascalSingular)(entity.name), " | null> => {\n return ctx.prisma.").concat((0, cases_1.camelSingular)(entity.name), ".findFirst(toPrismaRequest({\n sortField: 'date',\n sortOrder: 'asc',\n filter: {\n ...filter,\n date_gte: date ?? new Date(),\n },\n }, {noId: false}));\n };\n")
|
|
89
|
+
: '', "\n const count = async (\n params: Query_All").concat((0, cases_1.pascalPlural)(entity.name), "MetaArgs = {},\n ): Promise<number> => {").concat(entity.externalSearch
|
|
90
|
+
? "\n const elasticCount = ctx.elastic.createCounter('".concat((0, change_case_1.pathCase)(entity.name), "');\n\n const reg = R.omit(['sortOrder', 'sortField'], toElasticRequest(await runHooks.changeListFilter(ctx, params)));\n\n const result = await elasticCount(reg);\n\n return result.count;\n };")
|
|
91
|
+
: "\n return ctx.prisma.".concat((0, cases_1.camelSingular)(entity.name), ".count(toPrismaTotalRequest(await runHooks.changeListFilter(ctx, params)));\n };"), "\n\n const meta = async (\n params: Query_All").concat((0, cases_1.pascalPlural)(entity.name), "MetaArgs = {},\n ): Promise<ListMetadata> => {\n return count(params).then(count => ({count}));\n };").concat(options.readOnly
|
|
92
|
+
? ''
|
|
93
|
+
: "".concat(entity.type === 'document'
|
|
94
|
+
? "\n\n const post = async (\n data: ".concat((0, cases_1.pascalSingular)(entity.name), ",\n ): Promise<void> => {\n await ctx.prisma.$transaction(await getPostOperations(ctx, await augmentByDefault(data)));\n };")
|
|
95
|
+
: '', "\n\n const create = async (\n data: MutationCreate").concat((0, cases_1.pascalSingular)(entity.name), "ArgsWithoutAutodefinable,\n byUser = false,\n ): Promise<").concat((0, cases_1.pascalSingular)(entity.name), "> => {\n // clear from fields forbidden for user\n const cleared = byUser ?\n R.omit(forbiddenForUserFields, data) as Allowed").concat((0, cases_1.pascalSingular)(entity.name), "ForUserCreateInput :\n data;\n\n // Augment with default field\n const augmentedByDefault: Reliable").concat((0, cases_1.pascalSingular)(entity.name), "CreateUserInput = await augmentByDefault(cleared);\n\n const processedData = await runHooks.beforeCreate(ctx, augmentedByDefault);\n").concat(autogeneratedStringId(entity)
|
|
96
|
+
? "\n const createOperation = ctx.prisma.".concat((0, cases_1.camelSingular)(entity.name), ".create({\n data: {\n id: uuidv4(),\n ...R.mergeDeepLeft(\n processedData,\n ").concat(['catalog', 'document'].includes(entity.type)
|
|
97
|
+
? "{\n search: getSearchString(processedData),\n }"
|
|
98
|
+
: '{}', "\n ),\n },\n });")
|
|
99
|
+
: "\n const createOperation = ctx.prisma.".concat((0, cases_1.camelSingular)(entity.name), ".create({\n data: R.mergeDeepLeft(\n processedData,\n ").concat(['catalog', 'document'].includes(entity.type)
|
|
100
|
+
? "{\n search: getSearchString(processedData),\n }"
|
|
101
|
+
: '{}', ",\n ),\n });"), "\n\n const operations = [\n createOperation,\n ...(await runHooks.additionalOperationsOnCreate(ctx, processedData)),\n ];\n\n const [result] = await ctx.prisma.$transaction(operations as any);\n if (!result) {\n throw new Error('There is no such entity');\n }\n\n await Promise.all([").concat(getDefaultValuesWithSearchJoined('processedData')
|
|
102
|
+
? "\n // update search. earlier we does not have id\n ctx.prisma.".concat((0, cases_1.camelSingular)(entity.name), ".update({\n where: {id: result.id},\n data: ").concat(['catalog', 'document'].includes(entity.type)
|
|
103
|
+
? "{\n search: getSearchString(result),\n }"
|
|
104
|
+
: '{}', ",\n }),")
|
|
105
|
+
: '').concat(entity.auditable
|
|
106
|
+
? "\n ctx.service('auditLogs').addCreateOperation({\n entityTypeId: Entity.".concat((0, cases_1.pascalSingular)(entity.name), ",\n entityId: result.id,\n actionData: data,\n }),")
|
|
107
|
+
: '').concat(entity.externalSearch
|
|
108
|
+
? "\n ctx.service('externalSearch').onEntityChange(Entity.".concat((0, cases_1.pascalSingular)(entity.name), ", result.id.toString()),")
|
|
109
|
+
: '').concat(entity.type === 'document'
|
|
110
|
+
? "\n await ctx.prisma.$transaction(await getPostOperations(ctx, result)),"
|
|
111
|
+
: '', "\n ]);\n\n await runHooks.afterCreate(ctx, result as ").concat((0, cases_1.pascalSingular)(entity.name), ");\n\n return result as ").concat((0, cases_1.pascalSingular)(entity.name), ";\n };\n\n const createMany = async (\n entries: StrictCreate").concat((0, cases_1.pascalSingular)(entity.name), "ArgsWithoutAutodefinable[],\n byUser = false,\n ): Promise<Prisma.BatchPayload> => {\n // clear from fields forbidden for user\n const clearedData = byUser ? entries.map(data => R.omit(forbiddenForUserFields, data)) : entries;\n\n // Augment with default field\n const augmentedByDefault = await Promise.all(\n clearedData.map(el => augmentByDefault(el)),\n ) as StrictCreate").concat((0, cases_1.pascalSingular)(entity.name), "Args[];\n").concat(autogeneratedStringId(entity)
|
|
112
|
+
? "\n const result = await ctx.prisma.".concat((0, cases_1.camelSingular)(entity.name), ".createMany({data: augmentedByDefault.map(data => ({\n id: uuidv4(),\n ...R.mergeDeepLeft(\n data,\n ").concat(['catalog', 'document'].includes(entity.type)
|
|
113
|
+
? "{\n search: getSearchString(data),\n }"
|
|
114
|
+
: '{}', ",\n ),\n })), skipDuplicates: true});")
|
|
115
|
+
: "\n const result = await ctx.prisma.".concat((0, cases_1.camelSingular)(entity.name), ".createMany({\n data: augmentedByDefault.map(data => R.mergeDeepLeft(\n data,\n ").concat(['catalog', 'document'].includes(entity.type)
|
|
116
|
+
? "{\n search: getSearchString(data),\n }"
|
|
117
|
+
: '{}', ",\n )),\n skipDuplicates: true,\n });"), "\n\n if (!result) {\n throw new Error('There is no such entity');\n }\n\n return result;\n };\n\n const update = async (\n data: MutationUpdate").concat((0, cases_1.pascalSingular)(entity.name), "ArgsWithoutAutodefinable,\n byUser = false,\n ): Promise<").concat((0, cases_1.pascalSingular)(entity.name), "> => {\n // Get db version\n const dbVersion = await getRequired(data.id);\n\n // clear from fields forbidden for user\n const cleared = byUser ? R.omit(forbiddenForUserFields, data) : data;\n\n // Augment with default field\n const augmentedByDefault = await augmentByDefault(cleared);\n\n // augment data by fields from db\n const augmented: StrictUpdate").concat((0, cases_1.pascalSingular)(entity.name), "Args = R.mergeLeft(augmentedByDefault, dbVersion);\n\n const processedData = await runHooks.beforeUpdate(ctx, augmented);\n\n const {id, ...rest} = processedData;\n\n const updateOperation = ctx.prisma.").concat((0, cases_1.camelSingular)(entity.name), ".update({\n data: R.mergeDeepLeft(\n ").concat(['catalog', 'document'].includes(entity.type)
|
|
118
|
+
? "{\n search: getSearchString(processedData),\n }"
|
|
119
|
+
: '{}', ",\n rest,\n ),\n where: {id},\n });\n").concat(entity.auditable
|
|
120
|
+
? "\n const auditOperation = ctx.service('auditLogs').addUpdateOperation({\n entityTypeId: Entity.".concat((0, cases_1.pascalSingular)(entity.name), ",\n entityId: data.id,\n actionData: data,\n });\n")
|
|
121
|
+
: '', "\n const operations = [\n updateOperation,").concat(entity.auditable
|
|
122
|
+
? "\n auditOperation,"
|
|
123
|
+
: '', "\n ...(await runHooks.additionalOperationsOnUpdate(ctx, processedData)),").concat(entity.type === 'document'
|
|
124
|
+
? "\n ...(await getPostOperations(ctx, processedData)),"
|
|
125
|
+
: '', "\n ];\n\n const [result] = await ctx.prisma.$transaction(operations as any);\n if (!result) {\n throw new Error('There is no such entity');\n }\n\n await Promise.all([").concat(entity.externalSearch
|
|
126
|
+
? "\n ctx.service('externalSearch').onEntityChange(Entity.".concat((0, cases_1.pascalSingular)(entity.name), ", data.id.toString()),")
|
|
127
|
+
: '', "\n runHooks.afterUpdate(ctx, result as ").concat((0, cases_1.pascalSingular)(entity.name), "),\n ]);\n\n return result as ").concat((0, cases_1.pascalSingular)(entity.name), ";\n };\n\n const upsert = async (\n data: MutationUpdate").concat((0, cases_1.pascalSingular)(entity.name), "ArgsWithoutAutodefinable,\n byUser = false,\n ): Promise<").concat((0, cases_1.pascalSingular)(entity.name), "> => {\n // Get db version\n const dbVersion = await get(data.id);\n\n // clear from fields forbidden for user\n const cleared = byUser ? R.omit(forbiddenForUserFields, data) : data;\n\n // Augment with default field\n const augmentedByDefault = await augmentByDefault(cleared);\n\n // augment data by fields from db\n const augmented: StrictUpdate").concat((0, cases_1.pascalSingular)(entity.name), "Args =\n R.mergeLeft(augmentedByDefault, dbVersion || {} as ").concat((0, cases_1.pascalSingular)(entity.name), ");\n\n const processedData = await runHooks.beforeUpsert(ctx, {createData: augmented, updateData: augmented});\n const createData = {\n ...processedData.createData,\n search: getSearchString(processedData.createData),\n };\n const updateData = {\n ...processedData.updateData,\n search: getSearchString(processedData.updateData),\n };\n\n const result = await ctx.prisma.").concat((0, cases_1.camelSingular)(entity.name), ".upsert({\n create: createData,\n update: updateData,\n where: {id: data.id},\n });\n\n if (!result) {\n throw new Error('There is no such entity');\n }\n").concat(entity.externalSearch
|
|
128
|
+
? "\n await ctx.service('externalSearch').onEntityChange(Entity.".concat((0, cases_1.pascalSingular)(entity.name), ", result.id.toString());\n")
|
|
129
|
+
: '', "\n return result;\n };\n\n const upsertAdvanced = async (\n filter: ").concat((0, cases_1.pascalSingular)(entity.name), "Filter,\n data: MutationCreate").concat((0, cases_1.pascalSingular)(entity.name), "ArgsWithoutAutodefinable,\n byUser = false,\n ): Promise<").concat((0, cases_1.pascalSingular)(entity.name), "> => {\n const cnt = await count({filter});\n\n if (cnt > 1) {\n throw new Error(`There is more then one entity (${cnt}) that fits filter \"${JSON.stringify(filter)}\"`);\n } else if (cnt === 0) {\n return create(data, byUser);\n } else {\n const dbVersion = await findOneRequired({filter});\n return update({...data, id: dbVersion.id}, byUser);\n }\n };\n\n const del = async (\n params: MutationRemove").concat((0, cases_1.pascalSingular)(entity.name), "Args,\n ): Promise<").concat((0, cases_1.pascalSingular)(entity.name), "> => {\n await runHooks.beforeDelete(ctx, params);\n\n const deleteOperation = ctx.prisma.").concat((0, cases_1.camelSingular)(entity.name), ".delete({where: {id: params.id}});\n").concat(entity.auditable
|
|
130
|
+
? "\n const auditOperation = ctx.service('auditLogs').addDeleteOperation({\n entityTypeId: Entity.".concat((0, cases_1.pascalSingular)(entity.name), ",\n entityId: params.id,\n });\n")
|
|
131
|
+
: '', "\n const operations = [\n deleteOperation,").concat(entity.auditable
|
|
132
|
+
? "\n auditOperation,"
|
|
133
|
+
: '', "\n ...(await runHooks.additionalOperationsOnDelete(ctx, params)),").concat(entity.type === 'document'
|
|
134
|
+
? "\n ...(await getUnPostOperations(ctx, params.id)),"
|
|
135
|
+
: '', "\n ];\n\n const entity = await get(params.id);\n\n if (!entity) {\n throw new Error(`There is no entity with \"${params.id}\" id`);\n }\n\n const [result] = await ctx.prisma.$transaction(operations as any);\n\n if (!result) {\n throw new Error('There is no such entity');\n }\n\n await runHooks.afterDelete(ctx, entity);\n\n return entity;\n };").concat(entity.type === 'document'
|
|
136
|
+
? "\n\n const rePost = async (\n id: number,\n ): Promise<void> => {\n const data = await get(id);\n\n if (!data) {\n throw new Error(`There is no document with \"${id}\" id`);\n }\n\n await post(data);\n };"
|
|
137
|
+
: ''), "\n\n const baseMethods: Base").concat((0, cases_1.pascalPlural)(entity.name), "Methods = {\n get,\n getRequired,\n all,\n findOne,\n findOneRequired,").concat(entity.type === 'infoRegistry' && entity.period !== 'notPeriodic'
|
|
138
|
+
? "\n sliceOfTheLast,\n sliceOfTheFirst,"
|
|
139
|
+
: '', "\n count,\n meta,\n create,\n createMany,\n update,\n upsert,\n upsertAdvanced,\n delete: del,").concat(entity.type === 'document'
|
|
140
|
+
? "\n\n rePost,\n getRegistryEntries: (data: ".concat((0, cases_1.pascalSingular)(entity.name), ") => getRegistryEntries(ctx, data),\n getPostOperations: async (data: ").concat((0, cases_1.pascalSingular)(entity.name), ") => getPostOperations(ctx, await augmentByDefault(data)),\n getUnPostOperations: (id: number) => getUnPostOperations(ctx, id),")
|
|
141
|
+
: '', "\n };\n\n const additionalMethods = getAdditionalMethods(ctx, baseMethods);\n\n const service: ").concat((0, cases_1.pascalPlural)(entity.name), "Service = {\n ...baseMethods,\n ...additionalMethods,\n hooksAdd,\n };\n\n initBuiltInHooks(service);\n initUserHooks(service);\n\n return service;\n};\n");
|
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Q0FBQyxDQUFDLEVBQUUsK0dBTU8sSUFBQSxvQkFBWSxFQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsMktBVzNDLENBQUE7QUFDRCxDQUFDLENBQUE7QUEzM0JZLFFBQUEsaUJBQWlCLHFCQTIzQjdCIn0=
|
package/build/projectsGeneration/generators/fileTemplates/back/services/serviceConstrictors.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* eslint-disable max-len */
|
|
4
|
+
var cases_1 = require("../../../../../utils/cases");
|
|
5
|
+
var utils_1 = require("../../../../utils");
|
|
6
|
+
var graphServiceConstrictorsTmpl = function (_a) {
|
|
7
|
+
var entities = _a.entities, options = _a.options;
|
|
8
|
+
return "".concat(entities.map(function (m) {
|
|
9
|
+
return "import {get".concat((0, cases_1.pascal)(m.name), "Service} from './").concat((0, cases_1.pascal)(m.name), "Service/").concat((0, cases_1.pascal)(m.name), "Service';");
|
|
10
|
+
}).join("\n"), "\nimport {getHelpService} from './HelpService/HelpService';\nimport {ServiceConstrictors, BaseServiceConstrictors} from './types';\nimport additionalServiceConstrictors from './additionalServiceConstrictors';\n").concat(options.skipWarningThisIsGenerated
|
|
11
|
+
? ''
|
|
12
|
+
: "\n// ".concat(utils_1.generatedWarning, "\n"), "\nexport const baseServiceConstrictors: BaseServiceConstrictors = {\n help: getHelpService,\n ").concat(entities.map(function (m) { return "".concat(m.name, ": get").concat((0, cases_1.pascal)(m.name), "Service,"); }).join("\n "), "\n};\n\nconst serviceConstrictors: ServiceConstrictors = {\n ...baseServiceConstrictors,\n ...additionalServiceConstrictors,\n};\n\nexport default serviceConstrictors;\n");
|
|
13
|
+
};
|
|
14
|
+
exports.default = graphServiceConstrictorsTmpl;
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZUNvbnN0cmljdG9ycy5qcyIsInNvd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5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var uiDashboardTmpl = function () { return "import React, {\n FC,\n} from 'react';\nimport ResourcesPage from './ResourcesPage';\n\nconst Dashboard: FC = () => {\n return (\n <ResourcesPage />\n );\n};\n\nexport default Dashboard;\n"; };
|
|
4
|
+
exports.default = uiDashboardTmpl;
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGFzaGJvYXJkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL3Byb2plY3RzR2VuZXJhdGlvbi9nZW5lcmF0b3JzL2ZpbGVUZW1wbGF0ZXMvdWkvRGFzaGJvYXJkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsSUFBTSxlQUFlLEdBQUcsY0FBTSxPQUFBLG9NQVk3QixFQVo2QixDQVk3QixDQUFBO0FBRUQsa0JBQWUsZUFBZSxDQUFBIn0=
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiMetaPageTmpl = void 0;
|
|
4
|
+
var uiMetaPageTmpl = function () {
|
|
5
|
+
return "import React, {FC} from 'react';\nimport {\n gql,\n useQuery,\n} from '@apollo/client';\nimport {makeStyles, createStyles} from '@mui/styles';\n\nconst useStyles = makeStyles(() => createStyles({\n section: {\n margin: '10px auto',\n },\n catalog: {\n margin: '20px 10px',\n },\n field: {\n margin: '20px 10px',\n },\n}));\n\nconst META_REQUEST = gql`\n query {\n Meta\n }\n`;\n\nconst MetaPage: FC = () => {\n const classes = useStyles();\n const {data: result} = useQuery(META_REQUEST);\n\n return (\n <>\n {result && <div>\n <div className={classes.section}>\n name: {result.Meta.name}\n </div>\n <div className={classes.section}>\n prefix: {result.Meta.prefix}\n </div>\n <div className={classes.section}>\n needFor: {result.Meta.needFor}\n </div>\n <div className={classes.section}>\n deployEnvironments: {result.Meta.deployEnvironments.join(',')}\n </div>\n <div className={classes.section}>\n configVars: {result.Meta.configVars.join(',')}\n </div>\n <div className={classes.section}>\n Catalogs:\n </div>\n <div className={classes.section}>\n {result.Meta.catalogs.map(\n (catalog: any, index: number) => <Catalog catalog={catalog} key={index} />,\n )}\n </div>\n </div>}\n </>\n );\n};\n\nconst Catalog: FC<{catalog: any}> = ({catalog}) => {\n const classes = useStyles();\n\n return (\n <div className={classes.catalog}>\n <div className={classes.section}>\n name: {catalog.name}\n </div>\n <div className={classes.section}>\n needFor: {catalog.needFor}\n </div>\n <div className={classes.section}>\n Fields:\n </div>\n <div className={classes.section}>\n {catalog.fields.map(\n (field: any, index: number) => <Field field={field} key={index} />,\n )}\n </div>\n </div>\n );\n};\n\nconst Field: FC<{field: any}> = ({field}) => {\n const classes = useStyles();\n\n return (\n <div className={classes.field}>\n <div className={classes.section}>\n name: {field.name}\n </div>\n <div className={classes.section}>\n type: {field.type}\n </div>\n <div className={classes.section}>\n required: {field.required?.toString()}\n </div>\n <div className={classes.section}>\n needFor: {field.needFor}\n </div>\n <div className={classes.section}>\n requiredOnInput: {field.requiredOnInput?.toString()}\n </div>\n <div className={classes.section}>\n updatable: {field.updatable?.toString()}\n </div>\n <div className={classes.section}>\n autoGenerated: {field.autoGenerated?.toString()}\n </div>\n <div className={classes.section}>\n category: {field.category}\n </div>\n <div className={classes.section}>\n constantOnCreate: {field.constantOnCreate?.toString()}\n </div>\n <div className={classes.section}>\n constantOnUpdate: {field.constantOnUpdate?.toString()}\n </div>\n </div>\n );\n};\n\nexport default MetaPage;\n";
|
|
6
|
+
};
|
|
7
|
+
exports.uiMetaPageTmpl = uiMetaPageTmpl;
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWV0YVBhZ2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2dlbmVyYXRvcnMvZmlsZVRlbXBsYXRlcy91aS9NZXRhUGFnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBTyxJQUFNLGNBQWMsR0FBRztJQUM1QixPQUFPLDZvR0EySFIsQ0FBQTtBQUNELENBQUMsQ0FBQTtBQTdIWSxRQUFBLGNBQWMsa0JBNkgxQiJ9
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiResourcesPageTmpl = void 0;
|
|
4
|
+
var types_1 = require("../../../types");
|
|
5
|
+
var cases_1 = require("../../../../utils/cases");
|
|
6
|
+
var utils_1 = require("../../../utils");
|
|
7
|
+
var pluralize_1 = require("pluralize");
|
|
8
|
+
var uiResourcesPageTmpl = function (_a) {
|
|
9
|
+
var entities = _a.entities, _b = _a.options, options = _b === void 0 ? types_1.defaultBootstrapEntityOptions : _b;
|
|
10
|
+
return "import React, {\n FC,\n} from 'react';\nimport NumberWiget from '../widgets/NumberWiget';\nimport {\n gql,\n} from '@apollo/client';\nimport {useTranslate} from 'react-admin';\nimport Grid from '@mui/material/Grid';\n".concat(options.skipWarningThisIsGenerated
|
|
11
|
+
? ''
|
|
12
|
+
: "\n// ".concat(utils_1.generatedWarning, "\n"), "\nconst ResourcesPage: FC = () => {\n const translate = useTranslate();\n\n return (\n <Grid container>\n").concat(entities.map(function (entity) {
|
|
13
|
+
return " <NumberWiget\n request={gql`\n query {\n _all".concat((0, cases_1.pascalPlural)(entity.name), "Meta {\n count\n }\n }\n `}\n resultToValue={result => result?._all").concat((0, cases_1.pascalPlural)(entity.name), "Meta?.count}\n title={translate('").concat((0, pluralize_1.plural)(entity.type), ".").concat(entity.name, ".title')}\n to='/").concat(entity.name, "'\n />");
|
|
14
|
+
}).join("\n"), "\n </Grid>\n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MsQ0FBQTtBQWhEWSxRQUFBLG1CQUFtQix1QkFnRC9CIn0=
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiAdditionalRoutesTmpl = void 0;
|
|
4
|
+
var uiAdditionalRoutesTmpl = function () { return "const additionalRoutes = [];\n\nexport default additionalRoutes;\n"; };
|
|
5
|
+
exports.uiAdditionalRoutesTmpl = uiAdditionalRoutesTmpl;
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkaXRpb25hbFJvdXRlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9wcm9qZWN0c0dlbmVyYXRpb24vZ2VuZXJhdG9ycy9maWxlVGVtcGxhdGVzL3VpL2FkZGl0aW9uYWxSb3V0ZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQU8sSUFBTSxzQkFBc0IsR0FBRyxjQUFNLE9BQUEsb0VBRzNDLEVBSDJDLENBRzNDLENBQUE7QUFIWSxRQUFBLHNCQUFzQiwwQkFHbEMifQ==
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiEntityMappingTmpl = void 0;
|
|
4
|
+
var types_1 = require("../../../types");
|
|
5
|
+
var cases_1 = require("../../../../utils/cases");
|
|
6
|
+
var utils_1 = require("../../../utils");
|
|
7
|
+
var uiEntityMappingTmpl = function (_a, options) {
|
|
8
|
+
var entities = _a.entities;
|
|
9
|
+
if (options === void 0) { options = types_1.defaultBootstrapEntityOptions; }
|
|
10
|
+
return "".concat(options.skipWarningThisIsGenerated
|
|
11
|
+
? ''
|
|
12
|
+
: "// ".concat(utils_1.generatedWarning, "\n\n"), "export const mapping = {\n ").concat(entities.map(function (m) { return "".concat((0, cases_1.camelPlural)(m.name), ": '").concat((0, cases_1.pascalSingular)(m.name), "',"); })
|
|
13
|
+
.join("\n "), "\n};\n");
|
|
14
|
+
};
|
|
15
|
+
exports.uiEntityMappingTmpl = uiEntityMappingTmpl;
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50aXR5TWFwcGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9wcm9qZWN0c0dlbmVyYXRpb24vZ2VuZXJhdG9ycy9maWxlVGVtcGxhdGVzL3VpL2VudGl0eU1hcHBpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsd0NBR3VCO0FBQ3ZCLGlEQUFxRTtBQUNyRSx3Q0FBaUQ7QUFHMUMsSUFBTSxtQkFBbUIsR0FBRyxVQUNqQyxFQUF1QyxFQUN2QyxPQUErRDtRQUQ3RCxRQUFRLGNBQUE7SUFDVix3QkFBQSxFQUFBLFVBQWtDLHFDQUE2QjtJQUM1RCxPQUFBLFVBQ0gsT0FBTyxDQUFDLDBCQUEwQjtRQUNoQyxDQUFDLENBQUMsRUFBRTtRQUNKLENBQUMsQ0FBQyxhQUFNLHdCQUFnQixTQUUzQix5Q0FFRyxRQUFRLENBQUMsR0FBRyxDQUFDLFVBQUMsQ0FBQyxJQUFLLE9BQUEsVUFBRyxJQUFBLG1CQUFXLEVBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxnQkFBTSxJQUFBLHNCQUFjLEVBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxPQUFJLEVBQXRELENBQXNELENBQUM7U0FDMUUsSUFBSSxDQUFDLE1BQ1AsQ0FBQyxXQUVIO0FBWEksQ0FXSixDQUFBO0FBZFksUUFBQSxtQkFBbUIsdUJBYy9CIn0=
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiChartTmpl = void 0;
|
|
4
|
+
var utils_1 = require("../../../../../utils");
|
|
5
|
+
var uiChartTmpl = function (_a) {
|
|
6
|
+
var prefix = _a.system.prefix, options = _a.options;
|
|
7
|
+
return "".concat(options.skipWarningThisIsGenerated
|
|
8
|
+
? ''
|
|
9
|
+
: "\n# ".concat(utils_1.generatedWarning, "\n"), "apiVersion: v1\nappVersion: \"1.0\"\ndescription: A Helm chart for Kubernetes\nname: ").concat(options.k8sChartName || prefix, "-ui\nversion: 0.0.1\n");
|
|
10
|
+
};
|
|
11
|
+
exports.uiChartTmpl = uiChartTmpl;
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2hhcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2dlbmVyYXRvcnMvZmlsZVRlbXBsYXRlcy91aS9lbnZpcm9ubWVudC9jaGFydC9DaGFydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSw4Q0FBdUQ7QUFFaEQsSUFBTSxXQUFXLEdBQUcsVUFBQyxFQUdBO1FBRmhCLE1BQU0sbUJBQUEsRUFDaEIsT0FBTyxhQUFBO0lBQ3dCLE9BQUEsVUFDL0IsT0FBTyxDQUFDLDBCQUEwQjtRQUNoQyxDQUFDLENBQUMsRUFBRTtRQUNKLENBQUMsQ0FBQyxjQUNGLHdCQUFnQixPQUNuQixrR0FJTyxPQUFPLENBQUMsWUFBWSxJQUFJLE1BQU0sMEJBRXJDO0FBWGdDLENBV2hDLENBQUE7QUFkWSxRQUFBLFdBQVcsZUFjdkIifQ==
|
package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/front.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiChartFrontTmpl = void 0;
|
|
4
|
+
/* eslint-disable max-len */
|
|
5
|
+
var change_case_1 = require("change-case");
|
|
6
|
+
var utils_1 = require("../../../../../../utils");
|
|
7
|
+
var uiChartFrontTmpl = function (_a) {
|
|
8
|
+
var system = _a.system, prefix = _a.system.prefix, options = _a.options;
|
|
9
|
+
return "".concat(options.skipWarningThisIsGenerated
|
|
10
|
+
? ''
|
|
11
|
+
: "\n# ".concat(utils_1.generatedWarning, "\n"), "apiVersion: v1\nkind: Service\nmetadata:\n name: ").concat(options.k8sChartName || prefix, "-ui\n labels:\n app: ").concat(options.k8sChartName || prefix, "-ui\n projectName: {{ $.Values.global.projectName }}\n clusterName: {{ $.Values.global.clusterName }}\n env: {{ $.Values.global.env }}\n deployKind: {{ $.Values.global.deployKind }}\nspec:\n ports:\n - port: 80\n selector:\n app: ").concat(options.k8sChartName || prefix, "-ui\n---\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: ").concat(options.k8sChartName || prefix, "-ui\nspec:\n replicas: {{ $.Values.app.replicas }}\n strategy:\n type: RollingUpdate\n rollingUpdate:\n maxSurge: 3\n selector:\n matchLabels:\n app: ").concat(options.k8sChartName || prefix, "-ui\n template:\n metadata:\n labels:\n app: ").concat(options.k8sChartName || prefix, "-ui\n projectName: {{ $.Values.global.projectName }}\n clusterName: {{ $.Values.global.clusterName }}\n env: {{ $.Values.global.env }}\n deployKind: {{ $.Values.global.deployKind }}\n spec:\n {{- with .Values.imagePullSecrets }}\n imagePullSecrets:\n {{- toYaml . | nindent 8 }}\n {{- end }}\n containers:\n - name: ").concat(options.k8sChartName || prefix, "-ui\n image: {{ $.Values.dockerRegistry }}/").concat(options.projectPrefix || prefix, "-ui{{ $.Values.app.tag }}\n ports:\n - name: main-port\n containerPort: 80\n imagePullPolicy: Always\n env:\n - name: RANDOM\n value: {{ $.Values.random | quote }}\n - name: ENV\n value: '{{ $.Values.global.env }}'\n - name: ENDPOINT\n value: 'https://{{ $.Values.ingress.domains.endpoint }}.{{ $.Values.global.env }}.apps.{{ $.Values.global.clusterName }}.{{ $.Values.ingress.host }}/adm'").concat(system.configVars
|
|
12
|
+
.filter(function (v) { return v.scopes.includes('admin-app'); })
|
|
13
|
+
.map(function (v) { return "\n - name: ".concat((0, change_case_1.constantCase)(v.name), "\n value: {{ $.Values.").concat(v.name, " | quote }}"); })
|
|
14
|
+
.join(''), "\n\n livenessProbe:\n httpGet:\n path: /\n port: main-port\n initialDelaySeconds: 60\n timeoutSeconds: 15\n periodSeconds: 5\n readinessProbe:\n httpGet:\n path: /\n port: main-port\n initialDelaySeconds: 60\n timeoutSeconds: 15\n periodSeconds: 5\n startupProbe:\n httpGet:\n path: /\n port: main-port\n initialDelaySeconds: 60\n timeoutSeconds: 15\n failureThreshold: 10\n periodSeconds: 10\n\n resources:\n requests:\n memory: \"256Mi\"\n cpu: \"0.15\"\n limits:\n memory: \"512Mi\"\n cpu: \"1\"\n---\n");
|
|
15
|
+
};
|
|
16
|
+
exports.uiChartFrontTmpl = uiChartFrontTmpl;
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2dlbmVyYXRvcnMvZmlsZVRlbXBsYXRlcy91aS9lbnZpcm9ubWVudC9jaGFydC90ZW1wbGF0ZXMvZnJvbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNEJBQTRCO0FBQzVCLDJDQUEwQztBQUUxQyxpREFBMEQ7QUFFbkQsSUFBTSxnQkFBZ0IsR0FBRyxVQUFDLEVBSUw7UUFIMUIsTUFBTSxZQUFBLEVBQ0ksTUFBTSxtQkFBQSxFQUNoQixPQUFPLGFBQUE7SUFDd0IsT0FBQSxVQUMvQixPQUFPLENBQUMsMEJBQTBCO1FBQ2hDLENBQUMsQ0FBQyxFQUFFO1FBQ0osQ0FBQyxDQUFDLGNBQ0Ysd0JBQWdCLE9BQ25CLCtEQUlTLE9BQU8sQ0FBQyxZQUFZLElBQUksTUFBTSxzQ0FFN0IsT0FBTyxDQUFDLFlBQVksSUFBSSxNQUFNLHFRQVM5QixPQUFPLENBQUMsWUFBWSxJQUFJLE1BQU0saUZBSy9CLE9BQU8sQ0FBQyxZQUFZLElBQUksTUFBTSx5TEFTM0IsT0FBTyxDQUFDLFlBQVksSUFBSSxNQUFNLDBFQUk1QixPQUFPLENBQUMsWUFBWSxJQUFJLE1BQU0sb1lBVzdCLE9BQU8sQ0FBQyxZQUFZLElBQUksTUFBTSwrREFFcEMsT0FBTyxDQUFDLGFBQWEsSUFBSSxNQUFNLHVlQVk0SCxNQUFNLENBQUMsVUFBVTtTQUN6SyxNQUFNLENBQUMsVUFBQyxDQUFDLElBQUssT0FBQSxDQUFDLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxXQUFXLENBQUMsRUFBOUIsQ0FBOEIsQ0FBQztTQUM3QyxHQUFHLENBQ0YsVUFBQyxDQUFDLElBQUssT0FBQSw0QkFBcUIsSUFBQSwwQkFBWSxFQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsNENBQy9CLENBQUMsQ0FBQyxJQUFJLGdCQUFhLEVBRDdCLENBQzZCLENBQ3JDO1NBQ0EsSUFBSSxDQUFDLEVBQUUsQ0FBQywrd0JBaUNwQjtBQXRHZ0MsQ0FzR2hDLENBQUE7QUExR1ksUUFBQSxnQkFBZ0Isb0JBMEc1QiJ9
|
package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/ingress.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiChartIngressTmpl = void 0;
|
|
4
|
+
var utils_1 = require("../../../../../../utils");
|
|
5
|
+
var uiChartIngressTmpl = function (_a) {
|
|
6
|
+
var prefix = _a.system.prefix, options = _a.options;
|
|
7
|
+
return "".concat(options.skipWarningThisIsGenerated
|
|
8
|
+
? ''
|
|
9
|
+
: "\n# ".concat(utils_1.generatedWarning, "\n"), "apiVersion: networking.k8s.io/v1\nkind: Ingress\nmetadata:\n name: ").concat(options.k8sChartName || prefix, "-ui\n labels:\n app: ").concat(options.k8sChartName || prefix, "-back\n chart: \"{{ .Chart.Name }}-{{ .Chart.Version | replace \"+\" \"_\" }}\"\n release: \"{{ .Release.Name }}\"\n heritage: \"{{ .Release.Service }}\"\n annotations:\n {{- range $key, $value := .Values.ingress.annotations }}\n {{ $key }}: {{ $value | quote }}\n {{- end }}\n {{ if .Values.ingress.letsencryptCert }}\n cert-manager.io/cluster-issuer: \"letsencrypt-prod\"\n {{ end }}\nspec:\n rules:\n {{ if .Values.ingress.rootEnabled }}\n - host: {{ $.Values.ingress.domains.app }}.apps.{{ $.Values.ingress.host }}\n http:\n paths:\n - pathType: Prefix\n path: \"/\"\n backend:\n service:\n name: ").concat(options.k8sChartName || prefix, "-ui\n port:\n number: 80\n {{ end }}\n - host: {{ $.Values.ingress.domains.app }}.{{ $.Values.global.env }}.apps.{{ $.Values.global.clusterName }}.{{ $.Values.ingress.host }}\n http:\n paths:\n - pathType: Prefix\n path: \"/\"\n backend:\n service:\n name: ").concat(options.k8sChartName || prefix, "-ui\n port:\n number: 80\n tls:\n - hosts:\n - {{ $.Values.ingress.domains.app }}.{{ $.Values.global.env }}.apps.{{ $.Values.global.clusterName }}.{{ $.Values.ingress.host }}\n secretName: {{ $.Values.ingress.domains.app }}.{{ $.Values.global.env }}.apps.{{ $.Values.global.clusterName }}.{{ $.Values.ingress.host }}-tls\n");
|
|
10
|
+
};
|
|
11
|
+
exports.uiChartIngressTmpl = uiChartIngressTmpl;
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5ncmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9wcm9qZWN0c0dlbmVyYXRpb24vZ2VuZXJhdG9ycy9maWxlVGVtcGxhdGVzL3VpL2Vudmlyb25tZW50L2NoYXJ0L3RlbXBsYXRlcy9pbmdyZXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUVBLGlEQUEwRDtBQUVuRCxJQUFNLGtCQUFrQixHQUFHLFVBQUMsRUFHUDtRQUZoQixNQUFNLG1CQUFBLEVBQ2hCLE9BQU8sYUFBQTtJQUN3QixPQUFBLFVBQy9CLE9BQU8sQ0FBQywwQkFBMEI7UUFDaEMsQ0FBQyxDQUFDLEVBQUU7UUFDSixDQUFDLENBQUMsY0FDRix3QkFBZ0IsT0FDbkIsZ0ZBSVEsT0FBTyxDQUFDLFlBQVksSUFBSSxNQUFNLHFDQUU1QixPQUFPLENBQUMsWUFBWSxJQUFJLE1BQU0saXNCQXFCakIsT0FBTyxDQUFDLFlBQVksSUFBSSxNQUFNLDJYQVc5QixPQUFPLENBQUMsWUFBWSxJQUFJLE1BQU0sK1dBT3JEO0FBbERnQyxDQWtEaEMsQ0FBQTtBQXJEWSxRQUFBLGtCQUFrQixzQkFxRDlCIn0=
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiChartValuesTmpl = void 0;
|
|
4
|
+
var utils_1 = require("../../../../../utils");
|
|
5
|
+
var uiChartValuesTmpl = function (_a) {
|
|
6
|
+
var prefix = _a.system.prefix, options = _a.options;
|
|
7
|
+
return "".concat(options.skipWarningThisIsGenerated
|
|
8
|
+
? ''
|
|
9
|
+
: "\n# ".concat(utils_1.generatedWarning, "\n"), "global:\n env: noName\n clusterName: noName\n deployKind: noName\n imagePullPolicy: Always\n\ndev: false\n\ndockerRegistry: ").concat(options.ciDockerRegistry, "/").concat(options.projectsGroup, "\n\napp:\n tag: :master\n replicas: 1\n endpoint: \"\"\n\nimage:\n repository: nginx\n tag: stable\n pullPolicy: IfNotPresent\n\nimagePullSecrets:\n - name: ").concat(options.k8sImagePullSecrets, "\n\nnameOverride: \"\"\nfullnameOverride: \"\"\n\nservice:\n type: ClusterIP\n port: \"80\"\n\ndeployment:\n annotations:\n prometheus.io/path: '/metrics'\n prometheus.io/scrape: true\n prometheus.io/port: 2100\n\ningress:\n annotations:\n nginx.ingress.kubernetes.io/limit-connections: \"100\"\n nginx.ingress.kubernetes.io/limit-rps: \"300\"\n nginx.ingress.kubernetes.io/limit-rpm: \"5000\"\n nginx.ingress.kubernetes.io/affinity: \"cookie\"\n nginx.ingress.kubernetes.io/proxy-body-size: \"50m\"\n host: \"").concat(options.k8sAppsDomain, "\"\n letsencryptCert: true\n domains:\n app: \"").concat(options.k8sSubdomainPrefix || prefix, "\"\n endpoint: \"").concat(options.k8sSubdomainPrefix || prefix, "-ep\"\n\nresources:\n {}\n # We usually recommend not to specify default resources and to leave this as a conscious\n # choice for the user. This also increases chances charts run on environments with little\n # resources, such as Minikube. If you do want to specify resources, uncomment the following\n # lines, adjust them as necessary, and remove the curly braces after 'resources:'.\n # limits:\n # cpu: 100m\n # memory: 128Mi\n # requests:\n # cpu: 100m\n # memory: 128Mi\n\nnodeSelector: {}\n\ntolerations: []\n\naffinity: {}\n");
|
|
10
|
+
};
|
|
11
|
+
exports.uiChartValuesTmpl = uiChartValuesTmpl;
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsdWVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3Byb2plY3RzR2VuZXJhdGlvbi9nZW5lcmF0b3JzL2ZpbGVUZW1wbGF0ZXMvdWkvZW52aXJvbm1lbnQvY2hhcnQvdmFsdWVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLDhDQUF1RDtBQUVoRCxJQUFNLGlCQUFpQixHQUFHLFVBQUMsRUFHTjtRQUZoQixNQUFNLG1CQUFBLEVBQ2hCLE9BQU8sYUFBQTtJQUN3QixPQUFBLFVBQy9CLE9BQU8sQ0FBQywwQkFBMEI7UUFDaEMsQ0FBQyxDQUFDLEVBQUU7UUFDSixDQUFDLENBQUMsY0FDRix3QkFBZ0IsT0FDbkIsNklBU2lCLE9BQU8sQ0FBQyxnQkFBZ0IsY0FBSSxPQUFPLENBQUMsYUFBYSxpTEFhdkQsT0FBTyxDQUFDLG1CQUFtQix3aUJBc0I1QixPQUFPLENBQUMsYUFBYSxpRUFHcEIsT0FBTyxDQUFDLGtCQUFrQixJQUFJLE1BQU0saUNBQy9CLE9BQU8sQ0FBQyxrQkFBa0IsSUFBSSxNQUFNLDZpQkFvQnBEO0FBekVnQyxDQXlFaEMsQ0FBQTtBQTVFWSxRQUFBLGlCQUFpQixxQkE0RTdCIn0=
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
+
if (ar || !(i in from)) {
|
|
5
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
+
ar[i] = from[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.adminAppDocsConfiguration = void 0;
|
|
13
|
+
/* eslint-disable max-len */
|
|
14
|
+
var change_case_1 = require("change-case");
|
|
15
|
+
var markdown_table_1 = require("markdown-table");
|
|
16
|
+
var adminAppDocsConfiguration = function (_a) {
|
|
17
|
+
var system = _a.system;
|
|
18
|
+
var adminVars = system.configVars.filter(function (v) {
|
|
19
|
+
return v.scopes.includes('admin-app');
|
|
20
|
+
});
|
|
21
|
+
return "\n# Configuration\n\nProject takes configurations from two places: from config files in `projectRoot/config` folder and from environment variables.\n\nEnvironment variables takes precedence.\n\n## Loading from files\n\nThere is two files, configuration will be loaded from: `default.json` and `${ENV}.json` where `${ENV}` is `ENV` environment variable or `dev` if `ENV` environment variable is not set.\n\nIf both files exists they will be merged. `${ENV}.json` takes precedence.\n\n> **_WARNING:_** `default.json` stored in git so do not put secret information in there (database credentials, passwords, etc.)\n\n## Configuration variables\n\n".concat((0, markdown_table_1.markdownTable)(__spreadArray([
|
|
22
|
+
['Key in file', 'Environment', 'Description']
|
|
23
|
+
], adminVars.map(function (v) { return [v.name, (0, change_case_1.constantCase)(v.name), v.needFor]; }), true)), "\n");
|
|
24
|
+
};
|
|
25
|
+
exports.adminAppDocsConfiguration = adminAppDocsConfiguration;
|
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRtaW5BcHBEb2NzQ29uZmlndXJhdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9wcm9qZWN0c0dlbmVyYXRpb24vZ2VuZXJhdG9ycy9maWxlVGVtcGxhdGVzL3VpL2Vudmlyb25tZW50L2RvY3MvYWRtaW5BcHBEb2NzQ29uZmlndXJhdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQSw0QkFBNEI7QUFDNUIsMkNBQTBDO0FBQzFDLGlEQUE4QztBQUd2QyxJQUFNLHlCQUF5QixHQUFHLFVBQUMsRUFFZDtRQUQxQixNQUFNLFlBQUE7SUFFTixJQUFNLFNBQVMsR0FBRyxNQUFNLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxVQUFDLENBQUM7UUFDM0MsT0FBQSxDQUFDLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxXQUFXLENBQUM7SUFBOUIsQ0FBOEIsQ0FDL0IsQ0FBQTtJQUVELE9BQU8sK29CQWlCUCxJQUFBLDhCQUFhO1FBQ2IsQ0FBQyxhQUFhLEVBQUUsYUFBYSxFQUFFLGFBQWEsQ0FBQztPQUMxQyxTQUFTLENBQUMsR0FBRyxDQUFDLFVBQUMsQ0FBQyxJQUFLLE9BQUEsQ0FBQyxDQUFDLENBQUMsSUFBSSxFQUFFLElBQUEsMEJBQVksRUFBQyxDQUFDLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxFQUF6QyxDQUF5QyxDQUFDLFFBQ2xFLE9BQ0QsQ0FBQTtBQUNELENBQUMsQ0FBQTtBQTdCWSxRQUFBLHlCQUF5Qiw2QkE2QnJDIn0=
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiGitlabCiTmpl = void 0;
|
|
4
|
+
/* eslint-disable max-len */
|
|
5
|
+
var change_case_1 = require("change-case");
|
|
6
|
+
var utils_1 = require("../../../../utils");
|
|
7
|
+
var uiGitlabCiTmpl = function (_a) {
|
|
8
|
+
var prefix = _a.system.prefix, system = _a.system, options = _a.options;
|
|
9
|
+
return "image: node:16\n".concat(options.skipWarningThisIsGenerated
|
|
10
|
+
? ''
|
|
11
|
+
: "\n# ".concat(utils_1.generatedWarning, "\n"), "\nstages:\n - check\n - build\n - latest-image\n ").concat(system.deployEnvironments.map(function (e) { return "- deploy-".concat(e.name); }).join("\n "), "\n\ncache:\n paths:\n - .cache\n - .cache_images\n # - node_modules\n\nvariables:\n REPO_NAME: $CI_PROJECT_NAME\n VERBOSE: 'true'\n RELEASE: $CI_COMMIT_SHORT_SHA\n KUBECONFIG: /etc/deploy/config\n PROJECT_NAME: ").concat(system.name, "\n\ncheck:\n stage: check\n image: registry.gitlab.com/making.ventures/images/node-with-tools\n before_script:\n - yarn\n script:\n - ./check\n\nbuild:\n stage: build\n image:\n name: gcr.io/kaniko-project/executor:debug\n entrypoint: ['']\n before_script:\n - mkdir -p /kaniko/.docker\n - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > /kaniko/.docker/config.json\n # - /kaniko/warmer --cache-dir=$CI_PROJECT_DIR/.cache_images --image=browserless/chrome\n script:\n - /kaniko/executor\n --cache-dir=$CI_PROJECT_DIR/.cache_images\n --context ${CI_PROJECT_DIR}\n --dockerfile ${CI_PROJECT_DIR}/Dockerfile\n --destination ${CI_REGISTRY_IMAGE}:$CI_COMMIT_REF_SLUG\n --single-snapshot\n only:\n - master\n - release\n - /^release-.*$/").concat(system.deployEnvironments
|
|
12
|
+
.filter(function (e) { return e.name !== 'prod' && e.name !== 'dev' && e.name !== 'stage'; })
|
|
13
|
+
.map(function (e) { return "\n - ".concat(e.name); }), "\n\nmaster-to-latest:\n extends: .tag-image\n stage: latest-image\n only:\n - master\n variables:\n TAG_ORIGIN: master\n TAG_DESTINATION: latest\n\n.tag-image:\n image:\n name: gcr.io/go-containerregistry/crane:debug\n entrypoint: ['']\n script:\n - crane auth login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY\n - crane cp ${CI_REGISTRY_IMAGE}:${TAG_ORIGIN} ${CI_REGISTRY_IMAGE}:${TAG_DESTINATION}\n variables:\n GIT_STRATEGY: none\n\n").concat(system.deployEnvironments
|
|
14
|
+
.map(function (e) {
|
|
15
|
+
return "deploy-".concat(e.name, ":\n extends: .deploy-").concat(e.name === 'prod' || e.name === 'demo' ? 'prod' : 'dev', "\n stage: deploy-").concat(e.name, "\n variables:\n ENV: \"").concat(e.name, "\"\n CLUSTER_NAME: \"").concat(e.clusterName, "01\"\n").concat(e.name !== 'prod' && e.name !== 'dev' && e.name !== 'stage'
|
|
16
|
+
? " TAG: \":".concat(e.name, "\"")
|
|
17
|
+
: '', "\n").concat(e.name !== 'prod' && e.name !== 'dev' && e.name !== 'stage'
|
|
18
|
+
? " only:\n - ".concat(e)
|
|
19
|
+
: '').replace(/\n\n/gu, '\n');
|
|
20
|
+
})
|
|
21
|
+
.join('\n'), "\n\n.deploy-dev:\n extends:\n - .deploy\n - .deploy-ui\n stage: deploy-stage\n variables:\n ENV: \"stage\"\n DEV: \"true\"\n HOST: \"making.ventures\"\n TAG: \":latest\"\n KUBE_CONFIG: ${KUBE_STAGE01_CONFIG}").concat(system.configVars
|
|
22
|
+
.filter(function (v) { return v.scopes.includes('admin-app'); })
|
|
23
|
+
.map(function (v) { return "\n ".concat((0, change_case_1.constantCase)(v.name), ": ${DEV_").concat((0, change_case_1.constantCase)(v.name), "}"); })
|
|
24
|
+
.join(''), "\n only:\n - master\n\n.deploy-prod:\n extends:\n - .deploy\n - .deploy-ui\n stage: deploy-prod\n when: manual\n variables:\n ENV: \"prod\"\n DEV: \"false\"\n HOST: \"making.ventures\"\n TAG: \":release\"\n KUBE_CONFIG: ${KUBE_PROD01_CONFIG}").concat(system.configVars
|
|
25
|
+
.filter(function (v) { return v.scopes.includes('admin-app'); })
|
|
26
|
+
.map(function (v) { return "\n ".concat((0, change_case_1.constantCase)(v.name), ": ${DEV_").concat((0, change_case_1.constantCase)(v.name), "}"); })
|
|
27
|
+
.join(''), "\n only:\n - release\n - /^release-.*$/\n\n.deploy-ui:\n variables:\n DEPLOY_KIND: \"ui\"\n\n.deploy:\n image:\n name: alpine/helm:3.9.0\n entrypoint: [\"\"]\n before_script:\n - mkdir -p /etc/deploy\n - echo ${KUBE_CONFIG} | base64 -d > ${KUBECONFIG}\n script:\n - NAMESPACE=${NAMESPACE:-\"").concat(options.k8sNamespacePrefix || prefix, "-${ENV}\"}\n - echo NAMESPACE ${NAMESPACE}\n\n - helm upgrade\n --install\n --wait ${NAMESPACE}-${DEPLOY_KIND} chart\n --timeout 3600s\n -f chart/values_${ENV}.yaml\n --set \"global.projectName=${PROJECT_NAME}\"\n --set \"global.clusterName=${CLUSTER_NAME}\"\n --set \"global.env=${ENV}\"\n --set \"global.deployKind=${DEPLOY_KIND}\"\n --set \"random=:$(date)\"\n --set \"app.tag=${TAG}\"\n --set \"ingress.host=${HOST}\"\n --set \"style=${STYLE}\"\n --set \"ingress.rootEnabled=${ROOT_ENABLED}\"").concat(system.configVars
|
|
28
|
+
.filter(function (v) { return v.scopes.includes('admin-app'); })
|
|
29
|
+
.map(function (v) { return "\n --set \"".concat(v.name, "=${").concat((0, change_case_1.constantCase)(v.name), "}\""); })
|
|
30
|
+
.join(''), "\n --namespace ${NAMESPACE}\n");
|
|
31
|
+
};
|
|
32
|
+
exports.uiGitlabCiTmpl = uiGitlabCiTmpl;
|
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2l0bGFiQ2kuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2dlbmVyYXRvcnMvZmlsZVRlbXBsYXRlcy91aS9lbnZpcm9ubWVudC9naXRsYWJDaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw0QkFBNEI7QUFDNUIsMkNBQTBDO0FBRTFDLDJDQUFvRDtBQUU3QyxJQUFNLGNBQWMsR0FBRyxVQUFDLEVBSUg7UUFIaEIsTUFBTSxtQkFBQSxFQUNoQixNQUFNLFlBQUEsRUFDTixPQUFPLGFBQUE7SUFDd0IsT0FBQSwwQkFFL0IsT0FBTyxDQUFDLDBCQUEwQjtRQUNoQyxDQUFDLENBQUMsRUFBRTtRQUNKLENBQUMsQ0FBQyxjQUNGLHdCQUFnQixPQUNuQixrRUFNRyxNQUF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yxFQUFFLENBQUMsNlVBaUJrQixPQUFPLENBQUMsa0JBQWtCLElBQUksTUFBTSxva0JBZ0JqQixNQUFNLENBQUMsVUFBVTtTQUM1RCxNQUFNLENBQUMsVUFBQyxDQUFDLElBQUssT0FBQSxDQUFDLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxXQUFXLENBQUMsRUFBOUIsQ0FBOEIsQ0FBQztTQUM3QyxHQUFHLENBQUMsVUFBQyxDQUFDLElBQUssT0FBQSwwQkFBa0IsQ0FBQyxDQUFDLElBQUksZ0JBQU8sSUFBQSwwQkFBWSxFQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsUUFBSSxFQUF2RCxDQUF1RCxDQUFDO1NBQ25FLElBQUksQ0FBQyxFQUFFLENBQUMsdUNBRWhCO0FBL0tnQyxDQStLaEMsQ0FBQTtBQW5MWSxRQUFBLGNBQWMsa0JBbUwxQiJ9
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiAppTmpl = void 0;
|
|
4
|
+
var types_1 = require("../../../../../types");
|
|
5
|
+
var utils_1 = require("../../../../../utils");
|
|
6
|
+
var uiAppTmpl = function (_a, options) {
|
|
7
|
+
var defaultLanguage = _a.system.defaultLanguage;
|
|
8
|
+
if (options === void 0) { options = types_1.defaultBootstrapEntityOptions; }
|
|
9
|
+
return "import * as React from 'react';\nimport {\n useState, useEffect,\n} from 'react';\nimport {\n Admin,\n AuthProvider,\n useTranslate,\n CustomRoutes,\n localStorageStore,\n} from 'react-admin';\nimport {\n ApolloClient,\n ApolloProvider,\n NormalizedCacheObject,\n} from '@apollo/client';\nimport polyglotI18nProvider from 'ra-i18n-polyglot';\nimport './App.css';\nimport Layout from './layout/Layout';\nimport Login from './layout/Login';\nimport defaultMessages from './i18n/".concat(defaultLanguage, "';\nimport dataProviderFactory from './dataProvider';\nimport getConfig from './config/config';\nimport {createBrowserHistory} from 'history';\nimport {getResources} from './adm/resources';\nimport Dashboard from './adm/Dashboard';\nimport {DebugProvider} from './contexts/DebugContext';\nimport getAuthProvider from './authProvider/getAuthProvider';\nimport {onStart} from './systemHooks';\nimport getApollo from './apollo/getApollo';\nimport Loader from './shared/Loader';\nimport {lightTheme} from './layout/themes';\nimport {routes} from './adm/routes';\nimport log from './utils/log';\n").concat(options.skipWarningThisIsGenerated
|
|
10
|
+
? ''
|
|
11
|
+
: "\n// ".concat(utils_1.generatedWarning, "\n"), "\nonStart();\n\nconst history = createBrowserHistory();\n\nconst i18nProvider = polyglotI18nProvider(locale => {\n switch (locale) {\n case 'en':\n return import('./i18n/en').then(messages => messages.default);\n case 'ru':\n return defaultMessages;\n default:\n log.error(`Unknown locale: \"${locale}\"`);\n return defaultMessages;\n }\n}, 'ru');\n\nconst App = () => {\n const [dataProvider, setDataProvider] = useState<any | null>(null);\n const [authProvider, setAuthProvider] = useState<AuthProvider | null>(null);\n const [client, setClient] = useState<ApolloClient<NormalizedCacheObject> | null>(null);\n const [authVersion, setAuthVersion] = useState(0);\n const translate = useTranslate();\n\n useEffect(() => {\n const fetchDataProvider = async () => {\n const config = await getConfig();\n setAuthProvider(getAuthProvider(config.endpoint, () => setAuthVersion(prev => prev + 1)));\n\n const client = getApollo(config.endpoint);\n setClient(client);\n const dataProviderInstance = await dataProviderFactory(client);\n setDataProvider(() => dataProviderInstance);\n };\n\n fetchDataProvider();\n }, [authVersion]);\n\n if (!dataProvider || !client || !authProvider) {\n return (\n <Loader />\n );\n }\n\n return (\n <ApolloProvider client={client}>\n <DebugProvider>\n <Admin\n dashboard={Dashboard}\n dataProvider={dataProvider}\n history={history}\n i18nProvider={i18nProvider}\n layout={Layout}\n loading={Loader}\n loginPage={Login}\n authProvider={authProvider}\n title=''\n theme={lightTheme}\n store={localStorageStore('2')}\n >\n {permissions => [\n (\n <CustomRoutes key='customRoutes'>\n {routes}\n </CustomRoutes>\n ),\n ...getResources(translate, permissions),\n ]}\n </Admin>\n </DebugProvider>\n </ApolloProvider>\n );\n};\n\nexport default App;\n");
|
|
12
|
+
};
|
|
13
|
+
exports.uiAppTmpl = uiAppTmpl;
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3Byb2plY3RzR2VuZXJhdGlvbi9nZW5lcmF0b3JzL2ZpbGVUZW1wbGF0ZXMvdWkvZW52aXJvbm1lbnQvc3JjL0FwcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSw4Q0FHNkI7QUFDN0IsOENBQXVEO0FBRWhELElBQU0sU0FBUyxHQUFHLFVBQ3ZCLEVBQTBELEVBQzFELE9BQStEO1FBRG5ELGVBQWUsNEJBQUE7SUFDM0Isd0JBQUEsRUFBQSxVQUFrQyxxQ0FBNkI7SUFDNUQsT0FBQSwrZUFvQmlDLGVBQWUsNGxCQWVuRCxPQUFPLENBQUMsMEJBQTBCO1FBQ2hDLENBQUMsQ0FBQyxFQUFFO1FBQ0osQ0FBQyxDQUFDLGVBQ0Qsd0JBQWdCLE9BQ3BCLGlpRUE0RUE7QUFuSEksQ0FtSEosQ0FBQTtBQXRIWSxRQUFBLFNBQVMsYUFzSHJCIn0=
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiSpacesContextTmpl = void 0;
|
|
4
|
+
var cases_1 = require("../../../../../../../utils/cases");
|
|
5
|
+
var utils_1 = require("../../../../../../utils");
|
|
6
|
+
var uiSpacesContextTmpl = function (_a) {
|
|
7
|
+
var prefix = _a.system.prefix, options = _a.options;
|
|
8
|
+
return "import React, {\n createContext,\n memo,\n useMemo,\n ReactNode,\n useContext,\n useState,\n useCallback,\n} from 'react';\nimport {\n envConfig,\n} from '../config/envConfig';\n".concat(options.skipWarningThisIsGenerated
|
|
9
|
+
? ''
|
|
10
|
+
: "\n// ".concat(utils_1.generatedWarning, "\n"), "\nexport enum Space {\n ").concat((0, cases_1.pascal)(prefix), " = '").concat((0, cases_1.pascal)(prefix), "',\n Demo = 'Demo',\n}\n\nexport const allSpaces = [\n Space.").concat((0, cases_1.pascal)(prefix), ",\n];\n\nexport interface ISpacesContext {\n availableSpaces: Space[];\n setAvailableSpaces: (spaces: Space[]) => void;\n isSpaceAvailable: (space: Space) => boolean;\n}\n\ninterface IProps {\n children: ReactNode | ReactNode[];\n}\n\nexport const SpacesContext = createContext<ISpacesContext>(\n {} as ISpacesContext,\n);\n\nexport const SpacesProvider = memo((props: IProps) => {\n const [availableSpaces, setAvailableSpaces] = useState<Space[]>(\n (envConfig.spaces && !envConfig.spaces.includes('SPACES')) ?\n envConfig.spaces.split(',') as Space[] :\n allSpaces,\n );\n\n const isSpaceAvailable = useCallback((space: Space) => availableSpaces.includes(space), [availableSpaces]);\n\n const context = useMemo<ISpacesContext>(\n () => ({\n availableSpaces,\n isSpaceAvailable,\n setAvailableSpaces,\n }),\n [availableSpaces, isSpaceAvailable],\n );\n\n return <SpacesContext.Provider {...props} value={context} />;\n});\n\nexport const useSpaces = (): ISpacesContext =>\n useContext(SpacesContext) as ISpacesContext;\n");
|
|
11
|
+
};
|
|
12
|
+
exports.uiSpacesContextTmpl = uiSpacesContextTmpl;
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU3BhY2VzQ29udGV4dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9wcm9qZWN0c0dlbmVyYXRpb24vZ2VuZXJhdG9ycy9maWxlVGVtcGxhdGVzL3VpL2Vudmlyb25tZW50L3NyYy9jb250ZXh0cy9TcGFjZXNDb250ZXh0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDBEQUF5RDtBQUV6RCxpREFBMEQ7QUFFbkQsSUFBTSxtQkFBbUIsR0FBRyxVQUFDLEVBR1I7UUFGaEIsTUFBTSxtQkFBQSxFQUNoQixPQUFPLGFBQUE7SUFDd0IsT0FBQSxvTUFhL0IsT0FBTyxDQUFDLDBCQUEwQjtRQUNoQyxDQUFDLENBQUMsRUFBRTtRQUNKLENBQUMsQ0FBQyxlQUNELHdCQUFnQixPQUNwQixzQ0FHRyxJQUFBLGNBQU0sRUFBQyxNQUFNLENBQUMsaUJBQU8sSUFBQSxjQUFNLEVBQUMsTUFBTSxDQUFDLDRFQUs3QixJQUFBLGNBQU0sRUFBQyxNQUFNLENBQUMsaWpDQXdDdkI7QUFqRWdDLENBaUVoQyxDQUFBO0FBcEVZLFFBQUEsbUJBQW1CLHVCQW9FL0IifQ==
|
package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/dataProvider/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiDataProviderTmpl = void 0;
|
|
4
|
+
var cases_1 = require("../../../../../../../utils/cases");
|
|
5
|
+
var types_1 = require("../../../../../../types");
|
|
6
|
+
var utils_1 = require("../../../../../../utils");
|
|
7
|
+
var metaUtils_1 = require("../../../../../../metaUtils");
|
|
8
|
+
var uiDataProviderTmpl = function (entities, options) {
|
|
9
|
+
if (options === void 0) { options = types_1.defaultBootstrapEntityOptions; }
|
|
10
|
+
return "import buildGraphQLProvider, {buildQuery as buildQueryFactory} from 'ra-data-graphql-simple';\nimport {IntrospectionResult} from 'ra-data-graphql';\nimport {DELETE} from 'ra-core';\nimport gql from 'graphql-tag';\nimport {IntrospectionType, IntrospectionSchema} from 'graphql';\nimport {mapping} from '../adm/entityMapping';\nimport sch from '../generated/graphql.schema.json';\nimport {ApolloClient} from '@apollo/client';\n".concat(options.skipWarningThisIsGenerated
|
|
11
|
+
? ''
|
|
12
|
+
: "\n// ".concat(utils_1.generatedWarning, "\n"), "\nconst schema = sch.__schema;\n\nconst getGqlResource = (resource: string) => {\n if (resource in mapping) {\n return mapping[resource as keyof typeof mapping];\n } else {\n throw new Error(`Unknown resource ${resource}`);\n }\n};\n\nconst numberIdResources: string[] = [\n ").concat(entities
|
|
13
|
+
.filter(function (m) { return (0, metaUtils_1.getKeyField)(m).type === 'bigint' || (0, metaUtils_1.getKeyField)(m).type === 'int'; })
|
|
14
|
+
.map(function (m) { return "'".concat((0, cases_1.camel)(m.name), "',"); }).join("\n "), "\n];\n\nconst customBuildQuery = (introspection: IntrospectionResult) =>\n (fetchType: string, originalResource: string, params: any) => {\n const resource = getGqlResource(originalResource);\n\n const builtQuery = buildQueryFactory(introspection)(fetchType, resource, params);\n\n if (numberIdResources.includes(resource) && fetchType === 'GET_ONE' && 'id' in params) {\n params.id = Number.parseInt(params.id, 10);\n }\n\n if (resource === 'Command' && fetchType === 'GET_ONE') {\n return {\n // Use the default query variables and parseResponse\n ...builtQuery,\n\n // Override the query\n query: gql`\n query Command($id: ID!) {\n data: Command(id: $id) {\n id\n reference\n customer {\n id\n firstName\n lastName\n }\n }\n }\n `,\n };\n }\n\n return builtQuery;\n };\n\nexport default (client: ApolloClient<unknown>) => buildGraphQLProvider({\n buildQuery: customBuildQuery,\n client: client as any,\n introspection: {\n schema: schema as unknown as IntrospectionSchema,\n operationNames: {\n [DELETE]: (resource: IntrospectionType) =>\n `remove${resource.name}`,\n },\n },\n});\n");
|
|
15
|
+
};
|
|
16
|
+
exports.uiDataProviderTmpl = uiDataProviderTmpl;
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2dlbmVyYXRvcnMvZmlsZVRlbXBsYXRlcy91aS9lbnZpcm9ubWVudC9zcmMvZGF0YVByb3ZpZGVyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDBEQUF3RDtBQUN4RCxpREFHZ0M7QUFFaEMsaURBQTBEO0FBQzFELHlEQUF5RDtBQUVsRCxJQUFNLGtCQUFrQixHQUFHLFVBQ2hDLFFBQWtCLEVBQ2xCLE9BQStEO0lBQS9ELHdCQUFBLEVBQUEsVUFBa0MscUNBQTZCO0lBQzVELE9BQUEsbWJBU0gsT0FBTyxDQUFDLDBCQUEwQjtRQUNoQyxDQUFDLENBQUMsRUFBRTtRQUNKLENBQUMsQ0FBQyxlQUNELHdCQUFnQixPQUNwQiwwU0FhRyxRQUFRO1NBQ1AsTUFBTSxDQUNMLFVBQUMsQ0FBQyxJQUFLLE9BQUEsSUFBQSx1QkFBVyxFQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksS0FBSyxRQUFRLElBQUksSUFBQSx1QkFBVyxFQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksS0FBSyxLQUFLLEVBQWpFLENBQWlFLENBQ3pFO1NBQ0EsR0FBRyxDQUFDLFVBQUMsQ0FBQyxJQUFLLE9BQUEsV0FBSSxJQUFBLGFBQUssRUFBQyxDQUFDLENBQUMsSUFBSSxDQUFDLE9BQUksRUFBckIsQ0FBcUIsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUN6QyxDQUFDLGkxQ0FpREg7QUFoRkksQ0FnRkosQ0FBQTtBQW5GWSxRQUFBLGtCQUFrQixzQkFtRjlCIn0=
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uiLayoutAppBarTmpl = void 0;
|
|
4
|
+
var types_1 = require("../../../../../../types");
|
|
5
|
+
var utils_1 = require("../../../../../../utils");
|
|
6
|
+
var uiLayoutAppBarTmpl = function (options) {
|
|
7
|
+
if (options === void 0) { options = types_1.defaultBootstrapEntityOptions; }
|
|
8
|
+
return "import * as React from 'react';\nimport {AppBar as RaAppBar, ToggleThemeButton, LocalesMenuButton} from 'react-admin';\nimport {Box, Typography} from '@mui/material';\nimport {Link} from 'react-router-dom';\nimport {darkTheme, lightTheme} from './themes';\nimport UserMenu from './UserMenu/UserMenu';\n".concat(options.skipWarningThisIsGenerated
|
|
9
|
+
? ''
|
|
10
|
+
: "\n// ".concat(utils_1.generatedWarning, "\n"), "\nconst AppBar = (props: any) => (\n <RaAppBar\n sx={{\n '& .RaAppBar-title': {\n flex: 1,\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n },\n }}\n {...props}\n elevation={1}\n color='secondary'\n userMenu={<UserMenu />}\n >\n <Typography\n variant='h6'\n color='inherit'\n id='react-admin-title'\n />\n <Box flex={1} />\n <Typography\n sx={{color: 'primary.main'}}\n color='inherit'\n id='react-admin-title'\n variant='h6'\n >\n <Link\n to='/'\n style={{textDecoration: 'none', color: 'inherit'}}\n >\n ").concat(options.projectName, "\n </Link>\n </Typography>\n <Box flex={1} />\n <ToggleThemeButton\n lightTheme={lightTheme}\n darkTheme={darkTheme}\n />\n <LocalesMenuButton\n languages={[\n {locale: 'ru', name: 'Russian'},\n {locale: 'en', name: 'English'},\n ]}\n />\n </RaAppBar>\n);\n\nexport default AppBar;\n");
|
|
11
|
+
};
|
|
12
|
+
exports.uiLayoutAppBarTmpl = uiLayoutAppBarTmpl;
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXBwQmFyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3Byb2plY3RzR2VuZXJhdGlvbi9nZW5lcmF0b3JzL2ZpbGVUZW1wbGF0ZXMvdWkvZW52aXJvbm1lbnQvc3JjL2xheW91dC9BcHBCYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaURBR2dDO0FBQ2hDLGlEQUEwRDtBQUVuRCxJQUFNLGtCQUFrQixHQUFHLFVBQ2hDLE9BQStEO0lBQS9ELHdCQUFBLEVBQUEsVUFBa0MscUNBQTZCO0lBQzVELE9BQUEsd1RBT0gsT0FBTyxDQUFDLDBCQUEwQjtRQUNoQyxDQUFDLENBQUMsRUFBRTtRQUNKLENBQUMsQ0FBQyxlQUNELHdCQUFnQixPQUNwQiw2cUJBaUNTLE9BQU8sQ0FBQyxXQUFXLDBWQWtCNUI7QUE5REksQ0E4REosQ0FBQTtBQWhFWSxRQUFBLGtCQUFrQixzQkFnRTlCIn0=
|