Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
6 tasks done
mmawhinney opened this issue Dec 19, 2024 · 1 comment
Open
6 tasks done

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

mmawhinney opened this issue Dec 19, 2024 · 1 comment

Comments

@mmawhinney
Copy link

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

@kushalshit27
Copy link
Contributor

Hi, @mmawhinney
Thanks for opening this issue. Removing the bug tag seems more like a feature support.

Support referencing the template from a file similar to the directory format in YAML; it can be a breaking change for some users. This feature can be supported in the next major version releases.

Thanks for your input for making this better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants