Skip to content

Commit a04453b

Browse files
authored
feat: use aem page (#494)
1 parent 8926dab commit a04453b

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Semantic Release
22
on:
33
push:
44
branches:
5-
- 'main'
5+
- main
66

77
jobs:
88
build:

src/steps/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
const AZURE_BLOB_REGEXP = /^https:\/\/hlx\.blob\.core\.windows\.net\/external\//;
1414

15-
const MEDIA_BLOB_REGEXP = /^https:\/\/.*\.hlx3?\.(live|page)\/media_.*/;
15+
const MEDIA_BLOB_REGEXP = /^https:\/\/.*\.(aem|hlx3?)\.(live|page)\/media_.*/;
1616

17-
const HELIX_URL_REGEXP = /^https:\/\/(?!admin\.|www\.)[^.]+\.hlx3?\.(live|page)\/?.*/;
17+
const HELIX_URL_REGEXP = /^https:\/\/(?!admin\.|www\.)[^.]+\.(aem|hlx3?)\.(live|page)\/?.*/;
1818

1919
/**
2020
* Returns the original host name from the request to the outer CDN.

src/utils/auth.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import idpMicrosoft from './idp-configs/microsoft.js';
2424
// eslint-disable-next-line import/no-unresolved
2525
import cryptoImpl from '#crypto';
2626

27-
const AUTH_REDIRECT_URL = 'https://login.hlx.page/.auth';
27+
const AUTH_REDIRECT_URL = 'https://login.aem.page/.auth';
2828

2929
let ADMIN_KEY_PAIR = null;
3030

test/steps/utils.test.js

+5
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ describe('Rewrite URLs test', () => {
113113
assert.strictEqual(rewriteUrl({}, 'https://main--pages--adobe.hlx.live/media_1234.png'), './media_1234.png');
114114
assert.strictEqual(rewriteUrl({}, 'https://main--pages--adobe.hlx.page/media_1234.png'), './media_1234.png');
115115
assert.strictEqual(rewriteUrl({}, 'https://main--pages--adobe.hlx3.page/media_1234.png'), './media_1234.png');
116+
assert.strictEqual(rewriteUrl({}, 'https://main--pages--adobe.aem.page/media_1234.png'), './media_1234.png');
117+
assert.strictEqual(rewriteUrl({}, 'https://main--pages--adobe.aem.live/media_1234.png'), './media_1234.png');
116118
});
117119

118120
it('replaces an helix url', () => {
@@ -133,15 +135,18 @@ describe('Rewrite URLs test', () => {
133135
});
134136

135137
it('replaces an helix url with fragments', () => {
138+
assert.strictEqual(rewriteUrl({}, 'https://main--pages--adobe.aem.page/blog/article#heading'), '/blog/article#heading');
136139
assert.strictEqual(rewriteUrl({}, 'https://main--pages--adobe.hlx.page/blog/article#heading'), '/blog/article#heading');
137140
assert.strictEqual(rewriteUrl({}, 'https://main--pages--adobe.hlx.live/blog/article#heading'), '/blog/article#heading');
141+
assert.strictEqual(rewriteUrl({}, 'https://main--pages--adobe.aem.live/blog/article#heading'), '/blog/article#heading');
138142
assert.strictEqual(rewriteUrl({}, 'https://main--pages--adobe.hlx3.page/blog/article#heading'), '/blog/article#heading');
139143
assert.strictEqual(rewriteUrl({}, 'https://main--pages--adobe.hlx3.page/blog/article?a=42#heading'), '/blog/article?a=42#heading');
140144
assert.strictEqual(rewriteUrl({}, 'https://mwpw-118214--express-website--adobe.hlx.page/express/experiments/ccx0074/test#how-to-make-flyers'), '/express/experiments/ccx0074/test#how-to-make-flyers');
141145
});
142146

143147
it('keeps helix urls for www and admin in place', () => {
144148
assert.strictEqual(rewriteUrl({}, 'https://www.hlx.page/docs'), 'https://www.hlx.page/docs');
149+
assert.strictEqual(rewriteUrl({}, 'https://www.aem.live/docs'), 'https://www.aem.live/docs');
145150
assert.strictEqual(rewriteUrl({}, 'https://admin.hlx.live/api'), 'https://admin.hlx.live/api');
146151
});
147152

test/utils/auth.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ describe('Auth Test', () => {
306306
assert.deepStrictEqual(sp, {
307307
client_id: 'dummy-clientid',
308308
prompt: 'select_account',
309-
redirect_uri: 'https://login.hlx.page/.auth',
309+
redirect_uri: 'https://login.aem.page/.auth',
310310
response_type: 'code',
311311
scope: 'openid profile email',
312312
state: {
@@ -437,7 +437,7 @@ describe('AuthInfo tests', () => {
437437
assert.deepStrictEqual(sp, {
438438
client_id: 'dummy-clientid',
439439
prompt: 'select_account',
440-
redirect_uri: 'https://login.hlx.page/.auth',
440+
redirect_uri: 'https://login.aem.page/.auth',
441441
response_type: 'code',
442442
scope: 'openid profile email',
443443
state: {

0 commit comments

Comments
 (0)