@adobe/aem-cli 16.10.44 → 16.10.45

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,11 @@
1
+ ## [16.10.45](https://github.com/adobe/helix-cli/compare/v16.10.44...v16.10.45) (2025-08-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * make logger compatible with helix-log v7.0.0 ([#2574](https://github.com/adobe/helix-cli/issues/2574)) ([3b937c5](https://github.com/adobe/helix-cli/commit/3b937c5bee112eadd3f5bb7b4e12b1a2651e0c03))
7
+ * preserve --pagesUrl as proxy with git changes ([#2573](https://github.com/adobe/helix-cli/issues/2573)) ([b5f0dfc](https://github.com/adobe/helix-cli/commit/b5f0dfca2d63c2fbccce6f15f2a241a636940b7a))
8
+
1
9
  ## [16.10.44](https://github.com/adobe/helix-cli/compare/v16.10.43...v16.10.44) (2025-08-25)
2
10
 
3
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/aem-cli",
3
- "version": "16.10.44",
3
+ "version": "16.10.45",
4
4
  "description": "AEM CLI",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/src/log-common.js CHANGED
@@ -100,21 +100,21 @@ export function getOrCreateLogger(config = 'cli') {
100
100
  ? config.logFile
101
101
  : ['-', (config && config.logFile) || path.join(logsDir, `${categ}-server.log`)];
102
102
 
103
- const loggers = new Map();
103
+ const loggers = {};
104
104
  logFiles.forEach((logFile) => {
105
- const name = loggers.has('default') ? logFile : 'default';
105
+ const name = loggers.default ? logFile : 'default';
106
106
  if (logFile === '-') {
107
- loggers.set(name, new ConsoleLogger({
107
+ loggers[name] = new ConsoleLogger({
108
108
  filter: categ === 'cli' ? suppressProgress : filterProgress,
109
109
  level,
110
110
  formatter: categoryAwareMessageFormatConsole,
111
- }));
111
+ });
112
112
  } else {
113
113
  fs.ensureDirSync(path.dirname(logFile));
114
- loggers.set(name, new FileLogger(logFile, {
114
+ loggers[name] = new FileLogger(logFile, {
115
115
  level: 'debug',
116
116
  formatter: /\.json/.test(logFile) ? messageFormatJsonString : messageFormatTechnical,
117
- }));
117
+ });
118
118
  }
119
119
  });
120
120
 
package/src/up.cmd.js CHANGED
@@ -25,7 +25,7 @@ export default class UpCommand extends AbstractServerCommand {
25
25
  }
26
26
 
27
27
  withUrl(value) {
28
- this._url = value;
28
+ this._originalUrl = value;
29
29
  return this;
30
30
  }
31
31
 
@@ -90,13 +90,7 @@ export default class UpCommand extends AbstractServerCommand {
90
90
  if (!this._gitUrl) {
91
91
  throw Error('No git remote found. Make sure you have a remote "origin" configured.');
92
92
  }
93
- if (!this._url) {
94
- await this.verifyUrl(this._gitUrl, ref);
95
- } else if (/\{\{(owner|repo)+\}\}/.test(this._url)) {
96
- this._url = this._url
97
- .replace(/\{\{owner\}\}/, this._gitUrl.owner)
98
- .replace(/\{\{repo\}\}/, this._gitUrl.repo);
99
- }
93
+ await this.initUrl(this._gitUrl, ref);
100
94
  this._project.withProxyUrl(this._url);
101
95
  const { site, org } = this.extractSiteAndOrg(this._url);
102
96
  if (site && org) {
@@ -138,7 +132,7 @@ export default class UpCommand extends AbstractServerCommand {
138
132
  return { site, org };
139
133
  }
140
134
 
141
- async verifyUrl(gitUrl, ref) {
135
+ async initUrl(gitUrl, ref) {
142
136
  const dnsName = `${ref.replace(/\//g, '-')}--${gitUrl.repo}--${gitUrl.owner}`;
143
137
  // check length limit
144
138
  if (dnsName.length > 63) {
@@ -148,8 +142,8 @@ export default class UpCommand extends AbstractServerCommand {
148
142
  throw Error('branch name too long');
149
143
  }
150
144
 
151
- // always proxy to main
152
- this._url = `https://main--${gitUrl.repo}--${gitUrl.owner}.aem.page`;
145
+ const url = this._originalUrl || 'https://main--{{repo}}--{{owner}}.aem.page';
146
+ this._url = url.replace(/\{\{(owner|repo)\}\}/g, (_, key) => gitUrl[key]);
153
147
  }
154
148
 
155
149
  /**
@@ -182,7 +176,7 @@ export default class UpCommand extends AbstractServerCommand {
182
176
  if (gitUrl.toString() !== this._gitUrl.toString()) {
183
177
  this.log.info('git HEAD or remotes changed, reconfiguring server...');
184
178
  this._gitUrl = gitUrl;
185
- await this.verifyUrl(gitUrl, ref);
179
+ await this.initUrl(gitUrl, ref);
186
180
  this._project.withProxyUrl(this._url);
187
181
  await this._project.initHeadHtml();
188
182
  this.log.info(`Updated proxy to ${this._url}`);