@backstage/integration
Version:
Helpers for managing integrations towards external systems
38 lines (35 loc) • 973 B
JavaScript
import { basicIntegrations, defaultScmResolveUrl } from '../helpers.esm.js';
import { readGoogleGcsIntegrationConfig, GOOGLE_GCS_HOST } from './config.esm.js';
class GoogleGcsIntegration {
constructor(integrationConfig) {
this.integrationConfig = integrationConfig;
}
static factory = ({
config
}) => {
const gcsConfig = config.has("integrations.googleGcs") ? readGoogleGcsIntegrationConfig(
config.getConfig("integrations.googleGcs")
) : { host: GOOGLE_GCS_HOST };
return basicIntegrations(
[new GoogleGcsIntegration(gcsConfig)],
(i) => i.config.host
);
};
get type() {
return "googleGcs";
}
get title() {
return this.integrationConfig.host;
}
get config() {
return this.integrationConfig;
}
resolveUrl(options) {
return defaultScmResolveUrl(options);
}
resolveEditUrl(url) {
return url;
}
}
export { GoogleGcsIntegration };
//# sourceMappingURL=GoogleGcsIntegration.esm.js.map