@adobe/aem-cli 16.4.0 → 16.5.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/CHANGELOG.md +14 -0
- package/README.md +24 -0
- package/package.json +7 -7
- package/src/up.cmd.js +20 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [16.5.1](https://github.com/adobe/helix-cli/compare/v16.5.0...v16.5.1) (2024-06-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update adobe fixes ([8b988d4](https://github.com/adobe/helix-cli/commit/8b988d4371650b378186764254b00f5c67ae1ff5))
|
|
7
|
+
|
|
8
|
+
# [16.5.0](https://github.com/adobe/helix-cli/compare/v16.4.0...v16.5.0) (2024-06-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **security:** provide more troubleshooting instructions on `aem up` ([58d3403](https://github.com/adobe/helix-cli/commit/58d340337a2f443f21befede189657b71781abdd))
|
|
14
|
+
|
|
1
15
|
# [16.4.0](https://github.com/adobe/helix-cli/compare/v16.3.26...v16.4.0) (2024-06-11)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -145,3 +145,27 @@ If present, `ALL_PROXY` is used as fallback if there is no other match.
|
|
|
145
145
|
You can use `npm run check` to run the tests and check whether your code adheres
|
|
146
146
|
to the aem-cli coding style.
|
|
147
147
|
|
|
148
|
+
# Troubleshooting
|
|
149
|
+
|
|
150
|
+
## `aem up` fails with `unable to get local issuer certificate`
|
|
151
|
+
|
|
152
|
+
This error occurs when the server certificate is not trusted by Node.js. The typical
|
|
153
|
+
cause is that connections to the server `*.aem.page` and `*.hlx.page` are intercepted
|
|
154
|
+
by an enterprise proxy or firewall which is trying to inspect the traffic.
|
|
155
|
+
|
|
156
|
+
These proxies use a private certificate authority (CA) to sign the certificates of the
|
|
157
|
+
servers they intercept. To make Node.js trust the server certificate, you need to add
|
|
158
|
+
the CA certificate to the list of trusted CAs.
|
|
159
|
+
|
|
160
|
+
The CA certificate is typically provided by your IT department. You can ask them for
|
|
161
|
+
the CA certificate and save it to a file, e.g. `my-ca.crt`.
|
|
162
|
+
|
|
163
|
+
Then you can use the [`NODE_EXTRA_CA_CERTS`](https://nodejs.org/docs/latest/api/cli.html) environment variable to make Node.js trust
|
|
164
|
+
the CA certificate:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
export NODE_EXTRA_CA_CERTS=my-ca.crt
|
|
168
|
+
aem up
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
This will make Node.js trust the server certificate and `aem up` should work.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/aem-cli",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.5.1",
|
|
4
4
|
"description": "AEM CLI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@adobe/fetch": "4.1.8",
|
|
42
42
|
"@adobe/helix-log": "6.0.3",
|
|
43
|
-
"@adobe/helix-shared-config": "10.5.
|
|
44
|
-
"@adobe/helix-shared-git": "3.0.
|
|
45
|
-
"@adobe/helix-shared-indexer": "2.0.
|
|
43
|
+
"@adobe/helix-shared-config": "10.5.3",
|
|
44
|
+
"@adobe/helix-shared-git": "3.0.12",
|
|
45
|
+
"@adobe/helix-shared-indexer": "2.0.27",
|
|
46
46
|
"camelcase": "8.0.0",
|
|
47
47
|
"chalk-template": "1.1.0",
|
|
48
48
|
"chokidar": "3.6.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"semver": "7.6.2",
|
|
72
72
|
"shelljs": "0.8.5",
|
|
73
73
|
"unified": "11.0.4",
|
|
74
|
-
"uuid": "
|
|
74
|
+
"uuid": "10.0.0",
|
|
75
75
|
"yargs": "17.7.2"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
"@adobe/helix-testutils": "0.4.17",
|
|
81
81
|
"@semantic-release/changelog": "6.0.3",
|
|
82
82
|
"@semantic-release/git": "10.0.1",
|
|
83
|
-
"c8": "
|
|
83
|
+
"c8": "10.1.2",
|
|
84
84
|
"eslint": "8.57.0",
|
|
85
85
|
"esmock": "2.6.5",
|
|
86
86
|
"husky": "9.0.11",
|
|
87
87
|
"junit-report-builder": "3.2.1",
|
|
88
|
-
"lint-staged": "15.2.
|
|
88
|
+
"lint-staged": "15.2.7",
|
|
89
89
|
"mocha": "10.4.0",
|
|
90
90
|
"mocha-multi-reporters": "1.5.1",
|
|
91
91
|
"nock": "13.5.4",
|
package/src/up.cmd.js
CHANGED
|
@@ -119,17 +119,30 @@ export default class UpCommand extends AbstractServerCommand {
|
|
|
119
119
|
// "project": "Helix Website (AEM Live)",
|
|
120
120
|
// "testProperty": "header";
|
|
121
121
|
// }
|
|
122
|
-
const configUrl = `https://admin.hlx.page/sidekick/${gitUrl.owner}/${gitUrl.repo}/main/config.json`;
|
|
123
|
-
const configResp = await getFetch(this._allowInsecure)(configUrl);
|
|
124
122
|
let previewHostBase = 'hlx.page';
|
|
125
|
-
|
|
123
|
+
const configUrl = `https://admin.hlx.page/sidekick/${gitUrl.owner}/${gitUrl.repo}/main/config.json`;
|
|
124
|
+
try {
|
|
125
|
+
const configResp = await getFetch(this._allowInsecure)(configUrl);
|
|
126
|
+
if (configResp.ok) {
|
|
126
127
|
// this is best effort for now
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
const config = await configResp.json();
|
|
129
|
+
const { previewHost } = config;
|
|
130
|
+
if (previewHost && previewHost.endsWith('.aem.page')) {
|
|
131
|
+
previewHostBase = 'aem.page';
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/* c8 ignore start */
|
|
135
|
+
// this is notoriously hard to test, so we ignore it for now
|
|
136
|
+
// but if you want to give it a try, set up a local server with a self-signed cert
|
|
137
|
+
// change, /etc/hosts to point admin.hlx.page to localhost and run the test
|
|
138
|
+
} catch (e) {
|
|
139
|
+
if (e.code === 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY' || e.code === 'DEPTH_ZERO_SELF_SIGNED_CERT') {
|
|
140
|
+
await this.stop();
|
|
141
|
+
this.log.error(chalk`{yellow ${configUrl}} is using an invalid certificate, please check https://github.com/adobe/helix-cli#troubleshooting for help.`);
|
|
142
|
+
throw Error(e.message);
|
|
131
143
|
}
|
|
132
144
|
}
|
|
145
|
+
/* c8 ignore stop */
|
|
133
146
|
|
|
134
147
|
const dnsName = `${ref.replace(/\//g, '-')}--${gitUrl.repo}--${gitUrl.owner}`;
|
|
135
148
|
// check length limit
|