Skip to content

feat: add actions modules command tree - #1606

Open
developerkunal wants to merge 2 commits into
feat/sessions-refresh-tokens-commandsfrom
DXCDT-2171/actions-modules-tree
Open

feat: add actions modules command tree#1606
developerkunal wants to merge 2 commits into
feat/sessions-refresh-tokens-commandsfrom
DXCDT-2171/actions-modules-tree

Conversation

@developerkunal

Copy link
Copy Markdown
Contributor

🔧 Changes

Adds the auth0 actions modules command group for managing action modules, the reusable code libraries that actions can import.

New commands:

  • auth0 actions modules list — list modules, with --number, --json, --json-compact, and --csv output.
  • auth0 actions modules show <id> — show a module's code, dependencies, secrets, and version details.
  • auth0 actions modules create — create a module from a name and code, with optional dependencies, secrets, --api-version, and --publish. Runs guided interactive prompts when flags are omitted.
  • auth0 actions modules update <id> — update code, dependencies, or secrets independently, with --publish to snapshot a new immutable version.
  • auth0 actions modules delete <id>... — delete one or more modules.

Behavior notes:

  • update skips the API call when nothing changed and shows the current module instead of issuing an empty write request.
  • Because the API rejects deleting a module still referenced by a deployed action version (HTTP 412), such modules are hidden from the interactive delete picker, and this is called out in the command help.
  • Module code is rendered as a syntax-highlighted block beneath the details table so multi-line source keeps its formatting. Secret values are never displayed, only names.
  • Adds the ActionModuleAPIV3 and ActionModuleVersionAPIV3 interfaces over the go-auth0 v3 SDK, with regenerated mocks.

📚 References

DXCDT-2171

🔬 Testing

  • Table-driven unit tests cover the create, update, delete, and publish flows, the no-op update path, the deletable-module filtering, and the display view.
  • Commander integration tests in test/integration/action-modules-test-cases.yaml exercise list, create, create-and-publish, show, update, secret preservation, publish, invalid name, and delete. Verified locally against a live tenant via commander.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

Add the auth0 actions modules command group with list, show, create,
update, and delete, plus draft publishing support.

- create and update accept code, dependencies, and secrets, with guided
  interactive prompts and a --publish flag to snapshot a new immutable
  version
- update skips the API call when nothing changed and reports the current
  module instead of issuing an empty write
- delete accepts multiple ids and hides modules in use by deployed action
  versions, which the API refuses to delete
- code is shown as a syntax-highlighted block beneath the details table
- add unit tests and commander integration tests
@developerkunal
developerkunal marked this pull request as ready for review August 10, 2026 11:44
@developerkunal
developerkunal requested a review from a team as a code owner August 10, 2026 11:44
Add 'auth0 actions modules actions list' to list the actions that use
an action module, along with the module version each action is on.
Backed by the /actions/modules/{id}/actions endpoint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant