fam-archetype-app 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/package.json +25 -0
- package/src/collection.json +10 -0
- package/src/fam-archetype-app/files/.editorconfig +16 -0
- package/src/fam-archetype-app/files/.prettierignore +15 -0
- package/src/fam-archetype-app/files/.prettierrc.json +29 -0
- package/src/fam-archetype-app/files/LICENSE.md +21 -0
- package/src/fam-archetype-app/files/README.md +59 -0
- package/src/fam-archetype-app/files/angular.json.template +178 -0
- package/src/fam-archetype-app/files/cli +361 -0
- package/src/fam-archetype-app/files/eslint.config.js +89 -0
- package/src/fam-archetype-app/files/package-lock.json.template +18812 -0
- package/src/fam-archetype-app/files/package.json.template +62 -0
- package/src/fam-archetype-app/files/src/assets/fonts/DiBaScreen-Regular.woff2 +0 -0
- package/src/fam-archetype-app/files/src/assets/translations/translations-ca.json +284 -0
- package/src/fam-archetype-app/files/src/assets/translations/translations-en.json +28 -0
- package/src/fam-archetype-app/files/src/assets/translations/translations-es.json +28 -0
- package/src/fam-archetype-app/files/src/core/layout/component/footer/footer.component.html.template +3 -0
- package/src/fam-archetype-app/files/src/core/layout/component/footer/footer.component.scss +8 -0
- package/src/fam-archetype-app/files/src/core/layout/component/layout/layout.component.html +19 -0
- package/src/fam-archetype-app/files/src/core/layout/component/layout/layout.component.scss +28 -0
- package/src/fam-archetype-app/files/src/core/layout/component/main-info-popup/main-info-popup.component.html +33 -0
- package/src/fam-archetype-app/files/src/core/layout/component/main-info-popup/main-info-popup.component.scss +3 -0
- package/src/fam-archetype-app/files/src/core/layout/component/menu/menu.component.html +3 -0
- package/src/fam-archetype-app/files/src/core/layout/component/menu/menu.component.scss +163 -0
- package/src/fam-archetype-app/files/src/core/layout/component/menuitem/menuitem.component.html +39 -0
- package/src/fam-archetype-app/files/src/core/layout/component/menuitem/menuitem.component.scss +44 -0
- package/src/fam-archetype-app/files/src/core/layout/component/not-found/not-found.component.html +12 -0
- package/src/fam-archetype-app/files/src/core/layout/component/not-found/not-found.component.scss +17 -0
- package/src/fam-archetype-app/files/src/core/layout/component/sidebar/sidebar.component.html +13 -0
- package/src/fam-archetype-app/files/src/core/layout/component/sidebar/sidebar.component.scss +33 -0
- package/src/fam-archetype-app/files/src/core/layout/component/top-menu/top-menu.component.html +12 -0
- package/src/fam-archetype-app/files/src/core/layout/component/top-menu/top-menu.component.scss +9 -0
- package/src/fam-archetype-app/files/src/core/layout/component/topbar/_mixins.scss +8 -0
- package/src/fam-archetype-app/files/src/core/layout/component/topbar/topbar.component.html.template +45 -0
- package/src/fam-archetype-app/files/src/core/layout/component/topbar/topbar.component.scss +77 -0
- package/src/fam-archetype-app/files/src/environments/environment.dev.ts.template +12 -0
- package/src/fam-archetype-app/files/src/environments/environment.int.ts.template +12 -0
- package/src/fam-archetype-app/files/src/environments/environment.pre.ts.template +12 -0
- package/src/fam-archetype-app/files/src/environments/environment.ts.template +12 -0
- package/src/fam-archetype-app/files/src/index.html.template +18 -0
- package/src/fam-archetype-app/files/src/shared/filters/diba-filters/diba-filters.component.html +69 -0
- package/src/fam-archetype-app/files/src/shared/filters/diba-filters/diba-filters.component.scss +0 -0
- package/src/fam-archetype-app/files/src/shared/styles/_movements.scss +19 -0
- package/src/fam-archetype-app/files/src/shared/styles/global/_core.scss +20 -0
- package/src/fam-archetype-app/files/src/shared/styles/global/_icons.scss +37 -0
- package/src/fam-archetype-app/files/src/shared/styles/global/_tooltips.scss +14 -0
- package/src/fam-archetype-app/files/src/shared/styles/global/_typography.scss +68 -0
- package/src/fam-archetype-app/files/src/shared/styles/global/_utils.scss +24 -0
- package/src/fam-archetype-app/files/src/shared/styles/global/layout.scss +5 -0
- package/src/fam-archetype-app/files/src/shared/table/column-visibility-selector/column-visibility-selector.component.html +10 -0
- package/src/fam-archetype-app/files/src/shared/table/column-visibility-selector/column-visibility-selector.component.scss +0 -0
- package/src/fam-archetype-app/files/src/shared/table/diba-table/diba-table.component.html +136 -0
- package/src/fam-archetype-app/files/src/shared/table/diba-table/diba-table.component.scss +0 -0
- package/src/fam-archetype-app/files/src/styles.scss +109 -0
- package/src/fam-archetype-app/files/src/tailwind.css +3 -0
- package/src/fam-archetype-app/files/tailwind.config.js +36 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/commands/commands.txt +1 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/commands/db_to_entities.txt +1 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/commands/test_db_connection.txt +1 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/databases.yaml +188 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/downloads/.keep +0 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/lib/.keep +0 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamActivitat.entity +26 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamActivitatsUbicacio.entity +40 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamAlumne.entity +76 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamArea.entity +33 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamComanda.entity +37 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamCurs.entity +50 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamDocument.entity +53 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamDocumentTipus.entity +26 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamEntitatBase.entity +84 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamExpedient.entity +71 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamExpedientDocument.entity +51 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamExpedientEstat.entity +26 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamExpedientTipus.entity +26 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamJerarquia.entity +33 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamLinia.entity +56 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamMatricula.entity +63 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamTipusArticle.entity +26 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamUbicacio.entity +35 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FamZona.entity +27 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/Funcionalitat.entity +65 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/FuncionalitatGrupFunc.entity +58 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/GrupFuncionalitat.entity +54 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/PerfilGrupFuncionalitat.entity +50 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/VusPerfil.entity +31 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/models/app/model.yaml +4 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/telosys-tools.cfg +31 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/telosys.env +5 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/README.md +12 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/database.properties +23 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/include/init_var_entity.vm +169 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/include/macros.vm +218 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/app_config_ts.vm +56 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/app_routes_ts.vm +21 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/core/layout/component/menu/menu_component_ts.vm +30 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/core/layout/component/top-menu/top-menu_component_ts.vm +36 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/core/layout/service/menu_model_service_ts.vm +49 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/create-Xxx_use-case_ts.vm +18 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/create-file-Xxx_use-case_ts.vm +17 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/delete-Xxx_use-case_ts.vm +17 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/download-Xxx-file_use-case_ts.vm +24 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/find-Xxx_use-case_ts.vm +18 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/search-Xxx_use-case_ts.vm +25 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/application/update-Xxx_use-case_ts.vm +18 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/domain/Xxx_entity_ts.vm +36 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/domain/Xxx_repository_interface_ts.vm +27 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/mappers/Xxx_jsona_mapper_ts.vm +52 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/mappers/Xxx_mapper_ts.vm +36 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/Xxx_routes_ts.vm +15 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_html.vm +178 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_scss.vm +0 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_spec_ts.vm +29 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_ts.vm +382 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_html.vm +37 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_scss.vm +10 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_spec_ts.vm +29 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_ts.vm +430 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/inbound/resources/Xxx_resource_ts.vm +43 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/modules/infrastructure/outbound/Xxx_repository_impl_ts.vm +162 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/main-angular/test_code.vm +3 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/templates.cfg +52 -0
- package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/tools-test/test-api_Xxx_rest.vm +181 -0
- package/src/fam-archetype-app/files/tools/cli/telosys +5 -0
- package/src/fam-archetype-app/files/tools/cli/telosys-cli-4.2.0-001.jar +0 -0
- package/src/fam-archetype-app/files/tools/cli/telosys-cli.cfg +55 -0
- package/src/fam-archetype-app/files/tools/cli/telosys-term.sh +30 -0
- package/src/fam-archetype-app/files/tools/cli/telosys.bat +4 -0
- package/src/fam-archetype-app/files/tools/cli/telosys.ico +0 -0
- package/src/fam-archetype-app/files/tools/db/develop/data/.keep +0 -0
- package/src/fam-archetype-app/files/tools/db/production/data/.keep +0 -0
- package/src/fam-archetype-app/files/tools/db/production/migrations/.keep +0 -0
- package/src/fam-archetype-app/files/tools/docs/.keep +0 -0
- package/src/fam-archetype-app/files/tools/test/test-api.rest +80 -0
- package/src/fam-archetype-app/files/tsconfig.app.json +15 -0
- package/src/fam-archetype-app/files/tsconfig.json +42 -0
- package/src/fam-archetype-app/files/tsconfig.spec.json +15 -0
- package/src/fam-archetype-app/files/vercel.json +9 -0
- package/src/fam-archetype-app/index.d.ts +2 -0
- package/src/fam-archetype-app/index.js +18 -0
- package/src/fam-archetype-app/index.js.map +1 -0
- package/src/fam-archetype-app/index_spec.d.ts +1 -0
- package/src/fam-archetype-app/index_spec.js +23 -0
- package/src/fam-archetype-app/index_spec.js.map +1 -0
- package/src/fam-archetype-app/schema.json +21 -0
- package/tsconfig.json +24 -0
package/src/fam-archetype-app/files/tools/cli/TelosysTools/templates/fam-app-templates/templates.cfg
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#---------------------------------------------------------
|
|
2
|
+
# Templates bundle configuration file
|
|
3
|
+
# 5 values separated by ";"
|
|
4
|
+
# . value 1 : the label to be displayed
|
|
5
|
+
# . value 2 : the file to be generated ( with variables replacement : ${BEANNAME}, ${BEANNAME_UC}, ${BEANNAME} )
|
|
6
|
+
# . value 3 : the project folder where to generate ( with variables replacement )
|
|
7
|
+
# . value 4 : the template to use
|
|
8
|
+
# . value 5 : number of execution : "1" for "ONCE" for all entities, default is multiple executions ( executed for each entity )
|
|
9
|
+
#---------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
#-- Main files angular
|
|
12
|
+
AppConfig ; app.config.ts ; ${SRC}/ ; main-angular/app_config_ts.vm ; 1
|
|
13
|
+
AppRoutes ; app.routes.ts ; ${SRC}/ ; main-angular/app_routes_ts.vm ; 1
|
|
14
|
+
|
|
15
|
+
#-- App Menu
|
|
16
|
+
MenuModelService ; menu.model.service.ts ; ${SRC}/core/layout/service/ ; main-angular/core/layout/service/menu_model_service_ts.vm ; 1
|
|
17
|
+
|
|
18
|
+
#-- Entity Modules (src/modules)
|
|
19
|
+
#---- Application - Use Cases (src/modules/application)
|
|
20
|
+
Create use case ; create-${BEANNAME}.use-case.ts ; ${SRC}/modules/${BEANNAME}/application/ ; main-angular/modules/application/create-Xxx_use-case_ts.vm
|
|
21
|
+
Delete use case ; delete-${BEANNAME}.use-case.ts ; ${SRC}/modules/${BEANNAME}/application/ ; main-angular/modules/application/delete-Xxx_use-case_ts.vm
|
|
22
|
+
Find use case ; find-${BEANNAME}.use-case.ts ; ${SRC}/modules/${BEANNAME}/application/ ; main-angular/modules/application/find-Xxx_use-case_ts.vm
|
|
23
|
+
Search use case ; search-${BEANNAME}.use-case.ts ; ${SRC}/modules/${BEANNAME}/application/ ; main-angular/modules/application/search-Xxx_use-case_ts.vm
|
|
24
|
+
Update use case ; update-${BEANNAME}.use-case.ts ; ${SRC}/modules/${BEANNAME}/application/ ; main-angular/modules/application/update-Xxx_use-case_ts.vm
|
|
25
|
+
Download file use case ; download-${BEANNAME}-file.use-case.ts ; ${SRC}/modules/${BEANNAME}/application/ ; main-angular/modules/application/download-Xxx-file_use-case_ts.vm
|
|
26
|
+
#Create File use case ; create-file-${BEANNAME}.use-case.ts ; ${SRC}/modules/${BEANNAME}/application/ ; main-angular/modules/application/create-file-Xxx_use-case_ts.vm
|
|
27
|
+
|
|
28
|
+
#---- Domain (src/modules/domain)
|
|
29
|
+
Entity ; ${BEANNAME}.entity.ts ; ${SRC}/modules/${BEANNAME}/domain/ ; main-angular/modules/domain/Xxx_entity_ts.vm
|
|
30
|
+
Repository Interface ; ${BEANNAME}.repository.interface.ts ; ${SRC}/modules/${BEANNAME}/domain/ ; main-angular/modules/domain/Xxx_repository_interface_ts.vm
|
|
31
|
+
|
|
32
|
+
#---- Infrastructure (src/modules/infrastructure)
|
|
33
|
+
#------ Inbound (src/modules/infrastructure/inbound)
|
|
34
|
+
#------ Mappers (src/modules/infrastructure/inbound/mappers)
|
|
35
|
+
Mapper ; ${BEANNAME}.mapper.ts ; ${SRC}/modules/${BEANNAME}/infrastructure/inbound/mappers/ ; main-angular/modules/infrastructure/inbound/mappers/Xxx_mapper_ts.vm
|
|
36
|
+
JSON Mapper ; ${BEANNAME}-jsona.mapper.ts ; ${SRC}/modules/${BEANNAME}/infrastructure/inbound/mappers/ ; main-angular/modules/infrastructure/inbound/mappers/Xxx_jsona_mapper_ts.vm
|
|
37
|
+
#------ Resources (src/modules/infrastructure/inbound/resources)
|
|
38
|
+
Resource ; ${BEANNAME}.resource.ts ; ${SRC}/modules/${BEANNAME}/infrastructure/inbound/resources/ ; main-angular/modules/infrastructure/inbound/resources/Xxx_resource_ts.vm
|
|
39
|
+
#------ Routes (src/modules/infrastructure/inbound/pages)
|
|
40
|
+
Routes ; ${BEANNAME}.routes.ts ; ${SRC}/modules/${BEANNAME}/infrastructure/inbound/pages/ ; main-angular/modules/infrastructure/inbound/pages/Xxx_routes_ts.vm
|
|
41
|
+
#------ List Component (src/modules/infrastructure/inbound/pages/list)
|
|
42
|
+
List-TS ; ${BEANNAME}-list.component.ts ; ${SRC}/modules/${BEANNAME}/infrastructure/inbound/pages/${BEANNAME}-list ; main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_ts.vm
|
|
43
|
+
List-HTML ; ${BEANNAME}-list.component.html ; ${SRC}/modules/${BEANNAME}/infrastructure/inbound/pages/${BEANNAME}-list ; main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_html.vm
|
|
44
|
+
List-SCSS ; ${BEANNAME}-list.component.scss ; ${SRC}/modules/${BEANNAME}/infrastructure/inbound/pages/${BEANNAME}-list ; main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_scss.vm
|
|
45
|
+
List-SPEC ; ${BEANNAME}-list.component.spec.ts ; ${SRC}/modules/${BEANNAME}/infrastructure/inbound/pages/${BEANNAME}-list ; main-angular/modules/infrastructure/inbound/pages/list/Xxx_list_spec_ts.vm
|
|
46
|
+
#------ Detail Component (src/modules/infrastructure/inbound/pages/detail)
|
|
47
|
+
Detail-TS ; ${BEANNAME}-detail.component.ts ; ${SRC}/modules/${BEANNAME}/infrastructure/inbound/pages/${BEANNAME}-detail ; main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_ts.vm
|
|
48
|
+
Detail-HTML ; ${BEANNAME}-detail.component.html ; ${SRC}/modules/${BEANNAME}/infrastructure/inbound/pages/${BEANNAME}-detail ; main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_html.vm
|
|
49
|
+
Detail-SCSS ; ${BEANNAME}-detail.component.scss ; ${SRC}/modules/${BEANNAME}/infrastructure/inbound/pages/${BEANNAME}-detail ; main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_scss.vm
|
|
50
|
+
Detail-SPEC ; ${BEANNAME}-detail.component.spec.ts ; ${SRC}/modules/${BEANNAME}/infrastructure/inbound/pages/${BEANNAME}-detail ; main-angular/modules/infrastructure/inbound/pages/detail/Xxx_detail_spec_ts.vm
|
|
51
|
+
#------ Outbound (src/modules/infrastructure/outbound)
|
|
52
|
+
Repository Impl ; ${BEANNAME}.repository.impl.ts ; ${SRC}/modules/${BEANNAME}/infrastructure/outbound/ ; main-angular/modules/infrastructure/outbound/Xxx_repository_impl_ts.vm
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
## --------------------------------------------------
|
|
2
|
+
#if ( $entity.isJoinEntity() )#cancel("No API TEST class for join entity")#end
|
|
3
|
+
## --------------------------------------------------
|
|
4
|
+
#parse("include/init_var_entity.vm")
|
|
5
|
+
#parse("include/macros.vm")
|
|
6
|
+
## --------------------------------------------------
|
|
7
|
+
#[[### ###########################################################################]]#
|
|
8
|
+
#[[### Token CAS]]#
|
|
9
|
+
#[[### ###########################################################################]]#
|
|
10
|
+
|
|
11
|
+
@token = {{login.response.body.access_token}}
|
|
12
|
+
|
|
13
|
+
# @name login
|
|
14
|
+
POST /cas/oauth/token HTTP/1.1
|
|
15
|
+
Host: su0943.corpo.ad.diba.es:8101
|
|
16
|
+
Content-Type: application/x-www-form-urlencoded
|
|
17
|
+
Authorization: Basic ZmVkZXJhdGlvbi12dXM6TUxSSjVoN2ZzcVNQTVV0ZHM0OVpuNkFhNjdKOU5UVENuaXlCdkx1cUpnYkZ1bUg3N3d5cWVralJZNlVHOGdTa3RiRDRZRExFWkQyRkd5S3hid0JINGpnakFmSFpFeXdRSDdQenRYU2l4c29NQ1VBb21YR1oyOTYzQnd2MjRBOGE=
|
|
18
|
+
|
|
19
|
+
username=OPS#[[$]]#PROVA&password=barcelona1&grant_type=password&scope=user:vus
|
|
20
|
+
|
|
21
|
+
#[[### ###########################################################################]]#
|
|
22
|
+
#[[### Test Api]]#
|
|
23
|
+
#[[### ###########################################################################]]#
|
|
24
|
+
|
|
25
|
+
@context = ${CONTEXT}
|
|
26
|
+
@resource = $resourceContext
|
|
27
|
+
|
|
28
|
+
GET /{{context}}/public/health-check HTTP/1.1
|
|
29
|
+
Host: {{host-internal}}{{port-app}}
|
|
30
|
+
|
|
31
|
+
#[[### ###########################################################################]]#
|
|
32
|
+
#[[### Test Resource]]#
|
|
33
|
+
#[[### ###########################################################################]]#
|
|
34
|
+
|
|
35
|
+
POST /{{context}}/rest/v1/{{resource}} HTTP/1.1
|
|
36
|
+
Host: {{host-internal}}{{port-app}}
|
|
37
|
+
Content-Type: application/vnd.api+json
|
|
38
|
+
Authorization: Bearer {{token}}
|
|
39
|
+
|
|
40
|
+
{
|
|
41
|
+
"data": {
|
|
42
|
+
"type": "$resourceContext",
|
|
43
|
+
"attributes":{
|
|
44
|
+
#foreach( $attribute in $publicAttributes )
|
|
45
|
+
#if( $attribute.tagValueAsBoolean("postable", true) )
|
|
46
|
+
#set( $attributeType = $attribute.type )
|
|
47
|
+
#if( $attribute.isTemporalType() )
|
|
48
|
+
#set( $attributeType = "String" )
|
|
49
|
+
#end
|
|
50
|
+
#set( $attributeOptional = false )
|
|
51
|
+
#if( !$attribute.isNotNull() && !$attribute.isNotEmpty() && !$attribute.isNotBlank() )
|
|
52
|
+
#set( $attributeOptional = true )
|
|
53
|
+
#end
|
|
54
|
+
"#snakeLowerCase(${attribute.name})":"$attributeType($attribute.size)#if( $attributeOptional ) | null#{end}"#comma($foreach.hasNext)
|
|
55
|
+
|
|
56
|
+
#end
|
|
57
|
+
#end
|
|
58
|
+
#if( !$toOneLinks.isEmpty() )
|
|
59
|
+
},
|
|
60
|
+
"relationships": {
|
|
61
|
+
#end
|
|
62
|
+
#foreach( $link in $toOneLinks )
|
|
63
|
+
#if( $link.tagValueAsBoolean("postable", true) )
|
|
64
|
+
"#snakeLowerCase(${link.fieldName})": {
|
|
65
|
+
"data": {
|
|
66
|
+
"id": "1234#if( $link.isOptionalTrue() ) | null#end",
|
|
67
|
+
"type": "${link.targetEntity.tagValue("ApiResource")}"
|
|
68
|
+
}
|
|
69
|
+
}#comma($foreach.hasNext)
|
|
70
|
+
|
|
71
|
+
#end
|
|
72
|
+
#end
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
#[[###]]#
|
|
78
|
+
|
|
79
|
+
PUT /{{context}}/rest/v1/{{resource}}/1 HTTP/1.1
|
|
80
|
+
Host: {{host-internal}}{{port-app}}
|
|
81
|
+
Content-Type: application/vnd.api+json
|
|
82
|
+
Authorization: Bearer {{token}}
|
|
83
|
+
|
|
84
|
+
{
|
|
85
|
+
"data": {
|
|
86
|
+
"type": "$resourceContext",
|
|
87
|
+
"attributes":{
|
|
88
|
+
#foreach( $attribute in $publicAttributes )
|
|
89
|
+
#if( $attribute.tagValueAsBoolean("updatable", true) )
|
|
90
|
+
#set( $attributeType = $attribute.type )
|
|
91
|
+
#if( ${attribute.isTemporalType()} )
|
|
92
|
+
#set( $attributeType = "String" )
|
|
93
|
+
#end
|
|
94
|
+
#set( $attributeOptional = false )
|
|
95
|
+
#if( !$attribute.isNotNull() && !$attribute.isNotEmpty() && !$attribute.isNotBlank() )
|
|
96
|
+
#set( $attributeOptional = true )
|
|
97
|
+
#end
|
|
98
|
+
"#snakeLowerCase(${attribute.name})":"$attributeType($attribute.size)#if( $attributeOptional ) | null#{end}"#comma($foreach.hasNext)
|
|
99
|
+
|
|
100
|
+
#end
|
|
101
|
+
#end
|
|
102
|
+
#if( !$toOneLinks.isEmpty() )
|
|
103
|
+
},
|
|
104
|
+
"relationships": {
|
|
105
|
+
#end
|
|
106
|
+
#foreach( $link in $toOneLinks )
|
|
107
|
+
#if( $link.tagValueAsBoolean("updatable", true) )
|
|
108
|
+
"#snakeLowerCase(${link.fieldName})": {
|
|
109
|
+
"data": {
|
|
110
|
+
"id": "1234#if( $link.isOptionalTrue() ) | null#end",
|
|
111
|
+
"type": "${link.targetEntity.tagValue("ApiResource")}"
|
|
112
|
+
}
|
|
113
|
+
}#comma($foreach.hasNext)
|
|
114
|
+
|
|
115
|
+
#end
|
|
116
|
+
#end
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
#[[###]]#
|
|
122
|
+
|
|
123
|
+
PATCH /{{context}}/rest/v1/{{resource}}/1 HTTP/1.1
|
|
124
|
+
Host: {{host-internal}}{{port-app}}
|
|
125
|
+
Content-Type: application/vnd.api+json
|
|
126
|
+
Authorization: Bearer {{token}}
|
|
127
|
+
|
|
128
|
+
{
|
|
129
|
+
"data": {
|
|
130
|
+
"type": "$resourceContext",
|
|
131
|
+
"attributes":{
|
|
132
|
+
#foreach( $attribute in $publicAttributes )
|
|
133
|
+
#if( $attribute.tagValueAsBoolean("updatable", true) )
|
|
134
|
+
#set( $attributeType = $attribute.type )
|
|
135
|
+
#if( ${attribute.isTemporalType()} )
|
|
136
|
+
#set( $attributeType = "String" )
|
|
137
|
+
#end
|
|
138
|
+
#set( $attributeOptional = false )
|
|
139
|
+
#if( !$attribute.isNotNull() && !$attribute.isNotEmpty() && !$attribute.isNotBlank() )
|
|
140
|
+
#set( $attributeOptional = true )
|
|
141
|
+
#end
|
|
142
|
+
"#snakeLowerCase(${attribute.name})":"$attributeType($attribute.size)#if( $attributeOptional ) | null#{end}"#comma($foreach.hasNext)
|
|
143
|
+
|
|
144
|
+
#end
|
|
145
|
+
#end
|
|
146
|
+
#if( !$toOneLinks.isEmpty() )
|
|
147
|
+
},
|
|
148
|
+
"relationships": {
|
|
149
|
+
#end
|
|
150
|
+
#foreach( $link in $toOneLinks )
|
|
151
|
+
#if( $link.tagValueAsBoolean("updatable", true) )
|
|
152
|
+
"#snakeLowerCase(${link.fieldName})": {
|
|
153
|
+
"data": {
|
|
154
|
+
"id": "1234#if( $link.isOptionalTrue() ) | null#end",
|
|
155
|
+
"type": "${link.targetEntity.tagValue("ApiResource")}"
|
|
156
|
+
}
|
|
157
|
+
}#comma($foreach.hasNext)
|
|
158
|
+
|
|
159
|
+
#end
|
|
160
|
+
#end
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
#[[###]]#
|
|
166
|
+
|
|
167
|
+
GET /{{context}}/rest/v1/{{resource}} HTTP/1.1
|
|
168
|
+
Host: {{host-internal}}{{port-app}}
|
|
169
|
+
Authorization: Bearer {{token}}
|
|
170
|
+
|
|
171
|
+
#[[###]]#
|
|
172
|
+
|
|
173
|
+
GET /{{context}}/rest/v1/{{resource}}/1 HTTP/1.1
|
|
174
|
+
Host: {{host-internal}}{{port-app}}
|
|
175
|
+
Authorization: Bearer {{token}}
|
|
176
|
+
|
|
177
|
+
#[[###]]#
|
|
178
|
+
|
|
179
|
+
DELETE /{{context}}/rest/v1/{{resource}}/1 HTTP/1.1
|
|
180
|
+
Host: {{host-internal}}{{port-app}}
|
|
181
|
+
Authorization: Bearer {{token}}
|
|
Binary file
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Telosys-CLI configuration file
|
|
2
|
+
|
|
3
|
+
#-----------------------------------------------------------------------------------
|
|
4
|
+
# Use 'EditorCommand' to set the specific OS command to be used to launch the editor
|
|
5
|
+
# NB : the command must be usabe from the command line : use full path or add it in the 'PATH'
|
|
6
|
+
|
|
7
|
+
# Example with 'Sublime Text'
|
|
8
|
+
# EditorCommand = subl $FILE
|
|
9
|
+
|
|
10
|
+
# Example with 'Visual Source Code'
|
|
11
|
+
# EditorCommand = code $FILE
|
|
12
|
+
|
|
13
|
+
# Example for 'Sublime Text with full path / Windows'
|
|
14
|
+
# EditorCommand = D:/Tools/SublimeText/subl.exe $FILE
|
|
15
|
+
|
|
16
|
+
# Example for 'NotePad++ with full path / Windows'
|
|
17
|
+
# EditorCommand = C:/Program Files/Notepad++/notepad++.exe $FILE
|
|
18
|
+
|
|
19
|
+
# Example for 'TextEdit / Mac OS' (file must exist, cannot create a new one)
|
|
20
|
+
# EditorCommand = open -t $FILE
|
|
21
|
+
|
|
22
|
+
# Example for 'Default editor / Mac OS' (file must exist, cannot create a new one)
|
|
23
|
+
# EditorCommand = open -e $FILE
|
|
24
|
+
|
|
25
|
+
# Linux Mint : "gnome-terminal" and "xed"
|
|
26
|
+
# EditorCommand = /usr/bin/xed $FILE
|
|
27
|
+
# EditorCommand = /usr/bin/gnome-terminal -e "vi $FILE"
|
|
28
|
+
# EditorCommand = /usr/bin/gnome-terminal -e "nano $FILE"
|
|
29
|
+
|
|
30
|
+
# Lubuntu : "lxterminal" and "leafpad"
|
|
31
|
+
# EditorCommand = /usr/bin/lxterminal -e "vi $FILE"
|
|
32
|
+
# EditorCommand = /usr/bin/lxterminal -e "nano $FILE"
|
|
33
|
+
# EditorCommand = /usr/bin/leafpad $FILE &
|
|
34
|
+
|
|
35
|
+
#-----------------------------------------------------------------------------------
|
|
36
|
+
# Use 'FileExplorerCommand' to define the OS command to be used to launch the 'FileExplorer'
|
|
37
|
+
# NB : the command must be usabe from the command line : use full path or add it in the 'PATH'
|
|
38
|
+
|
|
39
|
+
# Example for Windows / 'explorer' (used by default)
|
|
40
|
+
# FileExplorerCommand = explorer $DIR
|
|
41
|
+
|
|
42
|
+
# Example for Windows / 'TotalCommander'
|
|
43
|
+
# FileExplorerCommand = C:/Program Files/totalcmd/totalcmd64.exe $DIR
|
|
44
|
+
|
|
45
|
+
# Example for MacOSX / 'open' (used by default)
|
|
46
|
+
# FileExplorerCommand = open $DIR
|
|
47
|
+
|
|
48
|
+
# Example for Linux Ubuntu / 'Nautilus'
|
|
49
|
+
# FileExplorerCommand = nautilus $DIR
|
|
50
|
+
|
|
51
|
+
# Example for Linux KDE4 / 'Dolphin'
|
|
52
|
+
# FileExplorerCommand = dolphin $DIR
|
|
53
|
+
|
|
54
|
+
# Example for Windows, Linux, MacOS (Cross platform) / 'vifm'
|
|
55
|
+
# FileExplorerCommand = vifm $DIR
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Shell script to open a new terminal and launch the given editor
|
|
3
|
+
# Be sure to use and keep Unix line delimiters for this file
|
|
4
|
+
# ( with Eclipse use : File / Convert Line Delimiters To / Unix )
|
|
5
|
+
# You can customize this file to add another terminal command
|
|
6
|
+
#
|
|
7
|
+
|
|
8
|
+
EDITOR=$1
|
|
9
|
+
#echo $EDITOR
|
|
10
|
+
FILE=$2
|
|
11
|
+
#echo $FILE
|
|
12
|
+
|
|
13
|
+
# Try to find the terminal command for the current Linux OS
|
|
14
|
+
if [ -x "$(command -v xterm)" ] ; then
|
|
15
|
+
xterm -e "$EDITOR $FILE"
|
|
16
|
+
elif [ -x "$(command -v gnome-terminal)" ] ; then
|
|
17
|
+
gnome-terminal -e "$EDITOR $FILE"
|
|
18
|
+
elif [ -x "$(command -v lxterminal)" ] ; then
|
|
19
|
+
lxterminal -e $EDITOR $FILE
|
|
20
|
+
elif [ -x "$(command -v konsole)" ] ; then
|
|
21
|
+
konsole -e "$EDITOR $FILE"
|
|
22
|
+
elif [ -x "$(command -v uxterm)" ] ; then
|
|
23
|
+
uxterm -e "$EDITOR $FILE"
|
|
24
|
+
elif [ -x "$(command -v lxterm)" ] ; then
|
|
25
|
+
lxterm -e "$EDITOR $FILE"
|
|
26
|
+
elif [ -x "$(command -v xfce4-terminal)" ] ; then
|
|
27
|
+
xfce4-terminal -e "$EDITOR $FILE"
|
|
28
|
+
elif [ -x "$(command -v koi8rxterm)" ] ; then
|
|
29
|
+
koi8rxterm -e "$EDITOR $FILE"
|
|
30
|
+
fi
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
### ###########################################################################
|
|
2
|
+
### Token CAS
|
|
3
|
+
### ###########################################################################
|
|
4
|
+
|
|
5
|
+
@token = {{login.response.body.access_token}}
|
|
6
|
+
|
|
7
|
+
### #########################
|
|
8
|
+
### Cas Token (username=OPS$MATEOSFR&password=barcelona2)
|
|
9
|
+
### #########################
|
|
10
|
+
|
|
11
|
+
# @name login
|
|
12
|
+
POST /cas/oauth/token HTTP/1.1
|
|
13
|
+
Host: su0943.corpo.ad.diba.es:8101
|
|
14
|
+
Content-Type: application/x-www-form-urlencoded
|
|
15
|
+
Authorization: Basic ZmVkZXJhdGlvbi12dXM6TUxSSjVoN2ZzcVNQTVV0ZHM0OVpuNkFhNjdKOU5UVENuaXlCdkx1cUpnYkZ1bUg3N3d5cWVralJZNlVHOGdTa3RiRDRZRExFWkQyRkd5S3hid0JINGpnakFmSFpFeXdRSDdQenRYU2l4c29NQ1VBb21YR1oyOTYzQnd2MjRBOGE=
|
|
16
|
+
|
|
17
|
+
username=OPS$PROVA&password=barcelona1&grant_type=password&scope=user:vus
|
|
18
|
+
|
|
19
|
+
### ###########################################################################
|
|
20
|
+
### Test Api
|
|
21
|
+
### ###########################################################################
|
|
22
|
+
|
|
23
|
+
@context = test
|
|
24
|
+
@resource = resources
|
|
25
|
+
|
|
26
|
+
GET /{{context}}/public/health-check HTTP/1.1
|
|
27
|
+
Host: {{host-internal}}{{port-app}}
|
|
28
|
+
|
|
29
|
+
### ###########################################################################
|
|
30
|
+
### Test Resource
|
|
31
|
+
### ###########################################################################
|
|
32
|
+
|
|
33
|
+
PUT /{{context}}/api/v1/{{resource}}/7828eb40-dc2b-41ab-95a4-b07ad59f4369 HTTP/1.1
|
|
34
|
+
Host: {{host-internal}}{{port-app}}
|
|
35
|
+
Content-Type: application/vnd.api+json
|
|
36
|
+
Authorization: Bearer {{token}}
|
|
37
|
+
|
|
38
|
+
{
|
|
39
|
+
"data": {
|
|
40
|
+
"type": "resource",
|
|
41
|
+
"attributes":{
|
|
42
|
+
"name":"NAME_ATTRIBUTE",
|
|
43
|
+
"descriptions":"DESCRIPTION_ATTRIBUTE"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
###
|
|
49
|
+
|
|
50
|
+
PATCH /{{context}}/api/v1/{{resource}}/7828eb40-dc2b-41ab-95a4-b07ad59f4369 HTTP/1.1
|
|
51
|
+
Host: {{host-internal}}{{port-app}}
|
|
52
|
+
Content-Type: application/vnd.api+json
|
|
53
|
+
Authorization: Bearer {{token}}
|
|
54
|
+
|
|
55
|
+
{
|
|
56
|
+
"data": {
|
|
57
|
+
"type": "resource",
|
|
58
|
+
"attributes":{
|
|
59
|
+
"nom":"NAME_ATTRIBUTE_UPDATED"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
###
|
|
65
|
+
|
|
66
|
+
GET /{{context}}/api/v1/{{resource}} HTTP/1.1
|
|
67
|
+
Host: {{host-internal}}{{port-app}}
|
|
68
|
+
Authorization: Bearer {{token}}
|
|
69
|
+
|
|
70
|
+
###
|
|
71
|
+
|
|
72
|
+
GET /{{context}}/api/v1/{{resource}}/7828eb40-dc2b-41ab-95a4-b07ad59f4369 HTTP/1.1
|
|
73
|
+
Host: {{host-internal}}{{port-app}}
|
|
74
|
+
Authorization: Bearer {{token}}
|
|
75
|
+
|
|
76
|
+
###
|
|
77
|
+
|
|
78
|
+
DELETE /{{context}}/api/v1/{{resource}}/7828eb40-dc2b-41ab-95a4-b07ad59f4369 HTTP/1.1
|
|
79
|
+
Host: {{host-internal}}{{port-app}}
|
|
80
|
+
Authorization: Bearer {{token}}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"extends": "./tsconfig.json",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"outDir": "./out-tsc/app",
|
|
7
|
+
"types": []
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"src/main.ts"
|
|
11
|
+
],
|
|
12
|
+
"include": [
|
|
13
|
+
"src/**/*.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"compileOnSave": false,
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"baseUrl": "./src",
|
|
7
|
+
"outDir": "./dist/out-tsc",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"noImplicitOverride": true,
|
|
10
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
11
|
+
"noImplicitReturns": true,
|
|
12
|
+
"noFallthroughCasesInSwitch": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"isolatedModules": true,
|
|
15
|
+
"esModuleInterop": true,
|
|
16
|
+
"experimentalDecorators": true,
|
|
17
|
+
"moduleResolution": "bundler",
|
|
18
|
+
"importHelpers": true,
|
|
19
|
+
"target": "ES2022",
|
|
20
|
+
"module": "ES2022",
|
|
21
|
+
"paths": {
|
|
22
|
+
"@core/*": [
|
|
23
|
+
"core/*"
|
|
24
|
+
],
|
|
25
|
+
"@modules/*": [
|
|
26
|
+
"modules/*"
|
|
27
|
+
],
|
|
28
|
+
"@shared/*": [
|
|
29
|
+
"shared/*"
|
|
30
|
+
],
|
|
31
|
+
"@root/*": [
|
|
32
|
+
"./*"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"angularCompilerOptions": {
|
|
37
|
+
"enableI18nLegacyMessageIdFormat": false,
|
|
38
|
+
"strictInjectionParameters": true,
|
|
39
|
+
"strictInputAccessModifiers": true,
|
|
40
|
+
"strictTemplates": true
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"extends": "./tsconfig.json",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"outDir": "./out-tsc/spec",
|
|
7
|
+
"types": [
|
|
8
|
+
"jasmine"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"include": [
|
|
12
|
+
"src/**/*.spec.ts",
|
|
13
|
+
"src/**/*.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.famArchetypeApp = famArchetypeApp;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const core_1 = require("@angular-devkit/core");
|
|
6
|
+
// You don't have to export the function as default. You can also have more than one rule factory
|
|
7
|
+
// per file.
|
|
8
|
+
function famArchetypeApp(_options) {
|
|
9
|
+
return (tree, _context) => {
|
|
10
|
+
console.log('Options:', _options); // Mostrar parametros en consola
|
|
11
|
+
const templateSource = (0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
12
|
+
(0, schematics_1.applyTemplates)(Object.assign(Object.assign({}, core_1.strings), _options)),
|
|
13
|
+
(0, schematics_1.move)(_options.name) // mueve la carpeta a la carpeta indicada por el usuario
|
|
14
|
+
]);
|
|
15
|
+
return (0, schematics_1.mergeWith)(templateSource)(tree, _context); // aplica los cambios
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAeA,0CAaC;AA5BD,2DASoC;AAClC,+CAA+C;AAGjD,iGAAiG;AACjG,YAAY;AACZ,SAAgB,eAAe,CAAC,QAAa;IAC3C,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAChD,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,gCAAgC;QACnE,MAAM,cAAc,GAAG,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,SAAS,CAAC,EAAE;YAC3C,IAAA,2BAAc,kCACT,cAAO,GACP,QAAQ,EACX;YACF,IAAA,iBAAI,EAAC,QAAQ,CAAC,IAAI,CAAC,CAA+B,4DAA4D;SAC/G,CAAC,CAAC;QAEH,OAAO,IAAA,sBAAS,EAAC,cAAc,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAG,qBAAqB;IAC3E,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
13
|
+
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
14
|
+
const path = require("path");
|
|
15
|
+
const collectionPath = path.join(__dirname, '../collection.json');
|
|
16
|
+
describe('fam-archetype-app', () => {
|
|
17
|
+
it('works', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
|
19
|
+
const tree = yield runner.runSchematic('fam-archetype-app', {}, schematics_1.Tree.empty());
|
|
20
|
+
expect(tree.files).toEqual([]);
|
|
21
|
+
}));
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=index_spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAkD;AAClD,gEAAyE;AACzE,6BAA6B;AAE7B,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,OAAO,EAAE,GAAS,EAAE;QACrB,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,mBAAmB,EAAE,EAAE,EAAE,iBAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAE9E,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "AngularArchetype",
|
|
4
|
+
"title": "Angular Archetype Options Schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Nombre del nuevo proyecto"
|
|
10
|
+
},
|
|
11
|
+
"apiUrl": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "URL de la api a la que apuntara el proyecto"
|
|
14
|
+
},
|
|
15
|
+
"apiSaml": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "URL de la autentificacion con SAML"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"required": ["name", "apiUrl", "apiSaml"]
|
|
21
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"baseUrl": "tsconfig",
|
|
4
|
+
"lib": ["es2018", "dom"],
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"module": "commonjs",
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"noEmitOnError": true,
|
|
9
|
+
"noFallthroughCasesInSwitch": true,
|
|
10
|
+
"noImplicitAny": true,
|
|
11
|
+
"noImplicitThis": true,
|
|
12
|
+
"noUnusedParameters": true,
|
|
13
|
+
"noUnusedLocals": true,
|
|
14
|
+
"rootDir": "src/",
|
|
15
|
+
"skipDefaultLibCheck": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"sourceMap": true,
|
|
18
|
+
"strictNullChecks": true,
|
|
19
|
+
"target": "es6",
|
|
20
|
+
"types": ["jasmine", "node"]
|
|
21
|
+
},
|
|
22
|
+
"include": ["src/**/*"],
|
|
23
|
+
"exclude": ["src/*/files/**/*"]
|
|
24
|
+
}
|