Conversation
|
This PR will trigger a minor release when merged. |
tripodsan
left a comment
There was a problem hiding this comment.
@davidnuescheler IIUC, you try to re-create the same that is done in the pipeline, by transforming metadata etc... why don't we use the html2md and html-pipline if really this is what we want to do here.
|
@tripodsan i think this is a rough approximation anyway, as the source is a kind of messy ingested HTML that is very different from the clean |
SummaryAdds Use cases include bulk editing, scripted workflows, and working without the authoring UI. Commands
Authentication: IMS implicit OAuth via browser; token may be passed with
|
|
ok, went through all feedback. Also saw we've merge 4ed1f4b yesterday which has some overlaps... |
|
@shsteimer fyi, we'll have to update a bunch of skills for this. |
| if (token) { | ||
| window.location.href = loggedInUrl; | ||
| } else { | ||
| document.body.innerHTML = '<h2>Login failed.</h2><p>' + (error || 'Unknown error') + '</p>'; |
There was a problem hiding this comment.
don't use error without escaping in innerHTML
| const loggedInUrl = 'https://tools.aem.live/cli/logged-in'; | ||
| fetch(dest) | ||
| .then(() => { | ||
| if (token) { |
There was a problem hiding this comment.
this is strange... why do you fetch if the token is missing?
| if (!await GitUtils.isIgnored(projectDir, DA_TOKEN_FILE)) { | ||
| await fs.appendFile( | ||
| path.join(projectDir, '.gitignore'), | ||
| `${os.EOL}${DA_TOKEN_FILE}${os.EOL}`, | ||
| 'utf8', | ||
| ); | ||
| } | ||
| } |
There was a problem hiding this comment.
why doesn't this use ensureGitIgnored( ) from content-git.js ?
| * @param {string} input | ||
| * @returns {string} | ||
| */ | ||
| export function normalizeDaPath(input) { |
There was a problem hiding this comment.
looks over complicated and doesn't just normalize, but also validate. maybe add at least throws jsdoc
| continuation = next; | ||
| } | ||
|
|
||
| throw new Error(`List pagination for ${daPath} exceeded ${LIST_MAX_PAGES} pages.`); |
There was a problem hiding this comment.
not very user friendly... shouldn't it just return the amount of pages fetched?
| return this; | ||
| } | ||
|
|
||
| async run() { |
There was a problem hiding this comment.
nit: this is a very long function. would be nicer to split....
| if (node.type === 'text') { | ||
| return node.value; | ||
| } | ||
| if ('children' in node && Array.isArray(node.children)) { |
There was a problem hiding this comment.
isn't this just Array.isArray(node.children ?
> node = {}
> Array.isArray(node.children)
false
| * OF ANY KIND, either express or implied. See the License for the specific language | ||
| * governing permissions and limitations under the License. | ||
| */ | ||
|
|
There was a problem hiding this comment.
I thnk this file also belongs in the src/content directory
| * @param {Array<{ pattern: string, regex: RegExp, row: object }>} compiled | ||
| * @returns {Record<string, string> | null} | ||
| */ | ||
| export function mergeMetadataSheetRows(normalizedPath, compiled) { |
There was a problem hiding this comment.
why don't you use the ModifiersConfig from helix-shared? it seems the entire metadata logic is re-implemented here
The saveDaTokenToFile function now uses ensureGitIgnored from content-git.js instead of GitUtils.isIgnored + fs.appendFile. Update the test to mock content-git.ensureGitIgnored and assert it receives the expected token file path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
# [16.18.0](v16.17.1...v16.18.0) (2026-04-16) ### Features * aem content ([#2689](#2689)) ([5524b6d](5524b6d))
|
🎉 This PR is included in version 16.18.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Allows to locally checkout the project content, make modifications, push back and serve locally. Useful for bulk editing.
aem content clonecontent/aem content statusaem content diffaem content mergeaem content addcontent/(likegit add)aem content commitcontent/(likegit commit)aem content pushcontent/changes to da.live (usecontent add&content commitfirst)if
contentfolder is present,aem upserves content first from here (and injectshead.htmland simulates metadata)