@adobe/aem-cli 16.10.13 → 16.10.15
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [16.10.15](https://github.com/adobe/helix-cli/compare/v16.10.14...v16.10.15) (2025-04-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* always open aem.page ([7c33338](https://github.com/adobe/helix-cli/commit/7c333381af5317bb2c957185aa9357b6bb26007e))
|
|
7
|
+
* Remove accept-encoding in proxy call to use nodejs defaults ([#2513](https://github.com/adobe/helix-cli/issues/2513)) ([f91c8ad](https://github.com/adobe/helix-cli/commit/f91c8adc645a3b70c92efcf0e469c40760ef6f7a))
|
|
8
|
+
|
|
9
|
+
## [16.10.14](https://github.com/adobe/helix-cli/compare/v16.10.13...v16.10.14) (2025-04-03)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **deps:** update dependency express to v5 ([#2510](https://github.com/adobe/helix-cli/issues/2510)) ([6eeb467](https://github.com/adobe/helix-cli/commit/6eeb4671615c0676d777047f58391012b1ff5ab7))
|
|
15
|
+
|
|
1
16
|
## [16.10.13](https://github.com/adobe/helix-cli/compare/v16.10.12...v16.10.13) (2025-03-31)
|
|
2
17
|
|
|
3
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/aem-cli",
|
|
3
|
-
"version": "16.10.
|
|
3
|
+
"version": "16.10.15",
|
|
4
4
|
"description": "AEM CLI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"test": "c8 mocha",
|
|
14
14
|
"test-ci-win": "npx mocha --reporter xunit test --reporter-options output=junit/test.xml -t 5000",
|
|
15
15
|
"lint": "eslint .",
|
|
16
|
+
"lint:fix": "eslint --fix .",
|
|
16
17
|
"semantic-release": "semantic-release",
|
|
17
18
|
"semantic-release-dry": "semantic-release --dry-run --branches $CI_BRANCH",
|
|
18
19
|
"prepare": "husky"
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"cookie": "1.0.2",
|
|
51
52
|
"cookie-parser": "1.4.7",
|
|
52
53
|
"dotenv": "16.4.7",
|
|
53
|
-
"express": "
|
|
54
|
+
"express": "5.1.0",
|
|
54
55
|
"faye-websocket": "0.11.4",
|
|
55
56
|
"fs-extra": "11.3.0",
|
|
56
57
|
"glob": "11.0.1",
|
package/src/server/BaseServer.js
CHANGED
|
@@ -142,6 +142,7 @@ export class BaseServer extends EventEmitter {
|
|
|
142
142
|
const listenCb = (err) => {
|
|
143
143
|
if (err) {
|
|
144
144
|
reject(new Error(`Error while starting ${this._scheme} server: ${err}`));
|
|
145
|
+
return;
|
|
145
146
|
}
|
|
146
147
|
this._port = this._server.address().port;
|
|
147
148
|
this._addr = this._server.address().address;
|
|
@@ -105,6 +105,7 @@ export class HelixImportServer extends BaseServer {
|
|
|
105
105
|
delete headers.connection;
|
|
106
106
|
delete headers.host;
|
|
107
107
|
delete headers.referer;
|
|
108
|
+
delete headers['accept-encoding'];
|
|
108
109
|
await this._updateHeaders(headers);
|
|
109
110
|
|
|
110
111
|
const ret = await getFetch(ctx.config.allowInsecure)(url, {
|
|
@@ -200,13 +201,13 @@ export class HelixImportServer extends BaseServer {
|
|
|
200
201
|
|
|
201
202
|
async setupApp() {
|
|
202
203
|
await super.setupApp();
|
|
203
|
-
const localFiles = [
|
|
204
|
+
const localFiles = [/\/tools\/.*/, '/component-definition.json', '/component-filters.json', '/component-models.json'];
|
|
204
205
|
localFiles.forEach((file) => {
|
|
205
206
|
this.app.get(file, asyncHandler(this.handleToolsRequest.bind(this)));
|
|
206
207
|
});
|
|
207
208
|
const handler = asyncHandler(this.handleProxyModeRequest.bind(this));
|
|
208
|
-
this.app.get(
|
|
209
|
-
this.app.post(
|
|
209
|
+
this.app.get(/.*/, handler);
|
|
210
|
+
this.app.post(/.*/, handler);
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
async doStop() {
|
|
@@ -227,8 +227,8 @@ export class HelixServer extends BaseServer {
|
|
|
227
227
|
this.app.options(LOGIN_ACK_ROUTE, asyncHandler(this.handleLoginAck.bind(this)));
|
|
228
228
|
|
|
229
229
|
const handler = asyncHandler(this.handleProxyModeRequest.bind(this));
|
|
230
|
-
this.app.get(
|
|
231
|
-
this.app.post(
|
|
230
|
+
this.app.get(/.*/, handler);
|
|
231
|
+
this.app.post(/.*/, handler);
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
async doStop() {
|
|
@@ -35,14 +35,14 @@ export default class RequestContext {
|
|
|
35
35
|
this._queryString = purl.search || '';
|
|
36
36
|
this._selector = '';
|
|
37
37
|
this._extension = '';
|
|
38
|
-
this._headers =
|
|
39
|
-
this._method =
|
|
40
|
-
this._params =
|
|
38
|
+
this._headers = request.headers || {};
|
|
39
|
+
this._method = request.method || 'GET';
|
|
40
|
+
this._params = request.query || {};
|
|
41
41
|
this._requestId = utils.randomChars(32);
|
|
42
42
|
this._logger = cfg.log;
|
|
43
43
|
|
|
44
|
-
if (
|
|
45
|
-
this._body =
|
|
44
|
+
if (request.body && Object.entries(request.body).length > 0) {
|
|
45
|
+
this._body = request.body;
|
|
46
46
|
}
|
|
47
47
|
const lastSlash = this._path.lastIndexOf('/');
|
|
48
48
|
if (lastSlash === this._path.length - 1) {
|
package/src/up.cmd.js
CHANGED
|
@@ -16,7 +16,6 @@ import chokidar from 'chokidar';
|
|
|
16
16
|
import { HelixProject } from './server/HelixProject.js';
|
|
17
17
|
import GitUtils from './git-utils.js';
|
|
18
18
|
import pkgJson from './package.cjs';
|
|
19
|
-
import { getFetch } from './fetch-utils.js';
|
|
20
19
|
import { AbstractServerCommand } from './abstract-server.cmd.js';
|
|
21
20
|
|
|
22
21
|
export default class UpCommand extends AbstractServerCommand {
|
|
@@ -140,58 +139,17 @@ export default class UpCommand extends AbstractServerCommand {
|
|
|
140
139
|
}
|
|
141
140
|
|
|
142
141
|
async verifyUrl(gitUrl, ref) {
|
|
143
|
-
// check if the site is on helix5
|
|
144
|
-
// https://admin.hlx.page/sidekick/adobe/www-aem-live/main/config.json
|
|
145
|
-
// {
|
|
146
|
-
// "host": "aem.live",
|
|
147
|
-
// "liveHost": "main--www-aem-live--adobe.aem.live",
|
|
148
|
-
// "plugins": [
|
|
149
|
-
// {
|
|
150
|
-
// "id": "doc",
|
|
151
|
-
// "title": "Documentation",
|
|
152
|
-
// "url": "https://www.aem.live/docs/"
|
|
153
|
-
// }
|
|
154
|
-
// ],
|
|
155
|
-
// "previewHost": "main--www-aem-live--adobe.aem.page",
|
|
156
|
-
// "project": "Helix Website (AEM Live)",
|
|
157
|
-
// "testProperty": "header";
|
|
158
|
-
// }
|
|
159
|
-
let previewHostBase = 'hlx.page';
|
|
160
|
-
const configUrl = `https://admin.hlx.page/sidekick/${gitUrl.owner}/${gitUrl.repo}/main/config.json`;
|
|
161
|
-
try {
|
|
162
|
-
const configResp = await getFetch(this._allowInsecure)(configUrl);
|
|
163
|
-
if (configResp.ok) {
|
|
164
|
-
// this is best effort for now
|
|
165
|
-
const config = await configResp.json();
|
|
166
|
-
const { previewHost } = config;
|
|
167
|
-
if (previewHost && previewHost.endsWith('.aem.page')) {
|
|
168
|
-
previewHostBase = 'aem.page';
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
/* c8 ignore start */
|
|
172
|
-
// this is notoriously hard to test, so we ignore it for now
|
|
173
|
-
// but if you want to give it a try, set up a local server with a self-signed cert
|
|
174
|
-
// change, /etc/hosts to point admin.hlx.page to localhost and run the test
|
|
175
|
-
} catch (e) {
|
|
176
|
-
if (e.code === 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY' || e.code === 'DEPTH_ZERO_SELF_SIGNED_CERT') {
|
|
177
|
-
await this.stop();
|
|
178
|
-
this.log.error(chalk`{yellow ${configUrl}} is using an invalid certificate, please check https://github.com/adobe/helix-cli#troubleshooting for help.`);
|
|
179
|
-
throw Error(e.message);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
/* c8 ignore stop */
|
|
183
|
-
|
|
184
142
|
const dnsName = `${ref.replace(/\//g, '-')}--${gitUrl.repo}--${gitUrl.owner}`;
|
|
185
143
|
// check length limit
|
|
186
144
|
if (dnsName.length > 63) {
|
|
187
|
-
this.log.error(chalk`URL {yellow https://${dnsName}
|
|
145
|
+
this.log.error(chalk`URL {yellow https://${dnsName}.aem.page} exceeds the 63 character limit for DNS labels.`);
|
|
188
146
|
this.log.error(chalk`Please use a shorter branch name or a shorter repository name.`);
|
|
189
147
|
await this.stop();
|
|
190
148
|
throw Error('branch name too long');
|
|
191
149
|
}
|
|
192
150
|
|
|
193
151
|
// always proxy to main
|
|
194
|
-
this._url = `https://main--${gitUrl.repo}--${gitUrl.owner}
|
|
152
|
+
this._url = `https://main--${gitUrl.repo}--${gitUrl.owner}.aem.page`;
|
|
195
153
|
}
|
|
196
154
|
|
|
197
155
|
/**
|