Skip to content

Expose 'service' module as a public export for dashboard also slightly changed config/index.js configurations #1539

@rajeevr-g

Description

@rajeevr-g

Is your feature request related to a problem? Please describe.

The current package exports expose ./ui, but the dashboard bootstrap/runtime implementation appears to reside in src/service/index.js.

The Service module is responsible for:

Creating the Express application
Registering routes
Serving the compiled frontend build
Listening on GIT_PROXY_UI_PORT

Since this module is not exported as part of the public package API, consumers cannot programmatically start the dashboard service independently.

This limitation became more visible in v2 because the package now uses Node.js "exports" restrictions. Unlike v1, consumers can no longer directly access arbitrary internal files from node_modules.

For example, consumers previously relied on internal imports such as:

require('@finos/git-proxy/src/config/file')

However, these paths are now blocked unless explicitly exported.

Configuration access can be resolved cleanly by re-exporting the required APIs from:

src/config/index.ts

However, the dashboard/service runtime itself is still inaccessible because src/service/index.js is not part of the public exports.

Describe the solution you'd like

Expose the service module as part of the public package exports.
This would enable programmatic dashboard startup, for example:

const service = require('@finos/git-proxy/service');

await service.start();

Additionally, expose configuration helpers through the public ./config entrypoint instead of requiring consumers to depend on internal file paths.

Describe alternatives you've considered

Current workaround approaches rely on importing internal package paths, such as:

require('@finos/git-proxy/src/config/file')
require('@finos/git-proxy/src/config/env')

However, these paths are incompatible with Node.js package exports restrictions introduced in v2 and tightly couple consumers to the internal folder structure.

Re-exporting the required APIs through ./config provides a cleaner and more stable public interface.

Additional context

Based on the current source structure:

src/ui — frontend source assets/components
src/service/index.js — serves the compiled frontend build and starts the dashboard server
src/config/file.ts — configuration file helpers
src/config/env.ts — environment/server configuration

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions