New: Headless --dev install driven by repos.json#98
Closed
taylortom wants to merge 2 commits into
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #97
New
--devinstall now works.bin/install.jsremoves the "no effect in headless mode" warning and, after the umbrella clone, looks for arepos.jsonat the install root. If found, its entries driveinstallLocalModules; if absent, the install continues without local modules (preserves existing behaviour for non-forks).lib/utils/loadDevModulesConfig.js— reads and parses the umbrella'srepos.json, returnsnullwhen absent.Update
lib/utils/cloneRepo.jsaccepts an optionalurlthat overrides the hardcodedadapt-securitybase. Backward compatible — all existing call sites (UI umbrella clone, CliCommand wrapper) continue to work unchanged since none of them passurl.lib/utils/installLocalModules.jsnow acceptsoptions.modulesas either strings (old behaviour, deferred to the hardcoded org) or{ name, url }objects (new, used by the headless flow). Also correctly handles scoped package names (e.g.@cgkineo/foo) when deriving thelocal_adapt_modules/<dir>name.Config shape
repos.jsonat the umbrella root is an array of{ name, url }:[ { "name": "@cgkineo/adapt-authoring-collab", "url": "git@github.com:cgkineo/adapt-authoring-collab.git" }, { "name": "adapt-authoring-core", "url": "git@github.com:adapt-security/adapt-authoring-core.git" } ]Testing
--devinstall:npx adapt-security/at-utils install --dev --no-ui <fresh-dir>against an umbrella with a committedrepos.json— verify all listed modules clone tolocal_adapt_modules/<short-name>/with correct remotes, including multi-org entriesrepos.json: same command succeeds, prints skip message, leaveslocal_adapt_modules/emptyUiServer.downloadHandlerandCliCommand.cloneRepostill works (neither passesurl, so fallback to hardcoded default remains)Scope notes
This PR only covers
install --dev. Headlessupdate --devis not addressed —bin/update.jsstill needs the same treatment in a follow-up. UI flow also still uses theadapt-authoring.json-based discovery path rather thanrepos.json; aligning those is a separate Phase 3 concern.