Add aio app console where and aio app console open - #929
Open
obarcelonap wants to merge 4 commits into
Open
Conversation
Adds `aio app console where` and `aio app console open`, local-app equivalents of the global `aio console where`/`aio console open` commands, to inspect and jump to the org/project/workspace an app is currently linked to via `aio app use`. Extracts the shared config loading/formatting logic out of `use.js` into `src/lib/console-helper.js` so both commands and `use.js` share the same implementation.
Previously these commands silently fell back to the global console config when no local .aio existed for the app, which could show or open an unrelated org/project/workspace. Now they fail fast with a clear message pointing to `aio app use` instead.
Previously loadCurrentConfiguration() merged the local .aio file with the global console config, so a local .aio missing e.g. workspace would silently inherit a stale/unrelated workspace from the global config. These commands now read local-only config exclusively, and hasLocalConfiguration() only requires org+project locally (workspace remains a legitimate optional/partial state).
…ding Both commands referred to "this app" being linked/configured with different phrasing than the success output's "This app is set to use:" - reword the error to match.
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.
Description
Adds two new commands,
aio app console whereandaio app console open, that let you inspect and jump to the Adobe Developer Console Org/Project/Workspace the current app is linked to (as set byaio app use).aio app console whereprints the Org/Project/Workspace this app is currently set to use:It also supports
--jsonand--ymlfor scripting:aio app console openopens that same Workspace directly in the Developer Console web UI, in the default browser - no need to navigate through the Console UI to find the right Org/Project/Workspace.If the app hasn't been linked to a Console configuration yet (no local
.aiofile), both commands fail with a clear, actionable message instead of doing nothing or showing unrelated data:Related Issue
N/A
Motivation and Context
There was no local, per-app equivalent of
aio console where/aio console open(which only report the global CLI-wide Org/Project/Workspace selection). Once an app is linked viaaio app use, there was no quick way to check which Org/Project/Workspace it's actually configured against, or to jump to it in the Developer Console, without re-reading the.aiofile by hand or re-runningaio app useinteractively (which can prompt to switch workspace/services - not a safe "just show me" operation).How Has This Been Tested?
src/testtree.@adobe/aio-cli(aio plugins link .) and manually exercised both commands end-to-end through the realaiobinary, in directories with a fully-configured local.aio, a partially-configured one (Org/Project but no Workspace), and no.aioat all, to confirm the output/errors above match real CLI behavior (not justbin/run, which formats errors differently).Screenshots (if appropriate):
N/A (CLI output shown above)
Types of changes
Checklist: