Skip to content

Store JS code in extra files #409

Closed
Closed
@rfalke

Description

@rfalke

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';
...

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions