[Connect]: Update trunk to angular 11. Delete branch angular-11
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@61397 d315682c-612b-4755-9ff5-7f18f6832af3master
parent
6eee9f81ef
commit
564b1f3e37
@ -0,0 +1,11 @@
|
||||
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
#
|
||||
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
|
||||
|
||||
> 0.5%
|
||||
last 2 versions
|
||||
Firefox ESR
|
||||
not dead
|
||||
not IE 9-11
|
@ -1,54 +1,39 @@
|
||||
# Angular Universal & Anguar-CLI minimal starter
|
||||
# Connect
|
||||
|
||||
> This demo is built following the [Angular-CLI Wiki guide](https://github.com/angular/angular-cli/wiki/stories-universal-rendering)
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.10 and has been updated to 11.2.14.
|
||||
|
||||
We're utilizing packages from the [Angular Universal @nguniversal](https://github.com/angular/universal) repo, such as [ng-module-map-ngfactory-loader](https://github.com/angular/universal/tree/master/modules/module-map-ngfactory-loader) to enable Lazy Loading.
|
||||
## Install packages
|
||||
|
||||
---
|
||||
Run npm install (maybe needs sudo), a script that will delete unused files from library will be run.
|
||||
|
||||
## Static or Dynamic
|
||||
This repo demonstrates the use of 2 different forms of Server Side Rendering.
|
||||
## Development server
|
||||
|
||||
**Static** Also known as "prerendering"
|
||||
* Happens at build time
|
||||
* Renders your application and replaces the dist index.html with a version rendered at the route `/`.
|
||||
Run `npm start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
||||
|
||||
**Dynamic**
|
||||
* Happens at runtime
|
||||
* Uses `ngExpressEngine` to render you application on the fly at the requested url.
|
||||
## Build - CSR
|
||||
|
||||
---
|
||||
Use the `npm run build-dev` for a development build.<br>
|
||||
Use the `npm run build-beta` for a beta build.<br>
|
||||
Use the `npm run build-prod` for a production build.
|
||||
|
||||
## Installation
|
||||
* `npm install` or `yarn`
|
||||
## Build - SSR
|
||||
|
||||
---
|
||||
Use the `npm run build:ssr-dev` for a development build.<br>
|
||||
Use the `npm run build:ssr-beta` for a beta build.<br>
|
||||
Use the `npm run build:ssr-prod` for a production build.
|
||||
|
||||
## Development (Client-side only rendering)
|
||||
* run `npm run start` which will start `ng serve` (project served at the standard: localhost:4200)
|
||||
## Run SSR
|
||||
|
||||
---
|
||||
`npm run serve:ssr` will run the last server build.
|
||||
|
||||
## Production
|
||||
## Webpack Analyzer
|
||||
|
||||
Depending on whether you're publishing dynamic or static prerendering, run the build command, and then serve up your dist folder assets.
|
||||
In order to analyze bundle size you can run `npm run webpack-bundle-analyzer`
|
||||
|
||||
> **NOTE**: To deploy your **Static** site to a static hosting platform you will have to deploy the *`dist/browser`* folder, rather than the usual *`dist`*
|
||||
## Running unit tests
|
||||
|
||||
ie: `npm run build:dynamic` or `npm run build:static`. All of the files that need to be served will be found within the `/dist` folder.
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Testing Universal (dynamic or static) builds -Locally-
|
||||
|
||||
**Dynamic** : **`npm run start:dynamic`**
|
||||
|
||||
Compiles your application and spins up a Node Express to dynamically serve your Universal application on `http://localhost:4000`.
|
||||
|
||||
**Static** : **`npm run start:static`**
|
||||
|
||||
- Compiles your application and prerenders your applications files, spinning up a demo http-server so you can view it on `http://127.0.0.1:8080`
|
||||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
||||
|
||||
## Running end-to-end tests
|
||||
|
||||
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
|
||||
|
@ -0,0 +1,6 @@
|
||||
cd src/app/openaireLibrary
|
||||
# Exclude Dashboard files
|
||||
echo "Exclude Dashboard files"
|
||||
svn update --set-depth exclude ./dashboard
|
||||
cd ../../../
|
||||
echo "Done"
|
@ -1,126 +0,0 @@
|
||||
{
|
||||
"environment" : "beta",
|
||||
"dashboard" : "connect",
|
||||
"enablePiwikTrack" : true,
|
||||
"useCache" : true,
|
||||
"showContent" : true,
|
||||
"showAddThis" : false,
|
||||
"metricsAPIURL" : "https://beta.services.openaire.eu/usagestats/",
|
||||
"framesAPIURL" : "https://beta.openaire.eu/stats3/",
|
||||
"statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/",
|
||||
"statisticsFrameAPIURL":"https://beta.openaire.eu/stats/",
|
||||
"statisticsFrameNewAPIURL": "https://stats.madgik.di.uoa.gr/stats-api/",
|
||||
"useNewStatistisTool":true,
|
||||
"impactFactorsAPIURL" :"https://bip-api.imsi.athenarc.gr/paper/scores/batch/",
|
||||
"claimsAPIURL" : "https://beta.services.openaire.eu/claims/rest/claimsService/",
|
||||
"searchAPIURLLAst" : "https://beta.services.openaire.eu/search/v2/api/",
|
||||
"searchResourcesAPIURL" : "https://beta.services.openaire.eu/search/v2/api/resources",
|
||||
"openCitationsAPIURL" : "https://services.openaire.eu/opencitations/getCitations?id=",
|
||||
"csvAPIURL" : "https://beta.services.openaire.eu/search/v2/api/reports",
|
||||
"searchCrossrefAPIURL" : "https://api.crossref.org/works",
|
||||
"searchDataciteAPIURL" : "https://api.datacite.org/works",
|
||||
"searchOrcidURL" : "https://pub.orcid.org/v2.1/",
|
||||
"orcidURL" : "https://orcid.org/",
|
||||
"doiURL" : "https://dx.doi.org/",
|
||||
"pmcURL": "http://europepmc.org/articles/",
|
||||
"pmidURL": "https://www.ncbi.nlm.nih.gov/pubmed/",
|
||||
"handleURL": "http://hdl.handle.net/",
|
||||
"cordisURL" : "http://cordis.europa.eu/projects/",
|
||||
"openDoarURL": "http://v2.sherpa.ac.uk/id/repository/",
|
||||
"r3DataURL": "http://service.re3data.org/repository/",
|
||||
"sherpaURL": "http://sherpa.ac.uk/romeo/issn/",
|
||||
"sherpaURLSuffix": "/",
|
||||
"zenodo" : "https://zenodo.org/",
|
||||
"zenodoCommunities" : "https://zenodo.org/api/communities/",
|
||||
"openAccess" : "https://www.openaire.eu/support/faq#article-id-234",
|
||||
"openAccessRepo" : "https://www.openaire.eu/support/faq#article-id-310",
|
||||
"fp7Guidlines" : "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme",
|
||||
"h2020Guidlines" : "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020",
|
||||
"ercGuidlines" : "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf",
|
||||
"helpdesk" : "https://www.openaire.eu/support/helpdesk",
|
||||
"helpdeskEmail": "helpdesk@openaire.eu",
|
||||
"utilsService" : "https://demo.openaire.eu/utils-service",
|
||||
|
||||
"vocabulariesAPI" :"https://beta.services.openaire.eu/provision/mvc/vocabularies/",
|
||||
|
||||
"piwikBaseUrl" :"https://analytics.openaire.eu/piwik.php?idsite=",
|
||||
"piwikSiteId" : "80",
|
||||
"loginUrl" :"https://beta.services.openaire.eu/connect-user-management/openid_connect_login",
|
||||
|
||||
"userInfoUrl" : "https://beta.services.openaire.eu/uoa-user-management/api/users/getUserInfo?accessToken=",
|
||||
|
||||
"logoutUrl" :"https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=",
|
||||
|
||||
"cookieDomain" :".openaire.eu",
|
||||
|
||||
"feedbackmail" :"feedback@openaire.eu",
|
||||
|
||||
"cacheUrl" :"https://demo.openaire.eu/cache/get?url=",
|
||||
|
||||
"adminToolsAPIURL" :"https://beta.services.openaire.eu/uoa-admin-tools",
|
||||
|
||||
"adminToolsCommunity" :"connect",
|
||||
"datasourcesAPI": "https://beta.services.openaire.eu/openaire/ds/search/",
|
||||
"contextsAPI":"https://beta.services.openaire.eu/openaire/context",
|
||||
"communityAPI": "https://beta.services.openaire.eu/openaire/community/",
|
||||
"communitiesAPI": "https://beta.services.openaire.eu/openaire/community/communities",
|
||||
|
||||
"csvLimit": 2000,
|
||||
"pagingLimit": 20,
|
||||
"resultsPerPage": 10,
|
||||
|
||||
"baseLink" :"",
|
||||
"domain":"https://beta.connect.openaire.eu",
|
||||
|
||||
"afterLoginRedirectLink": "/myCommunities",
|
||||
|
||||
"searchLinkToPublication" : "/search/publication?articleId=",
|
||||
"searchLinkToProject" : "/search/project?projectId=",
|
||||
"searchLinkToDataProvider" : "/search/dataprovider?datasourceId=",
|
||||
"searchLinkToDataset" : "/search/dataset?datasetId=",
|
||||
"searchLinkToSoftwareLanding" : "/search/software?softwareId=",
|
||||
"searchLinkToOrganization" : "/search/organization?organizationId=",
|
||||
"searchLinkToOrp" : "/search/other?orpId=",
|
||||
|
||||
"searchLinkToCommunities" : "/search/find/communities",
|
||||
"searchLinkToPublications" : "/search/find/publications",
|
||||
"searchLinkToDataProviders" : "/search/find/dataproviders",
|
||||
"searchLinkToProjects" : "/search/find/projects",
|
||||
"searchLinkToDatasets" : "/search/find/datasets",
|
||||
"searchLinkToSoftware" : "/search/find/software",
|
||||
"searchLinkToOrps" : "/search/find/other",
|
||||
"searchLinkToOrganizations" : "/search/find/organizations",
|
||||
"searchLinkToCompatibleDataProviders" : "/search/content-providers",
|
||||
"searchLinkToEntityRegistriesDataProviders" : "/search/entity-registries",
|
||||
"searchLinkToEntityRegistriesDataProvidersTable" : "/search/entity-registries-table",
|
||||
"searchLinkToJournals" : "/search/journals",
|
||||
"searchLinkToJournalsTable" : "/search/journals-table",
|
||||
"searchLinkToResults" : "/search/find/research-outcomes",
|
||||
|
||||
"searchLinkToAdvancedPublications" : "/search/advanced/publications",
|
||||
"searchLinkToAdvancedProjects" : "/search/advanced/projects",
|
||||
"searchLinkToAdvancedDatasets" : "/search/advanced/datasets",
|
||||
"searchLinkToAdvancedSoftware" : "/search/advanced/software",
|
||||
"searchLinkToAdvancedOrps" : "/search/advanced/other",
|
||||
"searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
|
||||
"searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
|
||||
"searchLinkToAdvancedResults" : "/search/advanced/research-outcomes",
|
||||
|
||||
"lastIndexInformationLink" : "https://beta.openaire.eu/aggregation-and-content-provision-workflows",
|
||||
"showLastIndexInformationLink" : true,
|
||||
"widgetLink" : "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",
|
||||
"claimsInformationLink": "https://beta.openaire.eu/linking",
|
||||
|
||||
"depositLearnHowPage": "/participate/deposit/learn-how",
|
||||
"depositSearchPage": "/participate/deposit/search",
|
||||
"shareInZenodoPage": "/participate/deposit/zenodo",
|
||||
|
||||
"reCaptchaSiteKey": "6LezhVIUAAAAAOb4nHDd87sckLhMXFDcHuKyS76P",
|
||||
|
||||
"admins" : ["rcd-helpdesk@openaire.eu"],
|
||||
"lastIndexUpdate": "2020-05-06",
|
||||
"indexInfoAPI": "https://beta.services.openaire.eu/openaire/info/",
|
||||
"altMetricsAPIURL": "https://api.altmetric.com/v1/doi/",
|
||||
"b2noteAPIURL": "http://b2note-dev.bsc.es/api/",
|
||||
"adminPortalURL": "https://beta.admin.connect.openaire.eu"
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
#ATTENTION
|
||||
#DON'T run it in svn folder - it REMOVES files
|
||||
#Copy project in another location eg "deploy-folder"
|
||||
#go to "deploy-folder/deploy"
|
||||
#uncomment the proper commands
|
||||
#run the script
|
||||
|
||||
# cp theproperties file according to the deploy environment!!!
|
||||
## uncommect one of the following -->
|
||||
# cp beta-properties.json ../src/assets/env-properties.json;
|
||||
# cp production-properties.json ../src/assets/env-properties.json;
|
||||
|
||||
## uncommect from here-->
|
||||
# printf '\nCheck that you have the correct properties file';
|
||||
# echo -n "Press key:";
|
||||
# read -n1 ans
|
||||
# pico ../src/assets/env-properties.json;
|
||||
# printf '\nCheck the properties file version';
|
||||
# echo -n "Press key:";
|
||||
# read -n1 ans
|
||||
# pico ../src/app/openaireLibrary/utils/properties/environment-specific.service.ts;
|
||||
# echo 'For Production keep meta for bots';
|
||||
# printf '\n\nCheck index.html: For test and beta keep meta for noindex, for production remove noindex and keep meta for Search engines verification';
|
||||
# printf '\nUpdate css/ js files version!';
|
||||
# echo -n "Press key:";
|
||||
# read -n1 ans
|
||||
# echo -n "Pressed";
|
||||
# pico ../src/index.html;
|
||||
# pico ../src/app/utils/customization/customization.component.ts;
|
||||
# echo -n 'Check Robots.txt: For test and beta add "Diasallow /", for production remove it!';
|
||||
# echo -n "Press key:";
|
||||
# read -n1 ans
|
||||
# pico ../src/robots.txt;
|
||||
# echo -n "Pressed";
|
||||
# rm -rf ../src/assets/common-assets/.svn/;
|
||||
# rm -rf ../src/app/openaireLibrary/.svn/;
|
||||
# cd ..; npm run build:ssr; cd deploy;
|
||||
# rm -rf ../src ../node_modules ../.idea/ ../installOpenaireLib.sh; cd ../; rm -rf deploy;
|
||||
# echo 'Now copy to the server!'
|
||||
|
||||
##<-- to here
|
||||
|
||||
#Deploy instructions!
|
||||
#copy "deploy-folder" in beta.connect.openaire.eu or connect.openaire.eu
|
||||
#copies of previous deployments exist in "/home/argiro.kokogiannaki/connect-portal/connectYYYY-MM-DD"
|
||||
#run "npm i"
|
||||
#become nodejs user to be able to copy the files: "sudo su nodejs -s /bin/bash"
|
||||
#check what is running "pm2 list"
|
||||
#portal files exist in "/srv/www/portal/connect"
|
||||
#copy deployment files to the portal folder "cp -r /home/argiro.kokogiannaki/connect-portal/connectYYYY-MM-DD/* /srv/www/portal/connect"
|
||||
#restart portal to get the changes "pm2 restart connect"
|
@ -1,127 +0,0 @@
|
||||
{
|
||||
"environment" : "production",
|
||||
"dashboard" : "connect",
|
||||
"enablePiwikTrack" : false,
|
||||
"useCache" : true,
|
||||
"showContent" : true,
|
||||
"showAddThis" : false,
|
||||
"metricsAPIURL" : "https://services.openaire.eu/usagestats/",
|
||||
"framesAPIURL" : "https://www.openaire.eu/stats3/",
|
||||
"statisticsAPIURL" : "https://services.openaire.eu/stats-api/",
|
||||
"statisticsFrameAPIURL":"https://www.openaire.eu/stats/",
|
||||
"statisticsFrameNewAPIURL": "https://services.openaire.eu/stats/",
|
||||
"useNewStatistisTool":false,
|
||||
"impactFactorsAPIURL" :"https://bip-api.imsi.athenarc.gr/paper/scores/batch/",
|
||||
"claimsAPIURL" : "https://services.openaire.eu/claims/rest/claimsService/",
|
||||
"searchAPIURLLAst" : "https://services.openaire.eu/search/v2/api/",
|
||||
"searchResourcesAPIURL" : "https://services.openaire.eu/search/v2/api/resources",
|
||||
"openCitationsAPIURL" : "https://services.openaire.eu/opencitations/getCitations?id=",
|
||||
"csvAPIURL" : "https://services.openaire.eu/search/v2/api/reports",
|
||||
"searchCrossrefAPIURL" : "https://api.crossref.org/works",
|
||||
"searchDataciteAPIURL" : "https://api.datacite.org/works",
|
||||
"searchOrcidURL" : "https://pub.orcid.org/v2.1/",
|
||||
"orcidURL" : "https://orcid.org/",
|
||||
"doiURL" : "https://dx.doi.org/",
|
||||
"pmcURL": "http://europepmc.org/articles/",
|
||||
"pmidURL": "https://www.ncbi.nlm.nih.gov/pubmed/",
|
||||
"handleURL": "http://hdl.handle.net/",
|
||||
"cordisURL" : "http://cordis.europa.eu/projects/",
|
||||
"openDoarURL": "http://v2.sherpa.ac.uk/id/repository/",
|
||||
"r3DataURL": "http://service.re3data.org/repository/",
|
||||
"sherpaURL": "http://sherpa.ac.uk/romeo/issn/",
|
||||
"sherpaURLSuffix": "/",
|
||||
"zenodo" : "https://zenodo.org/",
|
||||
"zenodoCommunities" : "https://zenodo.org/api/communities/",
|
||||
"openAccess" : "https://www.openaire.eu/support/faq#article-id-234",
|
||||
"openAccessRepo" : "https://www.openaire.eu/support/faq#article-id-310",
|
||||
"fp7Guidlines" : "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme",
|
||||
"h2020Guidlines" : "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020",
|
||||
"ercGuidlines" : "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf",
|
||||
"helpdesk" : "https://www.openaire.eu/support/helpdesk",
|
||||
"helpdeskEmail": "helpdesk@openaire.eu",
|
||||
"utilsService" : "https://explore.openaire.eu/utils-service",
|
||||
|
||||
"vocabulariesAPI" :"https://services.openaire.eu/provision/mvc/vocabularies/",
|
||||
|
||||
"piwikBaseUrl" :"https://analytics.openaire.eu/piwik.php?idsite=",
|
||||
"piwikSiteId" : "112",
|
||||
"loginUrl" :"https://services.openaire.eu/_UPDATE_/openid_connect_login",
|
||||
|
||||
"userInfoUrl" : " https://services.openaire.eu/uoa-user-management/api/users/getUserInfo?accessToken=",
|
||||
|
||||
"logoutUrl" :"https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=",
|
||||
|
||||
"cookieDomain" :".openaire.eu",
|
||||
|
||||
"feedbackmail" :"feedback@openaire.eu",
|
||||
|
||||
"cacheUrl" :"https://explore.openaire.eu/cache/get?url=",
|
||||
|
||||
"datasourcesAPI": "https://services.openaire.eu/openaire/ds/search/",
|
||||
|
||||
"adminToolsAPIURL" :"https://services.openaire.eu/uoa-admin-tools/",
|
||||
|
||||
"adminToolsCommunity" :"connect",
|
||||
"contextsAPI":"https://services.openaire.eu/openaire/context",
|
||||
|
||||
"communityAPI": "https://services.openaire.eu/openaire/community/",
|
||||
"communitiesAPI": "https://services.openaire.eu/openaire/community/communities",
|
||||
|
||||
"csvLimit": 2000,
|
||||
"pagingLimit": 20,
|
||||
"resultsPerPage": 10,
|
||||
|
||||
"baseLink" :"",
|
||||
"domain": "https://connect.openaire.eu",
|
||||
|
||||
"afterLoginRedirectLink": "/myCommunities",
|
||||
|
||||
"searchLinkToPublication" : "/search/publication?articleId=",
|
||||
"searchLinkToProject" : "/search/project?projectId=",
|
||||
"searchLinkToDataProvider" : "/search/dataprovider?datasourceId=",
|
||||
"searchLinkToDataset" : "/search/dataset?datasetId=",
|
||||
"searchLinkToSoftwareLanding" : "/search/software?softwareId=",
|
||||
"searchLinkToOrp" : "/search/other?orpId=",
|
||||
"searchLinkToOrganization" : "/search/organization?organizationId=",
|
||||
|
||||
"searchLinkToCommunities" : "/search/find/communities",
|
||||
"searchLinkToPublications" : "/search/find/publications",
|
||||
"searchLinkToDataProviders" : "/search/find/dataproviders",
|
||||
"searchLinkToProjects" : "/search/find/projects",
|
||||
"searchLinkToDatasets" : "/search/find/datasets",
|
||||
"searchLinkToSoftware" : "/search/find/software",
|
||||
"searchLinkToOrps" : "/search/find/other",
|
||||
"searchLinkToOrganizations" : "/search/find/organizations",
|
||||
"searchLinkToCompatibleDataProviders" : "/search/content-providers",
|
||||
"searchLinkToEntityRegistriesDataProviders" : "/search/entity-registries",
|
||||
"searchLinkToEntityRegistriesDataProvidersTable" : "/search/entity-registries-table",
|
||||
"searchLinkToJournals" : "/search/journals",
|
||||
"searchLinkToJournalsTable" : "/search/journals-table",
|
||||
"searchLinkToResults" : "/search/find/research-outcomes",
|
||||
|
||||
"searchLinkToAdvancedPublications" : "/search/advanced/publications",
|
||||
"searchLinkToAdvancedProjects" : "/search/advanced/projects",
|
||||
"searchLinkToAdvancedDatasets" : "/search/advanced/datasets",
|
||||
"searchLinkToAdvancedSoftware" : "/search/advanced/software",
|
||||
"searchLinkToAdvancedOrps" : "/search/advanced/other",
|
||||
"searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
|
||||
"searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
|
||||
"searchLinkToAdvancedResults" : "/search/advanced/research-outcomes",
|
||||
|
||||
"lastIndexInformationLink" : "https://www.openaire.eu/aggregation-and-content-provision-workflows",
|
||||
"showLastIndexInformationLink" : true,
|
||||
"widgetLink" : "https://www.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",
|
||||
"claimsInformationLink": "https://www.openaire.eu/linking",
|
||||
|
||||
"depositLearnHowPage": "/participate/deposit/learn-how",
|
||||
"depositSearchPage": "/participate/deposit/search",
|
||||
"shareInZenodoPage": "/participate/deposit/zenodo",
|
||||
"reCaptchaSiteKey": "6LezhVIUAAAAAOb4nHDd87sckLhMXFDcHuKyS76P",
|
||||
|
||||
"admins" : ["rcd-helpdesk@openaire.eu"],
|
||||
"lastIndexUpdate": "2019-07-24",
|
||||
"indexInfoAPI": "https://services.openaire.eu/openaire/info/",
|
||||
"altMetricsAPIURL": "https://api.altmetric.com/v1/doi/",
|
||||
"b2noteAPIURL": "http://b2note-dev.bsc.es/api/",
|
||||
"adminPortalURL": "https://admin.connect.openaire.eu"
|
||||
}
|
@ -1,78 +1,72 @@
|
||||
{
|
||||
"name": "openaire-connect",
|
||||
"name": "connect",
|
||||
"version": "1.0.0",
|
||||
"license": "Openaire",
|
||||
"contributors": [
|
||||
"Argiro Kokogiannaki <argirok@di.uoa.gr>",
|
||||
"Konstantina Galouni <kgalouni@di.uoa.gr>"
|
||||
],
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": " ng serve --disable-host-check --host 0.0.0.0",
|
||||
"start:ssr": "npm run build:ssr && npm run serve:ssr",
|
||||
"start:prerender": "npm run build:prerender && npm run serve:prerender",
|
||||
"start:ssr-beta": "npm run build:ssr-beta && npm run serve:ssr",
|
||||
"start:prerender-beta": "npm run build:prerender-beta && npm run serve:prerender",
|
||||
"start:ssr-dev": "npm run build:ssr-dev && npm run serve:ssr",
|
||||
"start:prerender-dev": "npm run build:prerender-dev && npm run serve:prerender",
|
||||
"start": "ng serve --disable-host-check --host 0.0.0.0 --port 4200",
|
||||
"build": "ng build",
|
||||
"build:client-and-server-bundles": "ng build --prod --stats-json=true && ng run ng-universal-demo:server:production",
|
||||
"build:client-and-server-bundles-beta": "ng build --configuration=beta --stats-json=true && ng run ng-universal-demo:server:beta",
|
||||
"build:client-and-server-bundles-dev": "ng build --configuration=development --stats-json=true && ng run ng-universal-demo:server:development",
|
||||
"build:prerender": "npm run build:client-and-server-bundles && npm run webpack:server && npm run generate:prerender",
|
||||
"build:ssr": "npm run build:client-and-server-bundles && npm run webpack:server",
|
||||
"build:prerender-beta": "npm run build:client-and-server-bundles-beta && npm run webpack:server && npm run generate:prerender",
|
||||
"build:ssr-beta": "npm run build:client-and-server-bundles-beta && npm run webpack:server",
|
||||
"build:prerender-dev": "npm run build:client-and-server-bundles-dev && npm run webpack:server && npm run generate:prerender",
|
||||
"build:ssr-dev": "npm run build:client-and-server-bundles-dev && npm run webpack:server",
|
||||
"generate:prerender": "cd dist && node prerender",
|
||||
"webpack:server": "webpack --config webpack.server.config.js --progress --colors",
|
||||
"serve:prerender": "cd dist/browser && http-server",
|
||||
"serve:ssr": "node dist/server",
|
||||
"after-build-clean": "rm -rf src node_modules .idea/ installOpenaireLib.sh deploy dist/browser/assets/common-assets/.svn/ dist/browser/stats.json ; "
|
||||
"build-dev": "ng build --configuration=development",
|
||||
"build-beta": "ng build --configuration=beta",
|
||||
"build-prod": "ng build --prod",
|
||||
"webpack-bundle-analyzer": "ng build --stats-json && webpack-bundle-analyzer dist/connect/browser/stats.json --host 0.0.0.0",
|
||||
"test": "ng test",
|
||||
"e2e": "ng e2e",
|
||||
"dev:ssr": "ng run connect:serve-ssr",
|
||||
"serve:ssr": "node dist/connect/server/main.js",
|
||||
"build:ssr-dev": "npm run build-dev && ng run connect:server:development",
|
||||
"build:ssr-beta": "npm run build-beta && ng run connect:server:beta",
|
||||
"build:ssr-prod": "npm run build-prod && ng run connect:server:production",
|
||||
"prerender": "ng run connect:prerender",
|
||||
"postinstall": "chmod +x clean-library.sh && ./clean-library.sh",
|
||||
"after-build-clean": "rm -rf dist/connect/browser/assets/common-assets/.svn/ src/app/openaireLibrary/.svn node_modules src/assets/common-assets/.svn/"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^7.2.14",
|
||||
"@angular/cdk": "^7.3.7",
|
||||
"@angular/common": "7.2.14",
|
||||
"@angular/compiler": "7.2.14",
|
||||
"@angular/core": "7.2.14",
|
||||
"@angular/forms": "7.2.14",
|
||||
"@angular/http": "7.2.14",
|
||||
"@angular/material": "^7.3.7",
|
||||
"@angular/platform-browser": "7.2.14",
|
||||
"@angular/platform-browser-dynamic": "7.2.14",
|
||||
"@angular/platform-server": "7.2.14",
|
||||
"@angular/router": "7.2.14",
|
||||
"@nguniversal/express-engine": "^6.0.0",
|
||||
"@nguniversal/module-map-ngfactory-loader": "^6.0.0",
|
||||
"@types/express": "^4.16.1",
|
||||
"@angular/animations": "~11.2.14",
|
||||
"@angular/cdk": "^11.2.13",
|
||||
"@angular/common": "~11.2.14",
|
||||
"@angular/compiler": "~11.2.14",
|
||||
"@angular/core": "~11.2.14",
|
||||
"@angular/forms": "~11.2.14",
|
||||
"@angular/localize": "^11.2.14",
|
||||
"@angular/material": "^11.2.13",
|
||||
"@angular/platform-browser": "~11.2.14",
|
||||
"@angular/platform-browser-dynamic": "~11.2.14",
|
||||
"@angular/platform-server": "~11.2.14",
|
||||
"@angular/router": "~11.2.14",
|
||||
"@nguniversal/express-engine": "^11.2.1",
|
||||
"clipboard": "^1.5.16",
|
||||
"core-js": "^2.4.1",
|
||||
"core-js": "^2.5.4",
|
||||
"express": "^4.15.2",
|
||||
"jquery": "^3.4.1",
|
||||
"ngx-json-ld": "0.1.6",
|
||||
"prom-client": "^11.3.0",
|
||||
"ng-recaptcha": "^7.0.1",
|
||||
"ng2-ckeditor": "1.3.1",
|
||||
"rxjs": "^6.5.1",
|
||||
"ts-md5": "^1.2.0",
|
||||
"tslib": "^1.9.0",
|
||||
"zone.js": "^0.8.26",
|
||||
"ng-recaptcha": "^3.0.5",
|
||||
"ng2-ckeditor": "1.1.9"
|
||||
"tslib": "^2.0.0",
|
||||
"zone.js": "~0.10.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.13.0",
|
||||
"@angular/cli": "^7.3.9",
|
||||
"@angular/compiler-cli": "7.2.14",
|
||||
"@angular/language-service": "7.2.14",
|
||||
"@types/jquery": "^3.3.29",
|
||||
"@types/node": "^8.0.30",
|
||||
"cpy-cli": "^1.0.1",
|
||||
"http-server": "^0.10.0",
|
||||
"reflect-metadata": "^0.1.10",
|
||||
"rxjs": "6.5.1",
|
||||
"rxjs-compat": "^6.5.1",
|
||||
"ts-loader": "^4.2.0",
|
||||
"typescript": "3.2.4",
|
||||
"webpack-cli": "^3.3.2"
|
||||
"@angular-devkit/build-angular": "~0.1102.14",
|
||||
"@angular/cli": "~11.2.14",
|
||||
"@angular/compiler-cli": "~11.2.14",
|
||||
"@angular/language-service": "~11.2.14",
|
||||
"@nguniversal/builders": "^11.2.1",
|
||||
"@types/node": "^12.11.1",
|
||||
"@types/jasmine": "~3.6.0",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/express": "^4.17.0",
|
||||
"@types/compression": "^1.7.0",
|
||||
"codelyzer": "^6.0.0",
|
||||
"jasmine-core": "~3.8.0",
|
||||
"jasmine-spec-reporter": "~5.0.0",
|
||||
"karma": "~6.3.3",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||
"karma-jasmine": "~4.0.0",
|
||||
"karma-jasmine-html-reporter": "^1.6.0",
|
||||
"protractor": "~7.0.0",
|
||||
"ts-node": "~7.0.0",
|
||||
"typescript": "~4.0.7"
|
||||
}
|
||||
}
|
||||
|
@ -1,45 +0,0 @@
|
||||
// Load zone.js for the server.
|
||||
import 'zone.js/dist/zone-node';
|
||||
import 'reflect-metadata';
|
||||
import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'fs';
|
||||
import { join } from 'path';
|
||||
|
||||
import { enableProdMode } from '@angular/core';
|
||||
// Faster server renders w/ Prod mode (dev mode never needed)
|
||||
enableProdMode();
|
||||
|
||||
// Express Engine
|
||||
import { ngExpressEngine } from '@nguniversal/express-engine';
|
||||
// Import module map for lazy loading
|
||||
import { provideModuleMap } from '@nguniversal/module-map-ngfactory-loader';
|
||||
import { renderModuleFactory } from '@angular/platform-server';
|
||||
import { ROUTES } from './static.paths';
|
||||
|
||||
// * NOTE :: leave this as require() since this file is built Dynamically from webpack
|
||||
const { AppServerModuleNgFactory, LAZY_MODULE_MAP } = require('./dist/server/main');
|
||||
|
||||
const BROWSER_FOLDER = join(process.cwd(), 'browser');
|
||||
|
||||
// Load the index.html file containing referances to your application bundle.
|
||||
const index = readFileSync(join('browser', 'index.html'), 'utf8');
|
||||
|
||||
let previousRender = Promise.resolve();
|
||||
|
||||
// Iterate each route path
|
||||
ROUTES.forEach(route => {
|
||||
const fullPath = join(BROWSER_FOLDER, route);
|
||||
|
||||
// Make sure the directory structure is there
|
||||
if(!existsSync(fullPath)){
|
||||
mkdirSync(fullPath);
|
||||
}
|
||||
|
||||
// Writes rendered HTML to index.html, replacing the file if it already exists.
|
||||
previousRender = previousRender.then(_ => renderModuleFactory(AppServerModuleNgFactory, {
|
||||
document: index,
|
||||
url: route,
|
||||
extraProviders: [
|
||||
provideModuleMap(LAZY_MODULE_MAP)
|
||||
]
|
||||
})).then(html => writeFileSync(join(fullPath, 'index.html'), html));
|
||||
});
|
@ -1,21 +1,15 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import {ServerModule, ServerTransferStateModule} from '@angular/platform-server';
|
||||
import {ModuleMapLoaderModule} from '@nguniversal/module-map-ngfactory-loader';
|
||||
|
||||
import {AppModule} from './app.module';
|
||||
import {AppComponent} from './app.component';
|
||||
import { AppModule } from './app.module';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
// The AppServerModule should import your AppModule followed
|
||||
// by the ServerModule from @angular/platform-server.
|
||||
AppModule,
|
||||
ServerModule,
|
||||
ModuleMapLoaderModule,
|
||||
ServerTransferStateModule
|
||||
],
|
||||
// Since the bootstrapped component is not inherited from your
|
||||
// imported AppModule, it needs to be repeated here.
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppServerModule {}
|
||||
|
@ -0,0 +1,32 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, '../coverage/connect'),
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
fixWebpackSourcePaths: true
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false,
|
||||
restartOnFileChange: true
|
||||
});
|
||||
};
|
@ -1,8 +1,15 @@
|
||||
import {properties} from "./environments/environment";
|
||||
import {enableProdMode} from "@angular/core";
|
||||
/***************************************************************************************************
|
||||
* Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
|
||||
*/
|
||||
import '@angular/localize/init';
|
||||
|
||||
import { enableProdMode } from '@angular/core';
|
||||
|
||||
import {properties} from './environments/environment';
|
||||
|
||||
if (properties.environment !== "development") {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
export { AppServerModule } from './app/app.server.module';
|
||||
export { renderModule, renderModuleFactory } from '@angular/platform-server';
|
||||
|
@ -0,0 +1,20 @@
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/dist/zone-testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
@ -1,21 +1,17 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"extends": "./tsconfig.app.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/app",
|
||||
"baseUrl": "./",
|
||||
// Set the module format to "commonjs":
|
||||
"module": "commonjs",
|
||||
"outDir": "../out-tsc/app-server",
|
||||
"target": "es2016",
|
||||
"types": [
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"exclude": [
|
||||
"test.ts",
|
||||
"**/*.spec.ts"
|
||||
"files": [
|
||||
"main.server.ts",
|
||||
"../server.ts"
|
||||
],
|
||||
// Add "angularCompilerOptions" with the AppServerModule you wrote
|
||||
// set as the "entryModule".
|
||||
"angularCompilerOptions": {
|
||||
"entryModule": "app/app.server.module#AppServerModule"
|
||||
"entryModule": "./app/app.server.module#AppServerModule"
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,18 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/spec",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"test.ts",
|
||||
"polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.spec.ts",
|
||||
"**/*.d.ts"
|
||||
]
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
export const ROUTES = [
|
||||
'/',
|
||||
'/lazy',
|
||||
'/home',
|
||||
'/search/publication','/search/other','/search/project','/search/dataset','/search/dataprovider','/search/organization',
|
||||
'/search/find',
|
||||
'/search/person','/search/publication','/search/project','/search/dataset','/search/dataprovider','/search/organization',
|
||||
'/search/find/people','/search/find/publications','/search/find/other','/search/find/projects','/search/find/datasets','/search/find/dataproviders','/search/find/organizations',
|
||||
'/search/advanced/people','/search/advanced/publications','/search/advanced/other','/search/advanced/projects','/search/advanced/datasets','/search/advanced/dataproviders','/search/advanced/organizations',
|
||||
'/participate/deposit-publications','/participate/deposit-datasets','/participate/deposit-publications-result','/participate/deposit-datasets-result','/participate/deposit-subject-result',
|
||||
'/search/content-providers','/search/content-providers-table','/search/entity-registries','/search/entity-registries-table','/search/journals','/search/journals-table',
|
||||
'/project-report','/claims','/myclaims','/participate/claim','/participate/direct-claim','/claims-project-manager',
|
||||
'/test','/user-info',
|
||||
'/error', '/*path'
|
||||
];
|
@ -1,22 +1,23 @@
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"downlevelIteration": true,
|
||||
"outDir": "./dist/out-tsc",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"module": "es2020",
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"target": "es5",
|
||||
"importHelpers": true,
|
||||
"target": "es2015",
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
"lib": [
|
||||
"es2017",
|
||||
"es2018",
|
||||
"dom"
|
||||
],
|
||||
"module": "es2015",
|
||||
"baseUrl": "./"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,51 +0,0 @@
|
||||
// Work around for https://github.com/angular/angular-cli/issues/7200
|
||||
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
|
||||
module.exports = {
|
||||
//mode: 'none',
|
||||
entry: {
|
||||
// This is our Express server for Dynamic universal
|
||||
server: './server.ts',
|
||||
// This is an example of Static prerendering (generative)
|
||||
prerender: './prerender.ts'
|
||||
},
|
||||
target: 'node',
|
||||
resolve: { extensions: ['.ts', '.js'] },
|
||||
// Make sure we include all node_modules etc
|
||||
externals: [/(node_modules|main\..*\.js)/,],
|
||||
optimization: {
|
||||
minimize: false
|
||||
},
|
||||
output: {
|
||||
// Puts the output at the root of the dist folder
|
||||
path: path.join(__dirname, 'dist'),
|
||||
filename: '[name].js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{ test: /\.ts$/, loader: 'ts-loader' }
|
||||
,{
|
||||
// Mark files inside `@angular/core` as using SystemJS style dynamic imports.
|
||||
// Removing this will cause deprecation warnings to appear.
|
||||
test: /(\\|\/)@angular(\\|\/)core(\\|\/).+\.js$/,
|
||||
parser: { system: true },
|
||||
},
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ContextReplacementPlugin(
|
||||
// fixes WARNING Critical dependency: the request of a dependency is an expression
|
||||
/(.+)?angular(\\|\/)core(.+)?/,
|
||||
path.join(__dirname, 'src'), // location of your src
|
||||
{} // a map of your routes
|
||||
),
|
||||
new webpack.ContextReplacementPlugin(
|
||||
// fixes WARNING Critical dependency: the request of a dependency is an expression
|
||||
/(.+)?express(\\|\/)(.+)?/,
|
||||
path.join(__dirname, 'src'),
|
||||
{}
|
||||
)
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue