@adobe/aem-cli 16.19.12 → 16.19.13
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 +7 -0
- package/package.json +1 -1
- package/src/content/clone.cmd.js +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [16.19.13](https://github.com/adobe/helix-cli/compare/v16.19.12...v16.19.13) (2026-06-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **content:** normalize org/repo to lowercase in aem content clone ([#2735](https://github.com/adobe/helix-cli/issues/2735)) ([1bba483](https://github.com/adobe/helix-cli/commit/1bba48323f19024af5682e2c751bb073bd91b4ce))
|
|
7
|
+
|
|
1
8
|
## [16.19.12](https://github.com/adobe/helix-cli/compare/v16.19.11...v16.19.12) (2026-06-03)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/content/clone.cmd.js
CHANGED
|
@@ -101,14 +101,14 @@ export default class CloneCommand {
|
|
|
101
101
|
throw new Error('Clone root path was not set (internal error).');
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
// 1. Resolve
|
|
104
|
+
// 1. Resolve owner/repo from git remote
|
|
105
105
|
const originUrl = await GitUtils.getOriginURL(this._dir);
|
|
106
106
|
if (!originUrl) {
|
|
107
107
|
throw new Error('No git remote found. Run `aem content clone` inside an AEM project directory.');
|
|
108
108
|
}
|
|
109
|
-
const
|
|
110
|
-
const
|
|
111
|
-
log.info(`Cloning content from da.live: ${
|
|
109
|
+
const owner = originUrl.owner.toLowerCase();
|
|
110
|
+
const repo = originUrl.repo.toLowerCase();
|
|
111
|
+
log.info(`Cloning content from da.live: ${owner}/${repo}${this._rootPath === '/' ? '' : ` @ ${this._rootPath}`}`);
|
|
112
112
|
|
|
113
113
|
// 2. Ensure target path is available (do not create content/ until after file count is known)
|
|
114
114
|
const contentDir = path.resolve(this._dir, CONTENT_DIR);
|
|
@@ -126,7 +126,7 @@ export default class CloneCommand {
|
|
|
126
126
|
const client = new DaClient(token);
|
|
127
127
|
log.info('Fetching file list...');
|
|
128
128
|
const showDiscoveryProgress = process.stdout.isTTY;
|
|
129
|
-
const files = await client.listAll(
|
|
129
|
+
const files = await client.listAll(owner, repo, this._rootPath, showDiscoveryProgress
|
|
130
130
|
? (n) => {
|
|
131
131
|
process.stdout.write(`\r ${n} file(s) discovered so far...`);
|
|
132
132
|
}
|
|
@@ -148,15 +148,15 @@ export default class CloneCommand {
|
|
|
148
148
|
const downloadResults = await processQueue(
|
|
149
149
|
files,
|
|
150
150
|
async (file) => {
|
|
151
|
-
const prefix = `/${
|
|
151
|
+
const prefix = `/${owner}/${repo}`;
|
|
152
152
|
if (!file.path.startsWith(prefix)) {
|
|
153
|
-
log.warn(` skip (unexpected path, missing
|
|
153
|
+
log.warn(` skip (unexpected path, missing owner/repo prefix): ${file.path}`);
|
|
154
154
|
return { status: 404 };
|
|
155
155
|
}
|
|
156
156
|
const daPath = file.path.slice(prefix.length) || '/';
|
|
157
157
|
const localPath = path.join(contentDir, ...daPath.split('/').filter(Boolean));
|
|
158
158
|
try {
|
|
159
|
-
const res = await client.getSource(
|
|
159
|
+
const res = await client.getSource(owner, repo, daPath);
|
|
160
160
|
if (!res) {
|
|
161
161
|
log.warn(` skip (not found): ${daPath}`);
|
|
162
162
|
return { status: 404 };
|
|
@@ -195,7 +195,7 @@ export default class CloneCommand {
|
|
|
195
195
|
await git.commit({
|
|
196
196
|
fs,
|
|
197
197
|
dir: contentDir,
|
|
198
|
-
message: `clone: ${
|
|
198
|
+
message: `clone: ${owner}/${repo}${this._rootPath === '/' ? '' : ` (${this._rootPath})`}`,
|
|
199
199
|
author: GIT_AUTHOR,
|
|
200
200
|
});
|
|
201
201
|
const headOid = await git.resolveRef({ fs, dir: contentDir, ref: 'HEAD' });
|
|
@@ -203,7 +203,7 @@ export default class CloneCommand {
|
|
|
203
203
|
|
|
204
204
|
// 8. Write config (not tracked by git)
|
|
205
205
|
await fse.writeJson(path.join(contentDir, CONFIG_FILE), {
|
|
206
|
-
|
|
206
|
+
owner,
|
|
207
207
|
repo,
|
|
208
208
|
rootPath: this._rootPath,
|
|
209
209
|
}, { spaces: 2 });
|