Skip to content

Commit

Permalink
Merge development v1.2.2 into master (#59)
Browse files Browse the repository at this point in the history
* #49 - Update to latest Core Components & 6.4 UberJAR

* Support Server-side rendering requests for Template page paths issue-#50 (PR - #51)

* @releng [maven-scm] :prepare release we-retail-journal-1.2.2

* @releng [maven-scm] :prepare for next development iteration
  • Loading branch information
sharanyavinod authored Nov 5, 2019
1 parent 337fb3d commit 73fa8bf
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 26 deletions.
4 changes: 2 additions & 2 deletions all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.adobe.cq.sample.spa</groupId>
<artifactId>we-retail-journal</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -32,7 +32,7 @@
<!-- ====================================================================== -->
<artifactId>we-retail-journal-all</artifactId>
<packaging>content-package</packaging>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>

<name>We.Retail Journal All-in-One</name>
<description>All-in-One package for We.Retail Journal</description>
Expand Down
8 changes: 6 additions & 2 deletions angular-app/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ Most probably the images are having relative paths, and because we are not on AE
Quick fix would be to force the AEM absolute path on the images from the image component

## Running the local NODE.js Server Side Rendering.
In order to get the server side rendering to work run the following commands
First, Set the API_HOST configuration in [src/environments/environment.ts](https://github.com/adobe/aem-sample-we-retail-journal/blob/master/angular-app/src/environments/environment.ts#L7) pointing to your AEM instance:

```API_HOST: "http://localhost:4502",```

Now, In order to get the server side rendering to work run the following commands
```
npm run build:ssr
```
Expand All @@ -44,7 +48,7 @@ then
npm run serve:ssr
```

This will open a server on port 4000 so you can navigate to http://localhost:4000/content/we-retail-journal/angular/home.html to see the running example
This will open a server on port 4200 so you can navigate to http://localhost:4200/content/we-retail-journal/angular/en/home.html to see the running example

### SSR Setup

Expand Down
4 changes: 2 additions & 2 deletions angular-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.adobe.cq.sample.spa</groupId>
<artifactId>we-retail-journal</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -32,7 +32,7 @@
<!-- ====================================================================== -->
<artifactId>we-retail-journal-angular-app</artifactId>
<packaging>jar</packaging>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>

<name>We.Retail Journal Angular App</name>
<description>Angular App for the We.Retail Journal</description>
Expand Down
6 changes: 3 additions & 3 deletions angular-app/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ enableProdMode();
// Express server
const app = express();

const PORT = process.env.PORT || 4000;
const PORT = process.env.PORT || 4200;
const DIST_FOLDER = join(process.cwd(), 'dist');
const APP_ROOT_PATH = environment.APP_ROOT_PATH;

Expand Down Expand Up @@ -51,7 +51,7 @@ app.get('/api/*', (req, res) => {
app.get('*.*', express.static(join(DIST_FOLDER, 'browser')));

// All regular routes use the Universal engine
app.get(`${APP_ROOT_PATH}*.html`, (req, res, next) => {
app.get([`${APP_ROOT_PATH}*.html`, '/conf/we-retail-journal/angular/settings/wcm/templates*.html'], (req, res, next) => {
if (!environment.APP_ROOT_PATH) {
console.error("You have not set any root path for app. Be sure you set the environment variable APP_ROOT_PATH before running the command");
process.exit(1);
Expand All @@ -75,7 +75,7 @@ app.get(`${APP_ROOT_PATH}*.html`, (req, res, next) => {
});
});

app.post(`${APP_ROOT_PATH}*.html`, (req, res, next) => {
app.post([`${APP_ROOT_PATH}*.html`, '/conf/we-retail-journal/angular/settings/wcm/templates*.html'], (req, res, next) => {
const pageModelRootPath = req.headers['page-model-root-url'] || APP_ROOT_PATH;
let model = req.body;
ModelManager.destroy();
Expand Down
4 changes: 2 additions & 2 deletions bundles/commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.adobe.cq.sample.spa</groupId>
<artifactId>we-retail-journal</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand All @@ -32,7 +32,7 @@
<!-- ====================================================================== -->
<artifactId>we-retail-journal-commons</artifactId>
<packaging>bundle</packaging>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>

<name>We.Retail Journal Commons</name>
<description>Bundle for We.Retail Journal Commons</description>
Expand Down
4 changes: 2 additions & 2 deletions bundles/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.adobe.cq.sample.spa</groupId>
<artifactId>we-retail-journal</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand All @@ -32,7 +32,7 @@
<!-- ====================================================================== -->
<artifactId>we-retail-journal-core</artifactId>
<name>We.Retail Journal Core</name>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>
<description>Content package We.Retail Journal SPAs Core bundles</description>
<packaging>bundle</packaging>

Expand Down
4 changes: 2 additions & 2 deletions bundles/ssr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.adobe.cq.sample.spa</groupId>
<artifactId>we-retail-journal</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand All @@ -32,7 +32,7 @@
<!-- ====================================================================== -->
<artifactId>we-retail-journal-ssr</artifactId>
<name>We.Retail Journal Server Side Rendering</name>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>
<packaging>bundle</packaging>

<!-- ====================================================================== -->
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<groupId>com.adobe.cq.sample.spa</groupId>
<artifactId>we-retail-journal</artifactId>
<packaging>pom</packaging>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>

<name>We.Retail Journal Reactor</name>
<description>Reactor POM for We.Retail Journal</description>
Expand Down Expand Up @@ -600,7 +600,7 @@
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<version>6.3.1.2</version>
<version>6.4.2</version>
<classifier>apis</classifier>
<scope>provided</scope>
</dependency>
Expand Down Expand Up @@ -730,7 +730,7 @@
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.core</artifactId>
<version>2.3.2</version>
<version>2.4.0</version>
<scope>provided</scope>
</dependency>

Expand Down
4 changes: 2 additions & 2 deletions react-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.adobe.cq.sample.spa</groupId>
<artifactId>we-retail-journal</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -32,7 +32,7 @@
<!-- ====================================================================== -->
<artifactId>we-retail-journal-react-app</artifactId>
<packaging>jar</packaging>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>

<name>We.Retail Journal React App</name>
<description>React App for the We.Retail Journal</description>
Expand Down
4 changes: 2 additions & 2 deletions react-app/src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function renderModelToHTMLString(model, pagePath, requestUrl, requestPath, pageM
</script>`;
}

exapp.get('/content/we-retail-journal/react*.html', (req, res, next) => {
exapp.get(['/content/we-retail-journal/react*.html', '/conf/we-retail-journal/react/settings/wcm/templates*.html'], (req, res, next) => {
if (!process.env.API_HOST) {
console.error("You have not set any api host. Be sure you set the environment variable API_HOST before running the command");
process.exit(1);
Expand All @@ -92,7 +92,7 @@ exapp.get('/content/we-retail-journal/react*.html', (req, res, next) => {
});
});

exapp.post("/content/we-retail-journal/react*.html", (req, res, next) => {
exapp.post(['/content/we-retail-journal/react*.html', '/conf/we-retail-journal/react/settings/wcm/templates*.html'], (req, res, next) => {
const wcmMode = req.headers['wcm-mode'];
const isInEditor = wcmMode && wcmMode === 'EDIT' || wcmMode === 'PREVIEW';
const pageModelRootPath = req.headers['page-model-root-url'] || APP_ROOT_PATH;
Expand Down
4 changes: 2 additions & 2 deletions ui.apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.adobe.cq.sample.spa</groupId>
<artifactId>we-retail-journal</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -32,7 +32,7 @@
<!-- ====================================================================== -->
<artifactId>we-retail-journal-apps</artifactId>
<packaging>content-package</packaging>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>

<name>We.Retail Journal Application</name>
<description>Application package We.Retail Journal SPAs</description>
Expand Down
4 changes: 2 additions & 2 deletions ui.content/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.adobe.cq.sample.spa</groupId>
<artifactId>we-retail-journal</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -32,7 +32,7 @@
<!-- ====================================================================== -->
<artifactId>we-retail-journal-content</artifactId>
<packaging>content-package</packaging>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>

<name>We.Retail Journal Content</name>
<description>Content package We.Retail Journal SPAs</description>
Expand Down

0 comments on commit 73fa8bf

Please sign in to comment.