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

Store JS code in extra files #409

Closed
rfalke opened this issue Feb 8, 2022 · 3 comments
Closed

Store JS code in extra files #409

rfalke opened this issue Feb 8, 2022 · 3 comments
Assignees

Comments

@rfalke
Copy link

rfalke commented Feb 8, 2022

Describe the problem you'd like to have solved

Place all JS code (for example connection scripts) in separate file. Currently they are inline (both for yaml and json) which makes it harder to diff/work on them.

Describe the ideal solution

Provide an option (or make it the normal behavior) so that all JS code snippets are stored in an extra file.

Alternatives and current work-arounds

The current way of inline storage is ok but no ideal.

Additional context

.../connections/foo.json

{
  "options": {
    "scope": "openid email",
    "scripts": {
      "fetchUserProfile": "function(access_token, ctx, callback) {\n  'use strict';....

.../tenant.yaml

connections:
  - name: foo
    strategy: oauth2
    options:
      scripts:
        fetchUserProfile: |-
          function(access_token, ctx, callback) {
            'use strict';
...
@willvedd
Copy link
Contributor

Appreciate the suggestion, it certainly would lend itself to a better developer experience. For transparency's sake, the roadmap for this project for the next couple quarters is focused on bugs and some high-impact features. So while a good suggestion, not realistically a candidate for development. However, if you're comfortable, I invite you to submit a PR to hasten the process.

@rfalke
Copy link
Author

rfalke commented Feb 15, 2022

Thanks for the honest feedback.

@kushalshit27
Copy link
Contributor

Hi, @rfalke ,
Please check the latest version release; JS code snippets are stored in an extra file.

I would appreciate you test this out and if problem still persists, we can re-evaluate. However I'm going to close in the meantime. Thanks for opening this ticket!

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

3 participants