Skip to content

Allow setting page partial from a file using YAML format #1006

@mmawhinney

Description

@mmawhinney

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this tool and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

I'd previously been managing a partial for my signup page using the Management API. I see that the CLI now supports managing partials. After exporting my current settings, I noticed that the raw template gets dumped in the tenant.yml file, eg:

prompts:
  partials:
    signup:
      signup:
        form-content-end: >-
          <div>partial code...</div>

From what I've been able to find, the directory format supports referencing the template from a file, eg:

"signup": [
  {
    "signup": [
      {
        "name": "form-content-end",
        "template": "./prompts/partials/signup/signup/form-content-end.html"
      }
    ]
  }
] 

But attempting to use a similar structure in the tenant.yml causes failures on import due to not being a valid schema.

Expectation

It would be great to have support for referencing a template file in YAML as managing the template directly in the tenant.yml file is messy once you have more than a couple lines of HTML.

Reproduction

  1. Upload a partial using the Management API
  2. Export tenant settings using the YAML format
  3. Notice that the partial contents are exported directly into tenant.yml instead of a file

Deploy CLI version

8.4.1

Node version

18.19.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestproposalProposing new or revised functionality for comment

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions