runlify 0.0.714 → 0.0.716
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +20 -52
- package/build/commands/availableEnvironments.js +16 -51
- package/build/commands/generate.js +10 -46
- package/build/commands/init.js +73 -140
- package/build/commands/login.js +6 -42
- package/build/commands/logout.js +5 -41
- package/build/commands/pullEnvs.js +23 -70
- package/build/commands/readEnv.js +16 -45
- package/build/commands/regen.js +17 -48
- package/build/commands/runlify.js +6 -37
- package/build/commands/showToken.js +14 -45
- package/build/commands/start.js +57 -84
- package/build/commands/tryGetMeta.js +7 -43
- package/build/documentation/algoritmToDoc.js +4 -4
- package/build/documentation/algoritmToDoc.spec.js +5 -5
- package/build/documentation/curlExampleToText.js +15 -16
- package/build/documentation/curlExampleToText.spec.js +32 -16
- package/build/documentation/doc.js +1 -2
- package/build/documentation/docToFlatDoc.js +13 -17
- package/build/documentation/docToFlatDoc.spec.js +9 -9
- package/build/documentation/flatDoc.js +1 -2
- package/build/documentation/flatDocToText.js +4 -6
- package/build/documentation/flatDocToText.spec.js +20 -8
- package/build/documentation/templateDoc.js +1 -2
- package/build/documentation/templateDocToDoc.js +2 -2
- package/build/extensions/auth.js +64 -124
- package/build/extensions/cli-extension.js +3 -3
- package/build/extensions/cloudEnv.js +76 -120
- package/build/extensions/cloudMeta.js +35 -73
- package/build/extensions/globalConfig.js +37 -80
- package/build/extensions/localConfig.js +15 -46
- package/build/extensions/preventRunningIfUpdateAvailable.js +18 -52
- package/build/log.js +6 -6
- package/build/projectsGeneration/args.js +33 -53
- package/build/projectsGeneration/builders/AdditionalServiceBuilder.js +62 -96
- package/build/projectsGeneration/builders/BaseBuilder.js +30 -34
- package/build/projectsGeneration/builders/BaseSavableEntityBuilder.js +272 -312
- package/build/projectsGeneration/builders/CatalogBuilder.js +17 -46
- package/build/projectsGeneration/builders/ConfigVarBuilder.js +25 -36
- package/build/projectsGeneration/builders/DeploymentBuilder.js +18 -47
- package/build/projectsGeneration/builders/DocumentBuilder.js +26 -56
- package/build/projectsGeneration/builders/InfoRegistryBuilder.js +106 -140
- package/build/projectsGeneration/builders/PageBuilder.js +22 -51
- package/build/projectsGeneration/builders/PermissionBuilder.js +12 -41
- package/build/projectsGeneration/builders/ReportBuilder.js +23 -52
- package/build/projectsGeneration/builders/RestApiBuilder.js +20 -50
- package/build/projectsGeneration/builders/RestApiMethodBuilder.js +25 -54
- package/build/projectsGeneration/builders/RoleBuilder.js +12 -41
- package/build/projectsGeneration/builders/SumRegistryBuilder.js +100 -133
- package/build/projectsGeneration/builders/SystemMetaBuilder.js +281 -324
- package/build/projectsGeneration/builders/TelegramBotBuilder.js +18 -47
- package/build/projectsGeneration/builders/docs/DocumentationOfDocumentBuilder.js +8 -9
- package/build/projectsGeneration/builders/fields/BaseFieldBuilder.js +89 -105
- package/build/projectsGeneration/builders/fields/IdFieldBuilder.js +24 -54
- package/build/projectsGeneration/builders/fields/LinkFieldBuilder.js +33 -62
- package/build/projectsGeneration/builders/fields/ModelFieldBuilder.js +18 -47
- package/build/projectsGeneration/builders/fields/ScalarFieldBuilder.js +11 -42
- package/build/projectsGeneration/builders/fields/ViewLinkFieldBuilder.js +26 -55
- package/build/projectsGeneration/builders/integrationClients/IntegrationClientArgsModelBuilder.js +6 -23
- package/build/projectsGeneration/builders/integrationClients/IntegrationClientBaseModelBuilder.js +28 -57
- package/build/projectsGeneration/builders/integrationClients/IntegrationClientBuilder.js +25 -54
- package/build/projectsGeneration/builders/integrationClients/IntegrationClientQueryMethodsBuilder.js +18 -47
- package/build/projectsGeneration/builders/integrationClients/IntegrationClientReturnModelBuilder.js +12 -41
- package/build/projectsGeneration/builders/materialUiIcons.js +2 -2
- package/build/projectsGeneration/builders/mehods/ArgsModelBuilder.js +6 -23
- package/build/projectsGeneration/builders/mehods/BaseModelBuilder.js +30 -59
- package/build/projectsGeneration/builders/mehods/MethodBuilder.js +36 -66
- package/build/projectsGeneration/builders/mehods/ReturnModelBuilder.js +12 -41
- package/build/projectsGeneration/builders/menu/BaseMenuItemBuilder.js +24 -54
- package/build/projectsGeneration/builders/menu/ExternalEnvMenuItemBuilder.js +11 -40
- package/build/projectsGeneration/builders/menu/ExternalMenuItemBuilder.js +11 -40
- package/build/projectsGeneration/builders/menu/GroupMenuItemBuilder.js +31 -66
- package/build/projectsGeneration/builders/menu/InternalMenuItemBuilder.js +16 -45
- package/build/projectsGeneration/builders/tsFilterFields.js +11 -12
- package/build/projectsGeneration/builders/tsFilterFields.spec.js +29 -11
- package/build/projectsGeneration/builders/ui/FormsBuilder.js +9 -10
- package/build/projectsGeneration/builders/ui/ListFormBuilder.js +9 -10
- package/build/projectsGeneration/builders/ui/ListFormFilterBuilder.js +14 -16
- package/build/projectsGeneration/builders/ui/ListFormFilterFieldBuilder.js +8 -9
- package/build/projectsGeneration/builders/utils/accessFunctions.js +4 -4
- package/build/projectsGeneration/builders/validation/baseValudationToYupAssertions.js +4 -4
- package/build/projectsGeneration/builders/validation/bigintValudationToYupAssertions.js +5 -5
- package/build/projectsGeneration/builders/validation/bigintValudationToYupAssertions.spec.js +7 -7
- package/build/projectsGeneration/builders/validation/floatValudationToYupAssertions.js +4 -4
- package/build/projectsGeneration/builders/validation/floatValudationToYupAssertions.spec.js +6 -6
- package/build/projectsGeneration/builders/validation/intValudationToYupAssertions.js +9 -9
- package/build/projectsGeneration/builders/validation/intValudationToYupAssertions.spec.js +9 -9
- package/build/projectsGeneration/builders/validation/numberValudationToYupAssertions.js +10 -10
- package/build/projectsGeneration/builders/validation/stringValudationToYupAssertions.js +6 -6
- package/build/projectsGeneration/builders/validation/stringValudationToYupAssertions.spec.js +6 -6
- package/build/projectsGeneration/commonEntities/addAggregateTrackings.js +3 -3
- package/build/projectsGeneration/commonEntities/addAuditLogs.js +6 -6
- package/build/projectsGeneration/commonEntities/addAutogeneration.js +4 -4
- package/build/projectsGeneration/commonEntities/addCommonCommands.js +2 -2
- package/build/projectsGeneration/commonEntities/addCommonEntities.js +14 -14
- package/build/projectsGeneration/commonEntities/addConfigurationVariables.js +4 -4
- package/build/projectsGeneration/commonEntities/addLanguages.js +3 -3
- package/build/projectsGeneration/commonEntities/addManagers.js +6 -6
- package/build/projectsGeneration/commonEntities/addRefreshTokens.js +4 -4
- package/build/projectsGeneration/commonEntities/addRoles.js +8 -8
- package/build/projectsGeneration/commonEntities/addTenants.js +3 -3
- package/build/projectsGeneration/commonEntities/addUserSettings.js +7 -7
- package/build/projectsGeneration/commonEntities/addUsers.js +4 -4
- package/build/projectsGeneration/defaultCatalogs/addElasticSearch.js +12 -13
- package/build/projectsGeneration/defaultCatalogs/files.js +6 -6
- package/build/projectsGeneration/fileCleaners/back/graphServices/cleanGraphServices.js +24 -59
- package/build/projectsGeneration/fileCleaners/back/services/cleanServices.js +32 -67
- package/build/projectsGeneration/fileCleaners/cleanFiles.js +7 -38
- package/build/projectsGeneration/fileCleaners/ui/cleanUi.js +7 -39
- package/build/projectsGeneration/fileCleaners/ui/pages/cleanPages.js +24 -59
- package/build/projectsGeneration/fileCleaners/ui/widgets/cleanWidgets.js +10 -40
- package/build/projectsGeneration/fileCleaners/ui/widgets/cleanWidgetsByType.js +29 -62
- package/build/projectsGeneration/genGraphSchemesByLocalGenerator.js +26 -68
- package/build/projectsGeneration/generateAdditionalService.js +41 -98
- package/build/projectsGeneration/generateEntity.js +215 -346
- package/build/projectsGeneration/generateEnvironment.js +157 -265
- package/build/projectsGeneration/generateProject.js +422 -724
- package/build/projectsGeneration/generators/fieldTypeToTsType.js +4 -4
- package/build/projectsGeneration/generators/fileTemplates/back/Entities.js +16 -14
- package/build/projectsGeneration/generators/fileTemplates/back/devEnum.js +17 -13
- package/build/projectsGeneration/generators/fileTemplates/back/elastic/elastic.js +8 -44
- package/build/projectsGeneration/generators/fileTemplates/back/elastic/jobs.js +36 -26
- package/build/projectsGeneration/generators/fileTemplates/back/enum.js +17 -13
- package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/Chart.js +12 -8
- package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/back.js +128 -12
- package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/ingress.js +54 -8
- package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/values.js +149 -13
- package/build/projectsGeneration/generators/fileTemplates/back/environment/ciNotify.js +19 -8
- package/build/projectsGeneration/generators/fileTemplates/back/environment/defaultEnv.js +5 -9
- package/build/projectsGeneration/generators/fileTemplates/back/environment/dockerfileTmplBack.js +38 -8
- package/build/projectsGeneration/generators/fileTemplates/back/environment/dockerfileTmplUI.js +42 -8
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocSpec.js +3 -6
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsConfiguration.js +27 -19
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsEntity.js +7 -5
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsIntegrationClient.js +44 -29
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsRestApi.js +45 -18
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/spec/findLinksToEntities.js +2 -4
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/spec/getAllSavableEntities.js +7 -11
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/spec/getProjectSpec.js +206 -216
- package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/spec/titleMd.js +5 -5
- package/build/projectsGeneration/generators/fileTemplates/back/environment/gitlabCi.js +272 -37
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/clients/getPrisma.js +78 -9
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/clients/queue/getQueue.js +42 -9
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/index.js +36 -9
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/IntegrationClient.js +56 -5
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/IntegrationClients.js +12 -9
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/fieldsToTsTypeFields.js +4 -6
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/integrationClientConstrictors.js +13 -9
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/tsModelTmpl.js +6 -4
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/types.js +15 -7
- package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalResolvers.js +9 -2
- package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalService/permissionToGraphql.js +16 -9
- package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalService/resolvers.js +32 -12
- package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalService/typeDefs.js +18 -11
- package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalTypes.js +7 -2
- package/build/projectsGeneration/generators/fileTemplates/back/graph/entityAdditionalPermissionToGraphqlTmpl.js +20 -9
- package/build/projectsGeneration/generators/fileTemplates/back/graph/entityBasePermissionToGraphql.js +22 -10
- package/build/projectsGeneration/generators/fileTemplates/back/graph/entityPermissionToGraphqlTmpl.js +18 -9
- package/build/projectsGeneration/generators/fileTemplates/back/graph/help/baseResolvers.js +17 -2
- package/build/projectsGeneration/generators/fileTemplates/back/graph/help/baseTypeDefs.js +15 -5
- package/build/projectsGeneration/generators/fileTemplates/back/graph/help/permissionsToGraphql.js +11 -2
- package/build/projectsGeneration/generators/fileTemplates/back/graph/meta/resolvers.js +26 -2
- package/build/projectsGeneration/generators/fileTemplates/back/graph/meta/typeDefs.js +17 -2
- package/build/projectsGeneration/generators/fileTemplates/back/graph/permissionsToGraphql.js +52 -13
- package/build/projectsGeneration/generators/fileTemplates/back/graph/resolvers.js +52 -13
- package/build/projectsGeneration/generators/fileTemplates/back/graph/types.js +18 -11
- package/build/projectsGeneration/generators/fileTemplates/back/initCommon.js +30 -16
- package/build/projectsGeneration/generators/fileTemplates/back/initDev.js +27 -15
- package/build/projectsGeneration/generators/fileTemplates/back/initEntities.js +24 -10
- package/build/projectsGeneration/generators/fileTemplates/back/root/config/config.js +31 -16
- package/build/projectsGeneration/generators/fileTemplates/back/root/restRouter.js +21 -2
- package/build/projectsGeneration/generators/fileTemplates/back/services/AdditionalServices.js +7 -2
- package/build/projectsGeneration/generators/fileTemplates/back/services/BaseServices.js +18 -22
- package/build/projectsGeneration/generators/fileTemplates/back/services/HelpService/HelpService.js +30 -7
- package/build/projectsGeneration/generators/fileTemplates/back/services/additionalService/types.js +18 -13
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/additionalClass.js +7 -5
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/class.js +126 -49
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/config.js +59 -40
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnCreate.js +13 -5
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnDelete.js +14 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnUpdate.js +14 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterCreate.js +15 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterDelete.js +15 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterUpdate.js +15 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeCreate.js +15 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeDelete.js +15 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeUpdate.js +14 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeUpsert.js +30 -7
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/changeListFilter.js +14 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/tenantIdRequiredHooks.js +81 -8
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/initBuiltInHooks.js +22 -10
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/initUserHooks.js +31 -6
- package/build/projectsGeneration/generators/fileTemplates/back/services/serviceConstrictors.js +26 -14
- package/build/projectsGeneration/generators/fileTemplates/ui/Dashboard.js +14 -2
- package/build/projectsGeneration/generators/fileTemplates/ui/MetaPage.js +120 -3
- package/build/projectsGeneration/generators/fileTemplates/ui/ResourcesPage.js +45 -10
- package/build/projectsGeneration/generators/fileTemplates/ui/additionalRoutes.js +5 -2
- package/build/projectsGeneration/generators/fileTemplates/ui/entityMapping.js +14 -12
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/Chart.js +12 -8
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/front.js +118 -13
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/ingress.js +51 -8
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/values.js +79 -8
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/ciNotify.js +19 -8
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/docs/adminAppDocsConfiguration.js +27 -21
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/gitlabCi.js +179 -26
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/App.js +107 -10
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/contexts/SpacesContext.js +67 -9
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/dataProvider/getAdditionalMethods.js +55 -18
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/dataProvider/index.js +93 -13
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/i18nProvider/index.js +51 -19
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/layout/AppBar.js +60 -9
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/layout/Menu.js +52 -9
- package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/routes.js +38 -9
- package/build/projectsGeneration/generators/fileTemplates/ui/functions/Functions.js +60 -7
- package/build/projectsGeneration/generators/fileTemplates/ui/getAdditionalMenu.js +11 -2
- package/build/projectsGeneration/generators/fileTemplates/ui/getDefaultMenu.js +136 -23
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangCatalogsTmpl.js +3 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangDocsTmpl.js +3 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangInfoRegistriesTmpl.js +3 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangReportsTmpl.js +3 -3
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangSumRegistriesTmpl.js +3 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiTranslationsForServicesOfSavablesTmpl.js +33 -21
- package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiTranslationsLangTmpl.js +23 -15
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityCreate/DefaultEntityCreate.js +101 -62
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityCreate/index.js +15 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityEdit/DefaultEntityEdit.js +176 -77
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityEdit/index.js +15 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/DefaultEntityFilter.js +68 -50
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/DefaultEntityList.js +83 -47
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/EntityFilter.js +12 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/index.js +15 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultActions.js +54 -19
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultEntityShow.js +53 -30
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultMainTab.js +45 -32
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DependencyTab.js +57 -41
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/MainTab.js +3 -2
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/additionalTabs.js +7 -3
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/index.js +15 -5
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/Icon.js +8 -8
- package/build/projectsGeneration/generators/fileTemplates/ui/pages/getEntityValidation.js +45 -30
- package/build/projectsGeneration/generators/fileTemplates/ui/resources.js +46 -12
- package/build/projectsGeneration/generators/fileTemplates/ui/widgets/count/CountWidget.js +50 -9
- package/build/projectsGeneration/generators/fileTemplates/ui/widgets/list/ListWidget.js +109 -14
- package/build/projectsGeneration/generators/graph/fieldTypeToGraphScalar.js +8 -9
- package/build/projectsGeneration/generators/graph/fieldTypeToGraphScalarStringified.js +4 -6
- package/build/projectsGeneration/generators/graph/fields/genGraphField.js +8 -9
- package/build/projectsGeneration/generators/graph/fields/genGraphIdField.js +7 -8
- package/build/projectsGeneration/generators/graph/fields/genGraphIdFieldType.js +6 -6
- package/build/projectsGeneration/generators/graph/fields/genGraphLinkField.js +10 -11
- package/build/projectsGeneration/generators/graph/fields/genGraphModelField.js +10 -11
- package/build/projectsGeneration/generators/graph/fields/genGraphScalarField.js +10 -11
- package/build/projectsGeneration/generators/graph/filters/genGraphField.js +7 -7
- package/build/projectsGeneration/generators/graph/filters/genGraphIdFilter.js +12 -14
- package/build/projectsGeneration/generators/graph/filters/genGraphLinkFilter.js +12 -24
- package/build/projectsGeneration/generators/graph/filters/genGraphScalarFilter.js +25 -37
- package/build/projectsGeneration/generators/graph/genGraphAdditionalServiceSchema.js +35 -35
- package/build/projectsGeneration/generators/graph/genGraphAdditionalServiceSchema.spec.js +148 -65
- package/build/projectsGeneration/generators/graph/genGraphCrudSchema.js +38 -50
- package/build/projectsGeneration/generators/graph/genGraphCrudSchema.spec.js +393 -34
- package/build/projectsGeneration/generators/graph/genGraphFilterType.js +11 -22
- package/build/projectsGeneration/generators/graph/genGraphFilterType.spec.js +75 -13
- package/build/projectsGeneration/generators/graph/genGraphModelType.js +15 -27
- package/build/projectsGeneration/generators/graph/genGraphType.js +7 -18
- package/build/projectsGeneration/generators/graph/genGraphType.spec.js +27 -12
- package/build/projectsGeneration/generators/graph/printGraphType.js +5 -7
- package/build/projectsGeneration/generators/graph/printGraphType.spec.js +11 -6
- package/build/projectsGeneration/generators/graph/utils/mapUtils.js +11 -30
- package/build/projectsGeneration/generators/graph/utils/models/getModelInitOrder.js +14 -28
- package/build/projectsGeneration/generators/graph/utils/models/getModelInitOrder.spec.js +18 -18
- package/build/projectsGeneration/generators/graph/utils/models/getUniqModels.js +3 -3
- package/build/projectsGeneration/generators/graph/utils/models/getUniqModels.spec.js +17 -28
- package/build/projectsGeneration/generators/graph/utils/models/getUsedModels.js +14 -19
- package/build/projectsGeneration/generators/graph/utils/models/getUsedModels.spec.js +40 -51
- package/build/projectsGeneration/generators/graph/utils/serviceModels/augmentInputModelsByUsedAsInputGeneralModelsAndPostfixThemByInput.js +17 -26
- package/build/projectsGeneration/generators/graph/utils/serviceModels/augmentInputModelsByUsedAsInputGeneralModelsAndPostfixThemByInput.spec.js +68 -68
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getGraphTypesFromInputOutputModels.js +21 -42
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getGraphTypesFromInputOutputModels.spec.js +85 -62
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getPreparedModelsForGraph.js +20 -31
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getPreparedModelsForGraph.spec.js +48 -49
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getServiceModels.js +7 -7
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getUsedGraphModelsForService.js +6 -6
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getUsedGraphModelsForService.spec.js +13 -13
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getUsedModelsForService.js +18 -21
- package/build/projectsGeneration/generators/graph/utils/serviceModels/getUsedModelsForService.spec.js +153 -153
- package/build/projectsGeneration/generators/graph/utils/serviceModels/prefixServiceModelsWithServiceName.js +25 -26
- package/build/projectsGeneration/generators/graph/utils/serviceModels/prefixServiceModelsWithServiceName.spec.js +69 -69
- package/build/projectsGeneration/generators/graph/utils/serviceModels/removeDublicatesFromServiceModels.js +4 -4
- package/build/projectsGeneration/generators/graph/utils/serviceModels/removeUnusedInOutputGeneralModels.js +6 -17
- package/build/projectsGeneration/generators/graph/utils/serviceModels/removeVoidsInServiceModels.js +5 -5
- package/build/projectsGeneration/generators/prisma/fieldIdTypeToPrismaType.js +3 -3
- package/build/projectsGeneration/generators/prisma/fieldTypeToPrismaType.js +3 -3
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaDefault.js +3 -3
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaDefault.spec.js +20 -20
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaField.js +7 -8
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaFieldFromExternalEntity.js +6 -7
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaFieldFromExternalEntity.spec.js +7 -19
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaIdField.js +10 -11
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaIdField.spec.js +13 -13
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaLinkFields.js +15 -18
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaLinkFields.spec.js +27 -28
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaScalarField.js +12 -14
- package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaScalarField.spec.js +29 -30
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaEntity.js +23 -32
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaEntity.spec.js +104 -47
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntities.js +5 -7
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntitiesWithClientAdnDb.js +19 -10
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNameToEditScalar.js +3 -3
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditField.js +7 -7
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditIdField.js +3 -3
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditLinkField.js +5 -5
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditLinkField.spec.js +10 -10
- package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditScalarField.js +3 -3
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNameToShowScalar.js +3 -3
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowField.js +7 -7
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowIdField.js +3 -3
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowLinkField.js +2 -14
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowLinkField.spec.js +17 -17
- package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowScalarField.js +3 -3
- package/build/projectsGeneration/generators/ui/getLinkShowComponent.spec.js +18 -18
- package/build/projectsGeneration/generators/ui/getScalarShowComponent.spec.js +11 -11
- package/build/projectsGeneration/generators/ui/getShowComponent.js +19 -20
- package/build/projectsGeneration/links/getLinksFromExternalEntities.js +2 -4
- package/build/projectsGeneration/links/getLinksFromExternalEntities.spec.js +11 -22
- package/build/projectsGeneration/links/getLinksOfEntities.js +6 -8
- package/build/projectsGeneration/links/getLinksOfEntities.spec.js +20 -31
- package/build/projectsGeneration/links/getLinksToExternalEntities.js +2 -4
- package/build/projectsGeneration/links/getLinksToExternalEntities.spec.js +11 -22
- package/build/projectsGeneration/metaUtils.js +17 -23
- package/build/projectsGeneration/modelsGeneration.serialization.spec.js +8 -8
- package/build/projectsGeneration/modules/addEmailModuleEntities.js +11 -11
- package/build/projectsGeneration/types.js +6 -6
- package/build/projectsGeneration/utils.js +24 -61
- package/build/refs/yup.spec.js +7 -7
- package/build/types/projectsGeneration/builders/InfoRegistryBuilder.d.ts +0 -4
- package/build/types/projectsGeneration/builders/SumRegistryBuilder.d.ts +0 -3
- package/build/types/projectsGeneration/fileCleaners/cleanFiles.d.ts +1 -1
- package/build/types/projectsGeneration/generateProject.d.ts +0 -5
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/back.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/ingress.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/dockerfileTmplBack.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/dockerfileTmplUI.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/IntegrationClient.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/config.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/front.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/ingress.d.ts +1 -1
- package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/src/App.d.ts +1 -1
- package/build/utils/TermSignals.js +35 -43
- package/build/utils/cases.js +12 -18
- package/build/utils/getPkgManager.js +4 -4
- package/package.json +12 -24
- package/build/projectsGeneration/fileCleaners/back/cleanBack.js +0 -50
- package/build/types/projectsGeneration/fileCleaners/back/cleanBack.d.ts +0 -3
package/build/cli.js
CHANGED
|
@@ -8,62 +8,30 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
|
|
12
|
+
const gluegun_1 = require("gluegun");
|
|
40
13
|
/**
|
|
41
14
|
* Create the cli and kick it off
|
|
42
15
|
*/
|
|
43
16
|
function run(argv) {
|
|
44
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
toolbox = _a.sent();
|
|
62
|
-
// send it back (for testing, mostly)
|
|
63
|
-
return [2 /*return*/, toolbox];
|
|
64
|
-
}
|
|
65
|
-
});
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
// create a CLI runtime
|
|
19
|
+
const cli = (0, gluegun_1.build)()
|
|
20
|
+
.brand('runlify')
|
|
21
|
+
.src(__dirname)
|
|
22
|
+
.plugins('./node_modules', { matching: 'runlify-*', hidden: true })
|
|
23
|
+
.help() // provides default for help, h, --help, -h
|
|
24
|
+
.version() // provides default for version, v, --version, -v
|
|
25
|
+
.checkForUpdates(100)
|
|
26
|
+
.create();
|
|
27
|
+
// enable the following method if you'd like to skip loading one of these core extensions
|
|
28
|
+
// this can improve performance if they're not necessary for your project:
|
|
29
|
+
// .exclude(['meta', 'strings', 'print', 'filesystem', 'semver', 'system', 'prompt', 'http', 'template', 'patching', 'package-manager'])
|
|
30
|
+
// and run it
|
|
31
|
+
const toolbox = yield cli.run(argv);
|
|
32
|
+
// send it back (for testing, mostly)
|
|
33
|
+
return toolbox;
|
|
66
34
|
});
|
|
67
35
|
}
|
|
68
|
-
module.exports = { run
|
|
69
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
36
|
+
module.exports = { run };
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NsaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBLHFDQUErQjtBQUUvQjs7R0FFRztBQUNILFNBQWUsR0FBRyxDQUFDLElBQVM7O1FBQzFCLHVCQUF1QjtRQUN2QixNQUFNLEdBQUcsR0FBRyxJQUFBLGVBQUssR0FBRTthQUNoQixLQUFLLENBQUMsU0FBUyxDQUFDO2FBQ2hCLEdBQUcsQ0FBQyxTQUFTLENBQUM7YUFDZCxPQUFPLENBQUMsZ0JBQWdCLEVBQUUsRUFBRSxRQUFRLEVBQUUsV0FBVyxFQUFFLE1BQU0sRUFBRSxJQUFJLEVBQUUsQ0FBQzthQUNsRSxJQUFJLEVBQUUsQ0FBQywyQ0FBMkM7YUFDbEQsT0FBTyxFQUFFLENBQUMsaURBQWlEO2FBQzNELGVBQWUsQ0FBQyxHQUFHLENBQUM7YUFDcEIsTUFBTSxFQUFFLENBQUE7UUFDWCx5RkFBeUY7UUFDekYsMEVBQTBFO1FBQzFFLHdJQUF3STtRQUN4SSxhQUFhO1FBRWIsTUFBTSxPQUFPLEdBQUcsTUFBTSxHQUFHLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxDQUFBO1FBRW5DLHFDQUFxQztRQUNyQyxPQUFPLE9BQU8sQ0FBQTtJQUNoQixDQUFDO0NBQUE7QUFFRCxNQUFNLENBQUMsT0FBTyxHQUFHLEVBQUUsR0FBRyxFQUFFLENBQUEifQ==
|
|
@@ -8,59 +8,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
12
|
module.exports = {
|
|
40
13
|
name: 'availableEnvironments',
|
|
41
14
|
alias: ['a'],
|
|
42
|
-
run:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
)];
|
|
58
|
-
case 1:
|
|
59
|
-
availableEnvironments = _a.sent();
|
|
60
|
-
info(availableEnvironments);
|
|
61
|
-
return [2 /*return*/];
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}); },
|
|
15
|
+
run: (toolbox) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const { print: { info }, } = toolbox;
|
|
17
|
+
const { getAvailableEnvironments } = toolbox.cloudEnv;
|
|
18
|
+
// /environmentVariables
|
|
19
|
+
const { getConfig } = toolbox.localConfig;
|
|
20
|
+
const config = getConfig();
|
|
21
|
+
const availableEnvironments = yield getAvailableEnvironments(config.main.projectName
|
|
22
|
+
// [
|
|
23
|
+
// 'back',
|
|
24
|
+
// 'worker',
|
|
25
|
+
// 'telegramBot',
|
|
26
|
+
// ]
|
|
27
|
+
);
|
|
28
|
+
info(availableEnvironments);
|
|
29
|
+
}),
|
|
65
30
|
};
|
|
66
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
31
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXZhaWxhYmxlRW52aXJvbm1lbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbW1hbmRzL2F2YWlsYWJsZUVudmlyb25tZW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUVBLE1BQU0sQ0FBQyxPQUFPLEdBQUc7SUFDZixJQUFJLEVBQUUsdUJBQXVCO0lBQzdCLEtBQUssRUFBRSxDQUFDLEdBQUcsQ0FBQztJQUNaLEdBQUcsRUFBRSxDQUFPLE9BQXVCLEVBQUUsRUFBRTtRQUNyQyxNQUFNLEVBQ0osS0FBSyxFQUFFLEVBQUUsSUFBSSxFQUFFLEdBQ2hCLEdBQUcsT0FBTyxDQUFBO1FBRVgsTUFBTSxFQUFFLHdCQUF3QixFQUFFLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQTtRQUNyRCx3QkFBd0I7UUFDeEIsTUFBTSxFQUFFLFNBQVMsRUFBRSxHQUFHLE9BQU8sQ0FBQyxXQUFXLENBQUE7UUFFekMsTUFBTSxNQUFNLEdBQUcsU0FBUyxFQUFFLENBQUE7UUFFMUIsTUFBTSxxQkFBcUIsR0FBRyxNQUFNLHdCQUF3QixDQUMxRCxNQUFNLENBQUMsSUFBSSxDQUFDLFdBQVc7UUFDdkIsSUFBSTtRQUNKLFlBQVk7UUFDWixjQUFjO1FBQ2QsbUJBQW1CO1FBQ25CLElBQUk7U0FDTCxDQUFBO1FBQ0QsSUFBSSxDQUFDLHFCQUFxQixDQUFDLENBQUE7SUFDN0IsQ0FBQyxDQUFBO0NBQ0YsQ0FBQSJ9
|
|
@@ -8,55 +8,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
12
|
module.exports = {
|
|
40
13
|
name: 'generate',
|
|
41
14
|
alias: ['g'],
|
|
42
|
-
run:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return [4 /*yield*/, generate({
|
|
50
|
-
template: 'model.ts.ejs',
|
|
51
|
-
target: "models/".concat(name, "-model.ts"),
|
|
52
|
-
props: { name: name },
|
|
53
|
-
})];
|
|
54
|
-
case 1:
|
|
55
|
-
_a.sent();
|
|
56
|
-
info("Generated file at models/".concat(name, "-model.ts"));
|
|
57
|
-
return [2 /*return*/];
|
|
58
|
-
}
|
|
15
|
+
run: (toolbox) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const { parameters, template: { generate }, print: { info }, } = toolbox;
|
|
17
|
+
const name = parameters.first;
|
|
18
|
+
yield generate({
|
|
19
|
+
template: 'model.ts.ejs',
|
|
20
|
+
target: `models/${name}-model.ts`,
|
|
21
|
+
props: { name },
|
|
59
22
|
});
|
|
60
|
-
|
|
23
|
+
info(`Generated file at models/${name}-model.ts`);
|
|
24
|
+
}),
|
|
61
25
|
};
|
|
62
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29tbWFuZHMvZ2VuZXJhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFFQSxNQUFNLENBQUMsT0FBTyxHQUFHO0lBQ2YsSUFBSSxFQUFFLFVBQVU7SUFDaEIsS0FBSyxFQUFFLENBQUMsR0FBRyxDQUFDO0lBQ1osR0FBRyxFQUFFLENBQU8sT0FBdUIsRUFBRSxFQUFFO1FBQ3JDLE1BQU0sRUFDSixVQUFVLEVBQ1YsUUFBUSxFQUFFLEVBQUUsUUFBUSxFQUFFLEVBQ3RCLEtBQUssRUFBRSxFQUFFLElBQUksRUFBRSxHQUNoQixHQUFHLE9BQU8sQ0FBQTtRQUVYLE1BQU0sSUFBSSxHQUFHLFVBQVUsQ0FBQyxLQUFLLENBQUE7UUFFN0IsTUFBTSxRQUFRLENBQUM7WUFDYixRQUFRLEVBQUUsY0FBYztZQUN4QixNQUFNLEVBQUUsVUFBVSxJQUFJLFdBQVc7WUFDakMsS0FBSyxFQUFFLEVBQUUsSUFBSSxFQUFFO1NBQ2hCLENBQUMsQ0FBQTtRQUVGLElBQUksQ0FBQyw0QkFBNEIsSUFBSSxXQUFXLENBQUMsQ0FBQTtJQUNuRCxDQUFDLENBQUE7Q0FDRixDQUFBIn0=
|
package/build/commands/init.js
CHANGED
|
@@ -31,154 +31,87 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
-
function step(op) {
|
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
41
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
-
switch (op[0]) {
|
|
44
|
-
case 0: case 1: t = op; break;
|
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
-
default:
|
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
-
if (t[2]) _.ops.pop();
|
|
54
|
-
_.trys.pop(); continue;
|
|
55
|
-
}
|
|
56
|
-
op = body.call(thisArg, _);
|
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
-
|
|
63
|
-
|
|
35
|
+
const path = __importStar(require("path"));
|
|
36
|
+
const os = __importStar(require("os"));
|
|
64
37
|
module.exports = {
|
|
65
38
|
name: 'init',
|
|
66
39
|
alias: ['i'],
|
|
67
|
-
run:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
40
|
+
run: (toolbox) => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
+
const { parameters, template: { generate }, print: { info, warning }, } = toolbox;
|
|
42
|
+
const projectName = parameters.first;
|
|
43
|
+
const projectCategory = parameters.second;
|
|
44
|
+
if (!toolbox.filesystem.exists('runlify.developer.example.json')) {
|
|
45
|
+
yield generate({
|
|
46
|
+
template: 'runlify.developer.example.json.ejs',
|
|
47
|
+
target: 'runlify.developer.example.json',
|
|
48
|
+
});
|
|
49
|
+
info('Generated runlify.developer.example.json');
|
|
50
|
+
}
|
|
51
|
+
if (!toolbox.filesystem.exists('runlify.json')) {
|
|
52
|
+
yield generate({
|
|
53
|
+
template: 'runlify.json.ejs',
|
|
54
|
+
target: 'runlify.json',
|
|
55
|
+
props: { projectName, projectCategory },
|
|
56
|
+
});
|
|
57
|
+
info('Generated runlify.json');
|
|
58
|
+
}
|
|
59
|
+
if (!(yield toolbox.patching.exists('.gitignore', 'runlify.developer.json'))) {
|
|
60
|
+
info('.gitignore does not contains "runlify.developer.json", appending it');
|
|
61
|
+
yield toolbox.patching.append('.gitignore', '\nrunlify.developer.json\n');
|
|
62
|
+
}
|
|
63
|
+
if (!toolbox.filesystem.exists('runlify.developer.json')) {
|
|
64
|
+
toolbox.filesystem.copy('runlify.developer.example.json', 'runlify.developer.json');
|
|
65
|
+
info('Copied runlify.developer.example.json to runlify.developer.json');
|
|
66
|
+
}
|
|
67
|
+
const hasYarn = toolbox.packageManager.hasYarn();
|
|
68
|
+
info(`hasYarn: ${hasYarn}`);
|
|
69
|
+
if (hasYarn) {
|
|
70
|
+
const pathEnv = process.env.PATH;
|
|
71
|
+
info(`pathEnv: ${pathEnv}`);
|
|
72
|
+
const yarnBin = yield toolbox.system.exec('yarn global bin');
|
|
73
|
+
const hasYarnBinInPath = pathEnv === null || pathEnv === void 0 ? void 0 : pathEnv.includes(yarnBin);
|
|
74
|
+
info(`hasYarnBinInPath: ${hasYarnBinInPath}`);
|
|
75
|
+
if (!hasYarnBinInPath) {
|
|
76
|
+
const tryToAddToProfile = (pathEnv) => __awaiter(void 0, void 0, void 0, function* () {
|
|
77
|
+
info(`tryToAddToProfile, pathEnv: ${pathEnv}`);
|
|
78
|
+
info(`toolbox.filesystem.exists(pathEnv): ${toolbox.filesystem.exists(pathEnv)}`);
|
|
79
|
+
if (!toolbox.filesystem.exists(pathEnv)) {
|
|
80
|
+
return;
|
|
107
81
|
}
|
|
108
|
-
|
|
109
|
-
info(
|
|
110
|
-
if (
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
info("hasYarnBinInProfile: ".concat(hasYarnBinInProfile));
|
|
133
|
-
if (hasYarnBinInProfile) {
|
|
134
|
-
return [2 /*return*/];
|
|
135
|
-
}
|
|
136
|
-
return [4 /*yield*/, toolbox.prompt.ask({
|
|
137
|
-
name: 'addYarnBinToProfile',
|
|
138
|
-
message: "Would you like to add yarn bin to ".concat(pathEnv, "?"),
|
|
139
|
-
type: 'confirm',
|
|
140
|
-
initial: true,
|
|
141
|
-
})];
|
|
142
|
-
case 2:
|
|
143
|
-
addYarnBinToProfile = (_a.sent()).addYarnBinToProfile;
|
|
144
|
-
info("addYarnBinToProfile: ".concat(addYarnBinToProfile));
|
|
145
|
-
if (!addYarnBinToProfile) return [3 /*break*/, 4];
|
|
146
|
-
return [4 /*yield*/, toolbox.filesystem.append(pathEnv, '\nexport PATH="$(yarn global bin):$PATH"\n')];
|
|
147
|
-
case 3:
|
|
148
|
-
_a.sent();
|
|
149
|
-
_a.label = 4;
|
|
150
|
-
case 4: return [2 /*return*/];
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
}); };
|
|
154
|
-
if (!(os.platform() === 'win32')) return [3 /*break*/, 10];
|
|
155
|
-
_b = warning;
|
|
156
|
-
_c = "You should add \"".concat;
|
|
157
|
-
return [4 /*yield*/, toolbox.system.exec('yarn global bin')];
|
|
158
|
-
case 9:
|
|
159
|
-
_b.apply(void 0, [_c.apply("You should add \"", [_d.sent(), "\" to your Path environment variable.\nHow-to in eng: https://helpdeskgeek.com/windows-10/add-windows-path-environment-variable/\nHow-to in ru: https://remontka.pro/environment-variables-windows/\nThen restart your computer.\nAfter restart double check that Path environment variable was updated by you."])]);
|
|
160
|
-
return [3 /*break*/, 13];
|
|
161
|
-
case 10:
|
|
162
|
-
// toolbox.filesystem.file(
|
|
163
|
-
// path.join(toolbox.filesystem.homedir(), '.bashrc')
|
|
164
|
-
// )
|
|
165
|
-
return [4 /*yield*/, tryToAddToProfile(path.join(toolbox.filesystem.homedir(), '.bashrc'))
|
|
166
|
-
// await tryToAddToProfile(`${toolbox.filesystem.homedir}/.bash_profile
|
|
167
|
-
];
|
|
168
|
-
case 11:
|
|
82
|
+
const hasYarnBinInProfile = yield toolbox.patching.exists(pathEnv, 'yarn global bin');
|
|
83
|
+
info(`hasYarnBinInProfile: ${hasYarnBinInProfile}`);
|
|
84
|
+
if (hasYarnBinInProfile) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const { addYarnBinToProfile } = yield toolbox.prompt.ask({
|
|
88
|
+
name: 'addYarnBinToProfile',
|
|
89
|
+
message: `Would you like to add yarn bin to ${pathEnv}?`,
|
|
90
|
+
type: 'confirm',
|
|
91
|
+
initial: true,
|
|
92
|
+
});
|
|
93
|
+
info(`addYarnBinToProfile: ${addYarnBinToProfile}`);
|
|
94
|
+
if (addYarnBinToProfile) {
|
|
95
|
+
yield toolbox.filesystem.append(pathEnv, '\nexport PATH="$(yarn global bin):$PATH"\n');
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
if (os.platform() === 'win32') {
|
|
99
|
+
warning(`You should add "${yield toolbox.system.exec('yarn global bin')}" to your Path environment variable.
|
|
100
|
+
How-to in eng: https://helpdeskgeek.com/windows-10/add-windows-path-environment-variable/
|
|
101
|
+
How-to in ru: https://remontka.pro/environment-variables-windows/
|
|
102
|
+
Then restart your computer.
|
|
103
|
+
After restart double check that Path environment variable was updated by you.`);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
169
106
|
// toolbox.filesystem.file(
|
|
170
107
|
// path.join(toolbox.filesystem.homedir(), '.bashrc')
|
|
171
108
|
// )
|
|
172
|
-
|
|
173
|
-
// await tryToAddToProfile(`${toolbox.filesystem.homedir}/.bash_profile
|
|
174
|
-
return [4 /*yield*/, tryToAddToProfile(path.join(toolbox.filesystem.homedir(), '.zshrc'))];
|
|
175
|
-
case 12:
|
|
109
|
+
yield tryToAddToProfile(path.join(toolbox.filesystem.homedir(), '.bashrc'));
|
|
176
110
|
// await tryToAddToProfile(`${toolbox.filesystem.homedir}/.bash_profile
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
case 13: return [2 /*return*/];
|
|
111
|
+
yield tryToAddToProfile(path.join(toolbox.filesystem.homedir(), '.zshrc'));
|
|
112
|
+
}
|
|
180
113
|
}
|
|
181
|
-
}
|
|
182
|
-
})
|
|
114
|
+
}
|
|
115
|
+
}),
|
|
183
116
|
};
|
|
184
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
117
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5pdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tYW5kcy9pbml0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFDQSwyQ0FBNEI7QUFDNUIsdUNBQXdCO0FBRXhCLE1BQU0sQ0FBQyxPQUFPLEdBQUc7SUFDZixJQUFJLEVBQUUsTUFBTTtJQUNaLEtBQUssRUFBRSxDQUFDLEdBQUcsQ0FBQztJQUNaLEdBQUcsRUFBRSxDQUFPLE9BQXVCLEVBQUUsRUFBRTtRQUNyQyxNQUFNLEVBQ0osVUFBVSxFQUNWLFFBQVEsRUFBRSxFQUFFLFFBQVEsRUFBRSxFQUN0QixLQUFLLEVBQUUsRUFBRSxJQUFJLEVBQUUsT0FBTyxFQUFFLEdBQ3pCLEdBQUcsT0FBTyxDQUFBO1FBRVgsTUFBTSxXQUFXLEdBQUcsVUFBVSxDQUFDLEtBQUssQ0FBQTtRQUNwQyxNQUFNLGVBQWUsR0FBRyxVQUFVLENBQUMsTUFBTSxDQUFBO1FBRXpDLElBQUksQ0FBQyxPQUFPLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxnQ0FBZ0MsQ0FBQyxFQUFFO1lBQ2hFLE1BQU0sUUFBUSxDQUFDO2dCQUNiLFFBQVEsRUFBRSxvQ0FBb0M7Z0JBQzlDLE1BQU0sRUFBRSxnQ0FBZ0M7YUFDekMsQ0FBQyxDQUFBO1lBQ0YsSUFBSSxDQUFDLDBDQUEwQyxDQUFDLENBQUE7U0FDakQ7UUFFRCxJQUFJLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxNQUFNLENBQUMsY0FBYyxDQUFDLEVBQUU7WUFDOUMsTUFBTSxRQUFRLENBQUM7Z0JBQ2IsUUFBUSxFQUFFLGtCQUFrQjtnQkFDNUIsTUFBTSxFQUFFLGNBQWM7Z0JBQ3RCLEtBQUssRUFBRSxFQUFFLFdBQVcsRUFBRSxlQUFlLEVBQUU7YUFDeEMsQ0FBQyxDQUFBO1lBQ0YsSUFBSSxDQUFDLHdCQUF3QixDQUFDLENBQUE7U0FDL0I7UUFFRCxJQUNFLENBQUMsQ0FB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
|
package/build/commands/login.js
CHANGED
|
@@ -8,51 +8,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
12
|
module.exports = {
|
|
40
13
|
name: 'login',
|
|
41
14
|
alias: ['l'],
|
|
42
|
-
run:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
case 0:
|
|
47
|
-
parameters = toolbox.parameters, login = toolbox.auth.login;
|
|
48
|
-
return [4 /*yield*/, login({
|
|
49
|
-
ifNotLoggedIn: parameters.options.ifNotLoggedIn,
|
|
50
|
-
})];
|
|
51
|
-
case 1:
|
|
52
|
-
_a.sent();
|
|
53
|
-
return [2 /*return*/];
|
|
54
|
-
}
|
|
15
|
+
run: (toolbox) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const { parameters, auth: { login } } = toolbox;
|
|
17
|
+
yield login({
|
|
18
|
+
ifNotLoggedIn: parameters.options.ifNotLoggedIn,
|
|
55
19
|
});
|
|
56
|
-
})
|
|
20
|
+
}),
|
|
57
21
|
};
|
|
58
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9naW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29tbWFuZHMvbG9naW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFFQSxNQUFNLENBQUMsT0FBTyxHQUFHO0lBQ2YsSUFBSSxFQUFFLE9BQU87SUFDYixLQUFLLEVBQUUsQ0FBQyxHQUFHLENBQUM7SUFDWixHQUFHLEVBQUUsQ0FBTyxPQUF1QixFQUFFLEVBQUU7UUFDckMsTUFBTSxFQUNKLFVBQVUsRUFDVixJQUFJLEVBQUUsRUFBQyxLQUFLLEVBQUMsRUFDZCxHQUFHLE9BQU8sQ0FBQztRQUVaLE1BQU0sS0FBSyxDQUFDO1lBQ1YsYUFBYSxFQUFFLFVBQVUsQ0FBQyxPQUFPLENBQUMsYUFBYTtTQUNoRCxDQUFDLENBQUE7SUFDSixDQUFDLENBQUE7Q0FDRixDQUFBIn0=
|
package/build/commands/logout.js
CHANGED
|
@@ -8,49 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
12
|
module.exports = {
|
|
40
13
|
name: 'logout',
|
|
41
14
|
alias: ['o'],
|
|
42
|
-
run:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
case 0:
|
|
47
|
-
logout = toolbox.auth.logout;
|
|
48
|
-
return [4 /*yield*/, logout()];
|
|
49
|
-
case 1:
|
|
50
|
-
_a.sent();
|
|
51
|
-
return [2 /*return*/];
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}); },
|
|
15
|
+
run: (toolbox) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const { logout } = toolbox.auth;
|
|
17
|
+
yield logout();
|
|
18
|
+
}),
|
|
55
19
|
};
|
|
56
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nb3V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbW1hbmRzL2xvZ291dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUVBLE1BQU0sQ0FBQyxPQUFPLEdBQUc7SUFDZixJQUFJLEVBQUUsUUFBUTtJQUNkLEtBQUssRUFBRSxDQUFDLEdBQUcsQ0FBQztJQUNaLEdBQUcsRUFBRSxDQUFPLE9BQXVCLEVBQUUsRUFBRTtRQUNyQyxNQUFNLEVBQUUsTUFBTSxFQUFFLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQTtRQUUvQixNQUFNLE1BQU0sRUFBRSxDQUFBO0lBQ2hCLENBQUMsQ0FBQTtDQUNGLENBQUEifQ==
|